@gmgis/gm-sdk 1.12.5 → 2.0.2

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 (159) hide show
  1. package/dist/dist/index.js +1848 -0
  2. package/dist/gm.min.js +16983 -16483
  3. package/dist/index.js +1436 -1434
  4. package/dist/resources/ThirdParty/Workers/pako_deflate.min.js +1 -2
  5. package/dist/resources/ThirdParty/Workers/pako_inflate.min.js +1 -2
  6. package/dist/resources/ThirdParty/Workers/z-worker-pako.js +1 -1
  7. package/dist/resources/ThirdParty/google-earth-dbroot-parser.js +1 -8337
  8. package/dist/resources/ThirdParty/wasm_splats_bg.wasm +0 -0
  9. package/dist/resources/Workers/chunk-35SHYARM.js +26 -0
  10. package/dist/resources/Workers/chunk-37F5JSTI.js +26 -0
  11. package/dist/resources/Workers/chunk-3SSKC3VN.js +26 -0
  12. package/dist/resources/Workers/chunk-3W4GT7KQ.js +26 -0
  13. package/dist/resources/Workers/chunk-4IW2T6GF.js +26 -0
  14. package/dist/resources/Workers/chunk-5YEWO3HT.js +26 -0
  15. package/dist/resources/Workers/chunk-64RSHJUE.js +28 -0
  16. package/dist/resources/Workers/chunk-77IHZJJ3.js +26 -0
  17. package/dist/resources/Workers/chunk-7HTKERZY.js +26 -0
  18. package/dist/resources/Workers/{chunk-I2ITFFPX.js → chunk-A56XVLQR.js} +2 -13
  19. package/dist/resources/Workers/chunk-AJYK4IVJ.js +26 -0
  20. package/dist/resources/Workers/{chunk-PRGYLLJT.js → chunk-ARG42DC4.js} +2 -31
  21. package/dist/resources/Workers/chunk-AU7IKHOH.js +26 -0
  22. package/dist/resources/Workers/chunk-B4AA3ARO.js +26 -0
  23. package/dist/resources/Workers/chunk-CNCV5UL7.js +26 -0
  24. package/dist/resources/Workers/chunk-CYCB63OH.js +26 -0
  25. package/dist/resources/Workers/{chunk-DI5NGJUP.js → chunk-D6AA5QVT.js} +2 -20
  26. package/dist/resources/Workers/chunk-D6C66QON.js +26 -0
  27. package/dist/resources/Workers/chunk-DEPHB2WM.js +26 -0
  28. package/dist/resources/Workers/chunk-DMEY62ID.js +26 -0
  29. package/dist/resources/Workers/chunk-DQQ63PYM.js +26 -0
  30. package/dist/resources/Workers/chunk-ED5JPB3S.js +27 -0
  31. package/dist/resources/Workers/chunk-EZUYS2JF.js +26 -0
  32. package/dist/resources/Workers/chunk-FEVXJ54I.js +26 -0
  33. package/dist/resources/Workers/chunk-G5AGHVVC.js +26 -0
  34. package/dist/resources/Workers/{chunk-7JO7GPJN.js → chunk-GBYLG25F.js} +2 -15
  35. package/dist/resources/Workers/chunk-GILIDQNQ.js +26 -0
  36. package/dist/resources/Workers/chunk-HMIYSTF6.js +26 -0
  37. package/dist/resources/Workers/chunk-HTFSEEMT.js +26 -0
  38. package/dist/resources/Workers/chunk-HWXX4CWK.js +26 -0
  39. package/dist/resources/Workers/chunk-IYTZ52EY.js +26 -0
  40. package/dist/resources/Workers/chunk-J6UP6FLE.js +26 -0
  41. package/dist/resources/Workers/chunk-LEYMRMBK.js +27 -0
  42. package/dist/resources/Workers/chunk-M3MGYQSL.js +26 -0
  43. package/dist/resources/Workers/chunk-N4VJKXZS.js +26 -0
  44. package/dist/resources/Workers/chunk-NB3ML6JO.js +26 -0
  45. package/dist/resources/Workers/chunk-OFUUQVMR.js +26 -0
  46. package/dist/resources/Workers/chunk-OSW76XDF.js +26 -0
  47. package/dist/resources/Workers/chunk-PSPPBZWI.js +66 -0
  48. package/dist/resources/Workers/chunk-QN3VOORQ.js +26 -0
  49. package/dist/resources/Workers/chunk-QOUAJ6TL.js +26 -0
  50. package/dist/resources/Workers/chunk-RCV6KWXS.js +26 -0
  51. package/dist/resources/Workers/chunk-TCGIRNHN.js +26 -0
  52. package/dist/resources/Workers/chunk-U4IEOH5K.js +26 -0
  53. package/dist/resources/Workers/chunk-UP6I5URU.js +26 -0
  54. package/dist/resources/Workers/chunk-VTAIKJXX.js +26 -0
  55. package/dist/resources/Workers/chunk-VTBDSFTG.js +26 -0
  56. package/dist/resources/Workers/chunk-VW6VD53G.js +26 -0
  57. package/dist/resources/Workers/chunk-WGGIH7QW.js +26 -0
  58. package/dist/resources/Workers/chunk-WWA5PL4H.js +26 -0
  59. package/dist/resources/Workers/{chunk-6CHGCNMW.js → chunk-WZDE3RYP.js} +4 -34
  60. package/dist/resources/Workers/chunk-XRL4AVS5.js +26 -0
  61. package/dist/resources/Workers/combineGeometry.js +2 -40
  62. package/dist/resources/Workers/createBoxGeometry.js +2 -32
  63. package/dist/resources/Workers/createBoxOutlineGeometry.js +2 -209
  64. package/dist/resources/Workers/createCircleGeometry.js +2 -175
  65. package/dist/resources/Workers/createCircleOutlineGeometry.js +2 -121
  66. package/dist/resources/Workers/createCoplanarPolygonGeometry.js +2 -481
  67. package/dist/resources/Workers/createCoplanarPolygonOutlineGeometry.js +2 -199
  68. package/dist/resources/Workers/createCorridorGeometry.js +2 -1237
  69. package/dist/resources/Workers/createCorridorOutlineGeometry.js +2 -542
  70. package/dist/resources/Workers/createCylinderGeometry.js +2 -34
  71. package/dist/resources/Workers/createCylinderOutlineGeometry.js +2 -205
  72. package/dist/resources/Workers/createEllipseGeometry.js +2 -45
  73. package/dist/resources/Workers/createEllipseOutlineGeometry.js +2 -38
  74. package/dist/resources/Workers/createEllipsoidGeometry.js +2 -33
  75. package/dist/resources/Workers/createEllipsoidOutlineGeometry.js +2 -35
  76. package/dist/resources/Workers/createFrustumGeometry.js +2 -32
  77. package/dist/resources/Workers/createFrustumOutlineGeometry.js +2 -210
  78. package/dist/resources/Workers/createGeometry.js +2 -144
  79. package/dist/resources/Workers/createGroundPolylineGeometry.js +2 -1582
  80. package/dist/resources/Workers/createPlaneGeometry.js +2 -198
  81. package/dist/resources/Workers/createPlaneOutlineGeometry.js +2 -98
  82. package/dist/resources/Workers/createPolygonGeometry.js +2 -1381
  83. package/dist/resources/Workers/createPolygonOutlineGeometry.js +2 -509
  84. package/dist/resources/Workers/createPolylineGeometry.js +2 -470
  85. package/dist/resources/Workers/createPolylineVolumeGeometry.js +2 -354
  86. package/dist/resources/Workers/createPolylineVolumeOutlineGeometry.js +2 -251
  87. package/dist/resources/Workers/createRectangleGeometry.js +2 -1246
  88. package/dist/resources/Workers/createRectangleOutlineGeometry.js +2 -453
  89. package/dist/resources/Workers/createSimplePolylineGeometry.js +2 -374
  90. package/dist/resources/Workers/createSphereGeometry.js +2 -92
  91. package/dist/resources/Workers/createSphereOutlineGeometry.js +2 -92
  92. package/dist/resources/Workers/createTaskProcessorWorker.js +2 -8
  93. package/dist/resources/Workers/createVectorTileClampedPolylines.js +2 -466
  94. package/dist/resources/Workers/createVectorTileGeometries.js +2 -361
  95. package/dist/resources/Workers/createVectorTilePoints.js +2 -88
  96. package/dist/resources/Workers/createVectorTilePolygons.js +2 -359
  97. package/dist/resources/Workers/createVectorTilePolylines.js +2 -236
  98. package/dist/resources/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +2 -539
  99. package/dist/resources/Workers/createVerticesFromHeightmap.js +2 -2252
  100. package/dist/resources/Workers/createVerticesFromQuantizedTerrainMesh.js +2 -729
  101. package/dist/resources/Workers/createWallGeometry.js +2 -464
  102. package/dist/resources/Workers/createWallOutlineGeometry.js +2 -312
  103. package/dist/resources/Workers/decodeDraco.js +2 -345
  104. package/dist/resources/Workers/decodeGoogleEarthEnterprisePacket.js +2 -2642
  105. package/dist/resources/Workers/decodeI3S.js +2 -1319
  106. package/dist/resources/Workers/gaussianSplatSorter.js +26 -0
  107. package/dist/resources/Workers/gaussianSplatTextureGenerator.js +26 -0
  108. package/dist/resources/Workers/transcodeKTX2.js +29 -3360
  109. package/dist/resources/Workers/transferTypedArrayTest.js +2 -17
  110. package/dist/resources/Workers/upsampleQuantizedTerrainMesh.js +2 -793
  111. package/package.json +74 -74
  112. package/dist/resources/ThirdParty/Workers/basis_transcoder.js +0 -21
  113. package/dist/resources/Workers/chunk-26GA3JAM.js +0 -139
  114. package/dist/resources/Workers/chunk-27HUZ7SA.js +0 -305
  115. package/dist/resources/Workers/chunk-2ZGOQXYU.js +0 -171
  116. package/dist/resources/Workers/chunk-3Q2L65QU.js +0 -1258
  117. package/dist/resources/Workers/chunk-472HQ3EH.js +0 -100
  118. package/dist/resources/Workers/chunk-5ODQSF26.js +0 -101
  119. package/dist/resources/Workers/chunk-5OOFQLKF.js +0 -634
  120. package/dist/resources/Workers/chunk-5PTXS2GO.js +0 -10390
  121. package/dist/resources/Workers/chunk-76BYBWHP.js +0 -122
  122. package/dist/resources/Workers/chunk-7BMOHCPM.js +0 -390
  123. package/dist/resources/Workers/chunk-7KTQP4VB.js +0 -59
  124. package/dist/resources/Workers/chunk-7O373FFS.js +0 -665
  125. package/dist/resources/Workers/chunk-AD63PIY6.js +0 -163
  126. package/dist/resources/Workers/chunk-BHQJ2NT7.js +0 -353
  127. package/dist/resources/Workers/chunk-C6YYBQXW.js +0 -102
  128. package/dist/resources/Workers/chunk-CKY7HOHV.js +0 -287
  129. package/dist/resources/Workers/chunk-DHYHSFFJ.js +0 -73
  130. package/dist/resources/Workers/chunk-E27BLMDD.js +0 -115
  131. package/dist/resources/Workers/chunk-E63IIM5T.js +0 -75
  132. package/dist/resources/Workers/chunk-E6V6SQZW.js +0 -456
  133. package/dist/resources/Workers/chunk-EJZTDTUH.js +0 -138
  134. package/dist/resources/Workers/chunk-FDOV2LBJ.js +0 -220
  135. package/dist/resources/Workers/chunk-FIGIZHAQ.js +0 -684
  136. package/dist/resources/Workers/chunk-GESF4OXQ.js +0 -1800
  137. package/dist/resources/Workers/chunk-GGZJN2TI.js +0 -2717
  138. package/dist/resources/Workers/chunk-GNBFYG7F.js +0 -1481
  139. package/dist/resources/Workers/chunk-GWCFU2SA.js +0 -300
  140. package/dist/resources/Workers/chunk-IBLIYJZR.js +0 -196
  141. package/dist/resources/Workers/chunk-JW4FOI6M.js +0 -476
  142. package/dist/resources/Workers/chunk-K4GQUNB5.js +0 -262
  143. package/dist/resources/Workers/chunk-M3GMB5OP.js +0 -834
  144. package/dist/resources/Workers/chunk-MXIZJAPH.js +0 -629
  145. package/dist/resources/Workers/chunk-N5KJGGCM.js +0 -1073
  146. package/dist/resources/Workers/chunk-NGPPMXRM.js +0 -435
  147. package/dist/resources/Workers/chunk-O3E4OAOE.js +0 -511
  148. package/dist/resources/Workers/chunk-PGRPDNHG.js +0 -1048
  149. package/dist/resources/Workers/chunk-S6MRMMQU.js +0 -157
  150. package/dist/resources/Workers/chunk-SMDOP47J.js +0 -945
  151. package/dist/resources/Workers/chunk-TGONEMZO.js +0 -421
  152. package/dist/resources/Workers/chunk-TKVT5GQM.js +0 -781
  153. package/dist/resources/Workers/chunk-U72QNFOJ.js +0 -758
  154. package/dist/resources/Workers/chunk-VJZB3WAV.js +0 -963
  155. package/dist/resources/Workers/chunk-VU2MNO7L.js +0 -239
  156. package/dist/resources/Workers/chunk-XY4BATBS.js +0 -500
  157. package/dist/resources/Workers/chunk-YFXQECWV.js +0 -2857
  158. package/dist/resources/Workers/chunk-YSGTGQQO.js +0 -398
  159. package/dist/resources/Workers/chunk-YZ733KKS.js +0 -368
@@ -1,163 +0,0 @@
1
- /**
2
- * @license
3
- * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.122
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
- defined_default
28
- } from "./chunk-E63IIM5T.js";
29
-
30
- // packages/engine/Source/Core/DeveloperError.js
31
- function DeveloperError(message) {
32
- this.name = "DeveloperError";
33
- this.message = message;
34
- let stack;
35
- try {
36
- throw new Error();
37
- } catch (e) {
38
- stack = e.stack;
39
- }
40
- this.stack = stack;
41
- }
42
- if (defined_default(Object.create)) {
43
- DeveloperError.prototype = Object.create(Error.prototype);
44
- DeveloperError.prototype.constructor = DeveloperError;
45
- }
46
- DeveloperError.prototype.toString = function() {
47
- let str = `${this.name}: ${this.message}`;
48
- if (defined_default(this.stack)) {
49
- str += `
50
- ${this.stack.toString()}`;
51
- }
52
- return str;
53
- };
54
- DeveloperError.throwInstantiationError = function() {
55
- throw new DeveloperError(
56
- "This function defines an interface and should not be called directly."
57
- );
58
- };
59
- var DeveloperError_default = DeveloperError;
60
-
61
- // packages/engine/Source/Core/Check.js
62
- var Check = {};
63
- Check.typeOf = {};
64
- function getUndefinedErrorMessage(name) {
65
- return `${name} is required, actual value was undefined`;
66
- }
67
- function getFailedTypeErrorMessage(actual, expected, name) {
68
- return `Expected ${name} to be typeof ${expected}, actual typeof was ${actual}`;
69
- }
70
- Check.defined = function(name, test) {
71
- if (!defined_default(test)) {
72
- throw new DeveloperError_default(getUndefinedErrorMessage(name));
73
- }
74
- };
75
- Check.typeOf.func = function(name, test) {
76
- if (typeof test !== "function") {
77
- throw new DeveloperError_default(
78
- getFailedTypeErrorMessage(typeof test, "function", name)
79
- );
80
- }
81
- };
82
- Check.typeOf.string = function(name, test) {
83
- if (typeof test !== "string") {
84
- throw new DeveloperError_default(
85
- getFailedTypeErrorMessage(typeof test, "string", name)
86
- );
87
- }
88
- };
89
- Check.typeOf.number = function(name, test) {
90
- if (typeof test !== "number") {
91
- throw new DeveloperError_default(
92
- getFailedTypeErrorMessage(typeof test, "number", name)
93
- );
94
- }
95
- };
96
- Check.typeOf.number.lessThan = function(name, test, limit) {
97
- Check.typeOf.number(name, test);
98
- if (test >= limit) {
99
- throw new DeveloperError_default(
100
- `Expected ${name} to be less than ${limit}, actual value was ${test}`
101
- );
102
- }
103
- };
104
- Check.typeOf.number.lessThanOrEquals = function(name, test, limit) {
105
- Check.typeOf.number(name, test);
106
- if (test > limit) {
107
- throw new DeveloperError_default(
108
- `Expected ${name} to be less than or equal to ${limit}, actual value was ${test}`
109
- );
110
- }
111
- };
112
- Check.typeOf.number.greaterThan = function(name, test, limit) {
113
- Check.typeOf.number(name, test);
114
- if (test <= limit) {
115
- throw new DeveloperError_default(
116
- `Expected ${name} to be greater than ${limit}, actual value was ${test}`
117
- );
118
- }
119
- };
120
- Check.typeOf.number.greaterThanOrEquals = function(name, test, limit) {
121
- Check.typeOf.number(name, test);
122
- if (test < limit) {
123
- throw new DeveloperError_default(
124
- `Expected ${name} to be greater than or equal to ${limit}, actual value was ${test}`
125
- );
126
- }
127
- };
128
- Check.typeOf.object = function(name, test) {
129
- if (typeof test !== "object") {
130
- throw new DeveloperError_default(
131
- getFailedTypeErrorMessage(typeof test, "object", name)
132
- );
133
- }
134
- };
135
- Check.typeOf.bool = function(name, test) {
136
- if (typeof test !== "boolean") {
137
- throw new DeveloperError_default(
138
- getFailedTypeErrorMessage(typeof test, "boolean", name)
139
- );
140
- }
141
- };
142
- Check.typeOf.bigint = function(name, test) {
143
- if (typeof test !== "bigint") {
144
- throw new DeveloperError_default(
145
- getFailedTypeErrorMessage(typeof test, "bigint", name)
146
- );
147
- }
148
- };
149
- Check.typeOf.number.equals = function(name1, name2, test1, test2) {
150
- Check.typeOf.number(name1, test1);
151
- Check.typeOf.number(name2, test2);
152
- if (test1 !== test2) {
153
- throw new DeveloperError_default(
154
- `${name1} must be equal to ${name2}, the actual values are ${test1} and ${test2}`
155
- );
156
- }
157
- };
158
- var Check_default = Check;
159
-
160
- export {
161
- DeveloperError_default,
162
- Check_default
163
- };
@@ -1,353 +0,0 @@
1
- /**
2
- * @license
3
- * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.122
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
- Cartesian3_default,
28
- Cartographic_default,
29
- Ellipsoid_default
30
- } from "./chunk-YFXQECWV.js";
31
- import {
32
- Math_default
33
- } from "./chunk-XY4BATBS.js";
34
- import {
35
- defaultValue_default
36
- } from "./chunk-7JO7GPJN.js";
37
- import {
38
- Check_default
39
- } from "./chunk-AD63PIY6.js";
40
- import {
41
- defined_default
42
- } from "./chunk-E63IIM5T.js";
43
-
44
- // packages/engine/Source/Core/EllipsoidGeodesic.js
45
- function setConstants(ellipsoidGeodesic) {
46
- const uSquared = ellipsoidGeodesic._uSquared;
47
- const a = ellipsoidGeodesic._ellipsoid.maximumRadius;
48
- const b = ellipsoidGeodesic._ellipsoid.minimumRadius;
49
- const f = (a - b) / a;
50
- const cosineHeading = Math.cos(ellipsoidGeodesic._startHeading);
51
- const sineHeading = Math.sin(ellipsoidGeodesic._startHeading);
52
- const tanU = (1 - f) * Math.tan(ellipsoidGeodesic._start.latitude);
53
- const cosineU = 1 / Math.sqrt(1 + tanU * tanU);
54
- const sineU = cosineU * tanU;
55
- const sigma = Math.atan2(tanU, cosineHeading);
56
- const sineAlpha = cosineU * sineHeading;
57
- const sineSquaredAlpha = sineAlpha * sineAlpha;
58
- const cosineSquaredAlpha = 1 - sineSquaredAlpha;
59
- const cosineAlpha = Math.sqrt(cosineSquaredAlpha);
60
- const u2Over4 = uSquared / 4;
61
- const u4Over16 = u2Over4 * u2Over4;
62
- const u6Over64 = u4Over16 * u2Over4;
63
- const u8Over256 = u4Over16 * u4Over16;
64
- const a0 = 1 + u2Over4 - 3 * u4Over16 / 4 + 5 * u6Over64 / 4 - 175 * u8Over256 / 64;
65
- const a1 = 1 - u2Over4 + 15 * u4Over16 / 8 - 35 * u6Over64 / 8;
66
- const a2 = 1 - 3 * u2Over4 + 35 * u4Over16 / 4;
67
- const a3 = 1 - 5 * u2Over4;
68
- const distanceRatio = a0 * sigma - a1 * Math.sin(2 * sigma) * u2Over4 / 2 - a2 * Math.sin(4 * sigma) * u4Over16 / 16 - a3 * Math.sin(6 * sigma) * u6Over64 / 48 - Math.sin(8 * sigma) * 5 * u8Over256 / 512;
69
- const constants = ellipsoidGeodesic._constants;
70
- constants.a = a;
71
- constants.b = b;
72
- constants.f = f;
73
- constants.cosineHeading = cosineHeading;
74
- constants.sineHeading = sineHeading;
75
- constants.tanU = tanU;
76
- constants.cosineU = cosineU;
77
- constants.sineU = sineU;
78
- constants.sigma = sigma;
79
- constants.sineAlpha = sineAlpha;
80
- constants.sineSquaredAlpha = sineSquaredAlpha;
81
- constants.cosineSquaredAlpha = cosineSquaredAlpha;
82
- constants.cosineAlpha = cosineAlpha;
83
- constants.u2Over4 = u2Over4;
84
- constants.u4Over16 = u4Over16;
85
- constants.u6Over64 = u6Over64;
86
- constants.u8Over256 = u8Over256;
87
- constants.a0 = a0;
88
- constants.a1 = a1;
89
- constants.a2 = a2;
90
- constants.a3 = a3;
91
- constants.distanceRatio = distanceRatio;
92
- }
93
- function computeC(f, cosineSquaredAlpha) {
94
- return f * cosineSquaredAlpha * (4 + f * (4 - 3 * cosineSquaredAlpha)) / 16;
95
- }
96
- function computeDeltaLambda(f, sineAlpha, cosineSquaredAlpha, sigma, sineSigma, cosineSigma, cosineTwiceSigmaMidpoint) {
97
- const C = computeC(f, cosineSquaredAlpha);
98
- return (1 - C) * f * sineAlpha * (sigma + C * sineSigma * (cosineTwiceSigmaMidpoint + C * cosineSigma * (2 * cosineTwiceSigmaMidpoint * cosineTwiceSigmaMidpoint - 1)));
99
- }
100
- function vincentyInverseFormula(ellipsoidGeodesic, major, minor, firstLongitude, firstLatitude, secondLongitude, secondLatitude) {
101
- const eff = (major - minor) / major;
102
- const l = secondLongitude - firstLongitude;
103
- const u1 = Math.atan((1 - eff) * Math.tan(firstLatitude));
104
- const u2 = Math.atan((1 - eff) * Math.tan(secondLatitude));
105
- const cosineU1 = Math.cos(u1);
106
- const sineU1 = Math.sin(u1);
107
- const cosineU2 = Math.cos(u2);
108
- const sineU2 = Math.sin(u2);
109
- const cc = cosineU1 * cosineU2;
110
- const cs = cosineU1 * sineU2;
111
- const ss = sineU1 * sineU2;
112
- const sc = sineU1 * cosineU2;
113
- let lambda = l;
114
- let lambdaDot = Math_default.TWO_PI;
115
- let cosineLambda = Math.cos(lambda);
116
- let sineLambda = Math.sin(lambda);
117
- let sigma;
118
- let cosineSigma;
119
- let sineSigma;
120
- let cosineSquaredAlpha;
121
- let cosineTwiceSigmaMidpoint;
122
- do {
123
- cosineLambda = Math.cos(lambda);
124
- sineLambda = Math.sin(lambda);
125
- const temp = cs - sc * cosineLambda;
126
- sineSigma = Math.sqrt(
127
- cosineU2 * cosineU2 * sineLambda * sineLambda + temp * temp
128
- );
129
- cosineSigma = ss + cc * cosineLambda;
130
- sigma = Math.atan2(sineSigma, cosineSigma);
131
- let sineAlpha;
132
- if (sineSigma === 0) {
133
- sineAlpha = 0;
134
- cosineSquaredAlpha = 1;
135
- } else {
136
- sineAlpha = cc * sineLambda / sineSigma;
137
- cosineSquaredAlpha = 1 - sineAlpha * sineAlpha;
138
- }
139
- lambdaDot = lambda;
140
- cosineTwiceSigmaMidpoint = cosineSigma - 2 * ss / cosineSquaredAlpha;
141
- if (!isFinite(cosineTwiceSigmaMidpoint)) {
142
- cosineTwiceSigmaMidpoint = 0;
143
- }
144
- lambda = l + computeDeltaLambda(
145
- eff,
146
- sineAlpha,
147
- cosineSquaredAlpha,
148
- sigma,
149
- sineSigma,
150
- cosineSigma,
151
- cosineTwiceSigmaMidpoint
152
- );
153
- } while (Math.abs(lambda - lambdaDot) > Math_default.EPSILON12);
154
- const uSquared = cosineSquaredAlpha * (major * major - minor * minor) / (minor * minor);
155
- const A = 1 + uSquared * (4096 + uSquared * (uSquared * (320 - 175 * uSquared) - 768)) / 16384;
156
- const B = uSquared * (256 + uSquared * (uSquared * (74 - 47 * uSquared) - 128)) / 1024;
157
- const cosineSquaredTwiceSigmaMidpoint = cosineTwiceSigmaMidpoint * cosineTwiceSigmaMidpoint;
158
- const deltaSigma = B * sineSigma * (cosineTwiceSigmaMidpoint + B * (cosineSigma * (2 * cosineSquaredTwiceSigmaMidpoint - 1) - B * cosineTwiceSigmaMidpoint * (4 * sineSigma * sineSigma - 3) * (4 * cosineSquaredTwiceSigmaMidpoint - 3) / 6) / 4);
159
- const distance = minor * A * (sigma - deltaSigma);
160
- const startHeading = Math.atan2(
161
- cosineU2 * sineLambda,
162
- cs - sc * cosineLambda
163
- );
164
- const endHeading = Math.atan2(cosineU1 * sineLambda, cs * cosineLambda - sc);
165
- ellipsoidGeodesic._distance = distance;
166
- ellipsoidGeodesic._startHeading = startHeading;
167
- ellipsoidGeodesic._endHeading = endHeading;
168
- ellipsoidGeodesic._uSquared = uSquared;
169
- }
170
- var scratchCart1 = new Cartesian3_default();
171
- var scratchCart2 = new Cartesian3_default();
172
- function computeProperties(ellipsoidGeodesic, start, end, ellipsoid) {
173
- const firstCartesian = Cartesian3_default.normalize(
174
- ellipsoid.cartographicToCartesian(start, scratchCart2),
175
- scratchCart1
176
- );
177
- const lastCartesian = Cartesian3_default.normalize(
178
- ellipsoid.cartographicToCartesian(end, scratchCart2),
179
- scratchCart2
180
- );
181
- Check_default.typeOf.number.greaterThanOrEquals(
182
- "value",
183
- Math.abs(
184
- Math.abs(Cartesian3_default.angleBetween(firstCartesian, lastCartesian)) - Math.PI
185
- ),
186
- 0.0125
187
- );
188
- vincentyInverseFormula(
189
- ellipsoidGeodesic,
190
- ellipsoid.maximumRadius,
191
- ellipsoid.minimumRadius,
192
- start.longitude,
193
- start.latitude,
194
- end.longitude,
195
- end.latitude
196
- );
197
- ellipsoidGeodesic._start = Cartographic_default.clone(
198
- start,
199
- ellipsoidGeodesic._start
200
- );
201
- ellipsoidGeodesic._end = Cartographic_default.clone(end, ellipsoidGeodesic._end);
202
- ellipsoidGeodesic._start.height = 0;
203
- ellipsoidGeodesic._end.height = 0;
204
- setConstants(ellipsoidGeodesic);
205
- }
206
- function EllipsoidGeodesic(start, end, ellipsoid) {
207
- const e = defaultValue_default(ellipsoid, Ellipsoid_default.default);
208
- this._ellipsoid = e;
209
- this._start = new Cartographic_default();
210
- this._end = new Cartographic_default();
211
- this._constants = {};
212
- this._startHeading = void 0;
213
- this._endHeading = void 0;
214
- this._distance = void 0;
215
- this._uSquared = void 0;
216
- if (defined_default(start) && defined_default(end)) {
217
- computeProperties(this, start, end, e);
218
- }
219
- }
220
- Object.defineProperties(EllipsoidGeodesic.prototype, {
221
- /**
222
- * Gets the ellipsoid.
223
- * @memberof EllipsoidGeodesic.prototype
224
- * @type {Ellipsoid}
225
- * @readonly
226
- */
227
- ellipsoid: {
228
- get: function() {
229
- return this._ellipsoid;
230
- }
231
- },
232
- /**
233
- * Gets the surface distance between the start and end point
234
- * @memberof EllipsoidGeodesic.prototype
235
- * @type {number}
236
- * @readonly
237
- */
238
- surfaceDistance: {
239
- get: function() {
240
- Check_default.defined("distance", this._distance);
241
- return this._distance;
242
- }
243
- },
244
- /**
245
- * Gets the initial planetodetic point on the path.
246
- * @memberof EllipsoidGeodesic.prototype
247
- * @type {Cartographic}
248
- * @readonly
249
- */
250
- start: {
251
- get: function() {
252
- return this._start;
253
- }
254
- },
255
- /**
256
- * Gets the final planetodetic point on the path.
257
- * @memberof EllipsoidGeodesic.prototype
258
- * @type {Cartographic}
259
- * @readonly
260
- */
261
- end: {
262
- get: function() {
263
- return this._end;
264
- }
265
- },
266
- /**
267
- * Gets the heading at the initial point.
268
- * @memberof EllipsoidGeodesic.prototype
269
- * @type {number}
270
- * @readonly
271
- */
272
- startHeading: {
273
- get: function() {
274
- Check_default.defined("distance", this._distance);
275
- return this._startHeading;
276
- }
277
- },
278
- /**
279
- * Gets the heading at the final point.
280
- * @memberof EllipsoidGeodesic.prototype
281
- * @type {number}
282
- * @readonly
283
- */
284
- endHeading: {
285
- get: function() {
286
- Check_default.defined("distance", this._distance);
287
- return this._endHeading;
288
- }
289
- }
290
- });
291
- EllipsoidGeodesic.prototype.setEndPoints = function(start, end) {
292
- Check_default.defined("start", start);
293
- Check_default.defined("end", end);
294
- computeProperties(this, start, end, this._ellipsoid);
295
- };
296
- EllipsoidGeodesic.prototype.interpolateUsingFraction = function(fraction, result) {
297
- return this.interpolateUsingSurfaceDistance(
298
- this._distance * fraction,
299
- result
300
- );
301
- };
302
- EllipsoidGeodesic.prototype.interpolateUsingSurfaceDistance = function(distance, result) {
303
- Check_default.defined("distance", this._distance);
304
- const constants = this._constants;
305
- const s = constants.distanceRatio + distance / constants.b;
306
- const cosine2S = Math.cos(2 * s);
307
- const cosine4S = Math.cos(4 * s);
308
- const cosine6S = Math.cos(6 * s);
309
- const sine2S = Math.sin(2 * s);
310
- const sine4S = Math.sin(4 * s);
311
- const sine6S = Math.sin(6 * s);
312
- const sine8S = Math.sin(8 * s);
313
- const s2 = s * s;
314
- const s3 = s * s2;
315
- const u8Over256 = constants.u8Over256;
316
- const u2Over4 = constants.u2Over4;
317
- const u6Over64 = constants.u6Over64;
318
- const u4Over16 = constants.u4Over16;
319
- let sigma = 2 * s3 * u8Over256 * cosine2S / 3 + s * (1 - u2Over4 + 7 * u4Over16 / 4 - 15 * u6Over64 / 4 + 579 * u8Over256 / 64 - (u4Over16 - 15 * u6Over64 / 4 + 187 * u8Over256 / 16) * cosine2S - (5 * u6Over64 / 4 - 115 * u8Over256 / 16) * cosine4S - 29 * u8Over256 * cosine6S / 16) + (u2Over4 / 2 - u4Over16 + 71 * u6Over64 / 32 - 85 * u8Over256 / 16) * sine2S + (5 * u4Over16 / 16 - 5 * u6Over64 / 4 + 383 * u8Over256 / 96) * sine4S - s2 * ((u6Over64 - 11 * u8Over256 / 2) * sine2S + 5 * u8Over256 * sine4S / 2) + (29 * u6Over64 / 96 - 29 * u8Over256 / 16) * sine6S + 539 * u8Over256 * sine8S / 1536;
320
- const theta = Math.asin(Math.sin(sigma) * constants.cosineAlpha);
321
- const latitude = Math.atan(constants.a / constants.b * Math.tan(theta));
322
- sigma = sigma - constants.sigma;
323
- const cosineTwiceSigmaMidpoint = Math.cos(2 * constants.sigma + sigma);
324
- const sineSigma = Math.sin(sigma);
325
- const cosineSigma = Math.cos(sigma);
326
- const cc = constants.cosineU * cosineSigma;
327
- const ss = constants.sineU * sineSigma;
328
- const lambda = Math.atan2(
329
- sineSigma * constants.sineHeading,
330
- cc - ss * constants.cosineHeading
331
- );
332
- const l = lambda - computeDeltaLambda(
333
- constants.f,
334
- constants.sineAlpha,
335
- constants.cosineSquaredAlpha,
336
- sigma,
337
- sineSigma,
338
- cosineSigma,
339
- cosineTwiceSigmaMidpoint
340
- );
341
- if (defined_default(result)) {
342
- result.longitude = this._start.longitude + l;
343
- result.latitude = latitude;
344
- result.height = 0;
345
- return result;
346
- }
347
- return new Cartographic_default(this._start.longitude + l, latitude, 0);
348
- };
349
- var EllipsoidGeodesic_default = EllipsoidGeodesic;
350
-
351
- export {
352
- EllipsoidGeodesic_default
353
- };
@@ -1,102 +0,0 @@
1
- /**
2
- * @license
3
- * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.122
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
- Cartesian3_default
28
- } from "./chunk-YFXQECWV.js";
29
- import {
30
- Check_default
31
- } from "./chunk-AD63PIY6.js";
32
- import {
33
- defined_default
34
- } from "./chunk-E63IIM5T.js";
35
-
36
- // packages/engine/Source/Core/EncodedCartesian3.js
37
- function EncodedCartesian3() {
38
- this.high = Cartesian3_default.clone(Cartesian3_default.ZERO);
39
- this.low = Cartesian3_default.clone(Cartesian3_default.ZERO);
40
- }
41
- EncodedCartesian3.encode = function(value, result) {
42
- Check_default.typeOf.number("value", value);
43
- if (!defined_default(result)) {
44
- result = {
45
- high: 0,
46
- low: 0
47
- };
48
- }
49
- let doubleHigh;
50
- if (value >= 0) {
51
- doubleHigh = Math.floor(value / 65536) * 65536;
52
- result.high = doubleHigh;
53
- result.low = value - doubleHigh;
54
- } else {
55
- doubleHigh = Math.floor(-value / 65536) * 65536;
56
- result.high = -doubleHigh;
57
- result.low = value + doubleHigh;
58
- }
59
- return result;
60
- };
61
- var scratchEncode = {
62
- high: 0,
63
- low: 0
64
- };
65
- EncodedCartesian3.fromCartesian = function(cartesian, result) {
66
- Check_default.typeOf.object("cartesian", cartesian);
67
- if (!defined_default(result)) {
68
- result = new EncodedCartesian3();
69
- }
70
- const high = result.high;
71
- const low = result.low;
72
- EncodedCartesian3.encode(cartesian.x, scratchEncode);
73
- high.x = scratchEncode.high;
74
- low.x = scratchEncode.low;
75
- EncodedCartesian3.encode(cartesian.y, scratchEncode);
76
- high.y = scratchEncode.high;
77
- low.y = scratchEncode.low;
78
- EncodedCartesian3.encode(cartesian.z, scratchEncode);
79
- high.z = scratchEncode.high;
80
- low.z = scratchEncode.low;
81
- return result;
82
- };
83
- var encodedP = new EncodedCartesian3();
84
- EncodedCartesian3.writeElements = function(cartesian, cartesianArray, index) {
85
- Check_default.defined("cartesianArray", cartesianArray);
86
- Check_default.typeOf.number("index", index);
87
- Check_default.typeOf.number.greaterThanOrEquals("index", index, 0);
88
- EncodedCartesian3.fromCartesian(cartesian, encodedP);
89
- const high = encodedP.high;
90
- const low = encodedP.low;
91
- cartesianArray[index] = high.x;
92
- cartesianArray[index + 1] = high.y;
93
- cartesianArray[index + 2] = high.z;
94
- cartesianArray[index + 3] = low.x;
95
- cartesianArray[index + 4] = low.y;
96
- cartesianArray[index + 5] = low.z;
97
- };
98
- var EncodedCartesian3_default = EncodedCartesian3;
99
-
100
- export {
101
- EncodedCartesian3_default
102
- };