Renderer · function

createLightGrid

Bucket sources into cells of cell metres. Built once; not a frame path.

Explained in Hello world.

function createLightGrid(sources: readonly PointLightSource[], cell: number): LightGrid
import { createLightGrid } from '@driftengine/core';

Parameters

ParameterTypeDescription
sourcesreadonly PointLightSource[]
cellnumber