UNPKG

@playcanvas/react

Version:

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

25 lines (24 loc) 852 B
import { FC } from "react"; import { LightComponent } from "playcanvas"; import { PublicProps, Serializable } from "../utils/types-utils.ts"; /** * The Light component adds a light source to the entity. A light can be a directional, omni, or spot light. * Lights can be moved and orientated with the `position` and `rotation` props of its entity. * * @param {LightProps} props - The props to pass to the light component. * @see https://api.playcanvas.com/engine/classes/LightComponent.html * * @example * <Entity rotation={[0, 10, 0]}> * <Light type="directional" /> * </Entity> */ export declare const Light: FC<LightProps>; interface LightProps extends Partial<Serializable<PublicProps<LightComponent>>> { /** * The type of the light. * @default "directional" */ type: "directional" | "omni" | "spot"; } export {};