PavelDoGreat / WebGL-Fluid-Simulation

Play with fluids in your browser (works even on mobile)
https://paveldogreat.github.io/WebGL-Fluid-Simulation/
MIT License
14.74k stars 1.69k forks source link

Suggestion (i dont know if it's in the right spot this request) #52

Open A3rdn0 opened 4 years ago

A3rdn0 commented 4 years ago

You should add an option to choose how many random splats appear and how often they do. For example: every "x" seconds do "x" number of splats. Or even the possibility do to it in a range. For example: every "x" seconds do "x to y" numbers of splats.

MrUltimate commented 3 years ago

You can do this but just running splatStack.push(parseInt(Math.random() * 20) + 5); with a setTimeout()

emmalexandria commented 2 years ago

For anyone else interested in doing this, pasting something along the lines of setInterval(splatStack.push.bind(splatStack), 500, parseInt(Math.random() * 20) + 5) this into the console will randomly add new splats. The second parameter is the interval in ms, and the third is the number of splats.