Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / components / Environment

Class: Environment ​

Defined in: components/Environment.ts:296

Scene environment settings: skybox (gradient/color/image), fog (linear/exponential), gravity vector for the physics world, and optional image-based lighting / tone mapping (values.lighting). Singleton-style — attached to one environment entity per scene.

Use world.getEnvironmentComponent() to access this component directly from a Behaviour script. Mutate values to change settings at runtime; EnvironmentSyncSystem applies the changes on the next frame.

Extends ​

Constructors ​

Constructor ​

ts
new Environment(values?): Environment;

Defined in: components/Environment.ts:300

Parameters ​

ParameterType
values?Partial<EnvironmentState>

Returns ​

Environment

Overrides ​

Component.constructor

Properties ​

PropertyTypeDescriptionDefined in
valuesEnvironmentStateAggregated environment authoring state (skybox, fog, gravity, lighting). Saved with the project.components/Environment.ts:298