import { type BodyHandle, type BodyKind, type BodyShape, type JointDesc, type JointHandle, type PhysicsBackend, type PhysicsBackendConfig } from "./physicsBackend.js"; import { type PhysicsBounds, type PhysicsPrecision } from "./physicsWorld.js"; /** Construction options: the `PhysicsWorld` capacity and bounds plus the shared backend config. */ export interface PhysicsWorldBackendOptions extends PhysicsBackendConfig { capacity: number; bounds: PhysicsBounds; precision?: PhysicsPrecision; friction?: number; restitution?: number; /** Warn (once) when a body asks for rotation or a shape this backend approximates. Default `true`. */ warn?: boolean; } interface SavedBody { handle: BodyHandle; shape: BodyShape; kind: BodyKind; layers: number; mask: number; userData: unknown; mass: number; position: [number, number, number]; velocity: [number, number, number]; sleeping: boolean; linearDamping?: number; } /** Serializable backend state: every live body and joint, with handles preserved. */ export interface PhysicsWorldBackendState { nextHandle: number; nextJoint: number; bodies: SavedBody[]; joints: { handle: JointHandle; desc: JointDesc; }[]; } /** * `PhysicsWorld` behind the {@link PhysicsBackend} interface: zero dependencies, translation-only. Capsules, * convex hulls, meshes, and heightfields collide as their bounding boxes; rotation, angular velocity, CCD, and * hinge limits are accepted and ignored (see {@link PhysicsBackend.capabilities}). Reach for `@jgengine/rapier` * when a game needs those for real; the seam is the same. * * @capability physics-world-backend the zero-dependency PhysicsWorld solver exposed through the PhysicsBackend seam */ export declare function createPhysicsWorldBackend(options: PhysicsWorldBackendOptions): PhysicsBackend; export {};