This is my first attempt at building an a-frame experience, and I'm doing so by cobbling together multiple community components.
I'm currently attempting to implement a spritesheet animation using aframe-spritesheet-component ( https://github.com/EkoLabs/aframe-spritesheet-component ) and having an issue getting it to play well with others.
My build here: https://afantasy.github.io/spritetest/
So far, I've managed to get the spritesheet animation to loop through once, after which it causes a total freeze of the entire environment.
I am not sure whether it's a bad interaction with the other components I've installed, or with the aframe framework itself.
From what I gather from the console, something is up with the update / tick functions.
I've managed to isolate the direct cause to this bit of code I grabbed directly from the aframe-spritesheet-component example on github ( https://ekolabs.github.io/aframe-spritesheet-component/examples/rowscols/ )
<!-- SPRITE ANIMATION LOOP -->
<script type="text/javascript">
var animation = { progress: 0 };
var tween = new TWEEN.Tween(animation)
.to({ progress: 1 }, 1000)
.onUpdate(function(){
document.querySelector('a-image').setAttribute('sprite-sheet', 'progress', animation.progress);
});
tween.onComplete(function() { animation.progress = 0; });
tween.chain(tween);
tween.start();
</script>
Super stumped and sure how to proceed from here, any hints would be appreciated.