I've been working on this tool, mainly to allow it to handle border textures/materials, so here is a demo of it's current state:
Some issues remain unsolved:
1. Weird issues with materials. If you set a Material like SolidBlack, it breaks and the editor freezes. Not sure why. Also, with the Checkerboard material some colors like RGB(0,0,255) make it dissapear.
2. The border polygons don't maintain the parametrized width. That's because the border polygon points are calculated to avoid intersection between border polygons and the length of the lines between outer points and inner points is the border width. That's wrong. The border width should be applied perpendicular to the triangle's outer line. This is a basic geometry issue, I know, but somehow I don't see the solution yet.
3. The border texture is not rotated nor scaled as it should.
4. The code is a mess. It is ugly and dirty and chaotic. Once it works it'll need a heavy refactoring.
5. I made the editor to accommodate the original design (made for editing the ComplexBodies ingame). It should be completely redone when refactoring to allow a better editing experience.
6. Given that this component draws a lot, for performance reasons it should be changed to work directly with the device, instead of the canvas as is does right now.
Points 2 and 3 are the main issues here.
Point 1 is a bug in how I'm drawing things, I guess, so it'll need to be addressed.
Points 4, 5, and 6 should be done at the same time, but if anyone wants to help I could address point 4 before anything else to keep crazyness away. Invited you are
I've updated the repository: https://github.com/YMRYMR/YMR.ComplexBody