Recreating 'FallingShapes" demo in P2.js

Hi,

I am trying recreate “fallingShapes” demo (https://github.com/playcanvas/engine/tree/master/examples/physics/falling_shapes) in P2.js.

Here is the somewhat working source code, https://github.com/goldenratio/playcanvas_demos/blob/master/src/falling_shape_p2.js.html
and live demo here, https://goldenratio.github.io/playcanvas/src/falling_shape_p2.js.html

I am unable to get “restitution” (bounce) on sphere to work. Any help is appreciated.

The p2material script is still not fully implemented:

The integration library needs a little further work in that area before material properties like restitution and friction are fully supported, it seems.