How to draw Liquid fun particles in Processing

edited April 16 in Library Questions

Apologies if I have asked this question already but I don't think it was submitted so...

I think what I am trying to do is simple but it's pretty hard to find any documentation... All I want to do is to see particles on the screen using the liquidfun library although to find examples of how to use this is not straightforward.

Can anyone just show me the code for drawing liquidfun particles on a screen in Processing....so far I have got:

void setup(){ size(1040,1060); smooth(); CircleShape shape = new CircleShape(); shape.m_p.set(0, 30); shape.m_radius = 20; ParticleGroupDef pd = new ParticleGroupDef(); pd.flags = ParticleType.b2_waterParticle; pd.shape = shape; box2d.world.createParticleGroup(pd); }

void draw(){ background(255); } but I don't know how to actually see the particles on the screen.

Tagged:

Answers

  • can you look at the documentation or look at the examples...? in draw you would need something like display in a for loop or so

  • edited April 16

    @sabastiz --

    Your code example doesn't include the Liquid Fun / liquidfun library in the top line using an import statement -- you can't use a library correctly if you aren't even using the library at all!

    Is liquidfun a Processing library? Please share a link to the library if you want help from forum members -- I'm not familiar with it, it isn't in the Contributions Manager or listed on the Libraries page, and the only related mention on the forum ("LiquidFun") seems to link to a Google C++ library.

    https://forum.processing.org/two/discussion/10980/liquidfun/

Sign In or Register to comment.