Renderer · interface

LightGrid

Explained in Hello world.

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

Properties

NameTypeDescription
sourcesreadonlyreadonly PointLightSource[]
cellreadonlynumberMetres a cell spans on each axis.
originreadonlyreadonly [number, number, number]The world position of cell (0, 0, 0)'s corner.
dimsreadonlyreadonly [number, number, number]
startreadonlyUint32ArrayWhere cell c's lights start in lights; start[c + 1] is where they end.
lightsreadonlyUint32ArraySource indices by cell, ascending within each.
maxRadiusreadonlynumberThe largest reach of any source, which widens every query.
gatheredreadonlyInt32ArrayThe last gather, cell by cell: gathered[0..count).