@gmgis/gm-sdk 1.12.4 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/dist/dist/index.js +1848 -0
  2. package/dist/gm.min.js +6224 -5596
  3. package/dist/index.js +1558 -1438
  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-335F4KMR.js +26 -0
  10. package/dist/resources/Workers/chunk-3FFM6NRK.js +26 -0
  11. package/dist/resources/Workers/chunk-46IDNOB6.js +26 -0
  12. package/dist/resources/Workers/chunk-4QCIHDA2.js +26 -0
  13. package/dist/resources/Workers/chunk-5EZKANRV.js +26 -0
  14. package/dist/resources/Workers/chunk-5GVU4LLW.js +26 -0
  15. package/dist/resources/Workers/chunk-6EFYFFBI.js +26 -0
  16. package/dist/resources/Workers/chunk-72ENFGTU.js +26 -0
  17. package/dist/resources/Workers/{chunk-I2ITFFPX.js → chunk-7IBY6LYM.js} +2 -13
  18. package/dist/resources/Workers/{chunk-PRGYLLJT.js → chunk-7RJW35V3.js} +3 -31
  19. package/dist/resources/Workers/chunk-ABHTLV4B.js +26 -0
  20. package/dist/resources/Workers/{chunk-DI5NGJUP.js → chunk-AHKBUIAX.js} +2 -20
  21. package/dist/resources/Workers/{chunk-7JO7GPJN.js → chunk-AOSK7NDA.js} +2 -15
  22. package/dist/resources/Workers/chunk-ATTMFTQ4.js +26 -0
  23. package/dist/resources/Workers/chunk-BCYX7GBY.js +26 -0
  24. package/dist/resources/Workers/chunk-BDLVVHOG.js +26 -0
  25. package/dist/resources/Workers/chunk-BGQDOF2W.js +26 -0
  26. package/dist/resources/Workers/chunk-BTPJ3H6N.js +26 -0
  27. package/dist/resources/Workers/chunk-DGGIK7AD.js +66 -0
  28. package/dist/resources/Workers/chunk-DSXZVGY7.js +26 -0
  29. package/dist/resources/Workers/chunk-F7XR2IV5.js +26 -0
  30. package/dist/resources/Workers/chunk-FCVV6A2F.js +28 -0
  31. package/dist/resources/Workers/chunk-GBI3IATP.js +26 -0
  32. package/dist/resources/Workers/{chunk-6CHGCNMW.js → chunk-GRCPCORO.js} +4 -34
  33. package/dist/resources/Workers/chunk-HLFNWOQ4.js +26 -0
  34. package/dist/resources/Workers/chunk-HMV6ETSJ.js +26 -0
  35. package/dist/resources/Workers/chunk-I3XHKING.js +26 -0
  36. package/dist/resources/Workers/chunk-I7WJS3WM.js +26 -0
  37. package/dist/resources/Workers/chunk-JOXXXMPE.js +26 -0
  38. package/dist/resources/Workers/chunk-JU23HGY3.js +26 -0
  39. package/dist/resources/Workers/chunk-KORWG3CG.js +26 -0
  40. package/dist/resources/Workers/chunk-KTDI3TD2.js +26 -0
  41. package/dist/resources/Workers/chunk-LIEFEM73.js +26 -0
  42. package/dist/resources/Workers/chunk-LNFOIPBT.js +26 -0
  43. package/dist/resources/Workers/chunk-N6G72L23.js +26 -0
  44. package/dist/resources/Workers/chunk-NU4XOT2V.js +26 -0
  45. package/dist/resources/Workers/chunk-PO64KPKA.js +26 -0
  46. package/dist/resources/Workers/chunk-PQSWZ6QE.js +26 -0
  47. package/dist/resources/Workers/chunk-QGPFMASY.js +26 -0
  48. package/dist/resources/Workers/chunk-QJG5NRTN.js +26 -0
  49. package/dist/resources/Workers/chunk-R3KD5ZAI.js +27 -0
  50. package/dist/resources/Workers/chunk-RQ3X5FSK.js +26 -0
  51. package/dist/resources/Workers/chunk-SNN6UCXM.js +26 -0
  52. package/dist/resources/Workers/chunk-SPVHGWGM.js +26 -0
  53. package/dist/resources/Workers/chunk-SRJEQ4WA.js +26 -0
  54. package/dist/resources/Workers/chunk-VMOPYKP4.js +26 -0
  55. package/dist/resources/Workers/chunk-WNAZRVVU.js +26 -0
  56. package/dist/resources/Workers/chunk-WQBKKXJC.js +26 -0
  57. package/dist/resources/Workers/chunk-Y53SIX6D.js +26 -0
  58. package/dist/resources/Workers/chunk-YC4EEWUJ.js +26 -0
  59. package/dist/resources/Workers/chunk-YDUNCXSU.js +26 -0
  60. package/dist/resources/Workers/chunk-YL47XCQ4.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,287 +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
- AxisAlignedBoundingBox_default
28
- } from "./chunk-S6MRMMQU.js";
29
- import {
30
- IntersectionTests_default,
31
- Ray_default
32
- } from "./chunk-3Q2L65QU.js";
33
- import {
34
- Plane_default
35
- } from "./chunk-2ZGOQXYU.js";
36
- import {
37
- Cartesian4_default,
38
- Matrix4_default,
39
- Transforms_default
40
- } from "./chunk-5PTXS2GO.js";
41
- import {
42
- Cartesian2_default,
43
- Cartesian3_default,
44
- Ellipsoid_default
45
- } from "./chunk-YFXQECWV.js";
46
- import {
47
- defaultValue_default
48
- } from "./chunk-7JO7GPJN.js";
49
- import {
50
- Check_default,
51
- DeveloperError_default
52
- } from "./chunk-AD63PIY6.js";
53
- import {
54
- defined_default
55
- } from "./chunk-E63IIM5T.js";
56
-
57
- // packages/engine/Source/Core/EllipsoidTangentPlane.js
58
- var scratchCart4 = new Cartesian4_default();
59
- function EllipsoidTangentPlane(origin, ellipsoid) {
60
- Check_default.defined("origin", origin);
61
- ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.default);
62
- origin = ellipsoid.scaleToGeodeticSurface(origin);
63
- if (!defined_default(origin)) {
64
- throw new DeveloperError_default(
65
- "origin must not be at the center of the ellipsoid."
66
- );
67
- }
68
- const eastNorthUp = Transforms_default.eastNorthUpToFixedFrame(origin, ellipsoid);
69
- this._ellipsoid = ellipsoid;
70
- this._origin = origin;
71
- this._xAxis = Cartesian3_default.fromCartesian4(
72
- Matrix4_default.getColumn(eastNorthUp, 0, scratchCart4)
73
- );
74
- this._yAxis = Cartesian3_default.fromCartesian4(
75
- Matrix4_default.getColumn(eastNorthUp, 1, scratchCart4)
76
- );
77
- const normal = Cartesian3_default.fromCartesian4(
78
- Matrix4_default.getColumn(eastNorthUp, 2, scratchCart4)
79
- );
80
- this._plane = Plane_default.fromPointNormal(origin, normal);
81
- }
82
- Object.defineProperties(EllipsoidTangentPlane.prototype, {
83
- /**
84
- * Gets the ellipsoid.
85
- * @memberof EllipsoidTangentPlane.prototype
86
- * @type {Ellipsoid}
87
- */
88
- ellipsoid: {
89
- get: function() {
90
- return this._ellipsoid;
91
- }
92
- },
93
- /**
94
- * Gets the origin.
95
- * @memberof EllipsoidTangentPlane.prototype
96
- * @type {Cartesian3}
97
- */
98
- origin: {
99
- get: function() {
100
- return this._origin;
101
- }
102
- },
103
- /**
104
- * Gets the plane which is tangent to the ellipsoid.
105
- * @memberof EllipsoidTangentPlane.prototype
106
- * @readonly
107
- * @type {Plane}
108
- */
109
- plane: {
110
- get: function() {
111
- return this._plane;
112
- }
113
- },
114
- /**
115
- * Gets the local X-axis (east) of the tangent plane.
116
- * @memberof EllipsoidTangentPlane.prototype
117
- * @readonly
118
- * @type {Cartesian3}
119
- */
120
- xAxis: {
121
- get: function() {
122
- return this._xAxis;
123
- }
124
- },
125
- /**
126
- * Gets the local Y-axis (north) of the tangent plane.
127
- * @memberof EllipsoidTangentPlane.prototype
128
- * @readonly
129
- * @type {Cartesian3}
130
- */
131
- yAxis: {
132
- get: function() {
133
- return this._yAxis;
134
- }
135
- },
136
- /**
137
- * Gets the local Z-axis (up) of the tangent plane.
138
- * @memberof EllipsoidTangentPlane.prototype
139
- * @readonly
140
- * @type {Cartesian3}
141
- */
142
- zAxis: {
143
- get: function() {
144
- return this._plane.normal;
145
- }
146
- }
147
- });
148
- var tmp = new AxisAlignedBoundingBox_default();
149
- EllipsoidTangentPlane.fromPoints = function(cartesians, ellipsoid) {
150
- Check_default.defined("cartesians", cartesians);
151
- const box = AxisAlignedBoundingBox_default.fromPoints(cartesians, tmp);
152
- return new EllipsoidTangentPlane(box.center, ellipsoid);
153
- };
154
- var scratchProjectPointOntoPlaneRay = new Ray_default();
155
- var scratchProjectPointOntoPlaneCartesian3 = new Cartesian3_default();
156
- EllipsoidTangentPlane.prototype.projectPointOntoPlane = function(cartesian, result) {
157
- Check_default.defined("cartesian", cartesian);
158
- const ray = scratchProjectPointOntoPlaneRay;
159
- ray.origin = cartesian;
160
- Cartesian3_default.normalize(cartesian, ray.direction);
161
- let intersectionPoint = IntersectionTests_default.rayPlane(
162
- ray,
163
- this._plane,
164
- scratchProjectPointOntoPlaneCartesian3
165
- );
166
- if (!defined_default(intersectionPoint)) {
167
- Cartesian3_default.negate(ray.direction, ray.direction);
168
- intersectionPoint = IntersectionTests_default.rayPlane(
169
- ray,
170
- this._plane,
171
- scratchProjectPointOntoPlaneCartesian3
172
- );
173
- }
174
- if (defined_default(intersectionPoint)) {
175
- const v = Cartesian3_default.subtract(
176
- intersectionPoint,
177
- this._origin,
178
- intersectionPoint
179
- );
180
- const x = Cartesian3_default.dot(this._xAxis, v);
181
- const y = Cartesian3_default.dot(this._yAxis, v);
182
- if (!defined_default(result)) {
183
- return new Cartesian2_default(x, y);
184
- }
185
- result.x = x;
186
- result.y = y;
187
- return result;
188
- }
189
- return void 0;
190
- };
191
- EllipsoidTangentPlane.prototype.projectPointsOntoPlane = function(cartesians, result) {
192
- Check_default.defined("cartesians", cartesians);
193
- if (!defined_default(result)) {
194
- result = [];
195
- }
196
- let count = 0;
197
- const length = cartesians.length;
198
- for (let i = 0; i < length; i++) {
199
- const p = this.projectPointOntoPlane(cartesians[i], result[count]);
200
- if (defined_default(p)) {
201
- result[count] = p;
202
- count++;
203
- }
204
- }
205
- result.length = count;
206
- return result;
207
- };
208
- EllipsoidTangentPlane.prototype.projectPointToNearestOnPlane = function(cartesian, result) {
209
- Check_default.defined("cartesian", cartesian);
210
- if (!defined_default(result)) {
211
- result = new Cartesian2_default();
212
- }
213
- const ray = scratchProjectPointOntoPlaneRay;
214
- ray.origin = cartesian;
215
- Cartesian3_default.clone(this._plane.normal, ray.direction);
216
- let intersectionPoint = IntersectionTests_default.rayPlane(
217
- ray,
218
- this._plane,
219
- scratchProjectPointOntoPlaneCartesian3
220
- );
221
- if (!defined_default(intersectionPoint)) {
222
- Cartesian3_default.negate(ray.direction, ray.direction);
223
- intersectionPoint = IntersectionTests_default.rayPlane(
224
- ray,
225
- this._plane,
226
- scratchProjectPointOntoPlaneCartesian3
227
- );
228
- }
229
- const v = Cartesian3_default.subtract(
230
- intersectionPoint,
231
- this._origin,
232
- intersectionPoint
233
- );
234
- const x = Cartesian3_default.dot(this._xAxis, v);
235
- const y = Cartesian3_default.dot(this._yAxis, v);
236
- result.x = x;
237
- result.y = y;
238
- return result;
239
- };
240
- EllipsoidTangentPlane.prototype.projectPointsToNearestOnPlane = function(cartesians, result) {
241
- Check_default.defined("cartesians", cartesians);
242
- if (!defined_default(result)) {
243
- result = [];
244
- }
245
- const length = cartesians.length;
246
- result.length = length;
247
- for (let i = 0; i < length; i++) {
248
- result[i] = this.projectPointToNearestOnPlane(cartesians[i], result[i]);
249
- }
250
- return result;
251
- };
252
- var projectPointsOntoEllipsoidScratch = new Cartesian3_default();
253
- EllipsoidTangentPlane.prototype.projectPointOntoEllipsoid = function(cartesian, result) {
254
- Check_default.defined("cartesian", cartesian);
255
- if (!defined_default(result)) {
256
- result = new Cartesian3_default();
257
- }
258
- const ellipsoid = this._ellipsoid;
259
- const origin = this._origin;
260
- const xAxis = this._xAxis;
261
- const yAxis = this._yAxis;
262
- const tmp2 = projectPointsOntoEllipsoidScratch;
263
- Cartesian3_default.multiplyByScalar(xAxis, cartesian.x, tmp2);
264
- result = Cartesian3_default.add(origin, tmp2, result);
265
- Cartesian3_default.multiplyByScalar(yAxis, cartesian.y, tmp2);
266
- Cartesian3_default.add(result, tmp2, result);
267
- ellipsoid.scaleToGeocentricSurface(result, result);
268
- return result;
269
- };
270
- EllipsoidTangentPlane.prototype.projectPointsOntoEllipsoid = function(cartesians, result) {
271
- Check_default.defined("cartesians", cartesians);
272
- const length = cartesians.length;
273
- if (!defined_default(result)) {
274
- result = new Array(length);
275
- } else {
276
- result.length = length;
277
- }
278
- for (let i = 0; i < length; ++i) {
279
- result[i] = this.projectPointOntoEllipsoid(cartesians[i], result[i]);
280
- }
281
- return result;
282
- };
283
- var EllipsoidTangentPlane_default = EllipsoidTangentPlane;
284
-
285
- export {
286
- EllipsoidTangentPlane_default
287
- };
@@ -1,73 +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
- Math_default
28
- } from "./chunk-XY4BATBS.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
- };
@@ -1,115 +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
- DeveloperError_default
39
- } from "./chunk-AD63PIY6.js";
40
- import {
41
- defined_default
42
- } from "./chunk-E63IIM5T.js";
43
-
44
- // packages/engine/Source/Core/WebMercatorProjection.js
45
- function WebMercatorProjection(ellipsoid) {
46
- this._ellipsoid = defaultValue_default(ellipsoid, Ellipsoid_default.WGS84);
47
- this._semimajorAxis = this._ellipsoid.maximumRadius;
48
- this._oneOverSemimajorAxis = 1 / this._semimajorAxis;
49
- }
50
- Object.defineProperties(WebMercatorProjection.prototype, {
51
- /**
52
- * Gets the {@link Ellipsoid}.
53
- *
54
- * @memberof WebMercatorProjection.prototype
55
- *
56
- * @type {Ellipsoid}
57
- * @readonly
58
- */
59
- ellipsoid: {
60
- get: function() {
61
- return this._ellipsoid;
62
- }
63
- }
64
- });
65
- WebMercatorProjection.mercatorAngleToGeodeticLatitude = function(mercatorAngle) {
66
- return Math_default.PI_OVER_TWO - 2 * Math.atan(Math.exp(-mercatorAngle));
67
- };
68
- WebMercatorProjection.geodeticLatitudeToMercatorAngle = function(latitude) {
69
- if (latitude > WebMercatorProjection.MaximumLatitude) {
70
- latitude = WebMercatorProjection.MaximumLatitude;
71
- } else if (latitude < -WebMercatorProjection.MaximumLatitude) {
72
- latitude = -WebMercatorProjection.MaximumLatitude;
73
- }
74
- const sinLatitude = Math.sin(latitude);
75
- return 0.5 * Math.log((1 + sinLatitude) / (1 - sinLatitude));
76
- };
77
- WebMercatorProjection.MaximumLatitude = WebMercatorProjection.mercatorAngleToGeodeticLatitude(Math.PI);
78
- WebMercatorProjection.prototype.project = function(cartographic, result) {
79
- const semimajorAxis = this._semimajorAxis;
80
- const x = cartographic.longitude * semimajorAxis;
81
- const y = WebMercatorProjection.geodeticLatitudeToMercatorAngle(
82
- cartographic.latitude
83
- ) * semimajorAxis;
84
- const z = cartographic.height;
85
- if (!defined_default(result)) {
86
- return new Cartesian3_default(x, y, z);
87
- }
88
- result.x = x;
89
- result.y = y;
90
- result.z = z;
91
- return result;
92
- };
93
- WebMercatorProjection.prototype.unproject = function(cartesian, result) {
94
- if (!defined_default(cartesian)) {
95
- throw new DeveloperError_default("cartesian is required");
96
- }
97
- const oneOverEarthSemimajorAxis = this._oneOverSemimajorAxis;
98
- const longitude = cartesian.x * oneOverEarthSemimajorAxis;
99
- const latitude = WebMercatorProjection.mercatorAngleToGeodeticLatitude(
100
- cartesian.y * oneOverEarthSemimajorAxis
101
- );
102
- const height = cartesian.z;
103
- if (!defined_default(result)) {
104
- return new Cartographic_default(longitude, latitude, height);
105
- }
106
- result.longitude = longitude;
107
- result.latitude = latitude;
108
- result.height = height;
109
- return result;
110
- };
111
- var WebMercatorProjection_default = WebMercatorProjection;
112
-
113
- export {
114
- WebMercatorProjection_default
115
- };
@@ -1,75 +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
- 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 __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
33
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
34
- }) : x)(function(x) {
35
- if (typeof require !== "undefined") return require.apply(this, arguments);
36
- throw Error('Dynamic require of "' + x + '" is not supported');
37
- });
38
- var __glob = (map) => (path) => {
39
- var fn = map[path];
40
- if (fn) return fn();
41
- throw new Error("Module not found in bundle: " + path);
42
- };
43
- var __commonJS = (cb, mod) => function __require2() {
44
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
45
- };
46
- var __copyProps = (to, from, except, desc) => {
47
- if (from && typeof from === "object" || typeof from === "function") {
48
- for (let key of __getOwnPropNames(from))
49
- if (!__hasOwnProp.call(to, key) && key !== except)
50
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
51
- }
52
- return to;
53
- };
54
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
55
- // If the importer is in node compatibility mode or this is not an ESM
56
- // file that has been converted to a CommonJS file using a Babel-
57
- // compatible transform (i.e. "__esModule" has not been set), then set
58
- // "default" to the CommonJS "module.exports" for node compatibility.
59
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
60
- mod
61
- ));
62
-
63
- // packages/engine/Source/Core/defined.js
64
- function defined(value) {
65
- return value !== void 0 && value !== null;
66
- }
67
- var defined_default = defined;
68
-
69
- export {
70
- __require,
71
- __glob,
72
- __commonJS,
73
- __toESM,
74
- defined_default
75
- };