Using Effects | deck.gl

import {Deck, AmbientLight, SunLight, LightingEffect} from '@deck.gl/core';

// create an ambient light
const ambientLight = new AmbientLight({
color: [255, 255, 255],
intensity: 1.0
});
// create directional light from the sun
const directionalLight = new SunLight({
timestamp: Date.UTC(2024, 7, 1, 22),
color: [255, 255, 255],
intensity: 1.0,
});
// create lighting effect with light sources
const lightingEffect = new LightingEffect({ambientLight, directionalLight});

const deckInstance = new Deck({
initialViewState: {
longitude: -122.4,
latitude: 37.8,
zoom: 11,
pitch: 45
},
controller: true,
// Add lighting effect to deck
effects: [lightingEffect]
});