3-Body JS Simulation
- 4 Devlogs
- 12 Total hours
Simulating a 3-Body system in 3D using Javascript. Just a simple physics/programming project.
Simulating a 3-Body system in 3D using Javascript. Just a simple physics/programming project.
Added the skeleton of the UI!!! It looks nice right now I think, and you can select which sun you want to edit now. Finished ARROWS with contrast yet cohesion because they are velocity and gravity for each star, so same color and stuff, but different lengths, like clock hands. Worked for so LOOOOOOONG on trails but they just wouldn’t show no matter the debugging I tried so I’m giving up on trails (which I didn’t really need anyways). Just need to make the settings and then we can SHIP this project! YASSSSSSS HOORAY!!!
FINISHED THE 3-BODY PHYSICS!!! Awesome! Then I worked on making all of the simulation settings (already made & newly added) as some neat vars clustered together in the top of the code. After that I started working on the UI, my vision right now is a terminal on the bottom, a banner on the top, and two panels on top of each other on the left, the top one will be the global sim settings and the bottom one will be the selected sun settings. I finished the terminal UI but I need to make it where you can type into it and stuff. Finally, I posted the current version of the unfinished demo onto itch.io! Next I will finish the UI and work on trails + velocity and pull arrows.(Btw, that blue building icon in the screenshot isn’t part of the project, this was made on my school Chromebook so that’s an annoying thing on my screen!)
I was adding three unique yet COHESIVE suns together in a solar system (for our THREE bodies), adding a cluster system to the new procedural background star generation function I replaced the texture with and a color tint (looks more NATURAL), adding coronas to the three suns and removed their textures, working on orbit and zoom (especially the START position and min/max zoom), removed sphere for background since we don’t use a texture for that ANYMORE, cleaned up the code and polished some stuff. Now I can start working on the physics and then the UI after that.
I started by joining Stardance, connecting my project to Hackatime, creating a GitHub codespace, and a repository with it. I began working on the sun, orbit controls with camera, glow through bloom effect, rotation animations, and background. (It’s all 3D)
In fact, I made my first sun sphere (so first body) and then put it INSIDE of a sphere with the looping PNG to achieve a HDRI effect.
Next I will set parameters for the zoom, make three suns, and work on trails + physics. (Which isn’t to be taken lightly cause the physics is going to be CRAZY)
Thank you Stardance for letting me join!
-dkh