ShadowedScene
A scene that supports efficient cast shadows. 📕 Tutorial. 📘 API.
Extends
Implements
DisposableConfigurable<SimpleSceneConfigManager,ShadowedSceneConfig>
Properties
ambientLights
ambientLights:
Map<string,AmbientLight>
The set of ambient lights managed by this scene component.
Inherited from
autoBias
autoBias:
boolean=true
Whether the bias property should be set automatically depending on the shadow distance.
config
config:
SimpleSceneConfigManager
Implementation of
Inherited from
directionalLights
directionalLights:
Map<string,DirectionalLight>
The set of directional lights managed by this scene component.
Inherited from
SimpleScene . directionalLights
isSetup
isSetup:
boolean=false
Implementation of
Inherited from
onDisposed
readonlyonDisposed:Event<unknown>
Implementation of
Inherited from
onSetup
readonlyonSetup:Event<unknown>
Implementation of
Inherited from
onWorldChanged
readonlyonWorldChanged:Event<object>
Event that is triggered when a world is added or removed from the worlds map.
The event payload contains the world instance and the action ("added" or "removed").
Type declaration
action
action:
"added"|"removed"
world
world:
World
Inherited from
three
three:
Scene
The underlying Three.js scene object. It is used to define the 3D space containing objects, lights, and cameras.
Inherited from
Accessors
bias
getbias():number
The getter for the bias to prevent artifacts (stripes). It usually ranges between 0 and -0.005.
setbias(value):void
The setter for the bias to prevent artifacts (stripes). It usually ranges between 0 and -0.005.
Parameters
| Parameter | Type |
|---|---|
value | number |
Returns
number
currentWorld
setcurrentWorld(value):void
The current world this item is associated with. It can be null if no world is currently active.
Parameters
| Parameter | Type |
|---|---|
value | null | World |
distanceRenderer
getdistanceRenderer():DistanceRenderer
Getter to get the renderer used to determine the farthest distance from the camera.
Returns
DistanceRenderer
shadowsEnabled
getshadowsEnabled():boolean
Getter to see whether the shadows are enabled or not in this scene instance.
setshadowsEnabled(value):void
Setter to control whether the shadows are enabled or not in this scene instance.
Parameters
| Parameter | Type |
|---|---|
value | boolean |
Returns
boolean
Methods
dispose()
dispose():
void
Returns
void
Implementation of
Overrides
SimpleScene.dispose
isConfigurable()
isConfigurable():
this is Configurable<any, any>
Whether is component is Configurable.
Returns
this is Configurable<any, any>
Inherited from
isDisposeable()
isDisposeable():
this is Disposable
Whether is component is Disposable.
Returns
this is Disposable
Inherited from
isHideable()
isHideable():
this is Hideable
Whether is component is Hideable.
Returns
this is Hideable
Inherited from
isResizeable()
isResizeable():
this is Resizeable
Whether is component is Resizeable.
Returns
this is Resizeable
Inherited from
isUpdateable()
isUpdateable():
this is Updateable
Whether is component is Updateable.
Returns
this is Updateable
Inherited from
setup()
setup(
config?):void
Parameters
| Parameter | Type |
|---|---|
config? | Partial <ShadowedSceneConfig> |
Returns
void
Implementation of
Overrides
updateShadows()
updateShadows():
Promise<void>
Update all the shadows of the scene.
Returns
Promise<void>