d3.geo2rect
d3.geo2rect copied to clipboard
Hexagons!
If it is useful to others who are looking to transform to other shapes, I have edited the code to create d3.geo2recthex, which means you can morph to a hexagonal grid pattern.
All you need to do is add shapes: 'hex'
to your config
(if config.shapes
is not used the default remains 'rect').
You don't need to make changes to your grid layout - the pattern offset for hexagons is taken care of.