max-mapper / voxel-hello-world

a template voxel game repo you can use to build your own voxel games
http://maxogden.github.com/voxel-engine
62 stars 64 forks source link

now passing highlightOpts from game opts to voxel-highlight #20

Closed theoxylo closed 11 years ago

theoxylo commented 11 years ago

now hello-world clients like test.js can pass highlight options along with other game options, like this:

var opts = {
  highlightOpts: {
    color: 0xffff00,
    distance: 100,
    animate: true
  },
  generate: function (x, y, z) {
    return y % 16 ? 0 : Math.ceil(Math.random() * 2)
  }
}

var game = require('voxel-hello-world')(opts)