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

    Interface ResizePolicy<TPose>

    Adapter dep for resizeAction.

    Carries the four behavior-shaping options the legacy useResize hook exposed through UseResizeOptions: bounds-frame behaviors (e.g. lockAspectWithModifier), world-space anchor-point snap behaviors (e.g. pointSnapToGrid), group-expansion (expandIds), and pose↔bounds projection (geometry).

    Optional in DepSchema: when absent, resizeAction falls back to identity defaults (no behaviors, identity expandIds, RECT_POSE_DESCRIPTOR geometry). Consumers wire the dep via useDepSource('resizePolicy', ...) from any descendant of <DepRegistryProvider> / <SceneCanvas>.

    The generic is erased to unknown at the schema entry; consumers cast at the call site (mirrors the scene entry's convention).

    interface ResizePolicy<TPose> {
        constraints: TPose extends ResizePose
            ? BoundsConstraint<TPose>[]
            : never[];
        expandIds: (ids: string[]) => string[];
        pointSnap: TPose extends ResizePose ? PointSnapBehavior<TPose>[] : never[];
        projection: PoseProjection<TPose>;
    }

    Type Parameters

    • TPose
    Index

    Properties

    constraints: TPose extends ResizePose ? BoundsConstraint<TPose>[] : never[]

    Bounds-frame constraints. Constrained to TPose extends ResizePose since constraints read/write {x,y,width,height}. For non-rect TPose pass [].

    expandIds: (ids: string[]) => string[]

    Group-expansion at gesture start. Identity (ids => ids) when group resize isn't wanted.

    pointSnap: TPose extends ResizePose ? PointSnapBehavior<TPose>[] : never[]

    World-space anchor-point snap behaviors. Same TPose constraint as constraints.

    projection: PoseProjection<TPose>

    Projection from TPose to bounds and back. Use RECT_POSE_DESCRIPTOR for plain rect poses.