UNPKG

@playcanvas/react

Version:

A React renderer for PlayCanvas – build interactive 3D applications using React's declarative paradigm.

20 lines (19 loc) 519 B
import { AppBase, Entity, Script } from 'playcanvas'; /** * This hook is used to create a script component on an entity. * @param scriptConstructor - The constructor for the script. * @param props - The props for the script. * * @example * const script = useScript(MyScript, { * myProperty: 'value', * }); */ export declare const useScript: (scriptConstructor: new (args: { app: AppBase; entity: Entity; }) => Script, props: Props) => void; interface Props { [key: string]: unknown; } export {};