Rendering soft bodies
Based on this demo cool soft bodies demo : https://napephys.com/samples.html
Here is how I build it ( If you know a better way to do it please let me know :) )
If you press space bar, you can see the nape skeleton.
By taking the top left point of each compound, Nape can provide the ‘external Hull’ (red dots) of the soft body.
but we also need to compute the yellow ones in order to draw the texture.
Fortunatly thoses dot are easy to find, as you can see the dot marked C’ is calculated as the symetric image of C on the AB axis
Now we have all the points to map the texture on the shape using the native drawTriangles method.