ShadowedScene
A scene that supports efficient cast shadows. 📕 Tutorial. 📘 API.
Extends
Implements
Disposable
Configurable
<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
currentWorld
currentWorld:
null
|World
=null
The current world this item is associated with. It can be null if no world is currently active.
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
readonly
onDisposed:Event
<unknown
>
Implementation of
Inherited from
onSetup
readonly
onSetup:Event
<unknown
>
Implementation of
Inherited from
onWorldChanged
readonly
onWorldChanged: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
get
bias():number
The getter for the bias to prevent artifacts (stripes). It usually ranges between 0 and -0.005.
set
bias(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
distanceRenderer
get
distanceRenderer():DistanceRenderer
Getter to get the renderer used to determine the farthest distance from the camera.
Returns
DistanceRenderer
shadowsEnabled
get
shadowsEnabled():boolean
Getter to see whether the shadows are enabled or not in this scene instance.
set
shadowsEnabled(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
>