修改初始化
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
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)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user