25 lines
875 B
JavaScript
25 lines
875 B
JavaScript
export default function previewtunnelModeInit() {
|
|
|
|
for (const item of this.tunnelConfigEquipment) {
|
|
//使用api取拿到附着点
|
|
let pointmodel = this.scene.getObjectByName(item.pointName)
|
|
pointmodel.hasDevice;
|
|
let formInfo = {
|
|
equipmentType: item.equipmentType, //设备类型
|
|
chooseEquipment: item.equipmentName, //设备选择(设备名称)
|
|
threshold: item.equipmentValue, //阈值
|
|
}
|
|
this.addEquipment(pointmodel, formInfo);
|
|
}
|
|
//进行预览和编辑模式的一些操作
|
|
if (this.isedit == false) {
|
|
this.scene.traverse(function (item) {
|
|
if (item.name.includes('point')) {
|
|
if (item.hasDevice == false) {
|
|
item.visible = false
|
|
item.layers.set(-1)
|
|
}
|
|
}
|
|
})
|
|
}
|
|
} |