修改提升机动画

master
夜笙歌 4 months ago
parent 1bac66fa52
commit 7e1a0b0c5e

@ -37,7 +37,7 @@
<el-button type="primary" @click="tuopanReset"></el-button> <el-button type="primary" @click="tuopanReset"></el-button>
<el-button type="primary" @click="tuopanOut"></el-button> <el-button type="primary" @click="tuopanOut"></el-button>
<el-button type="primary" @click="removetuopan"></el-button> <el-button type="primary" @click="removetuopan"></el-button>
<el-select v-model="tuopanFloor" placeholder="去几楼" @change="toFloor"> <el-select v-model="tuopanFloor" placeholder="去几楼">
<el-option <el-option
label="1楼" label="1楼"
:value="1" :value="1"
@ -292,9 +292,14 @@ export default {
tuopanModel = null tuopanModel = null
}, },
async addtuopan() { async addtuopan() {
scene.remove(tuopanModel)
tuopanModel = null
tuopanModel = await addtuopan({ scene }) tuopanModel = await addtuopan({ scene })
scene.add(tuopanModel)
tuopanModel.position.x= storeyWidth[this.tuopanFloor] tuopanModel.position.x= storeyWidth[this.tuopanFloor]
tuopanLocation.floor = 1 tuopanModel.position.y= storeyHeight[this.tuopanFloor]
tuopanLocation.floor = this.tuopanFloor
tuopanLocation.y = storeyHeight[this.tuopanFloor]
tuopanLocation.x = storeyWidth[this.tuopanFloor] tuopanLocation.x = storeyWidth[this.tuopanFloor]
} }
} }

Loading…
Cancel
Save