@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,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,365 +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
- Color_default
28
- } from "./chunk-PGSJK77E.js";
29
- import {
30
- CylinderGeometry_default
31
- } from "./chunk-GRC2ZTAF.js";
32
- import "./chunk-34FXV7D7.js";
33
- import {
34
- EllipsoidGeometry_default
35
- } from "./chunk-M7ERACJJ.js";
36
- import {
37
- createTaskProcessorWorker_default
38
- } from "./chunk-3VAZEH7M.js";
39
- import {
40
- BoxGeometry_default
41
- } from "./chunk-VOXYEYJT.js";
42
- import "./chunk-F3YA3Y2Z.js";
43
- import "./chunk-2FWRMUTY.js";
44
- import {
45
- IndexDatatype_default
46
- } from "./chunk-LPR3YNP2.js";
47
- import "./chunk-4H7PY4U5.js";
48
- import "./chunk-7TC63SJW.js";
49
- import {
50
- BoundingSphere_default
51
- } from "./chunk-FJKNFAKQ.js";
52
- import "./chunk-TTUZP4BO.js";
53
- import "./chunk-BG4UCVXN.js";
54
- import {
55
- Matrix4_default
56
- } from "./chunk-YJEBABKH.js";
57
- import "./chunk-PPH7OFP3.js";
58
- import {
59
- Cartesian3_default
60
- } from "./chunk-OGXZVPPM.js";
61
- import "./chunk-5QULIR53.js";
62
- import "./chunk-SOWMRMWA.js";
63
- import "./chunk-STW2DGFI.js";
64
- import "./chunk-BBWDMCVU.js";
65
- import "./chunk-XGI5BXZY.js";
66
- import {
67
- defined_default
68
- } from "./chunk-YWTJ2B4B.js";
69
-
70
- // packages/engine/Source/Scene/Vector3DTileBatch.js
71
- function Vector3DTileBatch(options) {
72
- this.offset = options.offset;
73
- this.count = options.count;
74
- this.color = options.color;
75
- this.batchIds = options.batchIds;
76
- }
77
- var Vector3DTileBatch_default = Vector3DTileBatch;
78
-
79
- // packages/engine/Source/Workers/createVectorTileGeometries.js
80
- var scratchCartesian = new Cartesian3_default();
81
- var packedBoxLength = Matrix4_default.packedLength + Cartesian3_default.packedLength;
82
- var packedCylinderLength = Matrix4_default.packedLength + 2;
83
- var packedEllipsoidLength = Matrix4_default.packedLength + Cartesian3_default.packedLength;
84
- var packedSphereLength = Cartesian3_default.packedLength + 1;
85
- var scratchModelMatrixAndBV = {
86
- modelMatrix: new Matrix4_default(),
87
- boundingVolume: new BoundingSphere_default()
88
- };
89
- function boxModelMatrixAndBoundingVolume(boxes, index) {
90
- let boxIndex = index * packedBoxLength;
91
- const dimensions = Cartesian3_default.unpack(boxes, boxIndex, scratchCartesian);
92
- boxIndex += Cartesian3_default.packedLength;
93
- const boxModelMatrix = Matrix4_default.unpack(
94
- boxes,
95
- boxIndex,
96
- scratchModelMatrixAndBV.modelMatrix
97
- );
98
- Matrix4_default.multiplyByScale(boxModelMatrix, dimensions, boxModelMatrix);
99
- const boundingVolume = scratchModelMatrixAndBV.boundingVolume;
100
- Cartesian3_default.clone(Cartesian3_default.ZERO, boundingVolume.center);
101
- boundingVolume.radius = Math.sqrt(3);
102
- return scratchModelMatrixAndBV;
103
- }
104
- function cylinderModelMatrixAndBoundingVolume(cylinders, index) {
105
- let cylinderIndex = index * packedCylinderLength;
106
- const cylinderRadius = cylinders[cylinderIndex++];
107
- const length = cylinders[cylinderIndex++];
108
- const scale = Cartesian3_default.fromElements(
109
- cylinderRadius,
110
- cylinderRadius,
111
- length,
112
- scratchCartesian
113
- );
114
- const cylinderModelMatrix = Matrix4_default.unpack(
115
- cylinders,
116
- cylinderIndex,
117
- scratchModelMatrixAndBV.modelMatrix
118
- );
119
- Matrix4_default.multiplyByScale(cylinderModelMatrix, scale, cylinderModelMatrix);
120
- const boundingVolume = scratchModelMatrixAndBV.boundingVolume;
121
- Cartesian3_default.clone(Cartesian3_default.ZERO, boundingVolume.center);
122
- boundingVolume.radius = Math.sqrt(2);
123
- return scratchModelMatrixAndBV;
124
- }
125
- function ellipsoidModelMatrixAndBoundingVolume(ellipsoids, index) {
126
- let ellipsoidIndex = index * packedEllipsoidLength;
127
- const radii = Cartesian3_default.unpack(ellipsoids, ellipsoidIndex, scratchCartesian);
128
- ellipsoidIndex += Cartesian3_default.packedLength;
129
- const ellipsoidModelMatrix = Matrix4_default.unpack(
130
- ellipsoids,
131
- ellipsoidIndex,
132
- scratchModelMatrixAndBV.modelMatrix
133
- );
134
- Matrix4_default.multiplyByScale(ellipsoidModelMatrix, radii, ellipsoidModelMatrix);
135
- const boundingVolume = scratchModelMatrixAndBV.boundingVolume;
136
- Cartesian3_default.clone(Cartesian3_default.ZERO, boundingVolume.center);
137
- boundingVolume.radius = 1;
138
- return scratchModelMatrixAndBV;
139
- }
140
- function sphereModelMatrixAndBoundingVolume(spheres, index) {
141
- let sphereIndex = index * packedSphereLength;
142
- const sphereRadius = spheres[sphereIndex++];
143
- const sphereTranslation = Cartesian3_default.unpack(
144
- spheres,
145
- sphereIndex,
146
- scratchCartesian
147
- );
148
- const sphereModelMatrix = Matrix4_default.fromTranslation(
149
- sphereTranslation,
150
- scratchModelMatrixAndBV.modelMatrix
151
- );
152
- Matrix4_default.multiplyByUniformScale(
153
- sphereModelMatrix,
154
- sphereRadius,
155
- sphereModelMatrix
156
- );
157
- const boundingVolume = scratchModelMatrixAndBV.boundingVolume;
158
- Cartesian3_default.clone(Cartesian3_default.ZERO, boundingVolume.center);
159
- boundingVolume.radius = 1;
160
- return scratchModelMatrixAndBV;
161
- }
162
- var scratchPosition = new Cartesian3_default();
163
- function createPrimitive(options, primitive, primitiveBatchIds, geometry, getModelMatrixAndBoundingVolume) {
164
- if (!defined_default(primitive)) {
165
- return;
166
- }
167
- const numberOfPrimitives = primitiveBatchIds.length;
168
- const geometryPositions = geometry.attributes.position.values;
169
- const geometryIndices = geometry.indices;
170
- const positions = options.positions;
171
- const vertexBatchIds = options.vertexBatchIds;
172
- const indices = options.indices;
173
- const batchIds = options.batchIds;
174
- const batchTableColors = options.batchTableColors;
175
- const batchedIndices = options.batchedIndices;
176
- const indexOffsets = options.indexOffsets;
177
- const indexCounts = options.indexCounts;
178
- const boundingVolumes = options.boundingVolumes;
179
- const modelMatrix = options.modelMatrix;
180
- const center = options.center;
181
- let positionOffset = options.positionOffset;
182
- let batchIdIndex = options.batchIdIndex;
183
- let indexOffset = options.indexOffset;
184
- const batchedIndicesOffset = options.batchedIndicesOffset;
185
- for (let i = 0; i < numberOfPrimitives; ++i) {
186
- const primitiveModelMatrixAndBV = getModelMatrixAndBoundingVolume(
187
- primitive,
188
- i
189
- );
190
- const primitiveModelMatrix = primitiveModelMatrixAndBV.modelMatrix;
191
- Matrix4_default.multiply(modelMatrix, primitiveModelMatrix, primitiveModelMatrix);
192
- const batchId = primitiveBatchIds[i];
193
- const positionsLength = geometryPositions.length;
194
- for (let j = 0; j < positionsLength; j += 3) {
195
- const position = Cartesian3_default.unpack(geometryPositions, j, scratchPosition);
196
- Matrix4_default.multiplyByPoint(primitiveModelMatrix, position, position);
197
- Cartesian3_default.subtract(position, center, position);
198
- Cartesian3_default.pack(position, positions, positionOffset * 3 + j);
199
- vertexBatchIds[batchIdIndex++] = batchId;
200
- }
201
- const indicesLength = geometryIndices.length;
202
- for (let k = 0; k < indicesLength; ++k) {
203
- indices[indexOffset + k] = geometryIndices[k] + positionOffset;
204
- }
205
- const offset = i + batchedIndicesOffset;
206
- batchedIndices[offset] = new Vector3DTileBatch_default({
207
- offset: indexOffset,
208
- count: indicesLength,
209
- color: Color_default.fromRgba(batchTableColors[batchId]),
210
- batchIds: [batchId]
211
- });
212
- batchIds[offset] = batchId;
213
- indexOffsets[offset] = indexOffset;
214
- indexCounts[offset] = indicesLength;
215
- boundingVolumes[offset] = BoundingSphere_default.transform(
216
- primitiveModelMatrixAndBV.boundingVolume,
217
- primitiveModelMatrix
218
- );
219
- positionOffset += positionsLength / 3;
220
- indexOffset += indicesLength;
221
- }
222
- options.positionOffset = positionOffset;
223
- options.batchIdIndex = batchIdIndex;
224
- options.indexOffset = indexOffset;
225
- options.batchedIndicesOffset += numberOfPrimitives;
226
- }
227
- var scratchCenter = new Cartesian3_default();
228
- var scratchMatrix4 = new Matrix4_default();
229
- function unpackBuffer(buffer) {
230
- const packedBuffer = new Float64Array(buffer);
231
- let offset = 0;
232
- Cartesian3_default.unpack(packedBuffer, offset, scratchCenter);
233
- offset += Cartesian3_default.packedLength;
234
- Matrix4_default.unpack(packedBuffer, offset, scratchMatrix4);
235
- }
236
- function packedBatchedIndicesLength(batchedIndices) {
237
- const length = batchedIndices.length;
238
- let count = 0;
239
- for (let i = 0; i < length; ++i) {
240
- count += Color_default.packedLength + 3 + batchedIndices[i].batchIds.length;
241
- }
242
- return count;
243
- }
244
- function packBuffer(indicesBytesPerElement, batchedIndices, boundingVolumes) {
245
- const numBVs = boundingVolumes.length;
246
- const length = 1 + 1 + numBVs * BoundingSphere_default.packedLength + 1 + packedBatchedIndicesLength(batchedIndices);
247
- const packedBuffer = new Float64Array(length);
248
- let offset = 0;
249
- packedBuffer[offset++] = indicesBytesPerElement;
250
- packedBuffer[offset++] = numBVs;
251
- for (let i = 0; i < numBVs; ++i) {
252
- BoundingSphere_default.pack(boundingVolumes[i], packedBuffer, offset);
253
- offset += BoundingSphere_default.packedLength;
254
- }
255
- const indicesLength = batchedIndices.length;
256
- packedBuffer[offset++] = indicesLength;
257
- for (let j = 0; j < indicesLength; ++j) {
258
- const batchedIndex = batchedIndices[j];
259
- Color_default.pack(batchedIndex.color, packedBuffer, offset);
260
- offset += Color_default.packedLength;
261
- packedBuffer[offset++] = batchedIndex.offset;
262
- packedBuffer[offset++] = batchedIndex.count;
263
- const batchIds = batchedIndex.batchIds;
264
- const batchIdsLength = batchIds.length;
265
- packedBuffer[offset++] = batchIdsLength;
266
- for (let k = 0; k < batchIdsLength; ++k) {
267
- packedBuffer[offset++] = batchIds[k];
268
- }
269
- }
270
- return packedBuffer;
271
- }
272
- function createVectorTileGeometries(parameters, transferableObjects) {
273
- const boxes = defined_default(parameters.boxes) ? new Float32Array(parameters.boxes) : void 0;
274
- const boxBatchIds = defined_default(parameters.boxBatchIds) ? new Uint16Array(parameters.boxBatchIds) : void 0;
275
- const cylinders = defined_default(parameters.cylinders) ? new Float32Array(parameters.cylinders) : void 0;
276
- const cylinderBatchIds = defined_default(parameters.cylinderBatchIds) ? new Uint16Array(parameters.cylinderBatchIds) : void 0;
277
- const ellipsoids = defined_default(parameters.ellipsoids) ? new Float32Array(parameters.ellipsoids) : void 0;
278
- const ellipsoidBatchIds = defined_default(parameters.ellipsoidBatchIds) ? new Uint16Array(parameters.ellipsoidBatchIds) : void 0;
279
- const spheres = defined_default(parameters.spheres) ? new Float32Array(parameters.spheres) : void 0;
280
- const sphereBatchIds = defined_default(parameters.sphereBatchIds) ? new Uint16Array(parameters.sphereBatchIds) : void 0;
281
- const numberOfBoxes = defined_default(boxes) ? boxBatchIds.length : 0;
282
- const numberOfCylinders = defined_default(cylinders) ? cylinderBatchIds.length : 0;
283
- const numberOfEllipsoids = defined_default(ellipsoids) ? ellipsoidBatchIds.length : 0;
284
- const numberOfSpheres = defined_default(spheres) ? sphereBatchIds.length : 0;
285
- const boxGeometry = BoxGeometry_default.getUnitBox();
286
- const cylinderGeometry = CylinderGeometry_default.getUnitCylinder();
287
- const ellipsoidGeometry = EllipsoidGeometry_default.getUnitEllipsoid();
288
- const boxPositions = boxGeometry.attributes.position.values;
289
- const cylinderPositions = cylinderGeometry.attributes.position.values;
290
- const ellipsoidPositions = ellipsoidGeometry.attributes.position.values;
291
- let numberOfPositions = boxPositions.length * numberOfBoxes;
292
- numberOfPositions += cylinderPositions.length * numberOfCylinders;
293
- numberOfPositions += ellipsoidPositions.length * (numberOfEllipsoids + numberOfSpheres);
294
- const boxIndices = boxGeometry.indices;
295
- const cylinderIndices = cylinderGeometry.indices;
296
- const ellipsoidIndices = ellipsoidGeometry.indices;
297
- let numberOfIndices = boxIndices.length * numberOfBoxes;
298
- numberOfIndices += cylinderIndices.length * numberOfCylinders;
299
- numberOfIndices += ellipsoidIndices.length * (numberOfEllipsoids + numberOfSpheres);
300
- const positions = new Float32Array(numberOfPositions);
301
- const vertexBatchIds = new Uint16Array(numberOfPositions / 3);
302
- const indices = IndexDatatype_default.createTypedArray(
303
- numberOfPositions / 3,
304
- numberOfIndices
305
- );
306
- const numberOfGeometries = numberOfBoxes + numberOfCylinders + numberOfEllipsoids + numberOfSpheres;
307
- const batchIds = new Uint16Array(numberOfGeometries);
308
- const batchedIndices = new Array(numberOfGeometries);
309
- const indexOffsets = new Uint32Array(numberOfGeometries);
310
- const indexCounts = new Uint32Array(numberOfGeometries);
311
- const boundingVolumes = new Array(numberOfGeometries);
312
- unpackBuffer(parameters.packedBuffer);
313
- const options = {
314
- batchTableColors: new Uint32Array(parameters.batchTableColors),
315
- positions,
316
- vertexBatchIds,
317
- indices,
318
- batchIds,
319
- batchedIndices,
320
- indexOffsets,
321
- indexCounts,
322
- boundingVolumes,
323
- positionOffset: 0,
324
- batchIdIndex: 0,
325
- indexOffset: 0,
326
- batchedIndicesOffset: 0,
327
- modelMatrix: scratchMatrix4,
328
- center: scratchCenter
329
- };
330
- createPrimitive(
331
- options,
332
- boxes,
333
- boxBatchIds,
334
- boxGeometry,
335
- boxModelMatrixAndBoundingVolume
336
- );
337
- createPrimitive(
338
- options,
339
- cylinders,
340
- cylinderBatchIds,
341
- cylinderGeometry,
342
- cylinderModelMatrixAndBoundingVolume
343
- );
344
- createPrimitive(
345
- options,
346
- ellipsoids,
347
- ellipsoidBatchIds,
348
- ellipsoidGeometry,
349
- ellipsoidModelMatrixAndBoundingVolume
350
- );
351
- createPrimitive(
352
- options,
353
- spheres,
354
- sphereBatchIds,
355
- ellipsoidGeometry,
356
- sphereModelMatrixAndBoundingVolume
357
- );
358
- const packedBuffer = packBuffer(
359
- indices.BYTES_PER_ELEMENT,
360
- batchedIndices,
361
- boundingVolumes
362
- );
363
- transferableObjects.push(
364
- positions.buffer,
365
- vertexBatchIds.buffer,
366
- indices.buffer
367
- );
368
- transferableObjects.push(
369
- batchIds.buffer,
370
- indexOffsets.buffer,
371
- indexCounts.buffer
372
- );
373
- transferableObjects.push(packedBuffer.buffer);
374
- return {
375
- positions: positions.buffer,
376
- vertexBatchIds: vertexBatchIds.buffer,
377
- indices: indices.buffer,
378
- indexOffsets: indexOffsets.buffer,
379
- indexCounts: indexCounts.buffer,
380
- batchIds: batchIds.buffer,
381
- packedBuffer: packedBuffer.buffer
382
- };
383
- }
384
- var createVectorTileGeometries_default = createTaskProcessorWorker_default(createVectorTileGeometries);
385
- export {
386
- createVectorTileGeometries_default as default
387
- };
26
+ import{a as P}from"./chunk-HMIYSTF6.js";import{a as z}from"./chunk-GILIDQNQ.js";import"./chunk-ARG42DC4.js";import{a as H}from"./chunk-37F5JSTI.js";import{a as Y}from"./chunk-WZDE3RYP.js";import{a as j}from"./chunk-QN3VOORQ.js";import"./chunk-GBYLG25F.js";import"./chunk-CYCB63OH.js";import{a as W}from"./chunk-OFUUQVMR.js";import"./chunk-A56XVLQR.js";import"./chunk-RCV6KWXS.js";import{d as E}from"./chunk-4IW2T6GF.js";import{b as d}from"./chunk-PSPPBZWI.js";import"./chunk-AU7IKHOH.js";import{a as o}from"./chunk-64RSHJUE.js";import"./chunk-3SSKC3VN.js";import"./chunk-OSW76XDF.js";import"./chunk-ED5JPB3S.js";import"./chunk-LEYMRMBK.js";import{e as l}from"./chunk-VTAIKJXX.js";function X(e){this.offset=e.offset,this.count=e.count,this.color=e.color,this.batchIds=e.batchIds}var J=X;var S=new o,$=d.packedLength+o.packedLength,ee=d.packedLength+2,ne=d.packedLength+o.packedLength,te=o.packedLength+1,u={modelMatrix:new d,boundingVolume:new E};function oe(e,c){let n=c*$,i=o.unpack(e,n,S);n+=o.packedLength;let r=d.unpack(e,n,u.modelMatrix);d.multiplyByScale(r,i,r);let t=u.boundingVolume;return o.clone(o.ZERO,t.center),t.radius=Math.sqrt(3),u}function ce(e,c){let n=c*ee,i=e[n++],r=e[n++],t=o.fromElements(i,i,r,S),s=d.unpack(e,n,u.modelMatrix);d.multiplyByScale(s,t,s);let h=u.boundingVolume;return o.clone(o.ZERO,h.center),h.radius=Math.sqrt(2),u}function se(e,c){let n=c*ne,i=o.unpack(e,n,S);n+=o.packedLength;let r=d.unpack(e,n,u.modelMatrix);d.multiplyByScale(r,i,r);let t=u.boundingVolume;return o.clone(o.ZERO,t.center),t.radius=1,u}function ie(e,c){let n=c*te,i=e[n++],r=o.unpack(e,n,S),t=d.fromTranslation(r,u.modelMatrix);d.multiplyByUniformScale(t,i,t);let s=u.boundingVolume;return o.clone(o.ZERO,s.center),s.radius=1,u}var de=new o;function R(e,c,n,i,r){if(!l(c))return;let t=n.length,s=i.attributes.position.values,h=i.indices,a=e.positions,x=e.vertexBatchIds,y=e.indices,I=e.batchIds,p=e.batchTableColors,T=e.batchedIndices,U=e.indexOffsets,v=e.indexCounts,L=e.boundingVolumes,F=e.modelMatrix,Z=e.center,V=e.positionOffset,B=e.batchIdIndex,O=e.indexOffset,D=e.batchedIndicesOffset;for(let w=0;w<t;++w){let C=r(c,w),k=C.modelMatrix;d.multiply(F,k,k);let M=n[w],A=s.length;for(let f=0;f<A;f+=3){let m=o.unpack(s,f,de);d.multiplyByPoint(k,m,m),o.subtract(m,Z,m),o.pack(m,a,V*3+f),x[B++]=M}let b=h.length;for(let f=0;f<b;++f)y[O+f]=h[f]+V;let g=w+D;T[g]=new J({offset:O,count:b,color:P.fromRgba(p[M]),batchIds:[M]}),I[g]=M,U[g]=O,v[g]=b,L[g]=E.transform(C.boundingVolume,k),V+=A/3,O+=b}e.positionOffset=V,e.batchIdIndex=B,e.indexOffset=O,e.batchedIndicesOffset+=t}var K=new o,Q=new d;function re(e){let c=new Float64Array(e),n=0;o.unpack(c,n,K),n+=o.packedLength,d.unpack(c,n,Q)}function le(e){let c=e.length,n=0;for(let i=0;i<c;++i)n+=P.packedLength+3+e[i].batchIds.length;return n}function ae(e,c,n){let i=n.length,r=2+i*E.packedLength+1+le(c),t=new Float64Array(r),s=0;t[s++]=e,t[s++]=i;for(let a=0;a<i;++a)E.pack(n[a],t,s),s+=E.packedLength;let h=c.length;t[s++]=h;for(let a=0;a<h;++a){let x=c[a];P.pack(x.color,t,s),s+=P.packedLength,t[s++]=x.offset,t[s++]=x.count;let y=x.batchIds,I=y.length;t[s++]=I;for(let p=0;p<I;++p)t[s++]=y[p]}return t}function fe(e,c){let n=l(e.boxes)?new Float32Array(e.boxes):void 0,i=l(e.boxBatchIds)?new Uint16Array(e.boxBatchIds):void 0,r=l(e.cylinders)?new Float32Array(e.cylinders):void 0,t=l(e.cylinderBatchIds)?new Uint16Array(e.cylinderBatchIds):void 0,s=l(e.ellipsoids)?new Float32Array(e.ellipsoids):void 0,h=l(e.ellipsoidBatchIds)?new Uint16Array(e.ellipsoidBatchIds):void 0,a=l(e.spheres)?new Float32Array(e.spheres):void 0,x=l(e.sphereBatchIds)?new Uint16Array(e.sphereBatchIds):void 0,y=l(n)?i.length:0,I=l(r)?t.length:0,p=l(s)?h.length:0,T=l(a)?x.length:0,U=j.getUnitBox(),v=z.getUnitCylinder(),L=H.getUnitEllipsoid(),F=U.attributes.position.values,Z=v.attributes.position.values,V=L.attributes.position.values,B=F.length*y;B+=Z.length*I,B+=V.length*(p+T);let O=U.indices,D=v.indices,w=L.indices,C=O.length*y;C+=D.length*I,C+=w.length*(p+T);let k=new Float32Array(B),M=new Uint16Array(B/3),A=W.createTypedArray(B/3,C),b=y+I+p+T,g=new Uint16Array(b),f=new Array(b),m=new Uint32Array(b),q=new Uint32Array(b),_=new Array(b);re(e.packedBuffer);let G={batchTableColors:new Uint32Array(e.batchTableColors),positions:k,vertexBatchIds:M,indices:A,batchIds:g,batchedIndices:f,indexOffsets:m,indexCounts:q,boundingVolumes:_,positionOffset:0,batchIdIndex:0,indexOffset:0,batchedIndicesOffset:0,modelMatrix:Q,center:K};R(G,n,i,U,oe),R(G,r,t,v,ce),R(G,s,h,L,se),R(G,a,x,L,ie);let N=ae(A.BYTES_PER_ELEMENT,f,_);return c.push(k.buffer,M.buffer,A.buffer),c.push(g.buffer,m.buffer,q.buffer),c.push(N.buffer),{positions:k.buffer,vertexBatchIds:M.buffer,indices:A.buffer,indexOffsets:m.buffer,indexCounts:q.buffer,batchIds:g.buffer,packedBuffer:N.buffer}}var Oe=Y(fe);export{Oe 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,90 +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
- createTaskProcessorWorker_default
28
- } from "./chunk-3VAZEH7M.js";
29
- import {
30
- AttributeCompression_default
31
- } from "./chunk-Z3TIFFGF.js";
32
- import {
33
- Rectangle_default
34
- } from "./chunk-YJEBABKH.js";
35
- import "./chunk-PPH7OFP3.js";
36
- import {
37
- Cartesian3_default,
38
- Cartographic_default,
39
- Ellipsoid_default
40
- } from "./chunk-OGXZVPPM.js";
41
- import {
42
- Math_default
43
- } from "./chunk-5QULIR53.js";
44
- import "./chunk-SOWMRMWA.js";
45
- import "./chunk-STW2DGFI.js";
46
- import "./chunk-BBWDMCVU.js";
47
- import "./chunk-XGI5BXZY.js";
48
- import "./chunk-YWTJ2B4B.js";
49
-
50
- // packages/engine/Source/Workers/createVectorTilePoints.js
51
- var maxShort = 32767;
52
- var scratchBVCartographic = new Cartographic_default();
53
- var scratchEncodedPosition = new Cartesian3_default();
54
- var scratchRectangle = new Rectangle_default();
55
- var scratchEllipsoid = new Ellipsoid_default();
56
- var scratchMinMaxHeights = {
57
- min: void 0,
58
- max: void 0
59
- };
60
- function unpackBuffer(packedBuffer) {
61
- packedBuffer = new Float64Array(packedBuffer);
62
- let offset = 0;
63
- scratchMinMaxHeights.min = packedBuffer[offset++];
64
- scratchMinMaxHeights.max = packedBuffer[offset++];
65
- Rectangle_default.unpack(packedBuffer, offset, scratchRectangle);
66
- offset += Rectangle_default.packedLength;
67
- Ellipsoid_default.unpack(packedBuffer, offset, scratchEllipsoid);
68
- }
69
- function createVectorTilePoints(parameters, transferableObjects) {
70
- const positions = new Uint16Array(parameters.positions);
71
- unpackBuffer(parameters.packedBuffer);
72
- const rectangle = scratchRectangle;
73
- const ellipsoid = scratchEllipsoid;
74
- const minimumHeight = scratchMinMaxHeights.min;
75
- const maximumHeight = scratchMinMaxHeights.max;
76
- const positionsLength = positions.length / 3;
77
- const uBuffer = positions.subarray(0, positionsLength);
78
- const vBuffer = positions.subarray(positionsLength, 2 * positionsLength);
79
- const heightBuffer = positions.subarray(
80
- 2 * positionsLength,
81
- 3 * positionsLength
82
- );
83
- AttributeCompression_default.zigZagDeltaDecode(uBuffer, vBuffer, heightBuffer);
84
- const decoded = new Float64Array(positions.length);
85
- for (let i = 0; i < positionsLength; ++i) {
86
- const u = uBuffer[i];
87
- const v = vBuffer[i];
88
- const h = heightBuffer[i];
89
- const lon = Math_default.lerp(rectangle.west, rectangle.east, u / maxShort);
90
- const lat = Math_default.lerp(rectangle.south, rectangle.north, v / maxShort);
91
- const alt = Math_default.lerp(minimumHeight, maximumHeight, h / maxShort);
92
- const cartographic = Cartographic_default.fromRadians(
93
- lon,
94
- lat,
95
- alt,
96
- scratchBVCartographic
97
- );
98
- const decodedPosition = ellipsoid.cartographicToCartesian(
99
- cartographic,
100
- scratchEncodedPosition
101
- );
102
- Cartesian3_default.pack(decodedPosition, decoded, i * 3);
103
- }
104
- transferableObjects.push(decoded.buffer);
105
- return {
106
- positions: decoded.buffer
107
- };
108
- }
109
- var createVectorTilePoints_default = createTaskProcessorWorker_default(createVectorTilePoints);
110
- export {
111
- createVectorTilePoints_default as default
112
- };
26
+ import{a as x}from"./chunk-WZDE3RYP.js";import{a as w}from"./chunk-DEPHB2WM.js";import{h as c}from"./chunk-PSPPBZWI.js";import"./chunk-AU7IKHOH.js";import{a as h,b as l,d as p}from"./chunk-64RSHJUE.js";import{a as i}from"./chunk-3SSKC3VN.js";import"./chunk-OSW76XDF.js";import"./chunk-ED5JPB3S.js";import"./chunk-LEYMRMBK.js";import"./chunk-VTAIKJXX.js";var u=32767,F=new l,L=new h,b=new c,y=new p,a={min:void 0,max:void 0};function V(t){t=new Float64Array(t);let o=0;a.min=t[o++],a.max=t[o++],c.unpack(t,o,b),o+=c.packedLength,p.unpack(t,o,y)}function z(t,o){let s=new Uint16Array(t.positions);V(t.packedBuffer);let e=b,C=y,A=a.min,P=a.max,n=s.length/3,f=s.subarray(0,n),g=s.subarray(n,2*n),d=s.subarray(2*n,3*n);w.zigZagDeltaDecode(f,g,d);let m=new Float64Array(s.length);for(let r=0;r<n;++r){let k=f[r],E=g[r],H=d[r],M=i.lerp(e.west,e.east,k/u),R=i.lerp(e.south,e.north,E/u),T=i.lerp(A,P,H/u),v=l.fromRadians(M,R,T,F),D=C.cartographicToCartesian(v,L);h.pack(D,m,r*3)}return o.push(m.buffer),{positions:m.buffer}}var G=x(z);export{G as default};