e.g. if you start a sphere earth spinning on mouseenter and don't want it to restart the animation when you mouseenter again.
For now I'm just going to change the class so that the raycaster no longer identifies the object as clickable using this:
<script>
//this is only on the heater
AFRAME.registerComponent('removeclass', {
schema: {
class: {default: 'nothing'}
},
init: function () {
var data = this.data;
var el = this.el;
el.addEventListener('click', function () {
el.setAttribute('class', data.class);
});
}
});
</script>
e.g. if you start a sphere earth spinning on mouseenter and don't want it to restart the animation when you mouseenter again.
For now I'm just going to change the class so that the raycaster no longer identifies the object as clickable using this: