I started working on a small fluid simulation in Three.js just for learning. Originally, this was really just meant to be a test project and something fun to mess around with, but after working on it a bunch I decided I want to keep developing it and eventually turn it into something interesting.
So far I’ve built basic SPH simulation and got particles interacting with each other. I also implemented spatial hashing to make everything more efficient which just avoids checking every particle against every other particle. This improved the performance a lot especially with a lot of particles.
I also added configurable simulation parameters such as gravity, pressure, particle count, etc to make testing easier. I also worked on the particles like befoe they were just blue circles but right now they change their color based on speed which I implemented by adding a shader.
Right now, it still needs a bunch of work. There are bugs I need to fix and generally make the physics better. Next, I want to make the particles interactive something like click to move them type thing for testing. After, I’ll work on improving the physics, fixing bugs, and finally make stuff 3D.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.