FromVoxOptions
Options for entityFromVox.
Defined in: engine/src/vox.ts:20
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
anchor? | "base" | "centre" | [number, number, number] | Anchor inside the cropped box. Default "base": horizontal centre, y = 0, which is what you want for anything that stands on the ground. | engine/src/vox.ts:31 |
id? | string | Entity.id. Default "vox". | engine/src/vox.ts:22 |
kind? | string | Entity.kind. Default "model". | engine/src/vox.ts:24 |
meta? | Record<string, unknown> | Merged into Entity.meta after source and srcSize. | engine/src/vox.ts:33 |
rolePrefix? | string | Role id prefix; roles come out as ${prefix}.0, .1, ... | engine/src/vox.ts:26 |
entityToVox()
Serialise an entity to .vox. MagicaVoxel stores coordinates in single bytes, so no axis may exceed 255; larger models throw rather than silently wrapping. Role colours become the file's palette (role v at index v); materials, rigs and clips are not written. Dense models only: a sparse model has...
@voxolith/engine/worker
Next Page