Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ThinTexture

Base class of all the textures in babylon. It groups all the common properties required to work with Thin Engine.

Hierarchy

Index

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

    Returns ThinTexture

Properties

anisotropicFilteringLevelSearch playground for anisotropicFilteringLevel

anisotropicFilteringLevel: 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. This defaults to 4 as it seems to be the best tradeoff.

delayLoadStateSearch playground for delayLoadState

delayLoadState: number

Define the current state of the loading sequence when in delayed load mode.

wrapRSearch playground for wrapR

wrapR: number
ValueTypeDescription
0CLAMP_ADDRESSMODE
1WRAP_ADDRESSMODE
2MIRROR_ADDRESSMODE

Accessors

coordinatesMode

  • get coordinatesMode(): number
  • How a texture is mapped. Unused in thin texture mode.

    Returns number

is2DArray

  • get is2DArray(): boolean
  • set is2DArray(value: boolean): any
  • 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

  • get is3D(): boolean
  • set is3D(value: boolean): any
  • 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

isCube

  • get isCube(): boolean
  • set isCube(value: boolean): any
  • 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

samplingMode

  • get samplingMode(): number
  • Get the current sampling mode associated with the texture.

    Returns number

wrapU

  • get wrapU(): number
  • set wrapU(value: number): any
  • ValueTypeDescription
    0CLAMP_ADDRESSMODE
    1WRAP_ADDRESSMODE
    2MIRROR_ADDRESSMODE

    Returns number

  • ValueTypeDescription
    0CLAMP_ADDRESSMODE
    1WRAP_ADDRESSMODE
    2MIRROR_ADDRESSMODE

    Parameters

    • value: number

    Returns any

wrapV

  • get wrapV(): number
  • set wrapV(value: number): any
  • ValueTypeDescription
    0CLAMP_ADDRESSMODE
    1WRAP_ADDRESSMODE
    2MIRROR_ADDRESSMODE

    Returns number

  • ValueTypeDescription
    0CLAMP_ADDRESSMODE
    1WRAP_ADDRESSMODE
    2MIRROR_ADDRESSMODE

    Parameters

    • value: number

    Returns any

Methods

delayLoadSearch playground for delayLoad

  • delayLoad(): void
  • Triggers the load sequence in delayed load mode.

    Returns void

disposeSearch playground for dispose

  • dispose(): void
  • Dispose the texture and release its associated resources.

    Returns void

getBaseSizeSearch 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

getClassNameSearch playground for getClassName

  • getClassName(): string
  • Get the class name of the texture.

    Returns string

    "ThinTexture"

getInternalTextureSearch playground for getInternalTexture

  • Get the underlying lower level texture from Babylon.

    Returns Nullable<InternalTexture>

    the internal texture

getSizeSearch playground for getSize

  • Get the size of the texture.

    Returns ISize

    the texture size.

isReadySearch playground for isReady

  • isReady(): boolean
  • Get if the texture is ready to be used (downloaded, converted, mip mapped...).

    Returns boolean

    true if fully ready

releaseInternalTextureSearch playground for releaseInternalTexture

  • releaseInternalTexture(): void
  • Release and destroy the underlying lower level texture aka internalTexture.

    Returns void

updateSamplingModeSearch playground for updateSamplingMode

  • updateSamplingMode(samplingMode: number): void
  • Update the sampling mode of the texture. Default is Trilinear mode.

    ValueTypeDescription
    1NEAREST_SAMPLINGMODE or NEAREST_NEAREST_MIPLINEARNearest is: mag = nearest, min = nearest, mip = linear
    2BILINEAR_SAMPLINGMODE or LINEAR_LINEAR_MIPNEARESTBilinear is: mag = linear, min = linear, mip = nearest
    3TRILINEAR_SAMPLINGMODE or LINEAR_LINEAR_MIPLINEARTrilinear is: mag = linear, min = linear, mip = linear
    4NEAREST_NEAREST_MIPNEAREST
    5NEAREST_LINEAR_MIPNEAREST
    6NEAREST_LINEAR_MIPLINEAR
    7NEAREST_LINEAR
    8NEAREST_NEAREST
    9LINEAR_NEAREST_MIPNEAREST
    10LINEAR_NEAREST_MIPLINEAR
    11LINEAR_LINEAR
    12LINEAR_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

Legend

  • Constructor
  • Property
  • Method
  • Accessor
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method