Texture

Hierarchy

Index

Constructors

constructor

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

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

    Returns Texture

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

gammaSpace

gammaSpace: boolean

getAlphaFromRGB

getAlphaFromRGB: boolean

hasAlpha

hasAlpha: boolean

invertZ

invertZ: boolean

is3D

is3D: boolean

isBlocking

isBlocking: boolean

isCube

isCube: boolean

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

uScale

uScale: number

uid

uid: string

url

url: Nullable<string>

vAng

vAng: number

vOffset

vOffset: number

vScale

vScale: number

wAng

wAng: number

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): Nullable<ArrayBufferView>

releaseInternalTexture

  • releaseInternalTexture(): void

scale

  • scale(ratio: number): void

serialize

  • serialize(): any

toString

  • toString(): string

updateSamplingMode

  • updateSamplingMode(samplingMode: number): void
  • Parameters

    • samplingMode: number

    Returns void

updateURL

  • updateURL(url: string): void
  • Parameters

    • url: string

    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