@react-three/p2
Version:
2D physics based hooks for react-three-fiber
24 lines (23 loc) • 688 B
TypeScript
import React from 'react';
import type { DebugOptions } from './p2-debugger';
import { Scene } from 'three';
import type { Body } from 'p2-es';
declare type DebugApi = {
update: () => void;
};
export declare type DebuggerInterface = (scene: Scene, bodies: Body[], props?: DebugOptions) => DebugApi;
export declare type DebugInfo = {
bodies: Body[];
refs: {
[uuid: string]: Body;
};
};
export declare type DebugProps = {
normalIndex: number;
children: React.ReactNode;
color?: number;
scale?: number;
impl?: DebuggerInterface;
};
export declare function Debug({ normalIndex, color, scale, children, impl, }: DebugProps): JSX.Element;
export {};