hunar4321 / particle-life

A simple program to simulate artificial life using attraction/reuplsion forces between many particles
MIT License
2.93k stars 291 forks source link

Update particle_life.html #35

Closed AnasQiblawi closed 1 year ago

AnasQiblawi commented 1 year ago

Untitled Untitled1

hunar4321 commented 1 year ago

Great Job, thanks

dangarfield commented 1 year ago

Hi, drawing the atoms as circles does create a performance penalty, it drops down to 25 fps for me with the default settings. Could I suggest that you parameterise it? (As you did perfectly with the drawLines).

I would dare say that if the default settings fall below 30 fps, it's probably not a great idea without a flag. I could have a look, two options are to use three.js and dedicated shaders as they are much performant when using webgl. Additionally, using web workers or gpu.js to execute the positions through applyRules would give us a lot more choice

AnasQiblawi commented 1 year ago

Ok, I'll make a new folder in the GUI for drawing customization and add them there as options