diff --git a/playground/auto-imports.d.ts b/playground/auto-imports.d.ts index 9959df651..4259e89c6 100644 --- a/playground/auto-imports.d.ts +++ b/playground/auto-imports.d.ts @@ -1,7 +1,6 @@ /* eslint-disable */ /* prettier-ignore */ // @ts-nocheck -// noinspection JSUnusedGlobalSymbols // Generated by unplugin-auto-import export {} declare global { diff --git a/src/composables/useCamera/index.ts b/src/composables/useCamera/index.ts index d4682b04e..7d3ffc8ba 100644 --- a/src/composables/useCamera/index.ts +++ b/src/composables/useCamera/index.ts @@ -1,4 +1,4 @@ -import { computed, watchEffect, onUnmounted, shallowRef } from 'vue' +import { computed, watchEffect, onUnmounted, ref } from 'vue' import { Camera, OrthographicCamera, PerspectiveCamera } from 'three' import type { TresScene } from '../../types' @@ -8,7 +8,7 @@ import type { TresContext } from '../useTresContextProvider' export const useCamera = ({ sizes, scene }: Pick & { scene: TresScene }) => { // the computed does not trigger, when for example the camera postion changes - const cameras = shallowRef([]) + const cameras = ref([]) const camera = computed( () => cameras.value[0] )