@relu-interactives/spatial-ecs
@relu-interactives/spatial-ecs / index / EnvironmentSyncSystem
Class: EnvironmentSyncSystem ​
Defined in: systems/EnvironmentSyncSystem.ts:124
Applies the scene's Environment component to the three.js scene: skybox, fog, and (when values.lighting is present) image-based lighting, tone mapping and exposure.
Each part is dirty-checked on its own, so animating lighting.envIntensity every frame does not rebuild the skybox texture.
Runs in the editor and at runtime. While an XR session composites over the real world (World.isXrPassthrough()) the background is withheld; lighting and fog still apply.
On WebGL the environment map is PMREM-prefiltered here. On WebGPU (World.getRendererKind() === "webgpu") the equirect texture is assigned to scene.environment as is and the renderer prefilters it.
Implements ​
Constructors ​
Constructor ​
new EnvironmentSyncSystem(scene): EnvironmentSyncSystem;Defined in: systems/EnvironmentSyncSystem.ts:173
Parameters ​
| Parameter | Type |
|---|---|
scene | Scene |
Returns ​
EnvironmentSyncSystem
Properties ​
| Property | Modifier | Type | Default value | Description | Defined in |
|---|---|---|---|---|---|
runsWhilePaused | readonly | true | true | Keep ticking while the world is paused. Leave it unset for anything that moves the game on: such a system stops at world.pause() and picks up where it was at world.resume(). | systems/EnvironmentSyncSystem.ts:125 |
Methods ​
update() ​
update(world, deltaTime?): void;Defined in: systems/EnvironmentSyncSystem.ts:616
Parameters ​
| Parameter | Type | Default value |
|---|---|---|
world | World | undefined |
deltaTime | number | 0 |
Returns ​
void
Implementation of ​
dispose() ​
dispose(): void;Defined in: systems/EnvironmentSyncSystem.ts:656
Returns ​
void

