Texture
The "texture" data structure contains information about an image texture used in a computer program or game engine. The following keys are included in this structure:
| Key | Type | Description |
|---|---|---|
| hash | String | A unique identifier for the texture |
| type | String | The type of the texture (e.g. Image, Normal, etc.) |
| slot | String | The prefered texture slot |
| mipmapCount | Integer | The number of mipmap levels in the texture |
| levels | Integer | The number of levels a texture has |
| size | size | The size of the texture in pixels |
| filterMode | Integer | The filtering mode used when rendering the texture |
| wrapMode | Integer | The wrapping mode used when rendering the texture |
| linear | Boolean | A value indicating whether linear filtering |
| transparent | Boolean | A value indicating whether the texture has any |
| textureFiles | Array of textureFiles | Array of texture files |
The above data structure can be represented:
"texture":{
"hash": "24138b00e6f6d85f9b410777a56aead0",
"type": "Image",
"slot": "_MainTex",
"mipmapCount": 10,
"levels": 6,
"size": {
"width": 512,
"height": 512,
"pow2": true
},
"filterMode": 1,
"wrapMode": 0,
"linear": false,
"transparent": false,
"textureFiles":[]
}
Texture File
Texture file describes properties of a texture. It inherits all keys from a file and has more keys described in the table bellow.
| Key | Type | Description |
|---|---|---|
| file | file | File information |
| size | size | The size of the texture in pixels |
| format | string | Format |
| mipmapCount | integer | The number of mipmap levels in the texture file |
| level | integer | Level of a texture |
| transparent | boolean | Is transparent |
Example
textureFile example
{
"file":{
"name": "24138b00e6f6d85f9b410777a56aead0.basis",
"hash": "24138b00e6f6d85f9b410777a56aead0",
"size": 44619,
"url": "https://example.com/24138b00e6f6d85f9b410777a56aead0.basis",
"type": "basis",
"storage": "AWS"
},
"variant": "original",
"size": {
"width": 512,
"height": 512,
"pow2": true
},
"format": "RGBA32",
"mipmapCount": 10,
"level": 1,
"transparent": false
}