Class ThinTexture
Hierarchy
- ThinTexture
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
-
Instantiates a new ThinTexture. Base class of all the textures in babylon. This can be used as an internal texture wrapper in ThinEngine to benefit from the cache
Parameters
-
internalTexture: Nullable<InternalTexture>
Define the internalTexture to wrap
Returns ThinTexture
-
Properties
anisotropic Filtering LevelSearch playground for anisotropicFilteringLevel
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 StateSearch playground for delayLoadState
Define the current state of the loading sequence when in delayed load mode.
wrapRSearch playground for wrapR
Value | Type | Description |
---|---|---|
0 | CLAMP_ADDRESSMODE | |
1 | WRAP_ADDRESSMODE | |
2 | MIRROR_ADDRESSMODE |
Accessors
coordinates Mode
-
How a texture is mapped. Unused in thin texture mode.
Returns number
is2DArray
-
Define if the texture is a 2d array texture (webgl 2) or if false a 2d texture.
Returns boolean
-
Define if the texture is a 2d array texture (webgl 2) or if false a 2d texture.
Parameters
-
value: boolean
Returns any
-
is3D
-
Define if the texture is a 3d texture (webgl 2) or if false a 2d texture.
Returns boolean
-
Define if the texture is a 3d texture (webgl 2) or if false a 2d texture.
Parameters
-
value: boolean
Returns any
-
is Cube
-
Define if the texture is a cube texture or if false a 2d texture.
Returns boolean
-
Define if the texture is a cube texture or if false a 2d texture.
Parameters
-
value: boolean
Returns any
-
wrapU
-
Value Type Description 0 CLAMP_ADDRESSMODE 1 WRAP_ADDRESSMODE 2 MIRROR_ADDRESSMODE Returns number
-
Value Type Description 0 CLAMP_ADDRESSMODE 1 WRAP_ADDRESSMODE 2 MIRROR_ADDRESSMODE Parameters
-
value: number
Returns any
-
wrapV
-
Value Type Description 0 CLAMP_ADDRESSMODE 1 WRAP_ADDRESSMODE 2 MIRROR_ADDRESSMODE Returns number
-
Value Type Description 0 CLAMP_ADDRESSMODE 1 WRAP_ADDRESSMODE 2 MIRROR_ADDRESSMODE Parameters
-
value: number
Returns any
-
Methods
delay LoadSearch playground for delayLoad
-
Triggers the load sequence in delayed load mode.
Returns void
disposeSearch playground for dispose
-
Dispose the texture and release its associated resources.
Returns void
get Base SizeSearch playground for getBaseSize
-
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 NameSearch playground for getClassName
-
Get the class name of the texture.
Returns string
"ThinTexture"
get Internal TextureSearch playground for getInternalTexture
-
Get the underlying lower level texture from Babylon.
Returns Nullable<InternalTexture>
the insternal texture
get SizeSearch playground for getSize
-
Get the size of the texture.
Returns ISize
the texture size.
is ReadySearch playground for isReady
-
Get if the texture is ready to be used (downloaded, converted, mip mapped...).
Returns boolean
true if fully ready
release Internal TextureSearch playground for releaseInternalTexture
-
Release and destroy the underlying lower level texture aka internalTexture.
Returns void
update Sampling ModeSearch playground for updateSamplingMode
-
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
Returns void
-
Base class of all the textures in babylon. It groups all the common properties required to work with Thin Engine.