box2d: polygon mode is back#2490
Conversation
|
Interesting that Claude could create a prototype. The code looks great, but of course I'd be interested in more optimized/prettier/human-like versions of this that are more cohesive with the rest of the extension On a side note, I'd be willing to work on getting Scratch.external into this thing. As for an external kripken made an emscripten port of the original C-based Box2d https://github.com/kripken/box2d.js. Same person that ported Ammo physics. I don't know if it's in parity with the version here (probably not) but we should likely just find a way to modularize and minify the library in the extension to host it on this repo |
Screencast_20260517_121458.webm |
|
Most impressive |
|
the state of this one is that it seems to work about as good as one would expect tracing image pixels to work |
|
seems fine to me. I havent checked the full box2d codebase, only the given changes. Does the sillouette to polygon thing cache? If not it would be a good thing to add before merging. |
|
!format |
How it works: https://muffin.ink/slop/polygon.html
tl;dr scan costume pixels to generate polygon instead of relying on actual SVG path elements as the original one from griffpatch
Demonstration of the difference:
Screencast_20260516_223905.webm