deeptwins-cesium-engine 0.0.11 → 0.0.37

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/Workers/chunk-2FCFIBQ2.js +39 -0
  2. package/Build/Workers/chunk-2IIIKCF7.js +300 -0
  3. package/Build/Workers/chunk-2J6YXPFM.js +220 -0
  4. package/Build/Workers/chunk-3AHS7FUF.js +1055 -0
  5. package/Build/Workers/chunk-3KUPTT26.js +287 -0
  6. package/Build/Workers/chunk-455FQP44.js +435 -0
  7. package/Build/Workers/chunk-4AAP74H3.js +122 -0
  8. package/Build/Workers/chunk-4P5FBKWM.js +102 -0
  9. package/Build/Workers/chunk-5AMSPQSZ.js +37 -0
  10. package/Build/Workers/chunk-5C4JSXR6.js +75 -0
  11. package/Build/Workers/chunk-5DQNNRPQ.js +58 -0
  12. package/Build/Workers/chunk-5OVWF6HI.js +59 -0
  13. package/Build/Workers/chunk-5RPZENEL.js +239 -0
  14. package/Build/Workers/chunk-5UKGMV6R.js +44 -0
  15. package/Build/Workers/chunk-6DY7BO6T.js +287 -0
  16. package/Build/Workers/chunk-6FVD3IIJ.js +55 -0
  17. package/Build/Workers/chunk-6OPRQVS2.js +196 -0
  18. package/Build/Workers/chunk-6OSTGAUX.js +1481 -0
  19. package/Build/Workers/chunk-7FTQDI54.js +37 -0
  20. package/Build/Workers/chunk-7L3IUOFG.js +59 -0
  21. package/Build/Workers/chunk-ARIELL6V.js +102 -0
  22. package/Build/Workers/chunk-BA245PQZ.js +262 -0
  23. package/Build/Workers/chunk-BISZYTLV.js +101 -0
  24. package/Build/Workers/chunk-BZPVRL2U.js +758 -0
  25. package/Build/Workers/chunk-C5DL5OOD.js +834 -0
  26. package/Build/Workers/chunk-CFN45AVG.js +781 -0
  27. package/Build/Workers/chunk-D3T25R6R.js +101 -0
  28. package/Build/Workers/chunk-D4YTWEV3.js +163 -0
  29. package/Build/Workers/chunk-DGFOY4TC.js +171 -0
  30. package/Build/Workers/chunk-DISULEXK.js +781 -0
  31. package/Build/Workers/chunk-DKGIF2MP.js +684 -0
  32. package/Build/Workers/chunk-DVMF43IO.js +115 -0
  33. package/Build/Workers/chunk-DVR6JMCT.js +500 -0
  34. package/Build/Workers/chunk-F6YYZDHW.js +634 -0
  35. package/Build/Workers/chunk-FJND5A7H.js +139 -0
  36. package/Build/Workers/chunk-FJNGWOG4.js +2717 -0
  37. package/Build/Workers/chunk-FJRMQM2U.js +963 -0
  38. package/Build/Workers/chunk-FOK33SCB.js +300 -0
  39. package/Build/Workers/chunk-G4IWCWWI.js +305 -0
  40. package/Build/Workers/chunk-GIHZMZ3F.js +139 -0
  41. package/Build/Workers/chunk-GJWEWL66.js +963 -0
  42. package/Build/Workers/chunk-GNCTSHQG.js +421 -0
  43. package/Build/Workers/chunk-GRO4372D.js +1258 -0
  44. package/Build/Workers/chunk-GSCTIZOR.js +456 -0
  45. package/Build/Workers/chunk-H55VWCFS.js +511 -0
  46. package/Build/Workers/chunk-HTEAEBAS.js +629 -0
  47. package/Build/Workers/chunk-IAQTHW4E.js +115 -0
  48. package/Build/Workers/chunk-IUIB2WFS.js +1258 -0
  49. package/Build/Workers/chunk-J3ZBTEAN.js +100 -0
  50. package/Build/Workers/chunk-J7XL6VRE.js +959 -0
  51. package/Build/Workers/chunk-JF4I6CIP.js +1800 -0
  52. package/Build/Workers/chunk-JOAG3UPU.js +390 -0
  53. package/Build/Workers/chunk-JYLLU6JY.js +456 -0
  54. package/Build/Workers/chunk-KAW53FKL.js +398 -0
  55. package/Build/Workers/chunk-KOCBPJPK.js +353 -0
  56. package/Build/Workers/chunk-L3NDKMCX.js +122 -0
  57. package/Build/Workers/chunk-L4DMB4HG.js +758 -0
  58. package/Build/Workers/chunk-LBIUXXZT.js +691 -0
  59. package/Build/Workers/chunk-LIMEFMYA.js +476 -0
  60. package/Build/Workers/chunk-LZKKHLJX.js +421 -0
  61. package/Build/Workers/chunk-MNULGEC7.js +684 -0
  62. package/Build/Workers/chunk-MRWHTRDL.js +1800 -0
  63. package/Build/Workers/chunk-MSBZXRID.js +171 -0
  64. package/Build/Workers/chunk-MTJCSK7U.js +100 -0
  65. package/Build/Workers/chunk-MXN3SUBX.js +73 -0
  66. package/Build/Workers/chunk-NUQV5O6F.js +500 -0
  67. package/Build/Workers/chunk-O2JHYA45.js +1073 -0
  68. package/Build/Workers/chunk-O3PMNFMM.js +2857 -0
  69. package/Build/Workers/chunk-OT53GQMQ.js +368 -0
  70. package/Build/Workers/chunk-PAHM4IKR.js +157 -0
  71. package/Build/Workers/chunk-PLVEUTBS.js +368 -0
  72. package/Build/Workers/chunk-PLYEJNFY.js +305 -0
  73. package/Build/Workers/chunk-PMTVRLJS.js +239 -0
  74. package/Build/Workers/chunk-PROTRN6O.js +959 -0
  75. package/Build/Workers/chunk-PVFBW7LI.js +1481 -0
  76. package/Build/Workers/chunk-Q3G4MO4Z.js +10357 -0
  77. package/Build/Workers/chunk-Q5Q5RB2W.js +2857 -0
  78. package/Build/Workers/chunk-QLX24TU2.js +75 -0
  79. package/Build/Workers/chunk-QOFQNSI5.js +73 -0
  80. package/Build/Workers/chunk-RSHHJYYF.js +353 -0
  81. package/Build/Workers/chunk-SBUE3HPP.js +1073 -0
  82. package/Build/Workers/chunk-SC7YL6DD.js +138 -0
  83. package/Build/Workers/chunk-SD7V6D62.js +629 -0
  84. package/Build/Workers/chunk-SLG2WUS3.js +220 -0
  85. package/Build/Workers/chunk-T6SZKZ5P.js +262 -0
  86. package/Build/Workers/chunk-TBQDPFBH.js +196 -0
  87. package/Build/Workers/chunk-TQIKBK3B.js +138 -0
  88. package/Build/Workers/chunk-TYGKEYJ5.js +44 -0
  89. package/Build/Workers/chunk-U3X46HHC.js +476 -0
  90. package/Build/Workers/chunk-UMWGVUCO.js +634 -0
  91. package/Build/Workers/chunk-UYXZLFOE.js +398 -0
  92. package/Build/Workers/chunk-V3H2PCYB.js +55 -0
  93. package/Build/Workers/chunk-XATYJMDJ.js +39 -0
  94. package/Build/Workers/chunk-XP32UWPD.js +834 -0
  95. package/Build/Workers/chunk-XWBM6FJ2.js +691 -0
  96. package/Build/Workers/chunk-XZXHTCTY.js +1055 -0
  97. package/Build/Workers/chunk-Y7AY45MB.js +10357 -0
  98. package/Build/Workers/chunk-Y7LIPFYK.js +58 -0
  99. package/Build/Workers/chunk-YN3KGCRB.js +390 -0
  100. package/Build/Workers/chunk-YV3WTCNJ.js +157 -0
  101. package/Build/Workers/chunk-YZCCHOZF.js +2717 -0
  102. package/Build/Workers/chunk-ZH4TTPUG.js +435 -0
  103. package/Build/Workers/chunk-ZJG2FZZM.js +511 -0
  104. package/Build/Workers/chunk-ZQ7S66XP.js +163 -0
  105. package/Build/Workers/combineGeometry.js +22 -22
  106. package/Build/Workers/createBoxGeometry.js +16 -16
  107. package/Build/Workers/createBoxOutlineGeometry.js +14 -14
  108. package/Build/Workers/createCircleGeometry.js +24 -24
  109. package/Build/Workers/createCircleOutlineGeometry.js +17 -17
  110. package/Build/Workers/createCoplanarPolygonGeometry.js +31 -31
  111. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +29 -29
  112. package/Build/Workers/createCorridorGeometry.js +27 -27
  113. package/Build/Workers/createCorridorOutlineGeometry.js +26 -26
  114. package/Build/Workers/createCylinderGeometry.js +18 -18
  115. package/Build/Workers/createCylinderOutlineGeometry.js +16 -16
  116. package/Build/Workers/createEllipseGeometry.js +24 -24
  117. package/Build/Workers/createEllipseOutlineGeometry.js +17 -17
  118. package/Build/Workers/createEllipsoidGeometry.js +17 -17
  119. package/Build/Workers/createEllipsoidOutlineGeometry.js +16 -16
  120. package/Build/Workers/createFrustumGeometry.js +16 -16
  121. package/Build/Workers/createFrustumOutlineGeometry.js +16 -16
  122. package/Build/Workers/createGeometry.js +22 -22
  123. package/Build/Workers/createGroundPolylineGeometry.js +20 -20
  124. package/Build/Workers/createPlaneGeometry.js +14 -14
  125. package/Build/Workers/createPlaneOutlineGeometry.js +13 -13
  126. package/Build/Workers/createPolygonGeometry.js +30 -30
  127. package/Build/Workers/createPolygonOutlineGeometry.js +28 -28
  128. package/Build/Workers/createPolylineGeometry.js +23 -23
  129. package/Build/Workers/createPolylineVolumeGeometry.js +29 -29
  130. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +25 -25
  131. package/Build/Workers/createRectangleGeometry.js +25 -25
  132. package/Build/Workers/createRectangleOutlineGeometry.js +18 -18
  133. package/Build/Workers/createSimplePolylineGeometry.js +21 -21
  134. package/Build/Workers/createSphereGeometry.js +17 -17
  135. package/Build/Workers/createSphereOutlineGeometry.js +16 -16
  136. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  137. package/Build/Workers/createVectorTileClampedPolylines.js +13 -13
  138. package/Build/Workers/createVectorTileGeometries.js +22 -22
  139. package/Build/Workers/createVectorTilePoints.js +12 -12
  140. package/Build/Workers/createVectorTilePolygons.js +20 -20
  141. package/Build/Workers/createVectorTilePolylines.js +13 -13
  142. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +20 -20
  143. package/Build/Workers/createVerticesFromHeightmap.js +20 -20
  144. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +17 -17
  145. package/Build/Workers/createWallGeometry.js +22 -22
  146. package/Build/Workers/createWallOutlineGeometry.js +21 -21
  147. package/Build/Workers/decodeDraco.js +15 -14
  148. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
  149. package/Build/Workers/decodeI3S.js +10 -10
  150. package/Build/Workers/transcodeKTX2.js +7 -7
  151. package/Build/Workers/transferTypedArrayTest.js +1 -1
  152. package/Build/Workers/upsampleQuantizedTerrainMesh.js +20 -20
  153. package/Source/Core/Color.js +3 -3
  154. package/Source/Core/Credit.js +3 -3
  155. package/Source/Core/DistanceDisplayCondition.js +3 -3
  156. package/Source/Core/EllipsoidRhumbLine.js +1 -1
  157. package/Source/Core/Ion.js +1 -1
  158. package/Source/Core/OrientedBoundingBox.js +2 -2
  159. package/Source/Core/PolygonGeometryLibrary.js +26 -4
  160. package/Source/Core/Spherical.js +3 -3
  161. package/Source/Core/TexturePacker.js +166 -0
  162. package/Source/Core/writeTextToCanvas.js +0 -1
  163. package/Source/DataSources/BillboardVisualizer.js +3 -3
  164. package/Source/DataSources/BoundingSphereState.js +3 -3
  165. package/Source/DataSources/DataSourceClock.js +1 -1
  166. package/Source/DataSources/DataSourceDisplay.js +5 -2
  167. package/Source/DataSources/EntityCluster.js +44 -19
  168. package/Source/Renderer/AutomaticUniforms.js +2 -2
  169. package/Source/Renderer/Context.js +0 -4
  170. package/Source/Renderer/Texture.js +6 -5
  171. package/Source/Renderer/TextureAtlas.js +882 -0
  172. package/Source/Scene/ArcGisMapService.js +1 -1
  173. package/Source/Scene/Billboard.js +87 -142
  174. package/Source/Scene/BillboardCollection.js +132 -202
  175. package/Source/Scene/BillboardLoadState.js +44 -0
  176. package/Source/Scene/BillboardTexture.js +348 -0
  177. package/Source/Scene/Camera.js +2 -2
  178. package/Source/Scene/Cesium3DTile.js +56 -28
  179. package/Source/Scene/Cesium3DTilesVoxelProvider.js +403 -132
  180. package/Source/Scene/Cesium3DTilesetStatistics.js +0 -1
  181. package/Source/Scene/ClippingPolygon.js +2 -2
  182. package/Source/Scene/Expression.js +1 -0
  183. package/Source/Scene/GltfDracoLoader.js +45 -0
  184. package/Source/Scene/GltfIndexBufferLoader.js +5 -0
  185. package/Source/Scene/GltfLoader.js +22 -9
  186. package/Source/Scene/GltfVertexBufferLoader.js +13 -0
  187. package/Source/Scene/ITwinData.js +47 -1
  188. package/Source/Scene/ImageryLayer.js +1 -1
  189. package/Source/Scene/ImplicitSubtree.js +2 -0
  190. package/Source/Scene/KeyframeNode.js +16 -2
  191. package/Source/Scene/Label.js +1 -1
  192. package/Source/Scene/LabelCollection.js +212 -193
  193. package/Source/Scene/Megatexture.js +145 -81
  194. package/Source/Scene/Model/CustomShader.js +0 -2
  195. package/Source/Scene/Model/Model.js +1 -1
  196. package/Source/Scene/Model/ModelUtility.js +5 -1
  197. package/Source/Scene/Multiple3DTileContent.js +21 -8
  198. package/Source/Scene/PointPrimitive.js +1 -1
  199. package/Source/Scene/ResourceCache.js +17 -1
  200. package/Source/Scene/Scene.js +39 -15
  201. package/Source/Scene/ScreenSpaceCameraController.js +0 -8
  202. package/Source/Scene/SpatialNode.js +4 -11
  203. package/Source/Scene/TextureAtlas.js +1 -556
  204. package/Source/Scene/Vector3DTilePoints.js +2 -5
  205. package/Source/Scene/VoxelBoxShape.js +12 -5
  206. package/Source/Scene/VoxelCell.js +6 -5
  207. package/Source/Scene/VoxelContent.js +171 -107
  208. package/Source/Scene/VoxelCylinderShape.js +65 -58
  209. package/Source/Scene/VoxelEllipsoidShape.js +15 -5
  210. package/Source/Scene/VoxelMetadataOrder.js +12 -0
  211. package/Source/Scene/VoxelPrimitive.js +245 -53
  212. package/Source/Scene/VoxelProvider.js +44 -29
  213. package/Source/Scene/VoxelRenderResources.js +30 -7
  214. package/Source/Scene/VoxelShape.js +10 -3
  215. package/Source/Scene/VoxelTraversal.js +326 -166
  216. package/Source/Scene/WebMapTileServiceImageryProvider.js +2 -2
  217. package/Source/Scene/createGooglePhotorealistic3DTileset.js +5 -8
  218. package/Source/Scene/processVoxelProperties.js +3 -0
  219. package/Source/Shaders/GlobeFS.glsl +10 -1
  220. package/Source/Shaders/GlobeFS.js +10 -1
  221. package/Source/Shaders/PolylineCommon.glsl +1 -1
  222. package/Source/Shaders/PolylineCommon.js +1 -1
  223. package/Source/Shaders/Voxels/Megatexture.glsl +4 -16
  224. package/Source/Shaders/Voxels/Megatexture.js +4 -16
  225. package/Source/Shaders/Voxels/Octree.glsl +44 -7
  226. package/Source/Shaders/Voxels/Octree.js +44 -7
  227. package/Source/Shaders/Voxels/VoxelFS.glsl +9 -15
  228. package/Source/Shaders/Voxels/VoxelFS.js +9 -15
  229. package/Source/Shaders/Voxels/convertUvToCylinder.glsl +15 -15
  230. package/Source/Shaders/Voxels/convertUvToCylinder.js +15 -15
  231. package/Source/Widget/CesiumWidget.js +16 -10
  232. package/Source/Workers/decodeDraco.js +4 -4
  233. package/index.js +458 -454
  234. package/package.json +2 -2
@@ -0,0 +1,39 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.0.36
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
+
27
+ // packages/engine/Source/Core/defaultValue.js
28
+ function defaultValue(a, b) {
29
+ if (a !== void 0 && a !== null) {
30
+ return a;
31
+ }
32
+ return b;
33
+ }
34
+ defaultValue.EMPTY_OBJECT = Object.freeze({});
35
+ var defaultValue_default = defaultValue;
36
+
37
+ export {
38
+ defaultValue_default
39
+ };
@@ -0,0 +1,300 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.0.36
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-Q3G4MO4Z.js";
33
+ import {
34
+ Cartesian2_default,
35
+ Cartesian3_default,
36
+ Cartographic_default,
37
+ Matrix3_default
38
+ } from "./chunk-Q5Q5RB2W.js";
39
+ import {
40
+ WebGLConstants_default
41
+ } from "./chunk-HTEAEBAS.js";
42
+ import {
43
+ defaultValue_default
44
+ } from "./chunk-2FCFIBQ2.js";
45
+ import {
46
+ Check_default,
47
+ DeveloperError_default
48
+ } from "./chunk-D4YTWEV3.js";
49
+ import {
50
+ defined_default
51
+ } from "./chunk-QLX24TU2.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
+ };
@@ -0,0 +1,220 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.0.36
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
+ GeographicProjection_default,
28
+ Intersect_default
29
+ } from "./chunk-FJRMQM2U.js";
30
+ import {
31
+ Rectangle_default
32
+ } from "./chunk-Q3G4MO4Z.js";
33
+ import {
34
+ Cartesian2_default,
35
+ Cartographic_default,
36
+ Ellipsoid_default
37
+ } from "./chunk-Q5Q5RB2W.js";
38
+ import {
39
+ defaultValue_default
40
+ } from "./chunk-2FCFIBQ2.js";
41
+ import {
42
+ Check_default
43
+ } from "./chunk-D4YTWEV3.js";
44
+ import {
45
+ defined_default
46
+ } from "./chunk-QLX24TU2.js";
47
+
48
+ // packages/engine/Source/Core/BoundingRectangle.js
49
+ function BoundingRectangle(x, y, width, height) {
50
+ this.x = defaultValue_default(x, 0);
51
+ this.y = defaultValue_default(y, 0);
52
+ this.width = defaultValue_default(width, 0);
53
+ this.height = defaultValue_default(height, 0);
54
+ }
55
+ BoundingRectangle.packedLength = 4;
56
+ BoundingRectangle.pack = function(value, array, startingIndex) {
57
+ Check_default.typeOf.object("value", value);
58
+ Check_default.defined("array", array);
59
+ startingIndex = defaultValue_default(startingIndex, 0);
60
+ array[startingIndex++] = value.x;
61
+ array[startingIndex++] = value.y;
62
+ array[startingIndex++] = value.width;
63
+ array[startingIndex] = value.height;
64
+ return array;
65
+ };
66
+ BoundingRectangle.unpack = function(array, startingIndex, result) {
67
+ Check_default.defined("array", array);
68
+ startingIndex = defaultValue_default(startingIndex, 0);
69
+ if (!defined_default(result)) {
70
+ result = new BoundingRectangle();
71
+ }
72
+ result.x = array[startingIndex++];
73
+ result.y = array[startingIndex++];
74
+ result.width = array[startingIndex++];
75
+ result.height = array[startingIndex];
76
+ return result;
77
+ };
78
+ BoundingRectangle.fromPoints = function(positions, result) {
79
+ if (!defined_default(result)) {
80
+ result = new BoundingRectangle();
81
+ }
82
+ if (!defined_default(positions) || positions.length === 0) {
83
+ result.x = 0;
84
+ result.y = 0;
85
+ result.width = 0;
86
+ result.height = 0;
87
+ return result;
88
+ }
89
+ const length = positions.length;
90
+ let minimumX = positions[0].x;
91
+ let minimumY = positions[0].y;
92
+ let maximumX = positions[0].x;
93
+ let maximumY = positions[0].y;
94
+ for (let i = 1; i < length; i++) {
95
+ const p = positions[i];
96
+ const x = p.x;
97
+ const y = p.y;
98
+ minimumX = Math.min(x, minimumX);
99
+ maximumX = Math.max(x, maximumX);
100
+ minimumY = Math.min(y, minimumY);
101
+ maximumY = Math.max(y, maximumY);
102
+ }
103
+ result.x = minimumX;
104
+ result.y = minimumY;
105
+ result.width = maximumX - minimumX;
106
+ result.height = maximumY - minimumY;
107
+ return result;
108
+ };
109
+ var defaultProjection = new GeographicProjection_default();
110
+ var fromRectangleLowerLeft = new Cartographic_default();
111
+ var fromRectangleUpperRight = new Cartographic_default();
112
+ BoundingRectangle.fromRectangle = function(rectangle, projection, result) {
113
+ if (!defined_default(result)) {
114
+ result = new BoundingRectangle();
115
+ }
116
+ if (!defined_default(rectangle)) {
117
+ result.x = 0;
118
+ result.y = 0;
119
+ result.width = 0;
120
+ result.height = 0;
121
+ return result;
122
+ }
123
+ defaultProjection._ellipsoid = Ellipsoid_default.default;
124
+ projection = defaultValue_default(projection, defaultProjection);
125
+ const lowerLeft = projection.project(
126
+ Rectangle_default.southwest(rectangle, fromRectangleLowerLeft)
127
+ );
128
+ const upperRight = projection.project(
129
+ Rectangle_default.northeast(rectangle, fromRectangleUpperRight)
130
+ );
131
+ Cartesian2_default.subtract(upperRight, lowerLeft, upperRight);
132
+ result.x = lowerLeft.x;
133
+ result.y = lowerLeft.y;
134
+ result.width = upperRight.x;
135
+ result.height = upperRight.y;
136
+ return result;
137
+ };
138
+ BoundingRectangle.clone = function(rectangle, result) {
139
+ if (!defined_default(rectangle)) {
140
+ return void 0;
141
+ }
142
+ if (!defined_default(result)) {
143
+ return new BoundingRectangle(
144
+ rectangle.x,
145
+ rectangle.y,
146
+ rectangle.width,
147
+ rectangle.height
148
+ );
149
+ }
150
+ result.x = rectangle.x;
151
+ result.y = rectangle.y;
152
+ result.width = rectangle.width;
153
+ result.height = rectangle.height;
154
+ return result;
155
+ };
156
+ BoundingRectangle.union = function(left, right, result) {
157
+ Check_default.typeOf.object("left", left);
158
+ Check_default.typeOf.object("right", right);
159
+ if (!defined_default(result)) {
160
+ result = new BoundingRectangle();
161
+ }
162
+ const lowerLeftX = Math.min(left.x, right.x);
163
+ const lowerLeftY = Math.min(left.y, right.y);
164
+ const upperRightX = Math.max(left.x + left.width, right.x + right.width);
165
+ const upperRightY = Math.max(left.y + left.height, right.y + right.height);
166
+ result.x = lowerLeftX;
167
+ result.y = lowerLeftY;
168
+ result.width = upperRightX - lowerLeftX;
169
+ result.height = upperRightY - lowerLeftY;
170
+ return result;
171
+ };
172
+ BoundingRectangle.expand = function(rectangle, point, result) {
173
+ Check_default.typeOf.object("rectangle", rectangle);
174
+ Check_default.typeOf.object("point", point);
175
+ result = BoundingRectangle.clone(rectangle, result);
176
+ const width = point.x - result.x;
177
+ const height = point.y - result.y;
178
+ if (width > result.width) {
179
+ result.width = width;
180
+ } else if (width < 0) {
181
+ result.width -= width;
182
+ result.x = point.x;
183
+ }
184
+ if (height > result.height) {
185
+ result.height = height;
186
+ } else if (height < 0) {
187
+ result.height -= height;
188
+ result.y = point.y;
189
+ }
190
+ return result;
191
+ };
192
+ BoundingRectangle.intersect = function(left, right) {
193
+ Check_default.typeOf.object("left", left);
194
+ Check_default.typeOf.object("right", right);
195
+ const leftX = left.x;
196
+ const leftY = left.y;
197
+ const rightX = right.x;
198
+ const rightY = right.y;
199
+ if (!(leftX > rightX + right.width || leftX + left.width < rightX || leftY + left.height < rightY || leftY > rightY + right.height)) {
200
+ return Intersect_default.INTERSECTING;
201
+ }
202
+ return Intersect_default.OUTSIDE;
203
+ };
204
+ BoundingRectangle.equals = function(left, right) {
205
+ return left === right || defined_default(left) && defined_default(right) && left.x === right.x && left.y === right.y && left.width === right.width && left.height === right.height;
206
+ };
207
+ BoundingRectangle.prototype.clone = function(result) {
208
+ return BoundingRectangle.clone(this, result);
209
+ };
210
+ BoundingRectangle.prototype.intersect = function(right) {
211
+ return BoundingRectangle.intersect(this, right);
212
+ };
213
+ BoundingRectangle.prototype.equals = function(right) {
214
+ return BoundingRectangle.equals(this, right);
215
+ };
216
+ var BoundingRectangle_default = BoundingRectangle;
217
+
218
+ export {
219
+ BoundingRectangle_default
220
+ };