Start Function on Completion – Feature Request
-
Can you add a way to start a function on completion of the bodymovin animation? I’m using ScrollMagic with Bodymovin and it would be great to have them work together.
Maybe this would work?var anim;
var animData = {
container: document.getElementById(‘bodymovin’),
renderer: ‘svg’,
loop: false,
autoplay: true,
rendererSettings: {
progressiveLoad:false
},
path: ‘thelogo.json’
};
anim = bodymovin.loadAnimation(animData);anim.addEventListener(‘complete’,doalert);
function doalert() {
console.log(‘test completed’);
}
The topic ‘Start Function on Completion – Feature Request’ is closed to new replies.