Package Exports
- ndarray-to-vox
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 (ndarray-to-vox) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ndarray-to-vox
Convert a 3D ndarray to a vox file (Magica Voxel format)
Example
var ndarrayToVox = require('ndarray-to-vox');
// ...
var voxFile = ndarrayToVox(data); // returns a valid vox file as an ArrayBuffer instanceWith a custom palette :
var ndarrayToVox = require('ndarray-to-vox');
var palette = [
[255, 0, 0],
[0, 255, 0],
[0, 0, 255],
[255, 255, 255],
];
// ...
var voxFile = ndarrayToVox(data, palette); // returns a valid vox file as an ArrayBuffer instanceHistory
0.1.0 (2015.11.30)
- Add palette support.
- Fix issue with color index being based on 0, where it should be based on 1.
0.0.1 (2015.11.27)
- First implementation.
License
MIT