Commit 4af55f4d authored by 李苏's avatar 李苏 💬

操作模型对象 try 保护

parent d78fbec1
......@@ -2,7 +2,7 @@
* @Description:
* @Author: lisu lisu@gavelinfo.com
* @LastEditors: lisu lisu@gavelinfo.com
* @LastEditTime: 2024-10-08 16:51:55
* @LastEditTime: 2024-10-10 15:08:18
* @FilePath: /zghywpc-vue/src/views/yhlywsytst/yhlywsytst/index.vue
-->
<template>
......@@ -1504,13 +1504,8 @@
return
}
try{
let model
/* 测试判定,实际根据模型实际特征来判定*/
// if (intersects[0].object.name == '') {
// model = intersects[1].object
// } else {
// model = intersects[0].object
// }
let modelIndex = intersects.findIndex(item=>item.object.name!==''&&item.object.visible==true)
if(modelIndex!=-1){
rconsole.log(`当前选中${modelIndex}`)
......@@ -1553,14 +1548,11 @@
opacity: 0.8,
wireframe: false,
})
/* */
// if (this.xzjj) {
// const object = model;
// if (object) {
// this.viewer.cameraControl.fitTo(object);
// }
}catch(e){
rconsole.log(e)
}
// }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment