vox-d 0.0.5

vox-d is a library to load VOX voxel files (used by eg. MagicaVoxel).


To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

What's this?

vox-d is a library to load several format of voxel bitmap files.

  • .VOX: Format used by MagicaVoxel, supports alpha
  • .VOX: Simple uncompressed grid of 8-bit values

Licenses

See UNLICENSE.txt

Usage


import std.stdio;
import voxd;

void main()
{
    VOX model = decodeVOX("dragon.vox");

    writefln("width = %s", model.width);
    writefln("height = %s", model.height);
    writefln("depth = %s", model.depth);
    writefln("That makes %s voxels total", model.numVoxels());

    VoxColor color = model.voxel(0, 1, 2);
    writefln("voxel (0, 1, 2) has color (r = %s, g = %s, b = %s, a = %s)", color.r, color.g, color.b, color.a);
}

Authors:
ponce
Dependencies:
none
Versions:
0.0.5 2015-May-17
0.0.4 2015-May-17
0.0.3 2015-May-17
0.0.2 2014-Aug-03
0.0.1 2014-Aug-03
Show all 6 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 228 downloads total