An open API service indexing awesome lists of open source software.

https://github.com/diwi/liquidfunprocessing

Box2D/LiquidFun Library for Processing.
https://github.com/diwi/liquidfunprocessing

box2d liquid liquidfun particlesystem physics processing

Last synced: 3 months ago
JSON representation

Box2D/LiquidFun Library for Processing.

Awesome Lists containing this project

README

          

![LiquidFunProcessing](https://github.com/diwi/LiquidFunProcessing/blob/master/screenshots/examples/diewald_LiquidFunProcessing_Chains.jpg)

# LiquidFunProcessing
**Box2D/LiquidFun Library for Processing.**

Particle based fluid simulation and rigid body simulation using [jBox2D/LiquidFun 2.3.0+](https://github.com/jbox2d/jbox2d).

### 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
+ [Releases](https://github.com/diwi/LiquidFunProcessing/releases)
+ [LiquidFunProcessing Website](http://thomasdiewald.com/processing/libraries/liquidfun)
+ Processing IDE -> Library Manager


![LiquidFunProcessing](https://github.com/diwi/LiquidFunProcessing/blob/master/screenshots/examples/diewald_LiquidFunProcessing_Examples2.jpg)


## Videos

[](https://vimeo.com/223843930 "LiquidFunProcessing - Chains")
[](https://vimeo.com/223843846 "LiquidFunProcessing - Bricks")
[](https://vimeo.com/223843490 "LiquidFunProcessing - WaveMachine")
[](https://vimeo.com/223843609 "LiquidFunProcessing - ParticleTypes")


## Examples
The library includes a lot of examples from the original [jbox2d testbed](https://github.com/jbox2d/jbox2d/tree/master/jbox2d-testbed/src/main/java/org/jbox2d/testbed/tests).

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](https://github.com/diwi/LiquidFunProcessing/blob/master/screenshots/rendermodes/diewald_LiquidFunProcessing_RenderRaw.jpg)


#### Default renderer + Postprocessing

**LiquidFx** adds some liquid effect and fake shading. [PixelFlow](https://github.com/diwi/PixelFlow) needs to be installed to use it.

![LiquidFx](https://github.com/diwi/LiquidFunProcessing/blob/master/screenshots/rendermodes/diewald_LiquidFunProcessing_RenderLiquidFx.jpg)


#### Debug Draw

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

![Debug](https://github.com/diwi/LiquidFunProcessing/blob/master/screenshots/rendermodes/diewald_LiquidFunProcessing_RenderDebug.jpg)


## 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](https://processing.org/download/?processing)
- 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**