Class ThinTexture
Hierarchy (View Summary)
- ThinTexture
Constructors
constructor
-
Instantiates a new ThinTexture. Base class of all the textures in babylon. This can be used as an internal texture wrapper in AbstractEngine to benefit from the cache
Parameters
- internalTexture: any
Define the internalTexture to wrap. You can also pass a RenderTargetWrapper, in which case the texture will be the render target's texture
Returns ThinTexture
- internalTexture: any
Properties
anisotropic Filtering Level
With compliant hardware and browser (supporting anisotropic filtering) this defines the level of anisotropic filtering in the texture. The higher the better but the slower. This defaults to 4 as it seems to be the best tradeoff.
delay Load State
Define the current state of the loading sequence when in delayed load mode.
wrap R
| Value | Type | Description |
|---|---|---|
| 0 | CLAMP_ADDRESSMODE | |
| 1 | WRAP_ADDRESSMODE | |
| 2 | MIRROR_ADDRESSMODE |
Accessors
coordinates Mode
-
get coordinatesMode(): number
How a texture is mapped. Unused in thin texture mode.
Returns number
is2 D Array
-
get is2DArray(): boolean
Define if the texture is a 2d array texture (webgl 2) or if false a 2d texture.
Returns boolean
-
set is2DArray(value: boolean): void
Parameters
- value: boolean
Returns void
is3 D
-
get is3D(): boolean
Define if the texture is a 3d texture (webgl 2) or if false a 2d texture.
Returns boolean
-
set is3D(value: boolean): void
Parameters
- value: boolean
Returns void
is Cube
-
get isCube(): boolean
Define if the texture is a cube texture or if false a 2d texture.
Returns boolean
-
set isCube(value: boolean): void
Parameters
- value: boolean
Returns void
sampling Mode
-
get samplingMode(): number
Get the current sampling mode associated with the texture.
Returns number
wrap U
-
get wrapU(): number
Value Type Description 0 CLAMP_ADDRESSMODE 1 WRAP_ADDRESSMODE 2 MIRROR_ADDRESSMODE Returns number
-
set wrapU(value: number): void
Parameters
- value: number
Returns void
wrap V
-
get wrapV(): number
Value Type Description 0 CLAMP_ADDRESSMODE 1 WRAP_ADDRESSMODE 2 MIRROR_ADDRESSMODE Returns number
-
set wrapV(value: number): void
Parameters
- value: number
Returns void
Methods
delay Load
-
Triggers the load sequence in delayed load mode.
Returns void
dispose
-
Dispose the texture and release its associated resources.
Returns void
get Base Size
-
Get the base size of the texture. It can be different from the size if the texture has been resized for POT for instance
Returns ISize
the base size
get Class Name
-
Get the class name of the texture.
Returns string
"ThinTexture"
get Internal Texture
-
Get the underlying lower level texture from Babylon.
Returns Nullable<InternalTexture>
the internal texture
get Size
is Ready
-
Get if the texture is ready to be used (downloaded, converted, mip mapped...).
Returns boolean
true if fully ready
release Internal Texture
-
Release and destroy the underlying lower level texture aka internalTexture.
Returns void
update Sampling Mode
-
Update the sampling mode of the texture. Default is Trilinear mode.
Value Type Description 1 NEAREST_SAMPLINGMODE or NEAREST_NEAREST_MIPLINEAR Nearest is: mag = nearest, min = nearest, mip = linear 2 BILINEAR_SAMPLINGMODE or LINEAR_LINEAR_MIPNEAREST Bilinear is: mag = linear, min = linear, mip = nearest 3 TRILINEAR_SAMPLINGMODE or LINEAR_LINEAR_MIPLINEAR Trilinear is: mag = linear, min = linear, mip = linear 4 NEAREST_NEAREST_MIPNEAREST 5 NEAREST_LINEAR_MIPNEAREST 6 NEAREST_LINEAR_MIPLINEAR 7 NEAREST_LINEAR 8 NEAREST_NEAREST 9 LINEAR_NEAREST_MIPNEAREST 10 LINEAR_NEAREST_MIPLINEAR 11 LINEAR_LINEAR 12 LINEAR_NEAREST mag: magnification filter (close to the viewer) min: minification filter (far from the viewer) mip: filter used between mip map levels
Parameters
- samplingMode: number
Define the new sampling mode of the texture
- generateMipMaps: boolean = false
Define if the texture should generate mip maps or not. Default is false.
Returns void
- samplingMode: number
Base class of all the textures in babylon. It groups all the common properties required to work with Thin Engine.