Open mirkonz opened 8 years ago
Hey Mirko, delays used like this do work:
var scene = new ScrollMagic.Scene();
var tween = new TimelineMax();
tween.from('.slide', 1, { opacity: 0, y: 100, delay: 1});
scene.addTween(tween);
If you post some of your code I can help you spot the error :)
But it ignores the timeline delay: This does not work:
var scene = new ScrollMagic.Scene();
var tween = new TimelineMax({delay: 1});
tween.from('.slide', 1, { opacity: 0, y: 100});
scene.addTween(tween);
Oh okay, sorry for the confusion. Its weird that it doesn't work because judging from the code ScrollMagic hooks to the progress value of the GSAP timeline and updates that value. The progress should include the timelines base-delay: https://github.com/janpaepke/ScrollMagic/blob/master/dev/src/plugins/animation.gsap.js#L146 Have you tried fixing it yourself? A pull request would be awesome!
It looks like ScrollMagic is ignoring the GSAP's timeline delay option. Will there be a fix for that?