gs-bim-air 2.0.0-beta.4 → 2.0.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -0
- package/demo/assets/demo.css +28 -0
- package/demo//344/272/213/344/273/266/346/223/215/344/275/234//344/277/256/346/224/271/351/242/234/350/211/262.html +124 -0
- package/demo//344/272/213/344/273/266/346/223/215/344/275/234//345/212/250/347/224/273/346/214/211/351/222/256.html +141 -141
- package/demo//344/272/213/344/273/266/346/223/215/344/275/234//346/265/213/351/207/217/351/253/230/347/250/213.html +162 -166
- package/demo//344/272/213/344/273/266/346/223/215/344/275/234//346/267/273/345/212/240/346/226/207/346/234/254/346/240/207/347/255/276.html +125 -129
- package/demo//344/272/213/344/273/266/346/223/215/344/275/234//346/267/273/345/212/240/346/240/207/347/255/276/344/272/213/344/273/266/347/202/271/345/207/273/350/216/267/345/217/226/345/261/236/346/200/247.html +8 -18
- package/demo//344/272/213/344/273/266/346/223/215/344/275/234//346/267/273/345/212/240/351/274/240/346/240/207/344/272/213/344/273/266/350/216/267/345/217/226/346/250/241/345/236/213.html +9 -19
- package/demo//344/272/213/344/273/266/346/223/215/344/275/234//347/247/273/345/212/250/346/240/207/347/255/276/344/275/215/347/275/256.html +135 -139
- package/demo//344/272/213/344/273/266/346/223/215/344/275/234//350/247/206/347/202/271/347/256/241/347/220/206.html +102 -97
- package/demo//344/272/213/344/273/266/346/223/215/344/275/234//350/247/206/350/247/222/350/275/254/346/215/242.html +107 -112
- package/demo//344/272/213/344/273/266/346/223/215/344/275/234//350/256/276/347/275/256/347/273/223/346/236/204/346/240/221/347/202/271/345/207/273/344/272/213/344/273/266.html +8 -18
- package/demo//345/217/202/346/225/260/345/214/226/350/256/276/350/256/241//345/217/202/346/225/260/345/214/226/345/273/272/346/250/241.html +5 -35
- package/demo//346/250/241/345/236/213/344/272/244/344/272/222//346/227/213/350/275/254/345/271/263/347/247/273/347/274/251/346/224/276.html +128 -0
- package/demo//346/250/241/345/236/213/344/272/244/344/272/222//350/256/276/347/275/256viewHouse.html +92 -0
- package/demo//346/250/241/345/236/213/344/272/244/344/272/222//351/232/220/350/227/217/345/274/272/350/260/203.html +124 -0
- package/demo//346/250/241/345/236/213/345/212/250/347/224/273//345/273/272/347/255/221/346/210/277/345/261/213/350/277/233/345/272/246/346/250/241/346/213/237-/351/232/224/347/246/273/347/224/237/351/225/277.html +100 -0
- package/demo//346/250/241/345/236/213/345/212/250/347/224/273//346/226/275/345/267/245/350/277/233/345/272/246/346/250/241/346/213/237-/350/267/257/345/276/204/345/212/250/347/224/273/347/224/237/351/225/277.html +626 -0
- package/demo//346/250/241/345/236/213/345/212/250/347/224/273//347/256/241/350/267/257/350/277/233/345/272/246/346/250/241/346/213/237-/347/256/241/351/201/223/347/224/237/351/225/277.html +153 -0
- package/demo//346/250/241/345/236/213/345/212/250/347/224/273//350/267/257/345/276/204/345/212/250/347/224/273.html +119 -87
- package/demo//346/250/241/345/236/213/346/223/215/344/275/234//345/210/233/345/273/272/350/247/206/345/233/276.html +8 -18
- package/demo//346/250/241/345/236/213/346/223/215/344/275/234//345/212/240/350/275/275/346/234/215/345/212/241/345/231/250/346/250/241/345/236/213.html +8 -18
- package/demo//346/250/241/345/236/213/346/223/215/344/275/234//345/217/214/345/261/217/346/223/215/344/275/234.html +10 -8
- package/demo//346/250/241/345/236/213/346/223/215/344/275/234//345/256/232/344/275/215/346/250/241/345/236/213.html +17 -19
- package/demo//346/250/241/345/236/213/346/223/215/344/275/234//345/267/245/345/205/267/346/240/217/346/230/276/347/244/272/351/232/220/350/227/217.html +74 -0
- package/demo//346/250/241/345/236/213/346/223/215/344/275/234//346/212/225/345/275/261/346/226/271/345/274/217/345/217/230/346/215/242.html +78 -0
- package/demo//346/250/241/345/236/213/346/223/215/344/275/234//346/230/276/347/244/272/347/233/270/346/234/272/345/217/202/346/225/260.html +121 -114
- package/demo//346/250/241/345/236/213/346/223/215/344/275/234//350/216/267/345/217/226/347/233/270/346/234/272/345/217/202/346/225/260.html +138 -0
- package/demo//346/250/241/345/236/213/346/223/215/344/275/234//350/256/276/347/275/256/344/270/216/350/216/267/345/217/226/346/250/241/345/236/213/345/235/220/346/240/207.html +25 -24
- package/demo//346/250/241/345/236/213/346/223/215/344/275/234//351/224/201/345/256/232/347/233/270/346/234/272/350/247/206/350/247/222.html +109 -0
- package/demo//346/250/241/345/236/213/346/225/210/346/236/234/2D/347/203/255/345/212/233/345/233/276.html +47 -48
- package/demo//346/250/241/345/236/213/346/225/210/346/236/234/{BIM+GIS.html → BIMGIS/347/244/272/344/276/213.html} +8 -17
- package/demo//346/250/241/345/236/213/346/225/210/346/236/234/UV/345/212/250/347/224/273.html +9 -19
- package/demo//346/250/241/345/236/213/346/225/210/346/236/234//345/205/250/346/201/257/345/275/261/345/203/217.html +7 -17
- package/demo//346/250/241/345/236/213/346/225/210/346/236/234//345/210/233/345/273/272/346/211/253/347/225/245.html +77 -85
- package/demo//346/250/241/345/236/213/346/225/210/346/236/234//345/210/233/345/273/272/350/267/257/345/276/204.html +33 -35
- package/demo//346/250/241/345/236/213/346/225/210/346/236/234//345/233/264/345/242/231/346/211/253/346/217/217/346/225/210/346/236/234.html +33 -37
- package/demo//346/250/241/345/236/213/346/225/210/346/236/234//345/241/253/346/214/226/346/226/271/345/210/206/346/236/220.html +31 -36
- package/demo//346/250/241/345/236/213/346/225/210/346/236/234//345/244/251/347/251/272/347/233/222/346/225/210/346/236/234.html +9 -19
- package/demo//346/250/241/345/236/213/346/225/210/346/236/234//345/260/204/347/272/277/346/243/200/346/265/213.html +47 -52
- package/demo//346/250/241/345/236/213/346/225/210/346/236/234//346/211/207/345/275/242/346/211/253/346/217/217/346/225/210/346/236/234.html +33 -33
- package/demo//346/250/241/345/236/213/346/225/210/346/236/234//346/214/207/345/256/232/346/236/204/344/273/266/346/227/213/350/275/254.html +38 -40
- package/demo//346/250/241/345/236/213/346/225/210/346/236/234//346/216/247/351/253/230/345/210/206/346/236/220/346/225/210/346/236/234.html +28 -29
- package/demo//346/250/241/345/236/213/346/225/210/346/236/234//346/260/264/351/235/242/346/225/210/346/236/234.html +25 -27
- package/demo//346/250/241/345/236/213/346/225/210/346/236/234//346/267/273/345/212/240/344/270/211/347/273/264/346/226/207/345/255/227.html +44 -22
- package/demo//346/250/241/345/236/213/346/225/210/346/236/234//346/267/273/345/212/240/347/202/271/347/272/277/351/235/242/346/213/211/344/274/270/344/275/223.html +8 -18
- package/demo//346/250/241/345/236/213/346/225/210/346/236/234//347/216/257/347/212/266/346/211/253/346/217/217/346/225/210/346/236/234.html +8 -18
- package/demo//346/250/241/345/236/213/346/225/210/346/236/234//347/253/213/344/275/223/351/224/232/347/202/271.html +48 -53
- package/demo//346/250/241/345/236/213/346/225/210/346/236/234//350/201/232/345/205/211/347/201/257/346/225/210/346/236/234.html +49 -32
- package/demo//346/250/241/345/236/213/346/225/210/346/236/234//350/277/233/345/272/246/346/250/241/346/213/237-/346/214/211/344/273/273/346/204/217/346/226/271/345/220/221/345/211/226/345/210/207.html +265 -281
- package/demo//346/250/241/345/236/213/346/225/210/346/236/234//351/200/232/350/247/206/345/210/206/346/236/220.html +35 -39
- package/demo//346/250/241/345/236/213/346/225/210/346/236/234//351/233/252/345/244/251/346/225/210/346/236/234.html +20 -24
- package/demo//347/273/223/346/236/204/346/240/221/344/270/216/346/236/204/344/273/266//345/244/232/346/236/204/344/273/266/345/211/226/345/210/207.html +80 -85
- package/demo//347/273/223/346/236/204/346/240/221/344/270/216/346/236/204/344/273/266//345/256/232/344/275/215/346/236/204/344/273/266.html +96 -98
- package/demo//347/273/223/346/236/204/346/240/221/344/270/216/346/236/204/344/273/266//346/236/204/344/273/266/345/261/236/346/200/247.html +27 -31
- package/demo//347/273/223/346/236/204/346/240/221/344/270/216/346/236/204/344/273/266//346/236/204/344/273/266/347/242/260/346/222/236/346/243/200/346/265/213.html +93 -107
- package/demo//347/273/223/346/236/204/346/240/221/344/270/216/346/236/204/344/273/266//346/236/204/344/273/266/351/200/211/346/213/251/344/270/216/345/256/232/344/275/215.html +50 -61
- package/demo//347/273/223/346/236/204/346/240/221/344/270/216/346/236/204/344/273/266//346/236/204/344/273/266/351/232/220/350/227/217/343/200/201/346/236/204/344/273/266/345/274/272/350/260/203.html +124 -0
- package/demo//347/273/223/346/236/204/346/240/221/344/270/216/346/236/204/344/273/266//346/236/204/344/273/266/351/232/224/347/246/273.html +127 -0
- package/demo//347/273/223/346/236/204/346/240/221/344/270/216/346/236/204/344/273/266//350/216/267/345/217/226/346/236/204/344/273/266/345/214/205/345/233/264/347/233/222.html +48 -55
- package/demo//347/273/223/346/236/204/346/240/221/344/270/216/346/236/204/344/273/266//350/256/276/347/275/256/346/250/241/345/236/213/351/242/234/350/211/262.html +65 -0
- package/demo//347/273/223/346/236/204/346/240/221/344/270/216/346/236/204/344/273/266//350/256/276/347/275/256/351/200/217/346/230/216/345/272/246.html +100 -94
- package/demo//347/273/223/346/236/204/346/240/221/344/270/216/346/236/204/344/273/266//350/256/276/347/275/256/351/232/224/347/246/273/346/240/267/345/274/217.html +93 -93
- package/demo//347/273/223/346/236/204/346/240/221/344/270/216/346/236/204/344/273/266//351/232/220/350/227/217/346/236/204/344/273/266.html +63 -0
- package/demo//347/273/223/346/236/204/346/240/221/344/270/216/346/236/204/344/273/266//351/242/234/350/211/262/346/214/211/351/222/256.html +110 -119
- package/docs/classes/{Animation.uvEffect.md → Animation.UvEffect.md} +10 -10
- package/docs/classes/Longan.CameraMouse.md +23 -7
- package/docs/classes/Longan.CameraPlanMouse.md +31 -11
- package/docs/classes/Longan.EarthCameraMouse.md +31 -11
- package/docs/classes/Longan.PanoramaCameraMouse.md +31 -11
- package/docs/classes/Longan.PerspectiveCameraMouse.md +31 -11
- package/docs/modules/Animation.md +1 -1
- package/lib/BimAir.common-report.html +2 -2
- package/lib/BimAir.common.js +10 -10
- package/lib/BimAir.css +41 -41
- package/lib/BimAir.umd-report.html +2 -2
- package/lib/BimAir.umd.js +10 -10
- package/lib/BimAir.umd.min-report.html +2 -2
- package/lib/BimAir.umd.min.js +10 -10
- package/lib/undefined.gzundefined +0 -0
- package/package.json +1 -1
- package/public/js/longan/longan.js +1013 -1019
- package/public/js/longan/longan.wasm +0 -0
- package/public/js/longan/longan.worker.js +43 -51
- package/public/js/longanWithoutShareArrayBuffer/longan.js +1 -1
- package/public/js/longanWithoutShareArrayBuffer/longan.wasm +0 -0
- package/demo//344/272/213/344/273/266/346/223/215/344/275/234//351/242/234/350/211/262/345/222/214/345/212/250/347/224/273/346/214/211/351/222/256.html +0 -178
- package/demo//345/217/202/346/225/260/345/214/226/350/256/276/350/256/241//345/217/202/346/225/260/347/256/241/347/220/206/345/231/250.html +0 -86
- package/demo//346/250/241/345/236/213/344/272/244/344/272/222//346/250/241/345/236/213/344/272/244/344/272/222-/345/212/240/350/275/275/345/244/232/346/250/241/345/236/213-/346/227/213/350/275/254/345/271/263/347/247/273/347/274/251/346/224/276.html +0 -155
- package/demo//346/250/241/345/236/213/344/272/244/344/272/222//346/250/241/345/236/213/344/272/244/344/272/222-/345/244/232/346/250/241/345/236/213/346/223/215/344/275/234-/351/232/220/350/227/217/345/274/272/350/260/203.html +0 -156
- package/demo//346/250/241/345/236/213/344/272/244/344/272/222//346/250/241/345/236/213/344/272/244/344/272/222-/350/256/276/347/275/256viewHouse.html +0 -122
- package/demo//346/250/241/345/236/213/345/212/250/347/224/273//345/212/250/347/224/273-/345/273/272/347/255/221/346/210/277/345/261/213/350/277/233/345/272/246/346/250/241/346/213/237-/351/232/224/347/246/273/347/224/237/351/225/277.html +0 -118
- package/demo//346/250/241/345/236/213/345/212/250/347/224/273//345/212/250/347/224/273-/346/226/275/345/267/245/350/277/233/345/272/246/346/250/241/346/213/237-/350/267/257/345/276/204/345/212/250/347/224/273/347/224/237/351/225/277.html +0 -493
- package/demo//346/250/241/345/236/213/345/212/250/347/224/273//345/212/250/347/224/273-/347/256/241/350/267/257/350/277/233/345/272/246/346/250/241/346/213/237-/347/256/241/351/201/223/347/224/237/351/225/277.html +0 -172
- package/demo//346/250/241/345/236/213/345/212/250/347/224/273//345/212/250/347/224/273-/350/207/252/345/256/232/344/271/211/347/256/241/351/201/223/350/277/233/345/272/246/346/250/241/346/213/237/346/226/271/345/220/221.html +0 -291
- package/demo//346/250/241/345/236/213/345/212/250/347/224/273//350/267/257/345/276/204/345/271/263/347/247/273/345/212/250/347/224/273.html +0 -175
- package/demo//346/250/241/345/236/213/346/223/215/344/275/234//346/250/241/345/236/213/346/223/215/344/275/234-/346/250/241/345/236/213/350/247/206/350/247/222-/346/212/225/345/275/261/346/226/271/345/274/217/345/217/230/346/215/242.html +0 -115
- package/demo//346/250/241/345/236/213/346/223/215/344/275/234//346/250/241/345/236/213/346/223/215/344/275/234-/346/250/241/345/236/213/350/247/206/350/247/222-/350/216/267/345/217/226/347/233/270/346/234/272/345/217/202/346/225/260.html +0 -134
- package/demo//346/250/241/345/236/213/346/223/215/344/275/234//346/250/241/345/236/213/346/223/215/344/275/234-/346/250/241/345/236/213/350/247/206/350/247/222-/351/224/201/345/256/232/347/233/270/346/234/272/350/247/206/350/247/222.html +0 -138
- package/demo//346/250/241/345/236/213/346/223/215/344/275/234//350/256/276/347/275/256/345/267/245/345/205/267/346/240/217/344/270/216/346/214/211/351/222/256/346/230/276/347/244/272/351/232/220/350/227/217.html +0 -72
- package/demo//346/250/241/345/236/213/346/223/215/344/275/234//350/256/276/347/275/256/347/233/270/346/234/272/347/212/266/346/200/201-/350/216/267/345/217/226/344/275/215/347/275/256/343/200/201/346/201/242/345/244/215/344/275/215/347/275/256.html +0 -137
- package/demo//347/273/223/346/236/204/346/240/221/344/270/216/346/236/204/344/273/266//345/244/232/346/250/241/345/236/213/346/223/215/344/275/234-/346/236/204/344/273/266/351/232/220/350/227/217/343/200/201/346/236/204/344/273/266/345/274/272/350/260/203.html +0 -157
- package/demo//347/273/223/346/236/204/346/240/221/344/270/216/346/236/204/344/273/266//346/236/204/344/273/266/346/223/215/344/275/234-/346/236/204/344/273/266/345/244/215/345/210/266-/344/277/256/346/224/271/351/242/234/350/211/262/343/200/201/346/236/204/344/273/266/351/232/224/347/246/273.html +0 -250
- package/demo//347/273/223/346/236/204/346/240/221/344/270/216/346/236/204/344/273/266//346/236/204/344/273/266/346/223/215/344/275/234-/346/236/204/344/273/266/345/244/215/345/210/266-/346/236/204/344/273/266/351/232/220/350/227/217/343/200/201/350/267/257/345/276/204/345/212/250/347/224/273.html +0 -265
- package/demo//347/273/223/346/236/204/346/240/221/344/270/216/346/236/204/344/273/266//346/250/241/345/236/213/344/277/241/346/201/257-/350/216/267/345/217/226/346/250/241/345/236/213/345/261/236/346/200/247/344/277/241/346/201/257-/346/236/204/344/273/266/345/261/236/346/200/247.html +0 -111
- package/demo//347/273/223/346/236/204/346/240/221/344/270/216/346/236/204/344/273/266//346/250/241/345/236/213/346/236/204/344/273/266/351/232/224/347/246/273.html +0 -69
- package/demo//347/273/223/346/236/204/346/240/221/344/270/216/346/236/204/344/273/266//350/216/267/345/217/226/346/236/204/344/273/266/344/277/241/346/201/257.html +0 -112
- package/demo//347/273/223/346/236/204/346/240/221/344/270/216/346/236/204/344/273/266//350/216/267/345/217/226/346/250/241/345/236/213/347/273/223/346/236/204/346/240/221.html +0 -58
- package/demo//347/273/223/346/236/204/346/240/221/344/270/216/346/236/204/344/273/266//350/256/276/347/275/256/346/236/204/344/273/266/351/242/234/350/211/262.html +0 -75
- package/demo//347/273/223/346/236/204/346/240/221/344/270/216/346/236/204/344/273/266//351/232/220/350/227/217/344/270/211/347/273/264/346/250/241/345/236/213/346/236/204/344/273/266.html +0 -71
- package/demo//347/273/223/346/236/204/346/240/221/344/270/216/346/236/204/344/273/266//351/232/224/347/246/273/346/214/211/351/222/256.html +0 -137
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<title>管道生长</title>
|
|
6
|
+
<!-- demo的样式 -->
|
|
7
|
+
<link rel="stylesheet" href="../assets/demo.css" />
|
|
8
|
+
<link
|
|
9
|
+
rel="stylesheet"
|
|
10
|
+
href="https://static.belife-bim.com/bimAir/BimAir.css"
|
|
11
|
+
/>
|
|
12
|
+
<script src="https://static.graphicstone.com/vue.min.js"></script>
|
|
13
|
+
<script src="https://static.graphicstone.com/bimAir/BimAir.umd.min.js"></script>
|
|
14
|
+
</head>
|
|
15
|
+
|
|
16
|
+
<body>
|
|
17
|
+
<div id="app">
|
|
18
|
+
<viewer-wrapper elementId="viewer" style="height: 100%; width: 100%" />
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<script type="text/javascript">
|
|
22
|
+
new Vue({
|
|
23
|
+
el: "#app",
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
let options = {
|
|
27
|
+
// viewerType: "model",
|
|
28
|
+
elementId: "viewer",
|
|
29
|
+
id: "6253e9d6b0545a0a6e49bf85",
|
|
30
|
+
modelService: "http://8.134.85.254:9036/api",
|
|
31
|
+
fileService: "http://8.134.85.254:9040/api",
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
let viewer;
|
|
35
|
+
let lightModels;
|
|
36
|
+
let tag_view = true;
|
|
37
|
+
let tag_visible = true;
|
|
38
|
+
let tag_color = 118;
|
|
39
|
+
//let bangonglouModelId = "62ba4f503a591513fe17d930";
|
|
40
|
+
let zhongyuModelId = "62e35bb4525bed6af87fb26c";
|
|
41
|
+
|
|
42
|
+
BimAir.Loader({ url: "https://static.graphicstone.com/bimAir" }).then(
|
|
43
|
+
() => {
|
|
44
|
+
viewer = new BimAir.Viewer(options);
|
|
45
|
+
// viewer.isUpdateTt = true;
|
|
46
|
+
|
|
47
|
+
// 排沙防空洞工程-左岸-PSFKDid
|
|
48
|
+
let PSFKDid = "62d8bcc9525bed6af87f5284";
|
|
49
|
+
viewer.loadModels([PSFKDid]).then((resLightModels) => {
|
|
50
|
+
viewer.setViewMode(BimAir.Longan.ViewMode.Iso, true);
|
|
51
|
+
lightModels = resLightModels;
|
|
52
|
+
|
|
53
|
+
// // 记录模型ID
|
|
54
|
+
let dongshenduanId = ["26", "27", "25"]; //Y
|
|
55
|
+
let yashitiId = ["28"]; //Z
|
|
56
|
+
let duiwaijiaotongId = ["29"]; //X
|
|
57
|
+
let jinkouduanId = ["20", "21"]; //Z
|
|
58
|
+
let yinquduanId = ["24"]; //Y
|
|
59
|
+
|
|
60
|
+
//为初始模型设置模型颜色
|
|
61
|
+
let material = new BimAir.Material(viewer, "test");
|
|
62
|
+
material.setColor(218, 228, 243, 1); //灰蓝
|
|
63
|
+
|
|
64
|
+
lightModels[0].setAllComponentsColor(material);
|
|
65
|
+
|
|
66
|
+
//为所有模型添加颜色
|
|
67
|
+
|
|
68
|
+
function modelCuttingOptions(modelId, cuttingType) {
|
|
69
|
+
console.log("函数调用");
|
|
70
|
+
let allTime = 10;
|
|
71
|
+
let time = 0;
|
|
72
|
+
let cuttingOptions = new BimAir.CuttingOptions();
|
|
73
|
+
cuttingOptions.type = cuttingType;
|
|
74
|
+
cuttingOptions.color = [0, 0, 255, 1];
|
|
75
|
+
cuttingOptions.ratio = 0;
|
|
76
|
+
let modelInterval = setInterval(() => {
|
|
77
|
+
if (time < allTime) {
|
|
78
|
+
cuttingOptions.ratio += 0.1;
|
|
79
|
+
// console.log("循环一次" + time + cuttingOptions.ratio);
|
|
80
|
+
lightModels[0].setCutting(modelId, cuttingOptions);
|
|
81
|
+
viewer.updateDisplay();
|
|
82
|
+
time++;
|
|
83
|
+
} else {
|
|
84
|
+
clearInterval(modelInterval);
|
|
85
|
+
}
|
|
86
|
+
}, 100);
|
|
87
|
+
lightModels[0].setComponentsColor([modelId], null);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
setTimeout(() => {
|
|
91
|
+
console.log("2000");
|
|
92
|
+
modelCuttingOptions(
|
|
93
|
+
dongshenduanId[0],
|
|
94
|
+
BimAir.CuttingCreateType.BoundingBoxY
|
|
95
|
+
);
|
|
96
|
+
}, 2000);
|
|
97
|
+
|
|
98
|
+
setTimeout(() => {
|
|
99
|
+
modelCuttingOptions(
|
|
100
|
+
dongshenduanId[1],
|
|
101
|
+
BimAir.CuttingCreateType.BoundingBoxY
|
|
102
|
+
);
|
|
103
|
+
}, 3500);
|
|
104
|
+
|
|
105
|
+
setTimeout(() => {
|
|
106
|
+
modelCuttingOptions(
|
|
107
|
+
dongshenduanId[2],
|
|
108
|
+
BimAir.CuttingCreateType.BoundingBoxY
|
|
109
|
+
);
|
|
110
|
+
}, 5000);
|
|
111
|
+
|
|
112
|
+
setTimeout(() => {
|
|
113
|
+
modelCuttingOptions(
|
|
114
|
+
yashitiId[0],
|
|
115
|
+
BimAir.CuttingCreateType.BoundingBoxZ
|
|
116
|
+
);
|
|
117
|
+
}, 6500);
|
|
118
|
+
|
|
119
|
+
setTimeout(() => {
|
|
120
|
+
modelCuttingOptions(
|
|
121
|
+
duiwaijiaotongId[0],
|
|
122
|
+
BimAir.CuttingCreateType.BoundingBoxX
|
|
123
|
+
);
|
|
124
|
+
}, 8000);
|
|
125
|
+
|
|
126
|
+
setTimeout(() => {
|
|
127
|
+
modelCuttingOptions(
|
|
128
|
+
jinkouduanId[0],
|
|
129
|
+
BimAir.CuttingCreateType.BoundingBoxZ
|
|
130
|
+
);
|
|
131
|
+
}, 9500);
|
|
132
|
+
|
|
133
|
+
setTimeout(() => {
|
|
134
|
+
modelCuttingOptions(
|
|
135
|
+
jinkouduanId[1],
|
|
136
|
+
BimAir.CuttingCreateType.BoundingBoxZ
|
|
137
|
+
);
|
|
138
|
+
}, 11000);
|
|
139
|
+
|
|
140
|
+
setTimeout(() => {
|
|
141
|
+
modelCuttingOptions(
|
|
142
|
+
yinquduanId[0],
|
|
143
|
+
BimAir.CuttingCreateType.BoundingBoxY
|
|
144
|
+
);
|
|
145
|
+
}, 12500);
|
|
146
|
+
|
|
147
|
+
viewer.updateDisplay();
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
);
|
|
151
|
+
</script>
|
|
152
|
+
</body>
|
|
153
|
+
</html>
|
|
@@ -6,12 +6,14 @@
|
|
|
6
6
|
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
7
7
|
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
|
|
8
8
|
<title>轻量化平台</title>
|
|
9
|
+
<!-- demo的样式 -->
|
|
10
|
+
<link rel="stylesheet" href="../assets/demo.css" />
|
|
9
11
|
<link
|
|
10
12
|
rel="stylesheet"
|
|
11
|
-
href="https://static.
|
|
13
|
+
href="https://static.belife-bim.com/bimAir/BimAir.css"
|
|
12
14
|
/>
|
|
13
|
-
<script src="https://static.
|
|
14
|
-
<script src="https://static.
|
|
15
|
+
<script src="https://static.belife-bim.com/vue.min.js"></script>
|
|
16
|
+
<script src="https://static.belife-bim.com/bimAir/BimAir.umd.min.js"></script>
|
|
15
17
|
</head>
|
|
16
18
|
|
|
17
19
|
<body>
|
|
@@ -26,8 +28,29 @@
|
|
|
26
28
|
height: 100vh;
|
|
27
29
|
position: relative;
|
|
28
30
|
}
|
|
31
|
+
|
|
32
|
+
button {
|
|
33
|
+
margin: 20px 20px 20px 20px;
|
|
34
|
+
width: 120px;
|
|
35
|
+
height: 40px;
|
|
36
|
+
border-radius: 3px;
|
|
37
|
+
border: none;
|
|
38
|
+
background: #006fe4;
|
|
39
|
+
color: #ffffff;
|
|
40
|
+
outline: none;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.button-group {
|
|
44
|
+
position: absolute;
|
|
45
|
+
z-index: 100;
|
|
46
|
+
top: 5px;
|
|
47
|
+
left: 70px;
|
|
48
|
+
}
|
|
29
49
|
</style>
|
|
30
50
|
<div id="app">
|
|
51
|
+
<div class="button-group">
|
|
52
|
+
<button onclick="play()">启动动画</button>
|
|
53
|
+
</div>
|
|
31
54
|
<viewer-wrapper elementId="viewer" style="height: 100%; width: 100%" />
|
|
32
55
|
</div>
|
|
33
56
|
|
|
@@ -38,12 +61,14 @@
|
|
|
38
61
|
let options = {
|
|
39
62
|
// viewerType: "model",
|
|
40
63
|
elementId: "viewer",
|
|
41
|
-
modelService: "https://static.
|
|
42
|
-
fileService: "https://static.
|
|
64
|
+
modelService: "https://static.belife-bim.com/modelApi",
|
|
65
|
+
fileService: "https://static.belife-bim.com/fileApi",
|
|
43
66
|
};
|
|
67
|
+
|
|
68
|
+
let viewer, lightModels;
|
|
44
69
|
BimAir.Loader({ url: "https://static.graphicstone.com/bimAir" }).then(
|
|
45
70
|
() => {
|
|
46
|
-
|
|
71
|
+
viewer = new BimAir.Viewer(options);
|
|
47
72
|
|
|
48
73
|
// 别墅模型Id
|
|
49
74
|
let modelId = "626b4d1ebfe39e58ae7b66a2";
|
|
@@ -55,93 +80,100 @@
|
|
|
55
80
|
{ id: carObjId, version: 0 },
|
|
56
81
|
{ id: carObjId, version: 0 },
|
|
57
82
|
])
|
|
58
|
-
.then((
|
|
83
|
+
.then((res) => {
|
|
59
84
|
viewer.setViewMode(6, true);
|
|
60
85
|
this.modelName = viewer.renderObject.name;
|
|
86
|
+
lightModels = res;
|
|
61
87
|
// 小车的LightModel
|
|
62
|
-
let carModel = lightModels[1];
|
|
63
|
-
let carModel1 = lightModels[2];
|
|
64
|
-
|
|
65
|
-
// 路径点.
|
|
66
|
-
let point1 = new BimAir.Longan.Point();
|
|
67
|
-
point1[0] = 3;
|
|
68
|
-
point1[1] = 0;
|
|
69
|
-
point1[2] = 0;
|
|
70
|
-
|
|
71
|
-
let point2 = new BimAir.Longan.Point();
|
|
72
|
-
point2[0] = 8;
|
|
73
|
-
point2[1] = 8;
|
|
74
|
-
point2[2] = 0;
|
|
75
|
-
|
|
76
|
-
let point3 = new BimAir.Longan.Point();
|
|
77
|
-
point3[0] = 10;
|
|
78
|
-
point3[1] = -5;
|
|
79
|
-
point3[2] = 0;
|
|
80
|
-
|
|
81
|
-
let point4 = new BimAir.Longan.Point();
|
|
82
|
-
point4[0] = 20;
|
|
83
|
-
point4[1] = 10;
|
|
84
|
-
point4[2] = 0;
|
|
85
|
-
|
|
86
|
-
let point5 = new BimAir.Longan.Point();
|
|
87
|
-
point5[0] = 30;
|
|
88
|
-
point5[1] = -10;
|
|
89
|
-
point5[2] = 0;
|
|
90
|
-
|
|
91
|
-
let points = new Array();
|
|
92
|
-
points.push(point1);
|
|
93
|
-
points.push(point2);
|
|
94
|
-
points.push(point1);
|
|
95
|
-
|
|
96
|
-
let points1 = new Array();
|
|
97
|
-
points1.push(point3);
|
|
98
|
-
points1.push(point4);
|
|
99
|
-
points1.push(point5);
|
|
100
|
-
|
|
101
|
-
// 绘制路径点线段(用来看的).
|
|
102
|
-
viewer.utilitySegment.subsegment("roamPath").clearGeometries();
|
|
103
|
-
viewer.process.animationManager.drawPointsCurve(viewer, points);
|
|
104
|
-
viewer.process.animationManager.drawPointsCurve(viewer, points1);
|
|
105
|
-
|
|
106
|
-
// 旋转角度
|
|
107
|
-
let degreed = 10;
|
|
108
|
-
// 动画移动的对象
|
|
109
|
-
let moveSegmentObject = carModel.segmentObject;
|
|
110
|
-
// 漫游时长
|
|
111
|
-
let roamTime = 5;
|
|
112
|
-
// datumPoint: 基准点---旋转中心(因为模型朝向需要与路径起点的切线方向一致,因此需要手动调整模型的旋转.)
|
|
113
|
-
// let datumPoint = new Float64Array([0, 0, 0]);
|
|
114
|
-
let datumPoint = new Float64Array([
|
|
115
|
-
28.5183410644531, -9.83585357666016, -4.73714828491211,
|
|
116
|
-
]); // 压路机的偏移点.
|
|
117
|
-
// 先清除车的matrix
|
|
118
|
-
moveSegmentObject.segment.modellingMatrix.unset();
|
|
119
|
-
// 添加路径动画并返回动画事件的Id.
|
|
120
|
-
let animationId =
|
|
121
|
-
viewer.process.animationManager.segmentObjectRoamPath(
|
|
122
|
-
degreed,
|
|
123
|
-
moveSegmentObject,
|
|
124
|
-
points,
|
|
125
|
-
roamTime,
|
|
126
|
-
datumPoint
|
|
127
|
-
);
|
|
128
|
-
|
|
129
|
-
carModel1.segment.modellingMatrix.unset();
|
|
130
|
-
// 添加路径动画并返回动画事件的Id.
|
|
131
|
-
let animationId1 =
|
|
132
|
-
viewer.process.animationManager.segmentObjectRoamPath(
|
|
133
|
-
degreed,
|
|
134
|
-
carModel1.segmentObject,
|
|
135
|
-
points1,
|
|
136
|
-
roamTime + 5,
|
|
137
|
-
datumPoint
|
|
138
|
-
);
|
|
139
|
-
|
|
140
|
-
// 播放全部动画
|
|
141
|
-
viewer.process.animationManager.run();
|
|
142
88
|
});
|
|
143
89
|
}
|
|
144
90
|
);
|
|
91
|
+
|
|
92
|
+
function play() {
|
|
93
|
+
if (!viewer) {
|
|
94
|
+
alert("请等待模型加载");
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
let carModel = lightModels[1];
|
|
98
|
+
let carModel1 = lightModels[2];
|
|
99
|
+
|
|
100
|
+
// 路径点.
|
|
101
|
+
let point1 = new BimAir.Longan.Point();
|
|
102
|
+
point1[0] = 3;
|
|
103
|
+
point1[1] = 0;
|
|
104
|
+
point1[2] = 0;
|
|
105
|
+
|
|
106
|
+
let point2 = new BimAir.Longan.Point();
|
|
107
|
+
point2[0] = 8;
|
|
108
|
+
point2[1] = 8;
|
|
109
|
+
point2[2] = 0;
|
|
110
|
+
|
|
111
|
+
let point3 = new BimAir.Longan.Point();
|
|
112
|
+
point3[0] = 10;
|
|
113
|
+
point3[1] = -5;
|
|
114
|
+
point3[2] = 0;
|
|
115
|
+
|
|
116
|
+
let point4 = new BimAir.Longan.Point();
|
|
117
|
+
point4[0] = 20;
|
|
118
|
+
point4[1] = 10;
|
|
119
|
+
point4[2] = 0;
|
|
120
|
+
|
|
121
|
+
let point5 = new BimAir.Longan.Point();
|
|
122
|
+
point5[0] = 30;
|
|
123
|
+
point5[1] = -10;
|
|
124
|
+
point5[2] = 0;
|
|
125
|
+
|
|
126
|
+
let points = new Array();
|
|
127
|
+
points.push(point1);
|
|
128
|
+
points.push(point2);
|
|
129
|
+
points.push(point1);
|
|
130
|
+
|
|
131
|
+
let points1 = new Array();
|
|
132
|
+
points1.push(point3);
|
|
133
|
+
points1.push(point4);
|
|
134
|
+
points1.push(point5);
|
|
135
|
+
|
|
136
|
+
// 绘制路径点线段(用来看的).
|
|
137
|
+
viewer.utilitySegment.subsegment("roamPath").clearGeometries();
|
|
138
|
+
viewer.process.animationManager.drawPointsCurve(viewer, points);
|
|
139
|
+
viewer.process.animationManager.drawPointsCurve(viewer, points1);
|
|
140
|
+
|
|
141
|
+
// 旋转角度
|
|
142
|
+
let degreed = 10;
|
|
143
|
+
// 动画移动的对象
|
|
144
|
+
let moveSegmentObject = carModel.segmentObject;
|
|
145
|
+
// 漫游时长
|
|
146
|
+
let roamTime = 5;
|
|
147
|
+
// datumPoint: 基准点---旋转中心(因为模型朝向需要与路径起点的切线方向一致,因此需要手动调整模型的旋转.)
|
|
148
|
+
// let datumPoint = new Float64Array([0, 0, 0]);
|
|
149
|
+
let datumPoint = new Float64Array([
|
|
150
|
+
28.5183410644531, -9.83585357666016, -4.73714828491211,
|
|
151
|
+
]); // 压路机的偏移点.
|
|
152
|
+
// 先清除车的matrix
|
|
153
|
+
moveSegmentObject.segment.modellingMatrix.unset();
|
|
154
|
+
// 添加路径动画并返回动画事件的Id.
|
|
155
|
+
let animationId = viewer.process.animationManager.segmentObjectRoamPath(
|
|
156
|
+
degreed,
|
|
157
|
+
moveSegmentObject,
|
|
158
|
+
points,
|
|
159
|
+
roamTime,
|
|
160
|
+
datumPoint
|
|
161
|
+
);
|
|
162
|
+
|
|
163
|
+
carModel1.segment.modellingMatrix.unset();
|
|
164
|
+
// 添加路径动画并返回动画事件的Id.
|
|
165
|
+
let animationId1 =
|
|
166
|
+
viewer.process.animationManager.segmentObjectRoamPath(
|
|
167
|
+
degreed,
|
|
168
|
+
carModel1.segmentObject,
|
|
169
|
+
points1,
|
|
170
|
+
roamTime + 5,
|
|
171
|
+
datumPoint
|
|
172
|
+
);
|
|
173
|
+
|
|
174
|
+
// 播放全部动画
|
|
175
|
+
viewer.process.animationManager.run();
|
|
176
|
+
}
|
|
145
177
|
</script>
|
|
146
178
|
</body>
|
|
147
179
|
</html>
|
|
@@ -3,27 +3,17 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<title>创建视图</title>
|
|
6
|
+
<!-- demo的样式 -->
|
|
7
|
+
<link rel="stylesheet" href="../assets/demo.css" />
|
|
6
8
|
<link
|
|
7
9
|
rel="stylesheet"
|
|
8
|
-
href="https://static.
|
|
10
|
+
href="https://static.belife-bim.com/bimAir/BimAir.css"
|
|
9
11
|
/>
|
|
10
|
-
<script src="https://static.
|
|
11
|
-
<script src="https://static.
|
|
12
|
+
<script src="https://static.belife-bim.com/vue.min.js"></script>
|
|
13
|
+
<script src="https://static.belife-bim.com/bimAir/BimAir.umd.min.js"></script>
|
|
12
14
|
</head>
|
|
13
15
|
|
|
14
16
|
<body>
|
|
15
|
-
<style>
|
|
16
|
-
body {
|
|
17
|
-
margin: 0;
|
|
18
|
-
padding: 0;
|
|
19
|
-
height: 100vh;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
#app {
|
|
23
|
-
height: 100vh;
|
|
24
|
-
position: relative;
|
|
25
|
-
}
|
|
26
|
-
</style>
|
|
27
17
|
<div id="app">
|
|
28
18
|
<viewer-wrapper elementId="viewer" style="height: 100%; width: 100%" />
|
|
29
19
|
</div>
|
|
@@ -36,10 +26,10 @@
|
|
|
36
26
|
// viewerType: "model",
|
|
37
27
|
elementId: "viewer",
|
|
38
28
|
|
|
39
|
-
modelService: "https://static.
|
|
40
|
-
fileService: "https://static.
|
|
29
|
+
modelService: "https://static.belife-bim.com/modelApi",
|
|
30
|
+
fileService: "https://static.belife-bim.com/fileApi",
|
|
41
31
|
};
|
|
42
|
-
BimAir.Loader({ url: "https://static.
|
|
32
|
+
BimAir.Loader({ url: "https://static.belife-bim.com/bimAir" }).then(
|
|
43
33
|
() => {
|
|
44
34
|
let viewer = new BimAir.Viewer(options);
|
|
45
35
|
}
|
|
@@ -3,27 +3,17 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<title>加载服务器模型</title>
|
|
6
|
+
<!-- demo的样式 -->
|
|
7
|
+
<link rel="stylesheet" href="../assets/demo.css" />
|
|
6
8
|
<link
|
|
7
9
|
rel="stylesheet"
|
|
8
|
-
href="https://static.
|
|
10
|
+
href="https://static.belife-bim.com/bimAir/BimAir.css"
|
|
9
11
|
/>
|
|
10
|
-
<script src="https://static.
|
|
11
|
-
<script src="https://static.
|
|
12
|
+
<script src="https://static.belife-bim.com/vue.min.js"></script>
|
|
13
|
+
<script src="https://static.belife-bim.com/bimAir/BimAir.umd.min.js"></script>
|
|
12
14
|
</head>
|
|
13
15
|
|
|
14
16
|
<body>
|
|
15
|
-
<style>
|
|
16
|
-
body {
|
|
17
|
-
margin: 0;
|
|
18
|
-
padding: 0;
|
|
19
|
-
height: 100vh;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
#app {
|
|
23
|
-
height: 100vh;
|
|
24
|
-
position: relative;
|
|
25
|
-
}
|
|
26
|
-
</style>
|
|
27
17
|
<div id="app">
|
|
28
18
|
<viewer-wrapper elementId="viewer" style="height: 100%; width: 100%" />
|
|
29
19
|
</div>
|
|
@@ -35,11 +25,11 @@
|
|
|
35
25
|
|
|
36
26
|
let options = {
|
|
37
27
|
elementId: "viewer",
|
|
38
|
-
modelService: "https://static.
|
|
39
|
-
fileService: "https://static.
|
|
28
|
+
modelService: "https://static.belife-bim.com/modelApi",
|
|
29
|
+
fileService: "https://static.belife-bim.com/fileApi",
|
|
40
30
|
};
|
|
41
31
|
BimAir.Loader({
|
|
42
|
-
url: "https://static.
|
|
32
|
+
url: "https://static.belife-bim.com/bimAir",
|
|
43
33
|
}).then(() => {
|
|
44
34
|
let viewer = new BimAir.Viewer(options);
|
|
45
35
|
viewer
|
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<title>创建视图</title>
|
|
6
|
+
<!-- demo的样式 -->
|
|
7
|
+
<link rel="stylesheet" href="../assets/demo.css" />
|
|
6
8
|
<link
|
|
7
9
|
rel="stylesheet"
|
|
8
|
-
href="https://static.
|
|
10
|
+
href="https://static.belife-bim.com/bimAir/BimAir.css"
|
|
9
11
|
/>
|
|
10
|
-
<script src="https://static.
|
|
11
|
-
<script src="https://static.
|
|
12
|
+
<script src="https://static.belife-bim.com/vue.min.js"></script>
|
|
13
|
+
<script src="https://static.belife-bim.com/bimAir/BimAir.umd.min.js"></script>
|
|
12
14
|
</head>
|
|
13
15
|
|
|
14
16
|
<body>
|
|
@@ -59,16 +61,16 @@
|
|
|
59
61
|
let options = {
|
|
60
62
|
// viewerType: "model",
|
|
61
63
|
elementId: "viewer1",
|
|
62
|
-
modelService: "https://static.
|
|
63
|
-
fileService: "https://static.
|
|
64
|
+
modelService: "https://static.belife-bim.com/modelApi",
|
|
65
|
+
fileService: "https://static.belife-bim.com/fileApi",
|
|
64
66
|
};
|
|
65
67
|
let options2 = {
|
|
66
68
|
// viewerType: "model",
|
|
67
69
|
elementId: "viewer2",
|
|
68
|
-
modelService: "https://static.
|
|
69
|
-
fileService: "https://static.
|
|
70
|
+
modelService: "https://static.belife-bim.com/modelApi",
|
|
71
|
+
fileService: "https://static.belife-bim.com/fileApi",
|
|
70
72
|
};
|
|
71
|
-
BimAir.Loader({ url: "https://static.
|
|
73
|
+
BimAir.Loader({ url: "https://static.belife-bim.com/bimAir" }).then(
|
|
72
74
|
() => {
|
|
73
75
|
let viewer = new BimAir.Viewer(options);
|
|
74
76
|
let viewer2 = new BimAir.Viewer(options2);
|
|
@@ -3,28 +3,21 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<title>定位模型</title>
|
|
6
|
+
<!-- demo的样式 -->
|
|
7
|
+
<link rel="stylesheet" href="../assets/demo.css" />
|
|
6
8
|
<link
|
|
7
9
|
rel="stylesheet"
|
|
8
|
-
href="https://static.
|
|
10
|
+
href="https://static.belife-bim.com/bimAir/BimAir.css"
|
|
9
11
|
/>
|
|
10
|
-
<script src="https://static.
|
|
11
|
-
<script src="https://static.
|
|
12
|
+
<script src="https://static.belife-bim.com/vue.min.js"></script>
|
|
13
|
+
<script src="https://static.belife-bim.com/bimAir/BimAir.umd.min.js"></script>
|
|
12
14
|
</head>
|
|
13
15
|
|
|
14
16
|
<body>
|
|
15
|
-
<style>
|
|
16
|
-
body {
|
|
17
|
-
margin: 0;
|
|
18
|
-
padding: 0;
|
|
19
|
-
height: 100vh;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
#app {
|
|
23
|
-
height: 100vh;
|
|
24
|
-
position: relative;
|
|
25
|
-
}
|
|
26
|
-
</style>
|
|
27
17
|
<div id="app">
|
|
18
|
+
<div class="button-group">
|
|
19
|
+
<button onclick="locateComponent()">定位模型节点</button>
|
|
20
|
+
</div>
|
|
28
21
|
<viewer-wrapper elementId="viewer" style="height: 100%; width: 100%" />
|
|
29
22
|
</div>
|
|
30
23
|
|
|
@@ -36,20 +29,25 @@
|
|
|
36
29
|
// viewerType: "model",
|
|
37
30
|
elementId: "viewer",
|
|
38
31
|
|
|
39
|
-
modelService: "https://static.
|
|
40
|
-
fileService: "https://static.
|
|
32
|
+
modelService: "https://static.belife-bim.com/modelApi",
|
|
33
|
+
fileService: "https://static.belife-bim.com/fileApi",
|
|
41
34
|
};
|
|
35
|
+
|
|
36
|
+
let component;
|
|
42
37
|
BimAir.Loader({ url: "https://static.graphicstone.com/bimAir" }).then(
|
|
43
38
|
() => {
|
|
44
39
|
let viewer = new BimAir.Viewer(options);
|
|
45
40
|
viewer
|
|
46
41
|
.loadModels(["626b4d1ebfe39e58ae7b66a2"])
|
|
47
42
|
.then((lightModels) => {
|
|
48
|
-
|
|
49
|
-
viewer.locateObject(treeNode);
|
|
43
|
+
component = lightModels[0].getComponent("243274");
|
|
50
44
|
});
|
|
51
45
|
}
|
|
52
46
|
);
|
|
47
|
+
|
|
48
|
+
function locateComponent() {
|
|
49
|
+
viewer.locateObject(component);
|
|
50
|
+
}
|
|
53
51
|
</script>
|
|
54
52
|
</body>
|
|
55
53
|
</html>
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<title>工具栏显示隐藏</title>
|
|
6
|
+
<!-- demo的样式 -->
|
|
7
|
+
<link rel="stylesheet" href="../assets/demo.css" />
|
|
8
|
+
<link
|
|
9
|
+
rel="stylesheet"
|
|
10
|
+
href="https://static.belife-bim.com/bimAir/BimAir.css"
|
|
11
|
+
/>
|
|
12
|
+
<script src="https://static.graphicstone.com/vue.min.js"></script>
|
|
13
|
+
<script src="https://static.graphicstone.com/bimAir/BimAir.umd.min.js"></script>
|
|
14
|
+
</head>
|
|
15
|
+
|
|
16
|
+
<body>
|
|
17
|
+
<div id="app">
|
|
18
|
+
<div class="button-group">
|
|
19
|
+
<button onclick="buttonVisibleToggle()">显示/隐藏工具栏</button>
|
|
20
|
+
</div>
|
|
21
|
+
<viewer-wrapper elementId="viewer" style="height: 100%; width: 100%" />
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<script type="text/javascript">
|
|
25
|
+
new Vue({
|
|
26
|
+
el: "#app",
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
let options = {
|
|
30
|
+
elementId: "viewer",
|
|
31
|
+
modelService: "https://static.graphicstone.com/modelApi",
|
|
32
|
+
fileService: "https://static.graphicstone.com/fileApi",
|
|
33
|
+
|
|
34
|
+
toolbarVisible: {
|
|
35
|
+
leftToolbar: true, //左边工具栏
|
|
36
|
+
rightToolbar: true, //右边工具栏
|
|
37
|
+
bottomToolbar: true, //底部工具栏
|
|
38
|
+
// structureTree: true, //左边结构树按钮
|
|
39
|
+
// property: true, //底部属性按钮
|
|
40
|
+
// viewPoint: true, //底部视点按钮
|
|
41
|
+
// measure: true, //底部测量按钮
|
|
42
|
+
// comment: true, //底部批注按钮
|
|
43
|
+
// label: true, //底部标签按钮
|
|
44
|
+
// cut: true, //底部按钮
|
|
45
|
+
// explosion: true, //底部全局爆炸按钮
|
|
46
|
+
// proExplosion: true, //底部专业按钮
|
|
47
|
+
// roam: true, //底部漫游按钮
|
|
48
|
+
// style: true, //底部样式按钮
|
|
49
|
+
// collision: true, //底部碰撞按钮
|
|
50
|
+
// floorPlan: true, //底部楼层平面按钮
|
|
51
|
+
// twoDDrawing: true, //底部二维图纸按钮
|
|
52
|
+
// snapshoot: true, //底部快照按钮
|
|
53
|
+
// setting: true, //底部设置按钮
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
let viewer;
|
|
58
|
+
let buttonVisible = true;
|
|
59
|
+
BimAir.Loader({
|
|
60
|
+
url: "https://static.graphicstone.com/bimAir",
|
|
61
|
+
}).then(() => {
|
|
62
|
+
viewer = new BimAir.Viewer(options);
|
|
63
|
+
viewer.loadModels(["626b4d1ebfe39e58ae7b66a2"]).then(() => {});
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
function buttonVisibleToggle() {
|
|
67
|
+
buttonVisible = !buttonVisible;
|
|
68
|
+
viewer.options.toolbarVisible.leftToolbar = buttonVisible;
|
|
69
|
+
viewer.options.toolbarVisible.rightToolbar = buttonVisible;
|
|
70
|
+
viewer.options.toolbarVisible.bottomToolbar = buttonVisible;
|
|
71
|
+
}
|
|
72
|
+
</script>
|
|
73
|
+
</body>
|
|
74
|
+
</html>
|