236 Star 3.4K Fork 797

ICEGL/icegl-three-vue-tres

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
simpleImport.vue 1.46 KB
一键复制 编辑 原始数据 按行查看 历史
<!--
* @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>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/ice-gl/icegl-three-vue-tres.git
git@gitee.com:ice-gl/icegl-three-vue-tres.git
ice-gl
icegl-three-vue-tres
icegl-three-vue-tres
master

搜索帮助