Renderer · interface
AreaLightBuffer
The five arrays the shader declares, filled once a frame from whatever a caller supplied.
Explained in Hello world.
interface AreaLightBufferimport type { AreaLightBuffer } from '@driftengine/core';Properties
| Name | Type | Description |
|---|---|---|
count | number | |
positionsreadonly | Float32Array | |
colorsreadonly | Float32Array | |
rightreadonly | Float32Array | |
upreadonly | Float32Array | |
sizesreadonly | Float32Array | |
twoSidedreadonly | Float32Array | |
rangesreadonlyoptional | Float32Array | One a rectangle: how far its light reaches. See AreaLightSource.range. |
barnDoorsreadonlyoptional | Float32Array | Two a rectangle: the cosine of its barn doors' angle from its normal, then their length in
metres — 0 and 0 for none. See AreaLightSource.barnDoorAngle. |