0.1.0 • Published 8 years ago

ndarray-to-vox v0.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

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

0.1.0

8 years ago

0.0.1

8 years ago