Explode component not functioning in A-Frame 4.0
Hi dmarcos!
When the A-Frame source is switched from "aframe-core.js" to "https://aframe.io/releases/0.4.0/aframe.min.js" the component breaks.
It looks like "entityEl.getObject3D('mesh');" on line 14 of "explode.js" is returning BufferGeometry instead of THREE.Mesh data, therefore it's not exposing the faces of the object and throws an error.
I'm hitting a wall trying to access the faces of the geometry. Any ideas?
This works!
by adding the following attribute at the start of the explode function.
this.el.setAttribute(geometry, buffer: false;);
but:
If it has a mixin, it throws errors, explodes and leaves a box left behind. Thus you need to add this:
this.el.removeAttribute(mixin);
then it looks great, but still throws errors.
If the mixin is empty, it explodes without errors: this.el.setAttribute('mixin',''); but this breaks the component.
the CSS has to set the background to black or else it will alter the colors of the mesh. I wonder how that can be controlled within the component without using CSS.
I've got it updated on my repo if you want to check it out.