This adds a bit of debugging information on mouseover.
For example, a tooltip with the text `bird@tail.arm[0]` can be interpreted as "a bird symbol attached to the tail symbol's first arm attachment point."
The implementation is a bit funky: we basically annotate the SVG DOM with various `data` attributes, and on mouseover we traverse the DOM from the element the mouse is over all the way up to the SVG root element, picking out relevant `data` attributes and building a tooltip out of it. This ended up being easier than e.g. passing a bunch of props down the whole tree in React.
This fixes#21 by changing the existing "tail" attachment point (`#ff0000`) to be called the "anchor" attachment point, since that's primarily what we're using it for. It also adds a brand-new "tail" attachment point with color `#be0027`, which is expected to be oriented in the direction the tail should point (not the _opposite_ direction of the tail, which is how the old tail attachment point was oriented).
Note that this change means, for now, that no symbols have tail attachment points. An error will be logged in the console when viewing the "Creature!" page for now because of this (since the default composition attaches a symbol to the tail), but as soon as Nina updates the SVGs, this should go away.
Here we attempt to use arrowhead symbols in SVGs to allow artists to specify the orientation of attached symbols, rather than attempting to auto-detect it via projecting the circles onto the shape and using the normal as we did in #2.
It seems like this logic is both much simpler and less error-prone, especially around corners. It also gives artists much more control over the placement of attachments.
The one fragile aspect of the implementation is that we assume the first point of the arrow shape is its tip, and that the third point is its indented bottom. This appears to be consistent across all of Nina's SVGs, so far at least...
This auto-detects the direction of normals on which to attach attachments.
Right now it's getting very confused by corners, but otherwise it seems to mostly work.