@pggis/pg-sdk 3.3.10 → 4.3.3

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 (163) hide show
  1. package/README.md +8 -8
  2. package/dist/index.js +1966 -4
  3. package/dist/pggis.min.css +1 -1
  4. package/dist/pggis.min.js +10980 -7539
  5. package/dist/resources/ThirdParty/Workers/pako_deflate.min.js +1 -2
  6. package/dist/resources/ThirdParty/Workers/pako_inflate.min.js +1 -2
  7. package/dist/resources/ThirdParty/Workers/z-worker-pako.js +1 -1
  8. package/dist/resources/ThirdParty/google-earth-dbroot-parser.js +1 -8337
  9. package/dist/resources/ThirdParty/wasm_splats_bg.wasm +0 -0
  10. package/dist/resources/Workers/chunk-35SHYARM.js +26 -0
  11. package/dist/resources/Workers/chunk-37F5JSTI.js +26 -0
  12. package/dist/resources/Workers/chunk-3SSKC3VN.js +26 -0
  13. package/dist/resources/Workers/chunk-3W4GT7KQ.js +26 -0
  14. package/dist/resources/Workers/chunk-4IW2T6GF.js +26 -0
  15. package/dist/resources/Workers/chunk-5YEWO3HT.js +26 -0
  16. package/dist/resources/Workers/chunk-64RSHJUE.js +28 -0
  17. package/dist/resources/Workers/chunk-77IHZJJ3.js +26 -0
  18. package/dist/resources/Workers/chunk-7HTKERZY.js +26 -0
  19. package/dist/resources/Workers/{chunk-F3YA3Y2Z.js → chunk-A56XVLQR.js} +2 -13
  20. package/dist/resources/Workers/chunk-AJYK4IVJ.js +26 -0
  21. package/dist/resources/Workers/{chunk-EHWHNOEX.js → chunk-ARG42DC4.js} +2 -31
  22. package/dist/resources/Workers/chunk-AU7IKHOH.js +26 -0
  23. package/dist/resources/Workers/chunk-B4AA3ARO.js +26 -0
  24. package/dist/resources/Workers/chunk-CNCV5UL7.js +26 -0
  25. package/dist/resources/Workers/chunk-CYCB63OH.js +26 -0
  26. package/dist/resources/Workers/{chunk-4H7PY4U5.js → chunk-D6AA5QVT.js} +2 -20
  27. package/dist/resources/Workers/chunk-D6C66QON.js +26 -0
  28. package/dist/resources/Workers/chunk-DEPHB2WM.js +26 -0
  29. package/dist/resources/Workers/chunk-DMEY62ID.js +26 -0
  30. package/dist/resources/Workers/chunk-DQQ63PYM.js +26 -0
  31. package/dist/resources/Workers/chunk-ED5JPB3S.js +27 -0
  32. package/dist/resources/Workers/chunk-EZUYS2JF.js +26 -0
  33. package/dist/resources/Workers/chunk-FEVXJ54I.js +26 -0
  34. package/dist/resources/Workers/chunk-G5AGHVVC.js +26 -0
  35. package/dist/resources/Workers/{chunk-BBWDMCVU.js → chunk-GBYLG25F.js} +2 -15
  36. package/dist/resources/Workers/chunk-GILIDQNQ.js +26 -0
  37. package/dist/resources/Workers/chunk-HMIYSTF6.js +26 -0
  38. package/dist/resources/Workers/chunk-HTFSEEMT.js +26 -0
  39. package/dist/resources/Workers/chunk-HWXX4CWK.js +26 -0
  40. package/dist/resources/Workers/chunk-IYTZ52EY.js +26 -0
  41. package/dist/resources/Workers/chunk-J6UP6FLE.js +26 -0
  42. package/dist/resources/Workers/chunk-LEYMRMBK.js +27 -0
  43. package/dist/resources/Workers/chunk-M3MGYQSL.js +26 -0
  44. package/dist/resources/Workers/chunk-N4VJKXZS.js +26 -0
  45. package/dist/resources/Workers/chunk-NB3ML6JO.js +26 -0
  46. package/dist/resources/Workers/chunk-OFUUQVMR.js +26 -0
  47. package/dist/resources/Workers/chunk-OSW76XDF.js +26 -0
  48. package/dist/resources/Workers/chunk-PSPPBZWI.js +66 -0
  49. package/dist/resources/Workers/chunk-QN3VOORQ.js +26 -0
  50. package/dist/resources/Workers/chunk-QOUAJ6TL.js +26 -0
  51. package/dist/resources/Workers/chunk-RCV6KWXS.js +26 -0
  52. package/dist/resources/Workers/chunk-TCGIRNHN.js +26 -0
  53. package/dist/resources/Workers/chunk-U4IEOH5K.js +26 -0
  54. package/dist/resources/Workers/chunk-UP6I5URU.js +26 -0
  55. package/dist/resources/Workers/chunk-VTAIKJXX.js +26 -0
  56. package/dist/resources/Workers/chunk-VTBDSFTG.js +26 -0
  57. package/dist/resources/Workers/chunk-VW6VD53G.js +26 -0
  58. package/dist/resources/Workers/chunk-WGGIH7QW.js +26 -0
  59. package/dist/resources/Workers/chunk-WWA5PL4H.js +26 -0
  60. package/dist/resources/Workers/chunk-WZDE3RYP.js +28 -0
  61. package/dist/resources/Workers/chunk-XRL4AVS5.js +26 -0
  62. package/dist/resources/Workers/combineGeometry.js +2 -44
  63. package/dist/resources/Workers/createBoxGeometry.js +2 -34
  64. package/dist/resources/Workers/createBoxOutlineGeometry.js +2 -211
  65. package/dist/resources/Workers/createCircleGeometry.js +2 -173
  66. package/dist/resources/Workers/createCircleOutlineGeometry.js +2 -123
  67. package/dist/resources/Workers/createCoplanarPolygonGeometry.js +2 -482
  68. package/dist/resources/Workers/createCoplanarPolygonOutlineGeometry.js +2 -201
  69. package/dist/resources/Workers/createCorridorGeometry.js +2 -1239
  70. package/dist/resources/Workers/createCorridorOutlineGeometry.js +2 -544
  71. package/dist/resources/Workers/createCylinderGeometry.js +2 -36
  72. package/dist/resources/Workers/createCylinderOutlineGeometry.js +2 -207
  73. package/dist/resources/Workers/createEllipseGeometry.js +2 -47
  74. package/dist/resources/Workers/createEllipseOutlineGeometry.js +2 -40
  75. package/dist/resources/Workers/createEllipsoidGeometry.js +2 -35
  76. package/dist/resources/Workers/createEllipsoidOutlineGeometry.js +2 -37
  77. package/dist/resources/Workers/createFrustumGeometry.js +2 -34
  78. package/dist/resources/Workers/createFrustumOutlineGeometry.js +2 -211
  79. package/dist/resources/Workers/createGeometry.js +2 -147
  80. package/dist/resources/Workers/createGroundPolylineGeometry.js +2 -1584
  81. package/dist/resources/Workers/createPlaneGeometry.js +2 -200
  82. package/dist/resources/Workers/createPlaneOutlineGeometry.js +2 -100
  83. package/dist/resources/Workers/createPolygonGeometry.js +2 -1387
  84. package/dist/resources/Workers/createPolygonOutlineGeometry.js +2 -519
  85. package/dist/resources/Workers/createPolylineGeometry.js +2 -472
  86. package/dist/resources/Workers/createPolylineVolumeGeometry.js +2 -355
  87. package/dist/resources/Workers/createPolylineVolumeOutlineGeometry.js +2 -253
  88. package/dist/resources/Workers/createRectangleGeometry.js +2 -1250
  89. package/dist/resources/Workers/createRectangleOutlineGeometry.js +2 -455
  90. package/dist/resources/Workers/createSimplePolylineGeometry.js +2 -376
  91. package/dist/resources/Workers/createSphereGeometry.js +2 -94
  92. package/dist/resources/Workers/createSphereOutlineGeometry.js +2 -94
  93. package/dist/resources/Workers/createTaskProcessorWorker.js +2 -8
  94. package/dist/resources/Workers/createVectorTileClampedPolylines.js +2 -468
  95. package/dist/resources/Workers/createVectorTileGeometries.js +2 -363
  96. package/dist/resources/Workers/createVectorTilePoints.js +2 -88
  97. package/dist/resources/Workers/createVectorTilePolygons.js +2 -361
  98. package/dist/resources/Workers/createVectorTilePolylines.js +2 -238
  99. package/dist/resources/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +2 -545
  100. package/dist/resources/Workers/createVerticesFromHeightmap.js +2 -2254
  101. package/dist/resources/Workers/createVerticesFromQuantizedTerrainMesh.js +2 -722
  102. package/dist/resources/Workers/createWallGeometry.js +2 -466
  103. package/dist/resources/Workers/createWallOutlineGeometry.js +2 -314
  104. package/dist/resources/Workers/decodeDraco.js +2 -345
  105. package/dist/resources/Workers/decodeGoogleEarthEnterprisePacket.js +2 -2626
  106. package/dist/resources/Workers/decodeI3S.js +2 -1320
  107. package/dist/resources/Workers/gaussianSplatSorter.js +26 -0
  108. package/dist/resources/Workers/gaussianSplatTextureGenerator.js +26 -0
  109. package/dist/resources/Workers/transcodeKTX2.js +29 -3398
  110. package/dist/resources/Workers/transferTypedArrayTest.js +2 -17
  111. package/dist/resources/Workers/upsampleQuantizedTerrainMesh.js +2 -795
  112. package/package.json +9 -8
  113. package/dist/resources/ThirdParty/Workers/basis_transcoder.js +0 -21
  114. package/dist/resources/Workers/chunk-23UFSGND.js +0 -236
  115. package/dist/resources/Workers/chunk-2A75IWRS.js +0 -218
  116. package/dist/resources/Workers/chunk-2FRVPMCS.js +0 -1258
  117. package/dist/resources/Workers/chunk-2FWRMUTY.js +0 -138
  118. package/dist/resources/Workers/chunk-2UPKWTMJ.js +0 -117
  119. package/dist/resources/Workers/chunk-34FXV7D7.js +0 -73
  120. package/dist/resources/Workers/chunk-3VAZEH7M.js +0 -101
  121. package/dist/resources/Workers/chunk-4DO5W5XZ.js +0 -196
  122. package/dist/resources/Workers/chunk-5QULIR53.js +0 -501
  123. package/dist/resources/Workers/chunk-7TC63SJW.js +0 -302
  124. package/dist/resources/Workers/chunk-7ZFGPDJA.js +0 -122
  125. package/dist/resources/Workers/chunk-A5DWLWCY.js +0 -834
  126. package/dist/resources/Workers/chunk-BG4UCVXN.js +0 -73
  127. package/dist/resources/Workers/chunk-BIKA3NRA.js +0 -59
  128. package/dist/resources/Workers/chunk-BROJAZRZ.js +0 -390
  129. package/dist/resources/Workers/chunk-DDUQAJ4P.js +0 -476
  130. package/dist/resources/Workers/chunk-EERJKOAF.js +0 -305
  131. package/dist/resources/Workers/chunk-EG6PTBY2.js +0 -2716
  132. package/dist/resources/Workers/chunk-F4HFJMGM.js +0 -353
  133. package/dist/resources/Workers/chunk-FJKNFAKQ.js +0 -8219
  134. package/dist/resources/Workers/chunk-FNIRWHJB.js +0 -289
  135. package/dist/resources/Workers/chunk-FZRIVR7Y.js +0 -100
  136. package/dist/resources/Workers/chunk-G43QFN4Q.js +0 -157
  137. package/dist/resources/Workers/chunk-GATZHF3K.js +0 -1860
  138. package/dist/resources/Workers/chunk-GRC2ZTAF.js +0 -398
  139. package/dist/resources/Workers/chunk-HU6N6EXB.js +0 -767
  140. package/dist/resources/Workers/chunk-I46ZRR5W.js +0 -1052
  141. package/dist/resources/Workers/chunk-JURN7NPV.js +0 -1075
  142. package/dist/resources/Workers/chunk-KKCR2YOP.js +0 -421
  143. package/dist/resources/Workers/chunk-LPR3YNP2.js +0 -138
  144. package/dist/resources/Workers/chunk-M7ERACJJ.js +0 -511
  145. package/dist/resources/Workers/chunk-MDWEGWPA.js +0 -1007
  146. package/dist/resources/Workers/chunk-OGXZVPPM.js +0 -2365
  147. package/dist/resources/Workers/chunk-PGSJK77E.js +0 -634
  148. package/dist/resources/Workers/chunk-PPH7OFP3.js +0 -258
  149. package/dist/resources/Workers/chunk-SH5USDPI.js +0 -456
  150. package/dist/resources/Workers/chunk-SOWMRMWA.js +0 -629
  151. package/dist/resources/Workers/chunk-STW2DGFI.js +0 -58
  152. package/dist/resources/Workers/chunk-T3XIFPYR.js +0 -1477
  153. package/dist/resources/Workers/chunk-TTUZP4BO.js +0 -501
  154. package/dist/resources/Workers/chunk-UEXTBDBE.js +0 -693
  155. package/dist/resources/Workers/chunk-VOXYEYJT.js +0 -684
  156. package/dist/resources/Workers/chunk-X4356LRH.js +0 -368
  157. package/dist/resources/Workers/chunk-XGI5BXZY.js +0 -163
  158. package/dist/resources/Workers/chunk-Y2ME2IJV.js +0 -781
  159. package/dist/resources/Workers/chunk-Y5UQJLYE.js +0 -171
  160. package/dist/resources/Workers/chunk-YJEBABKH.js +0 -2977
  161. package/dist/resources/Workers/chunk-YWTJ2B4B.js +0 -77
  162. package/dist/resources/Workers/chunk-Z3TIFFGF.js +0 -430
  163. package/dist/resources/Workers/chunk-ZT7KWISZ.js +0 -102
@@ -1,368 +0,0 @@
1
- /**
2
- * @license
3
- * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.115
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
- GeometryOffsetAttribute_default
28
- } from "./chunk-F3YA3Y2Z.js";
29
- import {
30
- IndexDatatype_default
31
- } from "./chunk-LPR3YNP2.js";
32
- import {
33
- GeometryAttributes_default
34
- } from "./chunk-4H7PY4U5.js";
35
- import {
36
- GeometryAttribute_default,
37
- Geometry_default,
38
- PrimitiveType_default
39
- } from "./chunk-7TC63SJW.js";
40
- import {
41
- BoundingSphere_default
42
- } from "./chunk-FJKNFAKQ.js";
43
- import {
44
- ComponentDatatype_default
45
- } from "./chunk-PPH7OFP3.js";
46
- import {
47
- Cartesian3_default,
48
- Ellipsoid_default
49
- } from "./chunk-OGXZVPPM.js";
50
- import {
51
- Math_default
52
- } from "./chunk-5QULIR53.js";
53
- import {
54
- defaultValue_default
55
- } from "./chunk-BBWDMCVU.js";
56
- import {
57
- DeveloperError_default
58
- } from "./chunk-XGI5BXZY.js";
59
- import {
60
- defined_default
61
- } from "./chunk-YWTJ2B4B.js";
62
-
63
- // packages/engine/Source/Core/EllipsoidOutlineGeometry.js
64
- var defaultRadii = new Cartesian3_default(1, 1, 1);
65
- var cos = Math.cos;
66
- var sin = Math.sin;
67
- function EllipsoidOutlineGeometry(options) {
68
- options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
69
- const radii = defaultValue_default(options.radii, defaultRadii);
70
- const innerRadii = defaultValue_default(options.innerRadii, radii);
71
- const minimumClock = defaultValue_default(options.minimumClock, 0);
72
- const maximumClock = defaultValue_default(options.maximumClock, Math_default.TWO_PI);
73
- const minimumCone = defaultValue_default(options.minimumCone, 0);
74
- const maximumCone = defaultValue_default(options.maximumCone, Math_default.PI);
75
- const stackPartitions = Math.round(defaultValue_default(options.stackPartitions, 10));
76
- const slicePartitions = Math.round(defaultValue_default(options.slicePartitions, 8));
77
- const subdivisions = Math.round(defaultValue_default(options.subdivisions, 128));
78
- if (stackPartitions < 1) {
79
- throw new DeveloperError_default("options.stackPartitions cannot be less than 1");
80
- }
81
- if (slicePartitions < 0) {
82
- throw new DeveloperError_default("options.slicePartitions cannot be less than 0");
83
- }
84
- if (subdivisions < 0) {
85
- throw new DeveloperError_default(
86
- "options.subdivisions must be greater than or equal to zero."
87
- );
88
- }
89
- if (defined_default(options.offsetAttribute) && options.offsetAttribute === GeometryOffsetAttribute_default.TOP) {
90
- throw new DeveloperError_default(
91
- "GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry."
92
- );
93
- }
94
- this._radii = Cartesian3_default.clone(radii);
95
- this._innerRadii = Cartesian3_default.clone(innerRadii);
96
- this._minimumClock = minimumClock;
97
- this._maximumClock = maximumClock;
98
- this._minimumCone = minimumCone;
99
- this._maximumCone = maximumCone;
100
- this._stackPartitions = stackPartitions;
101
- this._slicePartitions = slicePartitions;
102
- this._subdivisions = subdivisions;
103
- this._offsetAttribute = options.offsetAttribute;
104
- this._workerName = "createEllipsoidOutlineGeometry";
105
- }
106
- EllipsoidOutlineGeometry.packedLength = 2 * Cartesian3_default.packedLength + 8;
107
- EllipsoidOutlineGeometry.pack = function(value, array, startingIndex) {
108
- if (!defined_default(value)) {
109
- throw new DeveloperError_default("value is required");
110
- }
111
- if (!defined_default(array)) {
112
- throw new DeveloperError_default("array is required");
113
- }
114
- startingIndex = defaultValue_default(startingIndex, 0);
115
- Cartesian3_default.pack(value._radii, array, startingIndex);
116
- startingIndex += Cartesian3_default.packedLength;
117
- Cartesian3_default.pack(value._innerRadii, array, startingIndex);
118
- startingIndex += Cartesian3_default.packedLength;
119
- array[startingIndex++] = value._minimumClock;
120
- array[startingIndex++] = value._maximumClock;
121
- array[startingIndex++] = value._minimumCone;
122
- array[startingIndex++] = value._maximumCone;
123
- array[startingIndex++] = value._stackPartitions;
124
- array[startingIndex++] = value._slicePartitions;
125
- array[startingIndex++] = value._subdivisions;
126
- array[startingIndex] = defaultValue_default(value._offsetAttribute, -1);
127
- return array;
128
- };
129
- var scratchRadii = new Cartesian3_default();
130
- var scratchInnerRadii = new Cartesian3_default();
131
- var scratchOptions = {
132
- radii: scratchRadii,
133
- innerRadii: scratchInnerRadii,
134
- minimumClock: void 0,
135
- maximumClock: void 0,
136
- minimumCone: void 0,
137
- maximumCone: void 0,
138
- stackPartitions: void 0,
139
- slicePartitions: void 0,
140
- subdivisions: void 0,
141
- offsetAttribute: void 0
142
- };
143
- EllipsoidOutlineGeometry.unpack = function(array, startingIndex, result) {
144
- if (!defined_default(array)) {
145
- throw new DeveloperError_default("array is required");
146
- }
147
- startingIndex = defaultValue_default(startingIndex, 0);
148
- const radii = Cartesian3_default.unpack(array, startingIndex, scratchRadii);
149
- startingIndex += Cartesian3_default.packedLength;
150
- const innerRadii = Cartesian3_default.unpack(array, startingIndex, scratchInnerRadii);
151
- startingIndex += Cartesian3_default.packedLength;
152
- const minimumClock = array[startingIndex++];
153
- const maximumClock = array[startingIndex++];
154
- const minimumCone = array[startingIndex++];
155
- const maximumCone = array[startingIndex++];
156
- const stackPartitions = array[startingIndex++];
157
- const slicePartitions = array[startingIndex++];
158
- const subdivisions = array[startingIndex++];
159
- const offsetAttribute = array[startingIndex];
160
- if (!defined_default(result)) {
161
- scratchOptions.minimumClock = minimumClock;
162
- scratchOptions.maximumClock = maximumClock;
163
- scratchOptions.minimumCone = minimumCone;
164
- scratchOptions.maximumCone = maximumCone;
165
- scratchOptions.stackPartitions = stackPartitions;
166
- scratchOptions.slicePartitions = slicePartitions;
167
- scratchOptions.subdivisions = subdivisions;
168
- scratchOptions.offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
169
- return new EllipsoidOutlineGeometry(scratchOptions);
170
- }
171
- result._radii = Cartesian3_default.clone(radii, result._radii);
172
- result._innerRadii = Cartesian3_default.clone(innerRadii, result._innerRadii);
173
- result._minimumClock = minimumClock;
174
- result._maximumClock = maximumClock;
175
- result._minimumCone = minimumCone;
176
- result._maximumCone = maximumCone;
177
- result._stackPartitions = stackPartitions;
178
- result._slicePartitions = slicePartitions;
179
- result._subdivisions = subdivisions;
180
- result._offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
181
- return result;
182
- };
183
- EllipsoidOutlineGeometry.createGeometry = function(ellipsoidGeometry) {
184
- const radii = ellipsoidGeometry._radii;
185
- if (radii.x <= 0 || radii.y <= 0 || radii.z <= 0) {
186
- return;
187
- }
188
- const innerRadii = ellipsoidGeometry._innerRadii;
189
- if (innerRadii.x <= 0 || innerRadii.y <= 0 || innerRadii.z <= 0) {
190
- return;
191
- }
192
- const minimumClock = ellipsoidGeometry._minimumClock;
193
- const maximumClock = ellipsoidGeometry._maximumClock;
194
- const minimumCone = ellipsoidGeometry._minimumCone;
195
- const maximumCone = ellipsoidGeometry._maximumCone;
196
- const subdivisions = ellipsoidGeometry._subdivisions;
197
- const ellipsoid = Ellipsoid_default.fromCartesian3(radii);
198
- let slicePartitions = ellipsoidGeometry._slicePartitions + 1;
199
- let stackPartitions = ellipsoidGeometry._stackPartitions + 1;
200
- slicePartitions = Math.round(
201
- slicePartitions * Math.abs(maximumClock - minimumClock) / Math_default.TWO_PI
202
- );
203
- stackPartitions = Math.round(
204
- stackPartitions * Math.abs(maximumCone - minimumCone) / Math_default.PI
205
- );
206
- if (slicePartitions < 2) {
207
- slicePartitions = 2;
208
- }
209
- if (stackPartitions < 2) {
210
- stackPartitions = 2;
211
- }
212
- let extraIndices = 0;
213
- let vertexMultiplier = 1;
214
- const hasInnerSurface = innerRadii.x !== radii.x || innerRadii.y !== radii.y || innerRadii.z !== radii.z;
215
- let isTopOpen = false;
216
- let isBotOpen = false;
217
- if (hasInnerSurface) {
218
- vertexMultiplier = 2;
219
- if (minimumCone > 0) {
220
- isTopOpen = true;
221
- extraIndices += slicePartitions;
222
- }
223
- if (maximumCone < Math.PI) {
224
- isBotOpen = true;
225
- extraIndices += slicePartitions;
226
- }
227
- }
228
- const vertexCount = subdivisions * vertexMultiplier * (stackPartitions + slicePartitions);
229
- const positions = new Float64Array(vertexCount * 3);
230
- const numIndices = 2 * (vertexCount + extraIndices - (slicePartitions + stackPartitions) * vertexMultiplier);
231
- const indices = IndexDatatype_default.createTypedArray(vertexCount, numIndices);
232
- let i;
233
- let j;
234
- let theta;
235
- let phi;
236
- let index = 0;
237
- const sinPhi = new Array(stackPartitions);
238
- const cosPhi = new Array(stackPartitions);
239
- for (i = 0; i < stackPartitions; i++) {
240
- phi = minimumCone + i * (maximumCone - minimumCone) / (stackPartitions - 1);
241
- sinPhi[i] = sin(phi);
242
- cosPhi[i] = cos(phi);
243
- }
244
- const sinTheta = new Array(subdivisions);
245
- const cosTheta = new Array(subdivisions);
246
- for (i = 0; i < subdivisions; i++) {
247
- theta = minimumClock + i * (maximumClock - minimumClock) / (subdivisions - 1);
248
- sinTheta[i] = sin(theta);
249
- cosTheta[i] = cos(theta);
250
- }
251
- for (i = 0; i < stackPartitions; i++) {
252
- for (j = 0; j < subdivisions; j++) {
253
- positions[index++] = radii.x * sinPhi[i] * cosTheta[j];
254
- positions[index++] = radii.y * sinPhi[i] * sinTheta[j];
255
- positions[index++] = radii.z * cosPhi[i];
256
- }
257
- }
258
- if (hasInnerSurface) {
259
- for (i = 0; i < stackPartitions; i++) {
260
- for (j = 0; j < subdivisions; j++) {
261
- positions[index++] = innerRadii.x * sinPhi[i] * cosTheta[j];
262
- positions[index++] = innerRadii.y * sinPhi[i] * sinTheta[j];
263
- positions[index++] = innerRadii.z * cosPhi[i];
264
- }
265
- }
266
- }
267
- sinPhi.length = subdivisions;
268
- cosPhi.length = subdivisions;
269
- for (i = 0; i < subdivisions; i++) {
270
- phi = minimumCone + i * (maximumCone - minimumCone) / (subdivisions - 1);
271
- sinPhi[i] = sin(phi);
272
- cosPhi[i] = cos(phi);
273
- }
274
- sinTheta.length = slicePartitions;
275
- cosTheta.length = slicePartitions;
276
- for (i = 0; i < slicePartitions; i++) {
277
- theta = minimumClock + i * (maximumClock - minimumClock) / (slicePartitions - 1);
278
- sinTheta[i] = sin(theta);
279
- cosTheta[i] = cos(theta);
280
- }
281
- for (i = 0; i < subdivisions; i++) {
282
- for (j = 0; j < slicePartitions; j++) {
283
- positions[index++] = radii.x * sinPhi[i] * cosTheta[j];
284
- positions[index++] = radii.y * sinPhi[i] * sinTheta[j];
285
- positions[index++] = radii.z * cosPhi[i];
286
- }
287
- }
288
- if (hasInnerSurface) {
289
- for (i = 0; i < subdivisions; i++) {
290
- for (j = 0; j < slicePartitions; j++) {
291
- positions[index++] = innerRadii.x * sinPhi[i] * cosTheta[j];
292
- positions[index++] = innerRadii.y * sinPhi[i] * sinTheta[j];
293
- positions[index++] = innerRadii.z * cosPhi[i];
294
- }
295
- }
296
- }
297
- index = 0;
298
- for (i = 0; i < stackPartitions * vertexMultiplier; i++) {
299
- const topOffset = i * subdivisions;
300
- for (j = 0; j < subdivisions - 1; j++) {
301
- indices[index++] = topOffset + j;
302
- indices[index++] = topOffset + j + 1;
303
- }
304
- }
305
- let offset = stackPartitions * subdivisions * vertexMultiplier;
306
- for (i = 0; i < slicePartitions; i++) {
307
- for (j = 0; j < subdivisions - 1; j++) {
308
- indices[index++] = offset + i + j * slicePartitions;
309
- indices[index++] = offset + i + (j + 1) * slicePartitions;
310
- }
311
- }
312
- if (hasInnerSurface) {
313
- offset = stackPartitions * subdivisions * vertexMultiplier + slicePartitions * subdivisions;
314
- for (i = 0; i < slicePartitions; i++) {
315
- for (j = 0; j < subdivisions - 1; j++) {
316
- indices[index++] = offset + i + j * slicePartitions;
317
- indices[index++] = offset + i + (j + 1) * slicePartitions;
318
- }
319
- }
320
- }
321
- if (hasInnerSurface) {
322
- let outerOffset = stackPartitions * subdivisions * vertexMultiplier;
323
- let innerOffset = outerOffset + subdivisions * slicePartitions;
324
- if (isTopOpen) {
325
- for (i = 0; i < slicePartitions; i++) {
326
- indices[index++] = outerOffset + i;
327
- indices[index++] = innerOffset + i;
328
- }
329
- }
330
- if (isBotOpen) {
331
- outerOffset += subdivisions * slicePartitions - slicePartitions;
332
- innerOffset += subdivisions * slicePartitions - slicePartitions;
333
- for (i = 0; i < slicePartitions; i++) {
334
- indices[index++] = outerOffset + i;
335
- indices[index++] = innerOffset + i;
336
- }
337
- }
338
- }
339
- const attributes = new GeometryAttributes_default({
340
- position: new GeometryAttribute_default({
341
- componentDatatype: ComponentDatatype_default.DOUBLE,
342
- componentsPerAttribute: 3,
343
- values: positions
344
- })
345
- });
346
- if (defined_default(ellipsoidGeometry._offsetAttribute)) {
347
- const length = positions.length;
348
- const offsetValue = ellipsoidGeometry._offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
349
- const applyOffset = new Uint8Array(length / 3).fill(offsetValue);
350
- attributes.applyOffset = new GeometryAttribute_default({
351
- componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
352
- componentsPerAttribute: 1,
353
- values: applyOffset
354
- });
355
- }
356
- return new Geometry_default({
357
- attributes,
358
- indices,
359
- primitiveType: PrimitiveType_default.LINES,
360
- boundingSphere: BoundingSphere_default.fromEllipsoid(ellipsoid),
361
- offsetAttribute: ellipsoidGeometry._offsetAttribute
362
- });
363
- };
364
- var EllipsoidOutlineGeometry_default = EllipsoidOutlineGeometry;
365
-
366
- export {
367
- EllipsoidOutlineGeometry_default
368
- };
@@ -1,163 +0,0 @@
1
- /**
2
- * @license
3
- * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.115
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-YWTJ2B4B.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
- };