Skip to content

@relu-interactives/spatial-ecs


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

Class: LightComponent

Defined in: components/Light.ts:65

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:73

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:67
typestringThree.js class name of the light (e.g. "DirectionalLight", "PointLight", "SpotLight").components/Light.ts:69
valuesLightValueStateSerialized authoring state. Saved with the project.components/Light.ts:71

Methods

setValues()

ts
setValues(patch): void;

Defined in: components/Light.ts:80

Parameters

ParameterType
patchPartial<LightValueState>

Returns

void