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

    Interface UseRotateOptions<TPose>

    interface UseRotateOptions<TPose> {
        behaviors?: TPose extends RotatedPose ? RotateBehavior<TPose>[] : never;
        debug?: DebugSink;
        geometry?: RotateGeometry<TPose>;
        handleHitRadius?: number;
        onGestureEnd?: (committed: boolean) => void;
        onGestureStart?: (id: string) => void;
        pivot?: "each" | "union";
        rotateLabel?: string;
        rotationHandleDistance?: number;
        transient?: boolean;
    }

    Type Parameters

    • TPose
    Index

    Properties

    behaviors?: TPose extends RotatedPose ? RotateBehavior<TPose>[] : never

    Behaviors are typed against the pose shape; the kit ships none yet (rotation snap behaviors are deferred). For non-rect TPose, behaviors are typed never until you supply a geometry.

    debug?: DebugSink

    Optional debug sink. When supplied, records the rotation-handle position + circular hitbox at gesture start. Tree-shakes via optional-chain when omitted.

    geometry?: RotateGeometry<TPose>

    Project pose ↔ rotated bounds. Defaults to the identity for RotatedPose. Required for non-rect TPose (e.g. a rotated path).

    handleHitRadius?: number

    Hit-test radius for the rotation handle, in screen pixels. Used for the recorded debug hitbox circle. Default 8.

    onGestureEnd?: (committed: boolean) => void
    onGestureStart?: (id: string) => void
    pivot?: "each" | "union"

    Multi-selection pivot mode. Default 'union'.

    • 'each': each item rotates around its own center.
    • 'union': each item rotates around the selection's union center; item centers orbit the union center while also gaining the same rotation delta. Has no effect on single-id gestures.
    rotateLabel?: string
    rotationHandleDistance?: number

    World-pixel distance from the AABB top edge to the rotation handle. Used for debug-recording the handle position. Default DEFAULT_ROTATION_HANDLE_DISTANCE.

    transient?: boolean

    Reserved; rotate is never transient in practice. Ignored.