deeptwins-cesium-engine 0.0.39 → 0.0.40

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 (104) hide show
  1. package/Build/Workers/chunk-22YARAUJ.js +629 -0
  2. package/Build/Workers/chunk-2HVM4MOI.js +220 -0
  3. package/Build/Workers/chunk-2PWEYBYR.js +75 -0
  4. package/Build/Workers/chunk-2ZI2BRKI.js +37 -0
  5. package/Build/Workers/chunk-3Q6HPHTH.js +684 -0
  6. package/Build/Workers/chunk-4LE3SGQH.js +634 -0
  7. package/Build/Workers/chunk-5IBSBFAA.js +287 -0
  8. package/Build/Workers/chunk-5ZELPLWF.js +58 -0
  9. package/Build/Workers/chunk-73EDFMPB.js +1073 -0
  10. package/Build/Workers/chunk-ALIDMMNJ.js +10357 -0
  11. package/Build/Workers/chunk-AXTXYHVG.js +59 -0
  12. package/Build/Workers/chunk-B3DSUDQQ.js +101 -0
  13. package/Build/Workers/chunk-B7R4KLQV.js +959 -0
  14. package/Build/Workers/chunk-CET7MMFD.js +1055 -0
  15. package/Build/Workers/chunk-DGWWFN6L.js +102 -0
  16. package/Build/Workers/chunk-DPZEBUVY.js +122 -0
  17. package/Build/Workers/chunk-EKUYACAZ.js +163 -0
  18. package/Build/Workers/chunk-ETQJFLBY.js +435 -0
  19. package/Build/Workers/chunk-HDJDQBU6.js +758 -0
  20. package/Build/Workers/chunk-HOO3H5M5.js +171 -0
  21. package/Build/Workers/chunk-JRFRSSGD.js +1800 -0
  22. package/Build/Workers/chunk-KMDXAR34.js +1481 -0
  23. package/Build/Workers/chunk-KZDZFG2L.js +157 -0
  24. package/Build/Workers/chunk-LDXSEGOX.js +2857 -0
  25. package/Build/Workers/chunk-LYJFG66W.js +196 -0
  26. package/Build/Workers/chunk-N2UJHZ4W.js +368 -0
  27. package/Build/Workers/chunk-NZU4VBYI.js +834 -0
  28. package/Build/Workers/chunk-OY2Z6SFD.js +100 -0
  29. package/Build/Workers/chunk-PA4JZFFM.js +353 -0
  30. package/Build/Workers/chunk-QUJ6BNQF.js +39 -0
  31. package/Build/Workers/chunk-ROPEB47Y.js +300 -0
  32. package/Build/Workers/chunk-S3RIIJID.js +781 -0
  33. package/Build/Workers/chunk-SPS2I45W.js +73 -0
  34. package/Build/Workers/chunk-TBJBVKDE.js +262 -0
  35. package/Build/Workers/chunk-TJAONFQM.js +44 -0
  36. package/Build/Workers/chunk-TJNJ6CLS.js +239 -0
  37. package/Build/Workers/chunk-U4SUBL6L.js +390 -0
  38. package/Build/Workers/chunk-U6RITS73.js +456 -0
  39. package/Build/Workers/chunk-UHPBZJQF.js +2717 -0
  40. package/Build/Workers/chunk-UHS2YM44.js +115 -0
  41. package/Build/Workers/chunk-UN3RMNI2.js +500 -0
  42. package/Build/Workers/chunk-UYS2HZVM.js +421 -0
  43. package/Build/Workers/chunk-VSEDVQN7.js +305 -0
  44. package/Build/Workers/chunk-W7KOAHR2.js +691 -0
  45. package/Build/Workers/chunk-WGHS4HMU.js +55 -0
  46. package/Build/Workers/chunk-XV4SYFDP.js +138 -0
  47. package/Build/Workers/chunk-XX7RETEX.js +1258 -0
  48. package/Build/Workers/chunk-XYMJZUFF.js +476 -0
  49. package/Build/Workers/chunk-YCU6WHSN.js +963 -0
  50. package/Build/Workers/chunk-YWEX5QFW.js +398 -0
  51. package/Build/Workers/chunk-Z2WOKKJM.js +511 -0
  52. package/Build/Workers/chunk-ZYUOPFWQ.js +139 -0
  53. package/Build/Workers/combineGeometry.js +22 -22
  54. package/Build/Workers/createBoxGeometry.js +16 -16
  55. package/Build/Workers/createBoxOutlineGeometry.js +14 -14
  56. package/Build/Workers/createCircleGeometry.js +24 -24
  57. package/Build/Workers/createCircleOutlineGeometry.js +17 -17
  58. package/Build/Workers/createCoplanarPolygonGeometry.js +31 -31
  59. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +29 -29
  60. package/Build/Workers/createCorridorGeometry.js +27 -27
  61. package/Build/Workers/createCorridorOutlineGeometry.js +26 -26
  62. package/Build/Workers/createCylinderGeometry.js +18 -18
  63. package/Build/Workers/createCylinderOutlineGeometry.js +16 -16
  64. package/Build/Workers/createEllipseGeometry.js +24 -24
  65. package/Build/Workers/createEllipseOutlineGeometry.js +17 -17
  66. package/Build/Workers/createEllipsoidGeometry.js +17 -17
  67. package/Build/Workers/createEllipsoidOutlineGeometry.js +16 -16
  68. package/Build/Workers/createFrustumGeometry.js +16 -16
  69. package/Build/Workers/createFrustumOutlineGeometry.js +16 -16
  70. package/Build/Workers/createGeometry.js +22 -22
  71. package/Build/Workers/createGroundPolylineGeometry.js +20 -20
  72. package/Build/Workers/createPlaneGeometry.js +14 -14
  73. package/Build/Workers/createPlaneOutlineGeometry.js +13 -13
  74. package/Build/Workers/createPolygonGeometry.js +30 -30
  75. package/Build/Workers/createPolygonOutlineGeometry.js +28 -28
  76. package/Build/Workers/createPolylineGeometry.js +23 -23
  77. package/Build/Workers/createPolylineVolumeGeometry.js +29 -29
  78. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +25 -25
  79. package/Build/Workers/createRectangleGeometry.js +25 -25
  80. package/Build/Workers/createRectangleOutlineGeometry.js +18 -18
  81. package/Build/Workers/createSimplePolylineGeometry.js +21 -21
  82. package/Build/Workers/createSphereGeometry.js +17 -17
  83. package/Build/Workers/createSphereOutlineGeometry.js +16 -16
  84. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  85. package/Build/Workers/createVectorTileClampedPolylines.js +13 -13
  86. package/Build/Workers/createVectorTileGeometries.js +22 -22
  87. package/Build/Workers/createVectorTilePoints.js +12 -12
  88. package/Build/Workers/createVectorTilePolygons.js +20 -20
  89. package/Build/Workers/createVectorTilePolylines.js +13 -13
  90. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +20 -20
  91. package/Build/Workers/createVerticesFromHeightmap.js +20 -20
  92. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +17 -17
  93. package/Build/Workers/createWallGeometry.js +22 -22
  94. package/Build/Workers/createWallOutlineGeometry.js +21 -21
  95. package/Build/Workers/decodeDraco.js +11 -11
  96. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
  97. package/Build/Workers/decodeI3S.js +10 -10
  98. package/Build/Workers/transcodeKTX2.js +7 -7
  99. package/Build/Workers/transferTypedArrayTest.js +1 -1
  100. package/Build/Workers/upsampleQuantizedTerrainMesh.js +20 -20
  101. package/Source/Scene/Billboard.js +22 -0
  102. package/Source/Scene/BillboardTexture.js +92 -2
  103. package/index.js +97 -97
  104. package/package.json +1 -1
@@ -0,0 +1,100 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.0.39
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-UN3RMNI2.js";
29
+ import {
30
+ defaultValue_default
31
+ } from "./chunk-QUJ6BNQF.js";
32
+ import {
33
+ Check_default
34
+ } from "./chunk-EKUYACAZ.js";
35
+ import {
36
+ defined_default
37
+ } from "./chunk-2PWEYBYR.js";
38
+
39
+ // packages/engine/Source/Core/arrayRemoveDuplicates.js
40
+ var removeDuplicatesEpsilon = Math_default.EPSILON10;
41
+ function arrayRemoveDuplicates(values, equalsEpsilon, wrapAround, removedIndices) {
42
+ Check_default.defined("equalsEpsilon", equalsEpsilon);
43
+ if (!defined_default(values)) {
44
+ return void 0;
45
+ }
46
+ wrapAround = defaultValue_default(wrapAround, false);
47
+ const storeRemovedIndices = defined_default(removedIndices);
48
+ const length = values.length;
49
+ if (length < 2) {
50
+ return values;
51
+ }
52
+ let i;
53
+ let v0 = values[0];
54
+ let v1;
55
+ let cleanedValues;
56
+ let lastCleanIndex = 0;
57
+ let removedIndexLCI = -1;
58
+ for (i = 1; i < length; ++i) {
59
+ v1 = values[i];
60
+ if (equalsEpsilon(v0, v1, removeDuplicatesEpsilon)) {
61
+ if (!defined_default(cleanedValues)) {
62
+ cleanedValues = values.slice(0, i);
63
+ lastCleanIndex = i - 1;
64
+ removedIndexLCI = 0;
65
+ }
66
+ if (storeRemovedIndices) {
67
+ removedIndices.push(i);
68
+ }
69
+ } else {
70
+ if (defined_default(cleanedValues)) {
71
+ cleanedValues.push(v1);
72
+ lastCleanIndex = i;
73
+ if (storeRemovedIndices) {
74
+ removedIndexLCI = removedIndices.length;
75
+ }
76
+ }
77
+ v0 = v1;
78
+ }
79
+ }
80
+ if (wrapAround && equalsEpsilon(values[0], values[length - 1], removeDuplicatesEpsilon)) {
81
+ if (storeRemovedIndices) {
82
+ if (defined_default(cleanedValues)) {
83
+ removedIndices.splice(removedIndexLCI, 0, lastCleanIndex);
84
+ } else {
85
+ removedIndices.push(length - 1);
86
+ }
87
+ }
88
+ if (defined_default(cleanedValues)) {
89
+ cleanedValues.length -= 1;
90
+ } else {
91
+ cleanedValues = values.slice(0, -1);
92
+ }
93
+ }
94
+ return defined_default(cleanedValues) ? cleanedValues : values;
95
+ }
96
+ var arrayRemoveDuplicates_default = arrayRemoveDuplicates;
97
+
98
+ export {
99
+ arrayRemoveDuplicates_default
100
+ };
@@ -0,0 +1,353 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.0.39
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-LDXSEGOX.js";
31
+ import {
32
+ Math_default
33
+ } from "./chunk-UN3RMNI2.js";
34
+ import {
35
+ defaultValue_default
36
+ } from "./chunk-QUJ6BNQF.js";
37
+ import {
38
+ Check_default
39
+ } from "./chunk-EKUYACAZ.js";
40
+ import {
41
+ defined_default
42
+ } from "./chunk-2PWEYBYR.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
+ };
@@ -0,0 +1,39 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.0.39
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
+
27
+ // packages/engine/Source/Core/defaultValue.js
28
+ function defaultValue(a, b) {
29
+ if (a !== void 0 && a !== null) {
30
+ return a;
31
+ }
32
+ return b;
33
+ }
34
+ defaultValue.EMPTY_OBJECT = Object.freeze({});
35
+ var defaultValue_default = defaultValue;
36
+
37
+ export {
38
+ defaultValue_default
39
+ };