ndarray-to-vox
v0.1.0
Published
Convert a 3D ndarray to a vox file (Magica Voxel format)
Downloads
9
Maintainers
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 instance
With 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 instance
History
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