r/webdev • • 19m ago

Showoff Saturday I ported a Python shadow-geolocation tool to plain JS, no build step, no server

Post image

Bellingcat's ShadowFinder works out where a photo was taken from the length of a shadow, but it runs in a Colab notebook. I rebuilt it for the browser: click an object, its top and its shadow tip, and a globe shows every place on Earth that shadow could fall.

Stack is deliberately boring: vanilla JS, no framework, no build step, MapLibre for the globe, SunCalc for the sun position, a strict CSP and bundled libraries so nothing loads from a CDN. The band is computed on a 0.5° grid live as you drag the points. Photos never leave the browser.

Live: https://kluter.github.io/ShadowFinder-Web/
Code: https://github.com/kluter/ShadowFinder-Web

Happy to answer questions :)

0 Upvotes

0 comments sorted by