@hztxi/cesium-engine 25.0.4 → 25.0.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 (202) hide show
  1. package/Build/Workers/chunk-247MLVK2.js +124 -0
  2. package/Build/Workers/chunk-26I7TIAE.js +58 -0
  3. package/Build/Workers/chunk-26OYTC24.js +38 -0
  4. package/Build/Workers/chunk-2GJAWJJT.js +1344 -0
  5. package/Build/Workers/chunk-2IMOZG7R.js +973 -0
  6. package/Build/Workers/chunk-2J2VS5RI.js +288 -0
  7. package/Build/Workers/chunk-2L6JGSYJ.js +57 -0
  8. package/Build/Workers/chunk-32N2SB76.js +56 -0
  9. package/Build/Workers/chunk-375SHKGW.js +44 -0
  10. package/Build/Workers/chunk-37WL527K.js +1287 -0
  11. package/Build/Workers/chunk-3IGH46TC.js +1054 -0
  12. package/Build/Workers/chunk-47BSFGJC.js +837 -0
  13. package/Build/Workers/chunk-4J7PL5AM.js +454 -0
  14. package/Build/Workers/chunk-4UMO63VY.js +76 -0
  15. package/Build/Workers/chunk-5FYUSABU.js +945 -0
  16. package/Build/Workers/chunk-5WU37CUJ.js +630 -0
  17. package/Build/Workers/chunk-5YI3TQQC.js +778 -0
  18. package/Build/Workers/chunk-6EBDN5WS.js +97 -0
  19. package/Build/Workers/chunk-75HIWCEV.js +301 -0
  20. package/Build/Workers/chunk-7AMVPXZY.js +1992 -0
  21. package/Build/Workers/chunk-7BMDD6SM.js +124 -0
  22. package/Build/Workers/chunk-7OME2OKM.js +171 -0
  23. package/Build/Workers/chunk-A2BROW3D.js +352 -0
  24. package/Build/Workers/chunk-AEZQ2UWS.js +288 -0
  25. package/Build/Workers/chunk-AXE2ZIEG.js +219 -0
  26. package/Build/Workers/chunk-B4XOVZGA.js +476 -0
  27. package/Build/Workers/chunk-BDR7GL3E.js +1067 -0
  28. package/Build/Workers/chunk-C342XITR.js +44 -0
  29. package/Build/Workers/chunk-CDLPLYLV.js +1287 -0
  30. package/Build/Workers/chunk-CEKCKPFN.js +368 -0
  31. package/Build/Workers/chunk-CHMDKP5L.js +2342 -0
  32. package/Build/Workers/chunk-CWAUXQRF.js +754 -0
  33. package/Build/Workers/chunk-CWGB3D4Z.js +257 -0
  34. package/Build/Workers/chunk-DQEUGBGA.js +2719 -0
  35. package/Build/Workers/chunk-DUBE5G2H.js +497 -0
  36. package/Build/Workers/chunk-E4PBNWWK.js +58 -0
  37. package/Build/Workers/chunk-E5F7LDEP.js +3201 -0
  38. package/Build/Workers/chunk-E5MWOMVC.js +57 -0
  39. package/Build/Workers/chunk-EE3XBOQI.js +1483 -0
  40. package/Build/Workers/chunk-EHA2ZDPZ.js +415 -0
  41. package/Build/Workers/chunk-EKEKPAJF.js +454 -0
  42. package/Build/Workers/chunk-EOHKUXPX.js +198 -0
  43. package/Build/Workers/chunk-ERENMHG2.js +754 -0
  44. package/Build/Workers/chunk-ESQGFRLZ.js +163 -0
  45. package/Build/Workers/chunk-FAKYMBUA.js +1046 -0
  46. package/Build/Workers/chunk-FSK4OZOO.js +352 -0
  47. package/Build/Workers/chunk-FSLRYNZ6.js +682 -0
  48. package/Build/Workers/chunk-FV4OWDV4.js +9230 -0
  49. package/Build/Workers/chunk-FYRNNQSL.js +280 -0
  50. package/Build/Workers/chunk-GMDOGAXK.js +2719 -0
  51. package/Build/Workers/chunk-GRAFCIPA.js +455 -0
  52. package/Build/Workers/chunk-HEY4IOS3.js +140 -0
  53. package/Build/Workers/chunk-HRWFO57T.js +301 -0
  54. package/Build/Workers/chunk-HTCLVUBZ.js +82 -0
  55. package/Build/Workers/chunk-I2Q7XDRA.js +630 -0
  56. package/Build/Workers/chunk-ILPH3NF7.js +3794 -0
  57. package/Build/Workers/chunk-JMF4ATAS.js +3794 -0
  58. package/Build/Workers/chunk-JZUUODN6.js +97 -0
  59. package/Build/Workers/chunk-KEJKMITY.js +82 -0
  60. package/Build/Workers/chunk-KW2QZDUS.js +147 -0
  61. package/Build/Workers/chunk-KWVB54J6.js +241 -0
  62. package/Build/Workers/chunk-L6B5XPBL.js +73 -0
  63. package/Build/Workers/chunk-LGJXN2VP.js +352 -0
  64. package/Build/Workers/chunk-LY2UG3HV.js +38 -0
  65. package/Build/Workers/chunk-M3B3ZUU2.js +476 -0
  66. package/Build/Workers/chunk-MKR6YCMG.js +497 -0
  67. package/Build/Workers/chunk-MROMS2RL.js +162 -0
  68. package/Build/Workers/chunk-MUNAUSK7.js +280 -0
  69. package/Build/Workers/chunk-NCPJBP24.js +140 -0
  70. package/Build/Workers/chunk-NFY5V6MR.js +102 -0
  71. package/Build/Workers/chunk-NHU5JEPP.js +1344 -0
  72. package/Build/Workers/chunk-OODXPB45.js +73 -0
  73. package/Build/Workers/chunk-OXZ5J3JW.js +368 -0
  74. package/Build/Workers/chunk-OYPSUED3.js +1067 -0
  75. package/Build/Workers/chunk-QBSWSTHY.js +257 -0
  76. package/Build/Workers/chunk-QDJYG7QL.js +352 -0
  77. package/Build/Workers/chunk-QIOOTLWN.js +56 -0
  78. package/Build/Workers/chunk-QUPRALOD.js +101 -0
  79. package/Build/Workers/chunk-RBEVHHXK.js +3201 -0
  80. package/Build/Workers/chunk-RHO5HV52.js +305 -0
  81. package/Build/Workers/chunk-RX3U2BBW.js +1483 -0
  82. package/Build/Workers/chunk-S3XHL7GO.js +1992 -0
  83. package/Build/Workers/chunk-SBIC4OGS.js +171 -0
  84. package/Build/Workers/chunk-SVCZUP5R.js +837 -0
  85. package/Build/Workers/chunk-T4CYNROE.js +102 -0
  86. package/Build/Workers/chunk-T5VLPB4H.js +414 -0
  87. package/Build/Workers/chunk-TBHW5UME.js +973 -0
  88. package/Build/Workers/chunk-TPOX6IOR.js +1054 -0
  89. package/Build/Workers/chunk-TX763OWB.js +387 -0
  90. package/Build/Workers/chunk-ULNBTI6R.js +138 -0
  91. package/Build/Workers/chunk-UMUS2AQQ.js +398 -0
  92. package/Build/Workers/chunk-UTAWMCSE.js +163 -0
  93. package/Build/Workers/chunk-UZ7GTP2L.js +162 -0
  94. package/Build/Workers/chunk-VETQOADR.js +2342 -0
  95. package/Build/Workers/chunk-VXRWOM3T.js +101 -0
  96. package/Build/Workers/chunk-W3C7OHXF.js +387 -0
  97. package/Build/Workers/chunk-WB5GWYDP.js +455 -0
  98. package/Build/Workers/chunk-WN6MAL25.js +682 -0
  99. package/Build/Workers/chunk-WTR7KMQA.js +693 -0
  100. package/Build/Workers/chunk-WTTFMU3P.js +241 -0
  101. package/Build/Workers/chunk-WULONJZC.js +1800 -0
  102. package/Build/Workers/chunk-WVVFCMYF.js +147 -0
  103. package/Build/Workers/chunk-WZPMAVTV.js +511 -0
  104. package/Build/Workers/chunk-XAVNBZQ6.js +56 -0
  105. package/Build/Workers/chunk-XDSDR62Y.js +1800 -0
  106. package/Build/Workers/chunk-XDZCVNIZ.js +198 -0
  107. package/Build/Workers/chunk-XNLCW2OI.js +138 -0
  108. package/Build/Workers/chunk-XNQ2BTJD.js +693 -0
  109. package/Build/Workers/chunk-XZYBDSFP.js +305 -0
  110. package/Build/Workers/chunk-Y7KVUJEB.js +219 -0
  111. package/Build/Workers/chunk-YDYN3RPI.js +398 -0
  112. package/Build/Workers/chunk-YMMEQBEW.js +511 -0
  113. package/Build/Workers/chunk-YQFOQAXD.js +9230 -0
  114. package/Build/Workers/chunk-Z6JV4DZG.js +1046 -0
  115. package/Build/Workers/chunk-ZTK5EBUI.js +76 -0
  116. package/Build/Workers/chunk-ZZPDORJK.js +56 -0
  117. package/Build/Workers/combineGeometry.js +24 -24
  118. package/Build/Workers/createBoxGeometry.js +18 -18
  119. package/Build/Workers/createBoxOutlineGeometry.js +16 -16
  120. package/Build/Workers/createCircleGeometry.js +26 -26
  121. package/Build/Workers/createCircleOutlineGeometry.js +19 -19
  122. package/Build/Workers/createCoplanarPolygonGeometry.js +33 -33
  123. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +31 -31
  124. package/Build/Workers/createCorridorGeometry.js +29 -29
  125. package/Build/Workers/createCorridorOutlineGeometry.js +28 -28
  126. package/Build/Workers/createCylinderGeometry.js +20 -20
  127. package/Build/Workers/createCylinderOutlineGeometry.js +18 -18
  128. package/Build/Workers/createEllipseGeometry.js +26 -26
  129. package/Build/Workers/createEllipseOutlineGeometry.js +19 -19
  130. package/Build/Workers/createEllipsoidGeometry.js +19 -19
  131. package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -18
  132. package/Build/Workers/createFrustumGeometry.js +18 -18
  133. package/Build/Workers/createFrustumOutlineGeometry.js +18 -18
  134. package/Build/Workers/createGeometry.js +24 -24
  135. package/Build/Workers/createGroundPolylineGeometry.js +95 -31
  136. package/Build/Workers/createPlaneGeometry.js +16 -16
  137. package/Build/Workers/createPlaneOutlineGeometry.js +15 -15
  138. package/Build/Workers/createPolygonGeometry.js +32 -32
  139. package/Build/Workers/createPolygonOutlineGeometry.js +30 -30
  140. package/Build/Workers/createPolylineGeometry.js +25 -25
  141. package/Build/Workers/createPolylineVolumeGeometry.js +31 -31
  142. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +27 -27
  143. package/Build/Workers/createRectangleGeometry.js +27 -27
  144. package/Build/Workers/createRectangleOutlineGeometry.js +20 -20
  145. package/Build/Workers/createSimplePolylineGeometry.js +23 -23
  146. package/Build/Workers/createSphereGeometry.js +19 -19
  147. package/Build/Workers/createSphereOutlineGeometry.js +18 -18
  148. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  149. package/Build/Workers/createVectorTileClampedPolylines.js +14 -14
  150. package/Build/Workers/createVectorTileGeometries.js +24 -24
  151. package/Build/Workers/createVectorTilePoints.js +13 -13
  152. package/Build/Workers/createVectorTilePolygons.js +22 -22
  153. package/Build/Workers/createVectorTilePolylines.js +14 -14
  154. package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +26 -26
  155. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +23 -23
  156. package/Build/Workers/createVerticesFromHeightmap.js +23 -23
  157. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +21 -21
  158. package/Build/Workers/createWallGeometry.js +24 -24
  159. package/Build/Workers/createWallOutlineGeometry.js +23 -23
  160. package/Build/Workers/decodeDraco.js +10 -10
  161. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
  162. package/Build/Workers/decodeI3S.js +10 -10
  163. package/Build/Workers/gaussianSplatSorter.js +4 -4
  164. package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
  165. package/Build/Workers/incrementallyBuildTerrainPicker.js +10 -10
  166. package/Build/Workers/transcodeKTX2.js +6 -6
  167. package/Build/Workers/transferTypedArrayTest.js +1 -1
  168. package/Build/Workers/upsampleQuantizedTerrainMesh.js +23 -23
  169. package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +26 -26
  170. package/Source/Core/GroundPolylineGeometry.js +99 -4
  171. package/Source/Core/PolylinePipeline.js +9 -2
  172. package/Source/DataSources/PolylineGeometryUpdater.js +125 -7
  173. package/Source/Scene/Camera.js +56 -3
  174. package/Source/Scene/CameraFlightPath.js +14 -0
  175. package/Source/Scene/ClassificationPrimitive.js +63 -3
  176. package/Source/Scene/ColumbusWorlds.js +190 -0
  177. package/Source/Scene/FrameState.js +10 -0
  178. package/Source/Scene/Globe.js +89 -22
  179. package/Source/Scene/GlobeDepth.js +216 -5
  180. package/Source/Scene/GlobeSurfaceTileProvider.js +897 -678
  181. package/Source/Scene/GroundPolylinePrimitive.js +2 -1
  182. package/Source/Scene/Polyline.js +32 -5
  183. package/Source/Scene/PolylineCollection.js +41 -2
  184. package/Source/Scene/Primitive.js +12 -13
  185. package/Source/Scene/PrimitivePipeline.js +158 -28
  186. package/Source/Scene/Scene.js +428 -5
  187. package/Source/Scene/SceneTransforms.js +17 -0
  188. package/Source/Scene/ScreenSpaceCameraController.js +12 -3
  189. package/Source/Shaders/PolylineShadowVolumeFS.glsl +14 -0
  190. package/Source/Shaders/PolylineShadowVolumeFS.js +14 -0
  191. package/Source/Shaders/PolylineShadowVolumeMorphVS.glsl +14 -1
  192. package/Source/Shaders/PolylineShadowVolumeMorphVS.js +14 -1
  193. package/Source/Shaders/PolylineShadowVolumeVS.glsl +7 -0
  194. package/Source/Shaders/PolylineShadowVolumeVS.js +7 -0
  195. package/Source/Shaders/PolylineVS.glsl +16 -6
  196. package/Source/Shaders/PolylineVS.js +16 -6
  197. package/Source/Shaders/RestoreDepth.glsl +8 -0
  198. package/Source/Shaders/RestoreDepth.js +10 -0
  199. package/Source/ThirdParty/zip-module.wasm +0 -0
  200. package/index.d.ts +535 -1393
  201. package/index.js +267 -265
  202. package/package.json +10 -10
@@ -0,0 +1,97 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 1.141.6
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
+ Math_default
28
+ } from "./chunk-MKR6YCMG.js";
29
+ import {
30
+ Check_default
31
+ } from "./chunk-UTAWMCSE.js";
32
+ import {
33
+ defined_default
34
+ } from "./chunk-HTCLVUBZ.js";
35
+
36
+ // packages/engine/Source/Core/arrayRemoveDuplicates.js
37
+ var removeDuplicatesEpsilon = Math_default.EPSILON10;
38
+ function arrayRemoveDuplicates(values, equalsEpsilon, wrapAround, removedIndices) {
39
+ Check_default.defined("equalsEpsilon", equalsEpsilon);
40
+ if (!defined_default(values)) {
41
+ return void 0;
42
+ }
43
+ wrapAround = wrapAround ?? false;
44
+ const storeRemovedIndices = defined_default(removedIndices);
45
+ const length = values.length;
46
+ if (length < 2) {
47
+ return values;
48
+ }
49
+ let i;
50
+ let v0 = values[0];
51
+ let v1;
52
+ let cleanedValues;
53
+ let lastCleanIndex = 0;
54
+ let removedIndexLCI = -1;
55
+ for (i = 1; i < length; ++i) {
56
+ v1 = values[i];
57
+ if (equalsEpsilon(v0, v1, removeDuplicatesEpsilon)) {
58
+ if (!defined_default(cleanedValues)) {
59
+ cleanedValues = values.slice(0, i);
60
+ lastCleanIndex = i - 1;
61
+ removedIndexLCI = 0;
62
+ }
63
+ if (storeRemovedIndices) {
64
+ removedIndices.push(i);
65
+ }
66
+ } else {
67
+ if (defined_default(cleanedValues)) {
68
+ cleanedValues.push(v1);
69
+ lastCleanIndex = i;
70
+ if (storeRemovedIndices) {
71
+ removedIndexLCI = removedIndices.length;
72
+ }
73
+ }
74
+ v0 = v1;
75
+ }
76
+ }
77
+ if (wrapAround && equalsEpsilon(values[0], values[length - 1], removeDuplicatesEpsilon)) {
78
+ if (storeRemovedIndices) {
79
+ if (defined_default(cleanedValues)) {
80
+ removedIndices.splice(removedIndexLCI, 0, lastCleanIndex);
81
+ } else {
82
+ removedIndices.push(length - 1);
83
+ }
84
+ }
85
+ if (defined_default(cleanedValues)) {
86
+ cleanedValues.length -= 1;
87
+ } else {
88
+ cleanedValues = values.slice(0, -1);
89
+ }
90
+ }
91
+ return defined_default(cleanedValues) ? cleanedValues : values;
92
+ }
93
+ var arrayRemoveDuplicates_default = arrayRemoveDuplicates;
94
+
95
+ export {
96
+ arrayRemoveDuplicates_default
97
+ };
@@ -0,0 +1,82 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 1.141.7
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
+ var __create = Object.create;
27
+ var __defProp = Object.defineProperty;
28
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
29
+ var __getOwnPropNames = Object.getOwnPropertyNames;
30
+ var __getProtoOf = Object.getPrototypeOf;
31
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
32
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
33
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
34
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
35
+ }) : x)(function(x) {
36
+ if (typeof require !== "undefined") return require.apply(this, arguments);
37
+ throw Error('Dynamic require of "' + x + '" is not supported');
38
+ });
39
+ var __glob = (map) => (path) => {
40
+ var fn = map[path];
41
+ if (fn) return fn();
42
+ throw new Error("Module not found in bundle: " + path);
43
+ };
44
+ var __commonJS = (cb, mod) => function __require2() {
45
+ try {
46
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
47
+ } catch (e) {
48
+ throw mod = 0, e;
49
+ }
50
+ };
51
+ var __copyProps = (to, from, except, desc) => {
52
+ if (from && typeof from === "object" || typeof from === "function") {
53
+ for (let key of __getOwnPropNames(from))
54
+ if (!__hasOwnProp.call(to, key) && key !== except)
55
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
56
+ }
57
+ return to;
58
+ };
59
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
60
+ // If the importer is in node compatibility mode or this is not an ESM
61
+ // file that has been converted to a CommonJS file using a Babel-
62
+ // compatible transform (i.e. "__esModule" has not been set), then set
63
+ // "default" to the CommonJS "module.exports" for node compatibility.
64
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
65
+ mod
66
+ ));
67
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
68
+
69
+ // packages/engine/Source/Core/defined.js
70
+ function defined(value) {
71
+ return value !== void 0 && value !== null;
72
+ }
73
+ var defined_default = defined;
74
+
75
+ export {
76
+ __require,
77
+ __glob,
78
+ __commonJS,
79
+ __toESM,
80
+ __publicField,
81
+ defined_default
82
+ };
@@ -0,0 +1,147 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 1.141.7
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
+ Cartographic_default,
28
+ Ellipsoid_default
29
+ } from "./chunk-7AMVPXZY.js";
30
+ import {
31
+ Cartesian3_default
32
+ } from "./chunk-CHMDKP5L.js";
33
+ import {
34
+ Math_default
35
+ } from "./chunk-DUBE5G2H.js";
36
+ import {
37
+ DeveloperError_default
38
+ } from "./chunk-ESQGFRLZ.js";
39
+ import {
40
+ defined_default
41
+ } from "./chunk-KEJKMITY.js";
42
+
43
+ // packages/engine/Source/Core/WebMercatorProjection.js
44
+ var WebMercatorProjection = class _WebMercatorProjection {
45
+ /**
46
+ * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid.
47
+ */
48
+ constructor(ellipsoid) {
49
+ this._ellipsoid = ellipsoid ?? Ellipsoid_default.WGS84;
50
+ this._semimajorAxis = this._ellipsoid.maximumRadius;
51
+ this._oneOverSemimajorAxis = 1 / this._semimajorAxis;
52
+ }
53
+ /**
54
+ * Gets the {@link Ellipsoid}.
55
+ *
56
+ * @type {Ellipsoid}
57
+ * @readonly
58
+ */
59
+ get ellipsoid() {
60
+ return this._ellipsoid;
61
+ }
62
+ /**
63
+ * Converts a Mercator angle, in the range -PI to PI, to a geodetic latitude
64
+ * in the range -PI/2 to PI/2.
65
+ *
66
+ * @param {number} mercatorAngle The angle to convert.
67
+ * @returns {number} The geodetic latitude in radians.
68
+ */
69
+ static mercatorAngleToGeodeticLatitude(mercatorAngle) {
70
+ return Math_default.PI_OVER_TWO - 2 * Math.atan(Math.exp(-mercatorAngle));
71
+ }
72
+ /**
73
+ * Converts a geodetic latitude in radians, in the range -PI/2 to PI/2, to a Mercator
74
+ * angle in the range -PI to PI.
75
+ *
76
+ * @param {number} latitude The geodetic latitude in radians.
77
+ * @returns {number} The Mercator angle.
78
+ */
79
+ static geodeticLatitudeToMercatorAngle(latitude) {
80
+ if (latitude > _WebMercatorProjection.MaximumLatitude) {
81
+ latitude = _WebMercatorProjection.MaximumLatitude;
82
+ } else if (latitude < -_WebMercatorProjection.MaximumLatitude) {
83
+ latitude = -_WebMercatorProjection.MaximumLatitude;
84
+ }
85
+ const sinLatitude = Math.sin(latitude);
86
+ return 0.5 * Math.log((1 + sinLatitude) / (1 - sinLatitude));
87
+ }
88
+ /**
89
+ * Converts geodetic ellipsoid coordinates, in radians, to the equivalent Web Mercator
90
+ * X, Y, Z coordinates expressed in meters and returned in a {@link Cartesian3}. The height
91
+ * is copied unmodified to the Z coordinate.
92
+ *
93
+ * @param {Cartographic} cartographic The cartographic coordinates in radians.
94
+ * @param {Cartesian3} [result] The instance to which to copy the result, or undefined if a
95
+ * new instance should be created.
96
+ * @returns {Cartesian3} The equivalent web mercator X, Y, Z coordinates, in meters.
97
+ */
98
+ project(cartographic, result) {
99
+ const semimajorAxis = this._semimajorAxis;
100
+ const x = cartographic.longitude * semimajorAxis;
101
+ const y = _WebMercatorProjection.geodeticLatitudeToMercatorAngle(
102
+ cartographic.latitude
103
+ ) * semimajorAxis;
104
+ const z = cartographic.height;
105
+ if (!defined_default(result)) {
106
+ return new Cartesian3_default(x, y, z);
107
+ }
108
+ result.x = x;
109
+ result.y = y;
110
+ result.z = z;
111
+ return result;
112
+ }
113
+ /**
114
+ * Converts Web Mercator X, Y coordinates, expressed in meters, to a {@link Cartographic}
115
+ * containing geodetic ellipsoid coordinates. The Z coordinate is copied unmodified to the
116
+ * height.
117
+ *
118
+ * @param {Cartesian3} cartesian The web mercator Cartesian position to unrproject with height (z) in meters.
119
+ * @param {Cartographic} [result] The instance to which to copy the result, or undefined if a
120
+ * new instance should be created.
121
+ * @returns {Cartographic} The equivalent cartographic coordinates.
122
+ */
123
+ unproject(cartesian, result) {
124
+ if (!defined_default(cartesian)) {
125
+ throw new DeveloperError_default("cartesian is required");
126
+ }
127
+ const oneOverEarthSemimajorAxis = this._oneOverSemimajorAxis;
128
+ const longitude = cartesian.x * oneOverEarthSemimajorAxis;
129
+ const latitude = _WebMercatorProjection.mercatorAngleToGeodeticLatitude(
130
+ cartesian.y * oneOverEarthSemimajorAxis
131
+ );
132
+ const height = cartesian.z;
133
+ if (!defined_default(result)) {
134
+ return new Cartographic_default(longitude, latitude, height);
135
+ }
136
+ result.longitude = longitude;
137
+ result.latitude = latitude;
138
+ result.height = height;
139
+ return result;
140
+ }
141
+ };
142
+ WebMercatorProjection.MaximumLatitude = WebMercatorProjection.mercatorAngleToGeodeticLatitude(Math.PI);
143
+ var WebMercatorProjection_default = WebMercatorProjection;
144
+
145
+ export {
146
+ WebMercatorProjection_default
147
+ };
@@ -0,0 +1,241 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 1.141.6
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
+ GeographicProjection_default
28
+ } from "./chunk-37WL527K.js";
29
+ import {
30
+ Matrix2_default,
31
+ Rectangle_default
32
+ } from "./chunk-YQFOQAXD.js";
33
+ import {
34
+ Cartographic_default,
35
+ Ellipsoid_default
36
+ } from "./chunk-S3XHL7GO.js";
37
+ import {
38
+ Cartesian3_default
39
+ } from "./chunk-VETQOADR.js";
40
+ import {
41
+ Math_default
42
+ } from "./chunk-MKR6YCMG.js";
43
+ import {
44
+ DeveloperError_default
45
+ } from "./chunk-UTAWMCSE.js";
46
+ import {
47
+ defined_default
48
+ } from "./chunk-HTCLVUBZ.js";
49
+
50
+ // packages/engine/Source/Core/RectangleGeometryLibrary.js
51
+ var cos = Math.cos;
52
+ var sin = Math.sin;
53
+ var sqrt = Math.sqrt;
54
+ var RectangleGeometryLibrary = {};
55
+ RectangleGeometryLibrary.computePosition = function(computedOptions, ellipsoid, computeST, row, col, position, st) {
56
+ const radiiSquared = ellipsoid.radiiSquared;
57
+ const nwCorner = computedOptions.nwCorner;
58
+ const rectangle = computedOptions.boundingRectangle;
59
+ let stLatitude = nwCorner.latitude - computedOptions.granYCos * row + col * computedOptions.granXSin;
60
+ const cosLatitude = cos(stLatitude);
61
+ const nZ = sin(stLatitude);
62
+ const kZ = radiiSquared.z * nZ;
63
+ let stLongitude = nwCorner.longitude + row * computedOptions.granYSin + col * computedOptions.granXCos;
64
+ const nX = cosLatitude * cos(stLongitude);
65
+ const nY = cosLatitude * sin(stLongitude);
66
+ const kX = radiiSquared.x * nX;
67
+ const kY = radiiSquared.y * nY;
68
+ const gamma = sqrt(kX * nX + kY * nY + kZ * nZ);
69
+ position.x = kX / gamma;
70
+ position.y = kY / gamma;
71
+ position.z = kZ / gamma;
72
+ if (computeST) {
73
+ const stNwCorner = computedOptions.stNwCorner;
74
+ if (defined_default(stNwCorner)) {
75
+ stLatitude = stNwCorner.latitude - computedOptions.stGranYCos * row + col * computedOptions.stGranXSin;
76
+ stLongitude = stNwCorner.longitude + row * computedOptions.stGranYSin + col * computedOptions.stGranXCos;
77
+ st.x = (stLongitude - computedOptions.stWest) * computedOptions.lonScalar;
78
+ st.y = (stLatitude - computedOptions.stSouth) * computedOptions.latScalar;
79
+ } else {
80
+ st.x = (stLongitude - rectangle.west) * computedOptions.lonScalar;
81
+ st.y = (stLatitude - rectangle.south) * computedOptions.latScalar;
82
+ }
83
+ }
84
+ };
85
+ var rotationMatrixScratch = new Matrix2_default();
86
+ var nwCartesian = new Cartesian3_default();
87
+ var centerScratch = new Cartographic_default();
88
+ var centerCartesian = new Cartesian3_default();
89
+ var proj = new GeographicProjection_default();
90
+ function getRotationOptions(nwCorner, rotation, granularityX, granularityY, center, width, height) {
91
+ const cosRotation = Math.cos(rotation);
92
+ const granYCos = granularityY * cosRotation;
93
+ const granXCos = granularityX * cosRotation;
94
+ const sinRotation = Math.sin(rotation);
95
+ const granYSin = granularityY * sinRotation;
96
+ const granXSin = granularityX * sinRotation;
97
+ proj._ellipsoid = Ellipsoid_default.default;
98
+ nwCartesian = proj.project(nwCorner, nwCartesian);
99
+ nwCartesian = Cartesian3_default.subtract(nwCartesian, centerCartesian, nwCartesian);
100
+ const rotationMatrix = Matrix2_default.fromRotation(rotation, rotationMatrixScratch);
101
+ nwCartesian = Matrix2_default.multiplyByVector(
102
+ rotationMatrix,
103
+ nwCartesian,
104
+ nwCartesian
105
+ );
106
+ nwCartesian = Cartesian3_default.add(nwCartesian, centerCartesian, nwCartesian);
107
+ nwCorner = proj.unproject(nwCartesian, nwCorner);
108
+ width -= 1;
109
+ height -= 1;
110
+ const latitude = nwCorner.latitude;
111
+ const latitude0 = latitude + width * granXSin;
112
+ const latitude1 = latitude - granYCos * height;
113
+ const latitude2 = latitude - granYCos * height + width * granXSin;
114
+ const north = Math.max(latitude, latitude0, latitude1, latitude2);
115
+ const south = Math.min(latitude, latitude0, latitude1, latitude2);
116
+ const longitude = nwCorner.longitude;
117
+ const longitude0 = longitude + width * granXCos;
118
+ const longitude1 = longitude + height * granYSin;
119
+ const longitude2 = longitude + height * granYSin + width * granXCos;
120
+ const east = Math.max(longitude, longitude0, longitude1, longitude2);
121
+ const west = Math.min(longitude, longitude0, longitude1, longitude2);
122
+ return {
123
+ north,
124
+ south,
125
+ east,
126
+ west,
127
+ granYCos,
128
+ granYSin,
129
+ granXCos,
130
+ granXSin,
131
+ nwCorner
132
+ };
133
+ }
134
+ RectangleGeometryLibrary.computeOptions = function(rectangle, granularity, rotation, stRotation, boundingRectangleScratch, nwCornerResult, stNwCornerResult) {
135
+ let east = rectangle.east;
136
+ let west = rectangle.west;
137
+ let north = rectangle.north;
138
+ let south = rectangle.south;
139
+ let northCap = false;
140
+ let southCap = false;
141
+ if (north === Math_default.PI_OVER_TWO) {
142
+ northCap = true;
143
+ }
144
+ if (south === -Math_default.PI_OVER_TWO) {
145
+ southCap = true;
146
+ }
147
+ let dx;
148
+ const dy = north - south;
149
+ if (west > east) {
150
+ dx = Math_default.TWO_PI - west + east;
151
+ } else {
152
+ dx = east - west;
153
+ }
154
+ const width = Math.ceil(dx / granularity) + 1;
155
+ const height = Math.ceil(dy / granularity) + 1;
156
+ const granularityX = dx / (width - 1);
157
+ const granularityY = dy / (height - 1);
158
+ const nwCorner = Rectangle_default.northwest(rectangle, nwCornerResult);
159
+ const center = Rectangle_default.center(rectangle, centerScratch);
160
+ if (rotation !== 0 || stRotation !== 0) {
161
+ if (center.longitude < nwCorner.longitude) {
162
+ center.longitude += Math_default.TWO_PI;
163
+ }
164
+ proj._ellipsoid = Ellipsoid_default.default;
165
+ centerCartesian = proj.project(center, centerCartesian);
166
+ }
167
+ const granYCos = granularityY;
168
+ const granXCos = granularityX;
169
+ const granYSin = 0;
170
+ const granXSin = 0;
171
+ const boundingRectangle = Rectangle_default.clone(
172
+ rectangle,
173
+ boundingRectangleScratch
174
+ );
175
+ const computedOptions = {
176
+ granYCos,
177
+ granYSin,
178
+ granXCos,
179
+ granXSin,
180
+ nwCorner,
181
+ boundingRectangle,
182
+ width,
183
+ height,
184
+ northCap,
185
+ southCap
186
+ };
187
+ if (rotation !== 0) {
188
+ const rotationOptions = getRotationOptions(
189
+ nwCorner,
190
+ rotation,
191
+ granularityX,
192
+ granularityY,
193
+ center,
194
+ width,
195
+ height
196
+ );
197
+ north = rotationOptions.north;
198
+ south = rotationOptions.south;
199
+ east = rotationOptions.east;
200
+ west = rotationOptions.west;
201
+ if (north < -Math_default.PI_OVER_TWO || north > Math_default.PI_OVER_TWO || south < -Math_default.PI_OVER_TWO || south > Math_default.PI_OVER_TWO) {
202
+ throw new DeveloperError_default(
203
+ "Rotated rectangle is invalid. It crosses over either the north or south pole."
204
+ );
205
+ }
206
+ computedOptions.granYCos = rotationOptions.granYCos;
207
+ computedOptions.granYSin = rotationOptions.granYSin;
208
+ computedOptions.granXCos = rotationOptions.granXCos;
209
+ computedOptions.granXSin = rotationOptions.granXSin;
210
+ boundingRectangle.north = north;
211
+ boundingRectangle.south = south;
212
+ boundingRectangle.east = east;
213
+ boundingRectangle.west = west;
214
+ }
215
+ if (stRotation !== 0) {
216
+ rotation = rotation - stRotation;
217
+ const stNwCorner = Rectangle_default.northwest(boundingRectangle, stNwCornerResult);
218
+ const stRotationOptions = getRotationOptions(
219
+ stNwCorner,
220
+ rotation,
221
+ granularityX,
222
+ granularityY,
223
+ center,
224
+ width,
225
+ height
226
+ );
227
+ computedOptions.stGranYCos = stRotationOptions.granYCos;
228
+ computedOptions.stGranXCos = stRotationOptions.granXCos;
229
+ computedOptions.stGranYSin = stRotationOptions.granYSin;
230
+ computedOptions.stGranXSin = stRotationOptions.granXSin;
231
+ computedOptions.stNwCorner = stNwCorner;
232
+ computedOptions.stWest = stRotationOptions.west;
233
+ computedOptions.stSouth = stRotationOptions.south;
234
+ }
235
+ return computedOptions;
236
+ };
237
+ var RectangleGeometryLibrary_default = RectangleGeometryLibrary;
238
+
239
+ export {
240
+ RectangleGeometryLibrary_default
241
+ };
@@ -0,0 +1,73 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 1.141.7
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
+ Math_default
28
+ } from "./chunk-DUBE5G2H.js";
29
+
30
+ // packages/engine/Source/Core/CylinderGeometryLibrary.js
31
+ var CylinderGeometryLibrary = {};
32
+ CylinderGeometryLibrary.computePositions = function(length, topRadius, bottomRadius, slices, fill) {
33
+ const topZ = length * 0.5;
34
+ const bottomZ = -topZ;
35
+ const twoSlice = slices + slices;
36
+ const size = fill ? 2 * twoSlice : twoSlice;
37
+ const positions = new Float64Array(size * 3);
38
+ let i;
39
+ let index = 0;
40
+ let tbIndex = 0;
41
+ const bottomOffset = fill ? twoSlice * 3 : 0;
42
+ const topOffset = fill ? (twoSlice + slices) * 3 : slices * 3;
43
+ for (i = 0; i < slices; i++) {
44
+ const angle = i / slices * Math_default.TWO_PI;
45
+ const x = Math.cos(angle);
46
+ const y = Math.sin(angle);
47
+ const bottomX = x * bottomRadius;
48
+ const bottomY = y * bottomRadius;
49
+ const topX = x * topRadius;
50
+ const topY = y * topRadius;
51
+ positions[tbIndex + bottomOffset] = bottomX;
52
+ positions[tbIndex + bottomOffset + 1] = bottomY;
53
+ positions[tbIndex + bottomOffset + 2] = bottomZ;
54
+ positions[tbIndex + topOffset] = topX;
55
+ positions[tbIndex + topOffset + 1] = topY;
56
+ positions[tbIndex + topOffset + 2] = topZ;
57
+ tbIndex += 3;
58
+ if (fill) {
59
+ positions[index++] = bottomX;
60
+ positions[index++] = bottomY;
61
+ positions[index++] = bottomZ;
62
+ positions[index++] = topX;
63
+ positions[index++] = topY;
64
+ positions[index++] = topZ;
65
+ }
66
+ }
67
+ return positions;
68
+ };
69
+ var CylinderGeometryLibrary_default = CylinderGeometryLibrary;
70
+
71
+ export {
72
+ CylinderGeometryLibrary_default
73
+ };