node package manager


an addon to have items in voxel.js.


an example/template node module for voxel.js.

places a items of voxels at some specific game position.

npm install voxel-items
var items = require('voxel-items')()
items.addEventListener('load', function(){
    // you code go here
items.createMesh(x, y)

get the item which is at x, y in the spritesheet and create a 3d mesh with it


  • make alias for each items
    • .createMesh('brown-helmet') === .createMesh(0,0)
  • to install dev dependancy
npm install
  • to publish the package in npm repo - dont forget to bump version number
npm publish
  • to get a live server of the demo
npm start
  • to publish on gh-pages
  # go on gh-pages branch
  git checkout gh-pages
  # merge master branch
  git merge master
  # install all dependancies (if not already done)
  npm install
  # force to add them (they are in .gitignore)
  git add -f node_modules
  # push it to github
  git push 
  # come back on master branch
  git checkout master