HDRCubeTexture

This represents a texture coming from an HDR input.

The only supported format is currently panorama picture stored in RGBE format. Example of such files can be found on HDRLib: http://hdrlib.com/

Hierarchy

Index

Constructors

constructor

  • new HDRCubeTexture(url: string, scene: Scene, size: number, noMipmap?: boolean, generateHarmonics?: boolean, gammaSpace?: boolean, reserved?: boolean, onLoad?: Nullable<function>, onError?: Nullable<function>): HDRCubeTexture
  • Instantiates an HDRTexture from the following parameters.

    Parameters

    • url: string

      The location of the HDR raw data (Panorama stored in RGBE format)

    • scene: Scene

      The scene the texture will be used in

    • size: number

      The cubemap desired size (the more it increases the longer the generation will be)

    • Optional noMipmap: boolean

      Forces to not generate the mipmap if true

    • Optional generateHarmonics: boolean

      Specifies whether you want to extract the polynomial harmonics during the generation process

    • Optional gammaSpace: boolean

      Specifies if the texture will be use in gamma or linear space (the PBR material requires those texture in linear space, but the standard material would require them in Gamma space)

    • Optional reserved: boolean

      Reserved flag for internal use.

    • Optional onLoad: Nullable<function>
    • Optional onError: Nullable<function>

    Returns HDRCubeTexture

Properties

animations

animations: Animation[]

anisotropicFilteringLevel

anisotropicFilteringLevel: number

boundingBoxPosition

boundingBoxPosition: Vector3

Gets or sets the center of the bounding box associated with the cube texture It must define where the camera used to render the texture was set

boundingBoxSize

boundingBoxSize: Vector3

Gets or sets the size of the bounding box associated with the cube texture When defined, the cubemap will switch to local mode

see

https://community.arm.com/graphics/b/blog/posts/reflections-based-on-local-cubemaps-in-unity

example

https://www.babylonjs-playground.com/#RNASML

canRescale

canRescale: boolean

coordinatesIndex

coordinatesIndex: number

coordinatesMode

coordinatesMode: number

The texture coordinates mode. As this texture is stored in a cube format, please modify carefully.

delayLoadState

delayLoadState: number

gammaSpace

gammaSpace: boolean

getAlphaFromRGB

getAlphaFromRGB: boolean

hasAlpha

hasAlpha: boolean

invertZ

invertZ: boolean

is3D

is3D: boolean

isBlocking

isBlocking: boolean

Gets wether or not the texture is blocking during loading.

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

onDispose

onDispose: function

Type declaration

    • (): void
    • Returns void

onDisposeObservable

onDisposeObservable: Observable<BaseTexture>

An event triggered when the texture is disposed.

rotationY

rotationY: number

Gets texture matrix rotation angle around Y axis radians.

sphericalPolynomial

sphericalPolynomial: Nullable<SphericalPolynomial>

textureFormat

textureFormat: number

textureType

textureType: number

uid

uid: string

url

url: string

The texture URL.

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 DEFAULT_ANISOTROPIC_FILTERING_LEVEL

DEFAULT_ANISOTROPIC_FILTERING_LEVEL: 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

setReflectionTextureMatrix

  • setReflectionTextureMatrix(value: Matrix): void
  • Parameters

    Returns void

toString

  • toString(): string

Static Parse

Static WhenAllReady

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

Generated using TypeDoc