RawTexture3D

Class used to store 3D textures containing user data

Hierarchy

Index

Constructors

constructor

  • new RawTexture3D(data: ArrayBufferView, width: number, height: number, depth: number, format: number, scene: Scene, generateMipMaps?: boolean, invertY?: boolean, samplingMode?: number, textureType?: number): RawTexture3D
  • Create a new RawTexture3D

    Parameters

    • data: ArrayBufferView

      defines the data of the texture

    • width: number

      defines the width of the texture

    • height: number

      defines the height of the texture

    • depth: number

      defines the depth of the texture

    • format: number

      defines the texture format to use

    • scene: Scene

      defines the hosting scene

    • Optional generateMipMaps: boolean

      defines a boolean indicating if mip levels should be generated (true by default)

    • Optional invertY: boolean

      defines if texture must be stored with Y axis inverted

    • Optional samplingMode: number

      defines the sampling mode to use (BABYLON.Texture.TRILINEAR_SAMPLINGMODE by default)

    • Optional textureType: number

      defines the texture Type (Engine.TEXTURETYPE_UNSIGNED_INT, Engine.TEXTURETYPE_FLOAT...)

    Returns RawTexture3D

Properties

animations

animations: Animation[]

anisotropicFilteringLevel

anisotropicFilteringLevel: number

canRescale

canRescale: boolean

coordinatesIndex

coordinatesIndex: number

coordinatesMode

coordinatesMode: number

How a texture is mapped.

Value Type Description
0 EXPLICIT_MODE
1 SPHERICAL_MODE
2 PLANAR_MODE
3 CUBIC_MODE
4 PROJECTION_MODE
5 SKYBOX_MODE
6 INVCUBIC_MODE
7 EQUIRECTANGULAR_MODE
8 FIXED_EQUIRECTANGULAR_MODE
9 FIXED_EQUIRECTANGULAR_MIRRORED_MODE

delayLoadState

delayLoadState: number

format

format: number

Gets or sets the texture format to use

gammaSpace

gammaSpace: boolean

getAlphaFromRGB

getAlphaFromRGB: boolean

hasAlpha

hasAlpha: boolean

invertZ

invertZ: boolean

is3D

is3D: boolean

isBlocking

isBlocking: boolean

isCube

isCube: boolean

isRGBD

isRGBD: boolean

Gets whether or not the texture contains RGBD data.

isRenderTarget

isRenderTarget: boolean

level

level: number

lodGenerationOffset

lodGenerationOffset: number

lodGenerationScale

lodGenerationScale: number

lodLevelInAlpha

lodLevelInAlpha: boolean

name

name: string

noMipmap

noMipmap: boolean

onDispose

onDispose: function

Type declaration

    • (): void
    • Returns void

onDisposeObservable

onDisposeObservable: Observable<BaseTexture>

An event triggered when the texture is disposed.

onLoadObservable

onLoadObservable: Observable<Texture>

samplingMode

samplingMode: number

sphericalPolynomial

sphericalPolynomial: Nullable<SphericalPolynomial>

textureFormat

textureFormat: number

textureType

textureType: number

uAng

uAng: number

uOffset

uOffset: number

uRotationCenter

uRotationCenter: number

Defines the center of rotation (U)

uScale

uScale: number

uid

uid: string

url

url: Nullable<string>

vAng

vAng: number

vOffset

vOffset: number

vRotationCenter

vRotationCenter: number

Defines the center of rotation (V)

vScale

vScale: number

wAng

wAng: number

wRotationCenter

wRotationCenter: number

Defines the center of rotation (W)

wrapR

wrapR: number
Value Type Description
0 CLAMP_ADDRESSMODE
1 WRAP_ADDRESSMODE
2 MIRROR_ADDRESSMODE

wrapU

wrapU: number
Value Type Description
0 CLAMP_ADDRESSMODE
1 WRAP_ADDRESSMODE
2 MIRROR_ADDRESSMODE

wrapV

wrapV: number
Value Type Description
0 CLAMP_ADDRESSMODE
1 WRAP_ADDRESSMODE
2 MIRROR_ADDRESSMODE

Static BILINEAR_SAMPLINGMODE

BILINEAR_SAMPLINGMODE: number

Static CLAMP_ADDRESSMODE

CLAMP_ADDRESSMODE: number

Static CUBIC_MODE

CUBIC_MODE: number

Static DEFAULT_ANISOTROPIC_FILTERING_LEVEL

DEFAULT_ANISOTROPIC_FILTERING_LEVEL: number

Static EQUIRECTANGULAR_MODE

EQUIRECTANGULAR_MODE: number

Static EXPLICIT_MODE

EXPLICIT_MODE: number

Static FIXED_EQUIRECTANGULAR_MIRRORED_MODE

FIXED_EQUIRECTANGULAR_MIRRORED_MODE: number

Static FIXED_EQUIRECTANGULAR_MODE

FIXED_EQUIRECTANGULAR_MODE: number

Static INVCUBIC_MODE

INVCUBIC_MODE: number

Static LINEAR_LINEAR

LINEAR_LINEAR: number

Static LINEAR_LINEAR_MIPLINEAR

LINEAR_LINEAR_MIPLINEAR: number

Static LINEAR_LINEAR_MIPNEAREST

LINEAR_LINEAR_MIPNEAREST: number

Static LINEAR_NEAREST

LINEAR_NEAREST: number

Static LINEAR_NEAREST_MIPLINEAR

LINEAR_NEAREST_MIPLINEAR: number

Static LINEAR_NEAREST_MIPNEAREST

LINEAR_NEAREST_MIPNEAREST: number

Static MIRROR_ADDRESSMODE

MIRROR_ADDRESSMODE: number

Static NEAREST_LINEAR

NEAREST_LINEAR: number

Static NEAREST_LINEAR_MIPLINEAR

NEAREST_LINEAR_MIPLINEAR: number

Static NEAREST_LINEAR_MIPNEAREST

NEAREST_LINEAR_MIPNEAREST: number

Static NEAREST_NEAREST

NEAREST_NEAREST: number

Static NEAREST_NEAREST_MIPLINEAR

NEAREST_NEAREST_MIPLINEAR: number

Static NEAREST_NEAREST_MIPNEAREST

NEAREST_NEAREST_MIPNEAREST: number

Static NEAREST_SAMPLINGMODE

NEAREST_SAMPLINGMODE: number

Static PLANAR_MODE

PLANAR_MODE: number

Static PROJECTION_MODE

PROJECTION_MODE: number

Static SKYBOX_MODE

SKYBOX_MODE: number

Static SPHERICAL_MODE

SPHERICAL_MODE: number

Static TRILINEAR_SAMPLINGMODE

TRILINEAR_SAMPLINGMODE: number

Static UseSerializedUrlIfAny

UseSerializedUrlIfAny: boolean

Gets or sets a boolean which defines if the texture url must be build from the serialized URL instead of just using the name and loading them side by side with the scene file

Static WRAP_ADDRESSMODE

WRAP_ADDRESSMODE: number

Methods

clone

delayLoad

  • delayLoad(): void

dispose

  • dispose(): void

getBaseSize

getClassName

  • getClassName(): string

getInternalTexture

getReflectionTextureMatrix

  • getReflectionTextureMatrix(): Matrix

getScene

getSize

getTextureMatrix

isReady

  • isReady(): boolean

isReadyOrNotBlocking

  • isReadyOrNotBlocking(): boolean

readPixels

  • readPixels(faceIndex?: number, level?: number): Nullable<ArrayBufferView>
  • Reads the pixels stored in the webgl texture and returns them as an ArrayBuffer. This will returns an RGBA array buffer containing either in values (0-255) or float values (0-1) depending of the underlying buffer type.

    Parameters

    • Optional faceIndex: number

      The face of the texture to read (in case of cube texture)

    • Optional level: number

      The LOD level of the texture to read (in case of Mip Maps)

    Returns Nullable<ArrayBufferView>

    The Array buffer containing the pixels data.

releaseInternalTexture

  • releaseInternalTexture(): void

scale

  • scale(ratio: number): void

serialize

  • serialize(): any

toString

  • toString(): string

update

  • update(data: ArrayBufferView): void
  • Update the texture with new data

    Parameters

    • data: ArrayBufferView

      defines the data to store in the texture

    Returns void

updateSamplingMode

  • updateSamplingMode(samplingMode: number): void

updateURL

  • updateURL(url: string, buffer?: Nullable<string | ArrayBuffer | HTMLImageElement | Blob>): void
  • Update the url (and optional buffer) of this texture if url was null during construction.

    Parameters

    • url: string

      the url of the texture

    • Optional buffer: Nullable<string | ArrayBuffer | HTMLImageElement | Blob>

      the buffer of the texture (defaults to null)

    Returns void

Static CreateFromBase64String

  • CreateFromBase64String(data: string, name: string, scene: Scene, noMipmap?: boolean, invertY?: boolean, samplingMode?: number, onLoad?: Nullable<function>, onError?: Nullable<function>, format?: number): Texture
  • Parameters

    • data: string
    • name: string
    • scene: Scene
    • Optional noMipmap: boolean
    • Optional invertY: boolean
    • Optional samplingMode: number
    • Optional onLoad: Nullable<function>
    • Optional onError: Nullable<function>
    • Optional format: number

    Returns Texture

Static LoadFromDataString

  • LoadFromDataString(name: string, buffer: any, scene: Scene, deleteBuffer?: boolean, noMipmap?: boolean, invertY?: boolean, samplingMode?: number, onLoad?: Nullable<function>, onError?: Nullable<function>, format?: number): Texture
  • Parameters

    • name: string
    • buffer: any
    • scene: Scene
    • Optional deleteBuffer: boolean
    • Optional noMipmap: boolean
    • Optional invertY: boolean
    • Optional samplingMode: number
    • Optional onLoad: Nullable<function>
    • Optional onError: Nullable<function>
    • Optional format: number

    Returns Texture

Static Parse

Static WhenAllReady

  • WhenAllReady(textures: BaseTexture[], callback: function): void

Generated using TypeDoc