Skip to main content
100%

Shape Tweening

✓ Published0🌍 Public
FFrissAnalytics
Last edited Sep 3, 2018
Created on Apr 25, 2017

A D3.js shape-tweening animation morphs the outline of California into an equivalent circle and back again, repeatedly. The SVG path’s `d` attribute is updated through chained transitions, each lasting five seconds, using the projected polygon coordinates from the included GeoJSON file. The code computes a circle with matching perimeter length and area, placing the state’s border points along it via a custom `circle` function.

AI-generated description

See also the linear path tweening example.

forked from <a href='http://bl.ocks.org/mbostock/'>mbostock</a>'s block: <a href='http://bl.ocks.org/mbostock/3081153'>Shape Tweening</a>

gpl-3.0 Licensed

Similar vizzes