Model loading · interface

ClusterOptions

Explained in Importing models.

interface ClusterOptions
import type { ClusterOptions } from '@driftengine/assets';

Properties

NameTypeDescription
sharereadonlyoptional'index' | 'position'What makes two triangles neighbours while a cluster grows. 'index' by default, which is what every baked container was hashed with and must go on producing.
More

'position' counts two corners as shared when they stand at the same point, whatever their indices. A mesh that splits its vertices at every seam — a voxel mesher, whose faces each carry their own uv and occlusion, or a box built face by face — shares no index between two faces, so growth by index stops at every face and each quad becomes a cluster of two triangles: a median voxel chunk was 1,012 clusters for 2,024 triangles. The indices written out are still the mesh's own, because welding decides who is a neighbour and nothing else.