Light
The Light component allows an Entity to emit light. When attached to an Entity, the light can be positioned and oriented using the entity’s transform. Lights can be directional, point, or spot.
Usage
directional-light.jsx
import { Light } from '@playcanvas/react/components'
const DirectionalLight = (props) => {
return <Entity>
<Light type="directional" {...props} />
</Entity>
}Props
The following props are based on PlayCanvas version 2.11.8. This documentation is automatically generated from the TypeScript types of the installed PlayCanvas package.
Last updated on