Splurtcake
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by Splurtcake
-
-
Hi All,
Hoping someone can help with this issue I'm facing.
I am controlling the TimelineMax progress based on scroll position. Pretty simple, however I noticed that my tweens are running for the entire length of the page. This is because I am currently calculating the percentage with age-old `window.scrollY / (document.body.clientHeight - window.innerHeight)`
What I need help with, is figuring out how to start & finish the animation when the `.tweener` div in my Codepen example enters the viewport, to when it reaches the bottom of the viewport.
I also don't want to use the behemoth that is ScrollMagic
Any help would be greatly appreciated!
Cheers
See the Pen odoXwj by oculusriff (@oculusriff) on CodePen
TimelineMax Scrollbar Progress Offset
in GSAP
Posted
@Sahil Thanks for your reply mate! This was my first thought, however this will only trigger once the main div (.tweener) comes into view, I would like the animations to start as each item comes into view...