UNPKG

react-matter-js

Version:

React adapter for the Matter.js physics engine

24 lines (23 loc) 963 B
import React from 'react'; declare const useClones: () => { dom: React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>[]; svg: React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>[]; }; export default useClones; export declare const cloneKey: unique symbol; export declare const svgKey: unique symbol; export declare const domKey: unique symbol; declare type Clone = { el: React.ReactElement; } & ({ key: typeof domKey; ref: React.RefObject<HTMLElement>; } | { key: typeof svgKey; ref: React.RefObject<SVGElement>; }); declare module 'matter-js' { interface Body { [cloneKey]?: Clone; } }