湖里大屏(BIM中心):完成BIM渲染

This commit is contained in:
Jack 2022-08-16 18:50:58 +08:00
parent 64d345c2b1
commit d133655d01
2 changed files with 42 additions and 3 deletions

31
public/bim.html Normal file
View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>My first BIMFACE app</title>
</head>
<body>
<div id="domId" style="width: 100%; height: 95vh"></div>
<script src="https://static.bimface.com/api/BimfaceSDKLoader/BimfaceSDKLoader@latest-release.js" charset="utf-8"></script>
<script>
let viewer3D
let app
let viewToken = '11b0d307c09f43bfa5fa3922bcce0342'
let loaderConfig = new BimfaceSDKLoaderConfig()
loaderConfig.viewToken = viewToken
BimfaceSDKLoader.load(loaderConfig, successCallback, failureCallback)
function successCallback(viewMetaData) {
let domShow = document.getElementById('domId')
let webAppConfig = new Glodon.Bimface.Application.WebApplication3DConfig()
webAppConfig.domElement = domShow
app = new Glodon.Bimface.Application.WebApplication3D(webAppConfig)
app.addView(viewToken)
viewer3D = app.getViewer()
}
function failureCallback(error) {
console.log(error)
}
</script>
</body>
</html>

View File

@ -10,7 +10,7 @@
</div>
</div>
<div class="centerBox">
BIM+
<iframe src="/bim.html" frameborder="0" width="100%" height="100%"></iframe>
</div>
<div class="rightBox">
<div class="rightTop">
@ -28,6 +28,7 @@ import leftTop from './leftTop'
import leftCenter from './leftCenter'
import rightTop from './rightTop'
import rightCenter from './rightCenter'
export default {
components: {
leftTop,
@ -40,7 +41,9 @@ export default {
<style lang="less" scoped>
.container {
position: relative;
display: flex;
justify-content: space-between;
width: 100%;
height: 100%;
background-color: #07162b;
@ -50,6 +53,7 @@ export default {
height: 20%;
}
.leftBox {
position: relative;
width: 25%;
height: 100%;
margin-right: 15px;
@ -65,18 +69,21 @@ export default {
.leftBottom {
height: 33%;
}
z-index: 2;
}
.centerBox {
position: absolute;
margin-right: 15px;
padding-left: 6px;
width: 60%;
height: 30px;
width: 100%;
height: 100%;
line-height: 30px;
font-size: 18px;
color: #6ee4f0;
}
.rightBox {
position: relative;
width: 25%;
height: 100%;
.rightTop {
@ -87,5 +94,6 @@ export default {
height: 33%;
margin-bottom: 15px;
}
z-index: 2;
}
</style>