Back to Deck Gl

CameraLight (Experimental)

docs/api-reference/core/camera-light.md

9.3.21.0 KB
Original Source

CameraLight (Experimental)

CameraLight is a special point light source which always emits from the camera position.

<div align="center"> <div>
<p><i>Two spheres with camera light</i></p>
</div> </div>

Usage

Create an camera light source.

js
import {_CameraLight as CameraLight} from '@deck.gl/core';

new CameraLight({
  color: [255, 255, 255],
  intensity: 1
});

constructor

The constructor for the CameraLight class. Use this to create a new CameraLight.

js
const cameraLight = new CameraLight({color, intensity});
  • color - (number[3]) RGB color of camera light source, default value is [255, 255, 255].
  • intensity - (number) Strength of camera light source, default value is 1.0.

Source

/modules/core/src/effects/lighting/camera-light.ts