UNPKG

@react-three/p2

Version:

2D physics based hooks for react-three-fiber

15 lines (14 loc) 560 B
import { Mesh } from 'three'; import type { Body, Shape as ShapeType } from 'p2-es'; import type { Scene } from 'three'; export declare type DebugOptions = { normalIndex?: number; color?: number; scale?: number; onInit?: (body: Body, mesh: Mesh, shape: ShapeType) => void; onUpdate?: (body: Body, mesh: Mesh, shape: ShapeType) => void; autoUpdate?: boolean; }; export default function cannonDebugger(scene: Scene, bodies: Body[], { normalIndex, color, scale, onInit, onUpdate, autoUpdate }?: DebugOptions): { update: () => void; };