Show HN: I made a site where you can travel in space in your browser (spaceinbrowser.com)
The celestial bodies are Three.JS meshes.
I used loaders (namely 'useLoader' from R3F and 'GLTFLoader' from 3JS) to import 3D models, such as International Space Station. More on loading models in R3F: https://docs.pmnd.rs/react-three-fiber/tutorials/loading-mod...
I've future plans for this side project. It would be great to hear from the HN community before diving into them. Enjoy!
P.S: Getting an empty (probably black) screen? This app shows up in browsers that support WebGL2.0 (most modern browsers do). Check this site to see whether your browser supports WebGL2.0: https://get.webgl.org/webgl2/
P.S.S: There'll probably be responsive design issues. I'd highly encourage you to use a desktop version or rotate to landscape while using a mobile version.
81 comments
[ 4.2 ms ] story [ 119 ms ] threadThis is similar in concept to the Celestia: https://celestia.space/ Celestia has been around for years so the spaceinbrowser site can't really compare in terms of features. But being able to run in a browser rather than having to download and install a desktop application makes it so much more accessible.
The effort put into performance optimization shows. I'd love to see more planets added.
More planets, more space stations coming soon. Stay tuned!:)
So far I'm happy with R3F, but it's even more powerful when you can build your own 3D models (in engines like 'Blender' for instance) and integrate them into the canvas.
Windows doesn't autohide scrollbars like mac, so the infobox you get these big always shown empty scrollbars. See: https://ibb.co/SxBvfZS Also, when I click around, the logo image also occasionally gets selected due to rapid clicking and moving.
Consider adding css to change overflow-y to auto on the infobox rather than scroll, and user-select: none; to the canvas element.
The relative sizes are super inaccurate. I know you know this, and I know in many ways it helps to have them be inaccurate so you can find anything in space, but the Earth and Moon look to be almost touching. In actuality, you can nearly fit every single planet in the solar system in a line between the Earth and Moon.
It's slightly more accurate when you click on the Earth, but the solar system view they look like they're nearly touching.
Also, small nit-pick, but I wouldn't use the term "dark side of the moon," and you also deepen this misconception by having it be literally dark and need to be lit up using a light bulb. The "far side of the moon" (better terminology) gets just as much light as the near side.
When it comes to the distance between the Moon and the Earth, I think the problem there is more about the sizes of them rather than distance.
Agree with "far side". I'll change it, let's not mislead people:) Thanks for the comment. Very helpful!
I was actually going to add that to my post, but then figured another commenter would prefer to have the pleasure. ;)
It seems like the near side of the moon could theoretically get more light on average. When light travels through the fringe of the Earth's atmosphere, it will diffuse and refract a bit. To some extent, some of that light will end up hitting the moon when it otherwise wouldn't have had the Earth not been there.
Hopefully soon I'll be able to integrate it to some open APIs (showing real ISS location). Thanks!
it has this stuff defined under classes pretty well
Just put a "Best Viewed in Chrome" animated gif at the bottom to cover your butt!
Cool site though, very fun example of what can be accomplished in a browser.
yeah, OP is going to have to learn these CSS media queries (or use a framework with everything already defined) like they said.
https://spacejunkisforever.bandcamp.com/album/space-junk-is-...
One hint: just imagine using your digital signature (NFT or whatever you call it) and traveling in space with your VR devices in your browser? Sounds cool?! This is where this project is heading to.
I have no idea what this means...
Same bit of confusion as above, and by your name being 'cryptography' I guess I'm just hoping this isn't a planet-based NFT project :(
Are you sure you didn't want to spend a little bit more time on it before showing it off?
Edit: oh it suddenly shot up to 60 fps. Weird
https://archive.org/details/d64_Visible_Solar_System_1982_Co...
It's just the beginning of the journey for SpaceInBrowser. If you would like to know about the upcoming developments, consider following SIB's Twitter account: https://twitter.com/spaceinbrowser
Well...maybe I should add a new category (work-in-progress launch sites). Noted;)