UWAL / Light
Classes
abstract Light
Base class for ambient, directional, point, and spot lights.
Extended by
Properties
Label
ts
Label: string;Light name.
Constructors
Constructor
ts
new Light(color?, label?): Light;Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
color? | ColorParam | undefined | Light color. Defaults to white. |
label? | string | "Light" | Light label. |
Returns
Methods
Destroy()
ts
Destroy(): void;Destroy the internal uniform buffer.
Returns
void
SetRenderPipeline()
ts
protected SetRenderPipeline(Pipeline, uniformName): GPUBuffer;Create and update an internal uniform buffer of this light's color and intensity values.
Parameters
| Parameter | Type | Description |
|---|---|---|
Pipeline | RenderPipelineInstance | Pipeline using this light. |
uniformName | string | Uniform buffer name. |
Returns
GPUBuffer
Accessors
Color
Get Signature
ts
get Color(): Float32Array<ArrayBufferLike>;Returns
Float32Array<ArrayBufferLike>
The color of the light.
Set Signature
ts
set Color(color): void;Parameters
| Parameter | Type | Description |
|---|---|---|
color | ColorParam | Light color. |
Returns
void
Intensity
Get Signature
ts
get Intensity(): number;Returns
number
The intensity of the light.
Set Signature
ts
set Intensity(intensity): void;Parameters
| Parameter | Type | Description |
|---|---|---|
intensity | number | Light intensity. |
Returns
void