Function: pair()
lifecycle-kit / forms / pair
Function: pair()
pair(
unit,params):Path
Defined in: forms/rules/pair.ts:47
Emit a left/right mirrored pair of a unit appendage at an attachment point.
The unit appendage is authored pointing away from the body along +y; pair
translates it into place and reflects the second copy across the body's long
axis, so a leg drawn once becomes bilaterally symmetric for free rather than
needing to be authored twice.
Which axis
path.ts fixes the convention that a body's long axis runs along +x, and
repeat callers lay bodies out that way. The plane of bilateral symmetry
therefore CONTAINS the x axis, so mirroring to the other side negates y and
leaves x alone. Both members keep their station along the body: a foreleg
mirrors to the opposite foreleg, not to a hindleg.
This rule originally mirrored across x instead, which negates the along-body coordinate. Both members came out sharing a y and straddling the origin in x — one at the head end, one at the tail end, both on the same side of the animal. Every existing test still passed, because none of them asserted which axis separated the two members; it took drawing a creature to see it.