LiquidFunProcessing icon indicating copy to clipboard operation
LiquidFunProcessing copied to clipboard

Box2D/LiquidFun Library for Processing.

LiquidFunProcessing

LiquidFunProcessing

Box2D/LiquidFun Library for Processing.

Particle based fluid simulation and rigid body simulation using jBox2D/LiquidFun 2.3.0+.

References

  • LiquidFunProcessing: http://thomasdiewald.com/processing/libraries/liquidfun/reference/index.html
  • jBox2d: http://thomasdiewald.com/processing/libraries/jbox2d-2.3.0/doc/index.html

Tutorials, Readings

  • Box2D: http://www.iforce2d.net/b2dtut
  • LiquidFun: http://google.github.io/liquidfun/Programmers-Guide/html/index.html

Download


LiquidFunProcessing


Videos


Examples

The library includes a lot of examples from the original jbox2d testbed.
For a quick start, each sketch has a couple of default mouse-actions:

  • LMB: drag rigid bodies / particles
  • LMB + SHIFT: shoot a bullet
  • MMB: spawn particles
  • RMB: destroy particles

... as well as some key-mapping, e.g. to display the debug-draw, restart, pause/resume.
Of course, each of those can be altered, overwritten or disabled/removed.


Rendermodes

Default renderer, no postprocessing

particles are rendered as point-sprites and rigid bodies are rendered using the PShape tree structure.

Default


Default renderer + Postprocessing

LiquidFx adds some liquid effect and fake shading. PixelFlow needs to be installed to use it.

LiquidFx


Debug Draw

using the box2d world for rendering and basic processing draw calls.

Debug


Resources

  • jBox2d web: http://www.jbox2d.org/
  • jBox2d Testbed: https://github.com/jbox2d/jbox2d/tree/master/jbox2d-testbed
  • Box2d Testbed: https://github.com/erincatto/Box2D/tree/master/Box2D/Testbed
  • LiquidFun: http://google.github.io/liquidfun/
  • LiquidFun Programmers Guide: http://google.github.io/liquidfun/Programmers-Guide/html/index.html

Installation, Processing IDE

  • Download Processing 3

  • Install liquidFunProcessing via the Library Manager.

  • Or manually, unzip and put the extracted LiquidFunProcessing folder into the libraries folder of your Processing sketches. Reference and examples are included in the LiquidFunProcessing folder.

  • Also make sure you have the latest graphics card driver installed!

Platforms

Windows, Linux, MacOSX


Dependencies, to run the examples

  • PixelFlow: https://github.com/diwi/PixelFlow