Skip to main content

CameraLight (Experimental)

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

Two spheres with camera light

Usage

Create an camera light source.

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.

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