king2088 / vue-3d-loader

VueJS and threeJS 3d viewer plugin
https://king2088.github.io/vue-3d-loader-docs
MIT License
222 stars 38 forks source link

在大屏中引用组件。加载模型之后。如果是大屏中的数据变化。模型就是闪烁。 #82

Closed sweetlicio closed 10 months ago

sweetlicio commented 10 months ago

您好。在vue2做大屏时,使用vue3dloader加载多模型。模型作为底图,展示数据的变化。我这边遇到一个问题。1.点击选中模型,改变大屏数据,模型就会闪烁或者位置发生位移。有遇到过吗。十分感谢。vue3dloader是很棒的工具。

king2088 commented 10 months ago

您好。在vue2做大屏时,使用vue3dloader加载多模型。模型作为底图,展示数据的变化。我这边遇到一个问题。1.点击选中模型,改变大屏数据,模型就会闪烁或者位置发生位移。有遇到过吗。十分感谢。vue3dloader是很棒的工具。

能否提供一些主要的代码?

sweetlicio commented 10 months ago

<#div class="panel"> <#h3><#span>设备运转情况<#span class="ts7">Equipment control <#div class="panel-body"> <#el-table :data="tableData" stripe style="width: 100%"> <#el-table-column prop="name" label="设备名称"> <#el-table-column prop="num" label="所属位置"> <#el-table-column prop="wd" label="实时数据"> <#el-table-column prop="sd" label="累计数据">

<#div> <vue3dLoader :height="1000" :filePath="[glb模型]" :position="position" :backgroundColor="'rgba(71,74,77,0)'" :backgroundAlpha="0.5" :scale="[{x:2,y:1,z:1},{x:2.2,y:2.2,z:2.2},{x:1,y:1,z:3}]" @dblclick="onMouseMove" :intersectRecursive="true" outputEncoding="sRGB" :labels="labels" :rotation="rotation" :cameraPosition="positon" :controlsOptions="{enablePan,enableZoom,enableRotate}" :cameraUp="cameraUp" :enableDamping="true" :horizontalCtrl="true"

类似以上。这里好像不能直接发代码。每个字符都加了#。elementui改变tabledata的值。模型的位置就会变动。必须要再改变tabledata的方法里重新定位模型position和视角才可以。如果是定时任务去加载后台数据。就一直会闪烁。可能我描述的不太准确。您是否能理解?需要我多描述一些吗。谢谢