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

    Interface NestedHitOpts<TNode, TPose>

    interface NestedHitOpts<TNode extends { id: string }, TPose> {
        composePose: (parent: TPose, child: TPose) => TPose;
        isGroup?: (id: string, obj: TNode | undefined) => boolean;
        poseBounds?: (pose: TPose) => Bounds;
    }

    Type Parameters

    • TNode extends { id: string }
    • TPose
    Index

    Properties

    composePose: (parent: TPose, child: TPose) => TPose

    Compose a child's local pose into world coords given its parent's world pose. Same shape as composeRectPose (the default expectation).

    isGroup?: (id: string, obj: TNode | undefined) => boolean

    Predicate for "this object is a nesting parent body". The leaf scan skips objects for which this returns true so a click on a parent's painted body resolves to a child leaf, not the parent itself. Default: never (treat every object as hittable).

    poseBounds?: (pose: TPose) => Bounds

    Derive an axis-aligned bounding rect from a (world-space) pose. Default reads x / y / width / height straight off the pose (matches RectPose). Override for non-rect poses (e.g. paths).