@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,302 +0,0 @@
1
- /**
2
- * @license
3
- * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.115
5
- *
6
- * Copyright 2011-2022 Cesium Contributors
7
- *
8
- * Licensed under the Apache License, Version 2.0 (the "License");
9
- * you may not use this file except in compliance with the License.
10
- * You may obtain a copy of the License at
11
- *
12
- * http://www.apache.org/licenses/LICENSE-2.0
13
- *
14
- * Unless required by applicable law or agreed to in writing, software
15
- * distributed under the License is distributed on an "AS IS" BASIS,
16
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
- * See the License for the specific language governing permissions and
18
- * limitations under the License.
19
- *
20
- * Columbus View (Pat. Pend.)
21
- *
22
- * Portions licensed separately.
23
- * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
24
- */
25
-
26
- import {
27
- Quaternion_default,
28
- Transforms_default
29
- } from "./chunk-FJKNFAKQ.js";
30
- import {
31
- Matrix2_default,
32
- Matrix4_default,
33
- Rectangle_default
34
- } from "./chunk-YJEBABKH.js";
35
- import {
36
- Cartesian2_default,
37
- Cartesian3_default,
38
- Cartographic_default,
39
- Matrix3_default
40
- } from "./chunk-OGXZVPPM.js";
41
- import {
42
- WebGLConstants_default
43
- } from "./chunk-SOWMRMWA.js";
44
- import {
45
- defaultValue_default
46
- } from "./chunk-BBWDMCVU.js";
47
- import {
48
- Check_default,
49
- DeveloperError_default
50
- } from "./chunk-XGI5BXZY.js";
51
- import {
52
- defined_default
53
- } from "./chunk-YWTJ2B4B.js";
54
-
55
- // packages/engine/Source/Core/GeometryType.js
56
- var GeometryType = {
57
- NONE: 0,
58
- TRIANGLES: 1,
59
- LINES: 2,
60
- POLYLINES: 3
61
- };
62
- var GeometryType_default = Object.freeze(GeometryType);
63
-
64
- // packages/engine/Source/Core/PrimitiveType.js
65
- var PrimitiveType = {
66
- /**
67
- * Points primitive where each vertex (or index) is a separate point.
68
- *
69
- * @type {number}
70
- * @constant
71
- */
72
- POINTS: WebGLConstants_default.POINTS,
73
- /**
74
- * Lines primitive where each two vertices (or indices) is a line segment. Line segments are not necessarily connected.
75
- *
76
- * @type {number}
77
- * @constant
78
- */
79
- LINES: WebGLConstants_default.LINES,
80
- /**
81
- * Line loop primitive where each vertex (or index) after the first connects a line to
82
- * the previous vertex, and the last vertex implicitly connects to the first.
83
- *
84
- * @type {number}
85
- * @constant
86
- */
87
- LINE_LOOP: WebGLConstants_default.LINE_LOOP,
88
- /**
89
- * Line strip primitive where each vertex (or index) after the first connects a line to the previous vertex.
90
- *
91
- * @type {number}
92
- * @constant
93
- */
94
- LINE_STRIP: WebGLConstants_default.LINE_STRIP,
95
- /**
96
- * Triangles primitive where each three vertices (or indices) is a triangle. Triangles do not necessarily share edges.
97
- *
98
- * @type {number}
99
- * @constant
100
- */
101
- TRIANGLES: WebGLConstants_default.TRIANGLES,
102
- /**
103
- * Triangle strip primitive where each vertex (or index) after the first two connect to
104
- * the previous two vertices forming a triangle. For example, this can be used to model a wall.
105
- *
106
- * @type {number}
107
- * @constant
108
- */
109
- TRIANGLE_STRIP: WebGLConstants_default.TRIANGLE_STRIP,
110
- /**
111
- * Triangle fan primitive where each vertex (or index) after the first two connect to
112
- * the previous vertex and the first vertex forming a triangle. For example, this can be used
113
- * to model a cone or circle.
114
- *
115
- * @type {number}
116
- * @constant
117
- */
118
- TRIANGLE_FAN: WebGLConstants_default.TRIANGLE_FAN
119
- };
120
- PrimitiveType.isLines = function(primitiveType) {
121
- return primitiveType === PrimitiveType.LINES || primitiveType === PrimitiveType.LINE_LOOP || primitiveType === PrimitiveType.LINE_STRIP;
122
- };
123
- PrimitiveType.isTriangles = function(primitiveType) {
124
- return primitiveType === PrimitiveType.TRIANGLES || primitiveType === PrimitiveType.TRIANGLE_STRIP || primitiveType === PrimitiveType.TRIANGLE_FAN;
125
- };
126
- PrimitiveType.validate = function(primitiveType) {
127
- return primitiveType === PrimitiveType.POINTS || primitiveType === PrimitiveType.LINES || primitiveType === PrimitiveType.LINE_LOOP || primitiveType === PrimitiveType.LINE_STRIP || primitiveType === PrimitiveType.TRIANGLES || primitiveType === PrimitiveType.TRIANGLE_STRIP || primitiveType === PrimitiveType.TRIANGLE_FAN;
128
- };
129
- var PrimitiveType_default = Object.freeze(PrimitiveType);
130
-
131
- // packages/engine/Source/Core/Geometry.js
132
- function Geometry(options) {
133
- options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
134
- Check_default.typeOf.object("options.attributes", options.attributes);
135
- this.attributes = options.attributes;
136
- this.indices = options.indices;
137
- this.primitiveType = defaultValue_default(
138
- options.primitiveType,
139
- PrimitiveType_default.TRIANGLES
140
- );
141
- this.boundingSphere = options.boundingSphere;
142
- this.geometryType = defaultValue_default(options.geometryType, GeometryType_default.NONE);
143
- this.boundingSphereCV = options.boundingSphereCV;
144
- this.offsetAttribute = options.offsetAttribute;
145
- }
146
- Geometry.computeNumberOfVertices = function(geometry) {
147
- Check_default.typeOf.object("geometry", geometry);
148
- let numberOfVertices = -1;
149
- for (const property in geometry.attributes) {
150
- if (geometry.attributes.hasOwnProperty(property) && defined_default(geometry.attributes[property]) && defined_default(geometry.attributes[property].values)) {
151
- const attribute = geometry.attributes[property];
152
- const num = attribute.values.length / attribute.componentsPerAttribute;
153
- if (numberOfVertices !== num && numberOfVertices !== -1) {
154
- throw new DeveloperError_default(
155
- "All attribute lists must have the same number of attributes."
156
- );
157
- }
158
- numberOfVertices = num;
159
- }
160
- }
161
- return numberOfVertices;
162
- };
163
- var rectangleCenterScratch = new Cartographic_default();
164
- var enuCenterScratch = new Cartesian3_default();
165
- var fixedFrameToEnuScratch = new Matrix4_default();
166
- var boundingRectanglePointsCartographicScratch = [
167
- new Cartographic_default(),
168
- new Cartographic_default(),
169
- new Cartographic_default()
170
- ];
171
- var boundingRectanglePointsEnuScratch = [
172
- new Cartesian2_default(),
173
- new Cartesian2_default(),
174
- new Cartesian2_default()
175
- ];
176
- var points2DScratch = [new Cartesian2_default(), new Cartesian2_default(), new Cartesian2_default()];
177
- var pointEnuScratch = new Cartesian3_default();
178
- var enuRotationScratch = new Quaternion_default();
179
- var enuRotationMatrixScratch = new Matrix4_default();
180
- var rotation2DScratch = new Matrix2_default();
181
- Geometry._textureCoordinateRotationPoints = function(positions, stRotation, ellipsoid, boundingRectangle) {
182
- let i;
183
- const rectangleCenter = Rectangle_default.center(
184
- boundingRectangle,
185
- rectangleCenterScratch
186
- );
187
- const enuCenter = Cartographic_default.toCartesian(
188
- rectangleCenter,
189
- ellipsoid,
190
- enuCenterScratch
191
- );
192
- const enuToFixedFrame = Transforms_default.eastNorthUpToFixedFrame(
193
- enuCenter,
194
- ellipsoid,
195
- fixedFrameToEnuScratch
196
- );
197
- const fixedFrameToEnu = Matrix4_default.inverse(
198
- enuToFixedFrame,
199
- fixedFrameToEnuScratch
200
- );
201
- const boundingPointsEnu = boundingRectanglePointsEnuScratch;
202
- const boundingPointsCarto = boundingRectanglePointsCartographicScratch;
203
- boundingPointsCarto[0].longitude = boundingRectangle.west;
204
- boundingPointsCarto[0].latitude = boundingRectangle.south;
205
- boundingPointsCarto[1].longitude = boundingRectangle.west;
206
- boundingPointsCarto[1].latitude = boundingRectangle.north;
207
- boundingPointsCarto[2].longitude = boundingRectangle.east;
208
- boundingPointsCarto[2].latitude = boundingRectangle.south;
209
- let posEnu = pointEnuScratch;
210
- for (i = 0; i < 3; i++) {
211
- Cartographic_default.toCartesian(boundingPointsCarto[i], ellipsoid, posEnu);
212
- posEnu = Matrix4_default.multiplyByPointAsVector(fixedFrameToEnu, posEnu, posEnu);
213
- boundingPointsEnu[i].x = posEnu.x;
214
- boundingPointsEnu[i].y = posEnu.y;
215
- }
216
- const rotation = Quaternion_default.fromAxisAngle(
217
- Cartesian3_default.UNIT_Z,
218
- -stRotation,
219
- enuRotationScratch
220
- );
221
- const textureMatrix = Matrix3_default.fromQuaternion(
222
- rotation,
223
- enuRotationMatrixScratch
224
- );
225
- const positionsLength = positions.length;
226
- let enuMinX = Number.POSITIVE_INFINITY;
227
- let enuMinY = Number.POSITIVE_INFINITY;
228
- let enuMaxX = Number.NEGATIVE_INFINITY;
229
- let enuMaxY = Number.NEGATIVE_INFINITY;
230
- for (i = 0; i < positionsLength; i++) {
231
- posEnu = Matrix4_default.multiplyByPointAsVector(
232
- fixedFrameToEnu,
233
- positions[i],
234
- posEnu
235
- );
236
- posEnu = Matrix3_default.multiplyByVector(textureMatrix, posEnu, posEnu);
237
- enuMinX = Math.min(enuMinX, posEnu.x);
238
- enuMinY = Math.min(enuMinY, posEnu.y);
239
- enuMaxX = Math.max(enuMaxX, posEnu.x);
240
- enuMaxY = Math.max(enuMaxY, posEnu.y);
241
- }
242
- const toDesiredInComputed = Matrix2_default.fromRotation(
243
- stRotation,
244
- rotation2DScratch
245
- );
246
- const points2D = points2DScratch;
247
- points2D[0].x = enuMinX;
248
- points2D[0].y = enuMinY;
249
- points2D[1].x = enuMinX;
250
- points2D[1].y = enuMaxY;
251
- points2D[2].x = enuMaxX;
252
- points2D[2].y = enuMinY;
253
- const boundingEnuMin = boundingPointsEnu[0];
254
- const boundingPointsWidth = boundingPointsEnu[2].x - boundingEnuMin.x;
255
- const boundingPointsHeight = boundingPointsEnu[1].y - boundingEnuMin.y;
256
- for (i = 0; i < 3; i++) {
257
- const point2D = points2D[i];
258
- Matrix2_default.multiplyByVector(toDesiredInComputed, point2D, point2D);
259
- point2D.x = (point2D.x - boundingEnuMin.x) / boundingPointsWidth;
260
- point2D.y = (point2D.y - boundingEnuMin.y) / boundingPointsHeight;
261
- }
262
- const minXYCorner = points2D[0];
263
- const maxYCorner = points2D[1];
264
- const maxXCorner = points2D[2];
265
- const result = new Array(6);
266
- Cartesian2_default.pack(minXYCorner, result);
267
- Cartesian2_default.pack(maxYCorner, result, 2);
268
- Cartesian2_default.pack(maxXCorner, result, 4);
269
- return result;
270
- };
271
- var Geometry_default = Geometry;
272
-
273
- // packages/engine/Source/Core/GeometryAttribute.js
274
- function GeometryAttribute(options) {
275
- options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
276
- if (!defined_default(options.componentDatatype)) {
277
- throw new DeveloperError_default("options.componentDatatype is required.");
278
- }
279
- if (!defined_default(options.componentsPerAttribute)) {
280
- throw new DeveloperError_default("options.componentsPerAttribute is required.");
281
- }
282
- if (options.componentsPerAttribute < 1 || options.componentsPerAttribute > 4) {
283
- throw new DeveloperError_default(
284
- "options.componentsPerAttribute must be between 1 and 4."
285
- );
286
- }
287
- if (!defined_default(options.values)) {
288
- throw new DeveloperError_default("options.values is required.");
289
- }
290
- this.componentDatatype = options.componentDatatype;
291
- this.componentsPerAttribute = options.componentsPerAttribute;
292
- this.normalize = defaultValue_default(options.normalize, false);
293
- this.values = options.values;
294
- }
295
- var GeometryAttribute_default = GeometryAttribute;
296
-
297
- export {
298
- GeometryType_default,
299
- PrimitiveType_default,
300
- Geometry_default,
301
- GeometryAttribute_default
302
- };
@@ -1,122 +0,0 @@
1
- /**
2
- * @license
3
- * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.115
5
- *
6
- * Copyright 2011-2022 Cesium Contributors
7
- *
8
- * Licensed under the Apache License, Version 2.0 (the "License");
9
- * you may not use this file except in compliance with the License.
10
- * You may obtain a copy of the License at
11
- *
12
- * http://www.apache.org/licenses/LICENSE-2.0
13
- *
14
- * Unless required by applicable law or agreed to in writing, software
15
- * distributed under the License is distributed on an "AS IS" BASIS,
16
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
- * See the License for the specific language governing permissions and
18
- * limitations under the License.
19
- *
20
- * Columbus View (Pat. Pend.)
21
- *
22
- * Portions licensed separately.
23
- * See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
24
- */
25
-
26
- import {
27
- OrientedBoundingBox_default
28
- } from "./chunk-A5DWLWCY.js";
29
- import {
30
- Cartesian2_default,
31
- Cartesian3_default,
32
- Matrix3_default
33
- } from "./chunk-OGXZVPPM.js";
34
- import {
35
- Check_default
36
- } from "./chunk-XGI5BXZY.js";
37
-
38
- // packages/engine/Source/Core/CoplanarPolygonGeometryLibrary.js
39
- var CoplanarPolygonGeometryLibrary = {};
40
- var scratchIntersectionPoint = new Cartesian3_default();
41
- var scratchXAxis = new Cartesian3_default();
42
- var scratchYAxis = new Cartesian3_default();
43
- var scratchZAxis = new Cartesian3_default();
44
- var obbScratch = new OrientedBoundingBox_default();
45
- CoplanarPolygonGeometryLibrary.validOutline = function(positions) {
46
- Check_default.defined("positions", positions);
47
- const orientedBoundingBox = OrientedBoundingBox_default.fromPoints(
48
- positions,
49
- obbScratch
50
- );
51
- const halfAxes = orientedBoundingBox.halfAxes;
52
- const xAxis = Matrix3_default.getColumn(halfAxes, 0, scratchXAxis);
53
- const yAxis = Matrix3_default.getColumn(halfAxes, 1, scratchYAxis);
54
- const zAxis = Matrix3_default.getColumn(halfAxes, 2, scratchZAxis);
55
- const xMag = Cartesian3_default.magnitude(xAxis);
56
- const yMag = Cartesian3_default.magnitude(yAxis);
57
- const zMag = Cartesian3_default.magnitude(zAxis);
58
- return !(xMag === 0 && (yMag === 0 || zMag === 0) || yMag === 0 && zMag === 0);
59
- };
60
- CoplanarPolygonGeometryLibrary.computeProjectTo2DArguments = function(positions, centerResult, planeAxis1Result, planeAxis2Result) {
61
- Check_default.defined("positions", positions);
62
- Check_default.defined("centerResult", centerResult);
63
- Check_default.defined("planeAxis1Result", planeAxis1Result);
64
- Check_default.defined("planeAxis2Result", planeAxis2Result);
65
- const orientedBoundingBox = OrientedBoundingBox_default.fromPoints(
66
- positions,
67
- obbScratch
68
- );
69
- const halfAxes = orientedBoundingBox.halfAxes;
70
- const xAxis = Matrix3_default.getColumn(halfAxes, 0, scratchXAxis);
71
- const yAxis = Matrix3_default.getColumn(halfAxes, 1, scratchYAxis);
72
- const zAxis = Matrix3_default.getColumn(halfAxes, 2, scratchZAxis);
73
- const xMag = Cartesian3_default.magnitude(xAxis);
74
- const yMag = Cartesian3_default.magnitude(yAxis);
75
- const zMag = Cartesian3_default.magnitude(zAxis);
76
- const min = Math.min(xMag, yMag, zMag);
77
- if (xMag === 0 && (yMag === 0 || zMag === 0) || yMag === 0 && zMag === 0) {
78
- return false;
79
- }
80
- let planeAxis1;
81
- let planeAxis2;
82
- if (min === yMag || min === zMag) {
83
- planeAxis1 = xAxis;
84
- }
85
- if (min === xMag) {
86
- planeAxis1 = yAxis;
87
- } else if (min === zMag) {
88
- planeAxis2 = yAxis;
89
- }
90
- if (min === xMag || min === yMag) {
91
- planeAxis2 = zAxis;
92
- }
93
- Cartesian3_default.normalize(planeAxis1, planeAxis1Result);
94
- Cartesian3_default.normalize(planeAxis2, planeAxis2Result);
95
- Cartesian3_default.clone(orientedBoundingBox.center, centerResult);
96
- return true;
97
- };
98
- function projectTo2D(position, center, axis1, axis2, result) {
99
- const v = Cartesian3_default.subtract(position, center, scratchIntersectionPoint);
100
- const x = Cartesian3_default.dot(axis1, v);
101
- const y = Cartesian3_default.dot(axis2, v);
102
- return Cartesian2_default.fromElements(x, y, result);
103
- }
104
- CoplanarPolygonGeometryLibrary.createProjectPointsTo2DFunction = function(center, axis1, axis2) {
105
- return function(positions) {
106
- const positionResults = new Array(positions.length);
107
- for (let i = 0; i < positions.length; i++) {
108
- positionResults[i] = projectTo2D(positions[i], center, axis1, axis2);
109
- }
110
- return positionResults;
111
- };
112
- };
113
- CoplanarPolygonGeometryLibrary.createProjectPointTo2DFunction = function(center, axis1, axis2) {
114
- return function(position, result) {
115
- return projectTo2D(position, center, axis1, axis2, result);
116
- };
117
- };
118
- var CoplanarPolygonGeometryLibrary_default = CoplanarPolygonGeometryLibrary;
119
-
120
- export {
121
- CoplanarPolygonGeometryLibrary_default
122
- };