maxogden/voxel-engine — pull request #19 by chrisdickinson (2013-01-24 05:37:19+00:00)
Title: Adds `game.spatial` spatial event emitter, use `spatial-trigger` to demo

This adds 5 spatial events:

* collide-x / collide-y / collide-z: listeners receive the `tile` hit, the tile coordinates `[i, j, k]`, and the `dir` (`+/-1`) of the collision.
* position: listeners receive the `position` as a `THREE.Vector3` instance.
* change-block: listeners receive the `position` changed, the old voxel value, and the new voxel value.

The demo is updated to show an example of using `spatial-trigger`.