DEV Community

Cover image for Solar system with Three.js

Solar system with Three.js

Mykhailo Toporkov 🇺🇦 on August 22, 2024

Hi! Today, I’m going to build a solar system using Three.js. But before we begin, you should know that the inspiration for this article came from a...
Collapse
 
srbhr profile image
Saurabh Rai

Wow, it's a great way to get started with Three Js. Another addition would be if you could explain some functions, how you're using them and the matrix multiplications.

Great work!

Collapse
 
cookiemonsterdev profile image
Mykhailo Toporkov 🇺🇦

Thx! Next time definitely will do!

Collapse
 
srbhr profile image
Saurabh Rai

Sure, I'll be looking forward to it. ^^

Collapse
 
rk_gnanesh profile image
rk gnanesh

Try setting the pixel ratio, it will increase the quality of the rendering.

renderer.setPixelRatio(window.devicePixelRatio);

Collapse
 
cookiemonsterdev profile image
Mykhailo Toporkov 🇺🇦

Good catch! Though the simplest way to improve quality of the rendering is to pass antialias: true in render that will smooth out jagged edges. Updated for both, thx!

Collapse
 
tqbit profile image
tq-bit

Love how the motivation is a con against a flat earther.
Sir this project is awesome, great job

Collapse
 
ben profile image
Ben Halpern

Wow

Collapse
 
tojacob profile image
Jacob Samuel G.

And the moon? :(

Collapse
 
jnp95 profile image
Jean-Noël

Which moon ? There are lot of moons in the solar system :p

Collapse
 
charlesr1971 profile image
Charles Robertson

I was about to say there are a lot of stars, as well, in a solar system! 🤣
Although technically, you can get binary stars 🤔

Thread Thread
 
evan_langloisuudruid74 profile image
Evan Langlois (UUDruid74)

No, there are not a lot of stars in our solar system. Our "solar" system has a single star, the sun, aka sol. The rest of the stars belong to their own solar systems.

Thread Thread
 
prophesierc profile image
Brian Knowles

I guess it's a good thing he said, 'a solar system' and not 'our.'

Thread Thread
 
evan_langloisuudruid74 profile image
Evan Langlois (UUDruid74)

A solar system is only going to have one star unless its a binary system. There are not "a lot of stars ... in a solar system". There is 1, rarely 2.

Collapse
 
charlesr1971 profile image
Charles Robertson • Edited

Here is one I did, of the inner planets, a few years ago, just with jQuery & GSAP:

codepen.io/charles1971/pen/BaNyqYE

Of course, it doesn’t use real 3D, like three.js, so you cannot zoom, pan, tilt or rotate.

I have used three.js before and it is great!

Collapse
 
gourav_sharma profile image
Gourav Sharma

Hello 👋 I am new to ThreeJs and want to build cool and amazing 3D stuff like you but my pc does not support webGL2 and only supports WebGL1 and because of this its been difficult to do follow along any documented projects and Tutorials. I have build some projects with WebGL1 and they are amazing to me. My question is can I use my written scripts to run WebGL2 on some remote server through some application ?? if so please give me URL I need that

Collapse
 
cookiemonsterdev profile image
Mykhailo Toporkov 🇺🇦

I don't see mutch meaning in doing such thing, sice problem in your PC or rather Browser. If the browser does not support the newer version, there is nothing you can do...

Collapse
 
avanichols_dev profile image
Ava Nichols

Wow

Collapse
 
cb86at profile image
Christian

Awesome!

Collapse
 
taranka profile image
Sivak Ihor

U are God)))))))

Collapse
 
shotlom profile image
Sholto Maud

next you can do a vortex model youtube.com/watch?v=0jHsq36_NTU

Collapse
 
spaghetticoderyyz profile image
Marc LP

Wow great job!

Collapse
 
kishore_kevin_63047f1417c profile image
KISHORE kevin

wow really amazing ,, congrats

Collapse
 
roshan_khan_28 profile image
roshan khan

that was great project. can you maybe try the interstellars blackhole next time? that would be a sight to see!

Collapse
 
d1vyanshukumar profile image
divyanshu_Kumar

Wow

Collapse
 
gregory_magnusson profile image
Gregory Magnusson

Very good. Keep exploring.

Collapse
 
articburn profile image
Artic Burn

Wow! Should be try it.

Collapse
 
annavi11arrea1 profile image
Anna Villarreal

Yay! thanks for sharing! I can't wait to learn threejs!

Collapse
 
javicodev11 profile image
Javico11

So good!....

Collapse
 
aimitsumori_noreply_43367 profile image
Aimitsumori Noreply

So good

Collapse
 
vladkens profile image
vladkens

Cool. Reminded me of a very old project I did.

Collapse
 
tarunkumarkale profile image
Tarun kale

Amazing buddy

Collapse
 
ashar_majeed profile image
Ashar Majeed

Good work

Collapse
 
mark-myer profile image
Marcus Myer

Nice work. If you want some more work to do, put in the moons around the planets. :)

Collapse
 
elsyng profile image
Ellis

Chrome only?

Collapse
 
blessedtechie profile image
Blessing Emejulu

This is awesome

Collapse
 
gargeebanerjee profile image
Gargee Banerjee

It looks so cool

Some comments have been hidden by the post's author - find out more