Ver Fonte

refactor(Lights.vue): simplify renderer configuration and update camera position

- Removed unnecessary properties from the `gl` configuration object to streamline the renderer setup.
- Updated the camera position for improved scene visibility.
- Cleaned up the template by removing unused directives, enhancing code clarity and maintainability.
alvarosabu há 3 meses atrás
pai
commit
171f594d3c
1 ficheiros alterados com 2 adições e 11 exclusões
  1. 2 11
      playground/vue/src/pages/basic/Lights.vue

+ 2 - 11
playground/vue/src/pages/basic/Lights.vue

@@ -1,17 +1,11 @@
 <script setup lang="ts">
 import type { TresObject } from '@tresjs/core'
 import { OrbitControls } from '@tresjs/cientos'
-import { TresCanvas, vDistanceTo, vLightHelper, vLog } from '@tresjs/core'
-
-import { BasicShadowMap, NoToneMapping, SRGBColorSpace } from 'three'
+import { TresCanvas, vLightHelper } from '@tresjs/core'
 
 const gl = {
   clearColor: '#82DBC5',
   shadows: true,
-  alpha: false,
-  shadowMapType: BasicShadowMap,
-  outputColorSpace: SRGBColorSpace,
-  toneMapping: NoToneMapping,
 }
 
 const planeRef: Ref<TresObject | null> = ref(null)
@@ -19,12 +13,10 @@ const planeRef: Ref<TresObject | null> = ref(null)
 
 <template>
   <TresCanvas
-
     v-bind="gl"
   >
     <TresPerspectiveCamera
-      v-distance-to="planeRef"
-      :position="[3, 3, 3]"
+      :position="[8, 8, 8]"
     />
     <OrbitControls />
 
@@ -37,7 +29,6 @@ const planeRef: Ref<TresObject | null> = ref(null)
     />
     <TresMesh
       ref="planeRef"
-      v-log:material
       :rotation="[-Math.PI / 2, 0, 0]"
       receive-shadow
     >