As the title suggests - having trouble getting this to work.
Tried like this as per this link
var anime = AFRAME.ANIME;
const panel = document.getElementById('bg-panel2');
function anim1() {
anime({
targets: 'panel',
translateX: 250,
direction: 'alternate',
loop: true,
easing: 'linear'
})
}
anim1();
Nothing happens - tried as a component too, but would rather just be able to fire an animation using anime wherever I need to rather than making a separate component each time. If there are any examples of using anime with aframe you could point me too I'd appreciate it.
The
targetsproperty is supposed to be a css selector as a string or (list of) live objects, not a variable name as a string. Here's an example of changing the radius attribute of aa-sphere: