block by mapsam 95e65cbf2430f7168af8

Winding order

Full Screen

This example shows how geometries with inner loops and outer loops build themselves in opposite direction using d3 and a stroke-dashoffset in a .transition() infinite loop. The outer loop (red) builds clockwise, while the inner loop (blue) builds counter-clockwise. This is important in order to confidently account for “holes” in polygons. Here’s a good summary of the importance in winding order.

index.html

donut.json