修改模型

master
夜笙歌 1 year ago
parent dd1b4b54cf
commit 8a77e596e2

@ -1,3 +1,4 @@
<!DOCTYPE html>
<html>
<head lang="zh-CN">
<meta charset="utf-8">
@ -6,8 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= webpackConfig.name %></title>
<!--[if lt IE 11]>
<script>window.location.href = '/html/ie.html';</script><![endif]-->
<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
<script src="<%= BASE_URL %>./Model.js"></script>
<style>
html,
@ -17,7 +17,6 @@
margin: 0px;
padding: 0px;
}
.chromeframe {
margin: 0.2em 0;
background: #ccc;

@ -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: {}
};

Loading…
Cancel
Save