

Problem statement:
In my animation, a timeline is used to control the animations of my different “blocks”. The goal is to have them all tied to a scroll wheel that will rotate them around the transform origin that I created using Javascript. The problem is, as you can see, that when i am scrolling down to the animation where it begins, I have the outline of a box showing before the animation starts. As soon as the box is triggered by the scrolling of the mouse, the box is “restarted” to its proper starting position. You can see multiple blocks here as I have lowered the rotation amounts so that the blocks are visible on one screen. The marker on the right shows that we are before 1 starts and before 3 ends. So we are also moving number 2. So why is number one’s border outline visible at it’s ending postion and disappears when it begins? However, the box in question is the last box that contains the text at the end. How do I keep it from showing the box in the ending position before the animation for that box begins? What we want is the second image.
Buy your copy of The Stories Book
Outside Europe? View international editions.
About the book
The solution was to use GSAP’s onRefreshInit function for ScrollTriggers. The function runs on ScrollTrigger refresh, like on browser resize moments. GSAP was getting the start position wrong of the box, so forcing it to set it on every refresh is what works. This sets the box to its proper rotation, allowing us to use intro.to its final rotation. Each one of these function calls calls gsap.set which places the box.

International editions
The Stories Book will be available from these international retailers.
Frequently Asked Questions
What is The Stories Book about?
This exquisite compilation showcases a diverse array of photographs that capture the essence of different eras and cultures, reflecting the unique styles and perspectives of each artist.
How much does The Stories Book cost?
This exquisite compilation showcases a diverse array of photographs that capture the essence of different eras and cultures, reflecting the unique styles and perspectives of each artist.
When will The Stories Book be released?
This exquisite compilation showcases a diverse array of photographs that capture the essence of different eras and cultures, reflecting the unique styles and perspectives of each artist.
Are signed copies available?
This exquisite compilation showcases a diverse array of photographs that capture the essence of different eras and cultures, reflecting the unique styles and perspectives of each artist.