Skip to content
EKB Labs

Free tool

The curve check

Three rules and one command to count how many animations in your own file share one curve. We wrote it for our own animation files, where it fails 10 of 47.

Download curvecheck.pyOne file, plain Python 3, no installs

The three rules

  1. One curve on more than half of the moves fails.

    When most moves arrive the same way, the page moves at one speed and nothing leads the eye. A curve is how a move speeds up and slows down.

  2. One duration on more than 60 % of the moves fails.

    The same length on nearly everything reads as a default, even when the curves differ.

  3. Fewer than three different curves fails, once a file has six moves or more.

    A file that uses two curves for everything has not chosen one for each kind of move.

Run it on your file

Save the script next to your animation file and run one command. It reads the source of a GSAP animation, HTML or JavaScript, finds every .to, .from and .fromTo call, and works out the curve and the duration each one uses. It exits with 1 when any file fails, so it can sit in a build step.

python3 curvecheck.py yourfile.html

Here is what it prints on one of our own files, before and after we gave each move a curve of its own.

FAIL  donut-sweep.html  7 moves  power3.out on 5 of 7 moves (71%); only 2 distinct eases
      curves: power3.out 5, power2.inOut 2
PASS  donut-sweep-reworked.html  7 moves  varied
      curves: kit:enter 3, kit:land 2, kit:heroEnter 1

What it does not do

  • It reads the source as text. A move that a helper builds at run time can be missed, and a value it cannot read is reported as unreadable, never guessed.
  • A move with no curve set anywhere counts as GSAP’s default, power1.out, and a timeline’s defaults are applied.
  • Fewer than six moves is too few to judge, so the file passes with a note.
  • The limits of half the moves and 60 % are our own judgement, not a standard. They have not yet been calibrated against published videos.

The same question for your automations

An animation file can look fine and still be a default. An automation can run every day and still have stopped doing its job. The Day-91 Check asks ten questions about yours, takes about three minutes, and shows your result on screen.