修改模型

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

@ -1,15 +1,15 @@
<!DOCTYPE html>
<html> <html>
<head lang="zh-CN"> <head lang="zh-CN">
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit"> <meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= webpackConfig.name %></title> <title><%= webpackConfig.name %></title>
<!--[if lt IE 11]> <!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
<script>window.location.href = '/html/ie.html';</script><![endif]--> <script src="<%= BASE_URL %>./Model.js"></script>
<script src="<%= BASE_URL %>./Model.js"></script> <style>
<style>
html, html,
body, body,
#app { #app {
@ -17,7 +17,6 @@
margin: 0px; margin: 0px;
padding: 0px; padding: 0px;
} }
.chromeframe { .chromeframe {
margin: 0.2em 0; margin: 0.2em 0;
background: #ccc; background: #ccc;
@ -196,15 +195,15 @@
opacity: 0.5; opacity: 0.5;
} }
</style> </style>
</head> </head>
<body> <body>
<div id="app"> <div id="app">
<div id="loader-wrapper"> <div id="loader-wrapper">
<div id="loader"></div> <div id="loader"></div>
<div class="loader-section section-left"></div> <div class="loader-section section-left"></div>
<div class="loader-section section-right"></div> <div class="loader-section section-right"></div>
<div class="load_title">正在加载系统资源,请耐心等待</div> <div class="load_title">正在加载系统资源,请耐心等待</div>
</div> </div>
</div> </div>
</body> </body>
</html> </html>

@ -52,19 +52,30 @@ export default {
'1720316275214913536', '1720316275214913536',
'1720316297822212096', '1720316297822212096',
] ]
modelArr.forEach(e=>{ modelArr.forEach(e => {
viewer.loadModel(e, { viewer.loadModel(e, {
background: false, background: false,
onLoad: function (m) { focus: false,
num+=1 id:e,
if(num === modelArr.length){ onComplete: function (m) {
num += 1
if (num === modelArr.length) {
alert('加载完成'); 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: {} methods: {}
}; };

Loading…
Cancel
Save