Navigation · interface
VoxelField
Walkable surfaces as spans, in columns on a horizontal grid.
Explained in Navigation.
interface VoxelFieldimport type { VoxelField } from '@driftengine/nav';In depth
Structure of arrays and CSR columns, matching NavGraph in core: a span is three integers and a
column is a slice, so building a region out of this walks memory in order and allocates nothing
per span.
Properties
| Name | Type | Description |
|---|---|---|
widthreadonly | number | |
depthreadonly | number | |
cellSizereadonly | number | |
cellHeightreadonly | number | |
originreadonly | Float64Array | World position of cell (0, 0)'s minimum corner: x, y, z. |
columnStartreadonly | Uint32Array | Column x + z * width's spans are [columnStart[i], columnStart[i + 1]). |
spansreadonly | Int32Array | Three words per span. See SPAN_STRIDE. |