News for hackers. Stuff that matters.

captainnemo729

Show HN: A Vanilla JavaScript 3D engine v2 to track lifetime space travel

https://cosmicodometer.space

A little while ago I built a tool to calculate how far you've traveled through space since the exact second you were born. The math was relatively simple (Earth's spin + Solar orbit + Galactic drift), but the feedback I got here inspired me to rewrite the visual engine and turn it into a proper deep-space dashboard.Here is what’s new under the hood:1. Vanilla JS 3D Engine: I built a custom...

( Read More... | no comments | on HN )

Show HN: Built an space travel calculator with vanilla JavaScript v2

https://www.cosmicodometer.space/

built this fun web to visualise how fast or how far are we since birth using 4 velocity vectors Rotation,orbit, solar system speed and galactic drift relative to cosmic microwave background. I’m currently using ~600 km/s for the galactic velocity, but I know this is a debated figure depending on the reference frame Built with Vanilla JS (no frameworks). added a feature to generate a "Cosmic...

( Read More... | no comments | 2 points | on HN )
Thanks! glad you liked it
nice. i debated using three.js but didn't want the overhead/imports for a simple background. wanted to keep it raw canvas to stay zero-dependency.

you're totally right about the resize jank though. the math definitely breaks when the window dimensions change. on the todo list.

i was just going for a synthwave/tron aesthetic. the glowing borders are a deliberate style choice, not a GPT artifact.
thanks! glad you liked it
fair point. i'm taking some poetic license with spacetime.

treating 'distance traveled' as a proxy for age since we're all stuck on the same rock moving at the same speed.

thanks! it was a fun weekend hack to put together. glad you liked it.
that's a really interesting angle.

i thought about it, but i was worried a log scale might abstract away the 'feeling' of the distance (making a light year look deceptively close to a kilometer). i want the user to feel small, and log scales tend to make things look manageable.

but you're right it's probably the only way to fit the solar loops and galactic arc on the same screen visually. might be worth a prototype for v2.

fair point. classic case of 'dev blindness'—i've tested it so many times i forgot it's not obvious to a new user.

pushing a label fix now so it's not a guessing game. thanks.

valid point on the visualization. i tried to map it initially, but the depressing reality is that even at 1.2 trillion km, we're basically a stationary dot on a galactic scale. a map just looked like a blank screen, so i went with the starfield to try and convey speed instead.

re: the cursors that's definitely my bad UX. they are just hover tooltips (standard title attributes), but setting the cursor to help (?) makes them look like clickable buttons. i'll swap that out so it's less confusing. thanks for the firefox check.

yeah it's actually depressing. based on the odometer's math (~850km/s), you hit the 1 Light Year mark around your 353rd birthday.
thanks. i love those old screensavers because they were so efficient. tried to keep this one lightweight too just a simple canvas loop so it doesn't spin up the fans.
I actually ran the numbers on time dilation! At 600km/s (0.2%), the effect is surprisingly small. We basically 'save' about 63 seconds a year compared to a stationary observer relative to the CMB. Not enough to live forever, but enough to be late for a meeting.
The fish tank analogy is perfect. It feels illegal that we're moving this fast without a dashboard.

And definitely give yours another shot. Since this is just vanilla JS, feel free to view source on mine to see how I handled the frame loop if you get stuck.

Yeah the scale difference is crazy. Once you add the Galaxy/CMB velocity, the earth's rotation basically becomes a rounding error.

Good call on the number alignment. I'm using a variable-width font which makes comparing them messy. I'll switch to monospace or tabular-nums in the next push so the magnitudes scan better.

And fair point on the title-'calculator' implies mission planning. Maybe 'travel visualizer' would have been safer!

Show HN: I built a space travel calculator using Vanilla JavaScript

https://cosmic-odometer.vercel.app/

I built this because measuring my age in years felt boring—I wanted to see the kilometers.The first version only used Earth's orbital speed (~30km/s), but the number moved too slowly. To get the "existential dread" feeling, I switched to using the Milky Way's velocity relative to the CMB (~600km/s). The math takes some liberties (using scalar sum instead of vector) to make the speed feel...

( Read More... | 34 comments | 43 points | on HN )