I'm trying to implement a parallax scrolling following the scrollmagic examples.
The greensock documentation says that something like TimelineMax.to
defines the final position of the element within that scene (as opposed to .from
which defines the initial).
However I find that .to
actually affects the initial position immediately, especially if the element is right at the top of the viewport as the page is loaded.
For example this:
.to($('.intro-header .bcg'), 3, {y: "80%",rotation:0.01, ease:Linear.easeNone});
will place my element .intro-header .bcg
already at a 40% position as the page is loaded, and no scrolling as taken place!
I've been scratching my brain for days but I cannot get around as to why this happens.
Only if I set the duration of the scene to something like 1200% then the elements show up in the correct initial positions as the page loads, but then the scene happens very slowly.