@cesium/engine 3.0.1 → 4.0.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.
Files changed (234) hide show
  1. package/Build/ThirdParty/Workers/pako_deflate.min.js +605 -0
  2. package/Build/ThirdParty/Workers/pako_inflate.min.js +800 -0
  3. package/Build/ThirdParty/Workers/z-worker-pako.js +502 -0
  4. package/Build/Workers/chunk-27R2KRIK.js +634 -0
  5. package/Build/Workers/chunk-2C65EKYA.js +55 -0
  6. package/Build/Workers/chunk-2NLMZNJI.js +138 -0
  7. package/Build/Workers/chunk-4V6RCTVH.js +289 -0
  8. package/Build/Workers/chunk-4VWUFKYW.js +368 -0
  9. package/Build/Workers/chunk-527JG4D7.js +629 -0
  10. package/Build/Workers/chunk-5U4UHRZ2.js +8644 -0
  11. package/Build/Workers/chunk-7CZEWQWE.js +353 -0
  12. package/Build/Workers/chunk-7IMAWM6A.js +842 -0
  13. package/Build/Workers/{package.js → chunk-A6EA6KIE.js} +13 -2
  14. package/Build/Workers/chunk-AXGQUPXA.js +1075 -0
  15. package/Build/Workers/chunk-BT6YIL2N.js +39 -0
  16. package/Build/Workers/chunk-C6MRR5YL.js +476 -0
  17. package/Build/Workers/chunk-DJUTBX6A.js +1860 -0
  18. package/Build/Workers/chunk-EQ6ZAP37.js +218 -0
  19. package/Build/Workers/chunk-F7P2HCYZ.js +73 -0
  20. package/Build/Workers/chunk-FE2XG3SS.js +73 -0
  21. package/Build/Workers/chunk-FKHRSGKP.js +781 -0
  22. package/Build/Workers/chunk-FVDTKX3F.js +58 -0
  23. package/Build/Workers/chunk-FYHCAKU6.js +684 -0
  24. package/Build/Workers/chunk-G3MOT7BZ.js +157 -0
  25. package/Build/Workers/chunk-H52L6U76.js +421 -0
  26. package/Build/Workers/chunk-H6MBQ4W4.js +305 -0
  27. package/Build/Workers/chunk-HCZR75II.js +2716 -0
  28. package/Build/Workers/chunk-I5MQWHBR.js +102 -0
  29. package/Build/Workers/chunk-KAFF2QX3.js +258 -0
  30. package/Build/Workers/chunk-LGSGX2RH.js +757 -0
  31. package/Build/Workers/chunk-LQRFWCNX.js +124 -0
  32. package/Build/Workers/chunk-N5MMDSD2.js +44 -0
  33. package/Build/Workers/chunk-NRETMGYL.js +390 -0
  34. package/Build/Workers/chunk-P4M4QUNQ.js +196 -0
  35. package/Build/Workers/chunk-P7PWX5HR.js +430 -0
  36. package/Build/Workers/chunk-PGB3EFR7.js +171 -0
  37. package/Build/Workers/chunk-PW5CA4MJ.js +3273 -0
  38. package/Build/Workers/chunk-PWDYKCNC.js +501 -0
  39. package/Build/Workers/chunk-QIS3NB7U.js +1258 -0
  40. package/Build/Workers/chunk-QVJ6IRKV.js +77 -0
  41. package/Build/Workers/chunk-RDCDRNJ7.js +117 -0
  42. package/Build/Workers/chunk-RDM3BKNC.js +1009 -0
  43. package/Build/Workers/chunk-RRUPTJ6P.js +452 -0
  44. package/Build/Workers/chunk-SGRWJKNO.js +400 -0
  45. package/Build/Workers/chunk-TF5D2H7B.js +138 -0
  46. package/Build/Workers/chunk-TVYIHH4V.js +513 -0
  47. package/Build/Workers/chunk-U5LKG6LX.js +101 -0
  48. package/Build/Workers/chunk-UGZGTV5K.js +302 -0
  49. package/Build/Workers/chunk-UN7AK64D.js +163 -0
  50. package/Build/Workers/chunk-V2LKNJGT.js +59 -0
  51. package/Build/Workers/chunk-VSCXSFHE.js +1477 -0
  52. package/Build/Workers/chunk-XJCTFTBM.js +2041 -0
  53. package/Build/Workers/chunk-XZVQMPWG.js +100 -0
  54. package/Build/Workers/chunk-YLAFWVOW.js +834 -0
  55. package/Build/Workers/chunk-YLS3FX3U.js +236 -0
  56. package/Build/Workers/chunk-YMJPANZZ.js +693 -0
  57. package/Build/Workers/combineGeometry.js +65 -15
  58. package/Build/Workers/createBoxGeometry.js +55 -10
  59. package/Build/Workers/createBoxOutlineGeometry.js +231 -310
  60. package/Build/Workers/createCircleGeometry.js +185 -202
  61. package/Build/Workers/createCircleOutlineGeometry.js +141 -155
  62. package/Build/Workers/createCoplanarPolygonGeometry.js +477 -557
  63. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +218 -230
  64. package/Build/Workers/createCorridorGeometry.js +1162 -1307
  65. package/Build/Workers/createCorridorOutlineGeometry.js +533 -569
  66. package/Build/Workers/createCylinderGeometry.js +57 -10
  67. package/Build/Workers/createCylinderOutlineGeometry.js +224 -258
  68. package/Build/Workers/createEllipseGeometry.js +68 -12
  69. package/Build/Workers/createEllipseOutlineGeometry.js +61 -12
  70. package/Build/Workers/createEllipsoidGeometry.js +56 -10
  71. package/Build/Workers/createEllipsoidOutlineGeometry.js +58 -13
  72. package/Build/Workers/createFrustumGeometry.js +55 -10
  73. package/Build/Workers/createFrustumOutlineGeometry.js +226 -243
  74. package/Build/Workers/createGeometry.js +143 -48
  75. package/Build/Workers/createGroundPolylineGeometry.js +1484 -2011
  76. package/Build/Workers/createPlaneGeometry.js +216 -243
  77. package/Build/Workers/createPlaneOutlineGeometry.js +121 -113
  78. package/Build/Workers/createPolygonGeometry.js +1041 -1327
  79. package/Build/Workers/createPolygonOutlineGeometry.js +516 -657
  80. package/Build/Workers/createPolylineGeometry.js +471 -547
  81. package/Build/Workers/createPolylineVolumeGeometry.js +352 -384
  82. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +271 -295
  83. package/Build/Workers/createRectangleGeometry.js +1128 -1331
  84. package/Build/Workers/createRectangleOutlineGeometry.js +445 -500
  85. package/Build/Workers/createSimplePolylineGeometry.js +381 -440
  86. package/Build/Workers/createSphereGeometry.js +112 -118
  87. package/Build/Workers/createSphereOutlineGeometry.js +112 -121
  88. package/Build/Workers/createTaskProcessorWorker.js +32 -127
  89. package/Build/Workers/createVectorTileClampedPolylines.js +462 -505
  90. package/Build/Workers/createVectorTileGeometries.js +377 -436
  91. package/Build/Workers/createVectorTilePoints.js +110 -77
  92. package/Build/Workers/createVectorTilePolygons.js +369 -391
  93. package/Build/Workers/createVectorTilePolylines.js +252 -244
  94. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +543 -615
  95. package/Build/Workers/createVerticesFromHeightmap.js +2244 -2677
  96. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +682 -904
  97. package/Build/Workers/createWallGeometry.js +459 -593
  98. package/Build/Workers/createWallOutlineGeometry.js +324 -419
  99. package/Build/Workers/decodeDraco.js +327 -347
  100. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +2530 -3567
  101. package/Build/Workers/decodeI3S.js +765 -970
  102. package/Build/Workers/transcodeKTX2.js +3353 -1464
  103. package/Build/Workers/transferTypedArrayTest.js +3 -4
  104. package/Build/Workers/upsampleQuantizedTerrainMesh.js +748 -953
  105. package/LICENSE.md +0 -12
  106. package/Source/Core/FeatureDetection.js +9 -0
  107. package/Source/Core/GoogleMaps.js +1 -1
  108. package/Source/Core/GroundPolylineGeometry.js +3 -2
  109. package/Source/Core/Ion.js +1 -1
  110. package/Source/Core/KTX2Transcoder.js +7 -3
  111. package/Source/Core/RequestScheduler.js +1 -0
  112. package/Source/Core/TaskProcessor.js +150 -146
  113. package/Source/Core/Transforms.js +2 -2
  114. package/Source/Core/buildModuleUrl.js +6 -5
  115. package/Source/DataSources/CzmlDataSource.js +6 -4
  116. package/Source/Scene/ArcGisMapService.js +1 -1
  117. package/Source/Scene/DracoLoader.js +26 -3
  118. package/Source/Scene/GltfLoaderUtil.js +1 -7
  119. package/Source/Scene/I3SDataProvider.js +0 -27
  120. package/Source/Scene/I3SDecoder.js +127 -0
  121. package/Source/Scene/I3SNode.js +32 -110
  122. package/Source/Scene/ImageryLayer.js +2 -2
  123. package/Source/Scene/Implicit3DTileContent.js +13 -0
  124. package/Source/Scene/ImplicitTileset.js +5 -0
  125. package/Source/Scene/Model/I3dmLoader.js +5 -1
  126. package/Source/Scene/Model/Model.js +4 -1
  127. package/Source/Scene/OpenStreetMapImageryProvider.js +7 -4
  128. package/Source/Scene/SingleTileImageryProvider.js +4 -2
  129. package/Source/ThirdParty/Workers/basis_transcoder.js +1 -1
  130. package/Source/{WorkersES6 → Workers}/createGeometry.js +11 -12
  131. package/Source/{WorkersES6 → Workers}/createTaskProcessorWorker.js +43 -59
  132. package/Source/{WorkersES6 → Workers}/decodeDraco.js +19 -25
  133. package/Source/{WorkersES6 → Workers}/decodeI3S.js +18 -32
  134. package/Source/{WorkersES6 → Workers}/transcodeKTX2.js +19 -26
  135. package/Source/Workers/transferTypedArrayTest.js +0 -6
  136. package/index.d.ts +20 -11
  137. package/index.js +170 -169
  138. package/package.json +3 -2
  139. package/Build/Workers/ArcType-2d9abbbc.js +0 -37
  140. package/Build/Workers/AttributeCompression-f9f6c717.js +0 -716
  141. package/Build/Workers/AxisAlignedBoundingBox-4bfd84f3.js +0 -258
  142. package/Build/Workers/BoundingRectangle-5fd6403a.js +0 -369
  143. package/Build/Workers/BoxGeometry-7aa4ce7f.js +0 -884
  144. package/Build/Workers/Check-6ede7e26.js +0 -290
  145. package/Build/Workers/Color-8e135f71.js +0 -2262
  146. package/Build/Workers/ComponentDatatype-cf1fa08e.js +0 -341
  147. package/Build/Workers/CoplanarPolygonGeometryLibrary-59c69b0a.js +0 -132
  148. package/Build/Workers/CorridorGeometryLibrary-63907365.js +0 -498
  149. package/Build/Workers/CylinderGeometry-8fc7c44b.js +0 -467
  150. package/Build/Workers/CylinderGeometryLibrary-7bf291b4.js +0 -63
  151. package/Build/Workers/EllipseGeometry-16b3736a.js +0 -1304
  152. package/Build/Workers/EllipseGeometryLibrary-21262a28.js +0 -366
  153. package/Build/Workers/EllipseOutlineGeometry-05d35d18.js +0 -443
  154. package/Build/Workers/EllipsoidGeodesic-5b3623dc.js +0 -520
  155. package/Build/Workers/EllipsoidGeometry-a503d1d6.js +0 -637
  156. package/Build/Workers/EllipsoidOutlineGeometry-7b09f24d.js +0 -454
  157. package/Build/Workers/EllipsoidRhumbLine-ef872433.js +0 -741
  158. package/Build/Workers/EllipsoidTangentPlane-546c0d5e.js +0 -373
  159. package/Build/Workers/EncodedCartesian3-57415c8a.js +0 -171
  160. package/Build/Workers/FrustumGeometry-87ce8622.js +0 -2540
  161. package/Build/Workers/GeometryAttribute-8fcff0d5.js +0 -619
  162. package/Build/Workers/GeometryAttributes-ad136444.js +0 -91
  163. package/Build/Workers/GeometryInstance-34d9e21e.js +0 -121
  164. package/Build/Workers/GeometryOffsetAttribute-9ad0019c.js +0 -16
  165. package/Build/Workers/GeometryPipeline-70d69a43.js +0 -3690
  166. package/Build/Workers/IndexDatatype-2643aa47.js +0 -200
  167. package/Build/Workers/IntersectionTests-85350792.js +0 -1836
  168. package/Build/Workers/Math-0a2ac845.js +0 -1340
  169. package/Build/Workers/Matrix2-e1298525.js +0 -7086
  170. package/Build/Workers/Matrix3-41c58dde.js +0 -4283
  171. package/Build/Workers/OrientedBoundingBox-29fb0fcd.js +0 -1259
  172. package/Build/Workers/Plane-4c3d403b.js +0 -309
  173. package/Build/Workers/PolygonGeometryLibrary-bad6329a.js +0 -1074
  174. package/Build/Workers/PolygonPipeline-dd13ee78.js +0 -1344
  175. package/Build/Workers/PolylinePipeline-7119eb3f.js +0 -573
  176. package/Build/Workers/PolylineVolumeGeometryLibrary-d25f0050.js +0 -781
  177. package/Build/Workers/PrimitivePipeline-111ee29f.js +0 -966
  178. package/Build/Workers/RectangleGeometryLibrary-bb378fb6.js +0 -280
  179. package/Build/Workers/RuntimeError-ef395448.js +0 -68
  180. package/Build/Workers/TerrainEncoding-c8e029a2.js +0 -1227
  181. package/Build/Workers/Transforms-e2d4a55a.js +0 -14713
  182. package/Build/Workers/VertexFormat-030f11ff.js +0 -312
  183. package/Build/Workers/WallGeometryLibrary-3e0819ec.js +0 -211
  184. package/Build/Workers/WebGLConstants-0b1ce7ba.js +0 -620
  185. package/Build/Workers/WebMercatorProjection-13ed1a6e.js +0 -151
  186. package/Build/Workers/arrayRemoveDuplicates-d2061e85.js +0 -129
  187. package/Build/Workers/cesiumWorkerBootstrapper.js +0 -1363
  188. package/Build/Workers/combine-d9581036.js +0 -82
  189. package/Build/Workers/defaultValue-fe22d8c0.js +0 -51
  190. package/Source/ThirdParty/Workers/draco_decoder_nodejs.js +0 -117
  191. package/Source/Workers/cesiumWorkerBootstrapper.js +0 -2290
  192. package/Source/Workers/package.json +0 -1
  193. /package/Source/{WorkersES6 → Workers}/combineGeometry.js +0 -0
  194. /package/Source/{WorkersES6 → Workers}/createBoxGeometry.js +0 -0
  195. /package/Source/{WorkersES6 → Workers}/createBoxOutlineGeometry.js +0 -0
  196. /package/Source/{WorkersES6 → Workers}/createCircleGeometry.js +0 -0
  197. /package/Source/{WorkersES6 → Workers}/createCircleOutlineGeometry.js +0 -0
  198. /package/Source/{WorkersES6 → Workers}/createCoplanarPolygonGeometry.js +0 -0
  199. /package/Source/{WorkersES6 → Workers}/createCoplanarPolygonOutlineGeometry.js +0 -0
  200. /package/Source/{WorkersES6 → Workers}/createCorridorGeometry.js +0 -0
  201. /package/Source/{WorkersES6 → Workers}/createCorridorOutlineGeometry.js +0 -0
  202. /package/Source/{WorkersES6 → Workers}/createCylinderGeometry.js +0 -0
  203. /package/Source/{WorkersES6 → Workers}/createCylinderOutlineGeometry.js +0 -0
  204. /package/Source/{WorkersES6 → Workers}/createEllipseGeometry.js +0 -0
  205. /package/Source/{WorkersES6 → Workers}/createEllipseOutlineGeometry.js +0 -0
  206. /package/Source/{WorkersES6 → Workers}/createEllipsoidGeometry.js +0 -0
  207. /package/Source/{WorkersES6 → Workers}/createEllipsoidOutlineGeometry.js +0 -0
  208. /package/Source/{WorkersES6 → Workers}/createFrustumGeometry.js +0 -0
  209. /package/Source/{WorkersES6 → Workers}/createFrustumOutlineGeometry.js +0 -0
  210. /package/Source/{WorkersES6 → Workers}/createGroundPolylineGeometry.js +0 -0
  211. /package/Source/{WorkersES6 → Workers}/createPlaneGeometry.js +0 -0
  212. /package/Source/{WorkersES6 → Workers}/createPlaneOutlineGeometry.js +0 -0
  213. /package/Source/{WorkersES6 → Workers}/createPolygonGeometry.js +0 -0
  214. /package/Source/{WorkersES6 → Workers}/createPolygonOutlineGeometry.js +0 -0
  215. /package/Source/{WorkersES6 → Workers}/createPolylineGeometry.js +0 -0
  216. /package/Source/{WorkersES6 → Workers}/createPolylineVolumeGeometry.js +0 -0
  217. /package/Source/{WorkersES6 → Workers}/createPolylineVolumeOutlineGeometry.js +0 -0
  218. /package/Source/{WorkersES6 → Workers}/createRectangleGeometry.js +0 -0
  219. /package/Source/{WorkersES6 → Workers}/createRectangleOutlineGeometry.js +0 -0
  220. /package/Source/{WorkersES6 → Workers}/createSimplePolylineGeometry.js +0 -0
  221. /package/Source/{WorkersES6 → Workers}/createSphereGeometry.js +0 -0
  222. /package/Source/{WorkersES6 → Workers}/createSphereOutlineGeometry.js +0 -0
  223. /package/Source/{WorkersES6 → Workers}/createVectorTileClampedPolylines.js +0 -0
  224. /package/Source/{WorkersES6 → Workers}/createVectorTileGeometries.js +0 -0
  225. /package/Source/{WorkersES6 → Workers}/createVectorTilePoints.js +0 -0
  226. /package/Source/{WorkersES6 → Workers}/createVectorTilePolygons.js +0 -0
  227. /package/Source/{WorkersES6 → Workers}/createVectorTilePolylines.js +0 -0
  228. /package/Source/{WorkersES6 → Workers}/createVerticesFromGoogleEarthEnterpriseBuffer.js +0 -0
  229. /package/Source/{WorkersES6 → Workers}/createVerticesFromHeightmap.js +0 -0
  230. /package/Source/{WorkersES6 → Workers}/createVerticesFromQuantizedTerrainMesh.js +0 -0
  231. /package/Source/{WorkersES6 → Workers}/createWallGeometry.js +0 -0
  232. /package/Source/{WorkersES6 → Workers}/createWallOutlineGeometry.js +0 -0
  233. /package/Source/{WorkersES6 → Workers}/decodeGoogleEarthEnterprisePacket.js +0 -0
  234. /package/Source/{WorkersES6 → Workers}/upsampleQuantizedTerrainMesh.js +0 -0
@@ -0,0 +1,302 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 1.109
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-5U4UHRZ2.js";
30
+ import {
31
+ Cartesian2_default,
32
+ Matrix2_default,
33
+ Matrix4_default,
34
+ Rectangle_default
35
+ } from "./chunk-PW5CA4MJ.js";
36
+ import {
37
+ Cartesian3_default,
38
+ Cartographic_default,
39
+ Matrix3_default
40
+ } from "./chunk-XJCTFTBM.js";
41
+ import {
42
+ WebGLConstants_default
43
+ } from "./chunk-527JG4D7.js";
44
+ import {
45
+ defaultValue_default
46
+ } from "./chunk-BT6YIL2N.js";
47
+ import {
48
+ Check_default,
49
+ DeveloperError_default
50
+ } from "./chunk-UN7AK64D.js";
51
+ import {
52
+ defined_default
53
+ } from "./chunk-QVJ6IRKV.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
+ };
@@ -0,0 +1,163 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 1.109
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
+ defined_default
28
+ } from "./chunk-QVJ6IRKV.js";
29
+
30
+ // packages/engine/Source/Core/DeveloperError.js
31
+ function DeveloperError(message) {
32
+ this.name = "DeveloperError";
33
+ this.message = message;
34
+ let stack;
35
+ try {
36
+ throw new Error();
37
+ } catch (e) {
38
+ stack = e.stack;
39
+ }
40
+ this.stack = stack;
41
+ }
42
+ if (defined_default(Object.create)) {
43
+ DeveloperError.prototype = Object.create(Error.prototype);
44
+ DeveloperError.prototype.constructor = DeveloperError;
45
+ }
46
+ DeveloperError.prototype.toString = function() {
47
+ let str = `${this.name}: ${this.message}`;
48
+ if (defined_default(this.stack)) {
49
+ str += `
50
+ ${this.stack.toString()}`;
51
+ }
52
+ return str;
53
+ };
54
+ DeveloperError.throwInstantiationError = function() {
55
+ throw new DeveloperError(
56
+ "This function defines an interface and should not be called directly."
57
+ );
58
+ };
59
+ var DeveloperError_default = DeveloperError;
60
+
61
+ // packages/engine/Source/Core/Check.js
62
+ var Check = {};
63
+ Check.typeOf = {};
64
+ function getUndefinedErrorMessage(name) {
65
+ return `${name} is required, actual value was undefined`;
66
+ }
67
+ function getFailedTypeErrorMessage(actual, expected, name) {
68
+ return `Expected ${name} to be typeof ${expected}, actual typeof was ${actual}`;
69
+ }
70
+ Check.defined = function(name, test) {
71
+ if (!defined_default(test)) {
72
+ throw new DeveloperError_default(getUndefinedErrorMessage(name));
73
+ }
74
+ };
75
+ Check.typeOf.func = function(name, test) {
76
+ if (typeof test !== "function") {
77
+ throw new DeveloperError_default(
78
+ getFailedTypeErrorMessage(typeof test, "function", name)
79
+ );
80
+ }
81
+ };
82
+ Check.typeOf.string = function(name, test) {
83
+ if (typeof test !== "string") {
84
+ throw new DeveloperError_default(
85
+ getFailedTypeErrorMessage(typeof test, "string", name)
86
+ );
87
+ }
88
+ };
89
+ Check.typeOf.number = function(name, test) {
90
+ if (typeof test !== "number") {
91
+ throw new DeveloperError_default(
92
+ getFailedTypeErrorMessage(typeof test, "number", name)
93
+ );
94
+ }
95
+ };
96
+ Check.typeOf.number.lessThan = function(name, test, limit) {
97
+ Check.typeOf.number(name, test);
98
+ if (test >= limit) {
99
+ throw new DeveloperError_default(
100
+ `Expected ${name} to be less than ${limit}, actual value was ${test}`
101
+ );
102
+ }
103
+ };
104
+ Check.typeOf.number.lessThanOrEquals = function(name, test, limit) {
105
+ Check.typeOf.number(name, test);
106
+ if (test > limit) {
107
+ throw new DeveloperError_default(
108
+ `Expected ${name} to be less than or equal to ${limit}, actual value was ${test}`
109
+ );
110
+ }
111
+ };
112
+ Check.typeOf.number.greaterThan = function(name, test, limit) {
113
+ Check.typeOf.number(name, test);
114
+ if (test <= limit) {
115
+ throw new DeveloperError_default(
116
+ `Expected ${name} to be greater than ${limit}, actual value was ${test}`
117
+ );
118
+ }
119
+ };
120
+ Check.typeOf.number.greaterThanOrEquals = function(name, test, limit) {
121
+ Check.typeOf.number(name, test);
122
+ if (test < limit) {
123
+ throw new DeveloperError_default(
124
+ `Expected ${name} to be greater than or equal to ${limit}, actual value was ${test}`
125
+ );
126
+ }
127
+ };
128
+ Check.typeOf.object = function(name, test) {
129
+ if (typeof test !== "object") {
130
+ throw new DeveloperError_default(
131
+ getFailedTypeErrorMessage(typeof test, "object", name)
132
+ );
133
+ }
134
+ };
135
+ Check.typeOf.bool = function(name, test) {
136
+ if (typeof test !== "boolean") {
137
+ throw new DeveloperError_default(
138
+ getFailedTypeErrorMessage(typeof test, "boolean", name)
139
+ );
140
+ }
141
+ };
142
+ Check.typeOf.bigint = function(name, test) {
143
+ if (typeof test !== "bigint") {
144
+ throw new DeveloperError_default(
145
+ getFailedTypeErrorMessage(typeof test, "bigint", name)
146
+ );
147
+ }
148
+ };
149
+ Check.typeOf.number.equals = function(name1, name2, test1, test2) {
150
+ Check.typeOf.number(name1, test1);
151
+ Check.typeOf.number(name2, test2);
152
+ if (test1 !== test2) {
153
+ throw new DeveloperError_default(
154
+ `${name1} must be equal to ${name2}, the actual values are ${test1} and ${test2}`
155
+ );
156
+ }
157
+ };
158
+ var Check_default = Check;
159
+
160
+ export {
161
+ DeveloperError_default,
162
+ Check_default
163
+ };
@@ -0,0 +1,59 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 1.109
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
+ Matrix4_default
28
+ } from "./chunk-PW5CA4MJ.js";
29
+ import {
30
+ defaultValue_default
31
+ } from "./chunk-BT6YIL2N.js";
32
+ import {
33
+ DeveloperError_default
34
+ } from "./chunk-UN7AK64D.js";
35
+ import {
36
+ defined_default
37
+ } from "./chunk-QVJ6IRKV.js";
38
+
39
+ // packages/engine/Source/Core/GeometryInstance.js
40
+ function GeometryInstance(options) {
41
+ options = defaultValue_default(options, defaultValue_default.EMPTY_OBJECT);
42
+ if (!defined_default(options.geometry)) {
43
+ throw new DeveloperError_default("options.geometry is required.");
44
+ }
45
+ this.geometry = options.geometry;
46
+ this.modelMatrix = Matrix4_default.clone(
47
+ defaultValue_default(options.modelMatrix, Matrix4_default.IDENTITY)
48
+ );
49
+ this.id = options.id;
50
+ this.pickPrimitive = options.pickPrimitive;
51
+ this.attributes = defaultValue_default(options.attributes, {});
52
+ this.westHemisphereGeometry = void 0;
53
+ this.eastHemisphereGeometry = void 0;
54
+ }
55
+ var GeometryInstance_default = GeometryInstance;
56
+
57
+ export {
58
+ GeometryInstance_default
59
+ };