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
package/README.md CHANGED
@@ -1,5 +1,24 @@
1
1
  ## 更新日志
2
2
 
3
+ ### 2.0.0-beta.7
4
+
5
+ > 更新 public/js 里的内核文件,安装此版本需替换 js 文件夹
6
+ >
7
+ > Longan 更新 v2.0.0-beta.3
8
+
9
+ - fix: 修复点击 RenderObject 浮起不起效的 bug
10
+ - fix: 修复多 viewer 下多线程加载无法显示模型
11
+
12
+ ### 2.0.0-beta.4
13
+
14
+ - fix: 碰撞结束后初始化碰撞进度
15
+ - fix: 修复漫游工具栏被销毁后命令出现异常
16
+ - fix: 修复多选没有选中对象报错问题
17
+ - fix: 修复六面体剖切和 style 颜色重叠的问题
18
+ - fix: 修复剖切盒没有 UpdateCameraNearFar 的问题
19
+ - fix: 修复通过样式修改的构件颜色与修改构件颜色 API 设置的颜色的在 lockLevel 相同时的颜色重叠问题,现在他们的 lockFaceLevel 不相同.
20
+ - fix: 取消路径绘制 point 和 target 的球体
21
+
3
22
  ### 2.0.0-beta.3
4
23
 
5
24
  > 更新 public/js 里的内核文件,安装此版本需替换 js 文件夹
@@ -12,9 +31,14 @@
12
31
 
13
32
  > 更新 public/js 里的内核文件,安装此版本需替换 js 文件夹
14
33
 
15
- - 添加 normals,texcoords,tangents,colors,borders 的预计算支持;
16
- - 添加自定义 vbo 支持;
17
- - 优化绘制效率;
34
+ - fix: 修复多选没有选中对象报错问题
35
+ - fix: 修复六面体剖切和 style 颜色重叠的问题
36
+ - fix: 修复剖切盒没有 UpdateCameraNearFar 的问题
37
+ - fix: 修复通过样式修改的构件颜色与修改构件颜色 API 设置的颜色的在 lockLevel 相同时的颜色重叠问题,现在他们的 lockFaceLevel 不相同
38
+ - fix: 取消路径绘制 point 和 target 的球体
39
+ - fix: 修复漫游工具栏被销毁后命令出现异常
40
+ - fix: 修复材质管理器
41
+ - fix: 修改各种效果使用的 RO 为 BimAir 的 RO,修复添加效果后加载模型的情况下结构树消失
18
42
 
19
43
  ### 1.6.1-beta.6
20
44
 
@@ -0,0 +1,28 @@
1
+ body {
2
+ margin: 0;
3
+ padding: 0;
4
+ height: 100vh;
5
+ }
6
+
7
+ #app {
8
+ height: 100vh;
9
+ position: relative;
10
+ }
11
+
12
+ button {
13
+ margin: 20px 20px 20px 20px;
14
+ width: 180px;
15
+ height: 40px;
16
+ border-radius: 3px;
17
+ border: none;
18
+ background: #0066ffe4;
19
+ color: #ffffff;
20
+ outline: none;
21
+ }
22
+
23
+ .button-group {
24
+ position: absolute;
25
+ z-index: 100;
26
+ top: 5px;
27
+ left: 70px;
28
+ }
@@ -0,0 +1,124 @@
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
+ <style>
18
+ body {
19
+ margin: 0;
20
+ padding: 0;
21
+ height: 100vh;
22
+ }
23
+
24
+ #app {
25
+ height: 100vh;
26
+ position: relative;
27
+ }
28
+ button {
29
+ margin: 20px 20px 20px 20px;
30
+ width: 120px;
31
+ height: 40px;
32
+ border-radius: 3px;
33
+ border: none;
34
+ background: #006fe4;
35
+ color: #ffffff;
36
+ outline: none;
37
+ }
38
+
39
+ .button-group {
40
+ position: absolute;
41
+ z-index: 100;
42
+ top: 5px;
43
+ left: 70px;
44
+ }
45
+ </style>
46
+ <div id="app">
47
+ <!-- <div id="viewer">
48
+ </div> -->
49
+ <div class="button-group">
50
+ <button onclick="setScene()">设置视角</button>
51
+ <button onclick="setColor()">设置颜色</button>
52
+ <button onclick="cancelColor()">取消颜色</button>
53
+ </div>
54
+ <viewer-wrapper elementId="viewer" style="height: 100%; width: 100%" />
55
+ </div>
56
+
57
+ <script type="text/javascript">
58
+ new Vue({
59
+ el: "#app",
60
+ });
61
+
62
+ let options = {
63
+ // viewerType: "model",
64
+ elementId: "viewer",
65
+ id: "6253e9d6b0545a0a6e49bf85",
66
+ modelService: "https://static.graphicstone.com/modelApi",
67
+ fileService: "https://static.graphicstone.com/fileApi",
68
+ };
69
+ let aboutCamera = {
70
+ position: [379720.251, 39004.605, 3324.137],
71
+ target: [379993.054, 39422.028, 3082.479],
72
+ up: [-0.453, -0.206, -0.867],
73
+ field: 554.132,
74
+ };
75
+ let viewer;
76
+ let lightModels;
77
+ let roamTime = 8;
78
+ let animation;
79
+ let id = "632273cbbc278049a0898a0e";
80
+ let model1 = "632273cfbc278049a0898a12";
81
+
82
+ let objectID1 = "QMD+M+4G+HYD+XDRA01+EL002";
83
+
84
+ BimAir.Loader({ url: "https://static.graphicstone.com/bimAir" }).then(
85
+ () => {
86
+ viewer = new BimAir.Viewer(options);
87
+ this.viewer = viewer;
88
+ this.viewer.loadModels([id, model1]).then((lightModels) => {
89
+ this.lightModels = lightModels;
90
+ this.viewer.fitWorld();
91
+ });
92
+ }
93
+ );
94
+
95
+ function setScene() {
96
+ this.viewer.camera.position = aboutCamera.position;
97
+ this.viewer.camera.target = aboutCamera.target;
98
+ this.viewer.camera.up = aboutCamera.up;
99
+ this.viewer.camera.setField(aboutCamera.field, aboutCamera.field);
100
+ this.viewer.updateDisplay();
101
+ }
102
+
103
+ function setColor() {
104
+ let material1 = new BimAir.Material(this.viewer, "test");
105
+ material1.setColor(127, 250, 0, 1);
106
+
107
+ let material2 = new BimAir.Material(this.viewer, "test2");
108
+ material2.setColor(127, 0, 0, 1);
109
+
110
+ this.lightModels[0].setAllComponentsVisible(false);
111
+ let objcet1 = this.lightModels[1].segmentObject;
112
+ objcet1.setMaterial(material1);
113
+
114
+ this.lightModels[1].setComponentsColor([objectID1], material2);
115
+ this.viewer.updateDisplay();
116
+ }
117
+
118
+ function cancelColor() {
119
+ this.lightModels[1].setAllComponentsColor(null);
120
+ this.viewer.updateDisplay();
121
+ }
122
+ </script>
123
+ </body>
124
+ </html>
@@ -1,160 +1,160 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
-
4
- <head>
5
- <meta charset="UTF-8">
3
+ <head>
4
+ <meta charset="UTF-8" />
6
5
  <title>动画播放</title>
7
- <link rel="stylesheet" href="https://static.graphicstone.com/bimAir/BimAir.css">
6
+
7
+ <!-- demo的样式 -->
8
+ <link rel="stylesheet" href="../assets/demo.css" />
9
+ <link
10
+ rel="stylesheet"
11
+ href="https://static.belife-bim.com/bimAir/BimAir.css"
12
+ />
8
13
  <script src="https://static.graphicstone.com/vue.min.js"></script>
9
14
  <script src="https://static.graphicstone.com/bimAir/BimAir.umd.min.js"></script>
10
- </link>
15
+ </head>
11
16
 
12
- </head>
13
-
14
- <body>
17
+ <body>
15
18
  <style>
16
- body {
17
- margin: 0;
18
- padding: 0;
19
- height: 100vh;
20
- }
21
-
22
- #app {
23
- height: 100vh;
24
- position: relative;
25
- }
26
-
27
- button {
28
- margin: 20px 20px 20px 20px;
29
- width: 120px;
30
- height: 40px;
31
- border-radius: 3px;
32
- border: none;
33
- background: #006fe4;
34
- color: #FFFFFF;
35
- outline: none;
36
- }
37
-
38
- .button-group {
39
- position: absolute;
40
- z-index: 100;
41
- top: 5px;
42
- left: 70px;
43
- }
44
-
19
+ body {
20
+ margin: 0;
21
+ padding: 0;
22
+ height: 100vh;
23
+ }
24
+
25
+ #app {
26
+ height: 100vh;
27
+ position: relative;
28
+ }
29
+
30
+ button {
31
+ margin: 20px 20px 20px 20px;
32
+ width: 120px;
33
+ height: 40px;
34
+ border-radius: 3px;
35
+ border: none;
36
+ background: #006fe4;
37
+ color: #ffffff;
38
+ outline: none;
39
+ }
40
+
41
+ .button-group {
42
+ position: absolute;
43
+ z-index: 100;
44
+ top: 5px;
45
+ left: 70px;
46
+ }
45
47
  </style>
46
48
  <div id="app">
47
- <!-- <div id="viewer">
49
+ <!-- <div id="viewer">
48
50
  </div> -->
49
- <div class="button-group">
50
- <button onclick="setScene()">设置视角</button>
51
- <button onclick="getAnimation()">播放动画</button>
52
- <button onclick="pauseAnimation()">暂停动画</button>
53
- <button onclick="continueAnimation()">继续动画</button>
54
- <button onclick="stopAnimation()">结束动画</button>
55
- <button onclick="restartAnimation()">重启动画</button>
56
- </div>
57
- <viewer-wrapper elementId="viewer" style="height: 100%; width: 100%" />
58
-
51
+ <div class="button-group">
52
+ <button onclick="getAnimation()">播放动画</button>
53
+ <button onclick="pauseAnimation()">暂停动画</button>
54
+ <button onclick="continueAnimation()">继续动画</button>
55
+ <button onclick="stopAnimation()">结束动画</button>
56
+ <button onclick="restartAnimation()">重启动画</button>
57
+ </div>
58
+ <viewer-wrapper elementId="viewer" style="height: 100%; width: 100%" />
59
59
  </div>
60
60
 
61
61
  <script type="text/javascript">
62
- new Vue({
63
- el: '#app',
64
- });
65
-
66
- let options = {
67
- // viewerType: "model",
68
- elementId: "viewer",
69
- id: "6253e9d6b0545a0a6e49bf85",
70
- modelService: "https://static.graphicstone.com/modelApi",
71
- fileService: "https://static.graphicstone.com/fileApi",
72
-
73
- };
74
- let aboutCamera = {
75
- position: new Float64Array([379633.85, 39084.71, 3129.943]),
76
- target: new Float64Array([380036.613, 39459.857, 3066.088]),
77
- up: new Float64Array([0.084, 0.079, 0.993]),
78
- field: 554.132,
79
- };
80
- let viewer;
81
- let lightModels;
82
- let roamTime = 8;
83
- let animation;
84
- let id = "632273cbbc278049a0898a0e";
85
- let model1 = "632273cfbc278049a0898a12";
86
- let objectID1 = "QMD+M+4G+HYD+XDRA01+EL002";
87
-
88
- BimAir.Loader({ url: "https://static.graphicstone.com/bimAir" }).then(() => {
89
- viewer = new BimAir.Viewer(options);
90
- this.viewer = viewer;
91
- this.viewer.loadModels([id, model1]).then((lightModels) => {
92
- this.lightModels = lightModels;
93
- this.viewer.fitWorld();
94
- });
95
-
96
- })
97
-
98
- function setScene() {
62
+ new Vue({
63
+ el: "#app",
64
+ });
65
+
66
+ let options = {
67
+ // viewerType: "model",
68
+ elementId: "viewer",
69
+ id: "6253e9d6b0545a0a6e49bf85",
70
+ modelService: "https://static.graphicstone.com/modelApi",
71
+ fileService: "https://static.graphicstone.com/fileApi",
72
+ };
73
+ let aboutCamera = {
74
+ position: new Float64Array([379633.85, 39084.71, 3129.943]),
75
+ target: new Float64Array([380036.613, 39459.857, 3066.088]),
76
+ up: new Float64Array([0.084, 0.079, 0.993]),
77
+ field: 554.132,
78
+ };
79
+ let viewer;
80
+ let lightModels;
81
+ let roamTime = 8;
82
+ let animation;
83
+ let id = "632273cbbc278049a0898a0e";
84
+ let model1 = "632273cfbc278049a0898a12";
85
+ let objectID1 = "QMD+M+4G+HYD+XDRA01+EL002";
86
+
87
+ BimAir.Loader({ url: "https://static.graphicstone.com/bimAir" }).then(
88
+ () => {
89
+ viewer = new BimAir.Viewer(options);
90
+ this.viewer = viewer;
91
+ this.viewer.loadModels([id, model1]).then((lightModels) => {
92
+ this.lightModels = lightModels;
93
+
99
94
  this.viewer.camera.position = aboutCamera.position;
100
95
  this.viewer.camera.target = aboutCamera.target;
101
- this.viewer.camera.up = aboutCamera.up
96
+ this.viewer.camera.up = aboutCamera.up;
102
97
  this.viewer.camera.setField(aboutCamera.field, aboutCamera.field);
103
98
  this.viewer.fitWorld();
99
+ });
104
100
  }
105
-
106
-
107
- function getAnimation() {
108
- this.lightModels[0].setAllComponentsIsolation();
109
- let moveSegmentObject = this.lightModels[1].getComponent(objectID1);
110
- let bb = this.viewer.computeViewBoundingBox(moveSegmentObject.segment);
111
- let center = new Float64Array([
112
- (bb[0] + bb[3]) / 2,
113
- (bb[1] + bb[4]) / 2,
114
- (bb[2] + bb[5]) / 2,
115
- ])
116
- let p0 = new BimAir.Longan.Point();
117
- p0[0] = center[0];
118
- p0[1] = center[1];
119
- p0[2] = center[2] + 60;
120
-
121
- let p1 = new BimAir.Longan.Point();
122
- p1[0] = center[0];
123
- p1[1] = center[1];
124
- p1[2] = center[2];
125
- let points = new Array();
126
- points.push(p0);
127
- points.push(p1);
128
-
129
- // this.viewer.process.animationManager.drawStraight(this.viewer, points);
130
- this.animation = this.viewer.process.animationManager.objectRoamWithoutRotate(this.viewer, moveSegmentObject, points, roamTime, 0, () => {
131
- console.log("animation finish");
132
- });
133
- this.viewer.process.animationManager.run([this.animation]);
134
- // return animationId;
135
- }
136
-
137
- function pauseAnimation() {
138
- let palyingPercent = this.viewer.process.animationManager.pauseAnime(this.animation);
139
- }
140
-
141
- function continueAnimation() {
142
- this.viewer.process.animationManager.run([this.animation]);
143
- }
144
-
145
- function stopAnimation() {
146
- this.viewer.process.animationManager.stopAnime(this.animation, true);
147
- }
148
-
149
- function restartAnimation() {
150
- this.viewer.process.animationManager.restartAnime(this.animation, true);
151
- }
152
-
153
-
154
-
155
-
101
+ );
102
+
103
+ function getAnimation() {
104
+ this.lightModels[0].setAllComponentsIsolation();
105
+ let moveSegmentObject = this.lightModels[1].getComponent(objectID1);
106
+ let bb = this.viewer.computeViewBoundingBox(moveSegmentObject.segment);
107
+ let center = new Float64Array([
108
+ (bb[0] + bb[3]) / 2,
109
+ (bb[1] + bb[4]) / 2,
110
+ (bb[2] + bb[5]) / 2,
111
+ ]);
112
+ let p0 = new BimAir.Longan.Point();
113
+ p0[0] = center[0];
114
+ p0[1] = center[1];
115
+ p0[2] = center[2] + 60;
116
+
117
+ let p1 = new BimAir.Longan.Point();
118
+ p1[0] = center[0];
119
+ p1[1] = center[1];
120
+ p1[2] = center[2];
121
+ let points = new Array();
122
+ points.push(p0);
123
+ points.push(p1);
124
+
125
+ // this.viewer.process.animationManager.drawStraight(this.viewer, points);
126
+ this.animation =
127
+ this.viewer.process.animationManager.objectRoamWithoutRotate(
128
+ this.viewer,
129
+ moveSegmentObject,
130
+ points,
131
+ roamTime,
132
+ 0,
133
+ () => {
134
+ console.log("animation finish");
135
+ }
136
+ );
137
+ this.viewer.process.animationManager.run([this.animation]);
138
+ // return animationId;
139
+ }
140
+
141
+ function pauseAnimation() {
142
+ let palyingPercent = this.viewer.process.animationManager.pauseAnime(
143
+ this.animation
144
+ );
145
+ }
146
+
147
+ function continueAnimation() {
148
+ this.viewer.process.animationManager.run([this.animation]);
149
+ }
150
+
151
+ function stopAnimation() {
152
+ this.viewer.process.animationManager.stopAnime(this.animation, true);
153
+ }
154
+
155
+ function restartAnimation() {
156
+ this.viewer.process.animationManager.restartAnime(this.animation, true);
157
+ }
156
158
  </script>
157
-
158
- </body>
159
-
160
- </html>
159
+ </body>
160
+ </html>