Class ReflectionProbe
Hierarchy
- ReflectionProbe
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
-
Creates a new reflection probe
Parameters
-
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 (flaot data) should be used to store colors (false by default)
Returns ReflectionProbe
-
Properties
nameSearch playground for name
defines the name of the probe
positionSearch playground for position
Gets or sets probe position (center of the cube map)
Accessors
cube Texture
-
Gets the internal CubeTexture used to render to
Returns RenderTargetTexture
refresh Rate
-
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)
Parameters
-
value: number
Returns any
-
render List
-
Gets the list of meshes to render
Returns Nullable<AbstractMesh[]>
samples
-
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
Parameters
-
value: number
Returns any
-
Methods
attach ToMeshSearch playground for attachToMesh
-
Attach the probe to a specific mesh (Rendering will be done from attached mesh's position)
Parameters
-
mesh: Nullable<AbstractMesh>
defines the mesh to attach to
Returns void
-
disposeSearch playground for dispose
-
Clean all associated resources
Returns void
get Class NameSearch playground for getClassName
-
Get the class name of the relfection probe.
Returns string
"ReflectionProbe"
get SceneSearch playground for getScene
-
Gets the hosting scene
Returns Scene
a Scene
serializeSearch playground for serialize
-
Serialize the reflection probe to a JSON representation we can easily use in the resepective Parse function.
Returns any
The JSON representation of the texture
set Rendering Auto Clear Depth StencilSearch playground for setRenderingAutoClearDepthStencil
-
Specifies whether or not the stencil and depth buffer are cleared between two rendering groups
Parameters
-
renderingGroupId: number
The rendering group id corresponding to its index
-
autoClearDepthStencil: boolean
Automatically clears depth and stencil between groups if true.
Returns void
-
to StringSearch playground for toString
-
Converts the reflection probe information to a readable string for debug purpose.
Parameters
-
Optional fullDetails: boolean
Supports for multiple levels of logging within scene loading
Returns string
the human readable reflection probe info
-
Static ParseSearch playground for Parse
-
Parse the JSON representation of a reflection probe in order to recreate the reflection probe in the given scene.
Parameters
-
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
-
Class used to generate realtime reflection / refraction cube textures
https://doc.babylonjs.com/how_to/how_to_use_reflection_probes