work in progress -- not done yet
select a cube shaped group/region of voxels in game. useful for exporting parts of a world, etc
npm install voxel-select
var createSelector = require('voxel-select')
var selector = createSelector(game)
select.set(start, end) // bounding box positions
returns an initialization function that you must pass your game object into in order to get a selector instance
sets the selection. start
and end
should be [x, y, z] vectors. visible
is by default true and controls whether or not to draw a selection wireframe
returns absolute [width, height, depth] of the current selection
run a function over each voxel in the current selection. idx
is the voxel interchange format array index
returns data in the voxel interchange format
clears the current selection and removes the wireframe if present
BSD