weasel API - v0.8.0
    Preparing search index...

    Function rebaseLocalPose

    • Convert worldPose into a local pose expressed under newParentId's frame. Used when reparenting so the child's visual world position is preserved despite the change of frame. Inverse of one compose step.

      decompose(parent, world) returns the local pose child such that compose(parent, child) === world. For axis-aligned rects: child = { ...world, x: world.x - parent.x, y: world.y - parent.y }.

      Pass newParentId === null for the root frame; the function returns worldPose unchanged.

      Type Parameters

      • TPose

      Parameters

      Returns TPose