廖杰:风压阀动态添加墙壁功能大致完成

This commit is contained in:
Hcat
2023-12-23 15:13:44 +08:00
parent 7684e21d33
commit c27f1a5652
5 changed files with 35 additions and 21 deletions

View File

@@ -164,6 +164,8 @@ export default class Demo {
this._hoverModel(this.points);
// 可以进行点击
this._ClickModel(this.points);
//将墙壁进行隐藏
this.WallInit()
}
// 在此方法中对模型批量操作,这里遍历附着点
@@ -485,5 +487,16 @@ export default class Demo {
opacityTween(0.1, 0.5, true);
}
}
//初始将墙壁进行隐藏
WallInit() {
for (let line = 1; line <= 20; line++) {
if (line < 10) {
let wall = 'wall_' + '0' + line
this.scene.getObjectByName(wall).visible = false
} else if (line >= 10) {
let wall = 'wall_' + line
this.scene.getObjectByName(wall).visible = false
}
}
}
}