Physics · interface
DecomposeOptions
Explained in Your first game, Rigid bodies.
interface DecomposeOptionsimport type { DecomposeOptions } from '@driftengine/physics';Properties
| Name | Type | Description |
|---|---|---|
resolutionreadonlyoptional | number | Cells along the longest axis of the mesh's bounds. Default 64, refused above 256.MoreThe cap is stated because the alternative is discovering it as an allocation failure. Two grids are held, a byte of state and four bytes of region index per cell, so 256 is 16.8 million cells and 83.9 MB. 64 is 262,144 cells and 1.3 MB, which is the design point. |
maxHullsreadonlyoptional | number | How many hulls to stop at. Default 16, refused above MAX_BODY_PARTS. |
concavityreadonlyoptional | number | How empty a merged region's bounding box may be before the merge stops being free. Default 0.05.MoreIt does not cap the part count: merging continues past this while more than |
fillreadonlyoptional | DecomposeFill | 'solid' fills the interior, 'surface' keeps the shell alone. Default 'solid'.MoreA mesh with a hole in it leaks under |