One of my favorite childhood memories is liquid timer. I can play with it  for whole afternoon until my mom stopped me.

This code example reminds me liquid timer. Therefore, I decided to implement it.  Here is my first trial with box shape particle. It did not look like liquid.

After googling, I found a Box2D library called LiquidFun.  They’ve already implemented the liquid timer… However, the Wave Machine example has attracted my attention.

How about using Web API  deviceorientation to control liquid flow (by beta and gamma value from mobile device)?

After few hours trying to implement the idea, I still can’t make it fully work.


The reason is

1. need more time…. I should do it early

2. unfamiliar with the liquidfun library and box2D.

3. challenge with change the position of world and get g updated. (it uses joint to rotate body.)

It works with bugs now. I still can not stop the joint rotation.

More to do:  use accelerationWithGravity and acceleration to smooth effect of gravity change.

Link to unfinished demo