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

操作模型对象 try 保护

parent d78fbec1
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Description: * @Description:
* @Author: lisu lisu@gavelinfo.com * @Author: lisu lisu@gavelinfo.com
* @LastEditors: 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 * @FilePath: /zghywpc-vue/src/views/yhlywsytst/yhlywsytst/index.vue
--> -->
<template> <template>
...@@ -1504,13 +1504,8 @@ ...@@ -1504,13 +1504,8 @@
return return
} }
try{
let model 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) let modelIndex = intersects.findIndex(item=>item.object.name!==''&&item.object.visible==true)
if(modelIndex!=-1){ if(modelIndex!=-1){
rconsole.log(`当前选中${modelIndex}`) rconsole.log(`当前选中${modelIndex}`)
...@@ -1553,14 +1548,11 @@ ...@@ -1553,14 +1548,11 @@
opacity: 0.8, opacity: 0.8,
wireframe: false, wireframe: false,
}) })
/* */ }catch(e){
// if (this.xzjj) { rconsole.log(e)
// const object = model; }
// if (object) {
// this.viewer.cameraControl.fitTo(object);
// }
// }
......
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