Skip to content

@relu-interactives/spatial-ecs


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

Class: LightComponent ​

Defined in: components/Light.ts:94

Light source attached to an entity. type selects the underlying three.js light class (directional, point, spot, ambient, hemisphere, rect-area). values carries authoring state including color, intensity, and type-specific fields (distance, decay, angle, penumbra, width, height).

Extends ​

Constructors ​

Constructor ​

ts
new LightComponent(light): LightComponent;

Defined in: components/Light.ts:102

Parameters ​

ParameterType
lightLight

Returns ​

LightComponent

Overrides ​

Component.constructor

Properties ​

PropertyTypeDescriptionDefined in
lightLightLive three.js light placed in the scene. Recreated when the project loads.components/Light.ts:96
typestringThree.js class name of the light (e.g. "DirectionalLight", "PointLight", "SpotLight").components/Light.ts:98
valuesLightValueStateSerialized authoring state. Saved with the project.components/Light.ts:100

Methods ​

setValues() ​

ts
setValues(patch): void;

Defined in: components/Light.ts:109

Parameters ​

ParameterType
patchPartial<LightValueState>

Returns ​

void