• Public
  • Public/Protected
  • All

Class used to generate realtime reflection / refraction cube textures




  • ReflectionProbe



  • new ReflectionProbe(name: string, size: number, scene: Scene, generateMipMaps?: boolean, useFloat?: boolean, linearSpace?: boolean): ReflectionProbe
  • Creates a new reflection probe


    • name: string

      defines the name of the probe

    • size: number

      defines the texture resolution (for each face)

    • scene: Scene

      defines the hosting scene

    • Optional generateMipMaps: boolean

      defines if mip maps should be generated automatically (true by default)

    • Optional useFloat: boolean

      defines if HDR data (float data) should be used to store colors (false by default)

    • Optional linearSpace: boolean

      defines if the probe should be generated in linear space or not (false by default)

    Returns ReflectionProbe


metadata: any

Gets or sets an object used to store user defined information for the reflection probe.

name: string

defines the name of the probe

position: Vector3

Gets or sets probe position (center of the cube map)


  • Gets the internal CubeTexture used to render to

    Returns RenderTargetTexture

  • get refreshRate(): number
  • set refreshRate(value: number): void
  • Gets or sets the refresh rate to use (on every frame by default)

    Returns number

  • Gets or sets the refresh rate to use (on every frame by default)


    • value: number

    Returns void

  • Gets the list of meshes to render

    Returns Nullable<AbstractMesh[]>

  • get samples(): number
  • set samples(value: number): void
  • Gets or sets the number of samples to use for multi-sampling (0 by default). Required WebGL2

    Returns number

  • Gets or sets the number of samples to use for multi-sampling (0 by default). Required WebGL2


    • value: number

    Returns void


  • Attach the probe to a specific mesh (Rendering will be done from attached mesh's position)


    Returns void

  • dispose(): void
  • Clean all associated resources

    Returns void

  • getClassName(): string
  • Get the class name of the refection probe.

    Returns string


  • Gets the hosting scene

    Returns Scene

    a Scene

  • serialize(): any
  • Serialize the reflection probe to a JSON representation we can easily use in the respective Parse function.

    Returns any

    The JSON representation of the texture

  • setRenderingAutoClearDepthStencil(renderingGroupId: number, autoClearDepthStencil: boolean): void
  • Specifies whether or not the stencil and depth buffer are cleared between two rendering groups


    • renderingGroupId: number

      The rendering group id corresponding to its index

    • autoClearDepthStencil: boolean

      Automatically clears depth and stencil between groups if true.

    Returns void

  • toString(fullDetails?: boolean): string
  • Converts the reflection probe information to a readable string for debug purpose.


    • Optional fullDetails: boolean

      Supports for multiple levels of logging within scene loading

    Returns string

    the human readable reflection probe info

  • Parse the JSON representation of a reflection probe in order to recreate the reflection probe in the given scene.


    • parsedReflectionProbe: any

      Define the JSON representation of the reflection probe

    • scene: Scene

      Define the scene the parsed reflection probe should be instantiated in

    • rootUrl: string

      Define the root url of the parsing sequence in the case of relative dependencies

    Returns Nullable<ReflectionProbe>

    The parsed reflection probe if successful


  • Constructor
  • Property
  • Method
  • Accessor
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Property
  • Method
  • Static method