UNPKG

@react-three/p2

Version:

2D physics based hooks for react-three-fiber

16 lines (15 loc) 588 B
import type { Body, Shape as ShapeType, World } from 'p2-es'; import type { Scene } from 'three'; import { Mesh } from 'three'; export declare type DebugOptions = { autoUpdate?: boolean; color?: number; linewidth?: number; normalIndex?: number; onInit?: (body: Body, mesh: Mesh, shape: ShapeType) => void; onUpdate?: (body: Body, mesh: Mesh, shape: ShapeType) => void; scale?: number; }; export default function CannonDebugger(scene: Scene, world: World, { color, linewidth, normalIndex, onInit, onUpdate, scale }?: DebugOptions): { update: () => void; };