|
|
|
@ -55,16 +55,27 @@ export default {
|
|
|
|
|
modelArr.forEach(e => {
|
|
|
|
|
viewer.loadModel(e, {
|
|
|
|
|
background: false,
|
|
|
|
|
onLoad: function (m) {
|
|
|
|
|
focus: false,
|
|
|
|
|
id:e,
|
|
|
|
|
onComplete: function (m) {
|
|
|
|
|
num += 1
|
|
|
|
|
if (num === modelArr.length) {
|
|
|
|
|
alert('加载完成');
|
|
|
|
|
}
|
|
|
|
|
m.on('click', ()=>{alert(`${e}`)})
|
|
|
|
|
m.on('click', function (){
|
|
|
|
|
console.log(Core.getObjectById ( this.ID ))
|
|
|
|
|
alert(`${e}`)
|
|
|
|
|
viewer.operator.restore()
|
|
|
|
|
viewer.operator.translucenceOthers(this)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
viewer.controls.startAutoRotate(1)
|
|
|
|
|
viewer.controls.setTarget(26.3, -19.8, -82)
|
|
|
|
|
viewer.controls.setPosition(31, 1721, 584)
|
|
|
|
|
viewer.operator.enabled = true
|
|
|
|
|
|
|
|
|
|
// viewer.controls.startAutoRotate(1)
|
|
|
|
|
},
|
|
|
|
|
methods: {}
|
|
|
|
|
};
|
|
|
|
|