Instantiate a new Model
an instance of SceneManager
an instance of ObservableManager
container with a set of assets that can be added or removed from a scene
Optional
name: stringthe name of this model
The name of this model
Asset container root mesh of this model. It's the ancestor of all meshes in this model, including bounding box meshes, shadow plane meshes, etc.
The unique id of the model
Release all the resources held by Model
Get all child-meshes of the root mesh
Optional
predicate: ((mesh: AbstractMesh) => boolean)defines an optional predicate that will be called on every evaluated child, the predicate must return true for a given child to be part of the result, otherwise it will be ignored. By default, excludes bounding box meshes, shadow plane meshes, etc.
an array of AbstractMesh that pass the test
Remove all the resources held by Model from the scene
Add soft shadow on ground using shadow light from top down.
Range from 0 to 1. The value will be applied to shadow color's R, G, B.
Kernel size of the blur pass.
Set up the init position of shadow light. True: place shadow light at the max Y of the overall bounding box. False: place shadow light at the min Y of the overall bounding box.
Additional Y direction offset for shadow light from the init position.
The depth scale factor used to improve the shadow quality by adjusting depth precision.
A small bias value applied to the shadow map to reduce shadow acne (unwanted shadow artifacts).
A bias value applied in the direction of the geometry's normals to further reduce self-shadowing artifacts.
Creates and displays a contact shadow on the ground using a depth map from bottom up The shadow can be blurred to create a softer effect.
Optional parameters to configure the shadow rendering.
Optional
blurriness?: numberThe amount of blurriness applied to the shadow. Higher values create a softer shadow.
Defaults to 110
.
Optional
bottomThe ratio used to calculate the camera's maxZ for the depth map rendering.
Defaults to 1.0
.
Optional
darkness?: numberThe darkness of the shadow, with 1.0
being fully dark and 0.0
being fully transparent.
Defaults to 1.15
.
Optional
gamma?: numberThe gamma correction applied to the depth map for the shadow.
Defaults to 0.4
.
Optional
shadowThe resolution of shadow texture map on ground. If the shadow map resolution is changed,
the blurriness value will need to be adjusted proportionally.
Defaults to 1024
.
Represent a group of nodes within the scene that are associated with each other