Properties:
Name | Type | Description |
---|---|---|
alphaMode |
ALPHA_MODES |
the alpha mode of the texture |
antialias |
boolean |
Only really affects RenderTextures. Should we use antialiasing for this texture. It will look better, but may impact performance as a Blit operation will be required to resolve the texture. |
autoGarbageCollect |
boolean |
If true, the Garbage Collector will unload this texture if it is not used after a period of time |
autoGenerateMipmaps |
boolean |
Should we auto generate mipmaps for this texture? This will automatically generate mipmaps for this texture when uploading to the GPU. Mipmapped textures take up more memory, but can look better when scaled down. For performance reasons, it is recommended to NOT use this with RenderTextures, as they are often updated every frame.
If you do, make sure to call |
dimensions |
TEXTURE_DIMENSIONS |
how many dimensions does this texture have? currently v8 only supports 2d |
format |
TEXTURE_FORMATS |
the format that the texture data has |
height |
number |
the pixel height of this texture source. This is the REAL pure number, not accounting resolution |
label |
string |
optional label, can be used for debugging |
mipLevelCount |
number |
The number of mip levels to generate for this texture. this is overridden if autoGenerateMipmaps is true |
resolution |
number |
the resolution of the texture. |
resource |
T |
the resource that will be upladed to the GPU. This is where we get our pixels from eg an ImageBimt / Canvas / Video etc |
width |
number |
the pixel width of this texture source. This is the REAL pure number, not accounting resolution |
Extends
- TextureStyleOptions
Members
alphaMode ALPHA_MODES
the alpha mode of the texture
Only really affects RenderTextures. Should we use antialiasing for this texture. It will look better, but may impact performance as a Blit operation will be required to resolve the texture.
If true, the Garbage Collector will unload this texture if it is not used after a period of time
Should we auto generate mipmaps for this texture? This will automatically generate mipmaps for this texture when uploading to the GPU. Mipmapped textures take up more memory, but can look better when scaled down.
For performance reasons, it is recommended to NOT use this with RenderTextures, as they are often updated every frame.
If you do, make sure to call updateMipmaps
after you update the texture.
how many dimensions does this texture have? currently v8 only supports 2d
the format that the texture data has
the pixel height of this texture source. This is the REAL pure number, not accounting resolution
optional label, can be used for debugging
The number of mip levels to generate for this texture. this is overridden if autoGenerateMipmaps is true
the resolution of the texture.
the resource that will be upladed to the GPU. This is where we get our pixels from eg an ImageBimt / Canvas / Video etc
the pixel width of this texture source. This is the REAL pure number, not accounting resolution