What this tool does
ShadowCalculator.com (also referred to as just Shadow Calculator on this website) is a browser-based tool that shows how shadow length and direction change with date, time, latitude, and object height.
The app uses the open-source library SunCalc for solar position calculations, Three.js for 3D visualization, Leaflet.js for interactive maps, and CARTO (powered by OpenStreetMap data) for map tiles and rendering. Location search uses Nominatim geocoding via Leaflet Control Geocoder. All shadow computations happen locally on your device.
Scientific assumptions
- Flat ground (no terrain or slope).
- Standard geometry:
L = H / tan(α), where H is object height and α is solar altitude. - Approximate city coordinates and time zones, suitable for visualization but not survey-grade work.
Disclaimer
This is a truly vibe coded site with no guarantee of functionality or long term maintenance.
This site is provided for informational and educational purposes only. Use it as a quick reference for shadow length and direction, but not for navigation, engineering certification, safety-critical design, or any use where precise solar position or shadow length is required.
Privacy & Data Usage
What Stays Local
The following processes happen entirely within your browser:
- Shadow Math: All calculations for sun position, shadow length, and direction are performed locally on your device using JavaScript.
- User Settings: Your selected date, time, and object dimensions are stored in your browser's temporary memory.
- Raw GPS Data: When you use geolocation, your specific latitude and longitude coordinates are retrieved by the browser and used for calculations. They are not sent to ShadowCalculator.com servers.
Data Shared with Third Parties
To provide map features and site functionality, your browser must request resources from external services. These requests inherently reveal your IP address and the specific content/location you are accessing.
- CARTO (Map Tiles): To display the map, your browser fetches image tiles for your specific
location from CARTO's servers.
Privacy Implication: At high zoom levels (e.g., viewing a specific house), these tile requests reveal your precise location to the map provider. See CARTO's Privacy Policy. - Nominatim (location search): When you search for a city or address, your search query is sent to OpenStreetMap's Nominatim geocoding service. They see your IP address and search terms. See their Usage Policy.
- Buy Me a Coffee: The "Buy me a coffee" button loads a widget from buymeacoffee.com. This service collects data (like your IP address and browser info) to display the button and process any potential payments. See their Privacy Policy.
- CDNs (unpkg, jsDelivr, Google Fonts): Educational and code libraries (Three.js, Leaflet, SunCalc, Inter font) are loaded from public Content Delivery Networks. These services see your IP address when your browser requests these files, which is standard for most websites.
- GitHub Pages (hosting): This site is hosted on GitHub Pages, which may collect basic technical logs (IP address, user agent, page views) as part of their standard hosting. See GitHub's Privacy Statement.
No Analytics or Tracking
This site does not use Google Analytics, advertising cookies, or any tracking scripts. We do not collect, store, or sell your personal information.
Open-source license
The source code for this site is intended to be open-sourced on GitHub
under the MIT License. See the LICENSE file in the repository
for details.
Questions or comments? See the project repository on GitHub.