Free Sample Lesson

Build a GSAP Ease Visualizer

Here's a fun little project for you!

We're going to tap into CustomEase.getSVGData() to render and ease curve to a <path>

Using MorphSVG we can easily animate from one ease curve to another!

These handy demos show each of the 3 steps we'll work through in the video.


Render a Single Ease Curve to a Path

GSAP's CustomEase has a special getSVGData() method that will return the path data of any ease. If you specify a path in the config object the ease will be rendered to that path.

Usage:

let ease = CustomEase.getSVGData("back", {
 width:500,
height:500,    
 path:"#ease"
})

The demo below has an SVG with a single path with an id of "ease".

You can edit the JS code below by changing "back" to "bounce".


Drop-down Menu

Instead of hard-coding which ease we want to render we will grab the name of the ease from the <select> menu.


Animate Curves with MorphSVG

In the next example we'll use CustomEase.getSVGData() to simply return the path data and not render the curve.

We'll pass the path data to a MorphSVG tween so that the curve can animate to the new path values.


Students Love Creative Coding Club

5 star rating

Learn GSAP in a fun way, fast!

Tee Kick

All-inclusive starter course, with some real gems in there.

All-inclusive starter course, with some real gems in there.

Read Less
5 star rating

Great course on how to use GSAP to the max

Gilbert Mizrahi

Highly recommended. Carl provides real value.

Highly recommended. Carl provides real value.

Read Less
5 star rating

Great course! Highly recommend!

Greg Vissing

Once again Carl breaks everything down in an understandable way all while having fun doing it.

Once again Carl breaks everything down in an understandable way all while having fun doing it.

Read Less
5 star rating

absolute amazing and easy to learn

patrick khowa

5 star rating

Great explanation and excellent teacher

Eda Pavletic

Thank you

Thank you

Read Less
5 star rating

Wow

Waldek Reclik

It's a great course.

It's a great course.

Read Less
5 star rating

Beyond the basics

Stuart Neiman

Very good approach. I am learning a ton.

Very good approach. I am learning a ton.

Read Less

SVG Animation with GSAP

Master all of GSAP's SVG tools.

This course will teach you everything you need to know about SVG so that you can animate them efficiently with GSAP.

You'll learn how to create SVGs with free tools and code them by hand.

Unlock SVG Animation with GSAP as part of  my comprehensive GSAP Course bundle at creativeCodingClub.com.

Discover the Joy of Animating with Code

Unlock the world's most comprehensive GSAP training.