Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

How can I make my animation play without a delay?

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hello everyone!


I am only getting to grips with GSAP and I use it for relatively simple animations and effects.


I was working on this website (see the opening heading)-




Everything works very smoothly on my local machine but on the server there is a delay and the animation plays very choppy.


Can anyone tell me how to solve this problem?


Many thanks in advance!

Link to comment
Share on other sites

It sounds like it might just be that the browser is inundated with startup tasks like loading all the resource, doing the initial render, etc. so maybe as your animation starts, the browser gets interrupted with another resource streaming in and it has to do the layout, decompressing of jpg data, etc. and hogs the main thread momentarily, making your animation stutter. It's not a bug or problem with GSAP - that's just the nature of the browser having to load/render/layout all the assets. Oddly enough, the solution might be to actually add a bit of a delay to your animation so that it doesn't start until a second (or whatever) after the page loads, thus giving the browser a chance to finish all its tasks before accommodating a smooth animation. Have you tried that? 


Also, make sure you don't have a bunch of other animations that happen further down (out of view) on the page initially. The whole point is to limit the demand on the CPU so that you can funnel all its resources into the essentials. 

  • Like 2
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.