Is there a continuous particle generator built-in into LiquidFun?

174 Views Asked by At

Is there a continuous particle generator, meaning a type of functionality where I simply can create a bunch of particles and have them regenerate when they die?

Thanks!

2

There are 2 best solutions below

0
On BEST ANSWER

There is no built in emitter in the LiquidFun source, you have to design your own particle emitters.

However you can have a look at the testbed and use the necessary classes here.

0
On

In Liquidfun examples there is a Faucet demo (testFaucet.js), but unfortunately it does not work in all forks of box2d+liquidfun, due to missing ParticleEmitter class.

I found a working Faucet example in this port of liquidfun:

https://github.com/flyover/box2d.js

Demos:

https://cdn.rawgit.com/flyover/box2d.js/master/Box2D/Build/Testbed/index.html

In the examples there is also Drawing, which adds particles as long as mouse moves, which could maybe eploited to create your own particle emitter.

Unfortunately this port is in a weird "google format" which I don't know how to edit.