Make your voxel critter come to life!
Extends voxel-creature and loads encoded PNG files exported from voxelbuilder.com.
var critterCreator = require('voxel-critter')(game);
var img = new Image();
img.onload = function() {
var critter = critterCreator(img);
// Move forward
critter.move(0, 0, 0.02);
// Jump!
critter.jump();
};
img.src = 'critter.png';
With npm do:
npm install voxel-critter
Use browserify to require('voxel-critter')
.
- 0.1.2 - Fix non-existent load (@domenic)
- 0.1.1 - Subdivide functionality into load and convertToVoxels (@maxogden)
- 0.1.0 - initial release
Copyright (c) 2013 Kyle Robinson Young
Licensed under the MIT license.