Voxel.removeFromScene(scene) wasn't working because removeChild is not an existing method on the scene object. This throw errors when trying to use the method (see http://jsfiddle.net/rL70w9hd/).
The scene already has an add and remove method for this, and we can use them in the same way that AppendToScene does. Pass the voxel itself to the remove function on the parent scene.
I'd include a test but I didn't see a test suite in the repo.
Voxel.removeFromScene(scene)
wasn't working becauseremoveChild
is not an existing method on thescene
object. This throw errors when trying to use the method (see http://jsfiddle.net/rL70w9hd/).The scene already has an
add
andremove
method for this, and we can use them in the same way thatAppendToScene
does. Pass the voxel itself to the remove function on the parent scene.I'd include a test but I didn't see a test suite in the repo.