Skip to content

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 ​
ParameterTypeDefault valueDescription
position?Float32Array<ArrayBufferLike>undefinedLight position.
color?ColorParamundefinedLight color. Defaults to white.
label?string"PointLight"Light label.
Returns ​

PointLight

Overrides ​

Light.constructor

Methods ​

SetRenderPipeline() ​
ts
SetRenderPipeline(Pipeline, uniformName?): GPUBuffer;

Create and update an internal uniform buffer of this light's color, intensity, and position values.

Parameters ​
ParameterTypeDefault valueDescription
PipelineRenderPipelineInstanceundefinedPipeline using this light.
uniformName?string"PointLight"Uniform buffer name.
Returns ​

GPUBuffer

Overrides ​

Light.SetRenderPipeline

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 ​
ParameterTypeDescription
positionFloat32Array<ArrayBufferLike>Light position.
Returns ​

void

Released under the MIT License.