@voxolith/engine/vox
MagicaVoxel interop: .vox in, .vox out.
This is the "entities which match existing models" path: any .vox the project already ships
becomes an entity, with one role per distinct colour it uses. It is also how generated
entities leave the engine for the viewer, the editor or MagicaVoxel itself.
Axis convention: .vox is Z-up, entities are Y-up. Both directions swizzle
(model x, y, z) <-> (entity x, z, y), the same mapping the viewer uses.
Headless: it parses and writes buffers, so it runs in bun and workers as well as the browser.
Interfaces
Functions
@voxolith/engine/vite
Previous Page
entityFromVox()
Parse a .vox buffer into an entity, cropped to its occupied box. Each distinct palette colour becomes a role (color.0, color.1, ... in first-seen order, colours from the file's palette), so the entity can be restyled like a generated one. Only the first model in the file is read; colours past...