deeptwins-engine-3d 0.1.76 → 0.2.1

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 (237) hide show
  1. package/dist/assets/Build/DeepTwins/Image/noise.png +0 -0
  2. package/dist/assets/Build/DeepTwins/Workers/CustomRasterClip.worker.js +1 -2
  3. package/dist/assets/Build/DeepTwins/Workers/MvtVector.worker.js +1 -1
  4. package/dist/assets/Build/Map3d/ThirdParty/Workers/zip-web-worker.js +640 -0
  5. package/dist/assets/Build/Map3d/ThirdParty/wasm_splats_bg.wasm +0 -0
  6. package/dist/assets/Build/Map3d/ThirdParty/zip-module.wasm +0 -0
  7. package/dist/assets/Build/Map3d/Workers/chunk-27NG6PQR.js +456 -0
  8. package/dist/assets/Build/Map3d/Workers/chunk-2JVMMMWT.js +353 -0
  9. package/dist/assets/Build/Map3d/Workers/chunk-2Y2XYQCS.js +1481 -0
  10. package/dist/assets/Build/Map3d/Workers/chunk-34RF3V5G.js +220 -0
  11. package/dist/assets/Build/Map3d/Workers/chunk-35H7BYLJ.js +1800 -0
  12. package/dist/assets/Build/Map3d/Workers/chunk-57OGEF5V.js +435 -0
  13. package/dist/assets/Build/Map3d/Workers/chunk-5PX3DYJA.js +196 -0
  14. package/dist/assets/Build/Map3d/Workers/chunk-7B5XGQRN.js +171 -0
  15. package/dist/assets/Build/Map3d/Workers/chunk-ATLWOZFF.js +39 -0
  16. package/dist/assets/Build/Map3d/Workers/chunk-BMSUECTA.js +1055 -0
  17. package/dist/assets/Build/Map3d/Workers/chunk-C6IA4TKW.js +476 -0
  18. package/dist/assets/Build/Map3d/Workers/chunk-CZ44I32U.js +157 -0
  19. package/dist/assets/Build/Map3d/Workers/chunk-DE6UV44R.js +122 -0
  20. package/dist/assets/Build/Map3d/Workers/chunk-DUCCKVOG.js +834 -0
  21. package/dist/assets/Build/Map3d/Workers/chunk-EBJBPIYX.js +239 -0
  22. package/dist/assets/Build/Map3d/Workers/chunk-EYSYQ2R6.js +138 -0
  23. package/dist/assets/Build/Map3d/Workers/chunk-FMCAAUQI.js +368 -0
  24. package/dist/assets/Build/Map3d/Workers/chunk-GMYZNRRQ.js +2717 -0
  25. package/dist/assets/Build/Map3d/Workers/chunk-GWPNZZV4.js +781 -0
  26. package/dist/assets/Build/Map3d/Workers/chunk-HLP2U4KW.js +758 -0
  27. package/dist/assets/Build/Map3d/Workers/chunk-HSJSUPQV.js +500 -0
  28. package/dist/assets/Build/Map3d/Workers/chunk-I73Q3AG7.js +58 -0
  29. package/dist/assets/Build/Map3d/Workers/chunk-IMZ4YIMV.js +511 -0
  30. package/dist/assets/Build/Map3d/Workers/chunk-IZSK4DVF.js +421 -0
  31. package/dist/assets/Build/Map3d/Workers/chunk-JKLMRPKK.js +75 -0
  32. package/dist/assets/Build/Map3d/Workers/chunk-KGM345JM.js +691 -0
  33. package/dist/assets/Build/Map3d/Workers/chunk-L4IR5U4G.js +102 -0
  34. package/dist/assets/Build/Map3d/Workers/chunk-MG4EVQH2.js +44 -0
  35. package/dist/assets/Build/Map3d/Workers/chunk-NXWEFAZJ.js +300 -0
  36. package/dist/assets/Build/Map3d/Workers/chunk-PDFAJISJ.js +59 -0
  37. package/dist/assets/Build/Map3d/Workers/chunk-PHWZFJR5.js +100 -0
  38. package/dist/assets/Build/Map3d/Workers/chunk-PLE7CHBE.js +101 -0
  39. package/dist/assets/Build/Map3d/Workers/chunk-PN3GIZ5Q.js +163 -0
  40. package/dist/assets/Build/Map3d/Workers/chunk-PXL5XLHV.js +1073 -0
  41. package/dist/assets/Build/Map3d/Workers/chunk-QYXOF5JC.js +959 -0
  42. package/dist/assets/Build/Map3d/Workers/chunk-R2LIFXV3.js +115 -0
  43. package/dist/assets/Build/Map3d/Workers/chunk-R4W6IRJZ.js +10357 -0
  44. package/dist/assets/Build/Map3d/Workers/chunk-R5PZXG56.js +1258 -0
  45. package/dist/assets/Build/Map3d/Workers/chunk-RZQLZIUI.js +629 -0
  46. package/dist/assets/Build/Map3d/Workers/chunk-SIBDD6Y4.js +390 -0
  47. package/dist/assets/Build/Map3d/Workers/chunk-U5NN6JTQ.js +398 -0
  48. package/dist/assets/Build/Map3d/Workers/chunk-UA5RPPP3.js +73 -0
  49. package/dist/assets/Build/Map3d/Workers/chunk-UXLKFS3C.js +305 -0
  50. package/dist/assets/Build/Map3d/Workers/chunk-VUX4BQIM.js +37 -0
  51. package/dist/assets/Build/Map3d/Workers/chunk-WJDUUUJS.js +684 -0
  52. package/dist/assets/Build/Map3d/Workers/chunk-XBJOJHWX.js +139 -0
  53. package/dist/assets/Build/Map3d/Workers/chunk-XJDMTNKD.js +634 -0
  54. package/dist/assets/Build/Map3d/Workers/chunk-XUCXZZE5.js +963 -0
  55. package/dist/assets/Build/Map3d/Workers/chunk-YIKGVMJ5.js +287 -0
  56. package/dist/assets/Build/Map3d/Workers/chunk-YTNCIBPQ.js +262 -0
  57. package/dist/assets/Build/Map3d/Workers/chunk-ZMDUYETO.js +55 -0
  58. package/dist/assets/Build/Map3d/Workers/chunk-ZW52HXFN.js +2857 -0
  59. package/dist/esm/analyze/LineOfSightAnalysis.js +1 -326
  60. package/dist/esm/analyze/SubmergenceAnalysis.js +1 -137
  61. package/dist/esm/analyze/SunLightAnalysis.js +1 -91
  62. package/dist/esm/analyze/TerrainExcavationAnalysis.js +1 -612
  63. package/dist/esm/analyze/ViewshedAnalysis.js +1 -292
  64. package/dist/esm/cameraControl/ModelRoamHistory.js +1 -639
  65. package/dist/esm/cameraControl/ModelRoamRealTime.js +1 -874
  66. package/dist/esm/cameraControl/Roam.js +1 -418
  67. package/dist/esm/cameraControl/Rotate.js +1 -134
  68. package/dist/esm/cameraControl/RotateInPlace.js +1 -99
  69. package/dist/esm/constant.d.ts +90 -0
  70. package/dist/esm/constant.js +1 -1287
  71. package/dist/esm/deepTwins/index.js +1 -121
  72. package/dist/esm/drawCommand/index.js +1 -3
  73. package/dist/esm/drawCommand/viewShed/Event.js +1 -142
  74. package/dist/esm/drawCommand/viewShed/RectangularSensorPrimitive.js +1 -1306
  75. package/dist/esm/drawCommand/viewShed/ViewShadowPrimitive.js +1 -66
  76. package/dist/esm/drawCommand/viewShed/ViewShedAnalyserLayer.js +1 -466
  77. package/dist/esm/drawCommand/viewShed/ViewShedMap.js +1 -1238
  78. package/dist/esm/drawCommand/viewShed/config.js +1 -21
  79. package/dist/esm/drawCommand/volumeCloud/GeometryPrimitive.js +1 -89
  80. package/dist/esm/drawCommand/volumeCloud/ImprovedNoise.js +1 -112
  81. package/dist/esm/drawCommand/volumeCloud/VolumeClouds.js +1 -91
  82. package/dist/esm/drawer/algorithm.js +1 -314
  83. package/dist/esm/drawer/common.js +1 -965
  84. package/dist/esm/drawer/coordinate.js +1 -184
  85. package/dist/esm/drawer/index.js +1 -688
  86. package/dist/esm/drawer/plotUtil.js +1 -266
  87. package/dist/esm/drawer/shape/Assemble.js +1 -415
  88. package/dist/esm/drawer/shape/AttackArrow.js +1 -442
  89. package/dist/esm/drawer/shape/BaseShape.js +1 -383
  90. package/dist/esm/drawer/shape/Bow.js +1 -375
  91. package/dist/esm/drawer/shape/Circle.js +1 -461
  92. package/dist/esm/drawer/shape/Curve.js +1 -386
  93. package/dist/esm/drawer/shape/DragPoint.js +1 -211
  94. package/dist/esm/drawer/shape/Elliptic.js +1 -491
  95. package/dist/esm/drawer/shape/Formation.js +1 -395
  96. package/dist/esm/drawer/shape/PincerArrow.js +1 -445
  97. package/dist/esm/drawer/shape/Point.js +1 -131
  98. package/dist/esm/drawer/shape/Polygon.js +1 -368
  99. package/dist/esm/drawer/shape/Polyline.js +1 -325
  100. package/dist/esm/drawer/shape/RegularPolygon.js +1 -468
  101. package/dist/esm/drawer/shape/RightAngleArrow.js +1 -423
  102. package/dist/esm/drawer/shape/Sector.js +1 -568
  103. package/dist/esm/drawer/shape/StraightArrow.js +1 -422
  104. package/dist/esm/drawer/shape/SwallowtailArrow.js +1 -438
  105. package/dist/esm/drawer/types.js +1 -11
  106. package/dist/esm/drawer/utils.js +1 -381
  107. package/dist/esm/global.css +22 -1
  108. package/dist/esm/graphicLayer/BaseEntity.js +1 -51
  109. package/dist/esm/graphicLayer/BaseLayer.js +1 -730
  110. package/dist/esm/graphicLayer/BasePointPrimitive.js +1 -45
  111. package/dist/esm/graphicLayer/BasePrimitive.js +1 -36
  112. package/dist/esm/graphicLayer/BasePrimitiveInstance.js +1 -37
  113. package/dist/esm/graphicLayer/BaseSource.d.ts +1 -1
  114. package/dist/esm/graphicLayer/BaseSource.js +1 -630
  115. package/dist/esm/graphicLayer/BillboardEntity.js +1 -106
  116. package/dist/esm/graphicLayer/BillboardPrimitive.js +1 -119
  117. package/dist/esm/graphicLayer/BoxEntity.js +1 -99
  118. package/dist/esm/graphicLayer/BoxPrimitive.js +1 -48
  119. package/dist/esm/graphicLayer/BoxPrimitiveInstance.js +1 -91
  120. package/dist/esm/graphicLayer/EllipseEntity.js +1 -110
  121. package/dist/esm/graphicLayer/EllipsePrimitive.js +1 -47
  122. package/dist/esm/graphicLayer/EllipsePrimitiveInstance.js +1 -98
  123. package/dist/esm/graphicLayer/EllipsoidEntity.js +1 -118
  124. package/dist/esm/graphicLayer/EllipsoidPrimitive.js +1 -48
  125. package/dist/esm/graphicLayer/EllipsoidPrimitiveInstance.js +1 -113
  126. package/dist/esm/graphicLayer/GraphicLayerCollection.js +1 -491
  127. package/dist/esm/graphicLayer/HtmlEntity.d.ts +4 -0
  128. package/dist/esm/graphicLayer/HtmlEntity.js +1 -189
  129. package/dist/esm/graphicLayer/LabelEntity.js +1 -110
  130. package/dist/esm/graphicLayer/LabelPrimitive.js +1 -127
  131. package/dist/esm/graphicLayer/ModelEntity.js +1 -122
  132. package/dist/esm/graphicLayer/ModelPrimitive.js +1 -59
  133. package/dist/esm/graphicLayer/ModelPrimitiveInstance.js +1 -86
  134. package/dist/esm/graphicLayer/PointEntity.js +1 -94
  135. package/dist/esm/graphicLayer/PointPrimitive.js +1 -107
  136. package/dist/esm/graphicLayer/PolygonEntity.js +1 -103
  137. package/dist/esm/graphicLayer/PolygonGroundPrimitive.js +1 -49
  138. package/dist/esm/graphicLayer/PolygonGroundPrimitiveImageMaterialInstance.js +1 -87
  139. package/dist/esm/graphicLayer/PolygonPrimitive.js +1 -60
  140. package/dist/esm/graphicLayer/PolygonPrimitiveImageMaterialInstance.js +1 -84
  141. package/dist/esm/graphicLayer/PolygonPrimitiveInstance.js +1 -101
  142. package/dist/esm/graphicLayer/PolylineEntity.js +1 -96
  143. package/dist/esm/graphicLayer/PolylineGroundPrimitive.js +1 -55
  144. package/dist/esm/graphicLayer/PolylineGroundPrimitiveInstance.js +1 -85
  145. package/dist/esm/graphicLayer/PolylinePrimitive.js +1 -53
  146. package/dist/esm/graphicLayer/PolylinePrimitiveInstance.js +1 -85
  147. package/dist/esm/graphicLayer/PolylineVolumeEntity.js +1 -105
  148. package/dist/esm/graphicLayer/PolylineVolumePrimitive.js +1 -47
  149. package/dist/esm/graphicLayer/PolylineVolumePrimitiveInstance.js +1 -94
  150. package/dist/esm/graphicLayer/WallEntity.js +1 -96
  151. package/dist/esm/graphicLayer/WallPrimitive.js +1 -47
  152. package/dist/esm/graphicLayer/WallPrimitiveInstance.js +1 -88
  153. package/dist/esm/index.d.ts +4 -0
  154. package/dist/esm/index.js +1 -175
  155. package/dist/esm/lowAltitude/BarrierLayer.js +1 -172
  156. package/dist/esm/lowAltitude/BaseGridMvtLayer.js +1 -122
  157. package/dist/esm/lowAltitude/FactorLayer.js +1 -199
  158. package/dist/esm/lowAltitude/FlightPlanning.js +1 -411
  159. package/dist/esm/lowAltitude/FlightRiskEvaluation.js +1 -543
  160. package/dist/esm/lowAltitude/GridDraw.js +1 -137
  161. package/dist/esm/lowAltitude/PoiLayer.js +1 -74
  162. package/dist/esm/lowAltitude/RoutePlanning.js +1 -318
  163. package/dist/esm/lowAltitude/VisitLayer.js +1 -180
  164. package/dist/esm/map/Event.js +1 -377
  165. package/dist/esm/map/GroundSkyBox.js +1 -166
  166. package/dist/esm/map/Map.js +1 -881
  167. package/dist/esm/map/Property.js +1 -35
  168. package/dist/esm/material/AtmosphericDispersion.js +1 -569
  169. package/dist/esm/material/GlobalVolumetricCloud.js +1 -377
  170. package/dist/esm/material/VolumeCloud.js +1 -115
  171. package/dist/esm/material/WeatherEffects.js +1 -351
  172. package/dist/esm/material/entity/BaseMaterialProperty.js +1 -51
  173. package/dist/esm/material/entity/CircleWaveMaterialProperty.js +1 -101
  174. package/dist/esm/material/entity/DynamicWallMaterialProperty.js +1 -101
  175. package/dist/esm/material/entity/ImageGlowingMaterialProperty.js +1 -89
  176. package/dist/esm/material/entity/ImageMaterialProperty.js +1 -34
  177. package/dist/esm/material/entity/PolylineTrailLinkMaterialProperty.js +1 -132
  178. package/dist/esm/material/primitive/BaseMaterialAppearance.js +1 -28
  179. package/dist/esm/material/primitive/ImageGlowingMaterialAppearance.js +1 -77
  180. package/dist/esm/material/primitive/ImageMaterialAppearance.js +1 -77
  181. package/dist/esm/measure/Area.js +1 -220
  182. package/dist/esm/measure/BaseDraw.js +1 -105
  183. package/dist/esm/measure/Distance.js +1 -223
  184. package/dist/esm/measure/index.js +1 -266
  185. package/dist/esm/measure/types.js +1 -17
  186. package/dist/esm/measure/utils.js +1 -319
  187. package/dist/esm/particle/BaseParticle.js +1 -196
  188. package/dist/esm/particle/FireParticle.js +1 -65
  189. package/dist/esm/particle/FountainParticle.js +1 -80
  190. package/dist/esm/particle/SmokeParticle.js +1 -65
  191. package/dist/esm/particle/common.js +1 -23
  192. package/dist/esm/particle/index.js +1 -5
  193. package/dist/esm/property/PositionProperty.js +1 -56
  194. package/dist/esm/tileLayer/ArcGisLayer.js +1 -41
  195. package/dist/esm/tileLayer/CustomRasterClipWorkerClient.js +1 -147
  196. package/dist/esm/tileLayer/CustomRasterLayer.js +1 -1136
  197. package/dist/esm/tileLayer/ImageryLayer.js +1 -44
  198. package/dist/esm/tileLayer/MvtVectorLoad.js +1 -1549
  199. package/dist/esm/tileLayer/MvtVectorWorkerClient.js +1 -126
  200. package/dist/esm/tileLayer/RasterLayer.js +1 -23
  201. package/dist/esm/tileLayer/WmsLayer.js +1 -26
  202. package/dist/esm/tileLayer/WmtsLayer.js +1 -23
  203. package/dist/esm/tool/BuildClampedPolygonGrid.js +1 -278
  204. package/dist/esm/tool/Compass.js +1 -282
  205. package/dist/esm/tool/PrimitiveCluster.js +1 -706
  206. package/dist/esm/tool/TimerInterval.js +1 -58
  207. package/dist/esm/tool/common.js +1 -405
  208. package/dist/esm/tool/fetch.js +1 -222
  209. package/dist/esm/tool/heatmap.js +1 -631
  210. package/dist/esm/tool/utils.d.ts +1 -0
  211. package/dist/esm/tool/utils.js +1 -501
  212. package/dist/esm/toolTip/index.js +1 -79
  213. package/dist/esm/videoFusion/BaseVideo.d.ts +7 -0
  214. package/dist/esm/videoFusion/BaseVideo.js +1 -330
  215. package/dist/esm/videoFusion/VideoProject.js +1 -230
  216. package/dist/esm/videoFusion/VideoTexture.js +1 -163
  217. package/dist/esm/visualization/BaseHeatmap.js +1 -271
  218. package/dist/esm/visualization/BoundaryHighlight.d.ts +135 -0
  219. package/dist/esm/visualization/BoundaryHighlight.js +1 -0
  220. package/dist/esm/visualization/DynamicWater.js +1 -289
  221. package/dist/esm/visualization/Frustum.js +1 -248
  222. package/dist/esm/visualization/Heatmap2d.js +1 -97
  223. package/dist/esm/visualization/Heatmap3d.js +1 -281
  224. package/dist/esm/visualization/MigrationEffect.js +1 -397
  225. package/dist/esm/visualization/PointCluster.js +1 -220
  226. package/dist/esm/visualization/RadarScan.js +1 -333
  227. package/dist/esm/visualization/SampledTerrainRiver.d.ts +180 -0
  228. package/dist/esm/visualization/SampledTerrainRiver.js +1 -0
  229. package/dist/esm/visualization/SampledTerrainWater.d.ts +170 -0
  230. package/dist/esm/visualization/SampledTerrainWater.js +1 -0
  231. package/dist/esm/visualization/WindField.d.ts +72 -0
  232. package/dist/esm/visualization/WindField.js +1 -0
  233. package/dist/esm/visualization/windCore.d.ts +161 -0
  234. package/dist/esm/visualization/windCore.js +8 -0
  235. package/dist/umd/deeptwins-engine-3d.min.css +1 -1
  236. package/dist/umd/deeptwins-engine-3d.min.js +1 -1
  237. package/package.json +6 -4
@@ -0,0 +1,435 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.0.42
5
+ *
6
+ * Copyright 2011-2022 Cesium Contributors
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ *
20
+ * Columbus View (Pat. Pend.)
21
+ *
22
+ * Portions licensed separately.
23
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
24
+ */
25
+
26
+ import {
27
+ Cartesian4_default,
28
+ Matrix2_default,
29
+ Matrix4_default
30
+ } from "./chunk-R4W6IRJZ.js";
31
+ import {
32
+ ComponentDatatype_default
33
+ } from "./chunk-YTNCIBPQ.js";
34
+ import {
35
+ Cartesian2_default,
36
+ Cartesian3_default,
37
+ Matrix3_default
38
+ } from "./chunk-ZW52HXFN.js";
39
+ import {
40
+ Math_default
41
+ } from "./chunk-HSJSUPQV.js";
42
+ import {
43
+ Check_default,
44
+ DeveloperError_default
45
+ } from "./chunk-PN3GIZ5Q.js";
46
+ import {
47
+ defined_default
48
+ } from "./chunk-JKLMRPKK.js";
49
+
50
+ // packages/engine/Source/Scene/AttributeType.js
51
+ var AttributeType = {
52
+ /**
53
+ * The attribute is a single component.
54
+ *
55
+ * @type {string}
56
+ * @constant
57
+ */
58
+ SCALAR: "SCALAR",
59
+ /**
60
+ * The attribute is a two-component vector.
61
+ *
62
+ * @type {string}
63
+ * @constant
64
+ */
65
+ VEC2: "VEC2",
66
+ /**
67
+ * The attribute is a three-component vector.
68
+ *
69
+ * @type {string}
70
+ * @constant
71
+ */
72
+ VEC3: "VEC3",
73
+ /**
74
+ * The attribute is a four-component vector.
75
+ *
76
+ * @type {string}
77
+ * @constant
78
+ */
79
+ VEC4: "VEC4",
80
+ /**
81
+ * The attribute is a 2x2 matrix.
82
+ *
83
+ * @type {string}
84
+ * @constant
85
+ */
86
+ MAT2: "MAT2",
87
+ /**
88
+ * The attribute is a 3x3 matrix.
89
+ *
90
+ * @type {string}
91
+ * @constant
92
+ */
93
+ MAT3: "MAT3",
94
+ /**
95
+ * The attribute is a 4x4 matrix.
96
+ *
97
+ * @type {string}
98
+ * @constant
99
+ */
100
+ MAT4: "MAT4"
101
+ };
102
+ AttributeType.getMathType = function(attributeType) {
103
+ switch (attributeType) {
104
+ case AttributeType.SCALAR:
105
+ return Number;
106
+ case AttributeType.VEC2:
107
+ return Cartesian2_default;
108
+ case AttributeType.VEC3:
109
+ return Cartesian3_default;
110
+ case AttributeType.VEC4:
111
+ return Cartesian4_default;
112
+ case AttributeType.MAT2:
113
+ return Matrix2_default;
114
+ case AttributeType.MAT3:
115
+ return Matrix3_default;
116
+ case AttributeType.MAT4:
117
+ return Matrix4_default;
118
+ //>>includeStart('debug', pragmas.debug);
119
+ default:
120
+ throw new DeveloperError_default("attributeType is not a valid value.");
121
+ }
122
+ };
123
+ AttributeType.getNumberOfComponents = function(attributeType) {
124
+ switch (attributeType) {
125
+ case AttributeType.SCALAR:
126
+ return 1;
127
+ case AttributeType.VEC2:
128
+ return 2;
129
+ case AttributeType.VEC3:
130
+ return 3;
131
+ case AttributeType.VEC4:
132
+ case AttributeType.MAT2:
133
+ return 4;
134
+ case AttributeType.MAT3:
135
+ return 9;
136
+ case AttributeType.MAT4:
137
+ return 16;
138
+ //>>includeStart('debug', pragmas.debug);
139
+ default:
140
+ throw new DeveloperError_default("attributeType is not a valid value.");
141
+ }
142
+ };
143
+ AttributeType.getAttributeLocationCount = function(attributeType) {
144
+ switch (attributeType) {
145
+ case AttributeType.SCALAR:
146
+ case AttributeType.VEC2:
147
+ case AttributeType.VEC3:
148
+ case AttributeType.VEC4:
149
+ return 1;
150
+ case AttributeType.MAT2:
151
+ return 2;
152
+ case AttributeType.MAT3:
153
+ return 3;
154
+ case AttributeType.MAT4:
155
+ return 4;
156
+ //>>includeStart('debug', pragmas.debug);
157
+ default:
158
+ throw new DeveloperError_default("attributeType is not a valid value.");
159
+ }
160
+ };
161
+ AttributeType.getGlslType = function(attributeType) {
162
+ Check_default.typeOf.string("attributeType", attributeType);
163
+ switch (attributeType) {
164
+ case AttributeType.SCALAR:
165
+ return "float";
166
+ case AttributeType.VEC2:
167
+ return "vec2";
168
+ case AttributeType.VEC3:
169
+ return "vec3";
170
+ case AttributeType.VEC4:
171
+ return "vec4";
172
+ case AttributeType.MAT2:
173
+ return "mat2";
174
+ case AttributeType.MAT3:
175
+ return "mat3";
176
+ case AttributeType.MAT4:
177
+ return "mat4";
178
+ //>>includeStart('debug', pragmas.debug);
179
+ default:
180
+ throw new DeveloperError_default("attributeType is not a valid value.");
181
+ }
182
+ };
183
+ var AttributeType_default = Object.freeze(AttributeType);
184
+
185
+ // packages/engine/Source/Core/AttributeCompression.js
186
+ var RIGHT_SHIFT = 1 / 256;
187
+ var LEFT_SHIFT = 256;
188
+ var AttributeCompression = {};
189
+ AttributeCompression.octEncodeInRange = function(vector, rangeMax, result) {
190
+ Check_default.defined("vector", vector);
191
+ Check_default.defined("result", result);
192
+ const magSquared = Cartesian3_default.magnitudeSquared(vector);
193
+ if (Math.abs(magSquared - 1) > Math_default.EPSILON6) {
194
+ throw new DeveloperError_default("vector must be normalized.");
195
+ }
196
+ result.x = vector.x / (Math.abs(vector.x) + Math.abs(vector.y) + Math.abs(vector.z));
197
+ result.y = vector.y / (Math.abs(vector.x) + Math.abs(vector.y) + Math.abs(vector.z));
198
+ if (vector.z < 0) {
199
+ const x = result.x;
200
+ const y = result.y;
201
+ result.x = (1 - Math.abs(y)) * Math_default.signNotZero(x);
202
+ result.y = (1 - Math.abs(x)) * Math_default.signNotZero(y);
203
+ }
204
+ result.x = Math_default.toSNorm(result.x, rangeMax);
205
+ result.y = Math_default.toSNorm(result.y, rangeMax);
206
+ return result;
207
+ };
208
+ AttributeCompression.octEncode = function(vector, result) {
209
+ return AttributeCompression.octEncodeInRange(vector, 255, result);
210
+ };
211
+ var octEncodeScratch = new Cartesian2_default();
212
+ var uint8ForceArray = new Uint8Array(1);
213
+ function forceUint8(value) {
214
+ uint8ForceArray[0] = value;
215
+ return uint8ForceArray[0];
216
+ }
217
+ AttributeCompression.octEncodeToCartesian4 = function(vector, result) {
218
+ AttributeCompression.octEncodeInRange(vector, 65535, octEncodeScratch);
219
+ result.x = forceUint8(octEncodeScratch.x * RIGHT_SHIFT);
220
+ result.y = forceUint8(octEncodeScratch.x);
221
+ result.z = forceUint8(octEncodeScratch.y * RIGHT_SHIFT);
222
+ result.w = forceUint8(octEncodeScratch.y);
223
+ return result;
224
+ };
225
+ AttributeCompression.octDecodeInRange = function(x, y, rangeMax, result) {
226
+ Check_default.defined("result", result);
227
+ if (x < 0 || x > rangeMax || y < 0 || y > rangeMax) {
228
+ throw new DeveloperError_default(
229
+ `x and y must be unsigned normalized integers between 0 and ${rangeMax}`
230
+ );
231
+ }
232
+ result.x = Math_default.fromSNorm(x, rangeMax);
233
+ result.y = Math_default.fromSNorm(y, rangeMax);
234
+ result.z = 1 - (Math.abs(result.x) + Math.abs(result.y));
235
+ if (result.z < 0) {
236
+ const oldVX = result.x;
237
+ result.x = (1 - Math.abs(result.y)) * Math_default.signNotZero(oldVX);
238
+ result.y = (1 - Math.abs(oldVX)) * Math_default.signNotZero(result.y);
239
+ }
240
+ return Cartesian3_default.normalize(result, result);
241
+ };
242
+ AttributeCompression.octDecode = function(x, y, result) {
243
+ return AttributeCompression.octDecodeInRange(x, y, 255, result);
244
+ };
245
+ AttributeCompression.octDecodeFromCartesian4 = function(encoded, result) {
246
+ Check_default.typeOf.object("encoded", encoded);
247
+ Check_default.typeOf.object("result", result);
248
+ const x = encoded.x;
249
+ const y = encoded.y;
250
+ const z = encoded.z;
251
+ const w = encoded.w;
252
+ if (x < 0 || x > 255 || y < 0 || y > 255 || z < 0 || z > 255 || w < 0 || w > 255) {
253
+ throw new DeveloperError_default(
254
+ "x, y, z, and w must be unsigned normalized integers between 0 and 255"
255
+ );
256
+ }
257
+ const xOct16 = x * LEFT_SHIFT + y;
258
+ const yOct16 = z * LEFT_SHIFT + w;
259
+ return AttributeCompression.octDecodeInRange(xOct16, yOct16, 65535, result);
260
+ };
261
+ AttributeCompression.octPackFloat = function(encoded) {
262
+ Check_default.defined("encoded", encoded);
263
+ return 256 * encoded.x + encoded.y;
264
+ };
265
+ var scratchEncodeCart2 = new Cartesian2_default();
266
+ AttributeCompression.octEncodeFloat = function(vector) {
267
+ AttributeCompression.octEncode(vector, scratchEncodeCart2);
268
+ return AttributeCompression.octPackFloat(scratchEncodeCart2);
269
+ };
270
+ AttributeCompression.octDecodeFloat = function(value, result) {
271
+ Check_default.defined("value", value);
272
+ const temp = value / 256;
273
+ const x = Math.floor(temp);
274
+ const y = (temp - x) * 256;
275
+ return AttributeCompression.octDecode(x, y, result);
276
+ };
277
+ AttributeCompression.octPack = function(v1, v2, v3, result) {
278
+ Check_default.defined("v1", v1);
279
+ Check_default.defined("v2", v2);
280
+ Check_default.defined("v3", v3);
281
+ Check_default.defined("result", result);
282
+ const encoded1 = AttributeCompression.octEncodeFloat(v1);
283
+ const encoded2 = AttributeCompression.octEncodeFloat(v2);
284
+ const encoded3 = AttributeCompression.octEncode(v3, scratchEncodeCart2);
285
+ result.x = 65536 * encoded3.x + encoded1;
286
+ result.y = 65536 * encoded3.y + encoded2;
287
+ return result;
288
+ };
289
+ AttributeCompression.octUnpack = function(packed, v1, v2, v3) {
290
+ Check_default.defined("packed", packed);
291
+ Check_default.defined("v1", v1);
292
+ Check_default.defined("v2", v2);
293
+ Check_default.defined("v3", v3);
294
+ let temp = packed.x / 65536;
295
+ const x = Math.floor(temp);
296
+ const encodedFloat1 = (temp - x) * 65536;
297
+ temp = packed.y / 65536;
298
+ const y = Math.floor(temp);
299
+ const encodedFloat2 = (temp - y) * 65536;
300
+ AttributeCompression.octDecodeFloat(encodedFloat1, v1);
301
+ AttributeCompression.octDecodeFloat(encodedFloat2, v2);
302
+ AttributeCompression.octDecode(x, y, v3);
303
+ };
304
+ AttributeCompression.compressTextureCoordinates = function(textureCoordinates) {
305
+ Check_default.defined("textureCoordinates", textureCoordinates);
306
+ const x = textureCoordinates.x * 4095 | 0;
307
+ const y = textureCoordinates.y * 4095 | 0;
308
+ return 4096 * x + y;
309
+ };
310
+ AttributeCompression.decompressTextureCoordinates = function(compressed, result) {
311
+ Check_default.defined("compressed", compressed);
312
+ Check_default.defined("result", result);
313
+ const temp = compressed / 4096;
314
+ const xZeroTo4095 = Math.floor(temp);
315
+ result.x = xZeroTo4095 / 4095;
316
+ result.y = (compressed - xZeroTo4095 * 4096) / 4095;
317
+ return result;
318
+ };
319
+ function zigZagDecode(value) {
320
+ return value >> 1 ^ -(value & 1);
321
+ }
322
+ AttributeCompression.zigZagDeltaDecode = function(uBuffer, vBuffer, heightBuffer) {
323
+ Check_default.defined("uBuffer", uBuffer);
324
+ Check_default.defined("vBuffer", vBuffer);
325
+ Check_default.typeOf.number.equals(
326
+ "uBuffer.length",
327
+ "vBuffer.length",
328
+ uBuffer.length,
329
+ vBuffer.length
330
+ );
331
+ if (defined_default(heightBuffer)) {
332
+ Check_default.typeOf.number.equals(
333
+ "uBuffer.length",
334
+ "heightBuffer.length",
335
+ uBuffer.length,
336
+ heightBuffer.length
337
+ );
338
+ }
339
+ const count = uBuffer.length;
340
+ let u = 0;
341
+ let v = 0;
342
+ let height = 0;
343
+ for (let i = 0; i < count; ++i) {
344
+ u += zigZagDecode(uBuffer[i]);
345
+ v += zigZagDecode(vBuffer[i]);
346
+ uBuffer[i] = u;
347
+ vBuffer[i] = v;
348
+ if (defined_default(heightBuffer)) {
349
+ height += zigZagDecode(heightBuffer[i]);
350
+ heightBuffer[i] = height;
351
+ }
352
+ }
353
+ };
354
+ AttributeCompression.dequantize = function(typedArray, componentDatatype, type, count) {
355
+ Check_default.defined("typedArray", typedArray);
356
+ Check_default.defined("componentDatatype", componentDatatype);
357
+ Check_default.defined("type", type);
358
+ Check_default.defined("count", count);
359
+ const componentsPerAttribute = AttributeType_default.getNumberOfComponents(type);
360
+ let divisor;
361
+ switch (componentDatatype) {
362
+ case ComponentDatatype_default.BYTE:
363
+ divisor = 127;
364
+ break;
365
+ case ComponentDatatype_default.UNSIGNED_BYTE:
366
+ divisor = 255;
367
+ break;
368
+ case ComponentDatatype_default.SHORT:
369
+ divisor = 32767;
370
+ break;
371
+ case ComponentDatatype_default.UNSIGNED_SHORT:
372
+ divisor = 65535;
373
+ break;
374
+ case ComponentDatatype_default.INT:
375
+ divisor = 2147483647;
376
+ break;
377
+ case ComponentDatatype_default.UNSIGNED_INT:
378
+ divisor = 4294967295;
379
+ break;
380
+ //>>includeStart('debug', pragmas.debug);
381
+ default:
382
+ throw new DeveloperError_default(
383
+ `Cannot dequantize component datatype: ${componentDatatype}`
384
+ );
385
+ }
386
+ const dequantizedTypedArray = new Float32Array(
387
+ count * componentsPerAttribute
388
+ );
389
+ for (let i = 0; i < count; i++) {
390
+ for (let j = 0; j < componentsPerAttribute; j++) {
391
+ const index = i * componentsPerAttribute + j;
392
+ dequantizedTypedArray[index] = Math.max(
393
+ typedArray[index] / divisor,
394
+ -1
395
+ );
396
+ }
397
+ }
398
+ return dequantizedTypedArray;
399
+ };
400
+ AttributeCompression.decodeRGB565 = function(typedArray, result) {
401
+ Check_default.defined("typedArray", typedArray);
402
+ const expectedLength = typedArray.length * 3;
403
+ if (defined_default(result)) {
404
+ Check_default.typeOf.number.equals(
405
+ "result.length",
406
+ "typedArray.length * 3",
407
+ result.length,
408
+ expectedLength
409
+ );
410
+ }
411
+ const count = typedArray.length;
412
+ if (!defined_default(result)) {
413
+ result = new Float32Array(count * 3);
414
+ }
415
+ const mask5 = (1 << 5) - 1;
416
+ const mask6 = (1 << 6) - 1;
417
+ const normalize5 = 1 / 31;
418
+ const normalize6 = 1 / 63;
419
+ for (let i = 0; i < count; i++) {
420
+ const value = typedArray[i];
421
+ const red = value >> 11;
422
+ const green = value >> 5 & mask6;
423
+ const blue = value & mask5;
424
+ const offset = 3 * i;
425
+ result[offset] = red * normalize5;
426
+ result[offset + 1] = green * normalize6;
427
+ result[offset + 2] = blue * normalize5;
428
+ }
429
+ return result;
430
+ };
431
+ var AttributeCompression_default = AttributeCompression;
432
+
433
+ export {
434
+ AttributeCompression_default
435
+ };
@@ -0,0 +1,196 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.0.42
5
+ *
6
+ * Copyright 2011-2022 Cesium Contributors
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing, software
15
+ * distributed under the License is distributed on an "AS IS" BASIS,
16
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ * See the License for the specific language governing permissions and
18
+ * limitations under the License.
19
+ *
20
+ * Columbus View (Pat. Pend.)
21
+ *
22
+ * Portions licensed separately.
23
+ * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
24
+ */
25
+
26
+ import {
27
+ PolylinePipeline_default
28
+ } from "./chunk-IZSK4DVF.js";
29
+ import {
30
+ arrayRemoveDuplicates_default
31
+ } from "./chunk-PHWZFJR5.js";
32
+ import {
33
+ Cartesian3_default,
34
+ Cartographic_default
35
+ } from "./chunk-ZW52HXFN.js";
36
+ import {
37
+ Math_default
38
+ } from "./chunk-HSJSUPQV.js";
39
+ import {
40
+ defined_default
41
+ } from "./chunk-JKLMRPKK.js";
42
+
43
+ // packages/engine/Source/Core/WallGeometryLibrary.js
44
+ var WallGeometryLibrary = {};
45
+ function latLonEquals(c0, c1) {
46
+ return Math_default.equalsEpsilon(c0.latitude, c1.latitude, Math_default.EPSILON10) && Math_default.equalsEpsilon(c0.longitude, c1.longitude, Math_default.EPSILON10);
47
+ }
48
+ var scratchCartographic1 = new Cartographic_default();
49
+ var scratchCartographic2 = new Cartographic_default();
50
+ function removeDuplicates(ellipsoid, positions, topHeights, bottomHeights) {
51
+ positions = arrayRemoveDuplicates_default(positions, Cartesian3_default.equalsEpsilon);
52
+ const length = positions.length;
53
+ if (length < 2) {
54
+ return;
55
+ }
56
+ const hasBottomHeights = defined_default(bottomHeights);
57
+ const hasTopHeights = defined_default(topHeights);
58
+ const cleanedPositions = new Array(length);
59
+ const cleanedTopHeights = new Array(length);
60
+ const cleanedBottomHeights = new Array(length);
61
+ const v0 = positions[0];
62
+ cleanedPositions[0] = v0;
63
+ const c0 = ellipsoid.cartesianToCartographic(v0, scratchCartographic1);
64
+ if (hasTopHeights) {
65
+ c0.height = topHeights[0];
66
+ }
67
+ cleanedTopHeights[0] = c0.height;
68
+ if (hasBottomHeights) {
69
+ cleanedBottomHeights[0] = bottomHeights[0];
70
+ } else {
71
+ cleanedBottomHeights[0] = 0;
72
+ }
73
+ const startTopHeight = cleanedTopHeights[0];
74
+ const startBottomHeight = cleanedBottomHeights[0];
75
+ let hasAllSameHeights = startTopHeight === startBottomHeight;
76
+ let index = 1;
77
+ for (let i = 1; i < length; ++i) {
78
+ const v1 = positions[i];
79
+ const c1 = ellipsoid.cartesianToCartographic(v1, scratchCartographic2);
80
+ if (hasTopHeights) {
81
+ c1.height = topHeights[i];
82
+ }
83
+ hasAllSameHeights = hasAllSameHeights && c1.height === 0;
84
+ if (!latLonEquals(c0, c1)) {
85
+ cleanedPositions[index] = v1;
86
+ cleanedTopHeights[index] = c1.height;
87
+ if (hasBottomHeights) {
88
+ cleanedBottomHeights[index] = bottomHeights[i];
89
+ } else {
90
+ cleanedBottomHeights[index] = 0;
91
+ }
92
+ hasAllSameHeights = hasAllSameHeights && cleanedTopHeights[index] === cleanedBottomHeights[index];
93
+ Cartographic_default.clone(c1, c0);
94
+ ++index;
95
+ } else if (c0.height < c1.height) {
96
+ cleanedTopHeights[index - 1] = c1.height;
97
+ }
98
+ }
99
+ if (hasAllSameHeights || index < 2) {
100
+ return;
101
+ }
102
+ cleanedPositions.length = index;
103
+ cleanedTopHeights.length = index;
104
+ cleanedBottomHeights.length = index;
105
+ return {
106
+ positions: cleanedPositions,
107
+ topHeights: cleanedTopHeights,
108
+ bottomHeights: cleanedBottomHeights
109
+ };
110
+ }
111
+ var positionsArrayScratch = new Array(2);
112
+ var heightsArrayScratch = new Array(2);
113
+ var generateArcOptionsScratch = {
114
+ positions: void 0,
115
+ height: void 0,
116
+ granularity: void 0,
117
+ ellipsoid: void 0
118
+ };
119
+ WallGeometryLibrary.computePositions = function(ellipsoid, wallPositions, maximumHeights, minimumHeights, granularity, duplicateCorners) {
120
+ const o = removeDuplicates(
121
+ ellipsoid,
122
+ wallPositions,
123
+ maximumHeights,
124
+ minimumHeights
125
+ );
126
+ if (!defined_default(o)) {
127
+ return;
128
+ }
129
+ wallPositions = o.positions;
130
+ maximumHeights = o.topHeights;
131
+ minimumHeights = o.bottomHeights;
132
+ const length = wallPositions.length;
133
+ const numCorners = length - 2;
134
+ let topPositions;
135
+ let bottomPositions;
136
+ const minDistance = Math_default.chordLength(
137
+ granularity,
138
+ ellipsoid.maximumRadius
139
+ );
140
+ const generateArcOptions = generateArcOptionsScratch;
141
+ generateArcOptions.minDistance = minDistance;
142
+ generateArcOptions.ellipsoid = ellipsoid;
143
+ if (duplicateCorners) {
144
+ let count = 0;
145
+ let i;
146
+ for (i = 0; i < length - 1; i++) {
147
+ count += PolylinePipeline_default.numberOfPoints(
148
+ wallPositions[i],
149
+ wallPositions[i + 1],
150
+ minDistance
151
+ ) + 1;
152
+ }
153
+ topPositions = new Float64Array(count * 3);
154
+ bottomPositions = new Float64Array(count * 3);
155
+ const generateArcPositions = positionsArrayScratch;
156
+ const generateArcHeights = heightsArrayScratch;
157
+ generateArcOptions.positions = generateArcPositions;
158
+ generateArcOptions.height = generateArcHeights;
159
+ let offset = 0;
160
+ for (i = 0; i < length - 1; i++) {
161
+ generateArcPositions[0] = wallPositions[i];
162
+ generateArcPositions[1] = wallPositions[i + 1];
163
+ generateArcHeights[0] = maximumHeights[i];
164
+ generateArcHeights[1] = maximumHeights[i + 1];
165
+ const pos = PolylinePipeline_default.generateArc(generateArcOptions);
166
+ topPositions.set(pos, offset);
167
+ generateArcHeights[0] = minimumHeights[i];
168
+ generateArcHeights[1] = minimumHeights[i + 1];
169
+ bottomPositions.set(
170
+ PolylinePipeline_default.generateArc(generateArcOptions),
171
+ offset
172
+ );
173
+ offset += pos.length;
174
+ }
175
+ } else {
176
+ generateArcOptions.positions = wallPositions;
177
+ generateArcOptions.height = maximumHeights;
178
+ topPositions = new Float64Array(
179
+ PolylinePipeline_default.generateArc(generateArcOptions)
180
+ );
181
+ generateArcOptions.height = minimumHeights;
182
+ bottomPositions = new Float64Array(
183
+ PolylinePipeline_default.generateArc(generateArcOptions)
184
+ );
185
+ }
186
+ return {
187
+ bottomPositions,
188
+ topPositions,
189
+ numCorners
190
+ };
191
+ };
192
+ var WallGeometryLibrary_default = WallGeometryLibrary;
193
+
194
+ export {
195
+ WallGeometryLibrary_default
196
+ };