@rtzh/engine 0.0.6 → 0.0.8

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 (177) hide show
  1. package/Build/Workers/chunk-2UNHFFAZ.js +352 -0
  2. package/Build/Workers/chunk-2Y2KA6PM.js +387 -0
  3. package/Build/Workers/chunk-2ZXYLPPT.js +163 -0
  4. package/Build/Workers/chunk-32ZGDYJY.js +3514 -0
  5. package/Build/Workers/chunk-3WT5VKYM.js +101 -0
  6. package/Build/Workers/chunk-4IXXMXPJ.js +682 -0
  7. package/Build/Workers/chunk-52UUGJQ6.js +288 -0
  8. package/Build/Workers/chunk-54LZ6OUD.js +1067 -0
  9. package/Build/Workers/chunk-565HBO3F.js +352 -0
  10. package/Build/Workers/chunk-5L3PEFKO.js +629 -0
  11. package/Build/Workers/chunk-5RMI6LFO.js +692 -0
  12. package/Build/Workers/chunk-5VDZEVQX.js +788 -0
  13. package/Build/Workers/chunk-5VWFNSLF.js +44 -0
  14. package/Build/Workers/chunk-5ZMMQ7HE.js +37 -0
  15. package/Build/Workers/chunk-6BIU5AL4.js +692 -0
  16. package/Build/Workers/chunk-6KA3AJM6.js +455 -0
  17. package/Build/Workers/chunk-6MYDYE24.js +280 -0
  18. package/Build/Workers/chunk-6RUDXAFC.js +2719 -0
  19. package/Build/Workers/chunk-6YSUD2OH.js +219 -0
  20. package/Build/Workers/chunk-6YT2LZ3Z.js +1443 -0
  21. package/Build/Workers/chunk-73EGVDOC.js +398 -0
  22. package/Build/Workers/chunk-7BOVULMD.js +44 -0
  23. package/Build/Workers/chunk-7KOMCIWI.js +8366 -0
  24. package/Build/Workers/chunk-APOATHFZ.js +138 -0
  25. package/Build/Workers/chunk-AVNHAFMV.js +114 -0
  26. package/Build/Workers/chunk-AWMYTHW4.js +101 -0
  27. package/Build/Workers/chunk-BJHSYHOQ.js +97 -0
  28. package/Build/Workers/chunk-BM6ZG63T.js +171 -0
  29. package/Build/Workers/chunk-C3G2NDXM.js +162 -0
  30. package/Build/Workers/chunk-E3NHG3TR.js +1460 -0
  31. package/Build/Workers/chunk-EDVAQGDJ.js +2719 -0
  32. package/Build/Workers/chunk-EFHDO3L2.js +102 -0
  33. package/Build/Workers/chunk-EPVJ5OOH.js +8366 -0
  34. package/Build/Workers/chunk-EWDHM5NC.js +37 -0
  35. package/Build/Workers/chunk-F4Q3VOCC.js +1317 -0
  36. package/Build/Workers/chunk-FCSN7XOU.js +55 -0
  37. package/Build/Workers/chunk-FD62YGTB.js +219 -0
  38. package/Build/Workers/chunk-FHM3HFYM.js +1045 -0
  39. package/Build/Workers/chunk-FNI64UKI.js +57 -0
  40. package/Build/Workers/chunk-FRUZKVBP.js +352 -0
  41. package/Build/Workers/chunk-FYW5UQ24.js +837 -0
  42. package/Build/Workers/chunk-FYZVCB32.js +75 -0
  43. package/Build/Workers/chunk-GAQXLBFJ.js +1483 -0
  44. package/Build/Workers/chunk-GEH53ULL.js +299 -0
  45. package/Build/Workers/chunk-GLA2PT5T.js +476 -0
  46. package/Build/Workers/chunk-GWLEBUVI.js +2058 -0
  47. package/Build/Workers/chunk-GYIGOBV2.js +439 -0
  48. package/Build/Workers/chunk-H2MM7FMU.js +1054 -0
  49. package/Build/Workers/chunk-H33FCT5U.js +940 -0
  50. package/Build/Workers/chunk-HBL3QZ2L.js +642 -0
  51. package/Build/Workers/chunk-HEKLTOOR.js +1443 -0
  52. package/Build/Workers/chunk-I5JHYEIE.js +241 -0
  53. package/Build/Workers/chunk-IC2JHDCI.js +114 -0
  54. package/Build/Workers/chunk-IEEHNZ36.js +241 -0
  55. package/Build/Workers/chunk-IRG63TBY.js +55 -0
  56. package/Build/Workers/chunk-IY53MZW2.js +58 -0
  57. package/Build/Workers/chunk-J2CUNLQP.js +940 -0
  58. package/Build/Workers/chunk-J766O3PA.js +256 -0
  59. package/Build/Workers/chunk-JWEZXKBE.js +73 -0
  60. package/Build/Workers/chunk-KFOT2YV5.js +138 -0
  61. package/Build/Workers/chunk-KGQGZ7PF.js +778 -0
  62. package/Build/Workers/chunk-KMZXZUA7.js +1460 -0
  63. package/Build/Workers/chunk-KOVKY3HB.js +198 -0
  64. package/Build/Workers/chunk-KQ4ET526.js +163 -0
  65. package/Build/Workers/chunk-L2QIVAZV.js +3514 -0
  66. package/Build/Workers/chunk-LGMONS4O.js +1317 -0
  67. package/Build/Workers/chunk-LJHG4PJQ.js +305 -0
  68. package/Build/Workers/chunk-LNS36LUZ.js +2058 -0
  69. package/Build/Workers/chunk-LUUEGFLT.js +305 -0
  70. package/Build/Workers/chunk-LW2VGHDM.js +1800 -0
  71. package/Build/Workers/chunk-LXM2ZC4V.js +288 -0
  72. package/Build/Workers/chunk-LXMLERGC.js +1067 -0
  73. package/Build/Workers/chunk-MEFWVMG6.js +788 -0
  74. package/Build/Workers/chunk-MJVNNURF.js +368 -0
  75. package/Build/Workers/chunk-NJEG7WRW.js +387 -0
  76. package/Build/Workers/chunk-O224ZEA5.js +58 -0
  77. package/Build/Workers/chunk-O5ICO3AS.js +682 -0
  78. package/Build/Workers/chunk-O6T3T3V3.js +97 -0
  79. package/Build/Workers/chunk-OFTWEOW2.js +1483 -0
  80. package/Build/Workers/chunk-OIJH6LAY.js +497 -0
  81. package/Build/Workers/chunk-OJFVD5ZS.js +778 -0
  82. package/Build/Workers/chunk-OJNPKCEL.js +73 -0
  83. package/Build/Workers/chunk-PQLZOYZE.js +642 -0
  84. package/Build/Workers/chunk-PU44PXY2.js +75 -0
  85. package/Build/Workers/chunk-Q36VXWGP.js +57 -0
  86. package/Build/Workers/chunk-Q4XPVYXJ.js +476 -0
  87. package/Build/Workers/chunk-QGXE4VZ3.js +55 -0
  88. package/Build/Workers/chunk-QIEHP7O4.js +280 -0
  89. package/Build/Workers/chunk-RJVB3K2X.js +511 -0
  90. package/Build/Workers/chunk-RORZNBGJ.js +299 -0
  91. package/Build/Workers/chunk-RRBGLANL.js +55 -0
  92. package/Build/Workers/chunk-SBR7MW44.js +139 -0
  93. package/Build/Workers/chunk-SKXE77AM.js +139 -0
  94. package/Build/Workers/chunk-T4LDJBKR.js +124 -0
  95. package/Build/Workers/chunk-TQ63SH2Z.js +352 -0
  96. package/Build/Workers/chunk-U77FLUQF.js +368 -0
  97. package/Build/Workers/chunk-UIYQEJ5H.js +1054 -0
  98. package/Build/Workers/chunk-UJ72JOGF.js +511 -0
  99. package/Build/Workers/chunk-UY7I27VQ.js +1800 -0
  100. package/Build/Workers/chunk-VVKDT4J7.js +837 -0
  101. package/Build/Workers/chunk-VXDOONLH.js +162 -0
  102. package/Build/Workers/chunk-WLIQ26XU.js +455 -0
  103. package/Build/Workers/chunk-WOEPS2UA.js +171 -0
  104. package/Build/Workers/chunk-XEB4GEXW.js +629 -0
  105. package/Build/Workers/chunk-XKBR7TJB.js +398 -0
  106. package/Build/Workers/chunk-XYRT4RDI.js +1045 -0
  107. package/Build/Workers/chunk-XZINQPR6.js +124 -0
  108. package/Build/Workers/chunk-YLKTSY65.js +414 -0
  109. package/Build/Workers/chunk-YLSZYTTO.js +102 -0
  110. package/Build/Workers/chunk-YQXKIGXX.js +414 -0
  111. package/Build/Workers/chunk-YR3LX3PR.js +497 -0
  112. package/Build/Workers/chunk-ZBRVFEGF.js +256 -0
  113. package/Build/Workers/chunk-ZCPCQJBX.js +198 -0
  114. package/Build/Workers/chunk-ZS7KQSEM.js +439 -0
  115. package/Build/Workers/combineGeometry.js +24 -24
  116. package/Build/Workers/createBoxGeometry.js +18 -18
  117. package/Build/Workers/createBoxOutlineGeometry.js +16 -16
  118. package/Build/Workers/createCircleGeometry.js +26 -26
  119. package/Build/Workers/createCircleOutlineGeometry.js +19 -19
  120. package/Build/Workers/createCoplanarPolygonGeometry.js +33 -33
  121. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +31 -31
  122. package/Build/Workers/createCorridorGeometry.js +29 -29
  123. package/Build/Workers/createCorridorOutlineGeometry.js +28 -28
  124. package/Build/Workers/createCylinderGeometry.js +20 -20
  125. package/Build/Workers/createCylinderOutlineGeometry.js +18 -18
  126. package/Build/Workers/createEllipseGeometry.js +26 -26
  127. package/Build/Workers/createEllipseOutlineGeometry.js +19 -19
  128. package/Build/Workers/createEllipsoidGeometry.js +19 -19
  129. package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -18
  130. package/Build/Workers/createFrustumGeometry.js +18 -18
  131. package/Build/Workers/createFrustumOutlineGeometry.js +18 -18
  132. package/Build/Workers/createGeometry.js +24 -24
  133. package/Build/Workers/createGroundPolylineGeometry.js +22 -22
  134. package/Build/Workers/createPlaneGeometry.js +16 -16
  135. package/Build/Workers/createPlaneOutlineGeometry.js +15 -15
  136. package/Build/Workers/createPolygonGeometry.js +32 -32
  137. package/Build/Workers/createPolygonOutlineGeometry.js +30 -30
  138. package/Build/Workers/createPolylineGeometry.js +25 -25
  139. package/Build/Workers/createPolylineVolumeGeometry.js +31 -31
  140. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +27 -27
  141. package/Build/Workers/createRectangleGeometry.js +27 -27
  142. package/Build/Workers/createRectangleOutlineGeometry.js +20 -20
  143. package/Build/Workers/createSimplePolylineGeometry.js +23 -23
  144. package/Build/Workers/createSphereGeometry.js +19 -19
  145. package/Build/Workers/createSphereOutlineGeometry.js +18 -18
  146. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  147. package/Build/Workers/createVectorTileClampedPolylines.js +14 -14
  148. package/Build/Workers/createVectorTileGeometries.js +24 -24
  149. package/Build/Workers/createVectorTilePoints.js +13 -13
  150. package/Build/Workers/createVectorTilePolygons.js +22 -22
  151. package/Build/Workers/createVectorTilePolylines.js +14 -14
  152. package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +25 -25
  153. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +22 -22
  154. package/Build/Workers/createVerticesFromHeightmap.js +22 -22
  155. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +20 -20
  156. package/Build/Workers/createWallGeometry.js +24 -24
  157. package/Build/Workers/createWallOutlineGeometry.js +23 -23
  158. package/Build/Workers/decodeDraco.js +10 -10
  159. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
  160. package/Build/Workers/decodeI3S.js +10 -10
  161. package/Build/Workers/gaussianSplatSorter.js +4 -4
  162. package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
  163. package/Build/Workers/incrementallyBuildTerrainPicker.js +10 -10
  164. package/Build/Workers/transcodeKTX2.js +6 -6
  165. package/Build/Workers/transferTypedArrayTest.js +1 -1
  166. package/Build/Workers/upsampleQuantizedTerrainMesh.js +22 -22
  167. package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +25 -25
  168. package/Source/Scene/Cesium3DTileset.js +36 -0
  169. package/Source/Scene/Model/BarycentricWireframePipelineStage.js +89 -30
  170. package/Source/Scene/Model/Model.js +46 -7
  171. package/Source/Scene/Model/Model3DTileContent.js +17 -5
  172. package/Source/Shaders/Model/ModelFS.glsl +34 -3
  173. package/Source/Shaders/Model/ModelFS.js +34 -3
  174. package/Source/Shaders/Model/ModelVS.glsl +4 -0
  175. package/Source/Shaders/Model/ModelVS.js +4 -0
  176. package/index.js +101 -101
  177. package/package.json +1 -1
@@ -0,0 +1,299 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.0.7
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
+ Quaternion_default,
29
+ Rectangle_default,
30
+ Transforms_default
31
+ } from "./chunk-7KOMCIWI.js";
32
+ import {
33
+ Matrix4_default
34
+ } from "./chunk-LNS36LUZ.js";
35
+ import {
36
+ WebGLConstants_default
37
+ } from "./chunk-5L3PEFKO.js";
38
+ import {
39
+ Cartesian2_default,
40
+ Cartographic_default
41
+ } from "./chunk-E3NHG3TR.js";
42
+ import {
43
+ Cartesian3_default,
44
+ Frozen_default,
45
+ Matrix3_default
46
+ } from "./chunk-6YT2LZ3Z.js";
47
+ import {
48
+ Check_default,
49
+ DeveloperError_default
50
+ } from "./chunk-KQ4ET526.js";
51
+ import {
52
+ defined_default
53
+ } from "./chunk-FYZVCB32.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 = options ?? Frozen_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 = options.primitiveType ?? PrimitiveType_default.TRIANGLES;
138
+ this.boundingSphere = options.boundingSphere;
139
+ this.geometryType = options.geometryType ?? GeometryType_default.NONE;
140
+ this.boundingSphereCV = options.boundingSphereCV;
141
+ this.offsetAttribute = options.offsetAttribute;
142
+ }
143
+ Geometry.computeNumberOfVertices = function(geometry) {
144
+ Check_default.typeOf.object("geometry", geometry);
145
+ let numberOfVertices = -1;
146
+ for (const property in geometry.attributes) {
147
+ if (geometry.attributes.hasOwnProperty(property) && defined_default(geometry.attributes[property]) && defined_default(geometry.attributes[property].values)) {
148
+ const attribute = geometry.attributes[property];
149
+ const num = attribute.values.length / attribute.componentsPerAttribute;
150
+ if (numberOfVertices !== num && numberOfVertices !== -1) {
151
+ throw new DeveloperError_default(
152
+ "All attribute lists must have the same number of attributes."
153
+ );
154
+ }
155
+ numberOfVertices = num;
156
+ }
157
+ }
158
+ return numberOfVertices;
159
+ };
160
+ var rectangleCenterScratch = new Cartographic_default();
161
+ var enuCenterScratch = new Cartesian3_default();
162
+ var fixedFrameToEnuScratch = new Matrix4_default();
163
+ var boundingRectanglePointsCartographicScratch = [
164
+ new Cartographic_default(),
165
+ new Cartographic_default(),
166
+ new Cartographic_default()
167
+ ];
168
+ var boundingRectanglePointsEnuScratch = [
169
+ new Cartesian2_default(),
170
+ new Cartesian2_default(),
171
+ new Cartesian2_default()
172
+ ];
173
+ var points2DScratch = [new Cartesian2_default(), new Cartesian2_default(), new Cartesian2_default()];
174
+ var pointEnuScratch = new Cartesian3_default();
175
+ var enuRotationScratch = new Quaternion_default();
176
+ var enuRotationMatrixScratch = new Matrix4_default();
177
+ var rotation2DScratch = new Matrix2_default();
178
+ Geometry._textureCoordinateRotationPoints = function(positions, stRotation, ellipsoid, boundingRectangle) {
179
+ let i;
180
+ const rectangleCenter = Rectangle_default.center(
181
+ boundingRectangle,
182
+ rectangleCenterScratch
183
+ );
184
+ const enuCenter = Cartographic_default.toCartesian(
185
+ rectangleCenter,
186
+ ellipsoid,
187
+ enuCenterScratch
188
+ );
189
+ const enuToFixedFrame = Transforms_default.eastNorthUpToFixedFrame(
190
+ enuCenter,
191
+ ellipsoid,
192
+ fixedFrameToEnuScratch
193
+ );
194
+ const fixedFrameToEnu = Matrix4_default.inverse(
195
+ enuToFixedFrame,
196
+ fixedFrameToEnuScratch
197
+ );
198
+ const boundingPointsEnu = boundingRectanglePointsEnuScratch;
199
+ const boundingPointsCarto = boundingRectanglePointsCartographicScratch;
200
+ boundingPointsCarto[0].longitude = boundingRectangle.west;
201
+ boundingPointsCarto[0].latitude = boundingRectangle.south;
202
+ boundingPointsCarto[1].longitude = boundingRectangle.west;
203
+ boundingPointsCarto[1].latitude = boundingRectangle.north;
204
+ boundingPointsCarto[2].longitude = boundingRectangle.east;
205
+ boundingPointsCarto[2].latitude = boundingRectangle.south;
206
+ let posEnu = pointEnuScratch;
207
+ for (i = 0; i < 3; i++) {
208
+ Cartographic_default.toCartesian(boundingPointsCarto[i], ellipsoid, posEnu);
209
+ posEnu = Matrix4_default.multiplyByPointAsVector(fixedFrameToEnu, posEnu, posEnu);
210
+ boundingPointsEnu[i].x = posEnu.x;
211
+ boundingPointsEnu[i].y = posEnu.y;
212
+ }
213
+ const rotation = Quaternion_default.fromAxisAngle(
214
+ Cartesian3_default.UNIT_Z,
215
+ -stRotation,
216
+ enuRotationScratch
217
+ );
218
+ const textureMatrix = Matrix3_default.fromQuaternion(
219
+ rotation,
220
+ enuRotationMatrixScratch
221
+ );
222
+ const positionsLength = positions.length;
223
+ let enuMinX = Number.POSITIVE_INFINITY;
224
+ let enuMinY = Number.POSITIVE_INFINITY;
225
+ let enuMaxX = Number.NEGATIVE_INFINITY;
226
+ let enuMaxY = Number.NEGATIVE_INFINITY;
227
+ for (i = 0; i < positionsLength; i++) {
228
+ posEnu = Matrix4_default.multiplyByPointAsVector(
229
+ fixedFrameToEnu,
230
+ positions[i],
231
+ posEnu
232
+ );
233
+ posEnu = Matrix3_default.multiplyByVector(textureMatrix, posEnu, posEnu);
234
+ enuMinX = Math.min(enuMinX, posEnu.x);
235
+ enuMinY = Math.min(enuMinY, posEnu.y);
236
+ enuMaxX = Math.max(enuMaxX, posEnu.x);
237
+ enuMaxY = Math.max(enuMaxY, posEnu.y);
238
+ }
239
+ const toDesiredInComputed = Matrix2_default.fromRotation(
240
+ stRotation,
241
+ rotation2DScratch
242
+ );
243
+ const points2D = points2DScratch;
244
+ points2D[0].x = enuMinX;
245
+ points2D[0].y = enuMinY;
246
+ points2D[1].x = enuMinX;
247
+ points2D[1].y = enuMaxY;
248
+ points2D[2].x = enuMaxX;
249
+ points2D[2].y = enuMinY;
250
+ const boundingEnuMin = boundingPointsEnu[0];
251
+ const boundingPointsWidth = boundingPointsEnu[2].x - boundingEnuMin.x;
252
+ const boundingPointsHeight = boundingPointsEnu[1].y - boundingEnuMin.y;
253
+ for (i = 0; i < 3; i++) {
254
+ const point2D = points2D[i];
255
+ Matrix2_default.multiplyByVector(toDesiredInComputed, point2D, point2D);
256
+ point2D.x = (point2D.x - boundingEnuMin.x) / boundingPointsWidth;
257
+ point2D.y = (point2D.y - boundingEnuMin.y) / boundingPointsHeight;
258
+ }
259
+ const minXYCorner = points2D[0];
260
+ const maxYCorner = points2D[1];
261
+ const maxXCorner = points2D[2];
262
+ const result = new Array(6);
263
+ Cartesian2_default.pack(minXYCorner, result);
264
+ Cartesian2_default.pack(maxYCorner, result, 2);
265
+ Cartesian2_default.pack(maxXCorner, result, 4);
266
+ return result;
267
+ };
268
+ var Geometry_default = Geometry;
269
+
270
+ // packages/engine/Source/Core/GeometryAttribute.js
271
+ function GeometryAttribute(options) {
272
+ options = options ?? Frozen_default.EMPTY_OBJECT;
273
+ if (!defined_default(options.componentDatatype)) {
274
+ throw new DeveloperError_default("options.componentDatatype is required.");
275
+ }
276
+ if (!defined_default(options.componentsPerAttribute)) {
277
+ throw new DeveloperError_default("options.componentsPerAttribute is required.");
278
+ }
279
+ if (options.componentsPerAttribute < 1 || options.componentsPerAttribute > 4) {
280
+ throw new DeveloperError_default(
281
+ "options.componentsPerAttribute must be between 1 and 4."
282
+ );
283
+ }
284
+ if (!defined_default(options.values)) {
285
+ throw new DeveloperError_default("options.values is required.");
286
+ }
287
+ this.componentDatatype = options.componentDatatype;
288
+ this.componentsPerAttribute = options.componentsPerAttribute;
289
+ this.normalize = options.normalize ?? false;
290
+ this.values = options.values;
291
+ }
292
+ var GeometryAttribute_default = GeometryAttribute;
293
+
294
+ export {
295
+ GeometryType_default,
296
+ PrimitiveType_default,
297
+ Geometry_default,
298
+ GeometryAttribute_default
299
+ };
@@ -0,0 +1,55 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.0.7
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/ArcType.js
28
+ var ArcType = {
29
+ /**
30
+ * Straight line that does not conform to the surface of the ellipsoid.
31
+ *
32
+ * @type {number}
33
+ * @constant
34
+ */
35
+ NONE: 0,
36
+ /**
37
+ * Follow geodesic path.
38
+ *
39
+ * @type {number}
40
+ * @constant
41
+ */
42
+ GEODESIC: 1,
43
+ /**
44
+ * Follow rhumb or loxodrome path.
45
+ *
46
+ * @type {number}
47
+ * @constant
48
+ */
49
+ RHUMB: 2
50
+ };
51
+ var ArcType_default = Object.freeze(ArcType);
52
+
53
+ export {
54
+ ArcType_default
55
+ };
@@ -0,0 +1,139 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.0.7
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
+ WebGLConstants_default
28
+ } from "./chunk-5L3PEFKO.js";
29
+ import {
30
+ Math_default
31
+ } from "./chunk-OIJH6LAY.js";
32
+ import {
33
+ DeveloperError_default
34
+ } from "./chunk-KQ4ET526.js";
35
+ import {
36
+ defined_default
37
+ } from "./chunk-FYZVCB32.js";
38
+
39
+ // packages/engine/Source/Core/IndexDatatype.js
40
+ var IndexDatatype = {
41
+ /**
42
+ * 8-bit unsigned byte corresponding to <code>UNSIGNED_BYTE</code> and the type
43
+ * of an element in <code>Uint8Array</code>.
44
+ *
45
+ * @type {number}
46
+ * @constant
47
+ */
48
+ UNSIGNED_BYTE: WebGLConstants_default.UNSIGNED_BYTE,
49
+ /**
50
+ * 16-bit unsigned short corresponding to <code>UNSIGNED_SHORT</code> and the type
51
+ * of an element in <code>Uint16Array</code>.
52
+ *
53
+ * @type {number}
54
+ * @constant
55
+ */
56
+ UNSIGNED_SHORT: WebGLConstants_default.UNSIGNED_SHORT,
57
+ /**
58
+ * 32-bit unsigned int corresponding to <code>UNSIGNED_INT</code> and the type
59
+ * of an element in <code>Uint32Array</code>.
60
+ *
61
+ * @type {number}
62
+ * @constant
63
+ */
64
+ UNSIGNED_INT: WebGLConstants_default.UNSIGNED_INT
65
+ };
66
+ IndexDatatype.getSizeInBytes = function(indexDatatype) {
67
+ switch (indexDatatype) {
68
+ case IndexDatatype.UNSIGNED_BYTE:
69
+ return Uint8Array.BYTES_PER_ELEMENT;
70
+ case IndexDatatype.UNSIGNED_SHORT:
71
+ return Uint16Array.BYTES_PER_ELEMENT;
72
+ case IndexDatatype.UNSIGNED_INT:
73
+ return Uint32Array.BYTES_PER_ELEMENT;
74
+ }
75
+ throw new DeveloperError_default(
76
+ "indexDatatype is required and must be a valid IndexDatatype constant."
77
+ );
78
+ };
79
+ IndexDatatype.fromSizeInBytes = function(sizeInBytes) {
80
+ switch (sizeInBytes) {
81
+ case 2:
82
+ return IndexDatatype.UNSIGNED_SHORT;
83
+ case 4:
84
+ return IndexDatatype.UNSIGNED_INT;
85
+ case 1:
86
+ return IndexDatatype.UNSIGNED_BYTE;
87
+ //>>includeStart('debug', pragmas.debug);
88
+ default:
89
+ throw new DeveloperError_default(
90
+ "Size in bytes cannot be mapped to an IndexDatatype"
91
+ );
92
+ }
93
+ };
94
+ IndexDatatype.validate = function(indexDatatype) {
95
+ return defined_default(indexDatatype) && (indexDatatype === IndexDatatype.UNSIGNED_BYTE || indexDatatype === IndexDatatype.UNSIGNED_SHORT || indexDatatype === IndexDatatype.UNSIGNED_INT);
96
+ };
97
+ IndexDatatype.createTypedArray = function(numberOfVertices, indicesLengthOrArray) {
98
+ if (!defined_default(numberOfVertices)) {
99
+ throw new DeveloperError_default("numberOfVertices is required.");
100
+ }
101
+ if (numberOfVertices >= Math_default.SIXTY_FOUR_KILOBYTES) {
102
+ return new Uint32Array(indicesLengthOrArray);
103
+ }
104
+ return new Uint16Array(indicesLengthOrArray);
105
+ };
106
+ IndexDatatype.createTypedArrayFromArrayBuffer = function(numberOfVertices, sourceArray, byteOffset, length) {
107
+ if (!defined_default(numberOfVertices)) {
108
+ throw new DeveloperError_default("numberOfVertices is required.");
109
+ }
110
+ if (!defined_default(sourceArray)) {
111
+ throw new DeveloperError_default("sourceArray is required.");
112
+ }
113
+ if (!defined_default(byteOffset)) {
114
+ throw new DeveloperError_default("byteOffset is required.");
115
+ }
116
+ if (numberOfVertices >= Math_default.SIXTY_FOUR_KILOBYTES) {
117
+ return new Uint32Array(sourceArray, byteOffset, length);
118
+ }
119
+ return new Uint16Array(sourceArray, byteOffset, length);
120
+ };
121
+ IndexDatatype.fromTypedArray = function(array) {
122
+ if (array instanceof Uint8Array) {
123
+ return IndexDatatype.UNSIGNED_BYTE;
124
+ }
125
+ if (array instanceof Uint16Array) {
126
+ return IndexDatatype.UNSIGNED_SHORT;
127
+ }
128
+ if (array instanceof Uint32Array) {
129
+ return IndexDatatype.UNSIGNED_INT;
130
+ }
131
+ throw new DeveloperError_default(
132
+ "array must be a Uint8Array, Uint16Array, or Uint32Array."
133
+ );
134
+ };
135
+ var IndexDatatype_default = Object.freeze(IndexDatatype);
136
+
137
+ export {
138
+ IndexDatatype_default
139
+ };
@@ -0,0 +1,139 @@
1
+ /**
2
+ * @license
3
+ * Cesium - https://github.com/CesiumGS/cesium
4
+ * Version 0.0.8
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
+ WebGLConstants_default
28
+ } from "./chunk-XEB4GEXW.js";
29
+ import {
30
+ Math_default
31
+ } from "./chunk-YR3LX3PR.js";
32
+ import {
33
+ DeveloperError_default
34
+ } from "./chunk-2ZXYLPPT.js";
35
+ import {
36
+ defined_default
37
+ } from "./chunk-PU44PXY2.js";
38
+
39
+ // packages/engine/Source/Core/IndexDatatype.js
40
+ var IndexDatatype = {
41
+ /**
42
+ * 8-bit unsigned byte corresponding to <code>UNSIGNED_BYTE</code> and the type
43
+ * of an element in <code>Uint8Array</code>.
44
+ *
45
+ * @type {number}
46
+ * @constant
47
+ */
48
+ UNSIGNED_BYTE: WebGLConstants_default.UNSIGNED_BYTE,
49
+ /**
50
+ * 16-bit unsigned short corresponding to <code>UNSIGNED_SHORT</code> and the type
51
+ * of an element in <code>Uint16Array</code>.
52
+ *
53
+ * @type {number}
54
+ * @constant
55
+ */
56
+ UNSIGNED_SHORT: WebGLConstants_default.UNSIGNED_SHORT,
57
+ /**
58
+ * 32-bit unsigned int corresponding to <code>UNSIGNED_INT</code> and the type
59
+ * of an element in <code>Uint32Array</code>.
60
+ *
61
+ * @type {number}
62
+ * @constant
63
+ */
64
+ UNSIGNED_INT: WebGLConstants_default.UNSIGNED_INT
65
+ };
66
+ IndexDatatype.getSizeInBytes = function(indexDatatype) {
67
+ switch (indexDatatype) {
68
+ case IndexDatatype.UNSIGNED_BYTE:
69
+ return Uint8Array.BYTES_PER_ELEMENT;
70
+ case IndexDatatype.UNSIGNED_SHORT:
71
+ return Uint16Array.BYTES_PER_ELEMENT;
72
+ case IndexDatatype.UNSIGNED_INT:
73
+ return Uint32Array.BYTES_PER_ELEMENT;
74
+ }
75
+ throw new DeveloperError_default(
76
+ "indexDatatype is required and must be a valid IndexDatatype constant."
77
+ );
78
+ };
79
+ IndexDatatype.fromSizeInBytes = function(sizeInBytes) {
80
+ switch (sizeInBytes) {
81
+ case 2:
82
+ return IndexDatatype.UNSIGNED_SHORT;
83
+ case 4:
84
+ return IndexDatatype.UNSIGNED_INT;
85
+ case 1:
86
+ return IndexDatatype.UNSIGNED_BYTE;
87
+ //>>includeStart('debug', pragmas.debug);
88
+ default:
89
+ throw new DeveloperError_default(
90
+ "Size in bytes cannot be mapped to an IndexDatatype"
91
+ );
92
+ }
93
+ };
94
+ IndexDatatype.validate = function(indexDatatype) {
95
+ return defined_default(indexDatatype) && (indexDatatype === IndexDatatype.UNSIGNED_BYTE || indexDatatype === IndexDatatype.UNSIGNED_SHORT || indexDatatype === IndexDatatype.UNSIGNED_INT);
96
+ };
97
+ IndexDatatype.createTypedArray = function(numberOfVertices, indicesLengthOrArray) {
98
+ if (!defined_default(numberOfVertices)) {
99
+ throw new DeveloperError_default("numberOfVertices is required.");
100
+ }
101
+ if (numberOfVertices >= Math_default.SIXTY_FOUR_KILOBYTES) {
102
+ return new Uint32Array(indicesLengthOrArray);
103
+ }
104
+ return new Uint16Array(indicesLengthOrArray);
105
+ };
106
+ IndexDatatype.createTypedArrayFromArrayBuffer = function(numberOfVertices, sourceArray, byteOffset, length) {
107
+ if (!defined_default(numberOfVertices)) {
108
+ throw new DeveloperError_default("numberOfVertices is required.");
109
+ }
110
+ if (!defined_default(sourceArray)) {
111
+ throw new DeveloperError_default("sourceArray is required.");
112
+ }
113
+ if (!defined_default(byteOffset)) {
114
+ throw new DeveloperError_default("byteOffset is required.");
115
+ }
116
+ if (numberOfVertices >= Math_default.SIXTY_FOUR_KILOBYTES) {
117
+ return new Uint32Array(sourceArray, byteOffset, length);
118
+ }
119
+ return new Uint16Array(sourceArray, byteOffset, length);
120
+ };
121
+ IndexDatatype.fromTypedArray = function(array) {
122
+ if (array instanceof Uint8Array) {
123
+ return IndexDatatype.UNSIGNED_BYTE;
124
+ }
125
+ if (array instanceof Uint16Array) {
126
+ return IndexDatatype.UNSIGNED_SHORT;
127
+ }
128
+ if (array instanceof Uint32Array) {
129
+ return IndexDatatype.UNSIGNED_INT;
130
+ }
131
+ throw new DeveloperError_default(
132
+ "array must be a Uint8Array, Uint16Array, or Uint32Array."
133
+ );
134
+ };
135
+ var IndexDatatype_default = Object.freeze(IndexDatatype);
136
+
137
+ export {
138
+ IndexDatatype_default
139
+ };