Geometry · interface
LightVolumeOptions
Explained in Hello world, Meshes and geometry.
interface LightVolumeOptionsimport type { LightVolumeOptions } from '@driftengine/core';Properties
| Name | Type | Description |
|---|---|---|
lengthM | number | How far the light reaches along the volume's own +Z, in the units the panes are
built in — which are the units of whatever model matrix places them.MorePass this same number to |
spread | number | Half-width over distance: the tangent of the cone's half-angle.MorePass this same number to |
color | Vec3 | |
nearMoptional | number | Where the volume starts, along the same +Z. Zero for a beam that begins at its source.MoreA shaft of daylight through an opening is a slice taken far down a very wide cone — the apex sits above the roof, and only the part below the opening is drawn. That is what this is for, and it is why the near end is a parameter rather than the origin. |
sidesoptional | number | How many sides the hull has. Rounded up to an even number, because the caps are quads.MoreIt decides the silhouette and nothing else: the light inside is the ray march's, so a coarse hull is a polygonal outline around a volume that is still round. Twelve is indistinguishable from a circle at the size a beam usually occupies; drop it for a volume that is always distant, raise it for one that fills the frame. |