以上是cubemesh.vue里面的内容,应该如和把数字城市里面比如说fireA 组件的的内容放进去呢?
<template>
<mapContainer :center="mapCenter" />
<TresCanvas id="tresCanvas" ref="tcRef" v-bind="state">
<TresPerspectiveCamera :fov="60" :near="0.1" :far="1000" />
<TresAmbientLight :intensity="0.5" />
<TresMesh :position="[0, 0, 500]">
<TresBoxGeometry :args="[1000, 1000, 1000]" />
<TresMeshNormalMaterial />
</TresMesh>
<mergeTres :center="mapCenter" />
</TresCanvas>
</template>
<template>
<mapContainer :center="mapCenter" />
<TresCanvas id="tresCanvas" ref="tcRef" v-bind="state">
<TresPerspectiveCamera :fov="60" :near="0.1" :far="1000" />
<TresAmbientLight :intensity="0.5" />
<TresMesh :position="[0, 0, 500]">
<TresBoxGeometry :args="[1000, 1000, 1000]" />
<TresMeshNormalMaterial />
</TresMesh>
<!-- 火 -->
<Suspense>
<fireB :position="[0, 6, 0]" />
</Suspense>
<mergeTres :center="mapCenter" />
</TresCanvas>
</template>
<script setup lang="ts">
import { fireB } from 'PLS/digitalCity'
</script>
稍微学习下 vue3和three 或者看看我们的文档https://docs.icegl.cn/
参考代码目录:
src/plugins/simpleGIS/components/mapBuildingsMoreMeshes.vue
好的,谢谢你!!!