gs-bim-air 0.1.3-0.11 → 0.1.3-0.12

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.
Files changed (64) hide show
  1. package/READMEBETA.md +26 -0
  2. package/demo//346/250/241/345/236/213/346/223/215/344/275/234//345/212/240/350/275/275/344/270/216/345/210/240/351/231/244/346/234/215/345/212/241/345/231/250/346/250/241/345/236/213.html +43 -46
  3. package/demo//346/250/241/345/236/213/346/223/215/344/275/234//345/212/240/350/275/275/344/270/216/345/210/240/351/231/244/346/234/254/345/234/260/346/250/241/345/236/213.html +44 -47
  4. 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 +59 -64
  5. 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 +54 -62
  6. package/demo//346/250/241/345/236/213/346/225/210/346/236/234//345/212/250/346/200/201/345/210/233/345/273/272/347/224/265/345/255/220/345/233/264/346/240/217/346/223/215/344/275/234.html +6 -0
  7. package/demo//346/250/241/345/236/213/346/225/210/346/236/234//347/274/226/350/276/221/350/267/257/345/276/204.html +56 -62
  8. 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 +6 -0
  9. package/docs/README.md +2 -0
  10. package/docs/classes/AditObjects.md +18 -7
  11. package/docs/classes/AnimationManager.md +23 -15
  12. package/docs/classes/BoreholeObjects.md +23 -10
  13. package/docs/classes/CircleScanEffect.md +5 -3
  14. package/docs/classes/CircleScanEffectConfig.md +6 -6
  15. package/docs/classes/ComponentManager.md +2 -0
  16. package/docs/classes/ComponentSelector.md +13 -1
  17. package/docs/classes/CuttingOptions.md +28 -0
  18. package/docs/classes/FanScanEffect.md +5 -3
  19. package/docs/classes/FanScanEffectConfig.md +8 -8
  20. package/docs/classes/HeightLimitEffect.md +5 -3
  21. package/docs/classes/HeightLimitEffectConfig.md +3 -3
  22. package/docs/classes/HighlightManager.md +14 -6
  23. package/docs/classes/InvisibleManager.md +16 -4
  24. package/docs/classes/IsolationManager.md +16 -4
  25. package/docs/classes/LightModel.md +48 -24
  26. package/docs/classes/Material.md +14 -6
  27. package/docs/classes/MaterialManager.md +6 -0
  28. package/docs/classes/PathEffect.md +10 -4
  29. package/docs/classes/PathEffectConfig.md +5 -5
  30. package/docs/classes/SegmentObject.md +7 -1
  31. package/docs/classes/SelectionManager.md +24 -0
  32. package/docs/classes/SkyboxEffect.md +5 -1
  33. package/docs/classes/SkyboxEffectConfig.md +1 -1
  34. package/docs/classes/SnowEffect.md +3 -1
  35. package/docs/classes/SnowEffectConfig.md +1 -1
  36. package/docs/classes/StructureTreeManager.md +4 -0
  37. package/docs/classes/ViewPointPanel.md +15 -100
  38. package/docs/classes/Viewer.md +154 -46
  39. package/docs/classes/WallEffect.md +26 -6
  40. package/docs/classes/WallEffectConfig.md +5 -5
  41. package/docs/classes/WallScanEffect.md +5 -3
  42. package/docs/classes/WallScanEffectConfig.md +7 -7
  43. package/docs/classes/WaterEffect.md +5 -1
  44. package/docs/classes/WaterEffectConfig.md +1 -1
  45. package/docs/enums/CuttingCreateType.md +10 -0
  46. package/docs/interfaces/Options.md +4 -4
  47. package/lib/BimAir.common-report.html +2 -2
  48. package/lib/BimAir.common.js +45 -45
  49. package/lib/BimAir.css +118 -46
  50. package/lib/BimAir.umd-report.html +2 -2
  51. package/lib/BimAir.umd.js +45 -45
  52. package/lib/BimAir.umd.min-report.html +2 -2
  53. package/lib/BimAir.umd.min.js +45 -45
  54. package/lib/fonts/iconfont.84ed7d57.woff +0 -0
  55. package/lib/fonts/{iconfont.3714096d.ttf → iconfont.864cead3.ttf} +0 -0
  56. package/lib/fonts/iconfont.d27373d5.woff2 +0 -0
  57. package/package.json +1 -1
  58. package/public/js/longan/longan.js +2592 -3806
  59. package/public/js/longan/longan.wasm +0 -0
  60. package/public/js/longan/longan.worker.js +54 -36
  61. package/public/js/longanWithoutShareArrayBuffer/longan.js +1625 -1644
  62. package/public/js/longanWithoutShareArrayBuffer/longan.wasm +0 -0
  63. package/lib/fonts/iconfont.31a4f3ad.woff2 +0 -0
  64. package/lib/fonts/iconfont.4750dd2c.woff +0 -0
package/READMEBETA.md CHANGED
@@ -222,6 +222,28 @@ viewer.camera.projection = BimAir.Longan.ProjectionType.Perspective; //透视投
222
222
 
223
223
  - 修改设置颜色以及锁定颜色的逻辑
224
224
 
225
+ ### 0.0.30.23
226
+
227
+ - 修复钻孔和平硐 z 轴朝向问题
228
+ - 修复标签无法清空面板数据问题
229
+
230
+ ### 0.0.30.24
231
+
232
+ - 修改钻孔模型生成逻辑
233
+ - 钻孔、平硐模型添加修改颜色参数
234
+ - 添加多构件聚焦定位功能
235
+
236
+ ### 0.0.30.25
237
+
238
+ - 更新 public/js 里的内核文件,安装此版本需替换 js 文件夹
239
+ - 修复模型不显示的问题
240
+
241
+ ### 0.0.30.26
242
+
243
+ - 修复投影设置有问题
244
+ - 修复颜色设置报错问题
245
+ - 修改钻孔生成逻辑
246
+
225
247
  ## BETA2 日志
226
248
 
227
249
  ### 0.1.30.1
@@ -268,3 +290,7 @@ viewer.camera.projection = BimAir.Longan.ProjectionType.Perspective; //透视投
268
290
  - 更新 public/js 里的内核文件,安装此版本需替换 js 文件夹
269
291
  - 修复路径问题
270
292
  - 修改视点接口
293
+
294
+ ### 0.1.30.12
295
+
296
+ - 修复用户校验 token 失效的问题
@@ -1,52 +1,49 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <title>加载服务器模型</title>
6
+ <link rel="stylesheet" href="https://static.graphicstone.com/bimAir/BimAir.css" />
7
+ <script src="https://static.graphicstone.com/vue.min.js"></script>
8
+ <script src="https://static.graphicstone.com/bimAir/BimAir.umd.min.js"></script>
9
+ </head>
3
10
 
4
- <head>
5
- <meta charset="UTF-8">
6
- <title>加载服务器模型</title>
7
- <link rel="stylesheet" href="https://static.graphicstone.com/bimAir/BimAir.css">
8
- <script src="https://static.graphicstone.com/vue.min.js"></script>
9
- <script src="https://static.graphicstone.com/bimAir/BimAir.umd.min.js"></script>
10
- </head>
11
+ <body>
12
+ <style>
13
+ body {
14
+ margin: 0;
15
+ padding: 0;
16
+ height: 100vh;
17
+ }
11
18
 
12
- <body>
13
- <style>
14
- body {
15
- margin: 0;
16
- padding: 0;
17
- height: 100vh;
18
- }
19
+ #app {
20
+ height: 100vh;
21
+ position: relative;
22
+ }
23
+ </style>
24
+ <div id="app">
25
+ <viewer-wrapper elementId="viewer" style="height: 100%; width: 100%" />
26
+ </div>
19
27
 
20
- #app {
21
- height: 100vh;
22
- position: relative;
23
- }
24
- </style>
25
- <div id="app">
26
- <viewer-wrapper elementId="viewer" style="height: 100%; width: 100%" />
27
- </div>
28
+ <script type="text/javascript">
29
+ new Vue({
30
+ el: "#app",
31
+ });
28
32
 
29
- <script type="text/javascript">
30
- new Vue({
31
- el: '#app',
32
- });
33
-
34
- let options = {
35
- elementId: "viewer",
36
- modelService: "https://8.134.85.254:9037/api",
37
- fileService: "https://static.graphicstone.com/fileApi",
38
- background: "linear-gradient(#e3fcfc, #f6ffff)",
39
- }
40
- BimAir.Loader({
41
- url: "https://static.graphicstone.com/bimAir",
42
-
43
- }).then(() => {
44
- let viewer = new BimAir.Viewer(options)
45
- viewer.loadModels([{ id: "62abe955ab11b5128dac946b", version: 1 }]).then((lightModel) => {
46
- viewer.fitWorld()
47
- });
48
- })
49
- </script>
50
- </body>
51
-
52
- </html>
33
+ let options = {
34
+ elementId: "viewer",
35
+ modelService: "https://static.graphicstone.com/modelApi",
36
+ fileService: "https://static.graphicstone.com/fileApi",
37
+ background: "linear-gradient(#e3fcfc, #f6ffff)",
38
+ };
39
+ BimAir.Loader({
40
+ url: "https://static.graphicstone.com/bimAir",
41
+ }).then(() => {
42
+ let viewer = new BimAir.Viewer(options);
43
+ viewer.loadModels([{ id: "626b4d1ebfe39e58ae7b66a2", version: 1 }]).then(lightModel => {
44
+ viewer.setViewMode(BimAir.Longan.ViewMode.Iso, true);
45
+ });
46
+ });
47
+ </script>
48
+ </body>
49
+ </html>
@@ -1,52 +1,49 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6
+ <meta name="viewport" content="width=device-width,initial-scale=1.0" />
7
+ <link rel="icon" href="<%= BASE_URL %>favicon.ico" />
8
+ <title>加载与删除本地模型</title>
9
+ <link rel="stylesheet" href="https://static.graphicstone.com/bimAir/BimAir.css" />
10
+ <script src="https://static.graphicstone.com/vue.min.js"></script>
11
+ <script src="https://static.graphicstone.com/bimAir/BimAir.umd.min.js"></script>
12
+ </head>
3
13
 
4
- <head>
5
- <meta charset="utf-8">
6
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
7
- <meta name="viewport" content="width=device-width,initial-scale=1.0">
8
- <link rel="icon" href="<%= BASE_URL %>favicon.ico">
9
- <title>加载与删除本地模型</title>
10
- <link rel="stylesheet" href="https://static.graphicstone.com/bimAir/BimAir.css">
11
- <script src="https://static.graphicstone.com/vue.min.js"></script>
12
- <script src="https://static.graphicstone.com/bimAir/BimAir.umd.min.js"></script>
13
- </head>
14
+ <body>
15
+ <style>
16
+ body {
17
+ margin: 0;
18
+ padding: 0;
19
+ height: 100vh;
20
+ }
14
21
 
15
- <body>
16
- <style>
17
- body {
18
- margin: 0;
19
- padding: 0;
20
- height: 100vh;
21
- }
22
+ #app {
23
+ height: 100vh;
24
+ position: relative;
25
+ }
26
+ </style>
27
+ <div id="app">
28
+ <viewer-wrapper elementId="viewer" style="height: 100%; width: 100%" />
29
+ </div>
30
+ <script>
31
+ new Vue({
32
+ el: "#app",
33
+ });
22
34
 
23
- #app {
24
- height: 100vh;
25
- position: relative;
26
- }
27
- </style>
28
- <div id="app">
29
- <viewer-wrapper elementId="viewer" style="height: 100%; width: 100%" />
30
- </div>
31
- <script>
32
- new Vue({
33
- el: '#app',
34
- });
35
-
36
- let options = {
37
- elementId: "viewer",
38
- modelService: "https://static.graphicstone.com/modelApi",
39
- fileService: "https://static.graphicstone.com/fileApi",
40
- background: "linear-gradient(#e3fcfc, #f6ffff)",
41
- }
42
- BimAir.Loader({ url: "https://static.graphicstone.com/bimAir" }).then(() => {
43
- let viewer = new BimAir.Viewer("viewer");
44
- viewer.loadLocalModel("./别墅.gsl", "别墅").then((lightModel) => {
45
- viewer.fitWorld();
46
-
47
- });
48
- })
49
- </script>
50
- </body>
51
-
52
- </html>
35
+ let options = {
36
+ elementId: "viewer",
37
+ modelService: "https://static.graphicstone.com/modelApi",
38
+ fileService: "https://static.graphicstone.com/fileApi",
39
+ background: "linear-gradient(#e3fcfc, #f6ffff)",
40
+ };
41
+ BimAir.Loader({ url: "https://static.graphicstone.com/bimAir" }).then(() => {
42
+ let viewer = new BimAir.Viewer("viewer");
43
+ viewer.loadLocalModel("./别墅.gsl", "别墅").then(lightModel => {
44
+ viewer.setViewMode(BimAir.Longan.ViewMode.Iso, true);
45
+ });
46
+ });
47
+ </script>
48
+ </body>
49
+ </html>
@@ -1,66 +1,61 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
-
4
- <head>
5
- <meta charset="UTF-8">
6
- <title>创建视图</title>
7
- <link rel="stylesheet" href="https://static.graphicstone.com/bimAir/BimAir.css">
8
- <script src="https://static.graphicstone.com/vue.min.js"></script>
9
- <script src="https://static.graphicstone.com/bimAir/BimAir.umd.min.js"></script>
10
-
11
- </head>
12
-
13
- <body>
14
- <style>
15
- body {
16
- margin: 0;
17
- padding: 0;
18
- height: 100vh;
19
- }
20
-
21
- #app {
22
- height: 100vh;
23
- position: relative;
24
- }
25
- </style>
26
- <div id="app">
27
- <viewer-wrapper elementId="viewer" style="height: 100%; width: 50%" />
28
- <viewer-wrapper elementId="viewer2" style="height: 100%; width: 50%" />
29
- </div>
30
-
31
-
32
- <script type="text/javascript">
33
- new Vue({
34
- el: '#app',
35
- });
36
-
37
- let options = {
38
- // viewerType: "model",
39
- elementId: "viewer",
40
- modelService: "https://static.graphicstone.com/modelApi",
41
- fileService: "https://static.graphicstone.com/fileApi",
42
- background: "linear-gradient(#e3fcfc, #f6ffff)",
43
- }
44
- let options2 = {
45
- // viewerType: "model",
46
- elementId: "viewer2",
47
- modelService: "https://static.graphicstone.com/modelApi",
48
- fileService: "https://static.graphicstone.com/fileApi",
49
- background: "linear-gradient(#e3fcfc, #f6ffff)",
50
- }
51
- BimAir.Loader({ url: "https://static.graphicstone.com/bimAir" }).then(() => {
52
- let viewer = new BimAir.Viewer(options)
53
- let viewer2 = new BimAir.Viewer(options2)
54
-
55
- viewer.loadModels(["6253e9d6b0545a0a6e49bf85"]).then(() => {
56
- viewer.fitWorld();
57
- });
58
- viewer2.loadModels(["6253e9d6b0545a0a6e49bf85"]).then(() => {
59
- viewer2.fitWorld();
60
- });
61
- })
62
- </script>
63
-
64
- </body>
65
-
66
- </html>
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <title>创建视图</title>
6
+ <link rel="stylesheet" href="https://static.graphicstone.com/bimAir/BimAir.css" />
7
+ <script src="https://static.graphicstone.com/vue.min.js"></script>
8
+ <script src="https://static.graphicstone.com/bimAir/BimAir.umd.min.js"></script>
9
+ </head>
10
+
11
+ <body>
12
+ <style>
13
+ body {
14
+ margin: 0;
15
+ padding: 0;
16
+ height: 100vh;
17
+ }
18
+
19
+ #app {
20
+ height: 100vh;
21
+ position: relative;
22
+ }
23
+ </style>
24
+ <div id="app">
25
+ <viewer-wrapper elementId="viewer" style="height: 100%; width: 50%" />
26
+ <viewer-wrapper elementId="viewer2" style="height: 100%; width: 50%" />
27
+ </div>
28
+
29
+ <script type="text/javascript">
30
+ new Vue({
31
+ el: "#app",
32
+ });
33
+
34
+ let options = {
35
+ // viewerType: "model",
36
+ elementId: "viewer",
37
+ modelService: "https://static.graphicstone.com/modelApi",
38
+ fileService: "https://static.graphicstone.com/fileApi",
39
+ background: "linear-gradient(#e3fcfc, #f6ffff)",
40
+ };
41
+ let options2 = {
42
+ // viewerType: "model",
43
+ elementId: "viewer2",
44
+ modelService: "https://static.graphicstone.com/modelApi",
45
+ fileService: "https://static.graphicstone.com/fileApi",
46
+ background: "linear-gradient(#e3fcfc, #f6ffff)",
47
+ };
48
+ BimAir.Loader({ url: "https://static.graphicstone.com/bimAir" }).then(() => {
49
+ let viewer = new BimAir.Viewer(options);
50
+ let viewer2 = new BimAir.Viewer(options2);
51
+
52
+ viewer.loadModels(["6253e9d6b0545a0a6e49bf85"]).then(() => {
53
+ viewer.setViewMode(BimAir.Longan.ViewMode.Iso, true);
54
+ });
55
+ viewer2.loadModels(["6253e9d6b0545a0a6e49bf85"]).then(() => {
56
+ viewer2.fitWorld();
57
+ });
58
+ });
59
+ </script>
60
+ </body>
61
+ </html>
@@ -1,67 +1,59 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6
+ <meta name="viewport" content="width=device-width,initial-scale=1.0" />
7
+ <link rel="icon" href="<%= BASE_URL %>favicon.ico" />
8
+ <title>NWH-BIMCloud</title>
9
+ <link rel="stylesheet" href="https://static.graphicstone.com/bimAir/BimAir.css" />
10
+ <script src="https://static.graphicstone.com/vue.min.js"></script>
11
+ <script src="https://static.graphicstone.com/bimAir/BimAir.umd.min.js"></script>
12
+ </head>
3
13
 
4
- <head>
5
- <meta charset="utf-8">
6
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
7
- <meta name="viewport" content="width=device-width,initial-scale=1.0">
8
- <link rel="icon" href="<%= BASE_URL %>favicon.ico">
9
- <title>NWH-BIMCloud</title>
10
- <link rel="stylesheet" href="https://static.graphicstone.com/bimAir/BimAir.css">
11
- <script src="https://static.graphicstone.com/vue.min.js"></script>
12
- <script src="https://static.graphicstone.com/bimAir/BimAir.umd.min.js"></script>
13
- </head>
14
+ <body>
15
+ <style>
16
+ body {
17
+ margin: 0;
18
+ padding: 0;
19
+ height: 100vh;
20
+ }
14
21
 
15
- <body>
16
- <style>
17
- body {
18
- margin: 0;
19
- padding: 0;
20
- height: 100vh;
21
- }
22
+ #app {
23
+ height: 100vh;
24
+ position: relative;
25
+ }
26
+ </style>
27
+ <div id="app">
28
+ <viewer-wrapper elementId="viewer" style="height: 100%; width: 100%" />
29
+ </div>
22
30
 
23
- #app {
24
- height: 100vh;
25
- position: relative;
26
- }
27
- </style>
28
- <div id="app">
29
- <viewer-wrapper elementId="viewer" style="height: 100%; width: 100%" />
30
- </div>
31
-
32
- <script type="text/javascript">
33
- new Vue({
34
- el: '#app',
35
- });
36
- let options = {
37
- // viewerType: "model",
38
- elementId: "viewer",
39
- id: "6253e9d6b0545a0a6e49bf85",
40
- modelService: "https://static.graphicstone.com/modelApi",
41
- fileService: "https://static.graphicstone.com/fileApi",
42
- background: "linear-gradient(#e3fcfc, #f6ffff)",
43
- }
44
- BimAir.Loader({ url: "https://static.graphicstone.com/bimAir" }).then(() => {
45
- let viewer = new BimAir.Viewer(options)
46
- let path = [
47
- 100.0, 100.0, 0,
48
- 200.0, 200.0, 0,
49
- 300.0, 300.0, 0,
50
- 400.0, 400.0, 0,
51
- 500.0, 500.0, 0,
52
- 600.0, 600.0, 0,
53
- 700.0, 700.0, 0
54
- ];
55
- let pathEffectConfig = new BimAir.Animation.PathEffectConfig(viewer, "路径1", path, 10, 0.1);
56
- let pathEffect = new BimAir.Animation.PathEffect(pathEffectConfig);
57
- pathEffect.createPath().then(() => {
58
- let path1 = viewer.getLightModel("路径1");
59
- viewer.fitWorld();
60
- viewer.locate(path1);
61
- })
62
- });
63
-
64
- </script>
65
- </body>
66
-
67
- </html>
31
+ <script type="text/javascript">
32
+ new Vue({
33
+ el: "#app",
34
+ });
35
+ let options = {
36
+ // viewerType: "model",
37
+ elementId: "viewer",
38
+ id: "6253e9d6b0545a0a6e49bf85",
39
+ modelService: "https://static.graphicstone.com/modelApi",
40
+ fileService: "https://static.graphicstone.com/fileApi",
41
+ background: "linear-gradient(#e3fcfc, #f6ffff)",
42
+ };
43
+ BimAir.Loader({ url: "https://static.graphicstone.com/bimAir" }).then(() => {
44
+ let viewer = new BimAir.Viewer(options);
45
+ let path = [
46
+ 100.0, 100.0, 0, 200.0, 200.0, 0, 300.0, 300.0, 0, 400.0, 400.0, 0, 500.0, 500.0, 0, 600.0, 600.0,
47
+ 0, 700.0, 700.0, 0,
48
+ ];
49
+ let pathEffectConfig = new BimAir.Animation.PathEffectConfig(viewer, "路径1", path, 10, 0.1);
50
+ let pathEffect = new BimAir.Animation.PathEffect(pathEffectConfig);
51
+ pathEffect.createPath().then(() => {
52
+ let path1 = viewer.getLightModel("路径1");
53
+ viewer.setViewMode(BimAir.Longan.ViewMode.Iso, true);
54
+ viewer.locate(path1);
55
+ });
56
+ });
57
+ </script>
58
+ </body>
59
+ </html>
@@ -20,6 +20,12 @@
20
20
  height: 100vh;
21
21
  position: relative;
22
22
  }
23
+
24
+ .button-group{
25
+ position: absolute;
26
+ top: 0;
27
+ z-index: 100;
28
+ }
23
29
  </style>
24
30
  <div id="app">
25
31
  <!-- <div id="viewer">
@@ -1,68 +1,62 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6
+ <meta name="viewport" content="width=device-width,initial-scale=1.0" />
7
+ <link rel="icon" href="<%= BASE_URL %>favicon.ico" />
8
+ <title>NWH-BIMCloud</title>
9
+ <link rel="stylesheet" href="https://static.graphicstone.com/bimAir/BimAir.css" />
10
+ <script src="https://static.graphicstone.com/vue.min.js"></script>
11
+ <script src="https://static.graphicstone.com/bimAir/BimAir.umd.min.js"></script>
12
+ </head>
3
13
 
4
- <head>
5
- <meta charset="utf-8">
6
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
7
- <meta name="viewport" content="width=device-width,initial-scale=1.0">
8
- <link rel="icon" href="<%= BASE_URL %>favicon.ico">
9
- <title>NWH-BIMCloud</title>
10
- <link rel="stylesheet" href="https://static.graphicstone.com/bimAir/BimAir.css">
11
- <script src="https://static.graphicstone.com/vue.min.js"></script>
12
- <script src="https://static.graphicstone.com/bimAir/BimAir.umd.min.js"></script>
13
- </head>
14
+ <body>
15
+ <style>
16
+ body {
17
+ margin: 0;
18
+ padding: 0;
19
+ height: 100vh;
20
+ }
14
21
 
15
- <body>
16
- <style>
17
- body {
18
- margin: 0;
19
- padding: 0;
20
- height: 100vh;
21
- }
22
+ #app {
23
+ height: 100vh;
24
+ position: relative;
25
+ }
26
+ </style>
27
+ <div id="app">
28
+ <viewer-wrapper elementId="viewer" style="height: 100%; width: 100%" />
29
+ </div>
22
30
 
23
- #app {
24
- height: 100vh;
25
- position: relative;
26
- }
27
- </style>
28
- <div id="app">
29
- <viewer-wrapper elementId="viewer" style="height: 100%; width: 100%" />
30
- </div>
31
+ <script type="text/javascript">
32
+ new Vue({
33
+ el: "#app",
34
+ });
35
+ let options = {
36
+ // viewerType: "model",
37
+ elementId: "viewer",
38
+ id: "6253e9d6b0545a0a6e49bf85",
39
+ modelService: "https://static.graphicstone.com/modelApi",
40
+ fileService: "https://static.graphicstone.com/fileApi",
41
+ background: "linear-gradient(#e3fcfc, #f6ffff)",
42
+ };
43
+ BimAir.Loader({ url: "https://static.graphicstone.com/bimAir" }).then(() => {
44
+ let viewer = new BimAir.Viewer(options);
45
+ let path = [0.0, 0.0, 0, 100.0, 100.0, 0];
46
+ let pathEffectConfig = new BimAir.Animation.PathEffectConfig(viewer, "路径1", path, 10, 0.1);
47
+ let pathEffect = new BimAir.Animation.PathEffect(pathEffectConfig);
48
+ pathEffect.createPath().then(() => {
49
+ let path1 = viewer.getLightModel("路径1");
50
+ viewer.setViewMode(BimAir.Longan.ViewMode.Iso, true);
51
+ viewer.locate(path1);
52
+ });
31
53
 
32
- <script type="text/javascript">
33
- new Vue({
34
- el: '#app',
35
- });
36
- let options = {
37
- // viewerType: "model",
38
- elementId: "viewer",
39
- id: "6253e9d6b0545a0a6e49bf85",
40
- modelService: "https://static.graphicstone.com/modelApi",
41
- fileService: "https://static.graphicstone.com/fileApi",
42
- background: "linear-gradient(#e3fcfc, #f6ffff)",
43
- }
44
- BimAir.Loader({ url: "https://static.graphicstone.com/bimAir" }).then(() => {
45
- let viewer = new BimAir.Viewer(options);
46
- let path = [
47
- 0.0, 0.0, 0,
48
- 100.0, 100.0, 0,
49
- ];
50
- let pathEffectConfig = new BimAir.Animation.PathEffectConfig(viewer, "路径1", path, 10, 0.1);
51
- let pathEffect = new BimAir.Animation.PathEffect(pathEffectConfig);
52
- pathEffect.createPath().then(() => {
53
- let path1 = viewer.getLightModel("路径1");
54
- viewer.fitWorld();
55
- viewer.locate(path1);
56
- })
57
-
58
- setInterval(() => {
59
- path.push(300 * Math.random(), 300 * Math.random(), 0);
60
- pathEffect.editPath(path);
61
- viewer.updateDisplay();
62
- }, 1000)
63
- });
64
-
65
- </script>
66
- </body>
67
-
68
- </html>
54
+ setInterval(() => {
55
+ path.push(300 * Math.random(), 300 * Math.random(), 0);
56
+ pathEffect.editPath(path);
57
+ viewer.updateDisplay();
58
+ }, 1000);
59
+ });
60
+ </script>
61
+ </body>
62
+ </html>
@@ -67,11 +67,17 @@
67
67
  let material = new Material(viewer, "1");
68
68
  material.setColor(255, 0, 0, 1);
69
69
 
70
+ //需要检测的碰撞类型
71
+ let type = BimAir.Longan.CollisionType.Touch | BimAir.Longan.CollisionType.Contain | BimAir.Longan.CollisionType.Soft | BimAir.Longan.CollisionType.Intersect;
72
+ //软碰撞距离
73
+ this.viewer.softCollisionDistance = 0.1;
74
+
70
75
  setTimeout(() => {
71
76
  viewer
72
77
  .computeObjectCollisions(
73
78
  [sphere],
74
79
  components,
80
+ type,
75
81
  (viewer, total, current) => {
76
82
  console.log(total, current);
77
83
  }
package/docs/README.md CHANGED
@@ -67,6 +67,8 @@ gs-bim-air
67
67
 
68
68
  ▸ **Loader**(`config?`): `Promise`<`void`\>
69
69
 
70
+ 加载BimAir所需静态依赖文件
71
+
70
72
  #### Parameters
71
73
 
72
74
  | Name | Type | Default value |