veltman / flubber

Tools for smoother shape animations.
MIT License
6.61k stars 167 forks source link

Can we use flubber to animate from svg shape to path #103

Closed Jatinbalodhi96 closed 4 years ago

Jatinbalodhi96 commented 4 years ago

Can we use flubber to animate from SVG shape (like rect, circle) to path? If it is possible can someone share an example or code snippet rearging that.

Or is there some way to animate many circle to topojson map?

Thanks

veltman commented 4 years ago

Yes, you can either use the toCircle/fromCircle and toRect/fromRect methods (see the README), or if you have an svg <circle> or <rect> element, you can first convert it to the <path> equivalent before animating.

Pathologist will do this conversion for you.