修改模型

master
夜笙歌 11 months ago
parent dd1b4b54cf
commit 8a77e596e2

@ -1,15 +1,15 @@
<!DOCTYPE html>
<html>
<head lang="zh-CN">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit">
<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]-->
<script src="<%= BASE_URL %>./Model.js"></script>
<style>
<head lang="zh-CN">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit">
<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]-->
<script src="<%= BASE_URL %>./Model.js"></script>
<style>
html,
body,
#app {
@ -17,7 +17,6 @@
margin: 0px;
padding: 0px;
}
.chromeframe {
margin: 0.2em 0;
background: #ccc;
@ -196,15 +195,15 @@
opacity: 0.5;
}
</style>
</head>
<body>
<div id="app">
<div id="loader-wrapper">
<div id="loader"></div>
<div class="loader-section section-left"></div>
<div class="loader-section section-right"></div>
<div class="load_title">正在加载系统资源,请耐心等待</div>
</div>
</div>
</body>
</head>
<body>
<div id="app">
<div id="loader-wrapper">
<div id="loader"></div>
<div class="loader-section section-left"></div>
<div class="loader-section section-right"></div>
<div class="load_title">正在加载系统资源,请耐心等待</div>
</div>
</div>
</body>
</html>

@ -52,19 +52,30 @@ export default {
'1720316275214913536',
'1720316297822212096',
]
modelArr.forEach(e=>{
modelArr.forEach(e => {
viewer.loadModel(e, {
background: false,
onLoad: function (m) {
num+=1
if(num === modelArr.length){
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