Documentation / scene / ShadowRegion
Class: ShadowRegion
Defined in: libs/scene/src/shadow/shadow_region.ts:20
Maintains the world-space region used by directional light shadow maps.
Extends
Disposable
Constructors
Constructor
new ShadowRegion(
region?):ShadowRegion
Defined in: libs/scene/src/shadow/shadow_region.ts:39
Creates a shadow region.
Parameters
region?
AABB
Optional manual world-space AABB used to initialize the region.
Returns
ShadowRegion
Overrides
Disposable.constructor
Accessors
disposed
Get Signature
get disposed():
boolean
Defined in: libs/base/dist/index.d.ts:6065
Returns
boolean
Inherited from
Disposable.disposed
region
Get Signature
get region():
AABB
Defined in: libs/scene/src/shadow/shadow_region.ts:55
Final world-space shadow region.
Returns
AABB
The union of the manual, static caster, and dynamic caster regions, or null if no valid region exists.
manualRegion
Get Signature
get manualRegion():
AABB
Defined in: libs/scene/src/shadow/shadow_region.ts:64
Region contributed by manually assigned AABB.
Returns
AABB
The manually assigned region, or null if no manual region is set.
staticRegion
Get Signature
get staticRegion():
AABB
Defined in: libs/scene/src/shadow/shadow_region.ts:73
Region contributed by static shadow casters.
Returns
AABB
The combined static caster region, or null if no valid static caster region exists.
dynamicRegion
Get Signature
get dynamicRegion():
AABB
Defined in: libs/scene/src/shadow/shadow_region.ts:82
Region contributed by dynamic shadow casters.
Returns
AABB
The combined dynamic caster region, or null if no valid dynamic caster region exists.
Methods
on()
on<
K>(type,listener,context?):void
Defined in: libs/base/dist/index.d.ts:594
IEventTarget.on
Type Parameters
K
K extends "dispose"
Parameters
type
K
listener
EventListener<{ dispose: []; }, K>
context?
unknown
Returns
void
Inherited from
Disposable.on
once()
once<
K>(type,listener,context?):void
Defined in: libs/base/dist/index.d.ts:598
IEventTarget.once
Type Parameters
K
K extends "dispose"
Parameters
type
K
listener
EventListener<{ dispose: []; }, K>
context?
unknown
Returns
void
Inherited from
Disposable.once
off()
off<
K>(type,listener?,context?):void
Defined in: libs/base/dist/index.d.ts:602
IEventTarget.off
Type Parameters
K
K extends "dispose"
Parameters
type
K
listener?
EventListener<{ dispose: []; }>
context?
unknown
Returns
void
Inherited from
Disposable.off
dispatchEvent()
dispatchEvent<
K>(type, ...args):void
Defined in: libs/base/dist/index.d.ts:606
IEventTarget.dispatchEvent
Type Parameters
K
K extends "dispose"
Parameters
type
K
args
...object[K]
Returns
void
Inherited from
Disposable.dispatchEvent
dispose()
dispose():
void
Defined in: libs/base/dist/index.d.ts:6066
Returns
void
Inherited from
Disposable.dispose
setRegion()
setRegion(
region):void
Defined in: libs/scene/src/shadow/shadow_region.ts:91
Assigns a manual world-space AABB to the region.
Parameters
region
AABB
The manual world-space AABB to use, or null to clear the manual region.
Returns
void
addStaticCaster()
addStaticCaster(
caster):this
Defined in: libs/scene/src/shadow/shadow_region.ts:102
Adds a static shadow caster using a snapshot of its current world-space AABB.
Parameters
caster
The mesh or clipmap terrain node to include as a static caster.
Returns
this
this for chaining.
addDynamicCaster()
addDynamicCaster(
caster):this
Defined in: libs/scene/src/shadow/shadow_region.ts:125
Adds a dynamic shadow caster and tracks its bounding volume changes.
Parameters
caster
The mesh or clipmap terrain node to include as a dynamic caster.
Returns
this
this for chaining.
removeCaster()
removeCaster(
caster):this
Defined in: libs/scene/src/shadow/shadow_region.ts:151
Removes a previously added shadow caster.
Parameters
caster
The caster node to remove from the static or dynamic caster list.
Returns
this
this for chaining.
clearCasters()
clearCasters():
void
Defined in: libs/scene/src/shadow/shadow_region.ts:185
Removes all shadow casters while keeping the manual region.
Returns
void
clear()
clear():
this
Defined in: libs/scene/src/shadow/shadow_region.ts:205
Clears the manual region and all shadow casters.
Returns
this
this for chaining.
onDispose()
protectedonDispose():void
Defined in: libs/scene/src/shadow/shadow_region.ts:212
Disposable.onDispose
Returns
void
Overrides
Disposable.onDispose