One Night on Earth is an interactive star map. This is not meant to be a scientific tool, it's simply a fun interactive experience.
One Night on Earth is written in Typescript and Zig.
The controls currently available on the site are:
- Change Date - Update the date that the sky is simulated for
- Change Location - Enter a new latitude and/or longitude, then click 'Update Location' to move the simulation to the desired coordinates.
- 'Use My Location' - Navigate to your current location.
- 'Time Travel' - Click this button to start automatically advancing the date. Click again to stop.
- Drag and Move - Click and drag on the map to move the sky. Your updated coordinates will be populated in the 'Latitude' and 'Longitude' fields.
- Zoom - Scroll with your mouse while hovering over the map to zoom in/out.
There are a few steps to get started:
Pre-Requisites
- Zig - See Zig on GitHub for more instructions.
- Node - See https://nodejs.org/en/download/
On First Run Only:
- Run
cd web && npm install
- Run
cd prepare-data && zig build run -Drelease-fast -- ../zig-server/star_data.bin ../zig-server/const_data.bin ../zig-server/const_meta.json
. This will create all of the data files that the server needs in order to run.
Each Run:
- In one terminal, run
cd zig-server && zig build run
. - Run
cd night-math && zig build -Drelease-fast
. This will create the WASM module as well as the module TS interfaces. - In another terminal, run
cd web && npm start
.
Now you're ready! Like before, visit localhost:8080
to view the site.