/** * SoftBodyGrabController * * Bridges the @grabbable trait to PBD attachment constraints. * When a hand grabs a soft body, finds the closest vertices within * a grab radius, creates attachment constraints with distance-weighted * compliance, and updates their targets each frame as the hand moves. */ import type { IVector3 } from './PhysicsTypes'; import type { PBDSolverCPU } from './PBDSolver'; export interface GrabConfig { /** Maximum number of vertices to grab */ maxVertices: number; /** Grab radius around the hand position */ grabRadius: number; /** Base compliance for attachment (0 = hard, higher = softer) */ baseCompliance: number; /** Compliance scales with distance: compliance = base * (1 + dist/radius * falloff) */ complianceFalloff: number; } export declare class SoftBodyGrabController { private activeGrabs; private config; constructor(config?: Partial); /** * Start grabbing the soft body at the given hand position. * Finds the closest vertices and creates attachment constraints. */ grabStart(handId: string, handPosition: IVector3, solver: PBDSolverCPU): void; /** * Update grab target positions as the hand moves. * Each grabbed vertex follows the hand with its original local offset preserved. */ grabUpdate(handId: string, handPosition: IVector3): void; /** * Release the grab — remove all attachment constraints for this hand. */ grabEnd(handId: string): void; /** * Check if a hand is currently grabbing. */ isGrabbing(handId: string): boolean; /** * Get all active grab hand IDs. */ getActiveGrabs(): string[]; /** * Release all grabs (e.g., when soft body is destroyed). */ releaseAll(): void; } //# sourceMappingURL=SoftBodyGrabController.d.ts.map