@relu-interactives/spatial-ecs
@relu-interactives/spatial-ecs / components / EnvironmentState
Type Alias: EnvironmentState ​
ts
type EnvironmentState = {
skybox: EnvironmentSkyboxState;
fog: EnvironmentFogState;
gravity: EnvironmentGravityState;
fixedTimeStep: number;
interpolatePhysics?: boolean;
maxPhysicsSteps?: number;
lighting?: EnvironmentLightingState;
};Defined in: components/Environment.ts:121
Aggregated authoring state owned by Environment.
Properties ​
| Property | Type | Description | Defined in |
|---|---|---|---|
skybox | EnvironmentSkyboxState | Skybox configuration. | components/Environment.ts:123 |
fog | EnvironmentFogState | Fog configuration. | components/Environment.ts:125 |
gravity | EnvironmentGravityState | World gravity. | components/Environment.ts:127 |
fixedTimeStep | number | Fixed timestep (seconds) used by the physics accumulator loop. Physics is stepped in fixed increments of this size each frame. Default is 0.02 (50 Hz). | components/Environment.ts:133 |
interpolatePhysics? | boolean | Show moving rigid bodies between physics steps, so they move evenly at any screen rate. On unless set to false; a body's Transform then trails its rigid body by up to one step, and rigidBody.translation() is the exact value physics has. | components/Environment.ts:140 |
maxPhysicsSteps? | number | Most physics steps one frame may take to catch up after a slow frame (default 4). Time beyond that is dropped, so one hitch can't make the frames after it slow too. | components/Environment.ts:146 |
lighting? | EnvironmentLightingState | Image-based lighting, tone mapping and exposure. Optional: absent means the scene's environment map and the renderer's tone mapping stay untouched, which is how every scene saved before 0.5.4 renders. | components/Environment.ts:152 |

