JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 32
  • Score
    100M100P100Q64190F
  • License zlib

A reader for MagicaVoxel's VOX file format

Package Exports

  • @sh-dave/format-vox
  • @sh-dave/format-vox/dist/index.js

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 (@sh-dave/format-vox) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

haxe-format-vox

A reader for MagicaVoxels's VOX files. Reads most of the v0.99 chunks including the world builder nodes.

haxe

usage in haxe

var data: BytesData = ...;
format.vox.VoxReader.read(data, function( ?vox, ?err ) {
    if (err != null) {
        trace(err);
        return;
    }

    // use vox.models to get the meshes
    // use vox.nodeGraph to access to world builder nodes
});

haxe examples

javascript

usage in javascript

const VoxReader = require('@sh-dave/format-vox').VoxReader;
const data = ...some ArrayBuffer...;

VoxReader.read(data, (vox, err) => {
    if (err) {
        console.error(err);
        return;
    }

    // use vox.models to get the meshes
    // use vox.nodeGraph to access to world builder nodes
});

javascript library build instructions

All dependencies are simply installed via npm thanks to lix

npm install
npx haxe build-js.hxml