@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.
- package/README.md +8 -8
- package/dist/index.js +1966 -4
- package/dist/pggis.min.css +1 -1
- package/dist/resources/ThirdParty/Workers/pako_deflate.min.js +1 -2
- package/dist/resources/ThirdParty/Workers/pako_inflate.min.js +1 -2
- package/dist/resources/ThirdParty/Workers/z-worker-pako.js +1 -1
- package/dist/resources/ThirdParty/google-earth-dbroot-parser.js +1 -8337
- package/dist/resources/ThirdParty/wasm_splats_bg.wasm +0 -0
- package/dist/resources/Workers/chunk-35SHYARM.js +26 -0
- package/dist/resources/Workers/chunk-37F5JSTI.js +26 -0
- package/dist/resources/Workers/chunk-3SSKC3VN.js +26 -0
- package/dist/resources/Workers/chunk-3W4GT7KQ.js +26 -0
- package/dist/resources/Workers/chunk-4IW2T6GF.js +26 -0
- package/dist/resources/Workers/chunk-5YEWO3HT.js +26 -0
- package/dist/resources/Workers/chunk-64RSHJUE.js +28 -0
- package/dist/resources/Workers/chunk-77IHZJJ3.js +26 -0
- package/dist/resources/Workers/chunk-7HTKERZY.js +26 -0
- package/dist/resources/Workers/{chunk-F3YA3Y2Z.js → chunk-A56XVLQR.js} +2 -13
- package/dist/resources/Workers/chunk-AJYK4IVJ.js +26 -0
- package/dist/resources/Workers/{chunk-EHWHNOEX.js → chunk-ARG42DC4.js} +2 -31
- package/dist/resources/Workers/chunk-AU7IKHOH.js +26 -0
- package/dist/resources/Workers/chunk-B4AA3ARO.js +26 -0
- package/dist/resources/Workers/chunk-CNCV5UL7.js +26 -0
- package/dist/resources/Workers/chunk-CYCB63OH.js +26 -0
- package/dist/resources/Workers/{chunk-4H7PY4U5.js → chunk-D6AA5QVT.js} +2 -20
- package/dist/resources/Workers/chunk-D6C66QON.js +26 -0
- package/dist/resources/Workers/chunk-DEPHB2WM.js +26 -0
- package/dist/resources/Workers/chunk-DMEY62ID.js +26 -0
- package/dist/resources/Workers/chunk-DQQ63PYM.js +26 -0
- package/dist/resources/Workers/chunk-ED5JPB3S.js +27 -0
- package/dist/resources/Workers/chunk-EZUYS2JF.js +26 -0
- package/dist/resources/Workers/chunk-FEVXJ54I.js +26 -0
- package/dist/resources/Workers/chunk-G5AGHVVC.js +26 -0
- package/dist/resources/Workers/{chunk-BBWDMCVU.js → chunk-GBYLG25F.js} +2 -15
- package/dist/resources/Workers/chunk-GILIDQNQ.js +26 -0
- package/dist/resources/Workers/chunk-HMIYSTF6.js +26 -0
- package/dist/resources/Workers/chunk-HTFSEEMT.js +26 -0
- package/dist/resources/Workers/chunk-HWXX4CWK.js +26 -0
- package/dist/resources/Workers/chunk-IYTZ52EY.js +26 -0
- package/dist/resources/Workers/chunk-J6UP6FLE.js +26 -0
- package/dist/resources/Workers/chunk-LEYMRMBK.js +27 -0
- package/dist/resources/Workers/chunk-M3MGYQSL.js +26 -0
- package/dist/resources/Workers/chunk-N4VJKXZS.js +26 -0
- package/dist/resources/Workers/chunk-NB3ML6JO.js +26 -0
- package/dist/resources/Workers/chunk-OFUUQVMR.js +26 -0
- package/dist/resources/Workers/chunk-OSW76XDF.js +26 -0
- package/dist/resources/Workers/chunk-PSPPBZWI.js +66 -0
- package/dist/resources/Workers/chunk-QN3VOORQ.js +26 -0
- package/dist/resources/Workers/chunk-QOUAJ6TL.js +26 -0
- package/dist/resources/Workers/chunk-RCV6KWXS.js +26 -0
- package/dist/resources/Workers/chunk-TCGIRNHN.js +26 -0
- package/dist/resources/Workers/chunk-U4IEOH5K.js +26 -0
- package/dist/resources/Workers/chunk-UP6I5URU.js +26 -0
- package/dist/resources/Workers/chunk-VTAIKJXX.js +26 -0
- package/dist/resources/Workers/chunk-VTBDSFTG.js +26 -0
- package/dist/resources/Workers/chunk-VW6VD53G.js +26 -0
- package/dist/resources/Workers/chunk-WGGIH7QW.js +26 -0
- package/dist/resources/Workers/chunk-WWA5PL4H.js +26 -0
- package/dist/resources/Workers/chunk-WZDE3RYP.js +28 -0
- package/dist/resources/Workers/chunk-XRL4AVS5.js +26 -0
- package/dist/resources/Workers/combineGeometry.js +2 -44
- package/dist/resources/Workers/createBoxGeometry.js +2 -34
- package/dist/resources/Workers/createBoxOutlineGeometry.js +2 -211
- package/dist/resources/Workers/createCircleGeometry.js +2 -173
- package/dist/resources/Workers/createCircleOutlineGeometry.js +2 -123
- package/dist/resources/Workers/createCoplanarPolygonGeometry.js +2 -482
- package/dist/resources/Workers/createCoplanarPolygonOutlineGeometry.js +2 -201
- package/dist/resources/Workers/createCorridorGeometry.js +2 -1239
- package/dist/resources/Workers/createCorridorOutlineGeometry.js +2 -544
- package/dist/resources/Workers/createCylinderGeometry.js +2 -36
- package/dist/resources/Workers/createCylinderOutlineGeometry.js +2 -207
- package/dist/resources/Workers/createEllipseGeometry.js +2 -47
- package/dist/resources/Workers/createEllipseOutlineGeometry.js +2 -40
- package/dist/resources/Workers/createEllipsoidGeometry.js +2 -35
- package/dist/resources/Workers/createEllipsoidOutlineGeometry.js +2 -37
- package/dist/resources/Workers/createFrustumGeometry.js +2 -34
- package/dist/resources/Workers/createFrustumOutlineGeometry.js +2 -211
- package/dist/resources/Workers/createGeometry.js +2 -147
- package/dist/resources/Workers/createGroundPolylineGeometry.js +2 -1584
- package/dist/resources/Workers/createPlaneGeometry.js +2 -200
- package/dist/resources/Workers/createPlaneOutlineGeometry.js +2 -100
- package/dist/resources/Workers/createPolygonGeometry.js +2 -1387
- package/dist/resources/Workers/createPolygonOutlineGeometry.js +2 -519
- package/dist/resources/Workers/createPolylineGeometry.js +2 -472
- package/dist/resources/Workers/createPolylineVolumeGeometry.js +2 -355
- package/dist/resources/Workers/createPolylineVolumeOutlineGeometry.js +2 -253
- package/dist/resources/Workers/createRectangleGeometry.js +2 -1250
- package/dist/resources/Workers/createRectangleOutlineGeometry.js +2 -455
- package/dist/resources/Workers/createSimplePolylineGeometry.js +2 -376
- package/dist/resources/Workers/createSphereGeometry.js +2 -94
- package/dist/resources/Workers/createSphereOutlineGeometry.js +2 -94
- package/dist/resources/Workers/createTaskProcessorWorker.js +2 -8
- package/dist/resources/Workers/createVectorTileClampedPolylines.js +2 -468
- package/dist/resources/Workers/createVectorTileGeometries.js +2 -363
- package/dist/resources/Workers/createVectorTilePoints.js +2 -88
- package/dist/resources/Workers/createVectorTilePolygons.js +2 -361
- package/dist/resources/Workers/createVectorTilePolylines.js +2 -238
- package/dist/resources/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +2 -545
- package/dist/resources/Workers/createVerticesFromHeightmap.js +2 -2254
- package/dist/resources/Workers/createVerticesFromQuantizedTerrainMesh.js +2 -722
- package/dist/resources/Workers/createWallGeometry.js +2 -466
- package/dist/resources/Workers/createWallOutlineGeometry.js +2 -314
- package/dist/resources/Workers/decodeDraco.js +2 -345
- package/dist/resources/Workers/decodeGoogleEarthEnterprisePacket.js +2 -2626
- package/dist/resources/Workers/decodeI3S.js +2 -1320
- package/dist/resources/Workers/gaussianSplatSorter.js +26 -0
- package/dist/resources/Workers/gaussianSplatTextureGenerator.js +26 -0
- package/dist/resources/Workers/transcodeKTX2.js +29 -3398
- package/dist/resources/Workers/transferTypedArrayTest.js +2 -17
- package/dist/resources/Workers/upsampleQuantizedTerrainMesh.js +2 -795
- package/package.json +9 -8
- package/dist/pggis.min.js +0 -14796
- package/dist/resources/ThirdParty/Workers/basis_transcoder.js +0 -21
- package/dist/resources/Workers/chunk-23UFSGND.js +0 -236
- package/dist/resources/Workers/chunk-2A75IWRS.js +0 -218
- package/dist/resources/Workers/chunk-2FRVPMCS.js +0 -1258
- package/dist/resources/Workers/chunk-2FWRMUTY.js +0 -138
- package/dist/resources/Workers/chunk-2UPKWTMJ.js +0 -117
- package/dist/resources/Workers/chunk-34FXV7D7.js +0 -73
- package/dist/resources/Workers/chunk-3VAZEH7M.js +0 -101
- package/dist/resources/Workers/chunk-4DO5W5XZ.js +0 -196
- package/dist/resources/Workers/chunk-5QULIR53.js +0 -501
- package/dist/resources/Workers/chunk-7TC63SJW.js +0 -302
- package/dist/resources/Workers/chunk-7ZFGPDJA.js +0 -122
- package/dist/resources/Workers/chunk-A5DWLWCY.js +0 -834
- package/dist/resources/Workers/chunk-BG4UCVXN.js +0 -73
- package/dist/resources/Workers/chunk-BIKA3NRA.js +0 -59
- package/dist/resources/Workers/chunk-BROJAZRZ.js +0 -390
- package/dist/resources/Workers/chunk-DDUQAJ4P.js +0 -476
- package/dist/resources/Workers/chunk-EERJKOAF.js +0 -305
- package/dist/resources/Workers/chunk-EG6PTBY2.js +0 -2716
- package/dist/resources/Workers/chunk-F4HFJMGM.js +0 -353
- package/dist/resources/Workers/chunk-FJKNFAKQ.js +0 -8219
- package/dist/resources/Workers/chunk-FNIRWHJB.js +0 -289
- package/dist/resources/Workers/chunk-FZRIVR7Y.js +0 -100
- package/dist/resources/Workers/chunk-G43QFN4Q.js +0 -157
- package/dist/resources/Workers/chunk-GATZHF3K.js +0 -1860
- package/dist/resources/Workers/chunk-GRC2ZTAF.js +0 -398
- package/dist/resources/Workers/chunk-HU6N6EXB.js +0 -767
- package/dist/resources/Workers/chunk-I46ZRR5W.js +0 -1052
- package/dist/resources/Workers/chunk-JURN7NPV.js +0 -1075
- package/dist/resources/Workers/chunk-KKCR2YOP.js +0 -421
- package/dist/resources/Workers/chunk-LPR3YNP2.js +0 -138
- package/dist/resources/Workers/chunk-M7ERACJJ.js +0 -511
- package/dist/resources/Workers/chunk-MDWEGWPA.js +0 -1007
- package/dist/resources/Workers/chunk-OGXZVPPM.js +0 -2365
- package/dist/resources/Workers/chunk-PGSJK77E.js +0 -634
- package/dist/resources/Workers/chunk-PPH7OFP3.js +0 -258
- package/dist/resources/Workers/chunk-SH5USDPI.js +0 -456
- package/dist/resources/Workers/chunk-SOWMRMWA.js +0 -629
- package/dist/resources/Workers/chunk-STW2DGFI.js +0 -58
- package/dist/resources/Workers/chunk-T3XIFPYR.js +0 -1477
- package/dist/resources/Workers/chunk-TTUZP4BO.js +0 -501
- package/dist/resources/Workers/chunk-UEXTBDBE.js +0 -693
- package/dist/resources/Workers/chunk-VOXYEYJT.js +0 -684
- package/dist/resources/Workers/chunk-X4356LRH.js +0 -368
- package/dist/resources/Workers/chunk-XGI5BXZY.js +0 -163
- package/dist/resources/Workers/chunk-Y2ME2IJV.js +0 -781
- package/dist/resources/Workers/chunk-Y5UQJLYE.js +0 -171
- package/dist/resources/Workers/chunk-YJEBABKH.js +0 -2977
- package/dist/resources/Workers/chunk-YWTJ2B4B.js +0 -77
- package/dist/resources/Workers/chunk-Z3TIFFGF.js +0 -430
- 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.
|
|
4
|
+
* Version 1.132
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -23,457 +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
|
-
RectangleGeometryLibrary_default
|
|
28
|
-
} from "./chunk-23UFSGND.js";
|
|
29
|
-
import {
|
|
30
|
-
GeometryOffsetAttribute_default
|
|
31
|
-
} from "./chunk-F3YA3Y2Z.js";
|
|
32
|
-
import {
|
|
33
|
-
PolygonPipeline_default
|
|
34
|
-
} from "./chunk-MDWEGWPA.js";
|
|
35
|
-
import "./chunk-SH5USDPI.js";
|
|
36
|
-
import {
|
|
37
|
-
IndexDatatype_default
|
|
38
|
-
} from "./chunk-LPR3YNP2.js";
|
|
39
|
-
import {
|
|
40
|
-
GeometryAttributes_default
|
|
41
|
-
} from "./chunk-4H7PY4U5.js";
|
|
42
|
-
import {
|
|
43
|
-
GeometryAttribute_default,
|
|
44
|
-
Geometry_default,
|
|
45
|
-
PrimitiveType_default
|
|
46
|
-
} from "./chunk-7TC63SJW.js";
|
|
47
|
-
import {
|
|
48
|
-
BoundingSphere_default
|
|
49
|
-
} from "./chunk-FJKNFAKQ.js";
|
|
50
|
-
import "./chunk-TTUZP4BO.js";
|
|
51
|
-
import "./chunk-BG4UCVXN.js";
|
|
52
|
-
import {
|
|
53
|
-
Rectangle_default
|
|
54
|
-
} from "./chunk-YJEBABKH.js";
|
|
55
|
-
import {
|
|
56
|
-
ComponentDatatype_default
|
|
57
|
-
} from "./chunk-PPH7OFP3.js";
|
|
58
|
-
import {
|
|
59
|
-
Cartesian3_default,
|
|
60
|
-
Cartographic_default,
|
|
61
|
-
Ellipsoid_default
|
|
62
|
-
} from "./chunk-OGXZVPPM.js";
|
|
63
|
-
import {
|
|
64
|
-
Math_default
|
|
65
|
-
} from "./chunk-5QULIR53.js";
|
|
66
|
-
import "./chunk-SOWMRMWA.js";
|
|
67
|
-
import "./chunk-STW2DGFI.js";
|
|
68
|
-
import {
|
|
69
|
-
defaultValue_default
|
|
70
|
-
} from "./chunk-BBWDMCVU.js";
|
|
71
|
-
import {
|
|
72
|
-
DeveloperError_default
|
|
73
|
-
} from "./chunk-XGI5BXZY.js";
|
|
74
|
-
import {
|
|
75
|
-
defined_default
|
|
76
|
-
} from "./chunk-YWTJ2B4B.js";
|
|
77
|
-
|
|
78
|
-
// packages/engine/Source/Core/RectangleOutlineGeometry.js
|
|
79
|
-
var bottomBoundingSphere = new BoundingSphere_default();
|
|
80
|
-
var topBoundingSphere = new BoundingSphere_default();
|
|
81
|
-
var positionScratch = new Cartesian3_default();
|
|
82
|
-
var rectangleScratch = new Rectangle_default();
|
|
83
|
-
function constructRectangle(geometry, computedOptions) {
|
|
84
|
-
const ellipsoid = geometry._ellipsoid;
|
|
85
|
-
const height = computedOptions.height;
|
|
86
|
-
const width = computedOptions.width;
|
|
87
|
-
const northCap = computedOptions.northCap;
|
|
88
|
-
const southCap = computedOptions.southCap;
|
|
89
|
-
let rowHeight = height;
|
|
90
|
-
let widthMultiplier = 2;
|
|
91
|
-
let size = 0;
|
|
92
|
-
let corners = 4;
|
|
93
|
-
if (northCap) {
|
|
94
|
-
widthMultiplier -= 1;
|
|
95
|
-
rowHeight -= 1;
|
|
96
|
-
size += 1;
|
|
97
|
-
corners -= 2;
|
|
98
|
-
}
|
|
99
|
-
if (southCap) {
|
|
100
|
-
widthMultiplier -= 1;
|
|
101
|
-
rowHeight -= 1;
|
|
102
|
-
size += 1;
|
|
103
|
-
corners -= 2;
|
|
104
|
-
}
|
|
105
|
-
size += widthMultiplier * width + 2 * rowHeight - corners;
|
|
106
|
-
const positions = new Float64Array(size * 3);
|
|
107
|
-
let posIndex = 0;
|
|
108
|
-
let row = 0;
|
|
109
|
-
let col;
|
|
110
|
-
const position = positionScratch;
|
|
111
|
-
if (northCap) {
|
|
112
|
-
RectangleGeometryLibrary_default.computePosition(
|
|
113
|
-
computedOptions,
|
|
114
|
-
ellipsoid,
|
|
115
|
-
false,
|
|
116
|
-
row,
|
|
117
|
-
0,
|
|
118
|
-
position
|
|
119
|
-
);
|
|
120
|
-
positions[posIndex++] = position.x;
|
|
121
|
-
positions[posIndex++] = position.y;
|
|
122
|
-
positions[posIndex++] = position.z;
|
|
123
|
-
} else {
|
|
124
|
-
for (col = 0; col < width; col++) {
|
|
125
|
-
RectangleGeometryLibrary_default.computePosition(
|
|
126
|
-
computedOptions,
|
|
127
|
-
ellipsoid,
|
|
128
|
-
false,
|
|
129
|
-
row,
|
|
130
|
-
col,
|
|
131
|
-
position
|
|
132
|
-
);
|
|
133
|
-
positions[posIndex++] = position.x;
|
|
134
|
-
positions[posIndex++] = position.y;
|
|
135
|
-
positions[posIndex++] = position.z;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
col = width - 1;
|
|
139
|
-
for (row = 1; row < height; row++) {
|
|
140
|
-
RectangleGeometryLibrary_default.computePosition(
|
|
141
|
-
computedOptions,
|
|
142
|
-
ellipsoid,
|
|
143
|
-
false,
|
|
144
|
-
row,
|
|
145
|
-
col,
|
|
146
|
-
position
|
|
147
|
-
);
|
|
148
|
-
positions[posIndex++] = position.x;
|
|
149
|
-
positions[posIndex++] = position.y;
|
|
150
|
-
positions[posIndex++] = position.z;
|
|
151
|
-
}
|
|
152
|
-
row = height - 1;
|
|
153
|
-
if (!southCap) {
|
|
154
|
-
for (col = width - 2; col >= 0; col--) {
|
|
155
|
-
RectangleGeometryLibrary_default.computePosition(
|
|
156
|
-
computedOptions,
|
|
157
|
-
ellipsoid,
|
|
158
|
-
false,
|
|
159
|
-
row,
|
|
160
|
-
col,
|
|
161
|
-
position
|
|
162
|
-
);
|
|
163
|
-
positions[posIndex++] = position.x;
|
|
164
|
-
positions[posIndex++] = position.y;
|
|
165
|
-
positions[posIndex++] = position.z;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
col = 0;
|
|
169
|
-
for (row = height - 2; row > 0; row--) {
|
|
170
|
-
RectangleGeometryLibrary_default.computePosition(
|
|
171
|
-
computedOptions,
|
|
172
|
-
ellipsoid,
|
|
173
|
-
false,
|
|
174
|
-
row,
|
|
175
|
-
col,
|
|
176
|
-
position
|
|
177
|
-
);
|
|
178
|
-
positions[posIndex++] = position.x;
|
|
179
|
-
positions[posIndex++] = position.y;
|
|
180
|
-
positions[posIndex++] = position.z;
|
|
181
|
-
}
|
|
182
|
-
const indicesSize = positions.length / 3 * 2;
|
|
183
|
-
const indices = IndexDatatype_default.createTypedArray(
|
|
184
|
-
positions.length / 3,
|
|
185
|
-
indicesSize
|
|
186
|
-
);
|
|
187
|
-
let index = 0;
|
|
188
|
-
for (let i = 0; i < positions.length / 3 - 1; i++) {
|
|
189
|
-
indices[index++] = i;
|
|
190
|
-
indices[index++] = i + 1;
|
|
191
|
-
}
|
|
192
|
-
indices[index++] = positions.length / 3 - 1;
|
|
193
|
-
indices[index++] = 0;
|
|
194
|
-
const geo = new Geometry_default({
|
|
195
|
-
attributes: new GeometryAttributes_default(),
|
|
196
|
-
primitiveType: PrimitiveType_default.LINES
|
|
197
|
-
});
|
|
198
|
-
geo.attributes.position = new GeometryAttribute_default({
|
|
199
|
-
componentDatatype: ComponentDatatype_default.DOUBLE,
|
|
200
|
-
componentsPerAttribute: 3,
|
|
201
|
-
values: positions
|
|
202
|
-
});
|
|
203
|
-
geo.indices = indices;
|
|
204
|
-
return geo;
|
|
205
|
-
}
|
|
206
|
-
function constructExtrudedRectangle(rectangleGeometry, computedOptions) {
|
|
207
|
-
const maxHeight = rectangleGeometry._surfaceHeight;
|
|
208
|
-
const minHeight = rectangleGeometry._extrudedHeight;
|
|
209
|
-
const ellipsoid = rectangleGeometry._ellipsoid;
|
|
210
|
-
const geo = constructRectangle(rectangleGeometry, computedOptions);
|
|
211
|
-
const height = computedOptions.height;
|
|
212
|
-
const width = computedOptions.width;
|
|
213
|
-
const topPositions = PolygonPipeline_default.scaleToGeodeticHeight(
|
|
214
|
-
geo.attributes.position.values,
|
|
215
|
-
maxHeight,
|
|
216
|
-
ellipsoid,
|
|
217
|
-
false
|
|
218
|
-
);
|
|
219
|
-
let length = topPositions.length;
|
|
220
|
-
const positions = new Float64Array(length * 2);
|
|
221
|
-
positions.set(topPositions);
|
|
222
|
-
const bottomPositions = PolygonPipeline_default.scaleToGeodeticHeight(
|
|
223
|
-
geo.attributes.position.values,
|
|
224
|
-
minHeight,
|
|
225
|
-
ellipsoid
|
|
226
|
-
);
|
|
227
|
-
positions.set(bottomPositions, length);
|
|
228
|
-
geo.attributes.position.values = positions;
|
|
229
|
-
const northCap = computedOptions.northCap;
|
|
230
|
-
const southCap = computedOptions.southCap;
|
|
231
|
-
let corners = 4;
|
|
232
|
-
if (northCap) {
|
|
233
|
-
corners -= 1;
|
|
234
|
-
}
|
|
235
|
-
if (southCap) {
|
|
236
|
-
corners -= 1;
|
|
237
|
-
}
|
|
238
|
-
const indicesSize = (positions.length / 3 + corners) * 2;
|
|
239
|
-
const indices = IndexDatatype_default.createTypedArray(
|
|
240
|
-
positions.length / 3,
|
|
241
|
-
indicesSize
|
|
242
|
-
);
|
|
243
|
-
length = positions.length / 6;
|
|
244
|
-
let index = 0;
|
|
245
|
-
for (let i = 0; i < length - 1; i++) {
|
|
246
|
-
indices[index++] = i;
|
|
247
|
-
indices[index++] = i + 1;
|
|
248
|
-
indices[index++] = i + length;
|
|
249
|
-
indices[index++] = i + length + 1;
|
|
250
|
-
}
|
|
251
|
-
indices[index++] = length - 1;
|
|
252
|
-
indices[index++] = 0;
|
|
253
|
-
indices[index++] = length + length - 1;
|
|
254
|
-
indices[index++] = length;
|
|
255
|
-
indices[index++] = 0;
|
|
256
|
-
indices[index++] = length;
|
|
257
|
-
let bottomCorner;
|
|
258
|
-
if (northCap) {
|
|
259
|
-
bottomCorner = height - 1;
|
|
260
|
-
} else {
|
|
261
|
-
const topRightCorner = width - 1;
|
|
262
|
-
indices[index++] = topRightCorner;
|
|
263
|
-
indices[index++] = topRightCorner + length;
|
|
264
|
-
bottomCorner = width + height - 2;
|
|
265
|
-
}
|
|
266
|
-
indices[index++] = bottomCorner;
|
|
267
|
-
indices[index++] = bottomCorner + length;
|
|
268
|
-
if (!southCap) {
|
|
269
|
-
const bottomLeftCorner = width + bottomCorner - 1;
|
|
270
|
-
indices[index++] = bottomLeftCorner;
|
|
271
|
-
indices[index] = bottomLeftCorner + length;
|
|
272
|
-
}
|
|
273
|
-
geo.indices = indices;
|
|
274
|
-
return geo;
|
|
275
|
-
}
|
|
276
|
-
function RectangleOutlineGeometry(options) {
|
|
277
|
-
options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
|
|
278
|
-
const rectangle = options.rectangle;
|
|
279
|
-
const granularity = defaultValue_default(
|
|
280
|
-
options.granularity,
|
|
281
|
-
Math_default.RADIANS_PER_DEGREE
|
|
282
|
-
);
|
|
283
|
-
const ellipsoid = defaultValue_default(options.ellipsoid, Ellipsoid_default.WGS84);
|
|
284
|
-
const rotation = defaultValue_default(options.rotation, 0);
|
|
285
|
-
if (!defined_default(rectangle)) {
|
|
286
|
-
throw new DeveloperError_default("rectangle is required.");
|
|
287
|
-
}
|
|
288
|
-
Rectangle_default.validate(rectangle);
|
|
289
|
-
if (rectangle.north < rectangle.south) {
|
|
290
|
-
throw new DeveloperError_default(
|
|
291
|
-
"options.rectangle.north must be greater than options.rectangle.south"
|
|
292
|
-
);
|
|
293
|
-
}
|
|
294
|
-
const height = defaultValue_default(options.height, 0);
|
|
295
|
-
const extrudedHeight = defaultValue_default(options.extrudedHeight, height);
|
|
296
|
-
this._rectangle = Rectangle_default.clone(rectangle);
|
|
297
|
-
this._granularity = granularity;
|
|
298
|
-
this._ellipsoid = ellipsoid;
|
|
299
|
-
this._surfaceHeight = Math.max(height, extrudedHeight);
|
|
300
|
-
this._rotation = rotation;
|
|
301
|
-
this._extrudedHeight = Math.min(height, extrudedHeight);
|
|
302
|
-
this._offsetAttribute = options.offsetAttribute;
|
|
303
|
-
this._workerName = "createRectangleOutlineGeometry";
|
|
304
|
-
}
|
|
305
|
-
RectangleOutlineGeometry.packedLength = Rectangle_default.packedLength + Ellipsoid_default.packedLength + 5;
|
|
306
|
-
RectangleOutlineGeometry.pack = function(value, array, startingIndex) {
|
|
307
|
-
if (!defined_default(value)) {
|
|
308
|
-
throw new DeveloperError_default("value is required");
|
|
309
|
-
}
|
|
310
|
-
if (!defined_default(array)) {
|
|
311
|
-
throw new DeveloperError_default("array is required");
|
|
312
|
-
}
|
|
313
|
-
startingIndex = defaultValue_default(startingIndex, 0);
|
|
314
|
-
Rectangle_default.pack(value._rectangle, array, startingIndex);
|
|
315
|
-
startingIndex += Rectangle_default.packedLength;
|
|
316
|
-
Ellipsoid_default.pack(value._ellipsoid, array, startingIndex);
|
|
317
|
-
startingIndex += Ellipsoid_default.packedLength;
|
|
318
|
-
array[startingIndex++] = value._granularity;
|
|
319
|
-
array[startingIndex++] = value._surfaceHeight;
|
|
320
|
-
array[startingIndex++] = value._rotation;
|
|
321
|
-
array[startingIndex++] = value._extrudedHeight;
|
|
322
|
-
array[startingIndex] = defaultValue_default(value._offsetAttribute, -1);
|
|
323
|
-
return array;
|
|
324
|
-
};
|
|
325
|
-
var scratchRectangle = new Rectangle_default();
|
|
326
|
-
var scratchEllipsoid = Ellipsoid_default.clone(Ellipsoid_default.UNIT_SPHERE);
|
|
327
|
-
var scratchOptions = {
|
|
328
|
-
rectangle: scratchRectangle,
|
|
329
|
-
ellipsoid: scratchEllipsoid,
|
|
330
|
-
granularity: void 0,
|
|
331
|
-
height: void 0,
|
|
332
|
-
rotation: void 0,
|
|
333
|
-
extrudedHeight: void 0,
|
|
334
|
-
offsetAttribute: void 0
|
|
335
|
-
};
|
|
336
|
-
RectangleOutlineGeometry.unpack = function(array, startingIndex, result) {
|
|
337
|
-
if (!defined_default(array)) {
|
|
338
|
-
throw new DeveloperError_default("array is required");
|
|
339
|
-
}
|
|
340
|
-
startingIndex = defaultValue_default(startingIndex, 0);
|
|
341
|
-
const rectangle = Rectangle_default.unpack(array, startingIndex, scratchRectangle);
|
|
342
|
-
startingIndex += Rectangle_default.packedLength;
|
|
343
|
-
const ellipsoid = Ellipsoid_default.unpack(array, startingIndex, scratchEllipsoid);
|
|
344
|
-
startingIndex += Ellipsoid_default.packedLength;
|
|
345
|
-
const granularity = array[startingIndex++];
|
|
346
|
-
const height = array[startingIndex++];
|
|
347
|
-
const rotation = array[startingIndex++];
|
|
348
|
-
const extrudedHeight = array[startingIndex++];
|
|
349
|
-
const offsetAttribute = array[startingIndex];
|
|
350
|
-
if (!defined_default(result)) {
|
|
351
|
-
scratchOptions.granularity = granularity;
|
|
352
|
-
scratchOptions.height = height;
|
|
353
|
-
scratchOptions.rotation = rotation;
|
|
354
|
-
scratchOptions.extrudedHeight = extrudedHeight;
|
|
355
|
-
scratchOptions.offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
|
|
356
|
-
return new RectangleOutlineGeometry(scratchOptions);
|
|
357
|
-
}
|
|
358
|
-
result._rectangle = Rectangle_default.clone(rectangle, result._rectangle);
|
|
359
|
-
result._ellipsoid = Ellipsoid_default.clone(ellipsoid, result._ellipsoid);
|
|
360
|
-
result._surfaceHeight = height;
|
|
361
|
-
result._rotation = rotation;
|
|
362
|
-
result._extrudedHeight = extrudedHeight;
|
|
363
|
-
result._offsetAttribute = offsetAttribute === -1 ? void 0 : offsetAttribute;
|
|
364
|
-
return result;
|
|
365
|
-
};
|
|
366
|
-
var nwScratch = new Cartographic_default();
|
|
367
|
-
RectangleOutlineGeometry.createGeometry = function(rectangleGeometry) {
|
|
368
|
-
const rectangle = rectangleGeometry._rectangle;
|
|
369
|
-
const ellipsoid = rectangleGeometry._ellipsoid;
|
|
370
|
-
const computedOptions = RectangleGeometryLibrary_default.computeOptions(
|
|
371
|
-
rectangle,
|
|
372
|
-
rectangleGeometry._granularity,
|
|
373
|
-
rectangleGeometry._rotation,
|
|
374
|
-
0,
|
|
375
|
-
rectangleScratch,
|
|
376
|
-
nwScratch
|
|
377
|
-
);
|
|
378
|
-
let geometry;
|
|
379
|
-
let boundingSphere;
|
|
380
|
-
if (Math_default.equalsEpsilon(
|
|
381
|
-
rectangle.north,
|
|
382
|
-
rectangle.south,
|
|
383
|
-
Math_default.EPSILON10
|
|
384
|
-
) || Math_default.equalsEpsilon(
|
|
385
|
-
rectangle.east,
|
|
386
|
-
rectangle.west,
|
|
387
|
-
Math_default.EPSILON10
|
|
388
|
-
)) {
|
|
389
|
-
return void 0;
|
|
390
|
-
}
|
|
391
|
-
const surfaceHeight = rectangleGeometry._surfaceHeight;
|
|
392
|
-
const extrudedHeight = rectangleGeometry._extrudedHeight;
|
|
393
|
-
const extrude = !Math_default.equalsEpsilon(
|
|
394
|
-
surfaceHeight,
|
|
395
|
-
extrudedHeight,
|
|
396
|
-
0,
|
|
397
|
-
Math_default.EPSILON2
|
|
398
|
-
);
|
|
399
|
-
let offsetValue;
|
|
400
|
-
if (extrude) {
|
|
401
|
-
geometry = constructExtrudedRectangle(rectangleGeometry, computedOptions);
|
|
402
|
-
if (defined_default(rectangleGeometry._offsetAttribute)) {
|
|
403
|
-
const size = geometry.attributes.position.values.length / 3;
|
|
404
|
-
let offsetAttribute = new Uint8Array(size);
|
|
405
|
-
if (rectangleGeometry._offsetAttribute === GeometryOffsetAttribute_default.TOP) {
|
|
406
|
-
offsetAttribute = offsetAttribute.fill(1, 0, size / 2);
|
|
407
|
-
} else {
|
|
408
|
-
offsetValue = rectangleGeometry._offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
|
|
409
|
-
offsetAttribute = offsetAttribute.fill(offsetValue);
|
|
410
|
-
}
|
|
411
|
-
geometry.attributes.applyOffset = new GeometryAttribute_default({
|
|
412
|
-
componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
|
|
413
|
-
componentsPerAttribute: 1,
|
|
414
|
-
values: offsetAttribute
|
|
415
|
-
});
|
|
416
|
-
}
|
|
417
|
-
const topBS = BoundingSphere_default.fromRectangle3D(
|
|
418
|
-
rectangle,
|
|
419
|
-
ellipsoid,
|
|
420
|
-
surfaceHeight,
|
|
421
|
-
topBoundingSphere
|
|
422
|
-
);
|
|
423
|
-
const bottomBS = BoundingSphere_default.fromRectangle3D(
|
|
424
|
-
rectangle,
|
|
425
|
-
ellipsoid,
|
|
426
|
-
extrudedHeight,
|
|
427
|
-
bottomBoundingSphere
|
|
428
|
-
);
|
|
429
|
-
boundingSphere = BoundingSphere_default.union(topBS, bottomBS);
|
|
430
|
-
} else {
|
|
431
|
-
geometry = constructRectangle(rectangleGeometry, computedOptions);
|
|
432
|
-
geometry.attributes.position.values = PolygonPipeline_default.scaleToGeodeticHeight(
|
|
433
|
-
geometry.attributes.position.values,
|
|
434
|
-
surfaceHeight,
|
|
435
|
-
ellipsoid,
|
|
436
|
-
false
|
|
437
|
-
);
|
|
438
|
-
if (defined_default(rectangleGeometry._offsetAttribute)) {
|
|
439
|
-
const length = geometry.attributes.position.values.length;
|
|
440
|
-
offsetValue = rectangleGeometry._offsetAttribute === GeometryOffsetAttribute_default.NONE ? 0 : 1;
|
|
441
|
-
const applyOffset = new Uint8Array(length / 3).fill(offsetValue);
|
|
442
|
-
geometry.attributes.applyOffset = new GeometryAttribute_default({
|
|
443
|
-
componentDatatype: ComponentDatatype_default.UNSIGNED_BYTE,
|
|
444
|
-
componentsPerAttribute: 1,
|
|
445
|
-
values: applyOffset
|
|
446
|
-
});
|
|
447
|
-
}
|
|
448
|
-
boundingSphere = BoundingSphere_default.fromRectangle3D(
|
|
449
|
-
rectangle,
|
|
450
|
-
ellipsoid,
|
|
451
|
-
surfaceHeight
|
|
452
|
-
);
|
|
453
|
-
}
|
|
454
|
-
return new Geometry_default({
|
|
455
|
-
attributes: geometry.attributes,
|
|
456
|
-
indices: geometry.indices,
|
|
457
|
-
primitiveType: PrimitiveType_default.LINES,
|
|
458
|
-
boundingSphere,
|
|
459
|
-
offsetAttribute: rectangleGeometry._offsetAttribute
|
|
460
|
-
});
|
|
461
|
-
};
|
|
462
|
-
var RectangleOutlineGeometry_default = RectangleOutlineGeometry;
|
|
463
|
-
|
|
464
|
-
// packages/engine/Source/Workers/createRectangleOutlineGeometry.js
|
|
465
|
-
function createRectangleOutlineGeometry(rectangleGeometry, offset) {
|
|
466
|
-
if (defined_default(offset)) {
|
|
467
|
-
rectangleGeometry = RectangleOutlineGeometry_default.unpack(
|
|
468
|
-
rectangleGeometry,
|
|
469
|
-
offset
|
|
470
|
-
);
|
|
471
|
-
}
|
|
472
|
-
rectangleGeometry._ellipsoid = Ellipsoid_default.clone(rectangleGeometry._ellipsoid);
|
|
473
|
-
rectangleGeometry._rectangle = Rectangle_default.clone(rectangleGeometry._rectangle);
|
|
474
|
-
return RectangleOutlineGeometry_default.createGeometry(rectangleGeometry);
|
|
475
|
-
}
|
|
476
|
-
var createRectangleOutlineGeometry_default = createRectangleOutlineGeometry;
|
|
477
|
-
export {
|
|
478
|
-
createRectangleOutlineGeometry_default as default
|
|
479
|
-
};
|
|
26
|
+
import{a as R}from"./chunk-5YEWO3HT.js";import{a as y}from"./chunk-GBYLG25F.js";import{b as z}from"./chunk-77IHZJJ3.js";import"./chunk-G5AGHVVC.js";import{a as q}from"./chunk-OFUUQVMR.js";import{a as F}from"./chunk-A56XVLQR.js";import{b as v,c as B,d as T}from"./chunk-RCV6KWXS.js";import{d as P}from"./chunk-4IW2T6GF.js";import{h as b}from"./chunk-PSPPBZWI.js";import{a as D}from"./chunk-AU7IKHOH.js";import{a as x,b as U,d as w,f as M}from"./chunk-64RSHJUE.js";import{a as S}from"./chunk-3SSKC3VN.js";import"./chunk-OSW76XDF.js";import"./chunk-ED5JPB3S.js";import{a as C}from"./chunk-LEYMRMBK.js";import{e as H}from"./chunk-VTAIKJXX.js";var j=new P,K=new P,Q=new x,W=new b;function Y(t,e){let i=t._ellipsoid,m=e.height,s=e.width,h=e.northCap,p=e.southCap,_=m,A=2,o=0,g=4;h&&(A-=1,_-=1,o+=1,g-=2),p&&(A-=1,_-=1,o+=1,g-=2),o+=A*s+2*_-g;let n=new Float64Array(o*3),l=0,f=0,a,r=Q;if(h)R.computePosition(e,i,!1,f,0,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;else for(a=0;a<s;a++)R.computePosition(e,i,!1,f,a,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;for(a=s-1,f=1;f<m;f++)R.computePosition(e,i,!1,f,a,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;if(f=m-1,!p)for(a=s-2;a>=0;a--)R.computePosition(e,i,!1,f,a,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;for(a=0,f=m-2;f>0;f--)R.computePosition(e,i,!1,f,a,r),n[l++]=r.x,n[l++]=r.y,n[l++]=r.z;let u=n.length/3*2,c=q.createTypedArray(n.length/3,u),E=0;for(let L=0;L<n.length/3-1;L++)c[E++]=L,c[E++]=L+1;c[E++]=n.length/3-1,c[E++]=0;let d=new B({attributes:new F,primitiveType:v.LINES});return d.attributes.position=new T({componentDatatype:D.DOUBLE,componentsPerAttribute:3,values:n}),d.indices=c,d}function X(t,e){let i=t._surfaceHeight,m=t._extrudedHeight,s=t._ellipsoid,h=Y(t,e),p=e.height,_=e.width,A=z.scaleToGeodeticHeight(h.attributes.position.values,i,s,!1),o=A.length,g=new Float64Array(o*2);g.set(A);let n=z.scaleToGeodeticHeight(h.attributes.position.values,m,s);g.set(n,o),h.attributes.position.values=g;let l=e.northCap,f=e.southCap,a=4;l&&(a-=1),f&&(a-=1);let r=(g.length/3+a)*2,u=q.createTypedArray(g.length/3,r);o=g.length/6;let c=0;for(let d=0;d<o-1;d++)u[c++]=d,u[c++]=d+1,u[c++]=d+o,u[c++]=d+o+1;u[c++]=o-1,u[c++]=0,u[c++]=o+o-1,u[c++]=o,u[c++]=0,u[c++]=o;let E;if(l)E=p-1;else{let d=_-1;u[c++]=d,u[c++]=d+o,E=_+p-2}if(u[c++]=E,u[c++]=E+o,!f){let d=_+E-1;u[c++]=d,u[c]=d+o}return h.indices=u,h}function k(t){t=t??M.EMPTY_OBJECT;let e=t.rectangle,i=t.granularity??S.RADIANS_PER_DEGREE,m=t.ellipsoid??w.default,s=t.rotation??0;if(!H(e))throw new C("rectangle is required.");if(b._validate(e),e.north<e.south)throw new C("options.rectangle.north must be greater than options.rectangle.south");let h=t.height??0,p=t.extrudedHeight??h;this._rectangle=b.clone(e),this._granularity=i,this._ellipsoid=m,this._surfaceHeight=Math.max(h,p),this._rotation=s,this._extrudedHeight=Math.min(h,p),this._offsetAttribute=t.offsetAttribute,this._workerName="createRectangleOutlineGeometry"}k.packedLength=b.packedLength+w.packedLength+5;k.pack=function(t,e,i){if(!H(t))throw new C("value is required");if(!H(e))throw new C("array is required");return i=i??0,b.pack(t._rectangle,e,i),i+=b.packedLength,w.pack(t._ellipsoid,e,i),i+=w.packedLength,e[i++]=t._granularity,e[i++]=t._surfaceHeight,e[i++]=t._rotation,e[i++]=t._extrudedHeight,e[i]=t._offsetAttribute??-1,e};var J=new b,V=w.clone(w.UNIT_SPHERE),N={rectangle:J,ellipsoid:V,granularity:void 0,height:void 0,rotation:void 0,extrudedHeight:void 0,offsetAttribute:void 0};k.unpack=function(t,e,i){if(!H(t))throw new C("array is required");e=e??0;let m=b.unpack(t,e,J);e+=b.packedLength;let s=w.unpack(t,e,V);e+=w.packedLength;let h=t[e++],p=t[e++],_=t[e++],A=t[e++],o=t[e];return H(i)?(i._rectangle=b.clone(m,i._rectangle),i._ellipsoid=w.clone(s,i._ellipsoid),i._surfaceHeight=p,i._rotation=_,i._extrudedHeight=A,i._offsetAttribute=o===-1?void 0:o,i):(N.granularity=h,N.height=p,N.rotation=_,N.extrudedHeight=A,N.offsetAttribute=o===-1?void 0:o,new k(N))};var Z=new U;k.createGeometry=function(t){let e=t._rectangle,i=t._ellipsoid,m=R.computeOptions(e,t._granularity,t._rotation,0,W,Z),s,h;if(S.equalsEpsilon(e.north,e.south,S.EPSILON10)||S.equalsEpsilon(e.east,e.west,S.EPSILON10))return;let p=t._surfaceHeight,_=t._extrudedHeight,A=!S.equalsEpsilon(p,_,0,S.EPSILON2),o;if(A){if(s=X(t,m),H(t._offsetAttribute)){let l=s.attributes.position.values.length/3,f=new Uint8Array(l);t._offsetAttribute===y.TOP?f=f.fill(1,0,l/2):(o=t._offsetAttribute===y.NONE?0:1,f=f.fill(o)),s.attributes.applyOffset=new T({componentDatatype:D.UNSIGNED_BYTE,componentsPerAttribute:1,values:f})}let g=P.fromRectangle3D(e,i,p,K),n=P.fromRectangle3D(e,i,_,j);h=P.union(g,n)}else{if(s=Y(t,m),s.attributes.position.values=z.scaleToGeodeticHeight(s.attributes.position.values,p,i,!1),H(t._offsetAttribute)){let g=s.attributes.position.values.length;o=t._offsetAttribute===y.NONE?0:1;let n=new Uint8Array(g/3).fill(o);s.attributes.applyOffset=new T({componentDatatype:D.UNSIGNED_BYTE,componentsPerAttribute:1,values:n})}h=P.fromRectangle3D(e,i,p)}return new B({attributes:s.attributes,indices:s.indices,primitiveType:v.LINES,boundingSphere:h,offsetAttribute:t._offsetAttribute})};var O=k;function $(t,e){return H(e)&&(t=O.unpack(t,e)),t._ellipsoid=w.clone(t._ellipsoid),t._rectangle=b.clone(t._rectangle),O.createGeometry(t)}var Et=$;export{Et as default};
|