From 6665f67511467627255a6ecc96d3f152d0d50751 Mon Sep 17 00:00:00 2001 From: Randysheng Date: Tue, 28 Feb 2023 14:32:12 +0800 Subject: [PATCH] fix(core): watch `useLegacyLights` --- packages/tres/src/components/TheExperience.vue | 6 +++--- packages/tres/src/core/useRenderer/index.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/tres/src/components/TheExperience.vue b/packages/tres/src/components/TheExperience.vue index 3d1128d2e..c93053ade 100644 --- a/packages/tres/src/components/TheExperience.vue +++ b/packages/tres/src/components/TheExperience.vue @@ -27,7 +27,7 @@ const state = reactive({ clearColor: '#201919', shadows: true, alpha: false, - physicallyCorrectLights: true, + useLegacyLights: true, shadowMapType: BasicShadowMap, outputEncoding: sRGBEncoding, toneMapping: NoToneMapping, @@ -44,8 +44,8 @@ pane.addInput(state, 'clearColor', { pane.addInput(state, 'shadows', { label: 'Shadows', }) -pane.addInput(state, 'physicallyCorrectLights', { - label: 'physicallyCorrectLights', +pane.addInput(state, 'useLegacyLights', { + label: 'useLegacyLights', }) pane diff --git a/packages/tres/src/core/useRenderer/index.ts b/packages/tres/src/core/useRenderer/index.ts index 41e44f570..7e931dbde 100644 --- a/packages/tres/src/core/useRenderer/index.ts +++ b/packages/tres/src/core/useRenderer/index.ts @@ -238,7 +238,7 @@ export function useRenderer(canvas: MaybeElementRef, container: MaybeElementRef, watch([aspectRatio, pixelRatio], updateRendererSize) watch( - [shadows, shadowMapType, outputEncoding, physicallyCorrectLights, toneMapping, toneMappingExposure, clearColor], + [shadows, shadowMapType, outputEncoding, useLegacyLights, toneMapping, toneMappingExposure, clearColor], updateRendererOptions, )