Jump to content
Search Community

Timeline optimization and performance + question on nesting

VecchiaPrugna test
Moderator Tag

Recommended Posts

Hello everyone, I'm fairly new to gsap. Here's a codepen of a simple hero animation I built.
I achieved what I wanted: reveal the container using clip-path and then see all the photos in sequence with an interval of 0.5 second for each photo.

Question 1:  Is the thinking process correct? Can I optmize my code? What would you have done if you wanted to achieve this effect?

I'm really curios on how a gsap expert would have built this animation.

Question 2: since this is a intro animation, should I preload/prefetch the images in the <head> to improve performance?
Question 3: If I wanted to add an effect that overlaps with this whole timeline, how should I do it? What if I wanted to add scale to my img container from 1.5 to 1 that begins at the start of the master timeline and ends when the master timeline ends?

 

I hope I've been clear enough, English is not my primary language

See the Pen GRejrMX by ykvdnykw-the-bold (@ykvdnykw-the-bold) on CodePen

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...