代码拉取完成,页面将自动刷新
<!--
* @Description:
* @Version: 1.668
* @Autor: 地虎降天龙
* @Date: 2024-05-10 10:11:04
* @LastEditors: 地虎降天龙
* @LastEditTime: 2024-05-13 08:37:32
-->
<template>
<TresCanvas v-bind="state" window-size>
<TresPerspectiveCamera :position="[15, 15, 15]" :fov="45" :near="0.1" :far="1000" :look-at="[0, 0, 0]" />
<OrbitControls v-bind="controlsState" />
<!-- <TresAmbientLight :intensity="0.5" /> -->
<!-- <TresDirectionalLight ref="TDirectionalLight" :position="[6.058, 5.8, -2]" :intensity="10" color="#ff0000" cast-shadow /> -->
<Suspense>
<importJson />
</Suspense>
<TresGridHelper />
</TresCanvas>
<input id="fileInput" type="file" accept=".zip" style="display: none" />
</template>
<script setup lang="ts">
import { SRGBColorSpace, BasicShadowMap, NoToneMapping } from 'three'
import { reactive, shallowRef, watchEffect } from 'vue'
import { TresCanvas } from '@tresjs/core'
import { OrbitControls } from '@tresjs/cientos'
import importJson from '../components/importJson.vue'
const state = reactive({
clearColor: '#201919',
shadows: true,
alpha: false,
shadowMapType: BasicShadowMap,
outputColorSpace: SRGBColorSpace,
toneMapping: NoToneMapping,
})
const controlsState = reactive({
enableDamping: true,
dampingFactor: 0.05,
})
const TDirectionalLight = shallowRef(null)
watchEffect(() => {
if (TDirectionalLight.value) {
//
}
})
</script>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。