Renderer · interface

AreaLightBuffer

The five arrays the shader declares, filled once a frame from whatever a caller supplied.

Explained in Hello world.

interface AreaLightBuffer
import type { AreaLightBuffer } from '@driftengine/core';

Properties

NameTypeDescription
countnumber
positionsreadonlyFloat32Array
colorsreadonlyFloat32Array
upreadonlyFloat32Array
sizesreadonlyFloat32Array
twoSidedreadonlyFloat32Array
rangesreadonlyoptionalFloat32ArrayOne a rectangle: how far its light reaches. See AreaLightSource.range.
barnDoorsreadonlyoptionalFloat32ArrayTwo 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.