@shjjs/visual-ui 1.0.15 → 1.0.16

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 (300) hide show
  1. package/package.json +1 -1
  2. package/es/commons/reset.scss.mjs +0 -1
  3. package/es/components/commons-babylon/compileAndRunBabylon.d.ts +0 -11
  4. package/es/components/commons-babylon/index.d.ts +0 -21
  5. package/es/components/commons-babylon/index.vue.d.ts +0 -21
  6. package/es/components/commons-echarts/compileAndRunEcharts.d.ts +0 -12
  7. package/es/components/commons-echarts/index.d.ts +0 -2
  8. package/es/components/commons-echarts/index.vue.d.ts +0 -38
  9. package/es/components/commons-gaussian-splatting-view/index.d.ts +0 -92
  10. package/es/components/commons-gaussian-splatting-view/index.vue.d.ts +0 -93
  11. package/es/components/commons-gaussian-splatting-view/index.vue3.mjs +0 -1
  12. package/es/components/commons-loop-iterator/index.vue3.mjs +0 -1
  13. package/es/components/commons-product-model/index.d.ts +0 -142
  14. package/es/components/commons-product-model/index.vue.d.ts +0 -143
  15. package/es/components/commons-product-model/index.vue3.mjs +0 -1
  16. package/es/components/commons-qrcode/index.vue3.mjs +0 -1
  17. package/es/components/commons-three-loader/index.d.ts +0 -138
  18. package/es/components/commons-three-loader/index.vue.d.ts +0 -139
  19. package/es/components/commons-three-loader/index.vue3.mjs +0 -1
  20. package/es/components/commons-three-loader3/index.vue3.mjs +0 -1
  21. package/es/components/commons-vr-photo/index.d.ts +0 -59
  22. package/es/components/commons-vr-photo/index.vue.d.ts +0 -60
  23. package/es/components/commons-vr-video/index.d.ts +0 -59
  24. package/es/components/commons-vr-video/index.vue.d.ts +0 -60
  25. package/es/components/commons-weather/index.vue3.mjs +0 -1
  26. package/es/components/graphical-circle/index.vue3.mjs +0 -1
  27. package/es/components/graphical-diamond/index.vue3.mjs +0 -1
  28. package/es/components/graphical-hexagon/index.vue3.mjs +0 -1
  29. package/es/components/graphical-isosceles-triangle/index.vue3.mjs +0 -1
  30. package/es/components/graphical-pentagon/index.vue3.mjs +0 -1
  31. package/es/components/graphical-rect/index.vue3.mjs +0 -1
  32. package/es/components/graphical-right-triangle/index.vue3.mjs +0 -1
  33. package/es/components/interaction-button/index.vue3.mjs +0 -1
  34. package/es/components/interaction-button-image/index.vue3.mjs +0 -1
  35. package/es/components/interaction-button-refresh/index.vue3.mjs +0 -1
  36. package/es/components/interaction-data-picker/index.vue3.mjs +0 -1
  37. package/es/components/interaction-input/index.vue3.mjs +0 -1
  38. package/es/components/interaction-select/index.vue3.mjs +0 -1
  39. package/es/components/interaction-slider/index.vue3.mjs +0 -1
  40. package/es/components/interaction-switch/index.vue3.mjs +0 -1
  41. package/es/components/interaction-tabs/index.vue3.mjs +0 -1
  42. package/es/components/interaction-tabs2/index.vue3.mjs +0 -1
  43. package/es/components/media-audio/index.vue3.mjs +0 -1
  44. package/es/components/media-audio-dynamic/index.vue3.mjs +0 -1
  45. package/es/components/media-carousel/index.vue3.mjs +0 -1
  46. package/es/components/media-carousel-slides/index.vue3.mjs +0 -1
  47. package/es/components/media-iframe/index.vue3.mjs +0 -1
  48. package/es/components/media-iframe-carousel/index.vue3.mjs +0 -1
  49. package/es/components/media-image/index.vue3.mjs +0 -1
  50. package/es/components/media-image-dynamic/index.vue3.mjs +0 -1
  51. package/es/components/media-video/index.vue3.mjs +0 -1
  52. package/es/components/media-video-dynamic/index.vue3.mjs +0 -1
  53. package/es/components/media-wavesurfer/index.vue3.mjs +0 -1
  54. package/es/components/scene-amap2d/index.vue3.mjs +0 -1
  55. package/es/components/scene-amap3d/index.vue3.mjs +0 -1
  56. package/es/components/scene-map3d/index.vue3.mjs +0 -1
  57. package/es/components/scene-map3d/index.vue4.mjs +0 -1
  58. package/es/components/scene-ue-iframe/index.vue3.mjs +0 -1
  59. package/es/components/scene-ue-shj/index.vue3.mjs +0 -1
  60. package/es/components/scene-unity-iframe/index.vue3.mjs +0 -1
  61. package/es/components/scene-unity-webgl/index.vue3.mjs +0 -1
  62. package/es/components/scene-vr/index.vue3.mjs +0 -1
  63. package/es/components/text-carousel/index.vue3.mjs +0 -1
  64. package/es/components/text-count-down/index.vue3.mjs +0 -1
  65. package/es/components/text-over-number/index.vue3.mjs +0 -1
  66. package/es/components/text-real-time/index.vue3.mjs +0 -1
  67. package/es/components/text-row-scroll/index.vue3.mjs +0 -1
  68. package/es/components/text-table-basic/index.vue3.mjs +0 -1
  69. package/es/components/text-table-scroll/index.vue3.mjs +0 -1
  70. package/es/components/text-text-basic/index.vue3.mjs +0 -1
  71. package/es/components/text-text-dynamic/index.vue3.mjs +0 -1
  72. package/es/components/text-title/index.vue3.mjs +0 -1
  73. package/es/core/datasource/core/api.d.ts +0 -1
  74. package/es/core/datasource/core/api.mjs +0 -32
  75. package/es/core/datasource/core/static.d.ts +0 -1
  76. package/es/core/datasource/core/static.mjs +0 -16
  77. package/es/core/datasource/core/url.d.ts +0 -1
  78. package/es/core/datasource/core/url.mjs +0 -17
  79. package/es/core/datasource/core/variable.d.ts +0 -1
  80. package/es/core/datasource/core/variable.mjs +0 -17
  81. package/es/core/datasource/core/ws.d.ts +0 -32
  82. package/es/core/datasource/core/ws.mjs +0 -138
  83. package/es/core/datasource/index.d.ts +0 -63
  84. package/es/core/datasource/index.mjs +0 -188
  85. package/es/core/datasource/utils/request.d.ts +0 -3
  86. package/es/core/datasource/utils/request.mjs +0 -7
  87. package/es/core/datasource/utils/useMapping.d.ts +0 -7
  88. package/es/core/datasource/utils/useMapping.mjs +0 -55
  89. package/es/core/datasource/utils/userRequest.d.ts +0 -3
  90. package/es/core/datasource/utils/userRequest.mjs +0 -7
  91. package/es/core/datasource/utils/utils.d.ts +0 -50
  92. package/es/core/datasource/utils/utils.mjs +0 -123
  93. package/es/core/datasource/utils/wsManager.d.ts +0 -16
  94. package/es/core/datasource/utils/wsManager.mjs +0 -78
  95. package/es/core/earth/base64/Aperture.d.ts +0 -1
  96. package/es/core/earth/base64/Aperture.mjs +0 -4
  97. package/es/core/earth/base64/Callout.d.ts +0 -1
  98. package/es/core/earth/base64/Callout.mjs +0 -4
  99. package/es/core/earth/base64/CalloutAperture.d.ts +0 -1
  100. package/es/core/earth/base64/CalloutAperture.mjs +0 -4
  101. package/es/core/earth/base64/CloudCover.d.ts +0 -1
  102. package/es/core/earth/base64/CloudCover.mjs +0 -4
  103. package/es/core/earth/base64/LightColumn.d.ts +0 -1
  104. package/es/core/earth/base64/LightColumn.mjs +0 -4
  105. package/es/core/earth/base64/StarrySky.d.ts +0 -1
  106. package/es/core/earth/base64/StarrySky.mjs +0 -4
  107. package/es/core/earth/base64/rotation/innner.d.ts +0 -1
  108. package/es/core/earth/base64/rotation/innner.mjs +0 -4
  109. package/es/core/earth/base64/rotation/out.d.ts +0 -1
  110. package/es/core/earth/base64/rotation/out.mjs +0 -4
  111. package/es/core/earth/border.vue.d.ts +0 -70
  112. package/es/core/earth/border.vue.mjs +0 -19
  113. package/es/core/earth/border.vue2.mjs +0 -4
  114. package/es/core/earth/geojson/china-border.d.ts +0 -22
  115. package/es/core/earth/geojson/china-border.mjs +0 -29305
  116. package/es/core/earth/geojson/china.d.ts +0 -84
  117. package/es/core/earth/geojson/china.mjs +0 -103022
  118. package/es/core/earth/geojson/world.d.ts +0 -25
  119. package/es/core/earth/geojson/world.mjs +0 -43220
  120. package/es/core/earth/interface.d.ts +0 -190
  121. package/es/core/earth/main.d.ts +0 -94
  122. package/es/core/earth/main.mjs +0 -504
  123. package/es/core/earth/main.vue.d.ts +0 -834
  124. package/es/core/earth/main.vue.mjs +0 -7
  125. package/es/core/earth/main.vue2.mjs +0 -290
  126. package/es/core/earth/main.vue3.mjs +0 -1
  127. package/es/core/earth/types.d.ts +0 -108
  128. package/es/core/earth/utils/GradientLine.d.ts +0 -17
  129. package/es/core/earth/utils/GradientLine.mjs +0 -78
  130. package/es/core/earth/utils/composer.d.ts +0 -38
  131. package/es/core/earth/utils/composer.mjs +0 -40
  132. package/es/core/earth/utils/controls/obt.d.ts +0 -9
  133. package/es/core/earth/utils/controls/obt.mjs +0 -19
  134. package/es/core/earth/utils/interface.d.ts +0 -134
  135. package/es/core/earth/utils/label.d.ts +0 -4
  136. package/es/core/earth/utils/label.mjs +0 -15
  137. package/es/core/earth/utils/line2.d.ts +0 -3
  138. package/es/core/earth/utils/line2.mjs +0 -21
  139. package/es/core/earth/utils/scene.d.ts +0 -28
  140. package/es/core/earth/utils/scene.mjs +0 -120
  141. package/es/core/useChart.d.ts +0 -15
  142. package/es/core/useChart.mjs +0 -115
  143. package/es/style.css +0 -1
  144. package/es/types.d.ts +0 -58
  145. package/es/utils/babylon/ColorConvert.d.ts +0 -3
  146. package/es/utils/babylon/ColorConvert.mjs +0 -21
  147. package/es/utils/clickOutSide.d.ts +0 -5
  148. package/es/utils/clickOutSide.mjs +0 -13
  149. package/es/utils/cloneSeries.d.ts +0 -7
  150. package/es/utils/cloneSeries.mjs +0 -12
  151. package/es/utils/hoverLoop.d.ts +0 -10
  152. package/es/utils/hoverLoop.mjs +0 -43
  153. package/es/utils/imgPreloader.d.ts +0 -1
  154. package/es/utils/imgPreloader.mjs +0 -16
  155. package/es/utils/install.d.ts +0 -2
  156. package/es/utils/install.mjs +0 -7
  157. package/es/utils/json2css.d.ts +0 -3
  158. package/es/utils/json2css.mjs +0 -31
  159. package/es/utils/mini3d/components/FlyLine.mjs +0 -65
  160. package/es/utils/mini3d/components/Label3d.mjs +0 -70
  161. package/es/utils/mini3d/components/Particles.mjs +0 -78
  162. package/es/utils/mini3d/components/PathLine.mjs +0 -60
  163. package/es/utils/mini3d/components/Plane.mjs +0 -34
  164. package/es/utils/mini3d/components/ToastLoading.mjs +0 -26
  165. package/es/utils/mini3d/core/Camera.mjs +0 -26
  166. package/es/utils/mini3d/core/Renderer.mjs +0 -25
  167. package/es/utils/mini3d/core/index.d.ts +0 -7
  168. package/es/utils/mini3d/core/index.mjs +0 -71
  169. package/es/utils/mini3d/utils/CreateHistory.mjs +0 -32
  170. package/es/utils/mini3d/utils/EventEmitter.mjs +0 -28
  171. package/es/utils/mini3d/utils/Resource.mjs +0 -113
  172. package/es/utils/mini3d/utils/Sizes.mjs +0 -17
  173. package/es/utils/mini3d/utils/Time.mjs +0 -25
  174. package/es/utils/mini3d/utils/utils.mjs +0 -45
  175. package/es/utils/parseDataset.d.ts +0 -4
  176. package/es/utils/parseDataset.mjs +0 -19
  177. package/es/utils/parseOtherData.d.ts +0 -1
  178. package/es/utils/parseOtherData.mjs +0 -10
  179. package/es/utils/parseScatterData.d.ts +0 -3
  180. package/es/utils/parseScatterData.mjs +0 -14
  181. package/es/utils/shj/component-refs.d.ts +0 -6
  182. package/es/utils/shj/component-refs.mjs +0 -10
  183. package/es/utils/typescript.d.ts +0 -5
  184. package/lib/commons/reset.scss.js +0 -1
  185. package/lib/components/commons-gaussian-splatting-view/index.vue3.js +0 -1
  186. package/lib/components/commons-loop-iterator/index.vue3.js +0 -1
  187. package/lib/components/commons-product-model/index.vue3.js +0 -1
  188. package/lib/components/commons-qrcode/index.vue3.js +0 -1
  189. package/lib/components/commons-three-loader/index.vue3.js +0 -1
  190. package/lib/components/commons-three-loader3/index.vue3.js +0 -1
  191. package/lib/components/commons-weather/index.vue3.js +0 -1
  192. package/lib/components/graphical-circle/index.vue3.js +0 -1
  193. package/lib/components/graphical-diamond/index.vue3.js +0 -1
  194. package/lib/components/graphical-hexagon/index.vue3.js +0 -1
  195. package/lib/components/graphical-isosceles-triangle/index.vue3.js +0 -1
  196. package/lib/components/graphical-pentagon/index.vue3.js +0 -1
  197. package/lib/components/graphical-rect/index.vue3.js +0 -1
  198. package/lib/components/graphical-right-triangle/index.vue3.js +0 -1
  199. package/lib/components/interaction-button/index.vue3.js +0 -1
  200. package/lib/components/interaction-button-image/index.vue3.js +0 -1
  201. package/lib/components/interaction-button-refresh/index.vue3.js +0 -1
  202. package/lib/components/interaction-data-picker/index.vue3.js +0 -1
  203. package/lib/components/interaction-input/index.vue3.js +0 -1
  204. package/lib/components/interaction-select/index.vue3.js +0 -1
  205. package/lib/components/interaction-slider/index.vue3.js +0 -1
  206. package/lib/components/interaction-switch/index.vue3.js +0 -1
  207. package/lib/components/interaction-tabs/index.vue3.js +0 -1
  208. package/lib/components/interaction-tabs2/index.vue3.js +0 -1
  209. package/lib/components/media-audio/index.vue3.js +0 -1
  210. package/lib/components/media-audio-dynamic/index.vue3.js +0 -1
  211. package/lib/components/media-carousel/index.vue3.js +0 -1
  212. package/lib/components/media-carousel-slides/index.vue3.js +0 -1
  213. package/lib/components/media-iframe/index.vue3.js +0 -1
  214. package/lib/components/media-iframe-carousel/index.vue3.js +0 -1
  215. package/lib/components/media-image/index.vue3.js +0 -1
  216. package/lib/components/media-image-dynamic/index.vue3.js +0 -1
  217. package/lib/components/media-video/index.vue3.js +0 -1
  218. package/lib/components/media-video-dynamic/index.vue3.js +0 -1
  219. package/lib/components/media-wavesurfer/index.vue3.js +0 -1
  220. package/lib/components/scene-amap2d/index.vue3.js +0 -1
  221. package/lib/components/scene-amap3d/index.vue3.js +0 -1
  222. package/lib/components/scene-map3d/index.vue3.js +0 -1
  223. package/lib/components/scene-map3d/index.vue4.js +0 -1
  224. package/lib/components/scene-ue-iframe/index.vue3.js +0 -1
  225. package/lib/components/scene-ue-shj/index.vue3.js +0 -1
  226. package/lib/components/scene-unity-iframe/index.vue3.js +0 -1
  227. package/lib/components/scene-unity-webgl/index.vue3.js +0 -1
  228. package/lib/components/scene-vr/index.vue3.js +0 -1
  229. package/lib/components/text-carousel/index.vue3.js +0 -1
  230. package/lib/components/text-count-down/index.vue3.js +0 -1
  231. package/lib/components/text-over-number/index.vue3.js +0 -1
  232. package/lib/components/text-real-time/index.vue3.js +0 -1
  233. package/lib/components/text-row-scroll/index.vue3.js +0 -1
  234. package/lib/components/text-table-basic/index.vue3.js +0 -1
  235. package/lib/components/text-table-scroll/index.vue3.js +0 -1
  236. package/lib/components/text-text-basic/index.vue3.js +0 -1
  237. package/lib/components/text-text-dynamic/index.vue3.js +0 -1
  238. package/lib/components/text-title/index.vue3.js +0 -1
  239. package/lib/core/datasource/core/api.js +0 -1
  240. package/lib/core/datasource/core/static.js +0 -1
  241. package/lib/core/datasource/core/url.js +0 -1
  242. package/lib/core/datasource/core/variable.js +0 -1
  243. package/lib/core/datasource/core/ws.js +0 -1
  244. package/lib/core/datasource/index.js +0 -6
  245. package/lib/core/datasource/utils/request.js +0 -1
  246. package/lib/core/datasource/utils/useMapping.js +0 -1
  247. package/lib/core/datasource/utils/userRequest.js +0 -1
  248. package/lib/core/datasource/utils/utils.js +0 -1
  249. package/lib/core/datasource/utils/wsManager.js +0 -1
  250. package/lib/core/earth/base64/Aperture.js +0 -1
  251. package/lib/core/earth/base64/Callout.js +0 -1
  252. package/lib/core/earth/base64/CalloutAperture.js +0 -1
  253. package/lib/core/earth/base64/CloudCover.js +0 -1
  254. package/lib/core/earth/base64/LightColumn.js +0 -1
  255. package/lib/core/earth/base64/StarrySky.js +0 -1
  256. package/lib/core/earth/base64/rotation/innner.js +0 -1
  257. package/lib/core/earth/base64/rotation/out.js +0 -1
  258. package/lib/core/earth/border.vue.js +0 -1
  259. package/lib/core/earth/border.vue2.js +0 -1
  260. package/lib/core/earth/geojson/china-border.js +0 -1
  261. package/lib/core/earth/geojson/china.js +0 -1
  262. package/lib/core/earth/geojson/world.js +0 -1
  263. package/lib/core/earth/main.js +0 -32
  264. package/lib/core/earth/main.vue.js +0 -1
  265. package/lib/core/earth/main.vue2.js +0 -1
  266. package/lib/core/earth/main.vue3.js +0 -1
  267. package/lib/core/earth/utils/GradientLine.js +0 -1
  268. package/lib/core/earth/utils/composer.js +0 -1
  269. package/lib/core/earth/utils/controls/obt.js +0 -1
  270. package/lib/core/earth/utils/label.js +0 -1
  271. package/lib/core/earth/utils/line2.js +0 -1
  272. package/lib/core/earth/utils/scene.js +0 -1
  273. package/lib/core/useChart.js +0 -1
  274. package/lib/style.css +0 -1
  275. package/lib/utils/babylon/ColorConvert.js +0 -1
  276. package/lib/utils/clickOutSide.js +0 -1
  277. package/lib/utils/cloneSeries.js +0 -1
  278. package/lib/utils/hoverLoop.js +0 -1
  279. package/lib/utils/imgPreloader.js +0 -1
  280. package/lib/utils/install.js +0 -1
  281. package/lib/utils/json2css.js +0 -1
  282. package/lib/utils/mini3d/components/FlyLine.js +0 -1
  283. package/lib/utils/mini3d/components/Label3d.js +0 -1
  284. package/lib/utils/mini3d/components/Particles.js +0 -1
  285. package/lib/utils/mini3d/components/PathLine.js +0 -1
  286. package/lib/utils/mini3d/components/Plane.js +0 -1
  287. package/lib/utils/mini3d/components/ToastLoading.js +0 -5
  288. package/lib/utils/mini3d/core/Camera.js +0 -1
  289. package/lib/utils/mini3d/core/Renderer.js +0 -1
  290. package/lib/utils/mini3d/core/index.js +0 -1
  291. package/lib/utils/mini3d/utils/CreateHistory.js +0 -1
  292. package/lib/utils/mini3d/utils/EventEmitter.js +0 -1
  293. package/lib/utils/mini3d/utils/Resource.js +0 -1
  294. package/lib/utils/mini3d/utils/Sizes.js +0 -1
  295. package/lib/utils/mini3d/utils/Time.js +0 -1
  296. package/lib/utils/mini3d/utils/utils.js +0 -1
  297. package/lib/utils/parseDataset.js +0 -1
  298. package/lib/utils/parseOtherData.js +0 -1
  299. package/lib/utils/parseScatterData.js +0 -1
  300. package/lib/utils/shj/component-refs.js +0 -1
@@ -1,504 +0,0 @@
1
- var k = Object.defineProperty;
2
- var A = (S, y, e) => y in S ? k(S, y, { enumerable: !0, configurable: !0, writable: !0, value: e }) : S[y] = e;
3
- var h = (S, y, e) => A(S, typeof y != "symbol" ? y + "" : y, e);
4
- import { nanoid as x } from "nanoid";
5
- import * as r from "three";
6
- import T from "gsap";
7
- import { textureCallout as F } from "./base64/Callout.mjs";
8
- import { textureCalloutAperture as R } from "./base64/CalloutAperture.mjs";
9
- import { innner as H } from "./base64/rotation/innner.mjs";
10
- import { out as E } from "./base64/rotation/out.mjs";
11
- import { textureLightColumn as _ } from "./base64/LightColumn.mjs";
12
- import { Scene as D } from "./utils/scene.mjs";
13
- import { ObtControls as O } from "./utils/controls/obt.mjs";
14
- import { createComposer as I } from "./utils/composer.mjs";
15
- import { DrawLine as B } from "./utils/line2.mjs";
16
- import { createGradientLine as W, startAnimationGradientLine as $ } from "./utils/GradientLine.mjs";
17
- import { tag2D as N } from "./utils/label.mjs";
18
- class ae extends D {
19
- constructor(e, t) {
20
- super(e, t.sceneParameter);
21
- h(this, "group", new r.Group());
22
- h(this, "name");
23
- h(this, "mesh");
24
- h(this, "earth");
25
- h(this, "geometry");
26
- h(this, "material");
27
- h(this, "apertureName");
28
- h(this, "apertureSprite");
29
- h(this, "apertureMaterial");
30
- h(this, "cloudCoverName");
31
- h(this, "cloudCoverGeometry");
32
- h(this, "cloudCoverMaterial");
33
- h(this, "cloudCoverMesh");
34
- h(this, "starrySkyName");
35
- h(this, "starrySkyGeometry");
36
- h(this, "starrySkyPoints");
37
- h(this, "starrySkyMaterial");
38
- h(this, "flightLinesName");
39
- h(this, "flightLinesGroup");
40
- h(this, "lightBeamScatterName");
41
- h(this, "lightBeamScatterGroup");
42
- h(this, "scatterPoints", []);
43
- h(this, "rotationPoints", []);
44
- h(this, "lineCurve", []);
45
- h(this, "earthParameter");
46
- h(this, "apertureParameter");
47
- h(this, "cloudCoverParameter");
48
- h(this, "starrySkyParameter");
49
- h(this, "composerParameter");
50
- h(this, "gridHelperParameter");
51
- h(this, "axesHelperParameter");
52
- h(this, "ambientLightParameter");
53
- h(this, "directionalLightParameter");
54
- h(this, "animationGradientSegmentLine");
55
- h(this, "flyLineAnimation", { time: { value: 0 } });
56
- h(this, "starrySky");
57
- /**
58
- * Test Data
59
- * progress | velocity
60
- */
61
- h(this, "progress", 0);
62
- h(this, "velocity", 0.01);
63
- h(this, "composer");
64
- this.group.scale.set(0, 0, 0), this.name = "Earth", this.apertureName = "Aperture", this.cloudCoverName = "CloudCover", this.starrySkyName = "StarrySky", this.flightLinesName = "flightLinesName", this.earth = new r.Group(), this.apertureSprite = new r.Sprite(), this.earthParameter = t.earthParameter, this.apertureParameter = t.apertureParameter, this.cloudCoverParameter = t.cloudCoverParameter, this.starrySkyParameter = t.starrySkyParameter, this.composerParameter = t.composerParameter, this.gridHelperParameter = t.gridHelperParameter, this.axesHelperParameter = t.axesHelperParameter, this.ambientLightParameter = t.ambientLightParameter, this.directionalLightParameter = t.directionalLightParameter;
65
- }
66
- /** ********************************* 创建地球 START ******************************************** */
67
- async createEarth(e) {
68
- const t = this.earth.getObjectByName(this.name);
69
- return t && this.earth.remove(t), this.geometry = new r.SphereGeometry(
70
- e.radius * 0.1,
71
- e.subdivision,
72
- e.subdivision
73
- ), e.particle && this.earth.add(new r.Points(this.geometry, new r.PointsMaterial({
74
- color: e.particleColor,
75
- transparent: !0,
76
- size: e.particleSize / 100
77
- }))), this.material = new r.MeshStandardMaterial({
78
- map: this.textures.earthTexture,
79
- color: new r.Color(e.color),
80
- side: r.DoubleSide,
81
- transparent: e.transparent,
82
- opacity: e.opacity,
83
- wireframe: e.wireframe
84
- }), this.mesh = new r.Mesh(this.geometry, this.material), this.mesh.name = this.name, this.earth.add(this.mesh), this.earth.rotation.set(0, 3.6, 0), this.earth;
85
- }
86
- /** ********************************* 创建地图描边 START ******************************************** */
87
- async createMapBorder(e, t) {
88
- let o = e;
89
- e === "china" && (o = (await import("./geojson/china.mjs")).default), e === "china-border" && (o = (await import("./geojson/china-border.mjs")).default), e === "world" && (o = (await import("./geojson/world.mjs")).default);
90
- const a = new r.Group(), c = [];
91
- if (o.features.forEach((i) => {
92
- const s = new r.Group();
93
- if (s.name = "border" + i.properties.name, this.earthParameter.label && this.earthParameter.label.show && e === "china" && i.properties.center && i.properties.name) {
94
- const n = N(`<p style="color:${this.earthParameter.label.color};font-size:${this.earthParameter.label.fontSize}px;">${i.properties.name}</p>`);
95
- n.position.copy(this.coordinateTransform(i.properties.center[0], i.properties.center[1])), a.add(n);
96
- }
97
- i.geometry.coordinates.forEach((n) => {
98
- const u = [];
99
- n.forEach((l, p) => {
100
- if (l[p] instanceof Array) {
101
- const f = l.map((m) => this.coordinateTransform(m[0], m[1]));
102
- c.push(f), s.add(B(f, t));
103
- } else
104
- u.push(this.coordinateTransform(l[0], l[1]));
105
- }), u.length > 0 && s.add(B(u, t));
106
- }), a.add(s);
107
- }), t.wakeline) {
108
- const i = new r.CatmullRomCurve3(c[0]), { animations: s, mesh: n } = W(i, t.wakelineNumber);
109
- this.animationGradientSegmentLine = s, n.forEach((u) => {
110
- this.earth.add(u);
111
- });
112
- }
113
- return a.name = e, a;
114
- }
115
- /** ********************************* 创建光晕 START ******************************************** */
116
- async createAperture(e, t) {
117
- const o = this.scene.getObjectByName(this.apertureName);
118
- if (o && this.scene.remove(o), e.show)
119
- return this.apertureMaterial = new r.SpriteMaterial({
120
- map: new r.TextureLoader().load((await import("./base64/Aperture.mjs")).texture),
121
- transparent: e.transparent,
122
- color: new r.Color(e.color),
123
- opacity: e.opacity,
124
- depthWrite: e.depthWrite
125
- }), this.apertureSprite = new r.Sprite(this.apertureMaterial), this.apertureSprite.scale.set(
126
- t.radius * 0.1 * 3,
127
- t.radius * 0.1 * 3,
128
- 1
129
- ), this.apertureSprite.name = this.apertureName, this.apertureSprite;
130
- }
131
- /** ********************************* 创建云层 START ******************************************** */
132
- async createCloudCover(e, t) {
133
- const o = this.earth.getObjectByName(this.cloudCoverName);
134
- if (o && this.earth.remove(o), e.show)
135
- return this.cloudCoverGeometry = new r.SphereGeometry(
136
- t.radius * 0.1 + 0.1,
137
- t.subdivision,
138
- t.subdivision
139
- ), this.cloudCoverMaterial = new r.MeshStandardMaterial({
140
- map: new r.TextureLoader().load((await import("./base64/CloudCover.mjs")).texture),
141
- color: new r.Color(e.color),
142
- side: r.DoubleSide,
143
- transparent: e.transparent,
144
- opacity: e.opacity,
145
- depthWrite: !1
146
- }), this.cloudCoverMesh = new r.Mesh(this.cloudCoverGeometry, this.cloudCoverMaterial), this.cloudCoverMesh.name = this.cloudCoverName, this.cloudCoverMesh;
147
- }
148
- /** ********************************* 创建星空 START ******************************************** */
149
- async createStarrySky(e) {
150
- const t = this.scene.getObjectByName(this.starrySkyName);
151
- if (t && this.scene.remove(t), e.show) {
152
- const o = [], a = [];
153
- this.starrySkyGeometry = new r.BufferGeometry();
154
- for (let c = 0; c < e.number; c++) {
155
- const i = new r.Vector3();
156
- i.x = Math.random() * 2 - 1, i.y = Math.random() * 2 - 1, i.z = Math.random() * 2 - 1, o.push(i.x, i.y, i.z);
157
- const s = new r.Color();
158
- s.setHSL(Math.random() * 0.2 + 0.5, 0.55, Math.random() * 0.25 + 0.55), a.push(s.r, s.g, s.b);
159
- }
160
- return this.starrySkyGeometry.setAttribute(
161
- "position",
162
- new r.Float32BufferAttribute(o, 3)
163
- ), this.starrySkyGeometry.setAttribute(
164
- "color",
165
- new r.Float32BufferAttribute(a, 3)
166
- ), this.starrySkyMaterial = new r.PointsMaterial({
167
- map: new r.TextureLoader().load((await import("./base64/StarrySky.mjs")).texture),
168
- color: e.color,
169
- size: e.size,
170
- transparent: !0,
171
- opacity: e.opacity,
172
- vertexColors: !0,
173
- blending: r.AdditiveBlending,
174
- sizeAttenuation: !0
175
- }), this.starrySkyPoints = new r.Points(this.starrySkyGeometry, this.starrySkyMaterial), this.starrySkyPoints.name = this.starrySkyName, this.starrySkyPoints.scale.set(500, 500, 500), this.starrySkyPoints;
176
- }
177
- }
178
- /** ********************************* 创建航线 START ******************************************** */
179
- createFlightLines(e, t) {
180
- const o = this.earth.getObjectByName(this.flightLinesName);
181
- return o && this.earth.remove(o), this.flightLinesGroup = new r.Group(), this.flightLinesGroup.name = this.flightLinesName + x(), e.forEach((a) => {
182
- const c = this.coordinateTransform(a.coords[0][0], a.coords[0][1]), i = this.coordinateTransform(a.coords[1][0], a.coords[1][1]), s = this.createFlightLineBezierCurve(a, c, i, t.lineParameter, t.labelParameter), n = this.createScatterPoint("s->" + a.fromName, c, t.startScatterParameter), u = this.createScatterPoint("e->" + a.toName, i, t.endScatterParameter);
183
- this.flightLinesGroup.add(s, n, u);
184
- }), this.flightLinesGroup;
185
- }
186
- createFlightLineBezierCurve(e, t, o, a, c) {
187
- const [i, s, n, u] = this.getBezierCurveVCoords(
188
- t,
189
- o
190
- );
191
- if (c.show) {
192
- const m = N(`
193
- <p style="color:${c.color};font-size:${c.fontSize}px;">${e.fromName + " > " + e.toName}</p>
194
- `), v = new r.Vector3().copy(s).add(n).multiplyScalar(0.5);
195
- m.position.copy(v), this.flightLinesGroup.add(m);
196
- }
197
- const l = new r.CubicBezierCurve3(
198
- i,
199
- s,
200
- n,
201
- u
202
- );
203
- this.lineCurve.push(l);
204
- const p = l.getSpacedPoints(100), f = B(p, a);
205
- return f.name = e.fromName + "->" + e.toName, f;
206
- }
207
- /** ********************************* 创建飞线 START ******************************************** */
208
- async createFlyLines(e, t) {
209
- const o = this.earth.getObjectByName(this.flightLinesName);
210
- o && this.earth.remove(o), this.flightLinesGroup = new r.Group(), this.flightLinesGroup.name = this.flightLinesName + x();
211
- let a, c, i;
212
- for await (const s of e) {
213
- const n = this.coordinateTransform(s.coords[0][0], s.coords[0][1]), u = this.coordinateTransform(s.coords[1][0], s.coords[1][1]);
214
- if (!i)
215
- i = this.createFlyLineBezierCurve(s, n, u, t.lineParameter, t.labelParameter, t.bgLineParameter), this.flightLinesGroup.add(i);
216
- else {
217
- const l = i.clone(), [p, f, m, v] = this.getBezierCurveVCoords(
218
- n,
219
- u
220
- ), w = new r.CubicBezierCurve3(p, f, m, v).getPoints(1e3), z = new r.CatmullRomCurve3(w), G = t.bgLineParameter.radius, d = t.bgLineParameter.segments, g = new r.TubeGeometry(z, w.length * d, G, d, !1);
221
- l.getObjectByName("hollowTube").geometry = g;
222
- const L = new r.BufferGeometry().setFromPoints(w), M = w.length, b = new Float32Array(M);
223
- for (let C = 0; C < M; C += 1)
224
- b[C] = C / M;
225
- L.setAttribute("percent", new r.BufferAttribute(b, 1)), l.getObjectByName("line").geometry = L, this.flightLinesGroup.add(l);
226
- }
227
- if (t.labelParameter.show && this.flightLinesGroup.add(this.createFlyLine2DLabel(s, n, u, t.labelParameter)), !c)
228
- c = this.createScatterPoint("e->" + s.toName, u, t.endScatterParameter), this.flightLinesGroup.add(c);
229
- else {
230
- const l = c.clone();
231
- l.position.set(n.x, n.y, n.z), l.quaternion.setFromUnitVectors(
232
- new r.Vector3(0, 0, 1),
233
- new r.Vector3(n.x, n.y, n.z).normalize()
234
- ), this.flightLinesGroup.add(l);
235
- }
236
- if (!a)
237
- a = this.createScatterPoint("s->" + s.fromName, n, t.startScatterParameter), this.flightLinesGroup.add(a);
238
- else {
239
- const l = a.clone();
240
- l.position.set(n.x, n.y, n.z), l.quaternion.setFromUnitVectors(
241
- new r.Vector3(0, 0, 1),
242
- new r.Vector3(n.x, n.y, n.z).normalize()
243
- ), this.flightLinesGroup.add(l);
244
- }
245
- }
246
- return this.flightLinesGroup;
247
- }
248
- createFlyLineMaterial(e) {
249
- const t = {
250
- number: { value: e.number },
251
- speed: { value: e.speed },
252
- length: { value: e.length },
253
- size: { value: e.size },
254
- color: { value: e.color }
255
- };
256
- return new r.ShaderMaterial({
257
- uniforms: {
258
- time: this.flyLineAnimation.time,
259
- number: t.number,
260
- speed: t.speed,
261
- length: t.length,
262
- size: t.size,
263
- color: {
264
- value: t.color.value ? new r.Color(t.color.value) : new r.Color(Math.random(), Math.random(), Math.random())
265
- }
266
- },
267
- vertexShader: `
268
- attribute float percent;
269
- uniform float time;
270
- uniform float number;
271
- uniform float speed;
272
- uniform float length;
273
- varying float opacity;
274
- uniform float size;
275
-
276
- void main()
277
- {
278
- float l = clamp(1.0-length, 0.0, 1.0);
279
-
280
- gl_PointSize = clamp(fract(percent*number + l - time*number*speed)-l, 0.0, 1.) * size * (1./length);
281
-
282
- opacity = gl_PointSize/size;
283
- gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
284
- }`,
285
- fragmentShader: `
286
- varying float opacity;
287
- uniform vec3 color;
288
-
289
- void main(){
290
- if (opacity <=0.2){
291
- discard;
292
- }
293
- gl_FragColor = vec4(color, 1.0);
294
- }
295
- `,
296
- transparent: !0,
297
- blending: r.AdditiveBlending
298
- });
299
- }
300
- createFlyLineBezierCurve(e, t, o, a, c, i) {
301
- const s = new r.Group(), [n, u, l, p] = this.getBezierCurveVCoords(
302
- t,
303
- o
304
- ), m = new r.CubicBezierCurve3(n, u, l, p).getPoints(1e3);
305
- try {
306
- let d = function(g) {
307
- const L = new r.CatmullRomCurve3(g), M = i.radius, b = i.segments, C = new r.TubeGeometry(L, g.length * b, M, b, !1), V = new r.MeshStandardMaterial({
308
- color: i.color,
309
- opacity: i.opacity,
310
- transparent: !0,
311
- depthTest: !1
312
- });
313
- return new r.Mesh(C, V);
314
- };
315
- if (i.show) {
316
- const g = d(m);
317
- g && (g.name = "hollowTube", s.add(g));
318
- }
319
- } catch {
320
- }
321
- const v = new r.BufferGeometry().setFromPoints(m), P = m.length, w = new Float32Array(P);
322
- for (let d = 0; d < P; d += 1)
323
- w[d] = d / P;
324
- v.setAttribute("percent", new r.BufferAttribute(w, 1));
325
- const z = this.createFlyLineMaterial(a), G = new r.Points(v, z);
326
- return G.name = "line", s.add(G), s;
327
- }
328
- createFlyLine2DLabel(e, t, o, a) {
329
- const [c, i, s, n] = this.getBezierCurveVCoords(
330
- t,
331
- o
332
- );
333
- if (a.show) {
334
- const u = N(`
335
- <p style="color:${a.color};font-size:${a.fontSize}px;">${e.fromName + " > " + e.toName}</p>
336
- `), l = new r.Vector3().copy(i).add(s).multiplyScalar(0.5);
337
- return u.position.copy(l), u;
338
- }
339
- return null;
340
- }
341
- /** ********************************* 创建散点 START ******************************************** */
342
- createScatterPoint(e, t, o) {
343
- const a = new r.Group();
344
- a.name = e, a.position.set(t.x, t.y, t.z), a.quaternion.setFromUnitVectors(
345
- new r.Vector3(0, 0, 1),
346
- new r.Vector3(t.x, t.y, t.z).normalize()
347
- );
348
- const c = this.createScatterPointMesh("in", F, o), i = this.createScatterPointMesh("out", R, o);
349
- return this.scatterPoints.push(i), a.add(c, i);
350
- }
351
- createScatterPointMesh(e, t, o) {
352
- const a = new r.TextureLoader().load(t), c = new r.PlaneGeometry(1, 1);
353
- c.rotateX(Math.PI);
354
- const i = new r.MeshStandardMaterial({
355
- color: o.color,
356
- opacity: o.opacity,
357
- map: a,
358
- transparent: !0,
359
- side: r.DoubleSide,
360
- depthWrite: !1
361
- }), s = new r.Mesh(c, i), n = (e === "out" ? 0.025 : 0.015) * o.size;
362
- return s.scale.set(n, n, n), e === "out" && (s.size = n, s._s = Math.random() * 1 + 1), s;
363
- }
364
- /** ********************************* 创建旋转点 START ******************************************** */
365
- createRotationPoint(e, t, o) {
366
- const a = new r.Group();
367
- a.name = e, a.position.set(t.x, t.y, t.z), a.quaternion.setFromUnitVectors(
368
- new r.Vector3(0, 0, 1),
369
- new r.Vector3(t.x, t.y, t.z).normalize()
370
- );
371
- const c = this.createRotationPointMesh("in", H, o), i = this.createRotationPointMesh("out", E, o);
372
- return this.rotationPoints.push(c), a.add(c, i);
373
- }
374
- createRotationPointMesh(e, t, o) {
375
- const a = new r.TextureLoader().load(t), c = new r.PlaneGeometry(1, 1);
376
- c.rotateX(Math.PI);
377
- const i = new r.MeshStandardMaterial({
378
- color: o.color,
379
- opacity: o.opacity,
380
- map: a,
381
- transparent: !0,
382
- side: r.DoubleSide,
383
- depthWrite: !1
384
- }), s = new r.Mesh(c, i), n = (e === "out" ? 0.02 : 0.015) * o.size;
385
- return s.scale.set(n, n, n), e === "out" && (s.size = n, s._s = Math.random() * 1 + 1), s;
386
- }
387
- /** ********************************* 创建光柱 START ******************************************** */
388
- async createLightBeamScatter(e, t) {
389
- const o = this.earth.getObjectByName(this.lightBeamScatterName);
390
- o && this.earth.remove(o), this.lightBeamScatterGroup = new r.Group(), this.lightBeamScatterGroup.name = this.lightBeamScatterName + x();
391
- for await (const a of e) {
392
- const c = this.coordinateTransform(a.value[0], a.value[1]), i = this.createRotationPoint(a.name, c, t.scatterParameter), s = this.createLightBeam(c, a.value[2], t.lightBeamParameter);
393
- this.earth.add(s), this.lightBeamScatterGroup.add(i);
394
- }
395
- return this.lightBeamScatterGroup;
396
- }
397
- createLightBeam(e, t, o) {
398
- const a = new r.Group(), c = t ? o.baseHeight * t : o.baseHeight;
399
- let i, s;
400
- if (o.type === 1) {
401
- const p = new r.TextureLoader().load(_);
402
- i = new r.PlaneGeometry(o.radius / 2, c), i.rotateX(Math.PI / 2), i.translate(0, 0, c / 2), s = new r.MeshStandardMaterial({
403
- map: p,
404
- color: o.color,
405
- opacity: o.opacity,
406
- transparent: !0,
407
- side: r.DoubleSide,
408
- depthWrite: !1
409
- });
410
- }
411
- o.type === 2 && (i = new r.BoxGeometry(0.05, c, 0.05), i.rotateX(Math.PI / 2), i.translate(0, 0, c / 2), s = new r.MeshBasicMaterial({
412
- color: o.color,
413
- opacity: o.opacity,
414
- transparent: !0,
415
- side: r.DoubleSide,
416
- depthWrite: !1
417
- }));
418
- const n = new r.Mesh(i, s);
419
- a.position.set(e.x, e.y, e.z), a.add(n, n.clone().rotateZ(Math.PI / 2));
420
- const u = new r.Vector3(e.x, e.y, e.z).normalize(), l = new r.Vector3(0, 0, 1);
421
- return a.quaternion.setFromUnitVectors(l, u), a;
422
- }
423
- moveOnCurve(e, t) {
424
- if (!(!e && !t)) if (this.progress <= 1 - this.velocity) {
425
- const o = e.getPointAt(this.progress), a = e.getPointAt(this.progress + this.velocity);
426
- if (o && a) {
427
- t.position.set(o.x, o.y, o.z);
428
- const c = a, i = 0, s = new r.Matrix4();
429
- s.lookAt(t.position, c, t.up), s.multiply(new r.Matrix4().makeRotationFromEuler(new r.Euler(0, i, 0)));
430
- const n = new r.Quaternion().setFromRotationMatrix(s);
431
- t.quaternion.slerp(n, 0.2);
432
- }
433
- this.progress += this.velocity;
434
- } else
435
- this.progress = 0;
436
- }
437
- /** ********************************* 场景渲染 START ******************************************** */
438
- render() {
439
- this.animationFrameId = requestAnimationFrame(() => {
440
- this.starrySkyPoints && this.starrySkyParameter.animation && (this.starrySkyPoints.rotation.y += this.starrySkyParameter.animationSpeed), this.earth && this.earthParameter.animation && (this.earth.rotation.y += this.earthParameter.animationSpeed), this.cloudCoverMesh && this.cloudCoverParameter.animation && (this.cloudCoverMesh.rotation.y += this.cloudCoverParameter.animationSpeed), this.scatterPoints.length && this.scatterPoints.forEach((e) => {
441
- e._s += 4e-3, e.scale.set(e.size * e._s, e.size * e._s, e.size * e._s), e._s <= 1.5 ? e.material.opacity = (e._s - 1) * 2 : e._s > 1.5 && e._s <= 2 ? e.material.opacity = 1 - (e._s - 1.5) * 2 : e._s = 1;
442
- }), this.rotationPoints.length && this.rotationPoints.forEach((e) => {
443
- e.rotation.z += 0.01;
444
- }), this.stats && this.stats.update(), this.animationGradientSegmentLine && $(this.animationGradientSegmentLine), this.webGlRenderer.autoClear = !1, this.webGlRenderer.clear(), this.composerParameter.isComposer ? (this.composer.render(), this.webGlRenderer.clearDepth()) : this.webGlRenderer.render(this.scene, this.camera), this.labelRenderer.render(this.scene, this.camera), this.flyLineAnimation.time.value += 0.01, this.render();
445
- });
446
- }
447
- start() {
448
- return new Promise((e) => {
449
- this.loadTextures([{
450
- key: "earthTexture",
451
- value: this.earthParameter.texture
452
- }], () => {
453
- this.createEarth(this.earthParameter).then((i) => {
454
- this.add(i);
455
- }), this.createAperture(this.apertureParameter, this.earthParameter).then((i) => {
456
- this.add(i);
457
- }), this.createCloudCover(this.cloudCoverParameter, this.earthParameter).then((i) => {
458
- this.add(i);
459
- }), this.createStarrySky(this.starrySkyParameter).then((i) => {
460
- this.starrySky = i;
461
- });
462
- const t = this.createGridHelper(this.gridHelperParameter), o = this.createAxesHelper(this.axesHelperParameter), a = this.createAmbientLight(this.ambientLightParameter), c = this.createDirectionalLight(this.directionalLightParameter);
463
- this.add(t, o, a, c), this.scene.add(this.group), new O(this.camera, this.webGlRenderer).init(), this.composer = I(this.webGlRenderer, this.scene, this.camera, this.composerParameter.composer), this.render(), e(this);
464
- });
465
- });
466
- }
467
- /**
468
- * 进入
469
- */
470
- accessAnimation() {
471
- return new Promise((e) => {
472
- T.to(this.group.scale, {
473
- x: 1,
474
- y: 1,
475
- z: 1,
476
- duration: 2,
477
- ease: "Quadratic",
478
- onComplete: () => {
479
- this.add(this.starrySky), e(!0);
480
- }
481
- });
482
- });
483
- }
484
- /** ********************************* 场景工具 START ******************************************** */
485
- add(...e) {
486
- e.forEach((t) => {
487
- t && this.group.add(t);
488
- });
489
- }
490
- coordinateTransform(e, t) {
491
- const o = (90 - t) * (Math.PI / 180), a = (90 + e) * (Math.PI / 180), c = new r.Spherical(this.earthParameter.radius * 0.1, o, a);
492
- return new r.Vector3().setFromSpherical(c);
493
- }
494
- getBezierCurveVCoords(e, t) {
495
- const o = e.angleTo(t) * 1.5 / Math.PI / 0.1, a = o * 0.4, c = o * o * 12, i = new r.Ray(new r.Vector3(0, 0, 0), e.clone().add(t.clone()).divideScalar(2)), s = i.at(
496
- c / i.at(1, new r.Vector3()).distanceTo(new r.Vector3(0, 0, 0)) + 1,
497
- new r.Vector3()
498
- ), n = e.clone().lerp(s, a / e.clone().distanceTo(s)), u = t.clone().lerp(s, a / t.clone().distanceTo(s));
499
- return [e, n, u, t];
500
- }
501
- }
502
- export {
503
- ae as Earth
504
- };