Support no convex shape in Blob addPhysics

I think that need to join shape toggether but that need to be possible (i try a lot but dont work for me), i want to let user draw free shape and add Physics to that shape.

like that:
Create non-convex, complex shapes with Box2D | Emanuele Feronato

ot that:
From PNG to Box2D โ€“ first attempt | Emanuele Feronato

or that:
How to create destructible terrain using Box2D โ€“ step 2 | Emanuele Feronato

Had a peak... looked promising. Have bookmarked it.

2 Likes

The clipper class they use is quite large - clipper-lib/clipper.js at master ยท junmer/clipper-lib ยท GitHub so we will probably not bring it into ZIM but rather see if we can get it to work importing it... we can host a version on our CDN. So seeing if we can recreate the steps here How to create destructible terrain using Box2D โ€“ step 1 | Emanuele Feronato

Maybe with other input like games in ZIM?

It is still 200k (100K minified) and we do not minify games or the other helper parts. I suppose we could but they are 25k for instance. It is easy enough just to import it as well - we will see.

2 Likes