Web Animations API

can we make morph shapes using Web Animations API as we can make it in SVG animation ? and if we can’t what is the alternate of it because i see that the support of SVG is unknown

Same as CSS animation, so yes, easily if the two shapes have the same number of points, but if not you need to write JS logic to handle it (and are better off using an animation library that’s already got that logic written).

to be honest i don’t like using libraries , and for CSS it’s slower than animation but i heard that the support of svg animation is unknown so i’m wondering if there is an alternate

It’s not slower than CSS, it’s exactly the same, Web Animations API is the JS interface for browser animations.

But re animation, it’s the same for SVG as any other element, you can morph shapes easily if they have the same number of points,l but you need to write some logic if they don’t. SVG SMIL animations can do the same (ie the animations built into SVG), but they aren’t as well supported and they tend to be janky (they aren’t hardware accelerated)

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.