179 points · by cryptography · 4y ago · 77 comments
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.
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!
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.
I was actually going to add that to my post, but then figured another commenter would prefer to have the pleasure. ;)
This 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.
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.
More planets, more space stations coming soon. Stay tuned!:)
Just put a "Best Viewed in Chrome" animated gif at the bottom to cover your butt!
it has this stuff defined under classes pretty well
yeah, OP is going to have to learn these CSS media queries (or use a framework with everything already defined) like they said.
esp
https://eyes.nasa.gov/apps/orrery/#/home
You should apply to work on these tools here at JPL as often as you can. the application queue is occasionally flushed but new jobs are posted all the time.
It also seems like there's technical problems that are unique to Mars, and technical problems that are unique to the moon. For example, landing on the moon can only really be done propulsively due to the lack of atmosphere. On Mars, though, there's atmosphere to aero-brake with. Or, insulation is relatively easy on the moon because of the lack of convection and conduction, while it's really difficult on Mars despite the temperature swings being considerably less severe.
But like everything else, there is some truth to this that without a base on the Moon, the possibility of facing unpleasant surprises on Mars is even more. Additional to the experiments in 'Mars-like' places on the Earth, it would add more value by making similar experiences in outer space such as on the Moon.
Agree with you that Mars introduces technical challenges (like the atmospheric ones you mentioned) that are not specific to the Moon.
IMO, also the spacecraft aiming to travel to Mars (such as 'Starship') should prove their reliability to the distances that have already been traveled (like ISS, Moon) before sending them to unknown territories.
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.
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
Hopefully soon I'll be able to integrate it to some open APIs (showing real ISS location). Thanks!
It's gone stale and has some visual glitches, but should still mostly work. (source https://github.com/bpodgursky/uncharted)
Well...maybe I should add a new category (work-in-progress launch sites). Noted;)
Let me know if your screen is black for this game as well.
The space travel site works on desktop Firefox but I can only click and drag. I didn't find any way to zoom. Basically I'm stuck on the objects I can see: Earth, Moon and Mars. But I didn't even looked for help in the other comments. Got work to do now.
Thanks for answering :-)
Edit: oh it suddenly shot up to 60 fps. Weird
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?
https://spacejunkisforever.bandcamp.com/album/space-junk-is-...
https://archive.org/details/d64_Visible_Solar_System_1982_Co...