@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 ​
| Parameter | Type |
|---|---|
light | Light |
Returns ​
LightComponent
Overrides ​
Properties ​
| Property | Type | Description | Defined in |
|---|---|---|---|
light | Light | Live three.js light placed in the scene. Recreated when the project loads. | components/Light.ts:67 |
type | string | Three.js class name of the light (e.g. "DirectionalLight", "PointLight", "SpotLight"). | components/Light.ts:69 |
values | LightValueState | Serialized authoring state. Saved with the project. | components/Light.ts:71 |
Methods ​
setValues() ​
ts
setValues(patch): void;Defined in: components/Light.ts:80
Parameters ​
| Parameter | Type |
|---|---|
patch | Partial<LightValueState> |
Returns ​
void

