Interface: TextureSourceOptions

TextureSourceOptions

options for creating a new TextureSource

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 updateMipmaps after you update the texture.

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

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 updateMipmaps after you update the texture.

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