alvarosabu 2 éve
szülő
commit
968d394060

+ 4 - 9
packages/cientos/src/core/useCientos.ts

@@ -1,6 +1,6 @@
 import { useTres } from '@tresjs/core'
-import { inject, watch } from 'vue'
-
+import { inject } from 'vue'
+import { useLogger } from '/@/composables'
 /**
  * Allows to use and extend the state of the core package.
  *
@@ -8,19 +8,14 @@ import { inject, watch } from 'vue'
  * @return {*}
  */
 export function useCientos() {
+  const { logWarning } = useLogger()
   const { state, setState } = inject('useTres', useTres())
   const extend =
     inject<(objects: any) => void>('extend') ||
     (() => {
-      console.warn('No extend function provided')
+      logWarning('No extend function provided')
     })
 
-  watch(
-    () => state,
-    () => {
-      console.log('cientos state changed', state)
-    },
-  )
   return {
     state,
     setState,

+ 1 - 1
packages/tres/src/components/TresCanvas.ts

@@ -1,4 +1,4 @@
-import { defineComponent, h, PropType, ref, watch } from 'vue'
+import { defineComponent, h, ref, watch } from 'vue'
 import * as THREE from 'three'
 import { ShadowMapType, TextureEncoding, ToneMapping } from 'three'
 import { createTres } from '/@/core/renderer'