Package Exports
- svox
- svox/index.js
- svox/index.mjs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (svox) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
SVOX is a file format for storing voxel and palette data.
The SVOX file format is based on the MagicaVoxel's file format .vox which always includes the full color palette for any given amount of voxels. This can lead to the file containing unnecessary data (since the whole range of colors in the palette is often not needed) which can be especially impactful for transmitting smaller assets (which are usually < 256 Voxels).
Installation
npm i svoxUsage
// CommonJS
const SVOX = require('svox');
// ES modules
import SVOX from 'svox';// Takes an existing SVOX binary file and parses it to a json containing the data of the file
SVOX.fromSVOX(file)
// Takes an existing VOX binary file and parses it to a json containing the data of the file
SVOX.fromVOX(file)
// Takes an existing SVOXGroup consisting of voxel and palette entries converts it to SVOX binary data
SVOX.toSVOX(svoxGroup)
