Skip to content
Andrew Voirol
WorkLogAboutContact
HomeWorkLog

AboutContact

✦ Just one prompt away from figuring it all out.

Wednesday, November 5, 2025globe-to-map-build

Back-face culling kills the clip artifacts

d3-geoProjectionAnimationCanvas

d3's built-in clip boundary was causing ugly artifacts during the morph. As the projection transitions from spherical to flat, points near the globe's edge would flicker in and out of the clip region. The fix: manual coordinate projection with custom back-face culling. Instead of letting d3 decide what's visible, I calculate the dot product between each point's normal and the view direction, then fade points smoothly as they approach the horizon. No more flickering. The morph is now continuous and smooth at 60fps — the sphere literally deforms into a flat map without any seams.

← Previous

Interpolating between two d3 projections

Next →

Great-circle arcs and drag momentum


Andrew Voirol

Builder, hacker, shipper. Currently leaving localhost.

Navigate

WorkBuilder’s LogAboutContactRSS Feed

Connect

X / TwitterGitHubLinkedIn

© 2026 Andrew Voirol✦Just one prompt away from figuring it all out.