Hello I recently came across this library for creating straight skeletons. It left me wondering if there is anything similar implemented for three.js, more specifically the offset and extrusion functionalities outlined here.
I know there are some simple offsetting out there, including three’s own extrudeGeometry, however I haven’t seen anything nearly as robust, and able to handle holes and weighted skeletons like this.
A bit rude bro. If you’re gonna ask people to share things, you might want to explain why you want/need to see it or at least give some positive feedback.
A straight skeleton algorithm that works well for any polygonal shape (including holes, self-intersections, concavities) is hard to do. There are too many special cases that must be resolved. I’m not aware of implementation specific to Three.js. Generally, such algorithm could (and should) be designed to be independent on any graphical/rendering system.
So, my suggestion is to look for JavaScript implementations of the straight skeleton algorithm and experiment whether any of them works fine with Three.js.
I made a quick search and this algorithm implementation in TypeScript came up. It is for unweighted skeletons, but reportedly, supports holes: