廖杰:风压阀动态添加墙壁功能大致完成
This commit is contained in:
@@ -76,7 +76,7 @@ async function handleMounted() {
|
||||
demo = new ThreeDScene(three, content.value);
|
||||
//看是不是预览模式,然后继续相关的操作(会在demo中的初始化中进行)
|
||||
demo.isedit = params.isedit;
|
||||
let tunnelasync = await demo.loadModel(GLTFLoader, "./assets/tunnelModel/chanel-No-have-wall.gltf");
|
||||
let tunnelasync = await demo.loadModel(GLTFLoader, "./assets/tunnelModel/chanel-have-wall.gltf");
|
||||
demo.addOrbitControls(OrbitControls);
|
||||
demo.addTween(TWEEN);
|
||||
demo.addCSS3Renderer(CSS3DRenderer, CSS3DSprite, doms);
|
||||
|
||||
@@ -76,7 +76,7 @@ async function handleMounted() {
|
||||
|
||||
const loaded = await demo.loadModel(
|
||||
GLTFLoader,
|
||||
"./assets/tunnelModel/chanel.gltf"
|
||||
"./assets/tunnelModel/chanel-have-wall.gltf"
|
||||
);
|
||||
demo.addOrbitControls(OrbitControls);
|
||||
demo.addTween(TWEEN);
|
||||
@@ -229,6 +229,7 @@ function handleCancel() {
|
||||
demo._resetState();
|
||||
demo.clearTagsObj();
|
||||
}
|
||||
|
||||
//现在首先有二种方案,是写在TunnelScene.vue中还是demo.js中呢?
|
||||
//我认为可能看数据在哪获取?到时候看在哪里导入,首先我们放在TunnelScene里面吧
|
||||
//因为没获取到接口,我们先写死!!!
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
export function editTunnelInit(equipmentList) {
|
||||
//初始化将墙壁隐藏起来
|
||||
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
|
||||
}
|
||||
}
|
||||
// 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
|
||||
// }
|
||||
// }
|
||||
|
||||
equipmentList.forEach((item) => {
|
||||
const formInfo = {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
export default function previewtunnelModeInit(equipmentList) {
|
||||
//初始化将墙壁隐藏起来
|
||||
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
|
||||
}
|
||||
}
|
||||
// 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
|
||||
// }
|
||||
// }
|
||||
|
||||
equipmentList.forEach((item) => {
|
||||
const formInfo = {
|
||||
|
||||
Reference in New Issue
Block a user