UNPKG

@playcanvas/react

Version:

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

21 lines (20 loc) 735 B
import { FC } from "react"; import { ElementComponent } from "playcanvas"; import { PublicProps, Serializable } from "../utils/types-utils.ts"; /** * The Screen component allows an entity to render a 2D screen space UI element. * This is useful for creating UI elements that are rendered in screen space rather than world space. * * @param {ElementProps} props - The props to pass to the screen component. * @see https://api.playcanvas.com/engine/classes/ElementComponent.html * * @example * <Entity> * <Screen screenSpace={true} /> * <Element>Hey</Element> * </Screen> * </Entity> */ export declare const Element: FC<ElementProps>; type ElementProps = Partial<Serializable<PublicProps<ElementComponent>>>; export {};