From 3c9d7ae234d809729f4fbcb64e017977dbbbad56 Mon Sep 17 00:00:00 2001 From: keiya01 Date: Thu, 7 Sep 2023 13:30:18 +0900 Subject: [PATCH] fix(web): override default light --- web/src/beta/lib/core/engines/Cesium/hooks.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/web/src/beta/lib/core/engines/Cesium/hooks.ts b/web/src/beta/lib/core/engines/Cesium/hooks.ts index 42e515cbda..e876ca50bf 100644 --- a/web/src/beta/lib/core/engines/Cesium/hooks.ts +++ b/web/src/beta/lib/core/engines/Cesium/hooks.ts @@ -132,6 +132,16 @@ export default ({ : undefined, intensity: property.light?.lightIntensity, }); + } else { + light = cesium.current?.cesiumElement?.scene.light; + if (light) { + light.color = property?.light?.lightColor + ? Color.fromCssColorString(property.light.lightColor) + : light.color; + light.intensity = property?.light?.lightIntensity + ? property.light.lightIntensity + : light.intensity; + } } return light; }, [