diff --git a/src/composables/useRenderer/index.ts b/src/composables/useRenderer/index.ts index b8c6ba948..883ed8669 100644 --- a/src/composables/useRenderer/index.ts +++ b/src/composables/useRenderer/index.ts @@ -1,6 +1,6 @@ import { Color, WebGLRenderer } from 'three' import { rendererPresets, RendererPresetsType } from './const' -import { shallowRef, watchEffect, onUnmounted, type MaybeRef, computed, watch, ShallowRef } from 'vue' +import { shallowRef, watchEffect, onUnmounted, type MaybeRef, computed, watch, ShallowRef, triggerRef } from 'vue' import { toValue, unrefElement, @@ -141,6 +141,7 @@ export function useRenderer( watch(webGLRendererConstructorParameters, () => { renderer.value.dispose() renderer.value = new WebGLRenderer(webGLRendererConstructorParameters.value) + triggerRef(renderer) }) watchEffect(() => {