瀏覽代碼

chore(playground): adding missing import and removing the directives that were deprecated

alvarosabu 1 年之前
父節點
當前提交
96960d1427
共有 3 個文件被更改,包括 4 次插入6 次删除
  1. 1 3
      playground/src/pages/basic/Lights.vue
  2. 2 2
      playground/src/pages/basic/index.vue
  3. 1 1
      src/composables/index.ts

+ 1 - 3
playground/src/pages/basic/Lights.vue

@@ -1,6 +1,6 @@
 <script setup lang="ts">
 import type { TresObject } from '@tresjs/core'
-import { TresCanvas, vAlwaysLookAt, vDistanceTo, vLightHelper, vLog, vRotate } from '@tresjs/core'
+import { TresCanvas, vDistanceTo, vLightHelper, vLog } from '@tresjs/core'
 import { BasicShadowMap, NoToneMapping, SRGBColorSpace } from 'three'
 
 import { OrbitControls } from '@tresjs/cientos'
@@ -24,14 +24,12 @@ const planeRef: Ref<TresObject | null> = ref(null)
   >
     <TresPerspectiveCamera
       v-distance-to="planeRef"
-      v-rotate
       :position="[3, 3, 3]"
     />
     <OrbitControls />
 
     <TresDirectionalLight
       v-light-helper
-      v-always-look-at="[8, 16, 0]"
       :position="[0, 8, 4]"
       :intensity="0.7"
       color="yellow"

+ 2 - 2
playground/src/pages/basic/index.vue

@@ -1,7 +1,7 @@
 <script setup lang="ts">
 import { BasicShadowMap, NoToneMapping, SRGBColorSpace } from 'three'
 import { reactive, ref } from 'vue'
-import { TresCanvas } from '@tresjs/core'
+import { TresCanvas, useRenderLoop } from '@tresjs/core'
 import { OrbitControls } from '@tresjs/cientos'
 
 const state = reactive({
@@ -50,7 +50,7 @@ const sphereExists = ref(true)
     v-bind="state"
   >
     <TresPerspectiveCamera
-      :position="[5, 5, 5]"
+      :position="[11, 11, 11]"
       :fov="45"
       :near="0.1"
       :far="1000"

+ 1 - 1
src/composables/index.ts

@@ -1,5 +1,5 @@
 export * from './useCamera/'
-export * from './useRenderLoop/'
+export * from './useRenderLoop'
 export * from './useRenderer/'
 export * from './useLoader'
 export * from './useTexture'