Skip to content

Commit

Permalink
Merge pull request #132 from Tresjs/Bugfix/useLegacyLights-needs-reac…
Browse files Browse the repository at this point in the history
…tive

fix(core): watch `useLegacyLights`
  • Loading branch information
alvarosabu authored Feb 28, 2023
2 parents b804c96 + 6665f67 commit 4e0b7c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/tres/src/components/TheExperience.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const state = reactive({
clearColor: '#201919',
shadows: true,
alpha: false,
physicallyCorrectLights: true,
useLegacyLights: true,
shadowMapType: BasicShadowMap,
outputEncoding: sRGBEncoding,
toneMapping: NoToneMapping,
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/tres/src/core/useRenderer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)

Expand Down

0 comments on commit 4e0b7c3

Please sign in to comment.