HunterLarco / voxel.css

A lightweight 3D CSS voxel library.
http://voxelcss.com
MIT License
3.35k stars 128 forks source link

Apply fix to removeFromScene, so voxels can be removed. #30

Closed bryanbraun closed 8 years ago

bryanbraun commented 8 years ago

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.