0.3.0 • Published 10 years ago

voxel-debug v0.3.0

Weekly downloads
3
License
-
Repository
github
Last release
10 years ago

voxel-debug

Debug helpers for voxel.js using dat-gui.

example

View this example

// Loads a dat-gui in the top right with settings
var debug = require('voxel-debug')(game)

// Add a x,y,z axis at center of game and 10 voxels big
debug.axis([0, 0, 0], 10)

You may want to add to your own settings to the dat-gui controls. Install dat-gui with npm install dat-gui and configure as such:

var gui = new (require('dat-gui')).GUI()
var debug = require('voxel-debug')({
  game: game,
  gui: gui
})

// Create a folder and add position properties for a fictious item
var folder = gui.addFolder('Item Position')
folder.add(item.position, 'x')
folder.add(item.position, 'y')
folder.add(item.position, 'z')

Please goto http://workshop.chromeexperiments.com/examples/gui/ for more examples on using dat-gui.

Please open a PR to add more useful default debug properties!

api

var debug = require('voxel-debug')({game: game, gui: gui})

debug.axis([position, size])

Displays a new axis at position and with size. Returns the AxisHelper.

install

With npm do:

npm install voxel-debug

Use browserify to require('voxel-debug').

release history

  • 0.1.0 - initial release

license

Copyright (c) 2013 Kyle Robinson Young Licensed under the MIT license.

0.3.0

10 years ago

0.2.0

11 years ago

0.1.0

11 years ago