Skip to content

Commit 768578a

Browse files
committed
chore: remove unused onControlChange function in on-demand.vue
- Eliminated the onControlChange function as it was no longer necessary, simplifying the component's logic. - Updated OrbitControls to remove the change event listener, streamlining the rendering process.
1 parent 8720828 commit 768578a

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

playground/src/pages/postprocessing/on-demand.vue

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ function onRender() {
1313
}
1414
1515
const canvas = ref<InstanceType<typeof TresCanvas>>()
16-
17-
function onControlChange() {
18-
canvas.value?.context?.renderer.invalidate()
19-
}
2016
</script>
2117

2218
<template>
@@ -30,7 +26,7 @@ function onControlChange() {
3026
:position="[5, 5, 5]"
3127
:look-at="[0, 0, 0]"
3228
/>
33-
<OrbitControls @change="onControlChange" />
29+
<OrbitControls />
3430
<TresMesh
3531
:position="[-3.5, 1, 0]"
3632
>

0 commit comments

Comments
 (0)