Particle Sandbox using Javascript banner

Particle Sandbox using Javascript

8 devlogs
5h 24m 9s

A simple physics particles simulation sandbox that is made using javascript.
have fun tinkering with the particles and their properties!!

readme link:https://github.com/koderDev/particle-sandbox/blob/main/README.md

This project uses AI

I have used Claude for the debugging the resolveCollisions function and for making the panel UI look good.

Demo Repository

Loading README...

Anuj Sapkota
  • add a line mode which is toggled by ‘l’, it connects the particles which are near to each other by a line. this helps in viewing the connections between the particles more effectively, and looks cool ;)

  • tried adding a cannon system (trajectory path projection for particles). in other words, tried making the particles have angry birds like projectile trajectory but failed miserably and dropped the idea. will surely get back to this feature in near future. for now, i am kicking this idea out from this project.

Attachment
0
Anuj Sapkota
  • add a gravity flip mode which flips the gravity of the game so that the particles fall upwards leading to more chaos in the particle simulation ;)
Attachment
0
Anuj Sapkota
  • improve the blackhole mode ( make it more interactive and fun by adding particles rotating around the blackhole as if they were being pulled in by the blackhole but trying to esacpe it)

  • add merge mode (particles having similar colors (hue values) merge into a new larger particle of a new larger size). no need to worry about particles stacking up, just hit ‘m’ for merge mode and a lot of particles are gone ;)

Attachment
0
Anuj Sapkota
  • add story mode since a lot of the voters requested for it. it is toggled by ‘s’. when toggled, it displays various quotes in the middle of the screen which fade in/out to give a soothing vibe to the player.

  • add trail mode which simply shows the trails of each and every particles. the more trails the more fun ;) (toggled by ‘t’)

Attachment
0
Anuj Sapkota

add blackhole mode to particle sandbox. the cursor acts as a black hole and sucks in the particles demolishing them and taking them to the unknown world in the black hole. click b/B for black hole mode. have fun simulating particles!!

Attachment
0
Anuj Sapkota

Shipped this project!

I built a physics particle simulation using Javascript!! I learned how to work with 2d canvas in Js while building this project. Adding collisions was quite hard but did it with the help of the resources in the internet and claude. Very happy to see how it turned out! My goal is to make it sth like mrdoob’s simulators which I used to be fascinated playing, a few years before.

Anuj Sapkota

changed the UI of the panel to make it a bit minimal and simpler. used Space Grotesk font for more of a sandbox vibe. abstract the unimportant things from the labels of the sliders to include one word label for each slider e.g. gravity, friction, spawn, size

Attachment
0
Anuj Sapkota

made a simple particle sandbox system, in which the particles can be simulated using sliders that control gravity, their damping /friction, amount of particles to be spawned and size of particles.

Attachment
0