@pggis/pg-sdk 3.3.10 → 3.5.0

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/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-F3YA3Y2Z.js → chunk-A56XVLQR.js} +2 -13
  19. package/dist/resources/Workers/chunk-AJYK4IVJ.js +26 -0
  20. package/dist/resources/Workers/{chunk-EHWHNOEX.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-4H7PY4U5.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-BBWDMCVU.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-WZDE3RYP.js +28 -0
  60. package/dist/resources/Workers/chunk-XRL4AVS5.js +26 -0
  61. package/dist/resources/Workers/combineGeometry.js +2 -44
  62. package/dist/resources/Workers/createBoxGeometry.js +2 -34
  63. package/dist/resources/Workers/createBoxOutlineGeometry.js +2 -211
  64. package/dist/resources/Workers/createCircleGeometry.js +2 -173
  65. package/dist/resources/Workers/createCircleOutlineGeometry.js +2 -123
  66. package/dist/resources/Workers/createCoplanarPolygonGeometry.js +2 -482
  67. package/dist/resources/Workers/createCoplanarPolygonOutlineGeometry.js +2 -201
  68. package/dist/resources/Workers/createCorridorGeometry.js +2 -1239
  69. package/dist/resources/Workers/createCorridorOutlineGeometry.js +2 -544
  70. package/dist/resources/Workers/createCylinderGeometry.js +2 -36
  71. package/dist/resources/Workers/createCylinderOutlineGeometry.js +2 -207
  72. package/dist/resources/Workers/createEllipseGeometry.js +2 -47
  73. package/dist/resources/Workers/createEllipseOutlineGeometry.js +2 -40
  74. package/dist/resources/Workers/createEllipsoidGeometry.js +2 -35
  75. package/dist/resources/Workers/createEllipsoidOutlineGeometry.js +2 -37
  76. package/dist/resources/Workers/createFrustumGeometry.js +2 -34
  77. package/dist/resources/Workers/createFrustumOutlineGeometry.js +2 -211
  78. package/dist/resources/Workers/createGeometry.js +2 -147
  79. package/dist/resources/Workers/createGroundPolylineGeometry.js +2 -1584
  80. package/dist/resources/Workers/createPlaneGeometry.js +2 -200
  81. package/dist/resources/Workers/createPlaneOutlineGeometry.js +2 -100
  82. package/dist/resources/Workers/createPolygonGeometry.js +2 -1387
  83. package/dist/resources/Workers/createPolygonOutlineGeometry.js +2 -519
  84. package/dist/resources/Workers/createPolylineGeometry.js +2 -472
  85. package/dist/resources/Workers/createPolylineVolumeGeometry.js +2 -355
  86. package/dist/resources/Workers/createPolylineVolumeOutlineGeometry.js +2 -253
  87. package/dist/resources/Workers/createRectangleGeometry.js +2 -1250
  88. package/dist/resources/Workers/createRectangleOutlineGeometry.js +2 -455
  89. package/dist/resources/Workers/createSimplePolylineGeometry.js +2 -376
  90. package/dist/resources/Workers/createSphereGeometry.js +2 -94
  91. package/dist/resources/Workers/createSphereOutlineGeometry.js +2 -94
  92. package/dist/resources/Workers/createTaskProcessorWorker.js +2 -8
  93. package/dist/resources/Workers/createVectorTileClampedPolylines.js +2 -468
  94. package/dist/resources/Workers/createVectorTileGeometries.js +2 -363
  95. package/dist/resources/Workers/createVectorTilePoints.js +2 -88
  96. package/dist/resources/Workers/createVectorTilePolygons.js +2 -361
  97. package/dist/resources/Workers/createVectorTilePolylines.js +2 -238
  98. package/dist/resources/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +2 -545
  99. package/dist/resources/Workers/createVerticesFromHeightmap.js +2 -2254
  100. package/dist/resources/Workers/createVerticesFromQuantizedTerrainMesh.js +2 -722
  101. package/dist/resources/Workers/createWallGeometry.js +2 -466
  102. package/dist/resources/Workers/createWallOutlineGeometry.js +2 -314
  103. package/dist/resources/Workers/decodeDraco.js +2 -345
  104. package/dist/resources/Workers/decodeGoogleEarthEnterprisePacket.js +2 -2626
  105. package/dist/resources/Workers/decodeI3S.js +2 -1320
  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 -3398
  109. package/dist/resources/Workers/transferTypedArrayTest.js +2 -17
  110. package/dist/resources/Workers/upsampleQuantizedTerrainMesh.js +2 -795
  111. package/package.json +9 -8
  112. package/dist/pggis.min.js +0 -14796
  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,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.115
4
+ * Version 1.132
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -23,546 +23,4 @@
23
23
  * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
24
24
  */
25
25
 
26
- import {
27
- CorridorGeometryLibrary_default
28
- } from "./chunk-DDUQAJ4P.js";
29
- import {
30
- CornerType_default
31
- } from "./chunk-UEXTBDBE.js";
32
- import "./chunk-KKCR2YOP.js";
33
- import "./chunk-F4HFJMGM.js";
34
- import {
35
- GeometryOffsetAttribute_default
36
- } from "./chunk-F3YA3Y2Z.js";
37
- import "./chunk-FNIRWHJB.js";
38
- import "./chunk-G43QFN4Q.js";
39
- import {
40
- PolygonPipeline_default
41
- } from "./chunk-MDWEGWPA.js";
42
- import {
43
- arrayRemoveDuplicates_default
44
- } from "./chunk-FZRIVR7Y.js";
45
- import "./chunk-SH5USDPI.js";
46
- import "./chunk-2FRVPMCS.js";
47
- import "./chunk-Y5UQJLYE.js";
48
- import {
49
- IndexDatatype_default
50
- } from "./chunk-LPR3YNP2.js";
51
- import {
52
- GeometryAttributes_default
53
- } from "./chunk-4H7PY4U5.js";
54
- import {
55
- GeometryAttribute_default,
56
- Geometry_default,
57
- PrimitiveType_default
58
- } from "./chunk-7TC63SJW.js";
59
- import {
60
- BoundingSphere_default
61
- } from "./chunk-FJKNFAKQ.js";
62
- import "./chunk-TTUZP4BO.js";
63
- import "./chunk-BG4UCVXN.js";
64
- import "./chunk-YJEBABKH.js";
65
- import {
66
- ComponentDatatype_default
67
- } from "./chunk-PPH7OFP3.js";
68
- import {
69
- Cartesian3_default,
70
- Ellipsoid_default
71
- } from "./chunk-OGXZVPPM.js";
72
- import {
73
- Math_default
74
- } from "./chunk-5QULIR53.js";
75
- import "./chunk-SOWMRMWA.js";
76
- import "./chunk-STW2DGFI.js";
77
- import {
78
- defaultValue_default
79
- } from "./chunk-BBWDMCVU.js";
80
- import {
81
- Check_default
82
- } from "./chunk-XGI5BXZY.js";
83
- import {
84
- defined_default
85
- } from "./chunk-YWTJ2B4B.js";
86
-
87
- // packages/engine/Source/Core/CorridorOutlineGeometry.js
88
- var cartesian1 = new Cartesian3_default();
89
- var cartesian2 = new Cartesian3_default();
90
- var cartesian3 = new Cartesian3_default();
91
- function scaleToSurface(positions, ellipsoid) {
92
- for (let i = 0; i < positions.length; i++) {
93
- positions[i] = ellipsoid.scaleToGeodeticSurface(positions[i], positions[i]);
94
- }
95
- return positions;
96
- }
97
- function combine(computedPositions, cornerType) {
98
- const wallIndices = [];
99
- const positions = computedPositions.positions;
100
- const corners = computedPositions.corners;
101
- const endPositions = computedPositions.endPositions;
102
- const attributes = new GeometryAttributes_default();
103
- let corner;
104
- let leftCount = 0;
105
- let rightCount = 0;
106
- let i;
107
- let indicesLength = 0;
108
- let length;
109
- for (i = 0; i < positions.length; i += 2) {
110
- length = positions[i].length - 3;
111
- leftCount += length;
112
- indicesLength += length / 3 * 4;
113
- rightCount += positions[i + 1].length - 3;
114
- }
115
- leftCount += 3;
116
- rightCount += 3;
117
- for (i = 0; i < corners.length; i++) {
118
- corner = corners[i];
119
- const leftSide = corners[i].leftPositions;
120
- if (defined_default(leftSide)) {
121
- length = leftSide.length;
122
- leftCount += length;
123
- indicesLength += length / 3 * 2;
124
- } else {
125
- length = corners[i].rightPositions.length;
126
- rightCount += length;
127
- indicesLength += length / 3 * 2;
128
- }
129
- }
130
- const addEndPositions = defined_default(endPositions);
131
- let endPositionLength;
132
- if (addEndPositions) {
133
- endPositionLength = endPositions[0].length - 3;
134
- leftCount += endPositionLength;
135
- rightCount += endPositionLength;
136
- endPositionLength /= 3;
137
- indicesLength += endPositionLength * 4;
138
- }
139
- const size = leftCount + rightCount;
140
- const finalPositions = new Float64Array(size);
141
- let front = 0;
142
- let back = size - 1;
143
- let UL, LL, UR, LR;
144
- let rightPos, leftPos;
145
- const halfLength = endPositionLength / 2;
146
- const indices = IndexDatatype_default.createTypedArray(size / 3, indicesLength + 4);
147
- let index = 0;
148
- indices[index++] = front / 3;
149
- indices[index++] = (back - 2) / 3;
150
- if (addEndPositions) {
151
- wallIndices.push(front / 3);
152
- leftPos = cartesian1;
153
- rightPos = cartesian2;
154
- const firstEndPositions = endPositions[0];
155
- for (i = 0; i < halfLength; i++) {
156
- leftPos = Cartesian3_default.fromArray(
157
- firstEndPositions,
158
- (halfLength - 1 - i) * 3,
159
- leftPos
160
- );
161
- rightPos = Cartesian3_default.fromArray(
162
- firstEndPositions,
163
- (halfLength + i) * 3,
164
- rightPos
165
- );
166
- CorridorGeometryLibrary_default.addAttribute(finalPositions, rightPos, front);
167
- CorridorGeometryLibrary_default.addAttribute(
168
- finalPositions,
169
- leftPos,
170
- void 0,
171
- back
172
- );
173
- LL = front / 3;
174
- LR = LL + 1;
175
- UL = (back - 2) / 3;
176
- UR = UL - 1;
177
- indices[index++] = UL;
178
- indices[index++] = UR;
179
- indices[index++] = LL;
180
- indices[index++] = LR;
181
- front += 3;
182
- back -= 3;
183
- }
184
- }
185
- let posIndex = 0;
186
- let rightEdge = positions[posIndex++];
187
- let leftEdge = positions[posIndex++];
188
- finalPositions.set(rightEdge, front);
189
- finalPositions.set(leftEdge, back - leftEdge.length + 1);
190
- length = leftEdge.length - 3;
191
- wallIndices.push(front / 3, (back - 2) / 3);
192
- for (i = 0; i < length; i += 3) {
193
- LL = front / 3;
194
- LR = LL + 1;
195
- UL = (back - 2) / 3;
196
- UR = UL - 1;
197
- indices[index++] = UL;
198
- indices[index++] = UR;
199
- indices[index++] = LL;
200
- indices[index++] = LR;
201
- front += 3;
202
- back -= 3;
203
- }
204
- for (i = 0; i < corners.length; i++) {
205
- let j;
206
- corner = corners[i];
207
- const l = corner.leftPositions;
208
- const r = corner.rightPositions;
209
- let start;
210
- let outsidePoint = cartesian3;
211
- if (defined_default(l)) {
212
- back -= 3;
213
- start = UR;
214
- wallIndices.push(LR);
215
- for (j = 0; j < l.length / 3; j++) {
216
- outsidePoint = Cartesian3_default.fromArray(l, j * 3, outsidePoint);
217
- indices[index++] = start - j - 1;
218
- indices[index++] = start - j;
219
- CorridorGeometryLibrary_default.addAttribute(
220
- finalPositions,
221
- outsidePoint,
222
- void 0,
223
- back
224
- );
225
- back -= 3;
226
- }
227
- wallIndices.push(start - Math.floor(l.length / 6));
228
- if (cornerType === CornerType_default.BEVELED) {
229
- wallIndices.push((back - 2) / 3 + 1);
230
- }
231
- front += 3;
232
- } else {
233
- front += 3;
234
- start = LR;
235
- wallIndices.push(UR);
236
- for (j = 0; j < r.length / 3; j++) {
237
- outsidePoint = Cartesian3_default.fromArray(r, j * 3, outsidePoint);
238
- indices[index++] = start + j;
239
- indices[index++] = start + j + 1;
240
- CorridorGeometryLibrary_default.addAttribute(
241
- finalPositions,
242
- outsidePoint,
243
- front
244
- );
245
- front += 3;
246
- }
247
- wallIndices.push(start + Math.floor(r.length / 6));
248
- if (cornerType === CornerType_default.BEVELED) {
249
- wallIndices.push(front / 3 - 1);
250
- }
251
- back -= 3;
252
- }
253
- rightEdge = positions[posIndex++];
254
- leftEdge = positions[posIndex++];
255
- rightEdge.splice(0, 3);
256
- leftEdge.splice(leftEdge.length - 3, 3);
257
- finalPositions.set(rightEdge, front);
258
- finalPositions.set(leftEdge, back - leftEdge.length + 1);
259
- length = leftEdge.length - 3;
260
- for (j = 0; j < leftEdge.length; j += 3) {
261
- LR = front / 3;
262
- LL = LR - 1;
263
- UR = (back - 2) / 3;
264
- UL = UR + 1;
265
- indices[index++] = UL;
266
- indices[index++] = UR;
267
- indices[index++] = LL;
268
- indices[index++] = LR;
269
- front += 3;
270
- back -= 3;
271
- }
272
- front -= 3;
273
- back += 3;
274
- wallIndices.push(front / 3, (back - 2) / 3);
275
- }
276
- if (addEndPositions) {
277
- front += 3;
278
- back -= 3;
279
- leftPos = cartesian1;
280
- rightPos = cartesian2;
281
- const lastEndPositions = endPositions[1];
282
- for (i = 0; i < halfLength; i++) {
283
- leftPos = Cartesian3_default.fromArray(
284
- lastEndPositions,
285
- (endPositionLength - i - 1) * 3,
286
- leftPos
287
- );
288
- rightPos = Cartesian3_default.fromArray(lastEndPositions, i * 3, rightPos);
289
- CorridorGeometryLibrary_default.addAttribute(
290
- finalPositions,
291
- leftPos,
292
- void 0,
293
- back
294
- );
295
- CorridorGeometryLibrary_default.addAttribute(finalPositions, rightPos, front);
296
- LR = front / 3;
297
- LL = LR - 1;
298
- UR = (back - 2) / 3;
299
- UL = UR + 1;
300
- indices[index++] = UL;
301
- indices[index++] = UR;
302
- indices[index++] = LL;
303
- indices[index++] = LR;
304
- front += 3;
305
- back -= 3;
306
- }
307
- wallIndices.push(front / 3);
308
- } else {
309
- wallIndices.push(front / 3, (back - 2) / 3);
310
- }
311
- indices[index++] = front / 3;
312
- indices[index++] = (back - 2) / 3;
313
- attributes.position = new GeometryAttribute_default({
314
- componentDatatype: ComponentDatatype_default.DOUBLE,
315
- componentsPerAttribute: 3,
316
- values: finalPositions
317
- });
318
- return {
319
- attributes,
320
- indices,
321
- wallIndices
322
- };
323
- }
324
- function computePositionsExtruded(params) {
325
- const ellipsoid = params.ellipsoid;
326
- const computedPositions = CorridorGeometryLibrary_default.computePositions(params);
327
- const attr = combine(computedPositions, params.cornerType);
328
- const wallIndices = attr.wallIndices;
329
- const height = params.height;
330
- const extrudedHeight = params.extrudedHeight;
331
- const attributes = attr.attributes;
332
- const indices = attr.indices;
333
- let positions = attributes.position.values;
334
- let length = positions.length;
335
- let extrudedPositions = new Float64Array(length);
336
- extrudedPositions.set(positions);
337
- const newPositions = new Float64Array(length * 2);
338
- positions = PolygonPipeline_default.scaleToGeodeticHeight(
339
- positions,
340
- height,
341
- ellipsoid
342
- );
343
- extrudedPositions = PolygonPipeline_default.scaleToGeodeticHeight(
344
- extrudedPositions,
345
- extrudedHeight,
346
- ellipsoid
347
- );
348
- newPositions.set(positions);
349
- newPositions.set(extrudedPositions, length);
350
- attributes.position.values = newPositions;
351
- length /= 3;
352
- if (defined_default(params.offsetAttribute)) {
353
- let applyOffset = new Uint8Array(length * 2);
354
- if (params.offsetAttribute === GeometryOffsetAttribute_default.TOP) {
355
- applyOffset = applyOffset.fill(1, 0, length);
356
- } else {
357
- const applyOffsetValue = params.offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
358
- applyOffset = applyOffset.fill(applyOffsetValue);
359
- }
360
- attributes.applyOffset = new GeometryAttribute_default({
361
- componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
362
- componentsPerAttribute: 1,
363
- values: applyOffset
364
- });
365
- }
366
- let i;
367
- const iLength = indices.length;
368
- const newIndices = IndexDatatype_default.createTypedArray(
369
- newPositions.length / 3,
370
- (iLength + wallIndices.length) * 2
371
- );
372
- newIndices.set(indices);
373
- let index = iLength;
374
- for (i = 0; i < iLength; i += 2) {
375
- const v0 = indices[i];
376
- const v1 = indices[i + 1];
377
- newIndices[index++] = v0 + length;
378
- newIndices[index++] = v1 + length;
379
- }
380
- let UL, LL;
381
- for (i = 0; i < wallIndices.length; i++) {
382
- UL = wallIndices[i];
383
- LL = UL + length;
384
- newIndices[index++] = UL;
385
- newIndices[index++] = LL;
386
- }
387
- return {
388
- attributes,
389
- indices: newIndices
390
- };
391
- }
392
- function CorridorOutlineGeometry(options) {
393
- options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
394
- const positions = options.positions;
395
- const width = options.width;
396
- Check_default.typeOf.object("options.positions", positions);
397
- Check_default.typeOf.number("options.width", width);
398
- const height = defaultValue_default(options.height, 0);
399
- const extrudedHeight = defaultValue_default(options.extrudedHeight, height);
400
- this._positions = positions;
401
- this._ellipsoid = Ellipsoid_default.clone(
402
- defaultValue_default(options.ellipsoid, Ellipsoid_default.WGS84)
403
- );
404
- this._width = width;
405
- this._height = Math.max(height, extrudedHeight);
406
- this._extrudedHeight = Math.min(height, extrudedHeight);
407
- this._cornerType = defaultValue_default(options.cornerType, CornerType_default.ROUNDED);
408
- this._granularity = defaultValue_default(
409
- options.granularity,
410
- Math_default.RADIANS_PER_DEGREE
411
- );
412
- this._offsetAttribute = options.offsetAttribute;
413
- this._workerName = "createCorridorOutlineGeometry";
414
- this.packedLength = 1 + positions.length * Cartesian3_default.packedLength + Ellipsoid_default.packedLength + 6;
415
- }
416
- CorridorOutlineGeometry.pack = function(value, array, startingIndex) {
417
- Check_default.typeOf.object("value", value);
418
- Check_default.typeOf.object("array", array);
419
- startingIndex = defaultValue_default(startingIndex, 0);
420
- const positions = value._positions;
421
- const length = positions.length;
422
- array[startingIndex++] = length;
423
- for (let i = 0; i < length; ++i, startingIndex += Cartesian3_default.packedLength) {
424
- Cartesian3_default.pack(positions[i], array, startingIndex);
425
- }
426
- Ellipsoid_default.pack(value._ellipsoid, array, startingIndex);
427
- startingIndex += Ellipsoid_default.packedLength;
428
- array[startingIndex++] = value._width;
429
- array[startingIndex++] = value._height;
430
- array[startingIndex++] = value._extrudedHeight;
431
- array[startingIndex++] = value._cornerType;
432
- array[startingIndex++] = value._granularity;
433
- array[startingIndex] = defaultValue_default(value._offsetAttribute, -1);
434
- return array;
435
- };
436
- var scratchEllipsoid = Ellipsoid_default.clone(Ellipsoid_default.UNIT_SPHERE);
437
- var scratchOptions = {
438
- positions: void 0,
439
- ellipsoid: scratchEllipsoid,
440
- width: void 0,
441
- height: void 0,
442
- extrudedHeight: void 0,
443
- cornerType: void 0,
444
- granularity: void 0,
445
- offsetAttribute: void 0
446
- };
447
- CorridorOutlineGeometry.unpack = function(array, startingIndex, result) {
448
- Check_default.typeOf.object("array", array);
449
- startingIndex = defaultValue_default(startingIndex, 0);
450
- const length = array[startingIndex++];
451
- const positions = new Array(length);
452
- for (let i = 0; i < length; ++i, startingIndex += Cartesian3_default.packedLength) {
453
- positions[i] = Cartesian3_default.unpack(array, startingIndex);
454
- }
455
- const ellipsoid = Ellipsoid_default.unpack(array, startingIndex, scratchEllipsoid);
456
- startingIndex += Ellipsoid_default.packedLength;
457
- const width = array[startingIndex++];
458
- const height = array[startingIndex++];
459
- const extrudedHeight = array[startingIndex++];
460
- const cornerType = array[startingIndex++];
461
- const granularity = array[startingIndex++];
462
- const offsetAttribute = array[startingIndex];
463
- if (!defined_default(result)) {
464
- scratchOptions.positions = positions;
465
- scratchOptions.width = width;
466
- scratchOptions.height = height;
467
- scratchOptions.extrudedHeight = extrudedHeight;
468
- scratchOptions.cornerType = cornerType;
469
- scratchOptions.granularity = granularity;
470
- scratchOptions.offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
471
- return new CorridorOutlineGeometry(scratchOptions);
472
- }
473
- result._positions = positions;
474
- result._ellipsoid = Ellipsoid_default.clone(ellipsoid, result._ellipsoid);
475
- result._width = width;
476
- result._height = height;
477
- result._extrudedHeight = extrudedHeight;
478
- result._cornerType = cornerType;
479
- result._granularity = granularity;
480
- result._offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
481
- return result;
482
- };
483
- CorridorOutlineGeometry.createGeometry = function(corridorOutlineGeometry) {
484
- let positions = corridorOutlineGeometry._positions;
485
- const width = corridorOutlineGeometry._width;
486
- const ellipsoid = corridorOutlineGeometry._ellipsoid;
487
- positions = scaleToSurface(positions, ellipsoid);
488
- const cleanPositions = arrayRemoveDuplicates_default(
489
- positions,
490
- Cartesian3_default.equalsEpsilon
491
- );
492
- if (cleanPositions.length < 2 || width <= 0) {
493
- return;
494
- }
495
- const height = corridorOutlineGeometry._height;
496
- const extrudedHeight = corridorOutlineGeometry._extrudedHeight;
497
- const extrude = !Math_default.equalsEpsilon(
498
- height,
499
- extrudedHeight,
500
- 0,
501
- Math_default.EPSILON2
502
- );
503
- const params = {
504
- ellipsoid,
505
- positions: cleanPositions,
506
- width,
507
- cornerType: corridorOutlineGeometry._cornerType,
508
- granularity: corridorOutlineGeometry._granularity,
509
- saveAttributes: false
510
- };
511
- let attr;
512
- if (extrude) {
513
- params.height = height;
514
- params.extrudedHeight = extrudedHeight;
515
- params.offsetAttribute = corridorOutlineGeometry._offsetAttribute;
516
- attr = computePositionsExtruded(params);
517
- } else {
518
- const computedPositions = CorridorGeometryLibrary_default.computePositions(params);
519
- attr = combine(computedPositions, params.cornerType);
520
- attr.attributes.position.values = PolygonPipeline_default.scaleToGeodeticHeight(
521
- attr.attributes.position.values,
522
- height,
523
- ellipsoid
524
- );
525
- if (defined_default(corridorOutlineGeometry._offsetAttribute)) {
526
- const length = attr.attributes.position.values.length;
527
- const offsetValue = corridorOutlineGeometry._offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
528
- const applyOffset = new Uint8Array(length / 3).fill(offsetValue);
529
- attr.attributes.applyOffset = new GeometryAttribute_default({
530
- componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
531
- componentsPerAttribute: 1,
532
- values: applyOffset
533
- });
534
- }
535
- }
536
- const attributes = attr.attributes;
537
- const boundingSphere = BoundingSphere_default.fromVertices(
538
- attributes.position.values,
539
- void 0,
540
- 3
541
- );
542
- return new Geometry_default({
543
- attributes,
544
- indices: attr.indices,
545
- primitiveType: PrimitiveType_default.LINES,
546
- boundingSphere,
547
- offsetAttribute: corridorOutlineGeometry._offsetAttribute
548
- });
549
- };
550
- var CorridorOutlineGeometry_default = CorridorOutlineGeometry;
551
-
552
- // packages/engine/Source/Workers/createCorridorOutlineGeometry.js
553
- function createCorridorOutlineGeometry(corridorOutlineGeometry, offset) {
554
- if (defined_default(offset)) {
555
- corridorOutlineGeometry = CorridorOutlineGeometry_default.unpack(
556
- corridorOutlineGeometry,
557
- offset
558
- );
559
- }
560
- corridorOutlineGeometry._ellipsoid = Ellipsoid_default.clone(
561
- corridorOutlineGeometry._ellipsoid
562
- );
563
- return CorridorOutlineGeometry_default.createGeometry(corridorOutlineGeometry);
564
- }
565
- var createCorridorOutlineGeometry_default = createCorridorOutlineGeometry;
566
- export {
567
- createCorridorOutlineGeometry_default as default
568
- };
26
+ import{a as C}from"./chunk-WWA5PL4H.js";import{a as Q}from"./chunk-B4AA3ARO.js";import"./chunk-XRL4AVS5.js";import"./chunk-U4IEOH5K.js";import{a as J}from"./chunk-GBYLG25F.js";import"./chunk-TCGIRNHN.js";import"./chunk-N4VJKXZS.js";import{b as K}from"./chunk-77IHZJJ3.js";import{a as it}from"./chunk-3W4GT7KQ.js";import"./chunk-G5AGHVVC.js";import"./chunk-DMEY62ID.js";import"./chunk-HTFSEEMT.js";import{a as X}from"./chunk-OFUUQVMR.js";import{a as et}from"./chunk-A56XVLQR.js";import{b as I,c as tt,d as z}from"./chunk-RCV6KWXS.js";import{d as x}from"./chunk-4IW2T6GF.js";import"./chunk-PSPPBZWI.js";import{a as q}from"./chunk-AU7IKHOH.js";import{a as A,d as P,f as $}from"./chunk-64RSHJUE.js";import{a as Y}from"./chunk-3SSKC3VN.js";import"./chunk-OSW76XDF.js";import"./chunk-ED5JPB3S.js";import{b as B}from"./chunk-LEYMRMBK.js";import{e as N}from"./chunk-VTAIKJXX.js";var ot=new A,nt=new A,lt=new A;function ft(t,i){for(let e=0;e<t.length;e++)t[e]=i.scaleToGeodeticSurface(t[e],t[e]);return t}function st(t,i){let e=[],r=t.positions,h=t.corners,m=t.endPositions,H=new et,y,u=0,p=0,o,g=0,d;for(o=0;o<r.length;o+=2)d=r[o].length-3,u+=d,g+=d/3*4,p+=r[o+1].length-3;for(u+=3,p+=3,o=0;o<h.length;o++){y=h[o];let c=h[o].leftPositions;N(c)?(d=c.length,u+=d,g+=d/3*2):(d=h[o].rightPositions.length,p+=d,g+=d/3*2)}let _=N(m),w;_&&(w=m[0].length-3,u+=w,p+=w,w/=3,g+=w*4);let T=u+p,b=new Float64Array(T),n=0,s=T-1,a,E,L,k,S,U,j=w/2,l=X.createTypedArray(T/3,g+4),f=0;if(l[f++]=n/3,l[f++]=(s-2)/3,_){e.push(n/3),U=ot,S=nt;let c=m[0];for(o=0;o<j;o++)U=A.fromArray(c,(j-1-o)*3,U),S=A.fromArray(c,(j+o)*3,S),C.addAttribute(b,S,n),C.addAttribute(b,U,void 0,s),E=n/3,k=E+1,a=(s-2)/3,L=a-1,l[f++]=a,l[f++]=L,l[f++]=E,l[f++]=k,n+=3,s-=3}let V=0,F=r[V++],D=r[V++];for(b.set(F,n),b.set(D,s-D.length+1),d=D.length-3,e.push(n/3,(s-2)/3),o=0;o<d;o+=3)E=n/3,k=E+1,a=(s-2)/3,L=a-1,l[f++]=a,l[f++]=L,l[f++]=E,l[f++]=k,n+=3,s-=3;for(o=0;o<h.length;o++){let c;y=h[o];let G=y.leftPositions,W=y.rightPositions,O,R=lt;if(N(G)){for(s-=3,O=L,e.push(k),c=0;c<G.length/3;c++)R=A.fromArray(G,c*3,R),l[f++]=O-c-1,l[f++]=O-c,C.addAttribute(b,R,void 0,s),s-=3;e.push(O-Math.floor(G.length/6)),i===Q.BEVELED&&e.push((s-2)/3+1),n+=3}else{for(n+=3,O=k,e.push(L),c=0;c<W.length/3;c++)R=A.fromArray(W,c*3,R),l[f++]=O+c,l[f++]=O+c+1,C.addAttribute(b,R,n),n+=3;e.push(O+Math.floor(W.length/6)),i===Q.BEVELED&&e.push(n/3-1),s-=3}for(F=r[V++],D=r[V++],F.splice(0,3),D.splice(D.length-3,3),b.set(F,n),b.set(D,s-D.length+1),d=D.length-3,c=0;c<D.length;c+=3)k=n/3,E=k-1,L=(s-2)/3,a=L+1,l[f++]=a,l[f++]=L,l[f++]=E,l[f++]=k,n+=3,s-=3;n-=3,s+=3,e.push(n/3,(s-2)/3)}if(_){n+=3,s-=3,U=ot,S=nt;let c=m[1];for(o=0;o<j;o++)U=A.fromArray(c,(w-o-1)*3,U),S=A.fromArray(c,o*3,S),C.addAttribute(b,U,void 0,s),C.addAttribute(b,S,n),k=n/3,E=k-1,L=(s-2)/3,a=L+1,l[f++]=a,l[f++]=L,l[f++]=E,l[f++]=k,n+=3,s-=3;e.push(n/3)}else e.push(n/3,(s-2)/3);return l[f++]=n/3,l[f++]=(s-2)/3,H.position=new z({componentDatatype:q.DOUBLE,componentsPerAttribute:3,values:b}),{attributes:H,indices:l,wallIndices:e}}function ct(t){let i=t.ellipsoid,e=C.computePositions(t),r=st(e,t.cornerType),h=r.wallIndices,m=t.height,H=t.extrudedHeight,y=r.attributes,u=r.indices,p=y.position.values,o=p.length,g=new Float64Array(o);g.set(p);let d=new Float64Array(o*2);if(p=K.scaleToGeodeticHeight(p,m,i),g=K.scaleToGeodeticHeight(g,H,i),d.set(p),d.set(g,o),y.position.values=d,o/=3,N(t.offsetAttribute)){let a=new Uint8Array(o*2);if(t.offsetAttribute===J.TOP)a=a.fill(1,0,o);else{let E=t.offsetAttribute===J.NONE?0:1;a=a.fill(E)}y.applyOffset=new z({componentDatatype:q.UNSIGNED_BYTE,componentsPerAttribute:1,values:a})}let _,w=u.length,T=X.createTypedArray(d.length/3,(w+h.length)*2);T.set(u);let b=w;for(_=0;_<w;_+=2){let a=u[_],E=u[_+1];T[b++]=a+o,T[b++]=E+o}let n,s;for(_=0;_<h.length;_++)n=h[_],s=n+o,T[b++]=n,T[b++]=s;return{attributes:y,indices:T}}function M(t){t=t??$.EMPTY_OBJECT;let i=t.positions,e=t.width;B.typeOf.object("options.positions",i),B.typeOf.number("options.width",e);let r=t.height??0,h=t.extrudedHeight??r;this._positions=i,this._ellipsoid=P.clone(t.ellipsoid??P.default),this._width=e,this._height=Math.max(r,h),this._extrudedHeight=Math.min(r,h),this._cornerType=t.cornerType??Q.ROUNDED,this._granularity=t.granularity??Y.RADIANS_PER_DEGREE,this._offsetAttribute=t.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+i.length*A.packedLength+P.packedLength+6}M.pack=function(t,i,e){B.typeOf.object("value",t),B.typeOf.object("array",i),e=e??0;let r=t._positions,h=r.length;i[e++]=h;for(let m=0;m<h;++m,e+=A.packedLength)A.pack(r[m],i,e);return P.pack(t._ellipsoid,i,e),e+=P.packedLength,i[e++]=t._width,i[e++]=t._height,i[e++]=t._extrudedHeight,i[e++]=t._cornerType,i[e++]=t._granularity,i[e]=t._offsetAttribute??-1,i};var rt=P.clone(P.UNIT_SPHERE),v={positions:void 0,ellipsoid:rt,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};M.unpack=function(t,i,e){B.typeOf.object("array",t),i=i??0;let r=t[i++],h=new Array(r);for(let d=0;d<r;++d,i+=A.packedLength)h[d]=A.unpack(t,i);let m=P.unpack(t,i,rt);i+=P.packedLength;let H=t[i++],y=t[i++],u=t[i++],p=t[i++],o=t[i++],g=t[i];return N(e)?(e._positions=h,e._ellipsoid=P.clone(m,e._ellipsoid),e._width=H,e._height=y,e._extrudedHeight=u,e._cornerType=p,e._granularity=o,e._offsetAttribute=g===-1?void 0:g,e):(v.positions=h,v.width=H,v.height=y,v.extrudedHeight=u,v.cornerType=p,v.granularity=o,v.offsetAttribute=g===-1?void 0:g,new M(v))};M.createGeometry=function(t){let i=t._positions,e=t._width,r=t._ellipsoid;i=ft(i,r);let h=it(i,A.equalsEpsilon);if(h.length<2||e<=0)return;let m=t._height,H=t._extrudedHeight,y=!Y.equalsEpsilon(m,H,0,Y.EPSILON2),u={ellipsoid:r,positions:h,width:e,cornerType:t._cornerType,granularity:t._granularity,saveAttributes:!1},p;if(y)u.height=m,u.extrudedHeight=H,u.offsetAttribute=t._offsetAttribute,p=ct(u);else{let d=C.computePositions(u);if(p=st(d,u.cornerType),p.attributes.position.values=K.scaleToGeodeticHeight(p.attributes.position.values,m,r),N(t._offsetAttribute)){let _=p.attributes.position.values.length,w=t._offsetAttribute===J.NONE?0:1,T=new Uint8Array(_/3).fill(w);p.attributes.applyOffset=new z({componentDatatype:q.UNSIGNED_BYTE,componentsPerAttribute:1,values:T})}}let o=p.attributes,g=x.fromVertices(o.position.values,void 0,3);return new tt({attributes:o,indices:p.indices,primitiveType:I.LINES,boundingSphere:g,offsetAttribute:t._offsetAttribute})};var Z=M;function ht(t,i){return N(i)&&(t=Z.unpack(t,i)),t._ellipsoid=P.clone(t._ellipsoid),Z.createGeometry(t)}var Ot=ht;export{Ot as default};
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.115
4
+ * Version 1.132
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -23,38 +23,4 @@
23
23
  * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
24
24
  */
25
25
 
26
- import {
27
- CylinderGeometry_default
28
- } from "./chunk-GRC2ZTAF.js";
29
- import "./chunk-34FXV7D7.js";
30
- import "./chunk-F3YA3Y2Z.js";
31
- import "./chunk-2FWRMUTY.js";
32
- import "./chunk-LPR3YNP2.js";
33
- import "./chunk-4H7PY4U5.js";
34
- import "./chunk-7TC63SJW.js";
35
- import "./chunk-FJKNFAKQ.js";
36
- import "./chunk-TTUZP4BO.js";
37
- import "./chunk-BG4UCVXN.js";
38
- import "./chunk-YJEBABKH.js";
39
- import "./chunk-PPH7OFP3.js";
40
- import "./chunk-OGXZVPPM.js";
41
- import "./chunk-5QULIR53.js";
42
- import "./chunk-SOWMRMWA.js";
43
- import "./chunk-STW2DGFI.js";
44
- import "./chunk-BBWDMCVU.js";
45
- import "./chunk-XGI5BXZY.js";
46
- import {
47
- defined_default
48
- } from "./chunk-YWTJ2B4B.js";
49
-
50
- // packages/engine/Source/Workers/createCylinderGeometry.js
51
- function createCylinderGeometry(cylinderGeometry, offset) {
52
- if (defined_default(offset)) {
53
- cylinderGeometry = CylinderGeometry_default.unpack(cylinderGeometry, offset);
54
- }
55
- return CylinderGeometry_default.createGeometry(cylinderGeometry);
56
- }
57
- var createCylinderGeometry_default = createCylinderGeometry;
58
- export {
59
- createCylinderGeometry_default as default
60
- };
26
+ import{a as r}from"./chunk-GILIDQNQ.js";import"./chunk-ARG42DC4.js";import"./chunk-GBYLG25F.js";import"./chunk-CYCB63OH.js";import"./chunk-OFUUQVMR.js";import"./chunk-A56XVLQR.js";import"./chunk-RCV6KWXS.js";import"./chunk-4IW2T6GF.js";import"./chunk-PSPPBZWI.js";import"./chunk-AU7IKHOH.js";import"./chunk-64RSHJUE.js";import"./chunk-3SSKC3VN.js";import"./chunk-OSW76XDF.js";import"./chunk-ED5JPB3S.js";import"./chunk-LEYMRMBK.js";import{e as o}from"./chunk-VTAIKJXX.js";function i(e,t){return o(t)&&(e=r.unpack(e,t)),r.createGeometry(e)}var a=i;export{a as default};