|
|
@ -37,6 +37,33 @@
|
|
|
|
<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-option
|
|
|
|
|
|
|
|
label="1楼"
|
|
|
|
|
|
|
|
:value="1"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
</el-option>
|
|
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
|
|
label="2楼"
|
|
|
|
|
|
|
|
:value="2"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
</el-option>
|
|
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
|
|
label="3楼"
|
|
|
|
|
|
|
|
:value="3"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
</el-option>
|
|
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
|
|
label="4楼"
|
|
|
|
|
|
|
|
:value="4"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
</el-option>
|
|
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
|
|
label="5楼"
|
|
|
|
|
|
|
|
:value="5"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
</el-option>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
<el-button type="primary" @click="addtuopan">添加托盘</el-button>
|
|
|
|
<el-button type="primary" @click="addtuopan">添加托盘</el-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -49,17 +76,18 @@ import * as TWEEN from '@tweenjs/tween.js'
|
|
|
|
import { OBJLoader } from 'three/examples/jsm/loaders/OBJLoader.js'
|
|
|
|
import { OBJLoader } from 'three/examples/jsm/loaders/OBJLoader.js'
|
|
|
|
import { MTLLoader } from 'three/examples/jsm/loaders/MTLLoader.js'
|
|
|
|
import { MTLLoader } from 'three/examples/jsm/loaders/MTLLoader.js'
|
|
|
|
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'
|
|
|
|
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'
|
|
|
|
import { CSS2DObject, CSS2DRenderer } from 'three/examples/jsm/renderers/CSS2DRenderer'
|
|
|
|
import { CSS2DRenderer } from 'three/examples/jsm/renderers/CSS2DRenderer'
|
|
|
|
import Demo from '@/components/model/demo.vue'
|
|
|
|
import Demo from '@/components/model/demo.vue'
|
|
|
|
|
|
|
|
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
tuopanInishengji,
|
|
|
|
addtuopan,
|
|
|
|
storeyHeight,
|
|
|
|
storeyHeight,
|
|
|
|
storeyWidth,
|
|
|
|
storeyWidth,
|
|
|
|
tishengjiAnimation,
|
|
|
|
tishengjiAnimation,
|
|
|
|
|
|
|
|
tuopanInishengji,
|
|
|
|
|
|
|
|
tuopanLocation,
|
|
|
|
tuopanXAnimation,
|
|
|
|
tuopanXAnimation,
|
|
|
|
tuopanYAnimation,
|
|
|
|
tuopanYAnimation
|
|
|
|
tuopanLocation
|
|
|
|
|
|
|
|
} from './animation'
|
|
|
|
} from './animation'
|
|
|
|
|
|
|
|
|
|
|
|
let keyidongModel = null
|
|
|
|
let keyidongModel = null
|
|
|
@ -93,7 +121,8 @@ export default {
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
num: -60,
|
|
|
|
num: -60,
|
|
|
|
floor: 1
|
|
|
|
floor: 1,
|
|
|
|
|
|
|
|
tuopanFloor:1,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
mounted() {
|
|
|
@ -146,8 +175,6 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (v === 'tishengji_tuopan') {
|
|
|
|
if (v === 'tishengji_tuopan') {
|
|
|
|
tuopanModel = object
|
|
|
|
tuopanModel = object
|
|
|
|
// tuopanModel.position.y = storeyHeight[5]
|
|
|
|
|
|
|
|
// tuopanModel.position.x = this.num
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 更新渲染器
|
|
|
|
// 更新渲染器
|
|
|
|
renderer.render(scene, camera)
|
|
|
|
renderer.render(scene, camera)
|
|
|
@ -230,12 +257,6 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
requestAnimationFrame(animate)
|
|
|
|
requestAnimationFrame(animate)
|
|
|
|
TWEEN.update()
|
|
|
|
TWEEN.update()
|
|
|
|
if (keyidongModel) {
|
|
|
|
|
|
|
|
// keyidongModel.position.y += 0.1;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (tuopanModel) {
|
|
|
|
|
|
|
|
// tuopanModel.position.y += 0.1;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
renderer.render(scene, camera)
|
|
|
|
renderer.render(scene, camera)
|
|
|
|
labelRenderer.render(scene, camera)
|
|
|
|
labelRenderer.render(scene, camera)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -245,6 +266,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
animate()
|
|
|
|
animate()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
handleChange() {
|
|
|
|
handleChange() {
|
|
|
@ -267,9 +289,13 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
removetuopan() {
|
|
|
|
removetuopan() {
|
|
|
|
scene.remove(tuopanModel)
|
|
|
|
scene.remove(tuopanModel)
|
|
|
|
|
|
|
|
tuopanModel = null
|
|
|
|
},
|
|
|
|
},
|
|
|
|
addtuopan() {
|
|
|
|
async addtuopan() {
|
|
|
|
scene.add(tuopanModel)
|
|
|
|
tuopanModel = await addtuopan({ scene })
|
|
|
|
|
|
|
|
tuopanModel.position.x= storeyWidth[this.tuopanFloor]
|
|
|
|
|
|
|
|
tuopanLocation.floor = 1
|
|
|
|
|
|
|
|
tuopanLocation.x = storeyWidth[this.tuopanFloor]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|