# Web Animations API

**URL:** <https://forum.freecodecamp.org/t/web-animations-api/439691>\
**Category:** Curriculum Help\
**Tags:** javascript\
**Created:** [January 9, 2021, 1:54pm UTC](https://forum.freecodecamp.org/t/web-animations-api/439691 "2021-01-09T13:54:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![I.H](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/i.h/32/241031_2.png) [@I.H](https://forum.freecodecamp.org/u/I.H)\
**Post date:** [January 9, 2021, 1:54pm UTC](https://forum.freecodecamp.org/t/web-animations-api/439691/1 "2021-01-09T13:54:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![DanCouper](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/dancouper/32/158608_2.png) [@DanCouper](https://forum.freecodecamp.org/u/DanCouper)\
**Post date:** [January 9, 2021, 9:40pm UTC](https://forum.freecodecamp.org/t/web-animations-api/439691/2 "2021-01-09T21:40:08Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![I.H](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/i.h/32/241031_2.png) [@I.H](https://forum.freecodecamp.org/u/I.H)\
**Post date:** [January 11, 2021, 2:54pm UTC](https://forum.freecodecamp.org/t/web-animations-api/439691/3 "2021-01-11T14:54:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![DanCouper](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/dancouper/32/158608_2.png) [@DanCouper](https://forum.freecodecamp.org/u/DanCouper)\
**Post date:** [January 11, 2021, 3:58pm UTC](https://forum.freecodecamp.org/t/web-animations-api/439691/4 "2021-01-11T15:58:47Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [July 13, 2021, 3:58am UTC](https://forum.freecodecamp.org/t/web-animations-api/439691/5 "2021-07-13T03:58:48Z")

</div>

Closed on July 13, 2021, 3:58am UTC

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