   # block interaction: left/right-click to break/place blocks, uses raytracing
   game.currentMaterial = 1
 
-  game.explode = debris(game, {power: 1.5})
-  game.explode.on 'collect', (item) ->
+  debris = createDebris(game, {power: 1.5})
+  debris.on 'collect', (item) ->
     console.log("collect", item)
 
+  # TODO: refactor into voxel-walk?
   game.on 'tick', () ->
     walk.render target.playerSkin
     vx = Math.abs target.velocity.x


  console.log "configuring highlight "
  # highlight blocks when you look at them, hold <Ctrl> for block placement
  hl = game.highlighter = highlight game, { color:  0xff0000 }

  # toggle between first and third person 
  window.addEventListener 'keydown', (ev) ->


console.log "Hello"

voxel = require 'voxel'
extend = require 'extend'

createGame = require 'voxel-engine'
createOculus = require 'voxel-oculus'
createHighlight = require 'voxel-highlight'
createPlayer = require 'voxel-player'
createFly = require 'voxel-fly'
walk = require 'voxel-walk'
createMine = require 'voxel-mine'
createReach = require 'voxel-reach'
createDebris = require 'voxel-debris'
createDebug = require 'voxel-debug'

module.exports = (opts, setup) ->
