Class EnvironmentHelper
Constructors
constructor
-
new EnvironmentHelper(
options: Partial<IEnvironmentHelperOptions>,
scene: Scene,
): EnvironmentHelperconstructor
Parameters
- options: Partial<IEnvironmentHelperOptions>
Defines the options we want to customize the helper
- scene: Scene
The scene to add the material to
Returns EnvironmentHelper
- options: Partial<IEnvironmentHelperOptions>
Properties
on Error Observable
This observable will be notified with any error during the creation of the environment, mainly texture creation errors.
Accessors
ground
ground Material
-
Gets the ground material created by the helper.
Returns Nullable<BackgroundMaterial>
ground Mirror
-
Gets the ground mirror created by the helper.
Returns Nullable<MirrorTexture>
ground Mirror Render List
-
Gets the ground mirror render list to helps pushing the meshes you wish in the ground reflection.
Returns Nullable<AbstractMesh[]>
ground Texture
-
Gets the ground texture created by the helper.
Returns Nullable<BaseTexture>
root Mesh
-
Gets the root mesh created by the helper.
Returns Mesh
skybox
skybox Material
-
Gets the skybox material created by the helper.
Returns Nullable<BackgroundMaterial>
skybox Texture
-
Gets the skybox texture created by the helper.
Returns Nullable<BaseTexture>
Methods
dispose
-
Dispose all the elements created by the Helper.
Returns void
set Main Color
-
Sets the primary color of all the available elements.
Parameters
- color: Color3
the main color to affect to the ground and the background
Returns void
- color: Color3
update Options
-
Updates the environment according to the new options
Parameters
- options: Partial<IEnvironmentHelperOptions>
options to configure the helper (IEnvironmentHelperOptions)
Returns void
- options: Partial<IEnvironmentHelperOptions>
The EnvironmentHelper class can be used to add a fully featured non-expensive background to your scene. It includes by default a skybox and a ground relying on the BackgroundMaterial. It also helps with the default setup of your ImageProcessingConfiguration.