gs-bim-air 2.0.0-beta.3 → 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.
Files changed (112) hide show
  1. package/README.md +27 -3
  2. package/demo/assets/demo.css +28 -0
  3. 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
  4. 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
  5. 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
  6. 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
  7. 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
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. package/demo//346/250/241/345/236/213/344/272/244/344/272/222//350/256/276/347/275/256viewHouse.html +92 -0
  16. 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
  17. 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
  18. 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
  19. 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
  20. 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
  21. 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
  22. 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
  23. 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
  24. 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
  25. 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
  26. 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
  27. 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
  28. 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
  29. 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
  30. 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
  31. 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
  32. 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
  33. package/demo//346/250/241/345/236/213/346/225/210/346/236/234/UV/345/212/250/347/224/273.html +9 -19
  34. 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
  35. 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
  36. 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
  37. 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
  38. 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
  39. 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
  40. 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
  41. 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
  42. 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
  43. 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
  44. 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
  45. 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
  46. 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
  47. 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
  48. 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
  49. 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
  50. 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
  51. 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
  52. 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
  53. 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
  54. 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
  55. 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
  56. 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
  57. 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
  58. 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
  59. 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
  60. 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
  61. 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
  62. 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
  63. 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
  64. 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
  65. 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
  66. package/docs/classes/{Animation.uvEffect.md → Animation.UvEffect.md} +10 -10
  67. package/docs/classes/Longan.CameraMouse.md +23 -7
  68. package/docs/classes/Longan.CameraPlanMouse.md +31 -11
  69. package/docs/classes/Longan.EarthCameraMouse.md +31 -11
  70. package/docs/classes/Longan.PanoramaCameraMouse.md +31 -11
  71. package/docs/classes/Longan.PerspectiveCameraMouse.md +31 -11
  72. package/docs/classes/Material.md +1 -1
  73. package/docs/modules/Animation.md +1 -1
  74. package/lib/BimAir.common-report.html +2 -2
  75. package/lib/BimAir.common.js +22 -22
  76. package/lib/BimAir.css +41 -41
  77. package/lib/BimAir.umd-report.html +2 -2
  78. package/lib/BimAir.umd.js +22 -22
  79. package/lib/BimAir.umd.min-report.html +2 -2
  80. package/lib/BimAir.umd.min.js +22 -22
  81. package/lib/undefined.gzundefined +0 -0
  82. package/package.json +1 -1
  83. package/public/js/longan/longan.js +1013 -1019
  84. package/public/js/longan/longan.wasm +0 -0
  85. package/public/js/longan/longan.worker.js +43 -51
  86. package/public/js/longanWithoutShareArrayBuffer/longan.js +1 -1
  87. package/public/js/longanWithoutShareArrayBuffer/longan.wasm +0 -0
  88. 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
  89. 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
  90. 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
  91. 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
  92. 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
  93. 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
  94. 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
  95. 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
  96. 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
  97. 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
  98. 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
  99. 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
  100. 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
  101. 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
  102. 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
  103. 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
  104. 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
  105. 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
  106. 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
  107. 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
  108. 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
  109. 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
  110. 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
  111. 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
  112. 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
@@ -1,157 +0,0 @@
1
- <head>
2
- <meta charset="UTF-8">
3
- <title>多模型操作</title>
4
- <link rel="stylesheet" href="https://static.graphicstone.com/bimAir/BimAir.css">
5
- <script src="https://static.graphicstone.com/vue.min.js"></script>
6
- <script src="https://static.graphicstone.com/bimAir/BimAir.umd.min.js"></script>
7
- </link>
8
-
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
-
24
- button {
25
- margin: 20px 20px 20px 20px;
26
- width: 180px;
27
- height: 40px;
28
- border-radius: 3px;
29
- border: none;
30
- background: #0066ffe4;
31
- color: #FFFFFF;
32
- outline: none;
33
- }
34
-
35
- .button-group {
36
- position: absolute;
37
- z-index: 100;
38
- top: 5px;
39
- left: 70px;
40
- }
41
- </style>
42
- <div id="app">
43
- <!-- <div id="viewer">
44
- </div> -->
45
- <div class="button-group">
46
- <button onclick="funVisible()">构件隐藏</button>
47
- <button onclick="funEmphasize()">构件强调</button>
48
- </div>
49
- <viewer-wrapper elementId="viewer" style="height: 100%; width: 100%" />
50
-
51
- </div>
52
-
53
- <script type="text/javascript">
54
-
55
-
56
- new Vue({
57
- el: '#app',
58
- });
59
-
60
- let options = {
61
- // viewerType: "model",
62
- elementId: "viewer",
63
- id: "6253e9d6b0545a0a6e49bf85",
64
- modelService: "http://8.134.85.254:9036/api",
65
- fileService: "http://8.134.85.254:9040/api",
66
-
67
- };
68
-
69
- let home_cameraView = {
70
- position: new Float64Array([63.85, -114.21, 34.68]),
71
- target: new Float64Array([-42.33, 70.52, -46.67]),
72
- up: new Float64Array([-0.177, 0.309, 0.934]),
73
- height: 228.08677009579034,
74
- width: 228.08677009579034,
75
- };
76
-
77
- let cameraView = {
78
- position: new Float64Array([0, 0, 0]),
79
- target: new Float64Array([0, 0, 0]),
80
- up: new Float64Array([0, 0, 0]),
81
- height: 0,
82
- width: 0,
83
- };
84
-
85
- let viewer;
86
- let lightModels;
87
- let tag_view = false;
88
- let tag_visible = true;
89
- let tag_color = 118;
90
- //let bangonglouModelId = "62ba4f503a591513fe17d930";
91
-
92
- BimAir.Loader({ url: "https://static.graphicstone.com/bimAir" }).then(() => {
93
- viewer = new BimAir.Viewer(options);
94
- this.viewer = viewer;
95
- //viewer.isUpdateTt = true;
96
- let bangonglouModelId = "62e35430525bed6af87fb12c";
97
- let bieshuModelId = "62e35436525bed6af87fb163";
98
- this.viewer.loadModels([bangonglouModelId, bieshuModelId]).then((lightModels) => {
99
-
100
- lightModels[1].rotate = [1, 1, 270];
101
- lightModels[1].translate = [40, 40, 0.45];
102
- lightModels[1].scale = [1.2, 1.2, 1.2];
103
-
104
- this.viewer.setViewMode(BimAir.Longan.ViewMode.Iso, true);
105
-
106
- // this.viewer.camera.position = home_cameraView.position;
107
- // this.viewer.camera.target = home_cameraView.target;
108
- // this.viewer.camera.up = home_cameraView.up;
109
- // this.viewer.camera.setField(home_cameraView.width, home_cameraView.height);
110
- this.lightModels = lightModels;
111
- this.viewer.updateDisplay();
112
- });
113
-
114
- })
115
-
116
- function funVisible() {
117
- if (this.tag_visible) {
118
- this.lightModels[1].setComponentsVisible(["234936"], false);
119
- this.viewer.updateDisplay();
120
- this.tag_visible = !this.tag_visible;
121
- } else {
122
- this.lightModels[1].setComponentsVisible(["234936"], true);
123
- this.viewer.updateDisplay();
124
- this.tag_visible = !this.tag_visible;
125
- }
126
- }
127
-
128
- function funEmphasize() {
129
- console.log("funEmphasize##########", tag_color);
130
- let material = new BimAir.Material(this.viewer, "test");
131
- setInterval(() => {
132
- let color_R = 0;
133
- let color_G = tag_color;
134
- let color_U = 0;
135
- if (color_G >= 102) {
136
- color_U = 255;
137
- color_R = (color_G - 102) * 1.6;
138
- } else {
139
- color_R = 0;
140
- color_U = 255 - (102 - color_G) * 2.5;
141
- }
142
- material.setColor(color_R, color_G, color_U, 1);
143
- this.lightModels[0].setComponentsColor(["384359"], material)
144
- this.viewer.updateDisplay();
145
- tag_color += 20;
146
- tag_color %= 254;
147
- }, 100);
148
- }
149
-
150
-
151
-
152
-
153
- </script>
154
-
155
- </body>
156
-
157
- </html>
@@ -1,250 +0,0 @@
1
- <head>
2
- <meta charset="UTF-8">
3
- <title>构件复制</title>
4
- <link rel="stylesheet" href="https://static.graphicstone.com/bimAir/BimAir.css">
5
- <script src="https://static.graphicstone.com/vue.min.js"></script>
6
- <script src="https://static.graphicstone.com/bimAir/BimAir.umd.min.js"></script>
7
- </link>
8
-
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
-
24
- button {
25
- margin: 20px 20px 20px 20px;
26
- width: 180px;
27
- height: 40px;
28
- border-radius: 3px;
29
- border: none;
30
- background: #0066ffe4;
31
- color: #FFFFFF;
32
- outline: none;
33
- }
34
-
35
- .button-group {
36
- position: absolute;
37
- z-index: 100;
38
- top: 5px;
39
- left: 70px;
40
- }
41
- </style>
42
- <div id="app">
43
- <!-- <div id="viewer">
44
- </div> -->
45
- <div class="button-group">
46
- <button onclick="funIsolation()">透明场景</button>
47
- <button onclick="funIsolation()">取消透明</button>
48
- <button onclick="funCopy()">复制构件</button>
49
- <button onclick="funCopySetColor()">设置复制构件颜色</button>
50
- <button onclick="funCopySetIsolation()">设置复制构件隔离</button>
51
- </div>
52
- <viewer-wrapper elementId="viewer" style="height: 100%; width: 100%" />
53
-
54
- </div>
55
-
56
- <script type="text/javascript">
57
-
58
-
59
- new Vue({
60
- el: '#app',
61
- });
62
-
63
- let options = {
64
- // viewerType: "model",
65
- elementId: "viewer",
66
- id: "6253e9d6b0545a0a6e49bf85",
67
- modelService: "http://8.134.85.254:9036/api",
68
- fileService: "http://8.134.85.254:9040/api",
69
-
70
- };
71
-
72
- let viewer;
73
- let lightModels;
74
- let tag_view = true;
75
- let tag_visible = true;
76
- let tag_color = 118;
77
- let tag_isolation = true;
78
- let tag_add = true;
79
- let zhengtiCopy1;
80
- let zhengtiCopy2;
81
- let zhengtiCopy3;
82
-
83
- BimAir.Loader({ url: "https://static.graphicstone.com/bimAir" }).then(() => {
84
- viewer = new BimAir.Viewer(options);
85
-
86
- let zhengtiModelId = "62bd06f903225b3400fa4a1a";
87
- let changfangModelId = "62bd0aaf03225b3400fa4cc7";
88
- viewer.loadModels([changfangModelId, zhengtiModelId]).then((resLightModels) => {
89
-
90
- viewer.setViewMode(BimAir.Longan.ViewMode.Iso, true);
91
- lightModels = resLightModels;
92
- viewer.updateDisplay();
93
- });
94
-
95
- })
96
-
97
- function funIsolation() {
98
- if (tag_isolation) {
99
- lightModels[0].setAllComponentsIsolation(true);
100
- viewer.updateDisplay();
101
- tag_isolation = !tag_isolation
102
- } else {
103
- lightModels[0].setAllComponentsIsolation(false);
104
- viewer.updateDisplay();
105
- tag_isolation = !tag_isolation;
106
- }
107
- }
108
-
109
- function funCopy() {
110
- let jizu2 = viewer.structureTreeManager.getTreeNodesByName("MED-C-01-CF-ZCF-000-001(2#机组)");
111
- let jizu2segObj = jizu2.items[0].segmentObject;
112
- let jizu2_bb = viewer.computeViewBoundingBox(jizu2segObj.segment);
113
- let jizu2_bb_center = new Float64Array([
114
- (jizu2_bb[0] + jizu2_bb[3]) / 2,
115
- (jizu2_bb[1] + jizu2_bb[4]) / 2,
116
- (jizu2_bb[2] + jizu2_bb[5]) / 2,
117
- ]);
118
- let jizu3 = viewer.structureTreeManager.getTreeNodesByName("MED-C-01-CF-ZCF-000-003(3#机组)");
119
- let jizu3segObj = jizu3.items[0].segmentObject;
120
- let jizu3_bb = viewer.computeViewBoundingBox(jizu3segObj.segment);
121
- let jizu3_bb_center = new Float64Array([
122
- (jizu3_bb[0] + jizu3_bb[3]) / 2,
123
- (jizu3_bb[1] + jizu3_bb[4]) / 2,
124
- (jizu3_bb[2] + jizu3_bb[5]) / 2,
125
- ]);
126
- let jizu4 = viewer.structureTreeManager.getTreeNodesByName("MED-C-01-CF-ZCF-001-004(4#机组)");
127
- let jizu4segObj = jizu4.items[0].segmentObject;
128
- let jizu4_bb = viewer.computeViewBoundingBox(jizu4segObj.segment);
129
- let jizu4_bb_center = new Float64Array([
130
- (jizu4_bb[0] + jizu4_bb[3]) / 2,
131
- (jizu4_bb[1] + jizu4_bb[4]) / 2,
132
- (jizu4_bb[2] + jizu4_bb[5]) / 2,
133
- ]);
134
- let jizu5 = viewer.structureTreeManager.getTreeNodesByName("MED-C-01-CF-ZCF-002-005(5#机组)");
135
- let jizu5segObj = jizu5.items[0].segmentObject;
136
- let jizu5_bb = viewer.computeViewBoundingBox(jizu5segObj.segment);
137
- let jizu5_bb_center = new Float64Array([
138
- (jizu5_bb[0] + jizu5_bb[3]) / 2,
139
- (jizu5_bb[1] + jizu5_bb[4]) / 2,
140
- (jizu5_bb[2] + jizu5_bb[5]) / 2,
141
- ]);
142
-
143
- //进行构件复制
144
- let zhengti = viewer.structureTreeManager.getTreeNodesByName("5#整体 分割使用");
145
- let zhengtiObj = zhengti.items[0].segmentObject;
146
- zhengtiCopy1 = zhengtiObj.copy();
147
- zhengtiCopy2 = zhengtiObj.copy();
148
- zhengtiCopy3 = zhengtiObj.copy();
149
-
150
- //获取移动的原始坐标
151
- let zhengti_bb = viewer.computeViewBoundingBox(zhengtiObj.segment);
152
- let zhengti_bb_center = new Float64Array([
153
- (zhengti_bb[0] + zhengti_bb[3]) / 2,
154
- (zhengti_bb[1] + zhengti_bb[4]) / 2,
155
- (zhengti_bb[2] + zhengti_bb[5]) / 2,
156
- ]);
157
- let moveWay25 = new Float64Array([
158
- jizu2_bb_center[0] - jizu5_bb_center[0],
159
- jizu2_bb_center[1] - jizu5_bb_center[1],
160
- jizu2_bb_center[2] - jizu5_bb_center[2],
161
- ]);
162
- let moveWay35 = new Float64Array([
163
- jizu3_bb_center[0] - jizu5_bb_center[0],
164
- jizu3_bb_center[1] - jizu5_bb_center[1],
165
- jizu3_bb_center[2] - jizu5_bb_center[2],
166
- ]);
167
- let moveWay45 = new Float64Array([
168
- jizu4_bb_center[0] - jizu5_bb_center[0],
169
- jizu4_bb_center[1] - jizu5_bb_center[1],
170
- jizu4_bb_center[2] - jizu5_bb_center[2],
171
- ]);
172
-
173
- //确定复制移动的位置
174
- let moveStart = new BimAir.Longan.Point();
175
- moveStart[0] = zhengti_bb_center[0];
176
- moveStart[1] = zhengti_bb_center[1];
177
- moveStart[2] = zhengti_bb_center[2];
178
- let moveEnd2 = new BimAir.Longan.Point();
179
- moveEnd2[0] = moveStart[0] + moveWay25[0];
180
- moveEnd2[1] = moveStart[1] + moveWay25[1];
181
- moveEnd2[2] = moveStart[2] + moveWay25[2];
182
- let moveEnd3 = new BimAir.Longan.Point();
183
- moveEnd3[0] = moveStart[0] + moveWay35[0];
184
- moveEnd3[1] = moveStart[1] + moveWay35[1];
185
- moveEnd3[2] = moveStart[2] + moveWay35[2];
186
- let moveEnd4 = new BimAir.Longan.Point();
187
- moveEnd4[0] = moveStart[0] + moveWay45[0];
188
- moveEnd4[1] = moveStart[1] + moveWay45[1];
189
- moveEnd4[2] = moveStart[2] + moveWay45[2];
190
-
191
- let moveLine52 = new Array();
192
- moveLine52.push(moveStart);
193
- moveLine52.push(moveEnd2);
194
- let moveLine53 = new Array();
195
- moveLine53.push(moveStart);
196
- moveLine53.push(moveEnd3);
197
- let moveLine54 = new Array();
198
- moveLine54.push(moveStart);
199
- moveLine54.push(moveEnd4);
200
-
201
- let roamTime = 1;
202
-
203
- let animationId1 = viewer.process.animationManager.objectRoamWithoutRotate(viewer, zhengtiCopy1, moveLine52, roamTime, 0, () => {
204
- console.log("finish1");
205
- });
206
- let animationId2 = viewer.process.animationManager.objectRoamWithoutRotate(viewer, zhengtiCopy2, moveLine53, roamTime, 0, () => {
207
- console.log("finish2");
208
- });
209
- let animationId3 = viewer.process.animationManager.objectRoamWithoutRotate(viewer, zhengtiCopy3, moveLine54, roamTime, 0, () => {
210
- console.log("finish3");
211
- });
212
-
213
- setTimeout(() => {
214
- viewer.process.animationManager.run([animationId1, animationId2, animationId3]);
215
- }, 100);
216
-
217
- viewer.updateDisplay();
218
- }
219
-
220
- function funCopySetColor() {
221
- //添加颜色材质
222
- let material1 = new BimAir.Material("color1");
223
- material1.setColor(255, 0, 0, 1);
224
- let material2 = new BimAir.Material("color2");
225
- material2.setColor(0, 255, 0, 1);
226
- let material3 = new BimAir.Material("color3");
227
- material3.setColor(0, 0, 255, 1);
228
-
229
- zhengtiCopy1.setMaterial(material1);
230
- zhengtiCopy2.setMaterial(material2);
231
- zhengtiCopy3.setMaterial(material3);
232
-
233
- viewer.updateDisplay();
234
-
235
- }
236
-
237
- function funCopySetIsolation() {
238
- viewer.isolationManager.isolation([zhengtiCopy1]);
239
- viewer.isolationManager.isolation([zhengtiCopy2]);
240
- viewer.isolationManager.isolation([zhengtiCopy3]);
241
-
242
- viewer.updateDisplay();
243
-
244
- }
245
-
246
- </script>
247
-
248
- </body>
249
-
250
- </html>
@@ -1,265 +0,0 @@
1
- <head>
2
- <meta charset="UTF-8">
3
- <title>管道生长</title>
4
- <link rel="stylesheet" href="https://static.graphicstone.com/bimAir/BimAir.css">
5
- <script src="https://static.graphicstone.com/vue.min.js"></script>
6
- <script src="https://static.graphicstone.com/bimAir/BimAir.umd.min.js"></script>
7
- </link>
8
-
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
-
24
- button {
25
- margin: 20px 20px 20px 20px;
26
- width: 180px;
27
- height: 40px;
28
- border-radius: 3px;
29
- border: none;
30
- background: #0066ffe4;
31
- color: #FFFFFF;
32
- outline: none;
33
- }
34
-
35
- .button-group {
36
- position: absolute;
37
- z-index: 100;
38
- top: 5px;
39
- left: 70px;
40
- }
41
- </style>
42
- <div id="app">
43
- <!-- <div id="viewer">
44
- </div> -->
45
- <div class="button-group">
46
- <button onclick="funIsolation1()">透明场景</button>
47
- <button onclick="funIsolation2()">取消透明</button>
48
- <button onclick="funAdd1()">添加构件</button>
49
- <button onclick="funAdd2()">移除构件</button>
50
- <button onclick="funCopy()">复制构件</button>
51
- </div>
52
- <viewer-wrapper elementId="viewer" style="height: 100%; width: 100%" />
53
-
54
- </div>
55
-
56
- <script type="text/javascript">
57
-
58
-
59
- new Vue({
60
- el: '#app',
61
- });
62
-
63
- let options = {
64
- // viewerType: "model",
65
- elementId: "viewer",
66
- id: "6253e9d6b0545a0a6e49bf85",
67
- // modelService: "https://static.graphicstone.com/modelApi",
68
- // fileService: "https://static.graphicstone.com/fileApi",
69
- modelService: "http://8.134.85.254:9036/api",
70
- fileService: "http://8.134.85.254:9040/api",
71
-
72
- };
73
-
74
- let viewer;
75
- let lightModels;
76
- let tag_view = true;
77
- let tag_visible = true;
78
- let tag_isolation = true;
79
- let tag_add = true;
80
- let tag_color = 118;
81
-
82
-
83
- BimAir.Loader({ url: "https://static.graphicstone.com/bimAir" }).then(() => {
84
- viewer = new BimAir.Viewer(options);
85
- // viewer.isUpdateTt = true;
86
-
87
- let zhengtiModelId = "62bd06f903225b3400fa4a1a";
88
- let changfangModelId = "62bd0aaf03225b3400fa4cc7";
89
- viewer.loadModels([changfangModelId, zhengtiModelId]).then((resLightModels) => {
90
- lightModels = resLightModels;
91
- console.log("thisli" + lightModels);
92
-
93
- let zhouguanID = [
94
- "f7e67dce65903cc780ec5f46c22f722d", "7086500f0f108cbf8b5b2eba140714b3", "fe62d6b269dd1b7ff34e99fe5fb450c6",
95
- "d640dfb2006fae0e76cbdfe70cbc9560", "604de9e43d0f2e1af03254c36c076907", "1c5caf66eab13e1e82ba26ebdd5a8076",
96
- "b1c4f030a3e6ed89c79c6fd9c25931f2", "1c75ca5380bfa60b9304443aff41848a", "b0056d54c3634acaa8711ce5709a2fec",
97
- "df28b126a36d6a1dd8134177f417db61", "4f5295b744f168d306fb30b1bff2e83b", "82cfc6cd1e6500342bedc373ca2639b7",
98
- "cbf0a8b693a59b49f92d7f13e5ba096e", "ce8a842ab066b28fadafb1b8e9baf28b", "55c9b0d55313b5bfd2c417c29b5d5a4e"
99
- ];
100
-
101
- //首先将其隐藏
102
- // lightModels[1].visible = false;
103
- lightModels[1].setAllComponentsVisible(false);
104
-
105
-
106
- viewer.updateDisplay();
107
- });
108
-
109
- })
110
-
111
- function funIsolation1() {
112
- if (tag_isolation) {
113
- lightModels[0].setAllComponentsIsolation(true);
114
- viewer.updateDisplay();
115
- tag_isolation = !tag_isolation
116
- }
117
- }
118
-
119
- function funIsolation2() {
120
- if (!tag_isolation) {
121
- lightModels[0].setAllComponentsIsolation(false);
122
- viewer.updateDisplay();
123
- tag_isolation = !tag_isolation;
124
- }
125
- }
126
-
127
- function funAdd1() {
128
- if (tag_add) {
129
- console.log("ADDin$$$$$$$4");
130
- lightModels[1].setAllComponentsVisible(true);
131
- viewer.updateDisplay();
132
- tag_add = !tag_add;
133
- }
134
- }
135
- function funAdd2() {
136
- if (!tag_add) {
137
- lightModels[1].setAllComponentsVisible(false);
138
- viewer.updateDisplay();
139
- tag_add = !tag_add;
140
- }
141
- }
142
-
143
- function funCopy() {
144
- if (!tag_add) {
145
- let jizu2 = viewer.structureTreeManager.getTreeNodesByName("MED-C-01-CF-ZCF-000-001(2#机组)");
146
- let jizu2segObj = jizu2.items[0].segmentObject;
147
- let jizu2_bb = viewer.computeViewBoundingBox(jizu2segObj.segment);
148
- let jizu2_bb_center = new Float64Array([
149
- (jizu2_bb[0] + jizu2_bb[3]) / 2,
150
- (jizu2_bb[1] + jizu2_bb[4]) / 2,
151
- (jizu2_bb[2] + jizu2_bb[5]) / 2,
152
- ]);
153
- let jizu3 = viewer.structureTreeManager.getTreeNodesByName("MED-C-01-CF-ZCF-000-003(3#机组)");
154
- let jizu3segObj = jizu3.items[0].segmentObject;
155
- let jizu3_bb = viewer.computeViewBoundingBox(jizu3segObj.segment);
156
- let jizu3_bb_center = new Float64Array([
157
- (jizu3_bb[0] + jizu3_bb[3]) / 2,
158
- (jizu3_bb[1] + jizu3_bb[4]) / 2,
159
- (jizu3_bb[2] + jizu3_bb[5]) / 2,
160
- ]);
161
- let jizu4 = viewer.structureTreeManager.getTreeNodesByName("MED-C-01-CF-ZCF-001-004(4#机组)");
162
- let jizu4segObj = jizu4.items[0].segmentObject;
163
- let jizu4_bb = viewer.computeViewBoundingBox(jizu4segObj.segment);
164
- let jizu4_bb_center = new Float64Array([
165
- (jizu4_bb[0] + jizu4_bb[3]) / 2,
166
- (jizu4_bb[1] + jizu4_bb[4]) / 2,
167
- (jizu4_bb[2] + jizu4_bb[5]) / 2,
168
- ]);
169
- let jizu5 = viewer.structureTreeManager.getTreeNodesByName("MED-C-01-CF-ZCF-002-005(5#机组)");
170
- let jizu5segObj = jizu5.items[0].segmentObject;
171
- let jizu5_bb = viewer.computeViewBoundingBox(jizu5segObj.segment);
172
- let jizu5_bb_center = new Float64Array([
173
- (jizu5_bb[0] + jizu5_bb[3]) / 2,
174
- (jizu5_bb[1] + jizu5_bb[4]) / 2,
175
- (jizu5_bb[2] + jizu5_bb[5]) / 2,
176
- ]);
177
-
178
- //进行构件复制
179
- let zhengti = viewer.structureTreeManager.getTreeNodesByName("5#整体 分割使用");
180
- let zhengtiObj = zhengti.items[0].segmentObject;
181
- let zhengtiCopy1 = zhengtiObj.copy();
182
- let zhengtiCopy2 = zhengtiObj.copy();
183
- let zhengtiCopy3 = zhengtiObj.copy();
184
-
185
-
186
- //获取移动的原始坐标
187
- let zhengti_bb = viewer.computeViewBoundingBox(zhengtiObj.segment);
188
- let zhengti_bb_center = new Float64Array([
189
- (zhengti_bb[0] + zhengti_bb[3]) / 2,
190
- (zhengti_bb[1] + zhengti_bb[4]) / 2,
191
- (zhengti_bb[2] + zhengti_bb[5]) / 2,
192
- ]);
193
- let moveWay25 = new Float64Array([
194
- jizu2_bb_center[0] - jizu5_bb_center[0],
195
- jizu2_bb_center[1] - jizu5_bb_center[1],
196
- jizu2_bb_center[2] - jizu5_bb_center[2],
197
- ]);
198
- let moveWay35 = new Float64Array([
199
- jizu3_bb_center[0] - jizu5_bb_center[0],
200
- jizu3_bb_center[1] - jizu5_bb_center[1],
201
- jizu3_bb_center[2] - jizu5_bb_center[2],
202
- ]);
203
- let moveWay45 = new Float64Array([
204
- jizu4_bb_center[0] - jizu5_bb_center[0],
205
- jizu4_bb_center[1] - jizu5_bb_center[1],
206
- jizu4_bb_center[2] - jizu5_bb_center[2],
207
- ]);
208
-
209
- //确定复制移动的位置
210
- let moveStart = new BimAir.Longan.Point();
211
- moveStart[0] = zhengti_bb_center[0];
212
- moveStart[1] = zhengti_bb_center[1];
213
- moveStart[2] = zhengti_bb_center[2];
214
- let moveEnd2 = new BimAir.Longan.Point();
215
- moveEnd2[0] = moveStart[0] + moveWay25[0];
216
- moveEnd2[1] = moveStart[1] + moveWay25[1];
217
- moveEnd2[2] = moveStart[2] + moveWay25[2];
218
- let moveEnd3 = new BimAir.Longan.Point();
219
- moveEnd3[0] = moveStart[0] + moveWay35[0];
220
- moveEnd3[1] = moveStart[1] + moveWay35[1];
221
- moveEnd3[2] = moveStart[2] + moveWay35[2];
222
- let moveEnd4 = new BimAir.Longan.Point();
223
- moveEnd4[0] = moveStart[0] + moveWay45[0];
224
- moveEnd4[1] = moveStart[1] + moveWay45[1];
225
- moveEnd4[2] = moveStart[2] + moveWay45[2];
226
-
227
- let moveLine52 = new Array();
228
- moveLine52.push(moveStart);
229
- moveLine52.push(moveEnd2);
230
- let moveLine53 = new Array();
231
- moveLine53.push(moveStart);
232
- moveLine53.push(moveEnd3);
233
- let moveLine54 = new Array();
234
- moveLine54.push(moveStart);
235
- moveLine54.push(moveEnd4);
236
-
237
- let roamTime = 1;
238
-
239
- let animationId1 = viewer.process.animationManager.objectRoamWithoutRotate(viewer, zhengtiCopy1, moveLine52, roamTime, 0, () => {
240
- console.log("finish1");
241
- });
242
- let animationId2 = viewer.process.animationManager.objectRoamWithoutRotate(viewer, zhengtiCopy2, moveLine53, roamTime, 0, () => {
243
- console.log("finish2");
244
- });
245
- let animationId3 = viewer.process.animationManager.objectRoamWithoutRotate(viewer, zhengtiCopy3, moveLine54, roamTime, 0, () => {
246
- console.log("finish3");
247
- });
248
-
249
- setTimeout(() => {
250
- viewer.process.animationManager.run([animationId1, animationId2, animationId3]);
251
- }, 100);
252
-
253
- //viewer.updateDisplay();
254
- }
255
-
256
- }
257
-
258
-
259
-
260
-
261
- </script>
262
-
263
- </body>
264
-
265
- </html>