The .drft container · interface

NavPolyMesh

A polygon mesh and where it stands. @driftengine/nav's PolyMesh is one of these.

Explained in The .drft container.

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

Properties

NameTypeDescription
verticesreadonlyInt32Arrayx, z per vertex, in cell units.
vertexCountreadonlynumber
polysreadonlyInt32ArraymaxVertsPerPoly slots per polygon, padded with −1.
neighboursreadonlyInt32ArrayThe polygon across each edge, or −1. Same layout as polys.
polyCountreadonlynumber
maxVertsPerPolyreadonlynumber
polyRegionreadonlyInt32ArrayWhich region each polygon came from.
originXreadonlynumber
originZreadonlynumber
cellSizereadonlynumber