@gmgis/gm-sdk 1.12.5 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/dist/dist/index.js +1848 -0
  2. package/dist/gm.min.js +16983 -16483
  3. package/dist/index.js +1436 -1434
  4. package/dist/resources/ThirdParty/Workers/pako_deflate.min.js +1 -2
  5. package/dist/resources/ThirdParty/Workers/pako_inflate.min.js +1 -2
  6. package/dist/resources/ThirdParty/Workers/z-worker-pako.js +1 -1
  7. package/dist/resources/ThirdParty/google-earth-dbroot-parser.js +1 -8337
  8. package/dist/resources/ThirdParty/wasm_splats_bg.wasm +0 -0
  9. package/dist/resources/Workers/chunk-35SHYARM.js +26 -0
  10. package/dist/resources/Workers/chunk-37F5JSTI.js +26 -0
  11. package/dist/resources/Workers/chunk-3SSKC3VN.js +26 -0
  12. package/dist/resources/Workers/chunk-3W4GT7KQ.js +26 -0
  13. package/dist/resources/Workers/chunk-4IW2T6GF.js +26 -0
  14. package/dist/resources/Workers/chunk-5YEWO3HT.js +26 -0
  15. package/dist/resources/Workers/chunk-64RSHJUE.js +28 -0
  16. package/dist/resources/Workers/chunk-77IHZJJ3.js +26 -0
  17. package/dist/resources/Workers/chunk-7HTKERZY.js +26 -0
  18. package/dist/resources/Workers/{chunk-I2ITFFPX.js → chunk-A56XVLQR.js} +2 -13
  19. package/dist/resources/Workers/chunk-AJYK4IVJ.js +26 -0
  20. package/dist/resources/Workers/{chunk-PRGYLLJT.js → chunk-ARG42DC4.js} +2 -31
  21. package/dist/resources/Workers/chunk-AU7IKHOH.js +26 -0
  22. package/dist/resources/Workers/chunk-B4AA3ARO.js +26 -0
  23. package/dist/resources/Workers/chunk-CNCV5UL7.js +26 -0
  24. package/dist/resources/Workers/chunk-CYCB63OH.js +26 -0
  25. package/dist/resources/Workers/{chunk-DI5NGJUP.js → chunk-D6AA5QVT.js} +2 -20
  26. package/dist/resources/Workers/chunk-D6C66QON.js +26 -0
  27. package/dist/resources/Workers/chunk-DEPHB2WM.js +26 -0
  28. package/dist/resources/Workers/chunk-DMEY62ID.js +26 -0
  29. package/dist/resources/Workers/chunk-DQQ63PYM.js +26 -0
  30. package/dist/resources/Workers/chunk-ED5JPB3S.js +27 -0
  31. package/dist/resources/Workers/chunk-EZUYS2JF.js +26 -0
  32. package/dist/resources/Workers/chunk-FEVXJ54I.js +26 -0
  33. package/dist/resources/Workers/chunk-G5AGHVVC.js +26 -0
  34. package/dist/resources/Workers/{chunk-7JO7GPJN.js → chunk-GBYLG25F.js} +2 -15
  35. package/dist/resources/Workers/chunk-GILIDQNQ.js +26 -0
  36. package/dist/resources/Workers/chunk-HMIYSTF6.js +26 -0
  37. package/dist/resources/Workers/chunk-HTFSEEMT.js +26 -0
  38. package/dist/resources/Workers/chunk-HWXX4CWK.js +26 -0
  39. package/dist/resources/Workers/chunk-IYTZ52EY.js +26 -0
  40. package/dist/resources/Workers/chunk-J6UP6FLE.js +26 -0
  41. package/dist/resources/Workers/chunk-LEYMRMBK.js +27 -0
  42. package/dist/resources/Workers/chunk-M3MGYQSL.js +26 -0
  43. package/dist/resources/Workers/chunk-N4VJKXZS.js +26 -0
  44. package/dist/resources/Workers/chunk-NB3ML6JO.js +26 -0
  45. package/dist/resources/Workers/chunk-OFUUQVMR.js +26 -0
  46. package/dist/resources/Workers/chunk-OSW76XDF.js +26 -0
  47. package/dist/resources/Workers/chunk-PSPPBZWI.js +66 -0
  48. package/dist/resources/Workers/chunk-QN3VOORQ.js +26 -0
  49. package/dist/resources/Workers/chunk-QOUAJ6TL.js +26 -0
  50. package/dist/resources/Workers/chunk-RCV6KWXS.js +26 -0
  51. package/dist/resources/Workers/chunk-TCGIRNHN.js +26 -0
  52. package/dist/resources/Workers/chunk-U4IEOH5K.js +26 -0
  53. package/dist/resources/Workers/chunk-UP6I5URU.js +26 -0
  54. package/dist/resources/Workers/chunk-VTAIKJXX.js +26 -0
  55. package/dist/resources/Workers/chunk-VTBDSFTG.js +26 -0
  56. package/dist/resources/Workers/chunk-VW6VD53G.js +26 -0
  57. package/dist/resources/Workers/chunk-WGGIH7QW.js +26 -0
  58. package/dist/resources/Workers/chunk-WWA5PL4H.js +26 -0
  59. package/dist/resources/Workers/{chunk-6CHGCNMW.js → chunk-WZDE3RYP.js} +4 -34
  60. package/dist/resources/Workers/chunk-XRL4AVS5.js +26 -0
  61. package/dist/resources/Workers/combineGeometry.js +2 -40
  62. package/dist/resources/Workers/createBoxGeometry.js +2 -32
  63. package/dist/resources/Workers/createBoxOutlineGeometry.js +2 -209
  64. package/dist/resources/Workers/createCircleGeometry.js +2 -175
  65. package/dist/resources/Workers/createCircleOutlineGeometry.js +2 -121
  66. package/dist/resources/Workers/createCoplanarPolygonGeometry.js +2 -481
  67. package/dist/resources/Workers/createCoplanarPolygonOutlineGeometry.js +2 -199
  68. package/dist/resources/Workers/createCorridorGeometry.js +2 -1237
  69. package/dist/resources/Workers/createCorridorOutlineGeometry.js +2 -542
  70. package/dist/resources/Workers/createCylinderGeometry.js +2 -34
  71. package/dist/resources/Workers/createCylinderOutlineGeometry.js +2 -205
  72. package/dist/resources/Workers/createEllipseGeometry.js +2 -45
  73. package/dist/resources/Workers/createEllipseOutlineGeometry.js +2 -38
  74. package/dist/resources/Workers/createEllipsoidGeometry.js +2 -33
  75. package/dist/resources/Workers/createEllipsoidOutlineGeometry.js +2 -35
  76. package/dist/resources/Workers/createFrustumGeometry.js +2 -32
  77. package/dist/resources/Workers/createFrustumOutlineGeometry.js +2 -210
  78. package/dist/resources/Workers/createGeometry.js +2 -144
  79. package/dist/resources/Workers/createGroundPolylineGeometry.js +2 -1582
  80. package/dist/resources/Workers/createPlaneGeometry.js +2 -198
  81. package/dist/resources/Workers/createPlaneOutlineGeometry.js +2 -98
  82. package/dist/resources/Workers/createPolygonGeometry.js +2 -1381
  83. package/dist/resources/Workers/createPolygonOutlineGeometry.js +2 -509
  84. package/dist/resources/Workers/createPolylineGeometry.js +2 -470
  85. package/dist/resources/Workers/createPolylineVolumeGeometry.js +2 -354
  86. package/dist/resources/Workers/createPolylineVolumeOutlineGeometry.js +2 -251
  87. package/dist/resources/Workers/createRectangleGeometry.js +2 -1246
  88. package/dist/resources/Workers/createRectangleOutlineGeometry.js +2 -453
  89. package/dist/resources/Workers/createSimplePolylineGeometry.js +2 -374
  90. package/dist/resources/Workers/createSphereGeometry.js +2 -92
  91. package/dist/resources/Workers/createSphereOutlineGeometry.js +2 -92
  92. package/dist/resources/Workers/createTaskProcessorWorker.js +2 -8
  93. package/dist/resources/Workers/createVectorTileClampedPolylines.js +2 -466
  94. package/dist/resources/Workers/createVectorTileGeometries.js +2 -361
  95. package/dist/resources/Workers/createVectorTilePoints.js +2 -88
  96. package/dist/resources/Workers/createVectorTilePolygons.js +2 -359
  97. package/dist/resources/Workers/createVectorTilePolylines.js +2 -236
  98. package/dist/resources/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +2 -539
  99. package/dist/resources/Workers/createVerticesFromHeightmap.js +2 -2252
  100. package/dist/resources/Workers/createVerticesFromQuantizedTerrainMesh.js +2 -729
  101. package/dist/resources/Workers/createWallGeometry.js +2 -464
  102. package/dist/resources/Workers/createWallOutlineGeometry.js +2 -312
  103. package/dist/resources/Workers/decodeDraco.js +2 -345
  104. package/dist/resources/Workers/decodeGoogleEarthEnterprisePacket.js +2 -2642
  105. package/dist/resources/Workers/decodeI3S.js +2 -1319
  106. package/dist/resources/Workers/gaussianSplatSorter.js +26 -0
  107. package/dist/resources/Workers/gaussianSplatTextureGenerator.js +26 -0
  108. package/dist/resources/Workers/transcodeKTX2.js +29 -3360
  109. package/dist/resources/Workers/transferTypedArrayTest.js +2 -17
  110. package/dist/resources/Workers/upsampleQuantizedTerrainMesh.js +2 -793
  111. package/package.json +74 -74
  112. package/dist/resources/ThirdParty/Workers/basis_transcoder.js +0 -21
  113. package/dist/resources/Workers/chunk-26GA3JAM.js +0 -139
  114. package/dist/resources/Workers/chunk-27HUZ7SA.js +0 -305
  115. package/dist/resources/Workers/chunk-2ZGOQXYU.js +0 -171
  116. package/dist/resources/Workers/chunk-3Q2L65QU.js +0 -1258
  117. package/dist/resources/Workers/chunk-472HQ3EH.js +0 -100
  118. package/dist/resources/Workers/chunk-5ODQSF26.js +0 -101
  119. package/dist/resources/Workers/chunk-5OOFQLKF.js +0 -634
  120. package/dist/resources/Workers/chunk-5PTXS2GO.js +0 -10390
  121. package/dist/resources/Workers/chunk-76BYBWHP.js +0 -122
  122. package/dist/resources/Workers/chunk-7BMOHCPM.js +0 -390
  123. package/dist/resources/Workers/chunk-7KTQP4VB.js +0 -59
  124. package/dist/resources/Workers/chunk-7O373FFS.js +0 -665
  125. package/dist/resources/Workers/chunk-AD63PIY6.js +0 -163
  126. package/dist/resources/Workers/chunk-BHQJ2NT7.js +0 -353
  127. package/dist/resources/Workers/chunk-C6YYBQXW.js +0 -102
  128. package/dist/resources/Workers/chunk-CKY7HOHV.js +0 -287
  129. package/dist/resources/Workers/chunk-DHYHSFFJ.js +0 -73
  130. package/dist/resources/Workers/chunk-E27BLMDD.js +0 -115
  131. package/dist/resources/Workers/chunk-E63IIM5T.js +0 -75
  132. package/dist/resources/Workers/chunk-E6V6SQZW.js +0 -456
  133. package/dist/resources/Workers/chunk-EJZTDTUH.js +0 -138
  134. package/dist/resources/Workers/chunk-FDOV2LBJ.js +0 -220
  135. package/dist/resources/Workers/chunk-FIGIZHAQ.js +0 -684
  136. package/dist/resources/Workers/chunk-GESF4OXQ.js +0 -1800
  137. package/dist/resources/Workers/chunk-GGZJN2TI.js +0 -2717
  138. package/dist/resources/Workers/chunk-GNBFYG7F.js +0 -1481
  139. package/dist/resources/Workers/chunk-GWCFU2SA.js +0 -300
  140. package/dist/resources/Workers/chunk-IBLIYJZR.js +0 -196
  141. package/dist/resources/Workers/chunk-JW4FOI6M.js +0 -476
  142. package/dist/resources/Workers/chunk-K4GQUNB5.js +0 -262
  143. package/dist/resources/Workers/chunk-M3GMB5OP.js +0 -834
  144. package/dist/resources/Workers/chunk-MXIZJAPH.js +0 -629
  145. package/dist/resources/Workers/chunk-N5KJGGCM.js +0 -1073
  146. package/dist/resources/Workers/chunk-NGPPMXRM.js +0 -435
  147. package/dist/resources/Workers/chunk-O3E4OAOE.js +0 -511
  148. package/dist/resources/Workers/chunk-PGRPDNHG.js +0 -1048
  149. package/dist/resources/Workers/chunk-S6MRMMQU.js +0 -157
  150. package/dist/resources/Workers/chunk-SMDOP47J.js +0 -945
  151. package/dist/resources/Workers/chunk-TGONEMZO.js +0 -421
  152. package/dist/resources/Workers/chunk-TKVT5GQM.js +0 -781
  153. package/dist/resources/Workers/chunk-U72QNFOJ.js +0 -758
  154. package/dist/resources/Workers/chunk-VJZB3WAV.js +0 -963
  155. package/dist/resources/Workers/chunk-VU2MNO7L.js +0 -239
  156. package/dist/resources/Workers/chunk-XY4BATBS.js +0 -500
  157. package/dist/resources/Workers/chunk-YFXQECWV.js +0 -2857
  158. package/dist/resources/Workers/chunk-YSGTGQQO.js +0 -398
  159. package/dist/resources/Workers/chunk-YZ733KKS.js +0 -368
@@ -1,300 +0,0 @@
1
- /**
2
- * @license
3
- * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.122
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
- Matrix2_default,
28
- Matrix4_default,
29
- Quaternion_default,
30
- Rectangle_default,
31
- Transforms_default
32
- } from "./chunk-5PTXS2GO.js";
33
- import {
34
- Cartesian2_default,
35
- Cartesian3_default,
36
- Cartographic_default,
37
- Matrix3_default
38
- } from "./chunk-YFXQECWV.js";
39
- import {
40
- WebGLConstants_default
41
- } from "./chunk-MXIZJAPH.js";
42
- import {
43
- defaultValue_default
44
- } from "./chunk-7JO7GPJN.js";
45
- import {
46
- Check_default,
47
- DeveloperError_default
48
- } from "./chunk-AD63PIY6.js";
49
- import {
50
- defined_default
51
- } from "./chunk-E63IIM5T.js";
52
-
53
- // packages/engine/Source/Core/GeometryType.js
54
- var GeometryType = {
55
- NONE: 0,
56
- TRIANGLES: 1,
57
- LINES: 2,
58
- POLYLINES: 3
59
- };
60
- var GeometryType_default = Object.freeze(GeometryType);
61
-
62
- // packages/engine/Source/Core/PrimitiveType.js
63
- var PrimitiveType = {
64
- /**
65
- * Points primitive where each vertex (or index) is a separate point.
66
- *
67
- * @type {number}
68
- * @constant
69
- */
70
- POINTS: WebGLConstants_default.POINTS,
71
- /**
72
- * Lines primitive where each two vertices (or indices) is a line segment. Line segments are not necessarily connected.
73
- *
74
- * @type {number}
75
- * @constant
76
- */
77
- LINES: WebGLConstants_default.LINES,
78
- /**
79
- * Line loop primitive where each vertex (or index) after the first connects a line to
80
- * the previous vertex, and the last vertex implicitly connects to the first.
81
- *
82
- * @type {number}
83
- * @constant
84
- */
85
- LINE_LOOP: WebGLConstants_default.LINE_LOOP,
86
- /**
87
- * Line strip primitive where each vertex (or index) after the first connects a line to the previous vertex.
88
- *
89
- * @type {number}
90
- * @constant
91
- */
92
- LINE_STRIP: WebGLConstants_default.LINE_STRIP,
93
- /**
94
- * Triangles primitive where each three vertices (or indices) is a triangle. Triangles do not necessarily share edges.
95
- *
96
- * @type {number}
97
- * @constant
98
- */
99
- TRIANGLES: WebGLConstants_default.TRIANGLES,
100
- /**
101
- * Triangle strip primitive where each vertex (or index) after the first two connect to
102
- * the previous two vertices forming a triangle. For example, this can be used to model a wall.
103
- *
104
- * @type {number}
105
- * @constant
106
- */
107
- TRIANGLE_STRIP: WebGLConstants_default.TRIANGLE_STRIP,
108
- /**
109
- * Triangle fan primitive where each vertex (or index) after the first two connect to
110
- * the previous vertex and the first vertex forming a triangle. For example, this can be used
111
- * to model a cone or circle.
112
- *
113
- * @type {number}
114
- * @constant
115
- */
116
- TRIANGLE_FAN: WebGLConstants_default.TRIANGLE_FAN
117
- };
118
- PrimitiveType.isLines = function(primitiveType) {
119
- return primitiveType === PrimitiveType.LINES || primitiveType === PrimitiveType.LINE_LOOP || primitiveType === PrimitiveType.LINE_STRIP;
120
- };
121
- PrimitiveType.isTriangles = function(primitiveType) {
122
- return primitiveType === PrimitiveType.TRIANGLES || primitiveType === PrimitiveType.TRIANGLE_STRIP || primitiveType === PrimitiveType.TRIANGLE_FAN;
123
- };
124
- PrimitiveType.validate = function(primitiveType) {
125
- 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;
126
- };
127
- var PrimitiveType_default = Object.freeze(PrimitiveType);
128
-
129
- // packages/engine/Source/Core/Geometry.js
130
- function Geometry(options) {
131
- options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
132
- Check_default.typeOf.object("options.attributes", options.attributes);
133
- this.attributes = options.attributes;
134
- this.indices = options.indices;
135
- this.primitiveType = defaultValue_default(
136
- options.primitiveType,
137
- PrimitiveType_default.TRIANGLES
138
- );
139
- this.boundingSphere = options.boundingSphere;
140
- this.geometryType = defaultValue_default(options.geometryType, GeometryType_default.NONE);
141
- this.boundingSphereCV = options.boundingSphereCV;
142
- this.offsetAttribute = options.offsetAttribute;
143
- }
144
- Geometry.computeNumberOfVertices = function(geometry) {
145
- Check_default.typeOf.object("geometry", geometry);
146
- let numberOfVertices = -1;
147
- for (const property in geometry.attributes) {
148
- if (geometry.attributes.hasOwnProperty(property) && defined_default(geometry.attributes[property]) && defined_default(geometry.attributes[property].values)) {
149
- const attribute = geometry.attributes[property];
150
- const num = attribute.values.length / attribute.componentsPerAttribute;
151
- if (numberOfVertices !== num && numberOfVertices !== -1) {
152
- throw new DeveloperError_default(
153
- "All attribute lists must have the same number of attributes."
154
- );
155
- }
156
- numberOfVertices = num;
157
- }
158
- }
159
- return numberOfVertices;
160
- };
161
- var rectangleCenterScratch = new Cartographic_default();
162
- var enuCenterScratch = new Cartesian3_default();
163
- var fixedFrameToEnuScratch = new Matrix4_default();
164
- var boundingRectanglePointsCartographicScratch = [
165
- new Cartographic_default(),
166
- new Cartographic_default(),
167
- new Cartographic_default()
168
- ];
169
- var boundingRectanglePointsEnuScratch = [
170
- new Cartesian2_default(),
171
- new Cartesian2_default(),
172
- new Cartesian2_default()
173
- ];
174
- var points2DScratch = [new Cartesian2_default(), new Cartesian2_default(), new Cartesian2_default()];
175
- var pointEnuScratch = new Cartesian3_default();
176
- var enuRotationScratch = new Quaternion_default();
177
- var enuRotationMatrixScratch = new Matrix4_default();
178
- var rotation2DScratch = new Matrix2_default();
179
- Geometry._textureCoordinateRotationPoints = function(positions, stRotation, ellipsoid, boundingRectangle) {
180
- let i;
181
- const rectangleCenter = Rectangle_default.center(
182
- boundingRectangle,
183
- rectangleCenterScratch
184
- );
185
- const enuCenter = Cartographic_default.toCartesian(
186
- rectangleCenter,
187
- ellipsoid,
188
- enuCenterScratch
189
- );
190
- const enuToFixedFrame = Transforms_default.eastNorthUpToFixedFrame(
191
- enuCenter,
192
- ellipsoid,
193
- fixedFrameToEnuScratch
194
- );
195
- const fixedFrameToEnu = Matrix4_default.inverse(
196
- enuToFixedFrame,
197
- fixedFrameToEnuScratch
198
- );
199
- const boundingPointsEnu = boundingRectanglePointsEnuScratch;
200
- const boundingPointsCarto = boundingRectanglePointsCartographicScratch;
201
- boundingPointsCarto[0].longitude = boundingRectangle.west;
202
- boundingPointsCarto[0].latitude = boundingRectangle.south;
203
- boundingPointsCarto[1].longitude = boundingRectangle.west;
204
- boundingPointsCarto[1].latitude = boundingRectangle.north;
205
- boundingPointsCarto[2].longitude = boundingRectangle.east;
206
- boundingPointsCarto[2].latitude = boundingRectangle.south;
207
- let posEnu = pointEnuScratch;
208
- for (i = 0; i < 3; i++) {
209
- Cartographic_default.toCartesian(boundingPointsCarto[i], ellipsoid, posEnu);
210
- posEnu = Matrix4_default.multiplyByPointAsVector(fixedFrameToEnu, posEnu, posEnu);
211
- boundingPointsEnu[i].x = posEnu.x;
212
- boundingPointsEnu[i].y = posEnu.y;
213
- }
214
- const rotation = Quaternion_default.fromAxisAngle(
215
- Cartesian3_default.UNIT_Z,
216
- -stRotation,
217
- enuRotationScratch
218
- );
219
- const textureMatrix = Matrix3_default.fromQuaternion(
220
- rotation,
221
- enuRotationMatrixScratch
222
- );
223
- const positionsLength = positions.length;
224
- let enuMinX = Number.POSITIVE_INFINITY;
225
- let enuMinY = Number.POSITIVE_INFINITY;
226
- let enuMaxX = Number.NEGATIVE_INFINITY;
227
- let enuMaxY = Number.NEGATIVE_INFINITY;
228
- for (i = 0; i < positionsLength; i++) {
229
- posEnu = Matrix4_default.multiplyByPointAsVector(
230
- fixedFrameToEnu,
231
- positions[i],
232
- posEnu
233
- );
234
- posEnu = Matrix3_default.multiplyByVector(textureMatrix, posEnu, posEnu);
235
- enuMinX = Math.min(enuMinX, posEnu.x);
236
- enuMinY = Math.min(enuMinY, posEnu.y);
237
- enuMaxX = Math.max(enuMaxX, posEnu.x);
238
- enuMaxY = Math.max(enuMaxY, posEnu.y);
239
- }
240
- const toDesiredInComputed = Matrix2_default.fromRotation(
241
- stRotation,
242
- rotation2DScratch
243
- );
244
- const points2D = points2DScratch;
245
- points2D[0].x = enuMinX;
246
- points2D[0].y = enuMinY;
247
- points2D[1].x = enuMinX;
248
- points2D[1].y = enuMaxY;
249
- points2D[2].x = enuMaxX;
250
- points2D[2].y = enuMinY;
251
- const boundingEnuMin = boundingPointsEnu[0];
252
- const boundingPointsWidth = boundingPointsEnu[2].x - boundingEnuMin.x;
253
- const boundingPointsHeight = boundingPointsEnu[1].y - boundingEnuMin.y;
254
- for (i = 0; i < 3; i++) {
255
- const point2D = points2D[i];
256
- Matrix2_default.multiplyByVector(toDesiredInComputed, point2D, point2D);
257
- point2D.x = (point2D.x - boundingEnuMin.x) / boundingPointsWidth;
258
- point2D.y = (point2D.y - boundingEnuMin.y) / boundingPointsHeight;
259
- }
260
- const minXYCorner = points2D[0];
261
- const maxYCorner = points2D[1];
262
- const maxXCorner = points2D[2];
263
- const result = new Array(6);
264
- Cartesian2_default.pack(minXYCorner, result);
265
- Cartesian2_default.pack(maxYCorner, result, 2);
266
- Cartesian2_default.pack(maxXCorner, result, 4);
267
- return result;
268
- };
269
- var Geometry_default = Geometry;
270
-
271
- // packages/engine/Source/Core/GeometryAttribute.js
272
- function GeometryAttribute(options) {
273
- options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
274
- if (!defined_default(options.componentDatatype)) {
275
- throw new DeveloperError_default("options.componentDatatype is required.");
276
- }
277
- if (!defined_default(options.componentsPerAttribute)) {
278
- throw new DeveloperError_default("options.componentsPerAttribute is required.");
279
- }
280
- if (options.componentsPerAttribute < 1 || options.componentsPerAttribute > 4) {
281
- throw new DeveloperError_default(
282
- "options.componentsPerAttribute must be between 1 and 4."
283
- );
284
- }
285
- if (!defined_default(options.values)) {
286
- throw new DeveloperError_default("options.values is required.");
287
- }
288
- this.componentDatatype = options.componentDatatype;
289
- this.componentsPerAttribute = options.componentsPerAttribute;
290
- this.normalize = defaultValue_default(options.normalize, false);
291
- this.values = options.values;
292
- }
293
- var GeometryAttribute_default = GeometryAttribute;
294
-
295
- export {
296
- GeometryType_default,
297
- PrimitiveType_default,
298
- Geometry_default,
299
- GeometryAttribute_default
300
- };
@@ -1,196 +0,0 @@
1
- /**
2
- * @license
3
- * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.122
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
- PolylinePipeline_default
28
- } from "./chunk-TGONEMZO.js";
29
- import {
30
- arrayRemoveDuplicates_default
31
- } from "./chunk-472HQ3EH.js";
32
- import {
33
- Cartesian3_default,
34
- Cartographic_default
35
- } from "./chunk-YFXQECWV.js";
36
- import {
37
- Math_default
38
- } from "./chunk-XY4BATBS.js";
39
- import {
40
- defined_default
41
- } from "./chunk-E63IIM5T.js";
42
-
43
- // packages/engine/Source/Core/WallGeometryLibrary.js
44
- var WallGeometryLibrary = {};
45
- function latLonEquals(c0, c1) {
46
- return Math_default.equalsEpsilon(c0.latitude, c1.latitude, Math_default.EPSILON10) && Math_default.equalsEpsilon(c0.longitude, c1.longitude, Math_default.EPSILON10);
47
- }
48
- var scratchCartographic1 = new Cartographic_default();
49
- var scratchCartographic2 = new Cartographic_default();
50
- function removeDuplicates(ellipsoid, positions, topHeights, bottomHeights) {
51
- positions = arrayRemoveDuplicates_default(positions, Cartesian3_default.equalsEpsilon);
52
- const length = positions.length;
53
- if (length < 2) {
54
- return;
55
- }
56
- const hasBottomHeights = defined_default(bottomHeights);
57
- const hasTopHeights = defined_default(topHeights);
58
- const cleanedPositions = new Array(length);
59
- const cleanedTopHeights = new Array(length);
60
- const cleanedBottomHeights = new Array(length);
61
- const v0 = positions[0];
62
- cleanedPositions[0] = v0;
63
- const c0 = ellipsoid.cartesianToCartographic(v0, scratchCartographic1);
64
- if (hasTopHeights) {
65
- c0.height = topHeights[0];
66
- }
67
- cleanedTopHeights[0] = c0.height;
68
- if (hasBottomHeights) {
69
- cleanedBottomHeights[0] = bottomHeights[0];
70
- } else {
71
- cleanedBottomHeights[0] = 0;
72
- }
73
- const startTopHeight = cleanedTopHeights[0];
74
- const startBottomHeight = cleanedBottomHeights[0];
75
- let hasAllSameHeights = startTopHeight === startBottomHeight;
76
- let index = 1;
77
- for (let i = 1; i < length; ++i) {
78
- const v1 = positions[i];
79
- const c1 = ellipsoid.cartesianToCartographic(v1, scratchCartographic2);
80
- if (hasTopHeights) {
81
- c1.height = topHeights[i];
82
- }
83
- hasAllSameHeights = hasAllSameHeights && c1.height === 0;
84
- if (!latLonEquals(c0, c1)) {
85
- cleanedPositions[index] = v1;
86
- cleanedTopHeights[index] = c1.height;
87
- if (hasBottomHeights) {
88
- cleanedBottomHeights[index] = bottomHeights[i];
89
- } else {
90
- cleanedBottomHeights[index] = 0;
91
- }
92
- hasAllSameHeights = hasAllSameHeights && cleanedTopHeights[index] === cleanedBottomHeights[index];
93
- Cartographic_default.clone(c1, c0);
94
- ++index;
95
- } else if (c0.height < c1.height) {
96
- cleanedTopHeights[index - 1] = c1.height;
97
- }
98
- }
99
- if (hasAllSameHeights || index < 2) {
100
- return;
101
- }
102
- cleanedPositions.length = index;
103
- cleanedTopHeights.length = index;
104
- cleanedBottomHeights.length = index;
105
- return {
106
- positions: cleanedPositions,
107
- topHeights: cleanedTopHeights,
108
- bottomHeights: cleanedBottomHeights
109
- };
110
- }
111
- var positionsArrayScratch = new Array(2);
112
- var heightsArrayScratch = new Array(2);
113
- var generateArcOptionsScratch = {
114
- positions: void 0,
115
- height: void 0,
116
- granularity: void 0,
117
- ellipsoid: void 0
118
- };
119
- WallGeometryLibrary.computePositions = function(ellipsoid, wallPositions, maximumHeights, minimumHeights, granularity, duplicateCorners) {
120
- const o = removeDuplicates(
121
- ellipsoid,
122
- wallPositions,
123
- maximumHeights,
124
- minimumHeights
125
- );
126
- if (!defined_default(o)) {
127
- return;
128
- }
129
- wallPositions = o.positions;
130
- maximumHeights = o.topHeights;
131
- minimumHeights = o.bottomHeights;
132
- const length = wallPositions.length;
133
- const numCorners = length - 2;
134
- let topPositions;
135
- let bottomPositions;
136
- const minDistance = Math_default.chordLength(
137
- granularity,
138
- ellipsoid.maximumRadius
139
- );
140
- const generateArcOptions = generateArcOptionsScratch;
141
- generateArcOptions.minDistance = minDistance;
142
- generateArcOptions.ellipsoid = ellipsoid;
143
- if (duplicateCorners) {
144
- let count = 0;
145
- let i;
146
- for (i = 0; i < length - 1; i++) {
147
- count += PolylinePipeline_default.numberOfPoints(
148
- wallPositions[i],
149
- wallPositions[i + 1],
150
- minDistance
151
- ) + 1;
152
- }
153
- topPositions = new Float64Array(count * 3);
154
- bottomPositions = new Float64Array(count * 3);
155
- const generateArcPositions = positionsArrayScratch;
156
- const generateArcHeights = heightsArrayScratch;
157
- generateArcOptions.positions = generateArcPositions;
158
- generateArcOptions.height = generateArcHeights;
159
- let offset = 0;
160
- for (i = 0; i < length - 1; i++) {
161
- generateArcPositions[0] = wallPositions[i];
162
- generateArcPositions[1] = wallPositions[i + 1];
163
- generateArcHeights[0] = maximumHeights[i];
164
- generateArcHeights[1] = maximumHeights[i + 1];
165
- const pos = PolylinePipeline_default.generateArc(generateArcOptions);
166
- topPositions.set(pos, offset);
167
- generateArcHeights[0] = minimumHeights[i];
168
- generateArcHeights[1] = minimumHeights[i + 1];
169
- bottomPositions.set(
170
- PolylinePipeline_default.generateArc(generateArcOptions),
171
- offset
172
- );
173
- offset += pos.length;
174
- }
175
- } else {
176
- generateArcOptions.positions = wallPositions;
177
- generateArcOptions.height = maximumHeights;
178
- topPositions = new Float64Array(
179
- PolylinePipeline_default.generateArc(generateArcOptions)
180
- );
181
- generateArcOptions.height = minimumHeights;
182
- bottomPositions = new Float64Array(
183
- PolylinePipeline_default.generateArc(generateArcOptions)
184
- );
185
- }
186
- return {
187
- bottomPositions,
188
- topPositions,
189
- numCorners
190
- };
191
- };
192
- var WallGeometryLibrary_default = WallGeometryLibrary;
193
-
194
- export {
195
- WallGeometryLibrary_default
196
- };