GettingStarted

daishi edited this page Aug 12, 2015 · 3 revisions

create vox data by MagicaVoxel

MagicaVoxel

install

<script src="https://cdn.rawgit.com/daishihmr/vox.js/1.0.1/build/vox.min.js"></script>
<script src="https://cdn.rawgit.com/mrdoob/three.js/r71/build/three.min.js"></script>

get vox file and parse

var parser = new vox.Parser();
parser.parse("hoge.vox").then(function(voxelData) {
    // TODO
});

create mesh

var builder = new vox.MeshBuilder(voxelData);
var mesh = builder.createMesh();

// add to THREE.Scene
scene.add(mesh);
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.