瀏覽代碼

chore: remove PbrSphere component and its references from NoCamera and multipleCameras pages

alvarosabu 1 月之前
父節點
當前提交
0e8ac2b8bd

+ 0 - 39
playground/vue/src/components/PbrSphere.vue

@@ -1,39 +0,0 @@
-<!-- eslint-disable max-len -->
-<script setup lang="ts">
-import { type TresInstance, useRenderLoop, useTexture } from '@tresjs/core'
-
-const sphereRef: Ref<TresInstance | null> = ref(null)
-
-const { onLoop, resume } = useRenderLoop()
-resume()
-onLoop(({ elapsed }) => {
-  if (sphereRef.value) {
-    sphereRef.value.position.y = Math.sin(elapsed * 0.2) * 2.0
-  }
-})
-
-const pbrTexture = await useTexture({
-  map: 'https://raw.githubusercontent.com/Tresjs/assets/main/textures/black-rock/Rock035_2K_Displacement.jpg',
-  displacementMap:
-    'https://raw.githubusercontent.com/Tresjs/assets/main/textures/black-rock/Rock035_2K_Displacement.jpg',
-  roughnessMap: 'https://raw.githubusercontent.com/Tresjs/assets/main/textures/black-rock/Rock035_2K_Roughness.jpg',
-  normalMap: 'https://raw.githubusercontent.com/Tresjs/assets/main/textures/black-rock/Rock035_2K_NormalGL.jpg',
-  ambientOcclusion:
-    'https://raw.githubusercontent.com/Tresjs/assets/main/textures/black-rock/Rock035_2K_AmbientOcclusion.jpg',
-})
-
-// eslint-disable-next-line no-console
-console.log('sphereRef', getCurrentInstance())
-</script>
-
-<template>
-  <TresMesh
-    ref="sphereRef"
-    :position="[-2, 2, 2]"
-    :scale="1"
-    cast-shadow
-  >
-    <TresSphereGeometry :args="[1, 500, 500]" />
-    <TresMeshStandardMaterial v-bind="pbrTexture" />
-  </TresMesh>
-</template>

+ 0 - 3
playground/vue/src/pages/cameras/NoCamera.vue

@@ -32,9 +32,6 @@ const useOwnCamera = ref(false)
           <TresMeshToonMaterial color="cyan" />
         </TresMesh>
 
-        <Suspense>
-          <PbrSphere />
-        </Suspense>
         <TresDirectionalLight
           :position="[0, 2, 4]"
           :intensity="1"

+ 0 - 3
playground/vue/src/pages/cameras/multipleCameras/index.vue

@@ -78,9 +78,6 @@ const activeCameraUuid = computed(() => cameraUuidList.value[activeCameraIndex.v
       <TresMeshToonMaterial color="cyan" />
     </TresMesh>
 
-    <Suspense>
-      <PbrSphere />
-    </Suspense>
     <TresDirectionalLight
       :position="[0, 2, 4]"
       :intensity="1"