The .drft container · interface

DrftLightVolume

The same shape as core's DenseLightVolume, so a read volume goes straight to the renderer.

Explained in The .drft container.

interface DrftLightVolume
import type { DrftLightVolume } from '@driftengine/drft';

Properties

NameTypeDescription
originreadonlyreadonly [number, number, number]
spacingreadonlynumber
dimsreadonlyreadonly [number, number, number]
lightreadonlyFloat32ArrayFour floats a sample, x fastest: the colour, then 1 for a sample and 0 inside solid.
directionreadonlyFloat32ArrayFour floats a sample: the direction light arrives from, then 0.