Model loading · function
buildCoarseLevel
Build the coarse level, or null when there is nothing to build one from.
Explained in Importing models.
function buildCoarseLevel(meshes: readonly MeshData[], options?: CoarseLevelOptions): MeshData | nullimport { buildCoarseLevel } from '@driftengine/assets';Parameters
| Parameter | Type | Description |
|---|---|---|
meshes | readonly MeshData[] | |
options? | CoarseLevelOptions |
In depth
null rather than an empty mesh: an asset with no extent, or one whose geometry all falls
inside a single cell, has no outline worth a chunk in the file, and every caller would
otherwise have to check the vertex count to find that out.
Whether the result is worth writing is a separate question with a separate answer:
isOutlineWorthWriting.