|
|
|
@ -28,12 +28,12 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
async mounted() {
|
|
|
|
|
await isAMRT()
|
|
|
|
|
console.log(AMRT)
|
|
|
|
|
const param = {
|
|
|
|
|
appkey: 'aveMPyNWzDJm',
|
|
|
|
|
appsecret: 'rXmhoLAiOPNKzbl7g2qxCV8tFwRdYuZM'
|
|
|
|
|
}
|
|
|
|
|
const viewer = new AMRT.Viewer('container', param)
|
|
|
|
|
console.log(AMRT)
|
|
|
|
|
let num = 0
|
|
|
|
|
let modelArr = [
|
|
|
|
|
'1720315475507941376',
|
|
|
|
@ -53,20 +53,23 @@ export default {
|
|
|
|
|
'1720316297822212096',
|
|
|
|
|
]
|
|
|
|
|
modelArr.forEach(e => {
|
|
|
|
|
viewer.loadModel(e, {
|
|
|
|
|
let model = viewer.loadModel(e, {
|
|
|
|
|
background: false,
|
|
|
|
|
focus: false,
|
|
|
|
|
id: e,
|
|
|
|
|
onComplete: function (m) {
|
|
|
|
|
onLoad: function (m) {
|
|
|
|
|
num += 1
|
|
|
|
|
if (num === modelArr.length) {
|
|
|
|
|
alert('加载完成');
|
|
|
|
|
}
|
|
|
|
|
m.on('click', function () {
|
|
|
|
|
console.log(Core.getObjectById ( this.ID ))
|
|
|
|
|
alert(`${e}`)
|
|
|
|
|
viewer.operator.restore()
|
|
|
|
|
viewer.operator.translucenceOthers(this)
|
|
|
|
|
// console.log(this)
|
|
|
|
|
// console.log(m)
|
|
|
|
|
// let clickModel = model.getObjectById(this)
|
|
|
|
|
// console.log(clickModel)
|
|
|
|
|
// alert(`${e}`)
|
|
|
|
|
// viewer.operator.restore()
|
|
|
|
|
// viewer.operator.translucenceOthers(this.viewer)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|