The pack
hull3d
function hull3d(): Pack<{ hull3d: Hull3dApi }>
The hull-3d pack: a convex wrap of any point cloud or loaded model, for a physics collider. Pure maths,
so it needs no backend and runs headless.
Helpers
hullOfVerts
function hullOfVerts(verts: Float32Array, maxPoints: number = 48): Float32Array
Convex hull of a stride-8 vertex soup (pos+normal+uv — the engine's
geometry format): dedupes positions (1e-5 grid), runs quickhull, and if
the hull has more than maxPoints vertices, SIMPLIFIES by greedy
farthest-point sampling down to maxPoints (physics cores want small
hulls; 32–64 is plenty).
Functions
quickhull
function quickhull(points: Float32Array | number[]): Float32Array
3D quickhull over a point cloud. Input: flat xyz triples. Output: the hull's unique vertices as flat xyz triples (order unspecified). Handles degenerate inputs by returning what it can (≤3 points / coplanar sets return the input's unique extreme points — Box3D accepts them).
Types
Hull3dApi
type Hull3dApi = typeof kit
game.hull3d — every function this pack carries, as one namespace.


