maxogden/voxel-engine — pull request #24 by substack (2013-01-28 04:21:01+00:00)
Title: chunk matrices

This patch adds first-class support for chunk matrices so that we can have detached yet editable geometries like this servo demo: http://substack.net/projects/voxel-servo/

The chunk handling logic has mostly been spun out into [voxel-chunks](https://github.com/substack/voxel-chunks). The neat thing about this patch is that user code largely won't need to change in order to take advantage of chunk matrices since an extra chunkMatrix parameter has been added to the intersectAllMeshes return value that gets threaded through to the `'mousedown'` and `'mouseup'` events. When the user calls `createBlock(pos, 1)` or `setBlock(pos, 1)` with the `pos` from the event, `setBlock()` and `createBlock()` know to delegate to the relevant chunk matrix so users mostly won't need to worry about special cases in the coordinate systems used when writing voxel-engine games that use chunk matrices. Hooray!

Chunk matrices will let us build robots and spaceships made of voxel chunks. Some of the next steps include:
* integrating chunk matrix blocks with the collision detection
* being moved along with the chunk matrix under your feet
* collision detection among chunk matrix groups