Skip to content

@relu-interactives/spatial-ecs


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

Class: Environment

Defined in: components/Environment.ts:164

Scene environment settings: skybox (gradient/color/image), fog (linear/exponential), and gravity vector for the physics world. 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:168

Parameters

ParameterType
values?Partial<EnvironmentState>

Returns

Environment

Overrides

Component.constructor

Properties

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