Here we will handle the animate in and animate out functions for the graphic. This will add some frothy milk to the cup using a thick, semi-opaque line with rounded tips: The element draws a line connecting two points. To keep things simple, you’ll write all of your markup, CSS, and JavaScript in this same file. Define the path using an SVG or an Array of points. SVG (Scalable Vector Graphics) uses XML markup to help render things into the browser. Snag GSAP on github or download it from GreenSock.com. This example shows what I would like to do. Now replace the alert() line with three new lines: Click the portafilter to move it into position above the cup. Unfortunately that code is built on top of the Paper.js library. In addition to the attributes for setting the x, y, width, and height values, there are rx and ry attributes for making the corners round. It animates anything JavaScript can touch (CSS properties, canvas library objects, SVG, React, Vue, generic objects, whatever) and it solves countless browser inconsistencies, all with blazing speed (up to 20x faster than jQuery), including automatic GPU-acceleration of transforms. C335 310, 335 230, 335 230 The final result is a three-step, interactive animation (Figure 1). The visual result is exactly the same as the first version. Now that we have our dynamic width, we can animate the graphic in! Depending on what you wish to accomplish, you may elect one approach over the other, or a blend. You added GSAP animations to the SVG using JavaScript. The width and height attributes of the