Skip to main content

ShadowedScene

A scene that supports efficient cast shadows. 📕 Tutorial. 📘 API.

Extends

Implements

Properties

ambientLights

ambientLights: Map<string, AmbientLight>

The set of ambient lights managed by this scene component.

Inherited from

SimpleScene . ambientLights


autoBias

autoBias: boolean = true

Whether the bias property should be set automatically depending on the shadow distance.


config

config: SimpleSceneConfigManager

Configurable.config

Implementation of

Configurable . config

Inherited from

SimpleScene . config


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

SimpleScene . currentWorld


directionalLights

directionalLights: Map<string, DirectionalLight>

The set of directional lights managed by this scene component.

Inherited from

SimpleScene . directionalLights


isSetup

isSetup: boolean = false

Configurable.isSetup

Implementation of

Configurable . isSetup

Inherited from

SimpleScene . isSetup


onDisposed

readonly onDisposed: Event<unknown>

Disposable.onDisposed

Implementation of

Disposable . onDisposed

Inherited from

SimpleScene . onDisposed


onSetup

readonly onSetup: Event<unknown>

Configurable.onSetup

Implementation of

Configurable . onSetup

Inherited from

SimpleScene . onSetup


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

SimpleScene . onWorldChanged


three

three: Scene

The underlying Three.js scene object. It is used to define the 3D space containing objects, lights, and cameras.

Inherited from

SimpleScene . three

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

ParameterType
valuenumber

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

ParameterType
valueboolean

Returns

boolean

Methods

dispose()

dispose(): void

Disposable.dispose

Returns

void

Implementation of

Disposable . dispose

Overrides

SimpleScene.dispose


isConfigurable()

isConfigurable(): this is Configurable<any, any>

Whether is component is Configurable.

Returns

this is Configurable<any, any>

Inherited from

SimpleScene . isConfigurable


isDisposeable()

isDisposeable(): this is Disposable

Whether is component is Disposable.

Returns

this is Disposable

Inherited from

SimpleScene . isDisposeable


isHideable()

isHideable(): this is Hideable

Whether is component is Hideable.

Returns

this is Hideable

Inherited from

SimpleScene . isHideable


isResizeable()

isResizeable(): this is Resizeable

Whether is component is Resizeable.

Returns

this is Resizeable

Inherited from

SimpleScene . isResizeable


isUpdateable()

isUpdateable(): this is Updateable

Whether is component is Updateable.

Returns

this is Updateable

Inherited from

SimpleScene . isUpdateable


setup()

setup(config?): void

Configurable.setup

Parameters

ParameterType
config?Partial <ShadowedSceneConfig>

Returns

void

Implementation of

Configurable . setup

Overrides

SimpleScene . setup


updateShadows()

updateShadows(): Promise<void>

Update all the shadows of the scene.

Returns

Promise<void>