@gmgis/gm-sdk 1.12.5 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/dist/dist/index.js +1848 -0
  2. package/dist/gm.min.js +16983 -16483
  3. package/dist/index.js +1436 -1434
  4. package/dist/resources/ThirdParty/Workers/pako_deflate.min.js +1 -2
  5. package/dist/resources/ThirdParty/Workers/pako_inflate.min.js +1 -2
  6. package/dist/resources/ThirdParty/Workers/z-worker-pako.js +1 -1
  7. package/dist/resources/ThirdParty/google-earth-dbroot-parser.js +1 -8337
  8. package/dist/resources/ThirdParty/wasm_splats_bg.wasm +0 -0
  9. package/dist/resources/Workers/chunk-35SHYARM.js +26 -0
  10. package/dist/resources/Workers/chunk-37F5JSTI.js +26 -0
  11. package/dist/resources/Workers/chunk-3SSKC3VN.js +26 -0
  12. package/dist/resources/Workers/chunk-3W4GT7KQ.js +26 -0
  13. package/dist/resources/Workers/chunk-4IW2T6GF.js +26 -0
  14. package/dist/resources/Workers/chunk-5YEWO3HT.js +26 -0
  15. package/dist/resources/Workers/chunk-64RSHJUE.js +28 -0
  16. package/dist/resources/Workers/chunk-77IHZJJ3.js +26 -0
  17. package/dist/resources/Workers/chunk-7HTKERZY.js +26 -0
  18. package/dist/resources/Workers/{chunk-I2ITFFPX.js → chunk-A56XVLQR.js} +2 -13
  19. package/dist/resources/Workers/chunk-AJYK4IVJ.js +26 -0
  20. package/dist/resources/Workers/{chunk-PRGYLLJT.js → chunk-ARG42DC4.js} +2 -31
  21. package/dist/resources/Workers/chunk-AU7IKHOH.js +26 -0
  22. package/dist/resources/Workers/chunk-B4AA3ARO.js +26 -0
  23. package/dist/resources/Workers/chunk-CNCV5UL7.js +26 -0
  24. package/dist/resources/Workers/chunk-CYCB63OH.js +26 -0
  25. package/dist/resources/Workers/{chunk-DI5NGJUP.js → chunk-D6AA5QVT.js} +2 -20
  26. package/dist/resources/Workers/chunk-D6C66QON.js +26 -0
  27. package/dist/resources/Workers/chunk-DEPHB2WM.js +26 -0
  28. package/dist/resources/Workers/chunk-DMEY62ID.js +26 -0
  29. package/dist/resources/Workers/chunk-DQQ63PYM.js +26 -0
  30. package/dist/resources/Workers/chunk-ED5JPB3S.js +27 -0
  31. package/dist/resources/Workers/chunk-EZUYS2JF.js +26 -0
  32. package/dist/resources/Workers/chunk-FEVXJ54I.js +26 -0
  33. package/dist/resources/Workers/chunk-G5AGHVVC.js +26 -0
  34. package/dist/resources/Workers/{chunk-7JO7GPJN.js → chunk-GBYLG25F.js} +2 -15
  35. package/dist/resources/Workers/chunk-GILIDQNQ.js +26 -0
  36. package/dist/resources/Workers/chunk-HMIYSTF6.js +26 -0
  37. package/dist/resources/Workers/chunk-HTFSEEMT.js +26 -0
  38. package/dist/resources/Workers/chunk-HWXX4CWK.js +26 -0
  39. package/dist/resources/Workers/chunk-IYTZ52EY.js +26 -0
  40. package/dist/resources/Workers/chunk-J6UP6FLE.js +26 -0
  41. package/dist/resources/Workers/chunk-LEYMRMBK.js +27 -0
  42. package/dist/resources/Workers/chunk-M3MGYQSL.js +26 -0
  43. package/dist/resources/Workers/chunk-N4VJKXZS.js +26 -0
  44. package/dist/resources/Workers/chunk-NB3ML6JO.js +26 -0
  45. package/dist/resources/Workers/chunk-OFUUQVMR.js +26 -0
  46. package/dist/resources/Workers/chunk-OSW76XDF.js +26 -0
  47. package/dist/resources/Workers/chunk-PSPPBZWI.js +66 -0
  48. package/dist/resources/Workers/chunk-QN3VOORQ.js +26 -0
  49. package/dist/resources/Workers/chunk-QOUAJ6TL.js +26 -0
  50. package/dist/resources/Workers/chunk-RCV6KWXS.js +26 -0
  51. package/dist/resources/Workers/chunk-TCGIRNHN.js +26 -0
  52. package/dist/resources/Workers/chunk-U4IEOH5K.js +26 -0
  53. package/dist/resources/Workers/chunk-UP6I5URU.js +26 -0
  54. package/dist/resources/Workers/chunk-VTAIKJXX.js +26 -0
  55. package/dist/resources/Workers/chunk-VTBDSFTG.js +26 -0
  56. package/dist/resources/Workers/chunk-VW6VD53G.js +26 -0
  57. package/dist/resources/Workers/chunk-WGGIH7QW.js +26 -0
  58. package/dist/resources/Workers/chunk-WWA5PL4H.js +26 -0
  59. package/dist/resources/Workers/{chunk-6CHGCNMW.js → chunk-WZDE3RYP.js} +4 -34
  60. package/dist/resources/Workers/chunk-XRL4AVS5.js +26 -0
  61. package/dist/resources/Workers/combineGeometry.js +2 -40
  62. package/dist/resources/Workers/createBoxGeometry.js +2 -32
  63. package/dist/resources/Workers/createBoxOutlineGeometry.js +2 -209
  64. package/dist/resources/Workers/createCircleGeometry.js +2 -175
  65. package/dist/resources/Workers/createCircleOutlineGeometry.js +2 -121
  66. package/dist/resources/Workers/createCoplanarPolygonGeometry.js +2 -481
  67. package/dist/resources/Workers/createCoplanarPolygonOutlineGeometry.js +2 -199
  68. package/dist/resources/Workers/createCorridorGeometry.js +2 -1237
  69. package/dist/resources/Workers/createCorridorOutlineGeometry.js +2 -542
  70. package/dist/resources/Workers/createCylinderGeometry.js +2 -34
  71. package/dist/resources/Workers/createCylinderOutlineGeometry.js +2 -205
  72. package/dist/resources/Workers/createEllipseGeometry.js +2 -45
  73. package/dist/resources/Workers/createEllipseOutlineGeometry.js +2 -38
  74. package/dist/resources/Workers/createEllipsoidGeometry.js +2 -33
  75. package/dist/resources/Workers/createEllipsoidOutlineGeometry.js +2 -35
  76. package/dist/resources/Workers/createFrustumGeometry.js +2 -32
  77. package/dist/resources/Workers/createFrustumOutlineGeometry.js +2 -210
  78. package/dist/resources/Workers/createGeometry.js +2 -144
  79. package/dist/resources/Workers/createGroundPolylineGeometry.js +2 -1582
  80. package/dist/resources/Workers/createPlaneGeometry.js +2 -198
  81. package/dist/resources/Workers/createPlaneOutlineGeometry.js +2 -98
  82. package/dist/resources/Workers/createPolygonGeometry.js +2 -1381
  83. package/dist/resources/Workers/createPolygonOutlineGeometry.js +2 -509
  84. package/dist/resources/Workers/createPolylineGeometry.js +2 -470
  85. package/dist/resources/Workers/createPolylineVolumeGeometry.js +2 -354
  86. package/dist/resources/Workers/createPolylineVolumeOutlineGeometry.js +2 -251
  87. package/dist/resources/Workers/createRectangleGeometry.js +2 -1246
  88. package/dist/resources/Workers/createRectangleOutlineGeometry.js +2 -453
  89. package/dist/resources/Workers/createSimplePolylineGeometry.js +2 -374
  90. package/dist/resources/Workers/createSphereGeometry.js +2 -92
  91. package/dist/resources/Workers/createSphereOutlineGeometry.js +2 -92
  92. package/dist/resources/Workers/createTaskProcessorWorker.js +2 -8
  93. package/dist/resources/Workers/createVectorTileClampedPolylines.js +2 -466
  94. package/dist/resources/Workers/createVectorTileGeometries.js +2 -361
  95. package/dist/resources/Workers/createVectorTilePoints.js +2 -88
  96. package/dist/resources/Workers/createVectorTilePolygons.js +2 -359
  97. package/dist/resources/Workers/createVectorTilePolylines.js +2 -236
  98. package/dist/resources/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +2 -539
  99. package/dist/resources/Workers/createVerticesFromHeightmap.js +2 -2252
  100. package/dist/resources/Workers/createVerticesFromQuantizedTerrainMesh.js +2 -729
  101. package/dist/resources/Workers/createWallGeometry.js +2 -464
  102. package/dist/resources/Workers/createWallOutlineGeometry.js +2 -312
  103. package/dist/resources/Workers/decodeDraco.js +2 -345
  104. package/dist/resources/Workers/decodeGoogleEarthEnterprisePacket.js +2 -2642
  105. package/dist/resources/Workers/decodeI3S.js +2 -1319
  106. package/dist/resources/Workers/gaussianSplatSorter.js +26 -0
  107. package/dist/resources/Workers/gaussianSplatTextureGenerator.js +26 -0
  108. package/dist/resources/Workers/transcodeKTX2.js +29 -3360
  109. package/dist/resources/Workers/transferTypedArrayTest.js +2 -17
  110. package/dist/resources/Workers/upsampleQuantizedTerrainMesh.js +2 -793
  111. package/package.json +74 -74
  112. package/dist/resources/ThirdParty/Workers/basis_transcoder.js +0 -21
  113. package/dist/resources/Workers/chunk-26GA3JAM.js +0 -139
  114. package/dist/resources/Workers/chunk-27HUZ7SA.js +0 -305
  115. package/dist/resources/Workers/chunk-2ZGOQXYU.js +0 -171
  116. package/dist/resources/Workers/chunk-3Q2L65QU.js +0 -1258
  117. package/dist/resources/Workers/chunk-472HQ3EH.js +0 -100
  118. package/dist/resources/Workers/chunk-5ODQSF26.js +0 -101
  119. package/dist/resources/Workers/chunk-5OOFQLKF.js +0 -634
  120. package/dist/resources/Workers/chunk-5PTXS2GO.js +0 -10390
  121. package/dist/resources/Workers/chunk-76BYBWHP.js +0 -122
  122. package/dist/resources/Workers/chunk-7BMOHCPM.js +0 -390
  123. package/dist/resources/Workers/chunk-7KTQP4VB.js +0 -59
  124. package/dist/resources/Workers/chunk-7O373FFS.js +0 -665
  125. package/dist/resources/Workers/chunk-AD63PIY6.js +0 -163
  126. package/dist/resources/Workers/chunk-BHQJ2NT7.js +0 -353
  127. package/dist/resources/Workers/chunk-C6YYBQXW.js +0 -102
  128. package/dist/resources/Workers/chunk-CKY7HOHV.js +0 -287
  129. package/dist/resources/Workers/chunk-DHYHSFFJ.js +0 -73
  130. package/dist/resources/Workers/chunk-E27BLMDD.js +0 -115
  131. package/dist/resources/Workers/chunk-E63IIM5T.js +0 -75
  132. package/dist/resources/Workers/chunk-E6V6SQZW.js +0 -456
  133. package/dist/resources/Workers/chunk-EJZTDTUH.js +0 -138
  134. package/dist/resources/Workers/chunk-FDOV2LBJ.js +0 -220
  135. package/dist/resources/Workers/chunk-FIGIZHAQ.js +0 -684
  136. package/dist/resources/Workers/chunk-GESF4OXQ.js +0 -1800
  137. package/dist/resources/Workers/chunk-GGZJN2TI.js +0 -2717
  138. package/dist/resources/Workers/chunk-GNBFYG7F.js +0 -1481
  139. package/dist/resources/Workers/chunk-GWCFU2SA.js +0 -300
  140. package/dist/resources/Workers/chunk-IBLIYJZR.js +0 -196
  141. package/dist/resources/Workers/chunk-JW4FOI6M.js +0 -476
  142. package/dist/resources/Workers/chunk-K4GQUNB5.js +0 -262
  143. package/dist/resources/Workers/chunk-M3GMB5OP.js +0 -834
  144. package/dist/resources/Workers/chunk-MXIZJAPH.js +0 -629
  145. package/dist/resources/Workers/chunk-N5KJGGCM.js +0 -1073
  146. package/dist/resources/Workers/chunk-NGPPMXRM.js +0 -435
  147. package/dist/resources/Workers/chunk-O3E4OAOE.js +0 -511
  148. package/dist/resources/Workers/chunk-PGRPDNHG.js +0 -1048
  149. package/dist/resources/Workers/chunk-S6MRMMQU.js +0 -157
  150. package/dist/resources/Workers/chunk-SMDOP47J.js +0 -945
  151. package/dist/resources/Workers/chunk-TGONEMZO.js +0 -421
  152. package/dist/resources/Workers/chunk-TKVT5GQM.js +0 -781
  153. package/dist/resources/Workers/chunk-U72QNFOJ.js +0 -758
  154. package/dist/resources/Workers/chunk-VJZB3WAV.js +0 -963
  155. package/dist/resources/Workers/chunk-VU2MNO7L.js +0 -239
  156. package/dist/resources/Workers/chunk-XY4BATBS.js +0 -500
  157. package/dist/resources/Workers/chunk-YFXQECWV.js +0 -2857
  158. package/dist/resources/Workers/chunk-YSGTGQQO.js +0 -398
  159. package/dist/resources/Workers/chunk-YZ733KKS.js +0 -368
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.122
4
+ * Version 1.132
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -23,356 +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
- BoundingRectangle_default
28
- } from "./chunk-FDOV2LBJ.js";
29
- import {
30
- GeometryPipeline_default
31
- } from "./chunk-GGZJN2TI.js";
32
- import "./chunk-NGPPMXRM.js";
33
- import "./chunk-C6YYBQXW.js";
34
- import {
35
- CornerType_default,
36
- PolylineVolumeGeometryLibrary_default
37
- } from "./chunk-7O373FFS.js";
38
- import "./chunk-TGONEMZO.js";
39
- import "./chunk-BHQJ2NT7.js";
40
- import {
41
- VertexFormat_default
42
- } from "./chunk-EJZTDTUH.js";
43
- import "./chunk-CKY7HOHV.js";
44
- import "./chunk-S6MRMMQU.js";
45
- import {
46
- PolygonPipeline_default,
47
- WindingOrder_default
48
- } from "./chunk-SMDOP47J.js";
49
- import {
50
- arrayRemoveDuplicates_default
51
- } from "./chunk-472HQ3EH.js";
52
- import "./chunk-E6V6SQZW.js";
53
- import "./chunk-3Q2L65QU.js";
54
- import "./chunk-2ZGOQXYU.js";
55
- import {
56
- IndexDatatype_default
57
- } from "./chunk-26GA3JAM.js";
58
- import {
59
- GeometryAttributes_default
60
- } from "./chunk-DI5NGJUP.js";
61
- import {
62
- GeometryAttribute_default,
63
- Geometry_default,
64
- PrimitiveType_default
65
- } from "./chunk-GWCFU2SA.js";
66
- import {
67
- BoundingSphere_default
68
- } from "./chunk-VJZB3WAV.js";
69
- import {
70
- oneTimeWarning_default
71
- } from "./chunk-5PTXS2GO.js";
72
- import {
73
- ComponentDatatype_default
74
- } from "./chunk-K4GQUNB5.js";
75
- import {
76
- Cartesian2_default,
77
- Cartesian3_default,
78
- Ellipsoid_default
79
- } from "./chunk-YFXQECWV.js";
80
- import {
81
- Math_default
82
- } from "./chunk-XY4BATBS.js";
83
- import "./chunk-MXIZJAPH.js";
84
- import "./chunk-6CHGCNMW.js";
85
- import {
86
- defaultValue_default
87
- } from "./chunk-7JO7GPJN.js";
88
- import {
89
- DeveloperError_default
90
- } from "./chunk-AD63PIY6.js";
91
- import {
92
- defined_default
93
- } from "./chunk-E63IIM5T.js";
94
-
95
- // packages/engine/Source/Core/PolylineVolumeGeometry.js
96
- function computeAttributes(combinedPositions, shape, boundingRectangle, vertexFormat) {
97
- const attributes = new GeometryAttributes_default();
98
- if (vertexFormat.position) {
99
- attributes.position = new GeometryAttribute_default({
100
- componentDatatype: ComponentDatatype_default.DOUBLE,
101
- componentsPerAttribute: 3,
102
- values: combinedPositions
103
- });
104
- }
105
- const shapeLength = shape.length;
106
- const vertexCount = combinedPositions.length / 3;
107
- const length = (vertexCount - shapeLength * 2) / (shapeLength * 2);
108
- const firstEndIndices = PolygonPipeline_default.triangulate(shape);
109
- const indicesCount = (length - 1) * shapeLength * 6 + firstEndIndices.length * 2;
110
- const indices = IndexDatatype_default.createTypedArray(vertexCount, indicesCount);
111
- let i, j;
112
- let ll, ul, ur, lr;
113
- const offset = shapeLength * 2;
114
- let index = 0;
115
- for (i = 0; i < length - 1; i++) {
116
- for (j = 0; j < shapeLength - 1; j++) {
117
- ll = j * 2 + i * shapeLength * 2;
118
- lr = ll + offset;
119
- ul = ll + 1;
120
- ur = ul + offset;
121
- indices[index++] = ul;
122
- indices[index++] = ll;
123
- indices[index++] = ur;
124
- indices[index++] = ur;
125
- indices[index++] = ll;
126
- indices[index++] = lr;
127
- }
128
- ll = shapeLength * 2 - 2 + i * shapeLength * 2;
129
- ul = ll + 1;
130
- ur = ul + offset;
131
- lr = ll + offset;
132
- indices[index++] = ul;
133
- indices[index++] = ll;
134
- indices[index++] = ur;
135
- indices[index++] = ur;
136
- indices[index++] = ll;
137
- indices[index++] = lr;
138
- }
139
- if (vertexFormat.st || vertexFormat.tangent || vertexFormat.bitangent) {
140
- const st = new Float32Array(vertexCount * 2);
141
- const lengthSt = 1 / (length - 1);
142
- const heightSt = 1 / boundingRectangle.height;
143
- const heightOffset = boundingRectangle.height / 2;
144
- let s, t;
145
- let stindex = 0;
146
- for (i = 0; i < length; i++) {
147
- s = i * lengthSt;
148
- t = heightSt * (shape[0].y + heightOffset);
149
- st[stindex++] = s;
150
- st[stindex++] = t;
151
- for (j = 1; j < shapeLength; j++) {
152
- t = heightSt * (shape[j].y + heightOffset);
153
- st[stindex++] = s;
154
- st[stindex++] = t;
155
- st[stindex++] = s;
156
- st[stindex++] = t;
157
- }
158
- t = heightSt * (shape[0].y + heightOffset);
159
- st[stindex++] = s;
160
- st[stindex++] = t;
161
- }
162
- for (j = 0; j < shapeLength; j++) {
163
- s = 0;
164
- t = heightSt * (shape[j].y + heightOffset);
165
- st[stindex++] = s;
166
- st[stindex++] = t;
167
- }
168
- for (j = 0; j < shapeLength; j++) {
169
- s = (length - 1) * lengthSt;
170
- t = heightSt * (shape[j].y + heightOffset);
171
- st[stindex++] = s;
172
- st[stindex++] = t;
173
- }
174
- attributes.st = new GeometryAttribute_default({
175
- componentDatatype: ComponentDatatype_default.FLOAT,
176
- componentsPerAttribute: 2,
177
- values: new Float32Array(st)
178
- });
179
- }
180
- const endOffset = vertexCount - shapeLength * 2;
181
- for (i = 0; i < firstEndIndices.length; i += 3) {
182
- const v0 = firstEndIndices[i] + endOffset;
183
- const v1 = firstEndIndices[i + 1] + endOffset;
184
- const v2 = firstEndIndices[i + 2] + endOffset;
185
- indices[index++] = v0;
186
- indices[index++] = v1;
187
- indices[index++] = v2;
188
- indices[index++] = v2 + shapeLength;
189
- indices[index++] = v1 + shapeLength;
190
- indices[index++] = v0 + shapeLength;
191
- }
192
- let geometry = new Geometry_default({
193
- attributes,
194
- indices,
195
- boundingSphere: BoundingSphere_default.fromVertices(combinedPositions),
196
- primitiveType: PrimitiveType_default.TRIANGLES
197
- });
198
- if (vertexFormat.normal) {
199
- geometry = GeometryPipeline_default.computeNormal(geometry);
200
- }
201
- if (vertexFormat.tangent || vertexFormat.bitangent) {
202
- try {
203
- geometry = GeometryPipeline_default.computeTangentAndBitangent(geometry);
204
- } catch (e) {
205
- oneTimeWarning_default(
206
- "polyline-volume-tangent-bitangent",
207
- "Unable to compute tangents and bitangents for polyline volume geometry"
208
- );
209
- }
210
- if (!vertexFormat.tangent) {
211
- geometry.attributes.tangent = void 0;
212
- }
213
- if (!vertexFormat.bitangent) {
214
- geometry.attributes.bitangent = void 0;
215
- }
216
- if (!vertexFormat.st) {
217
- geometry.attributes.st = void 0;
218
- }
219
- }
220
- return geometry;
221
- }
222
- function PolylineVolumeGeometry(options) {
223
- options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
224
- const positions = options.polylinePositions;
225
- const shape = options.shapePositions;
226
- if (!defined_default(positions)) {
227
- throw new DeveloperError_default("options.polylinePositions is required.");
228
- }
229
- if (!defined_default(shape)) {
230
- throw new DeveloperError_default("options.shapePositions is required.");
231
- }
232
- this._positions = positions;
233
- this._shape = shape;
234
- this._ellipsoid = Ellipsoid_default.clone(
235
- defaultValue_default(options.ellipsoid, Ellipsoid_default.default)
236
- );
237
- this._cornerType = defaultValue_default(options.cornerType, CornerType_default.ROUNDED);
238
- this._vertexFormat = VertexFormat_default.clone(
239
- defaultValue_default(options.vertexFormat, VertexFormat_default.DEFAULT)
240
- );
241
- this._granularity = defaultValue_default(
242
- options.granularity,
243
- Math_default.RADIANS_PER_DEGREE
244
- );
245
- this._workerName = "createPolylineVolumeGeometry";
246
- let numComponents = 1 + positions.length * Cartesian3_default.packedLength;
247
- numComponents += 1 + shape.length * Cartesian2_default.packedLength;
248
- this.packedLength = numComponents + Ellipsoid_default.packedLength + VertexFormat_default.packedLength + 2;
249
- }
250
- PolylineVolumeGeometry.pack = function(value, array, startingIndex) {
251
- if (!defined_default(value)) {
252
- throw new DeveloperError_default("value is required");
253
- }
254
- if (!defined_default(array)) {
255
- throw new DeveloperError_default("array is required");
256
- }
257
- startingIndex = defaultValue_default(startingIndex, 0);
258
- let i;
259
- const positions = value._positions;
260
- let length = positions.length;
261
- array[startingIndex++] = length;
262
- for (i = 0; i < length; ++i, startingIndex += Cartesian3_default.packedLength) {
263
- Cartesian3_default.pack(positions[i], array, startingIndex);
264
- }
265
- const shape = value._shape;
266
- length = shape.length;
267
- array[startingIndex++] = length;
268
- for (i = 0; i < length; ++i, startingIndex += Cartesian2_default.packedLength) {
269
- Cartesian2_default.pack(shape[i], array, startingIndex);
270
- }
271
- Ellipsoid_default.pack(value._ellipsoid, array, startingIndex);
272
- startingIndex += Ellipsoid_default.packedLength;
273
- VertexFormat_default.pack(value._vertexFormat, array, startingIndex);
274
- startingIndex += VertexFormat_default.packedLength;
275
- array[startingIndex++] = value._cornerType;
276
- array[startingIndex] = value._granularity;
277
- return array;
278
- };
279
- var scratchEllipsoid = Ellipsoid_default.clone(Ellipsoid_default.UNIT_SPHERE);
280
- var scratchVertexFormat = new VertexFormat_default();
281
- var scratchOptions = {
282
- polylinePositions: void 0,
283
- shapePositions: void 0,
284
- ellipsoid: scratchEllipsoid,
285
- vertexFormat: scratchVertexFormat,
286
- cornerType: void 0,
287
- granularity: void 0
288
- };
289
- PolylineVolumeGeometry.unpack = function(array, startingIndex, result) {
290
- if (!defined_default(array)) {
291
- throw new DeveloperError_default("array is required");
292
- }
293
- startingIndex = defaultValue_default(startingIndex, 0);
294
- let i;
295
- let length = array[startingIndex++];
296
- const positions = new Array(length);
297
- for (i = 0; i < length; ++i, startingIndex += Cartesian3_default.packedLength) {
298
- positions[i] = Cartesian3_default.unpack(array, startingIndex);
299
- }
300
- length = array[startingIndex++];
301
- const shape = new Array(length);
302
- for (i = 0; i < length; ++i, startingIndex += Cartesian2_default.packedLength) {
303
- shape[i] = Cartesian2_default.unpack(array, startingIndex);
304
- }
305
- const ellipsoid = Ellipsoid_default.unpack(array, startingIndex, scratchEllipsoid);
306
- startingIndex += Ellipsoid_default.packedLength;
307
- const vertexFormat = VertexFormat_default.unpack(
308
- array,
309
- startingIndex,
310
- scratchVertexFormat
311
- );
312
- startingIndex += VertexFormat_default.packedLength;
313
- const cornerType = array[startingIndex++];
314
- const granularity = array[startingIndex];
315
- if (!defined_default(result)) {
316
- scratchOptions.polylinePositions = positions;
317
- scratchOptions.shapePositions = shape;
318
- scratchOptions.cornerType = cornerType;
319
- scratchOptions.granularity = granularity;
320
- return new PolylineVolumeGeometry(scratchOptions);
321
- }
322
- result._positions = positions;
323
- result._shape = shape;
324
- result._ellipsoid = Ellipsoid_default.clone(ellipsoid, result._ellipsoid);
325
- result._vertexFormat = VertexFormat_default.clone(vertexFormat, result._vertexFormat);
326
- result._cornerType = cornerType;
327
- result._granularity = granularity;
328
- return result;
329
- };
330
- var brScratch = new BoundingRectangle_default();
331
- PolylineVolumeGeometry.createGeometry = function(polylineVolumeGeometry) {
332
- const positions = polylineVolumeGeometry._positions;
333
- const cleanPositions = arrayRemoveDuplicates_default(
334
- positions,
335
- Cartesian3_default.equalsEpsilon
336
- );
337
- let shape2D = polylineVolumeGeometry._shape;
338
- shape2D = PolylineVolumeGeometryLibrary_default.removeDuplicatesFromShape(shape2D);
339
- if (cleanPositions.length < 2 || shape2D.length < 3) {
340
- return void 0;
341
- }
342
- if (PolygonPipeline_default.computeWindingOrder2D(shape2D) === WindingOrder_default.CLOCKWISE) {
343
- shape2D.reverse();
344
- }
345
- const boundingRectangle = BoundingRectangle_default.fromPoints(shape2D, brScratch);
346
- const computedPositions = PolylineVolumeGeometryLibrary_default.computePositions(
347
- cleanPositions,
348
- shape2D,
349
- boundingRectangle,
350
- polylineVolumeGeometry,
351
- true
352
- );
353
- return computeAttributes(
354
- computedPositions,
355
- shape2D,
356
- boundingRectangle,
357
- polylineVolumeGeometry._vertexFormat
358
- );
359
- };
360
- var PolylineVolumeGeometry_default = PolylineVolumeGeometry;
361
-
362
- // packages/engine/Source/Workers/createPolylineVolumeGeometry.js
363
- function createPolylineVolumeGeometry(polylineVolumeGeometry, offset) {
364
- if (defined_default(offset)) {
365
- polylineVolumeGeometry = PolylineVolumeGeometry_default.unpack(
366
- polylineVolumeGeometry,
367
- offset
368
- );
369
- }
370
- polylineVolumeGeometry._ellipsoid = Ellipsoid_default.clone(
371
- polylineVolumeGeometry._ellipsoid
372
- );
373
- return PolylineVolumeGeometry_default.createGeometry(polylineVolumeGeometry);
374
- }
375
- var createPolylineVolumeGeometry_default = createPolylineVolumeGeometry;
376
- export {
377
- createPolylineVolumeGeometry_default as default
378
- };
26
+ import{a as W}from"./chunk-WGGIH7QW.js";import{a as U}from"./chunk-VW6VD53G.js";import"./chunk-DEPHB2WM.js";import"./chunk-QOUAJ6TL.js";import{a as x,b as I,c as j}from"./chunk-B4AA3ARO.js";import"./chunk-XRL4AVS5.js";import"./chunk-U4IEOH5K.js";import{a as g}from"./chunk-CYCB63OH.js";import"./chunk-TCGIRNHN.js";import"./chunk-N4VJKXZS.js";import{a as $,b as M}from"./chunk-77IHZJJ3.js";import{a as Z}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 Q}from"./chunk-A56XVLQR.js";import{b as V,c as Y,d as B}from"./chunk-RCV6KWXS.js";import{d as K}from"./chunk-4IW2T6GF.js";import"./chunk-PSPPBZWI.js";import{a as N}from"./chunk-AU7IKHOH.js";import{a as E,c as D,d as f,f as J}from"./chunk-64RSHJUE.js";import{a as H}from"./chunk-3SSKC3VN.js";import"./chunk-OSW76XDF.js";import"./chunk-ED5JPB3S.js";import{a as A}from"./chunk-LEYMRMBK.js";import{e as _}from"./chunk-VTAIKJXX.js";function oe(t,e,n,o){let m=new Q;o.position&&(m.position=new B({componentDatatype:N.DOUBLE,componentsPerAttribute:3,values:t}));let i=e.length,u=t.length/3,w=(u-i*2)/(i*2),L=M.triangulate(e),R=(w-1)*i*6+L.length*2,r=X.createTypedArray(u,R),l,s,d,T,b,F,q=i*2,p=0;for(l=0;l<w-1;l++){for(s=0;s<i-1;s++)d=s*2+l*i*2,F=d+q,T=d+1,b=T+q,r[p++]=T,r[p++]=d,r[p++]=b,r[p++]=b,r[p++]=d,r[p++]=F;d=i*2-2+l*i*2,T=d+1,b=T+q,F=d+q,r[p++]=T,r[p++]=d,r[p++]=b,r[p++]=b,r[p++]=d,r[p++]=F}if(o.st||o.tangent||o.bitangent){let c=new Float32Array(u*2),C=1/(w-1),P=1/n.height,O=n.height/2,y,a,h=0;for(l=0;l<w;l++){for(y=l*C,a=P*(e[0].y+O),c[h++]=y,c[h++]=a,s=1;s<i;s++)a=P*(e[s].y+O),c[h++]=y,c[h++]=a,c[h++]=y,c[h++]=a;a=P*(e[0].y+O),c[h++]=y,c[h++]=a}for(s=0;s<i;s++)y=0,a=P*(e[s].y+O),c[h++]=y,c[h++]=a;for(s=0;s<i;s++)y=(w-1)*C,a=P*(e[s].y+O),c[h++]=y,c[h++]=a;m.st=new B({componentDatatype:N.FLOAT,componentsPerAttribute:2,values:new Float32Array(c)})}let G=u-i*2;for(l=0;l<L.length;l+=3){let c=L[l]+G,C=L[l+1]+G,P=L[l+2]+G;r[p++]=c,r[p++]=C,r[p++]=P,r[p++]=P+i,r[p++]=C+i,r[p++]=c+i}let k=new Y({attributes:m,indices:r,boundingSphere:K.fromVertices(t),primitiveType:V.TRIANGLES});if(o.normal&&(k=U.computeNormal(k)),o.tangent||o.bitangent){try{k=U.computeTangentAndBitangent(k)}catch{I("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}o.tangent||(k.attributes.tangent=void 0),o.bitangent||(k.attributes.bitangent=void 0),o.st||(k.attributes.st=void 0)}return k}function v(t){t=t??J.EMPTY_OBJECT;let e=t.polylinePositions,n=t.shapePositions;if(!_(e))throw new A("options.polylinePositions is required.");if(!_(n))throw new A("options.shapePositions is required.");this._positions=e,this._shape=n,this._ellipsoid=f.clone(t.ellipsoid??f.default),this._cornerType=t.cornerType??x.ROUNDED,this._vertexFormat=g.clone(t.vertexFormat??g.DEFAULT),this._granularity=t.granularity??H.RADIANS_PER_DEGREE,this._workerName="createPolylineVolumeGeometry";let o=1+e.length*E.packedLength;o+=1+n.length*D.packedLength,this.packedLength=o+f.packedLength+g.packedLength+2}v.pack=function(t,e,n){if(!_(t))throw new A("value is required");if(!_(e))throw new A("array is required");n=n??0;let o,m=t._positions,i=m.length;for(e[n++]=i,o=0;o<i;++o,n+=E.packedLength)E.pack(m[o],e,n);let u=t._shape;for(i=u.length,e[n++]=i,o=0;o<i;++o,n+=D.packedLength)D.pack(u[o],e,n);return f.pack(t._ellipsoid,e,n),n+=f.packedLength,g.pack(t._vertexFormat,e,n),n+=g.packedLength,e[n++]=t._cornerType,e[n]=t._granularity,e};var ee=f.clone(f.UNIT_SPHERE),te=new g,S={polylinePositions:void 0,shapePositions:void 0,ellipsoid:ee,vertexFormat:te,cornerType:void 0,granularity:void 0};v.unpack=function(t,e,n){if(!_(t))throw new A("array is required");e=e??0;let o,m=t[e++],i=new Array(m);for(o=0;o<m;++o,e+=E.packedLength)i[o]=E.unpack(t,e);m=t[e++];let u=new Array(m);for(o=0;o<m;++o,e+=D.packedLength)u[o]=D.unpack(t,e);let w=f.unpack(t,e,ee);e+=f.packedLength;let L=g.unpack(t,e,te);e+=g.packedLength;let R=t[e++],r=t[e];return _(n)?(n._positions=i,n._shape=u,n._ellipsoid=f.clone(w,n._ellipsoid),n._vertexFormat=g.clone(L,n._vertexFormat),n._cornerType=R,n._granularity=r,n):(S.polylinePositions=i,S.shapePositions=u,S.cornerType=R,S.granularity=r,new v(S))};var ne=new W;v.createGeometry=function(t){let e=t._positions,n=Z(e,E.equalsEpsilon),o=t._shape;if(o=j.removeDuplicatesFromShape(o),n.length<2||o.length<3)return;M.computeWindingOrder2D(o)===$.CLOCKWISE&&o.reverse();let m=W.fromPoints(o,ne),i=j.computePositions(n,o,m,t,!0);return oe(i,o,m,t._vertexFormat)};var z=v;function ie(t,e){return _(e)&&(t=z.unpack(t,e)),t._ellipsoid=f.clone(t._ellipsoid),z.createGeometry(t)}var Re=ie;export{Re as default};
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.122
4
+ * Version 1.132
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -23,253 +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
- BoundingRectangle_default
28
- } from "./chunk-FDOV2LBJ.js";
29
- import {
30
- CornerType_default,
31
- PolylineVolumeGeometryLibrary_default
32
- } from "./chunk-7O373FFS.js";
33
- import "./chunk-TGONEMZO.js";
34
- import "./chunk-BHQJ2NT7.js";
35
- import "./chunk-CKY7HOHV.js";
36
- import "./chunk-S6MRMMQU.js";
37
- import {
38
- PolygonPipeline_default,
39
- WindingOrder_default
40
- } from "./chunk-SMDOP47J.js";
41
- import {
42
- arrayRemoveDuplicates_default
43
- } from "./chunk-472HQ3EH.js";
44
- import "./chunk-E6V6SQZW.js";
45
- import "./chunk-3Q2L65QU.js";
46
- import "./chunk-2ZGOQXYU.js";
47
- import {
48
- IndexDatatype_default
49
- } from "./chunk-26GA3JAM.js";
50
- import {
51
- GeometryAttributes_default
52
- } from "./chunk-DI5NGJUP.js";
53
- import {
54
- GeometryAttribute_default,
55
- Geometry_default,
56
- PrimitiveType_default
57
- } from "./chunk-GWCFU2SA.js";
58
- import {
59
- BoundingSphere_default
60
- } from "./chunk-VJZB3WAV.js";
61
- import "./chunk-5PTXS2GO.js";
62
- import {
63
- ComponentDatatype_default
64
- } from "./chunk-K4GQUNB5.js";
65
- import {
66
- Cartesian2_default,
67
- Cartesian3_default,
68
- Ellipsoid_default
69
- } from "./chunk-YFXQECWV.js";
70
- import {
71
- Math_default
72
- } from "./chunk-XY4BATBS.js";
73
- import "./chunk-MXIZJAPH.js";
74
- import "./chunk-6CHGCNMW.js";
75
- import {
76
- defaultValue_default
77
- } from "./chunk-7JO7GPJN.js";
78
- import {
79
- DeveloperError_default
80
- } from "./chunk-AD63PIY6.js";
81
- import {
82
- defined_default
83
- } from "./chunk-E63IIM5T.js";
84
-
85
- // packages/engine/Source/Core/PolylineVolumeOutlineGeometry.js
86
- function computeAttributes(positions, shape) {
87
- const attributes = new GeometryAttributes_default();
88
- attributes.position = new GeometryAttribute_default({
89
- componentDatatype: ComponentDatatype_default.DOUBLE,
90
- componentsPerAttribute: 3,
91
- values: positions
92
- });
93
- const shapeLength = shape.length;
94
- const vertexCount = attributes.position.values.length / 3;
95
- const positionLength = positions.length / 3;
96
- const shapeCount = positionLength / shapeLength;
97
- const indices = IndexDatatype_default.createTypedArray(
98
- vertexCount,
99
- 2 * shapeLength * (shapeCount + 1)
100
- );
101
- let i, j;
102
- let index = 0;
103
- i = 0;
104
- let offset = i * shapeLength;
105
- for (j = 0; j < shapeLength - 1; j++) {
106
- indices[index++] = j + offset;
107
- indices[index++] = j + offset + 1;
108
- }
109
- indices[index++] = shapeLength - 1 + offset;
110
- indices[index++] = offset;
111
- i = shapeCount - 1;
112
- offset = i * shapeLength;
113
- for (j = 0; j < shapeLength - 1; j++) {
114
- indices[index++] = j + offset;
115
- indices[index++] = j + offset + 1;
116
- }
117
- indices[index++] = shapeLength - 1 + offset;
118
- indices[index++] = offset;
119
- for (i = 0; i < shapeCount - 1; i++) {
120
- const firstOffset = shapeLength * i;
121
- const secondOffset = firstOffset + shapeLength;
122
- for (j = 0; j < shapeLength; j++) {
123
- indices[index++] = j + firstOffset;
124
- indices[index++] = j + secondOffset;
125
- }
126
- }
127
- const geometry = new Geometry_default({
128
- attributes,
129
- indices: IndexDatatype_default.createTypedArray(vertexCount, indices),
130
- boundingSphere: BoundingSphere_default.fromVertices(positions),
131
- primitiveType: PrimitiveType_default.LINES
132
- });
133
- return geometry;
134
- }
135
- function PolylineVolumeOutlineGeometry(options) {
136
- options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
137
- const positions = options.polylinePositions;
138
- const shape = options.shapePositions;
139
- if (!defined_default(positions)) {
140
- throw new DeveloperError_default("options.polylinePositions is required.");
141
- }
142
- if (!defined_default(shape)) {
143
- throw new DeveloperError_default("options.shapePositions is required.");
144
- }
145
- this._positions = positions;
146
- this._shape = shape;
147
- this._ellipsoid = Ellipsoid_default.clone(
148
- defaultValue_default(options.ellipsoid, Ellipsoid_default.default)
149
- );
150
- this._cornerType = defaultValue_default(options.cornerType, CornerType_default.ROUNDED);
151
- this._granularity = defaultValue_default(
152
- options.granularity,
153
- Math_default.RADIANS_PER_DEGREE
154
- );
155
- this._workerName = "createPolylineVolumeOutlineGeometry";
156
- let numComponents = 1 + positions.length * Cartesian3_default.packedLength;
157
- numComponents += 1 + shape.length * Cartesian2_default.packedLength;
158
- this.packedLength = numComponents + Ellipsoid_default.packedLength + 2;
159
- }
160
- PolylineVolumeOutlineGeometry.pack = function(value, array, startingIndex) {
161
- if (!defined_default(value)) {
162
- throw new DeveloperError_default("value is required");
163
- }
164
- if (!defined_default(array)) {
165
- throw new DeveloperError_default("array is required");
166
- }
167
- startingIndex = defaultValue_default(startingIndex, 0);
168
- let i;
169
- const positions = value._positions;
170
- let length = positions.length;
171
- array[startingIndex++] = length;
172
- for (i = 0; i < length; ++i, startingIndex += Cartesian3_default.packedLength) {
173
- Cartesian3_default.pack(positions[i], array, startingIndex);
174
- }
175
- const shape = value._shape;
176
- length = shape.length;
177
- array[startingIndex++] = length;
178
- for (i = 0; i < length; ++i, startingIndex += Cartesian2_default.packedLength) {
179
- Cartesian2_default.pack(shape[i], array, startingIndex);
180
- }
181
- Ellipsoid_default.pack(value._ellipsoid, array, startingIndex);
182
- startingIndex += Ellipsoid_default.packedLength;
183
- array[startingIndex++] = value._cornerType;
184
- array[startingIndex] = value._granularity;
185
- return array;
186
- };
187
- var scratchEllipsoid = Ellipsoid_default.clone(Ellipsoid_default.UNIT_SPHERE);
188
- var scratchOptions = {
189
- polylinePositions: void 0,
190
- shapePositions: void 0,
191
- ellipsoid: scratchEllipsoid,
192
- height: void 0,
193
- cornerType: void 0,
194
- granularity: void 0
195
- };
196
- PolylineVolumeOutlineGeometry.unpack = function(array, startingIndex, result) {
197
- if (!defined_default(array)) {
198
- throw new DeveloperError_default("array is required");
199
- }
200
- startingIndex = defaultValue_default(startingIndex, 0);
201
- let i;
202
- let length = array[startingIndex++];
203
- const positions = new Array(length);
204
- for (i = 0; i < length; ++i, startingIndex += Cartesian3_default.packedLength) {
205
- positions[i] = Cartesian3_default.unpack(array, startingIndex);
206
- }
207
- length = array[startingIndex++];
208
- const shape = new Array(length);
209
- for (i = 0; i < length; ++i, startingIndex += Cartesian2_default.packedLength) {
210
- shape[i] = Cartesian2_default.unpack(array, startingIndex);
211
- }
212
- const ellipsoid = Ellipsoid_default.unpack(array, startingIndex, scratchEllipsoid);
213
- startingIndex += Ellipsoid_default.packedLength;
214
- const cornerType = array[startingIndex++];
215
- const granularity = array[startingIndex];
216
- if (!defined_default(result)) {
217
- scratchOptions.polylinePositions = positions;
218
- scratchOptions.shapePositions = shape;
219
- scratchOptions.cornerType = cornerType;
220
- scratchOptions.granularity = granularity;
221
- return new PolylineVolumeOutlineGeometry(scratchOptions);
222
- }
223
- result._positions = positions;
224
- result._shape = shape;
225
- result._ellipsoid = Ellipsoid_default.clone(ellipsoid, result._ellipsoid);
226
- result._cornerType = cornerType;
227
- result._granularity = granularity;
228
- return result;
229
- };
230
- var brScratch = new BoundingRectangle_default();
231
- PolylineVolumeOutlineGeometry.createGeometry = function(polylineVolumeOutlineGeometry) {
232
- const positions = polylineVolumeOutlineGeometry._positions;
233
- const cleanPositions = arrayRemoveDuplicates_default(
234
- positions,
235
- Cartesian3_default.equalsEpsilon
236
- );
237
- let shape2D = polylineVolumeOutlineGeometry._shape;
238
- shape2D = PolylineVolumeGeometryLibrary_default.removeDuplicatesFromShape(shape2D);
239
- if (cleanPositions.length < 2 || shape2D.length < 3) {
240
- return void 0;
241
- }
242
- if (PolygonPipeline_default.computeWindingOrder2D(shape2D) === WindingOrder_default.CLOCKWISE) {
243
- shape2D.reverse();
244
- }
245
- const boundingRectangle = BoundingRectangle_default.fromPoints(shape2D, brScratch);
246
- const computedPositions = PolylineVolumeGeometryLibrary_default.computePositions(
247
- cleanPositions,
248
- shape2D,
249
- boundingRectangle,
250
- polylineVolumeOutlineGeometry,
251
- false
252
- );
253
- return computeAttributes(computedPositions, shape2D);
254
- };
255
- var PolylineVolumeOutlineGeometry_default = PolylineVolumeOutlineGeometry;
256
-
257
- // packages/engine/Source/Workers/createPolylineVolumeOutlineGeometry.js
258
- function createPolylineVolumeOutlineGeometry(polylineVolumeOutlineGeometry, offset) {
259
- if (defined_default(offset)) {
260
- polylineVolumeOutlineGeometry = PolylineVolumeOutlineGeometry_default.unpack(
261
- polylineVolumeOutlineGeometry,
262
- offset
263
- );
264
- }
265
- polylineVolumeOutlineGeometry._ellipsoid = Ellipsoid_default.clone(
266
- polylineVolumeOutlineGeometry._ellipsoid
267
- );
268
- return PolylineVolumeOutlineGeometry_default.createGeometry(
269
- polylineVolumeOutlineGeometry
270
- );
271
- }
272
- var createPolylineVolumeOutlineGeometry_default = createPolylineVolumeOutlineGeometry;
273
- export {
274
- createPolylineVolumeOutlineGeometry_default as default
275
- };
26
+ import{a as k}from"./chunk-WGGIH7QW.js";import{a as N,c as w}from"./chunk-B4AA3ARO.js";import"./chunk-XRL4AVS5.js";import"./chunk-U4IEOH5K.js";import"./chunk-TCGIRNHN.js";import"./chunk-N4VJKXZS.js";import{a as v,b as G}from"./chunk-77IHZJJ3.js";import{a as q}from"./chunk-3W4GT7KQ.js";import"./chunk-G5AGHVVC.js";import"./chunk-DMEY62ID.js";import"./chunk-HTFSEEMT.js";import{a as g}from"./chunk-OFUUQVMR.js";import{a as O}from"./chunk-A56XVLQR.js";import{b as A,c as R,d as S}from"./chunk-RCV6KWXS.js";import{d as C}from"./chunk-4IW2T6GF.js";import"./chunk-PSPPBZWI.js";import{a as b}from"./chunk-AU7IKHOH.js";import{a as d,c as y,d as s,f as D}from"./chunk-64RSHJUE.js";import{a as T}from"./chunk-3SSKC3VN.js";import"./chunk-OSW76XDF.js";import"./chunk-ED5JPB3S.js";import{a}from"./chunk-LEYMRMBK.js";import{e as u}from"./chunk-VTAIKJXX.js";function W(o,i){let t=new O;t.position=new S({componentDatatype:b.DOUBLE,componentsPerAttribute:3,values:o});let e=i.length,r=t.position.values.length/3,f=o.length/3/e,p=g.createTypedArray(r,2*e*(f+1)),m,n,l=0;m=0;let h=m*e;for(n=0;n<e-1;n++)p[l++]=n+h,p[l++]=n+h+1;for(p[l++]=e-1+h,p[l++]=h,m=f-1,h=m*e,n=0;n<e-1;n++)p[l++]=n+h,p[l++]=n+h+1;for(p[l++]=e-1+h,p[l++]=h,m=0;m<f-1;m++){let L=e*m,U=L+e;for(n=0;n<e;n++)p[l++]=n+L,p[l++]=n+U}return new R({attributes:t,indices:g.createTypedArray(r,p),boundingSphere:C.fromVertices(o),primitiveType:A.LINES})}function P(o){o=o??D.EMPTY_OBJECT;let i=o.polylinePositions,t=o.shapePositions;if(!u(i))throw new a("options.polylinePositions is required.");if(!u(t))throw new a("options.shapePositions is required.");this._positions=i,this._shape=t,this._ellipsoid=s.clone(o.ellipsoid??s.default),this._cornerType=o.cornerType??N.ROUNDED,this._granularity=o.granularity??T.RADIANS_PER_DEGREE,this._workerName="createPolylineVolumeOutlineGeometry";let e=1+i.length*d.packedLength;e+=1+t.length*y.packedLength,this.packedLength=e+s.packedLength+2}P.pack=function(o,i,t){if(!u(o))throw new a("value is required");if(!u(i))throw new a("array is required");t=t??0;let e,r=o._positions,c=r.length;for(i[t++]=c,e=0;e<c;++e,t+=d.packedLength)d.pack(r[e],i,t);let f=o._shape;for(c=f.length,i[t++]=c,e=0;e<c;++e,t+=y.packedLength)y.pack(f[e],i,t);return s.pack(o._ellipsoid,i,t),t+=s.packedLength,i[t++]=o._cornerType,i[t]=o._granularity,i};var B=s.clone(s.UNIT_SPHERE),_={polylinePositions:void 0,shapePositions:void 0,ellipsoid:B,height:void 0,cornerType:void 0,granularity:void 0};P.unpack=function(o,i,t){if(!u(o))throw new a("array is required");i=i??0;let e,r=o[i++],c=new Array(r);for(e=0;e<r;++e,i+=d.packedLength)c[e]=d.unpack(o,i);r=o[i++];let f=new Array(r);for(e=0;e<r;++e,i+=y.packedLength)f[e]=y.unpack(o,i);let p=s.unpack(o,i,B);i+=s.packedLength;let m=o[i++],n=o[i];return u(t)?(t._positions=c,t._shape=f,t._ellipsoid=s.clone(p,t._ellipsoid),t._cornerType=m,t._granularity=n,t):(_.polylinePositions=c,_.shapePositions=f,_.cornerType=m,_.granularity=n,new P(_))};var F=new k;P.createGeometry=function(o){let i=o._positions,t=q(i,d.equalsEpsilon),e=o._shape;if(e=w.removeDuplicatesFromShape(e),t.length<2||e.length<3)return;G.computeWindingOrder2D(e)===v.CLOCKWISE&&e.reverse();let r=k.fromPoints(e,F),c=w.computePositions(t,e,r,o,!1);return W(c,e)};var E=P;function M(o,i){return u(i)&&(o=E.unpack(o,i)),o._ellipsoid=s.clone(o._ellipsoid),E.createGeometry(o)}var he=M;export{he as default};