InternalTexture

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

Hierarchy

  • InternalTexture

Implements

Index

Constructors

constructor

  • Creates a new InternalTexture

    Parameters

    • engine: Engine

      defines the engine to use

    • dataSource: number

      defines the type of data that will be used

    Returns InternalTexture

Properties

baseDepth

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

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

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)

dataSource

dataSource: number

Gets the data source type of the texture (can be one of the BABYLON.InternalTexture.DATASOURCE_XXXX)

depth

depth: number

Gets the depth of the texture

format

format: number

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

generateMipMaps

generateMipMaps: boolean

Gets a boolean indicating if the texture needs mipmaps generation

height

height: number

Gets the height of the texture

invertY

invertY: boolean

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

is3D

is3D: boolean

Defines if the texture contains 3D data

isCube

isCube: boolean

Defines if the texture is a cube texture

isReady

isReady: boolean

Defines if the texture is ready

next

Gets or set the next tracker in the list

onLoadedObservable

onLoadedObservable: Observable<InternalTexture>

Observable called when the texture is loaded

previous

Gets or set the previous tracker in the list

samples

samples: number

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

samplingMode

samplingMode: number

Gets the sampling mode of the texture

type

type: number

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

url

url: string

Gets the URL used to load this texture

width

width: number

Gets the width of the texture

Static DATASOURCE_CUBE

DATASOURCE_CUBE: number

Texture data comes from a cube data file

Static DATASOURCE_CUBEPREFILTERED

DATASOURCE_CUBEPREFILTERED: number

Texture data come from a prefiltered cube data file

Static DATASOURCE_CUBERAW

DATASOURCE_CUBERAW: number

Texture data comes from a raw cube data

Static DATASOURCE_CUBERAW_RGBD

DATASOURCE_CUBERAW_RGBD: number

Texture data comes from a raw cube data encoded with RGBD

Static DATASOURCE_DEPTHTEXTURE

DATASOURCE_DEPTHTEXTURE: number

Texture content is a depth texture

Static DATASOURCE_DYNAMIC

DATASOURCE_DYNAMIC: number

Texture content is dynamic (video or dynamic texture)

Static DATASOURCE_MULTIRENDERTARGET

DATASOURCE_MULTIRENDERTARGET: number

Texture content is part of a multi render target process

Static DATASOURCE_RAW

DATASOURCE_RAW: number

Texture data comes from raw data (ArrayBuffer)

Static DATASOURCE_RAW3D

DATASOURCE_RAW3D: number

Texture content is raw 3D data

Static DATASOURCE_RENDERTARGET

DATASOURCE_RENDERTARGET: number

Texture content is generated by rendering to it

Static DATASOURCE_TEMP

DATASOURCE_TEMP: number

Texture data is only used for temporary storage

Static DATASOURCE_UNKNOWN

DATASOURCE_UNKNOWN: number

The source of the texture data is unknown

Static DATASOURCE_URL

DATASOURCE_URL: number

Texture data comes from an URL

Methods

dispose

  • dispose(): void
  • Dispose the current allocated resources

    Returns void

getEngine

  • Gets the Engine the texture belongs to.

    Returns Engine

    The babylon engine

incrementReferences

  • incrementReferences(): void
  • Increments the number of references (ie. the number of {BABYLON.Texture} that point to it)

    Returns void

updateSize

  • 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