Transitions / animations
Author: xemCreated May 28, 2019Updated Dec 14, 2024
Labelsfeature request
Hello, this is a feature request, and I guess it's not an easy one :)
It would be great to be able to edit, translate, rotate or scale an existing shape dynamically, and interpolate this transformation over a custom amount of time.
Ex:
let ell = new Zdog.Ellipse({
addTo: illo,
diameter: 80,
translate: { z: 40 },
stroke: 20,
color: '#636',
});
ell.animate({
diameter: 150,
translate: {z: -40},
transition: "500ms",
});
// Result: the ellipse will change diameter from 80 to 150 and move from 40 to -40 in 500ms.Bonus points if you manage to implement transition-timing-function too (linear, ease-in-and-out, etc)
Thanks, and congrats for this lib!
Source: metafizzy/zdog