Advanced
Optional
textureOptions: TextureSourceOptionsoptions that will be passed to BaseRenderTexture constructor
options for creating a new TextureSource
Optional
_resourceId?: numberOptional
addressMode?: WRAP_MODEsetting this will set wrapModeU,wrapModeV and wrapModeW all at once!
Optional
addressModeU?: WRAP_MODEspecifies the {{GPUAddressMode|address modes}} for the texture width, height, and depth coordinates, respectively.
Optional
addressModeV?: WRAP_MODEspecifies the {{GPUAddressMode|address modes}} for the texture width, height, and depth coordinates, respectively.
Optional
addressModeW?: WRAP_MODESpecifies the {{GPUAddressMode|address modes}} for the texture width, height, and depth coordinates, respectively.
Optional
alphaMode?: ALPHA_MODESthe alpha mode of the texture
Optional
antialias?: booleanOnly 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.
Optional
autoGarbageCollect?: booleanIf true, the Garbage Collector will unload this texture if it is not used after a period of time
Optional
autoGenerateMipmaps?: booleanShould 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.
Optional
compare?: COMPARE_FUNCTIONWhen provided the sampler will be a comparison sampler with the specified COMPARE_FUNCTION. Note: Comparison samplers may use filtering, but the sampling results will be implementation-dependent and may differ from the normal filtering rules.
Optional
Readonly
destroyed?: booleanHas the style been destroyed?
Optional
dimensions?: TEXTURE_DIMENSIONShow many dimensions does this texture have? currently v8 only supports 2d
Optional
format?: TEXTURE_FORMATSthe format that the texture data has
Optional
height?: numberthe pixel height of this texture source. This is the REAL pure number, not accounting resolution
Optional
label?: stringoptional label, can be used for debugging
Optional
lodMaxClamp?: numberSpecifies the minimum and maximum levels of detail, respectively, used internally when sampling a texture.
Optional
lodMinClamp?: numberspecifies the minimum and maximum levels of detail, respectively, used internally when sampling a texture.
Optional
magFilter?: SCALE_MODEspecifies the sampling behavior when the sample footprint is smaller than or equal to one texel.
Optional
maxAnisotropy?: numberSpecifies the maximum anisotropy value clamp used by the sampler. Note: Most implementations support TextureStyle#maxAnisotropy values in range between 1 and 16, inclusive. The used value of TextureStyle#maxAnisotropy will be clamped to the maximum value that the platform supports.
setting this to anything higher than 1 will set scale modes to 'linear'
Optional
minFilter?: SCALE_MODEspecifies the sampling behavior when the sample footprint is larger than one texel.
Optional
mipLevelCount?: numberThe number of mip levels to generate for this texture. this is overridden if autoGenerateMipmaps is true
Optional
mipmapFilter?: SCALE_MODEspecifies behavior for sampling between mipmap levels.
Optional
resolution?: numberthe resolution of the texture.
Optional
resource?: Tthe resource that will be uploaded to the GPU. This is where we get our pixels from eg an ImageBimt / Canvas / Video etc
Optional
scaleMode?: SCALE_MODEsetting this will set magFilter,minFilter and mipmapFilter all at once!
Optional
width?: numberthe pixel width of this texture source. This is the REAL pure number, not accounting resolution
Optional
wrapMode?: WRAP_MODEDestroys the style
Allow renderTextures of the same size as screen, not just pow2
Automatically sets to true after setScreenSize
The default options for texture pool
The default texture style for the pool
Clears the pool.
Optional
destroyTextures: booleanDestroy all stored textures.
Creates texture with params that were specified in pool constructor.
Width of texture in pixels.
Height of texture in pixels.
Gets a Power-of-Two render texture or fullScreen texture
The minimum width of the render texture.
The minimum height of the render texture.
The resolution of the render texture.
The new render texture.
Gets extra texture of the same size as input renderTexture
The texture to check what size it is.
Whether to use antialias.
A texture that is a power of two
Place a render texture back into the pool. Optionally reset the style of the texture to the default texture style. useful if you modified the style of the texture after getting it from the pool.
The renderTexture to free
Whether to reset the style of the texture to the default texture style
Texture pool, used by FilterSystem and plugins.
Stores collection of temporary pow2 or screen-sized renderTextures
If you use custom RenderTexturePool for your filters, you can use methods
getFilterTexture
andreturnFilterTexture
same as in default pool