UWAL / PointLight
Classes
PointLight
A light used to radiate from one point in all directions.
See
Primitives / Lights for reference.
Extends
Extended by
Constructors
Constructor
ts
new PointLight(
position?,
color?,
label?): PointLight;Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
position? | Float32Array<ArrayBufferLike> | undefined | Light position. |
color? | ColorParam | undefined | Light color. Defaults to white. |
label? | string | "PointLight" | Light label. |
Returns
Overrides
Methods
SetRenderPipeline()
ts
SetRenderPipeline(Pipeline, uniformName?): GPUBuffer;Create and update an internal uniform buffer of this light's color, intensity, and position values.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
Pipeline | RenderPipelineInstance | undefined | Pipeline using this light. |
uniformName? | string | "PointLight" | Uniform buffer name. |
Returns
GPUBuffer
Overrides
Accessors
Position
Get Signature
ts
get Position(): Float32Array<ArrayBufferLike>;Returns
Float32Array<ArrayBufferLike>
The position of the light.
Set Signature
ts
set Position(position): void;Parameters
| Parameter | Type | Description |
|---|---|---|
position | Float32Array<ArrayBufferLike> | Light position. |
Returns
void