Skip to Content
🎉 @playcanvas/react 0.2.1 is released. Read more →

Light

The Light component attaches a Light Component to an Entity. You can position the light source by transforming the parent entity. A light can be directional, omnni, or spot. Each type has different properties and behaviors.

You can add multiple lights to a scene to create a realistic lighting environment.

Usage

import { Light } from '@playcanvas/react/components' const DirectionalLight = (props) => { return <Entity> <Light type="directional" {...props} /> </Entity> }

Any additional props will be passed to the Light Component directly. You can find out more about the Light Component in the PlayCanvas documentation.

Last updated on