InternalTexture

Class used to store data associated with WebGL texture data for the engine This class should not be used directly

Hierarchy

  • InternalTexture

Index

Constructors

constructor

Find examples in Playground
  • 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

baseDepth

Find examples in Playground
baseDepth: number

Gets the initial depth of the texture (It could be rescaled if the current system does not support non power of two textures)

baseHeight

Find examples in Playground
baseHeight: number

Gets the initial height of the texture (It could be rescaled if the current system does not support non power of two textures)

baseWidth

Find examples in Playground
baseWidth: number

Gets the initial width of the texture (It could be rescaled if the current system does not support non power of two textures)

depth

Find examples in Playground
depth: number

Gets the depth of the texture

format

Find examples in Playground
format: number

Gets the format of the texture (RGB, RGBA...)

generateMipMaps

Find examples in Playground
generateMipMaps: boolean

Gets a boolean indicating if the texture needs mipmaps generation

height

Find examples in Playground
height: number

Gets the height of the texture

invertY

Find examples in Playground
invertY: boolean

Gets a boolean indicating if the texture is inverted on Y axis

is2DArray

Find examples in Playground
is2DArray: boolean

Defines if the texture contains 2D array data

is3D

Find examples in Playground
is3D: boolean

Defines if the texture contains 3D data

isCube

Find examples in Playground
isCube: boolean

Defines if the texture is a cube texture

isMultiview

Find examples in Playground
isMultiview: boolean

Defines if the texture contains multiview data

isReady

Find examples in Playground
isReady: boolean

Defines if the texture is ready

onLoadedObservable

Find examples in Playground
onLoadedObservable: Observable<InternalTexture>

Observable called when the texture is loaded

samples

Find examples in Playground
samples: number

Gets the number of samples used by the texture (WebGL2+ only)

samplingMode

Find examples in Playground
samplingMode: number

Gets the sampling mode of the texture

source

Find examples in Playground

Gets the data source type of the texture

type

Find examples in Playground
type: number

Gets the type of the texture (int, float...)

url

Find examples in Playground
url: string

Gets the URL used to load this texture

width

Find examples in Playground
width: number

Gets the width of the texture

Methods

dispose

Find examples in Playground
  • dispose(): void
  • Dispose the current allocated resources

    Returns void

getEngine

Find examples in Playground
  • Gets the Engine the texture belongs to.

    Returns ThinEngine

    The babylon engine

incrementReferences

Find examples in Playground
  • incrementReferences(): void
  • Increments the number of references (ie. the number of Texture that point to it)

    Returns void

updateSize

Find examples in Playground
  • updateSize(width: int, height: int, depth?: int): void
  • Change the size of the texture (not the size of the content)

    Parameters

    • width: int

      defines the new width

    • height: int

      defines the new height

    • Optional depth: int

      defines the new depth (1 by default)

    Returns void

Generated using TypeDoc