UNPKG

react-matter-js

Version:

React adapter for the Matter.js physics engine

19 lines (18 loc) 571 B
/// <reference types="react" /> import Matter from 'matter-js'; import { CatKey } from '../util/trackCats'; import { Sizes } from '../util'; declare const _default: import("react").MemoExoticComponent<import("react").ComponentType<Props>>; export default _default; declare type Props = { children: () => Matter.Body; cats?: CatKey[]; bodyRef?: React.MutableRefObject<Matter.Body | null>; sizes?: Sizes; }; export declare const sizesKey: unique symbol; declare module 'matter-js' { interface Body { [sizesKey]: Sizes; } }