planck.js
planck.js copied to clipboard
log an error when a polygon exceeds maxPolygonVertices
I had incomplete shapes:
![Screen Shot 2019-07-04 at 23 23 04](https://user-images.githubusercontent.com/738650/60688116-863d2700-9eb3-11e9-8cd6-f1f3fe9693c7.png)
After some digging I came to this fix:
testbed.maxPolygonVertices = 48; // default is 12
It would be nice when creating a Polygon, e.g.
body.createFixture(pl.Polygon(vecs), 2.0);
That a issue is logged to the console if vecs.size > maxPolygonVertices.