Feeling lost, I spent a day searching without success. I have a project in full Vuejs and I thought using Svg would be easy and fun, but I can't figure out why the image resizes when playing an animation.
The bottom of the svg seems to resize and get smaller, and I am completely baffled as to why. Here is a link to the code: https://codepen.io/deeluxe/pen/VwvdgrN
<svg class="svg-wave" preserveAspectRatio="none" viewBox="0 0 1440 932">
<path class="polymorph" d="M485.168 37.924C264.292 -30.76 69.6908 9.30565 0 37.924V932H1442V105.029C1336.46 77.3975 1129.89 162.266 1019.35 160.785C908.815 159.305 761.264 123.779 485.168 37.924Z" fill="url(#paint0_linear)"/>
<defs>
<linearGradient id="paint0_linear" x1="775.269" y1="112.006" x2="722.687" y2="680.065" gradientUnits="userSpaceOnUse">
<stop stop-color="#05CDDA"/>
<stop offset="1" stop-color="#034E53"/>
</linearGradient>
</defs>
But the confusion doesn't end there. When trying a simple Gauge, it plays in reverse! Check it out here: https://codepen.io/deeluxe/pen/mdeKvYe
<svg class="svg-wave" preserveAspectRatio="xMaxYMin meet" width="240" height="561" viewBox="0 0 240 561" fill="none" xmlns="http://www.w3.org/2000/svg">
<path class="polymorph" d="M239.5 0.5H0.5V560.5H239.5V0.5Z" fill="#EC0000"/>
</svg>
anime({
targets: '.polymorph',
d: [
{ value: 'M239.5 0H0.5V118.5H239.5V0Z'},
],
easing: 'linear',
duration: 8000,
loop: true
});
I created copies of these svgs with Figma. If anyone can help fix either of the codes, I might finally understand what's going on. Thanks!