些许优化

This commit is contained in:
hawk86104 2023-10-17 15:48:57 +08:00
parent 8150d9ca20
commit 732c7a6619
3 changed files with 9 additions and 8 deletions

View File

@ -4,7 +4,7 @@
* @Autor: Hawk
* @Date: 2023-10-16 10:53:09
* @LastEditors: Hawk
* @LastEditTime: 2023-10-17 09:42:22
* @LastEditTime: 2023-10-17 15:36:11
*/
// import { resolve } from 'path';
import { join } from 'path';

View File

@ -4,7 +4,7 @@
* @Autor: Hawk
* @Date: 2023-10-17 09:35:18
* @LastEditors: Hawk
* @LastEditTime: 2023-10-17 15:16:25
* @LastEditTime: 2023-10-17 15:47:42
-->
<script setup>
import { useRenderLoop } from '@tresjs/core'
@ -30,9 +30,10 @@ const setColorMaterial = () => {
if (child.name === 'LANDMASS') {
const materials = Array.isArray(child.material) ? child.material : [child.material]
materials.forEach((material) => {
material.opacity = 0.8;
// material.opacity = 0.8;
// material.transparent = true;
material.color.setStyle("#040912");
material.color.setStyle("#112233");
material.side = THREE.DoubleSide //
})
}
})

View File

@ -5,14 +5,14 @@
* @Autor: Hawk
* @Date: 2023-10-17 08:30:49
* @LastEditors: Hawk
* @LastEditTime: 2023-10-17 14:54:11
* @LastEditTime: 2023-10-17 15:44:20
-->
<template>
<TresCanvas v-bind="state">
<TresPerspectiveCamera :position="[600, 750, -1221]" :fov="45" :near="1" :far="10000" />
<OrbitControls v-bind="controlsState" />
<TresAmbientLight color="#adadad" />
<TresDirectionalLight :position="[100, 100, 0]" :intensity="0.5" color="#ffffff" cast-shadow />
<TresAmbientLight color="#ffffff" />
<TresDirectionalLight :position="[100, 100, 0]" :intensity="0.5" color="#ffffff" />
<Suspense>
<belt></belt>
@ -31,7 +31,7 @@ import { OrbitControls } from '@tresjs/cientos';
import belt from '../components/belt.vue';
const state = reactive({
clearColor: '#32373E',
clearColor: '#000000',
shadows: true,
alpha: false,
useLegacyLights: true,