van Wijk Smooth Zooming
✓ Published0🌍 Public
Mmbostock
Last edited Aug 12, 2019
Created on Oct 3, 2012
A hexbin mesh forms the backdrop as two circular markers—a brown start point and a steelblue end point—define a zoom transition. The view continuously interpolates between these two camera positions using `d3.interpolateZoom`, which smoothly scales and translates the entire SVG group. The animation runs in an infinite loop, reversing direction each time it reaches a marker. The code builds the mesh from `d3.hexbin` and applies the zoom tween via `attrTween` on the group's transform.
AI-generated descriptionA demo of d3.interpolateZoom. Added in release 3.3, zoom interpolation is now supported automatically for the zoom behavior. See also the zoom transitions and map zooming examples.
gpl-3.0 Licensed