math docs
    Preparing search index...

    Function addBoneAtBase

    • Prepends a bone at the base end, extending the chain backward.

      This is what a follower grows with: driven by forward alone the base end is the tail.

      joint becomes the joint of the bone that was previously first, because that is the junction the new bone creates. The new first bone's own joint is unused, as always.

      Parameters

      • chain: Chain2

        the chain to prepend to, which must already have at least one bone

      • direction: readonly [number, number]

        the direction the new bone points, from its own start toward the existing chain. Assumed to be unit length

      • length: number

        the length of the new bone

      • joint: Joint2 = ...

        the joint for the junction this creates, or a fresh unconstrained one if omitted

      Returns Bone2

      the prepended bone