Class InternalTexture
Hierarchy
- TextureSampler
- InternalTexture
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
Creates a new InternalTexture
Parameters
engine: ThinEngine
defines the engine to use
source: InternalTextureSource
defines the type of data that will be used
Optional delayAllocation: boolean
if the texture allocation should be delayed (default: false)
Returns InternalTexture
Properties
base DepthSearch playground for baseDepth
Gets the initial depth of the texture (It could be rescaled if the current system does not support non power of two textures)
base HeightSearch playground for baseHeight
Gets the initial height of the texture (It could be rescaled if the current system does not support non power of two textures)
base WidthSearch playground for baseWidth
Gets the initial width of the texture (It could be rescaled if the current system does not support non power of two textures)
depthSearch playground for depth
Gets the depth of the texture
formatSearch playground for format
Gets the format of the texture (RGB, RGBA...)
generate Mip MapsSearch playground for generateMipMaps
Gets a boolean indicating if the texture needs mipmaps generation
heightSearch playground for height
Gets the height of the texture
invertYSearch playground for invertY
Gets a boolean indicating if the texture is inverted on Y axis
is2DArraySearch playground for is2DArray
Defines if the texture contains 2D array data
is3DSearch playground for is3D
Defines if the texture contains 3D data
is CubeSearch playground for isCube
Defines if the texture is a cube texture
is MultiviewSearch playground for isMultiview
Defines if the texture contains multiview data
is ReadySearch playground for isReady
Defines if the texture is ready
on Error ObservableSearch playground for onErrorObservable
Observable called when the texture load is raising an error
on Loaded ObservableSearch playground for onLoadedObservable
Observable called when the texture is loaded
on Rebuild CallbackSearch playground for onRebuildCallback
If this callback is defined it will be called instead of the default _rebuild function
samplesSearch playground for samples
Gets the number of samples used by the texture (WebGL2+ only)
sampling ModeSearch playground for samplingMode
Gets the sampling mode of the texture
typeSearch playground for type
Gets the type of the texture (int, float...)
urlSearch playground for url
Gets the URL used to load this texture
widthSearch playground for width
Gets the width of the texture
Accessors
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.
Returns Nullable<number>
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.
Parameters
value: Nullable<number>
Returns void
comparison Function
Gets or sets the comparison function (Constants.LESS, Constants.EQUAL, etc). Set 0 to not use a comparison function
Returns number
Gets or sets the comparison function (Constants.LESS, Constants.EQUAL, etc). Set 0 to not use a comparison function
Parameters
value: number
Returns void
source
Gets the data source type of the texture
Returns InternalTextureSource
unique Id
Gets the unique id of the internal texture
Returns number
use Mip Maps
Gets a boolean indicating if the texture uses mipmaps TODO implements useMipMaps as a separate setting from generateMipMaps
Returns boolean
Gets a boolean indicating if the texture uses mipmaps TODO implements useMipMaps as a separate setting from generateMipMaps
Parameters
value: boolean
Returns void
wrapR
wrapU
wrapV
Methods
compare SamplerSearch playground for compareSampler
Compares this sampler with another one
Parameters
other: TextureSampler
sampler to compare with
Returns boolean
true if the samplers have the same parametres, else false
disposeSearch playground for dispose
Dispose the current allocated resources
Returns void
get EngineSearch playground for getEngine
Gets the Engine the texture belongs to.
Returns ThinEngine
The babylon engine
increment ReferencesSearch playground for incrementReferences
Increments the number of references (ie. the number of Texture that point to it)
Returns void
set ParametersSearch playground for setParameters
Sets all the parameters of the sampler
Parameters
Optional wrapU: number
u address mode (default: TEXTURE_WRAP_ADDRESSMODE)
Optional wrapV: number
v address mode (default: TEXTURE_WRAP_ADDRESSMODE)
Optional wrapR: number
r address mode (default: TEXTURE_WRAP_ADDRESSMODE)
Optional anisotropicFilteringLevel: number
anisotropic level (default: 1)
Optional samplingMode: number
sampling mode (default: Constants.TEXTURE_BILINEAR_SAMPLINGMODE)
Optional comparisonFunction: number
comparison function (default: 0 - no comparison function)
Returns TextureSampler
the current sampler instance
update SizeSearch playground for updateSize
Change the size of the texture (not the size of the content)
Parameters
width: number
defines the new width
height: number
defines the new height
Optional depth: number
defines the new depth (1 by default)
Returns void
Class used to store data associated with WebGL texture data for the engine This class should not be used directly