@cesium/engine 3.0.2 → 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 (230) 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 -2012
  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 +3351 -1473
  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/CesiumTerrainProvider.js +1 -2
  107. package/Source/Core/FeatureDetection.js +9 -0
  108. package/Source/Core/GoogleMaps.js +1 -1
  109. package/Source/Core/Ion.js +1 -1
  110. package/Source/Core/KTX2Transcoder.js +7 -3
  111. package/Source/Core/TaskProcessor.js +150 -146
  112. package/Source/Core/Transforms.js +2 -2
  113. package/Source/Core/buildModuleUrl.js +6 -5
  114. package/Source/Scene/ArcGisMapService.js +1 -1
  115. package/Source/Scene/DracoLoader.js +26 -3
  116. package/Source/Scene/I3SDataProvider.js +0 -27
  117. package/Source/Scene/I3SDecoder.js +127 -0
  118. package/Source/Scene/I3SNode.js +32 -110
  119. package/Source/Scene/Implicit3DTileContent.js +13 -0
  120. package/Source/Scene/ImplicitTileset.js +5 -0
  121. package/Source/Scene/Model/I3dmLoader.js +5 -1
  122. package/Source/Scene/Model/Model.js +4 -1
  123. package/Source/Scene/OpenStreetMapImageryProvider.js +4 -1
  124. package/Source/Scene/SingleTileImageryProvider.js +4 -2
  125. package/Source/ThirdParty/Workers/basis_transcoder.js +1 -1
  126. package/Source/{WorkersES6 → Workers}/createGeometry.js +11 -12
  127. package/Source/{WorkersES6 → Workers}/createTaskProcessorWorker.js +43 -59
  128. package/Source/{WorkersES6 → Workers}/decodeDraco.js +19 -25
  129. package/Source/{WorkersES6 → Workers}/decodeI3S.js +18 -32
  130. package/Source/{WorkersES6 → Workers}/transcodeKTX2.js +19 -26
  131. package/Source/Workers/transferTypedArrayTest.js +0 -6
  132. package/index.d.ts +16 -7
  133. package/index.js +252 -251
  134. package/package.json +2 -1
  135. package/Build/Workers/ArcType-2d9abbbc.js +0 -37
  136. package/Build/Workers/AttributeCompression-f9f6c717.js +0 -716
  137. package/Build/Workers/AxisAlignedBoundingBox-a03420b1.js +0 -258
  138. package/Build/Workers/BoundingRectangle-32fa8a4a.js +0 -369
  139. package/Build/Workers/BoxGeometry-cd550612.js +0 -884
  140. package/Build/Workers/Check-6ede7e26.js +0 -290
  141. package/Build/Workers/Color-571a6085.js +0 -2262
  142. package/Build/Workers/ComponentDatatype-cf1fa08e.js +0 -341
  143. package/Build/Workers/CoplanarPolygonGeometryLibrary-488b1a9f.js +0 -132
  144. package/Build/Workers/CorridorGeometryLibrary-fc4ff147.js +0 -498
  145. package/Build/Workers/CylinderGeometry-bc26926d.js +0 -467
  146. package/Build/Workers/CylinderGeometryLibrary-7bf291b4.js +0 -63
  147. package/Build/Workers/EllipseGeometry-89533a10.js +0 -1304
  148. package/Build/Workers/EllipseGeometryLibrary-b0d7df17.js +0 -366
  149. package/Build/Workers/EllipseOutlineGeometry-63ff7a87.js +0 -443
  150. package/Build/Workers/EllipsoidGeodesic-5b3623dc.js +0 -520
  151. package/Build/Workers/EllipsoidGeometry-07e99d2d.js +0 -637
  152. package/Build/Workers/EllipsoidOutlineGeometry-ba5c7ee2.js +0 -454
  153. package/Build/Workers/EllipsoidRhumbLine-ef872433.js +0 -741
  154. package/Build/Workers/EllipsoidTangentPlane-65d41b3e.js +0 -373
  155. package/Build/Workers/EncodedCartesian3-57415c8a.js +0 -171
  156. package/Build/Workers/FrustumGeometry-4a7589ed.js +0 -2540
  157. package/Build/Workers/GeometryAttribute-a5b6275b.js +0 -619
  158. package/Build/Workers/GeometryAttributes-ad136444.js +0 -91
  159. package/Build/Workers/GeometryInstance-34d9e21e.js +0 -121
  160. package/Build/Workers/GeometryOffsetAttribute-9ad0019c.js +0 -16
  161. package/Build/Workers/GeometryPipeline-fa9e6ffc.js +0 -3690
  162. package/Build/Workers/IndexDatatype-2643aa47.js +0 -200
  163. package/Build/Workers/IntersectionTests-feace3da.js +0 -1836
  164. package/Build/Workers/Math-0a2ac845.js +0 -1340
  165. package/Build/Workers/Matrix2-e1298525.js +0 -7086
  166. package/Build/Workers/Matrix3-41c58dde.js +0 -4283
  167. package/Build/Workers/OrientedBoundingBox-6b94d955.js +0 -1259
  168. package/Build/Workers/Plane-4c3d403b.js +0 -309
  169. package/Build/Workers/PolygonGeometryLibrary-4ffc457d.js +0 -1074
  170. package/Build/Workers/PolygonPipeline-d5e66350.js +0 -1344
  171. package/Build/Workers/PolylinePipeline-83410f0c.js +0 -573
  172. package/Build/Workers/PolylineVolumeGeometryLibrary-290e7aec.js +0 -781
  173. package/Build/Workers/PrimitivePipeline-6081d138.js +0 -966
  174. package/Build/Workers/RectangleGeometryLibrary-986710d8.js +0 -280
  175. package/Build/Workers/RuntimeError-ef395448.js +0 -68
  176. package/Build/Workers/TerrainEncoding-528e1d68.js +0 -1227
  177. package/Build/Workers/Transforms-b527bb09.js +0 -14714
  178. package/Build/Workers/VertexFormat-030f11ff.js +0 -312
  179. package/Build/Workers/WallGeometryLibrary-faf583f8.js +0 -211
  180. package/Build/Workers/WebGLConstants-0b1ce7ba.js +0 -620
  181. package/Build/Workers/WebMercatorProjection-13ed1a6e.js +0 -151
  182. package/Build/Workers/arrayRemoveDuplicates-d2061e85.js +0 -129
  183. package/Build/Workers/cesiumWorkerBootstrapper.js +0 -1363
  184. package/Build/Workers/combine-d9581036.js +0 -82
  185. package/Build/Workers/defaultValue-fe22d8c0.js +0 -51
  186. package/Source/ThirdParty/Workers/draco_decoder_nodejs.js +0 -117
  187. package/Source/Workers/cesiumWorkerBootstrapper.js +0 -2290
  188. package/Source/Workers/package.json +0 -1
  189. /package/Source/{WorkersES6 → Workers}/combineGeometry.js +0 -0
  190. /package/Source/{WorkersES6 → Workers}/createBoxGeometry.js +0 -0
  191. /package/Source/{WorkersES6 → Workers}/createBoxOutlineGeometry.js +0 -0
  192. /package/Source/{WorkersES6 → Workers}/createCircleGeometry.js +0 -0
  193. /package/Source/{WorkersES6 → Workers}/createCircleOutlineGeometry.js +0 -0
  194. /package/Source/{WorkersES6 → Workers}/createCoplanarPolygonGeometry.js +0 -0
  195. /package/Source/{WorkersES6 → Workers}/createCoplanarPolygonOutlineGeometry.js +0 -0
  196. /package/Source/{WorkersES6 → Workers}/createCorridorGeometry.js +0 -0
  197. /package/Source/{WorkersES6 → Workers}/createCorridorOutlineGeometry.js +0 -0
  198. /package/Source/{WorkersES6 → Workers}/createCylinderGeometry.js +0 -0
  199. /package/Source/{WorkersES6 → Workers}/createCylinderOutlineGeometry.js +0 -0
  200. /package/Source/{WorkersES6 → Workers}/createEllipseGeometry.js +0 -0
  201. /package/Source/{WorkersES6 → Workers}/createEllipseOutlineGeometry.js +0 -0
  202. /package/Source/{WorkersES6 → Workers}/createEllipsoidGeometry.js +0 -0
  203. /package/Source/{WorkersES6 → Workers}/createEllipsoidOutlineGeometry.js +0 -0
  204. /package/Source/{WorkersES6 → Workers}/createFrustumGeometry.js +0 -0
  205. /package/Source/{WorkersES6 → Workers}/createFrustumOutlineGeometry.js +0 -0
  206. /package/Source/{WorkersES6 → Workers}/createGroundPolylineGeometry.js +0 -0
  207. /package/Source/{WorkersES6 → Workers}/createPlaneGeometry.js +0 -0
  208. /package/Source/{WorkersES6 → Workers}/createPlaneOutlineGeometry.js +0 -0
  209. /package/Source/{WorkersES6 → Workers}/createPolygonGeometry.js +0 -0
  210. /package/Source/{WorkersES6 → Workers}/createPolygonOutlineGeometry.js +0 -0
  211. /package/Source/{WorkersES6 → Workers}/createPolylineGeometry.js +0 -0
  212. /package/Source/{WorkersES6 → Workers}/createPolylineVolumeGeometry.js +0 -0
  213. /package/Source/{WorkersES6 → Workers}/createPolylineVolumeOutlineGeometry.js +0 -0
  214. /package/Source/{WorkersES6 → Workers}/createRectangleGeometry.js +0 -0
  215. /package/Source/{WorkersES6 → Workers}/createRectangleOutlineGeometry.js +0 -0
  216. /package/Source/{WorkersES6 → Workers}/createSimplePolylineGeometry.js +0 -0
  217. /package/Source/{WorkersES6 → Workers}/createSphereGeometry.js +0 -0
  218. /package/Source/{WorkersES6 → Workers}/createSphereOutlineGeometry.js +0 -0
  219. /package/Source/{WorkersES6 → Workers}/createVectorTileClampedPolylines.js +0 -0
  220. /package/Source/{WorkersES6 → Workers}/createVectorTileGeometries.js +0 -0
  221. /package/Source/{WorkersES6 → Workers}/createVectorTilePoints.js +0 -0
  222. /package/Source/{WorkersES6 → Workers}/createVectorTilePolygons.js +0 -0
  223. /package/Source/{WorkersES6 → Workers}/createVectorTilePolylines.js +0 -0
  224. /package/Source/{WorkersES6 → Workers}/createVerticesFromGoogleEarthEnterpriseBuffer.js +0 -0
  225. /package/Source/{WorkersES6 → Workers}/createVerticesFromHeightmap.js +0 -0
  226. /package/Source/{WorkersES6 → Workers}/createVerticesFromQuantizedTerrainMesh.js +0 -0
  227. /package/Source/{WorkersES6 → Workers}/createWallGeometry.js +0 -0
  228. /package/Source/{WorkersES6 → Workers}/createWallOutlineGeometry.js +0 -0
  229. /package/Source/{WorkersES6 → Workers}/decodeGoogleEarthEnterprisePacket.js +0 -0
  230. /package/Source/{WorkersES6 → Workers}/upsampleQuantizedTerrainMesh.js +0 -0
@@ -1,123 +1,117 @@
1
- define(['./defaultValue-fe22d8c0', './Matrix3-41c58dde', './Check-6ede7e26', './EllipsoidGeometry-07e99d2d', './VertexFormat-030f11ff', './Math-0a2ac845', './Transforms-b527bb09', './Matrix2-e1298525', './RuntimeError-ef395448', './combine-d9581036', './ComponentDatatype-cf1fa08e', './WebGLConstants-0b1ce7ba', './GeometryAttribute-a5b6275b', './GeometryAttributes-ad136444', './GeometryOffsetAttribute-9ad0019c', './IndexDatatype-2643aa47'], (function (defaultValue, Matrix3, Check, EllipsoidGeometry, VertexFormat, Math, Transforms, Matrix2, RuntimeError, combine, ComponentDatatype, WebGLConstants, GeometryAttribute, GeometryAttributes, GeometryOffsetAttribute, IndexDatatype) { 'use strict';
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
+ */
2
25
 
3
- /**
4
- * A description of a sphere centered at the origin.
5
- *
6
- * @alias SphereGeometry
7
- * @constructor
8
- *
9
- * @param {object} [options] Object with the following properties:
10
- * @param {number} [options.radius=1.0] The radius of the sphere.
11
- * @param {number} [options.stackPartitions=64] The number of times to partition the ellipsoid into stacks.
12
- * @param {number} [options.slicePartitions=64] The number of times to partition the ellipsoid into radial slices.
13
- * @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
14
- *
15
- * @exception {DeveloperError} options.slicePartitions cannot be less than three.
16
- * @exception {DeveloperError} options.stackPartitions cannot be less than three.
17
- *
18
- * @see SphereGeometry#createGeometry
19
- *
20
- * @example
21
- * const sphere = new Cesium.SphereGeometry({
22
- * radius : 100.0,
23
- * vertexFormat : Cesium.VertexFormat.POSITION_ONLY
24
- * });
25
- * const geometry = Cesium.SphereGeometry.createGeometry(sphere);
26
- */
27
- function SphereGeometry(options) {
28
- const radius = defaultValue.defaultValue(options.radius, 1.0);
29
- const radii = new Matrix3.Cartesian3(radius, radius, radius);
30
- const ellipsoidOptions = {
31
- radii: radii,
32
- stackPartitions: options.stackPartitions,
33
- slicePartitions: options.slicePartitions,
34
- vertexFormat: options.vertexFormat,
35
- };
26
+ import {
27
+ EllipsoidGeometry_default
28
+ } from "./chunk-TVYIHH4V.js";
29
+ import "./chunk-A6EA6KIE.js";
30
+ import {
31
+ VertexFormat_default
32
+ } from "./chunk-2NLMZNJI.js";
33
+ import "./chunk-TF5D2H7B.js";
34
+ import "./chunk-N5MMDSD2.js";
35
+ import "./chunk-UGZGTV5K.js";
36
+ import "./chunk-5U4UHRZ2.js";
37
+ import "./chunk-FE2XG3SS.js";
38
+ import "./chunk-PW5CA4MJ.js";
39
+ import "./chunk-KAFF2QX3.js";
40
+ import {
41
+ Cartesian3_default
42
+ } from "./chunk-XJCTFTBM.js";
43
+ import "./chunk-PWDYKCNC.js";
44
+ import "./chunk-527JG4D7.js";
45
+ import "./chunk-FVDTKX3F.js";
46
+ import {
47
+ defaultValue_default
48
+ } from "./chunk-BT6YIL2N.js";
49
+ import {
50
+ Check_default
51
+ } from "./chunk-UN7AK64D.js";
52
+ import {
53
+ defined_default
54
+ } from "./chunk-QVJ6IRKV.js";
36
55
 
37
- this._ellipsoidGeometry = new EllipsoidGeometry.EllipsoidGeometry(ellipsoidOptions);
38
- this._workerName = "createSphereGeometry";
39
- }
40
-
41
- /**
42
- * The number of elements used to pack the object into an array.
43
- * @type {number}
44
- */
45
- SphereGeometry.packedLength = EllipsoidGeometry.EllipsoidGeometry.packedLength;
46
-
47
- /**
48
- * Stores the provided instance into the provided array.
49
- *
50
- * @param {SphereGeometry} value The value to pack.
51
- * @param {number[]} array The array to pack into.
52
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
53
- *
54
- * @returns {number[]} The array that was packed into
55
- */
56
- SphereGeometry.pack = function (value, array, startingIndex) {
57
- //>>includeStart('debug', pragmas.debug);
58
- Check.Check.typeOf.object("value", value);
59
- //>>includeEnd('debug');
60
-
61
- return EllipsoidGeometry.EllipsoidGeometry.pack(value._ellipsoidGeometry, array, startingIndex);
56
+ // packages/engine/Source/Core/SphereGeometry.js
57
+ function SphereGeometry(options) {
58
+ const radius = defaultValue_default(options.radius, 1);
59
+ const radii = new Cartesian3_default(radius, radius, radius);
60
+ const ellipsoidOptions = {
61
+ radii,
62
+ stackPartitions: options.stackPartitions,
63
+ slicePartitions: options.slicePartitions,
64
+ vertexFormat: options.vertexFormat
62
65
  };
63
-
64
- const scratchEllipsoidGeometry = new EllipsoidGeometry.EllipsoidGeometry();
65
- const scratchOptions = {
66
- radius: undefined,
67
- radii: new Matrix3.Cartesian3(),
68
- vertexFormat: new VertexFormat.VertexFormat(),
69
- stackPartitions: undefined,
70
- slicePartitions: undefined,
71
- };
72
-
73
- /**
74
- * Retrieves an instance from a packed array.
75
- *
76
- * @param {number[]} array The packed array.
77
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
78
- * @param {SphereGeometry} [result] The object into which to store the result.
79
- * @returns {SphereGeometry} The modified result parameter or a new SphereGeometry instance if one was not provided.
80
- */
81
- SphereGeometry.unpack = function (array, startingIndex, result) {
82
- const ellipsoidGeometry = EllipsoidGeometry.EllipsoidGeometry.unpack(
83
- array,
84
- startingIndex,
85
- scratchEllipsoidGeometry
86
- );
87
- scratchOptions.vertexFormat = VertexFormat.VertexFormat.clone(
88
- ellipsoidGeometry._vertexFormat,
89
- scratchOptions.vertexFormat
90
- );
91
- scratchOptions.stackPartitions = ellipsoidGeometry._stackPartitions;
92
- scratchOptions.slicePartitions = ellipsoidGeometry._slicePartitions;
93
-
94
- if (!defaultValue.defined(result)) {
95
- scratchOptions.radius = ellipsoidGeometry._radii.x;
96
- return new SphereGeometry(scratchOptions);
97
- }
98
-
99
- Matrix3.Cartesian3.clone(ellipsoidGeometry._radii, scratchOptions.radii);
100
- result._ellipsoidGeometry = new EllipsoidGeometry.EllipsoidGeometry(scratchOptions);
101
- return result;
102
- };
103
-
104
- /**
105
- * Computes the geometric representation of a sphere, including its vertices, indices, and a bounding sphere.
106
- *
107
- * @param {SphereGeometry} sphereGeometry A description of the sphere.
108
- * @returns {Geometry|undefined} The computed vertices and indices.
109
- */
110
- SphereGeometry.createGeometry = function (sphereGeometry) {
111
- return EllipsoidGeometry.EllipsoidGeometry.createGeometry(sphereGeometry._ellipsoidGeometry);
112
- };
113
-
114
- function createSphereGeometry(sphereGeometry, offset) {
115
- if (defaultValue.defined(offset)) {
116
- sphereGeometry = SphereGeometry.unpack(sphereGeometry, offset);
117
- }
118
- return SphereGeometry.createGeometry(sphereGeometry);
66
+ this._ellipsoidGeometry = new EllipsoidGeometry_default(ellipsoidOptions);
67
+ this._workerName = "createSphereGeometry";
68
+ }
69
+ SphereGeometry.packedLength = EllipsoidGeometry_default.packedLength;
70
+ SphereGeometry.pack = function(value, array, startingIndex) {
71
+ Check_default.typeOf.object("value", value);
72
+ return EllipsoidGeometry_default.pack(value._ellipsoidGeometry, array, startingIndex);
73
+ };
74
+ var scratchEllipsoidGeometry = new EllipsoidGeometry_default();
75
+ var scratchOptions = {
76
+ radius: void 0,
77
+ radii: new Cartesian3_default(),
78
+ vertexFormat: new VertexFormat_default(),
79
+ stackPartitions: void 0,
80
+ slicePartitions: void 0
81
+ };
82
+ SphereGeometry.unpack = function(array, startingIndex, result) {
83
+ const ellipsoidGeometry = EllipsoidGeometry_default.unpack(
84
+ array,
85
+ startingIndex,
86
+ scratchEllipsoidGeometry
87
+ );
88
+ scratchOptions.vertexFormat = VertexFormat_default.clone(
89
+ ellipsoidGeometry._vertexFormat,
90
+ scratchOptions.vertexFormat
91
+ );
92
+ scratchOptions.stackPartitions = ellipsoidGeometry._stackPartitions;
93
+ scratchOptions.slicePartitions = ellipsoidGeometry._slicePartitions;
94
+ if (!defined_default(result)) {
95
+ scratchOptions.radius = ellipsoidGeometry._radii.x;
96
+ return new SphereGeometry(scratchOptions);
119
97
  }
98
+ Cartesian3_default.clone(ellipsoidGeometry._radii, scratchOptions.radii);
99
+ result._ellipsoidGeometry = new EllipsoidGeometry_default(scratchOptions);
100
+ return result;
101
+ };
102
+ SphereGeometry.createGeometry = function(sphereGeometry) {
103
+ return EllipsoidGeometry_default.createGeometry(sphereGeometry._ellipsoidGeometry);
104
+ };
105
+ var SphereGeometry_default = SphereGeometry;
120
106
 
121
- return createSphereGeometry;
122
-
123
- }));
107
+ // packages/engine/Source/Workers/createSphereGeometry.js
108
+ function createSphereGeometry(sphereGeometry, offset) {
109
+ if (defined_default(offset)) {
110
+ sphereGeometry = SphereGeometry_default.unpack(sphereGeometry, offset);
111
+ }
112
+ return SphereGeometry_default.createGeometry(sphereGeometry);
113
+ }
114
+ var createSphereGeometry_default = createSphereGeometry;
115
+ export {
116
+ createSphereGeometry_default as default
117
+ };
@@ -1,126 +1,117 @@
1
- define(['./defaultValue-fe22d8c0', './Matrix3-41c58dde', './Check-6ede7e26', './EllipsoidOutlineGeometry-ba5c7ee2', './Math-0a2ac845', './Transforms-b527bb09', './Matrix2-e1298525', './RuntimeError-ef395448', './combine-d9581036', './ComponentDatatype-cf1fa08e', './WebGLConstants-0b1ce7ba', './GeometryAttribute-a5b6275b', './GeometryAttributes-ad136444', './GeometryOffsetAttribute-9ad0019c', './IndexDatatype-2643aa47'], (function (defaultValue, Matrix3, Check, EllipsoidOutlineGeometry, Math, Transforms, Matrix2, RuntimeError, combine, ComponentDatatype, WebGLConstants, GeometryAttribute, GeometryAttributes, GeometryOffsetAttribute, IndexDatatype) { 'use strict';
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
+ */
2
25
 
3
- /**
4
- * A description of the outline of a sphere.
5
- *
6
- * @alias SphereOutlineGeometry
7
- * @constructor
8
- *
9
- * @param {object} [options] Object with the following properties:
10
- * @param {number} [options.radius=1.0] The radius of the sphere.
11
- * @param {number} [options.stackPartitions=10] The count of stacks for the sphere (1 greater than the number of parallel lines).
12
- * @param {number} [options.slicePartitions=8] The count of slices for the sphere (Equal to the number of radial lines).
13
- * @param {number} [options.subdivisions=200] The number of points per line, determining the granularity of the curvature .
14
- *
15
- * @exception {DeveloperError} options.stackPartitions must be greater than or equal to one.
16
- * @exception {DeveloperError} options.slicePartitions must be greater than or equal to zero.
17
- * @exception {DeveloperError} options.subdivisions must be greater than or equal to zero.
18
- *
19
- * @example
20
- * const sphere = new Cesium.SphereOutlineGeometry({
21
- * radius : 100.0,
22
- * stackPartitions : 6,
23
- * slicePartitions: 5
24
- * });
25
- * const geometry = Cesium.SphereOutlineGeometry.createGeometry(sphere);
26
- */
27
- function SphereOutlineGeometry(options) {
28
- const radius = defaultValue.defaultValue(options.radius, 1.0);
29
- const radii = new Matrix3.Cartesian3(radius, radius, radius);
30
- const ellipsoidOptions = {
31
- radii: radii,
32
- stackPartitions: options.stackPartitions,
33
- slicePartitions: options.slicePartitions,
34
- subdivisions: options.subdivisions,
35
- };
26
+ import {
27
+ EllipsoidOutlineGeometry_default
28
+ } from "./chunk-4VWUFKYW.js";
29
+ import "./chunk-A6EA6KIE.js";
30
+ import "./chunk-TF5D2H7B.js";
31
+ import "./chunk-N5MMDSD2.js";
32
+ import "./chunk-UGZGTV5K.js";
33
+ import "./chunk-5U4UHRZ2.js";
34
+ import "./chunk-FE2XG3SS.js";
35
+ import "./chunk-PW5CA4MJ.js";
36
+ import "./chunk-KAFF2QX3.js";
37
+ import {
38
+ Cartesian3_default
39
+ } from "./chunk-XJCTFTBM.js";
40
+ import "./chunk-PWDYKCNC.js";
41
+ import "./chunk-527JG4D7.js";
42
+ import "./chunk-FVDTKX3F.js";
43
+ import {
44
+ defaultValue_default
45
+ } from "./chunk-BT6YIL2N.js";
46
+ import {
47
+ Check_default
48
+ } from "./chunk-UN7AK64D.js";
49
+ import {
50
+ defined_default
51
+ } from "./chunk-QVJ6IRKV.js";
36
52
 
37
- this._ellipsoidGeometry = new EllipsoidOutlineGeometry.EllipsoidOutlineGeometry(ellipsoidOptions);
38
- this._workerName = "createSphereOutlineGeometry";
39
- }
40
-
41
- /**
42
- * The number of elements used to pack the object into an array.
43
- * @type {number}
44
- */
45
- SphereOutlineGeometry.packedLength = EllipsoidOutlineGeometry.EllipsoidOutlineGeometry.packedLength;
46
-
47
- /**
48
- * Stores the provided instance into the provided array.
49
- *
50
- * @param {SphereOutlineGeometry} value The value to pack.
51
- * @param {number[]} array The array to pack into.
52
- * @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
53
- *
54
- * @returns {number[]} The array that was packed into
55
- */
56
- SphereOutlineGeometry.pack = function (value, array, startingIndex) {
57
- //>>includeStart('debug', pragmas.debug);
58
- Check.Check.typeOf.object("value", value);
59
- //>>includeEnd('debug');
60
-
61
- return EllipsoidOutlineGeometry.EllipsoidOutlineGeometry.pack(
62
- value._ellipsoidGeometry,
63
- array,
64
- startingIndex
65
- );
53
+ // packages/engine/Source/Core/SphereOutlineGeometry.js
54
+ function SphereOutlineGeometry(options) {
55
+ const radius = defaultValue_default(options.radius, 1);
56
+ const radii = new Cartesian3_default(radius, radius, radius);
57
+ const ellipsoidOptions = {
58
+ radii,
59
+ stackPartitions: options.stackPartitions,
60
+ slicePartitions: options.slicePartitions,
61
+ subdivisions: options.subdivisions
66
62
  };
67
-
68
- const scratchEllipsoidGeometry = new EllipsoidOutlineGeometry.EllipsoidOutlineGeometry();
69
- const scratchOptions = {
70
- radius: undefined,
71
- radii: new Matrix3.Cartesian3(),
72
- stackPartitions: undefined,
73
- slicePartitions: undefined,
74
- subdivisions: undefined,
75
- };
76
-
77
- /**
78
- * Retrieves an instance from a packed array.
79
- *
80
- * @param {number[]} array The packed array.
81
- * @param {number} [startingIndex=0] The starting index of the element to be unpacked.
82
- * @param {SphereOutlineGeometry} [result] The object into which to store the result.
83
- * @returns {SphereOutlineGeometry} The modified result parameter or a new SphereOutlineGeometry instance if one was not provided.
84
- */
85
- SphereOutlineGeometry.unpack = function (array, startingIndex, result) {
86
- const ellipsoidGeometry = EllipsoidOutlineGeometry.EllipsoidOutlineGeometry.unpack(
87
- array,
88
- startingIndex,
89
- scratchEllipsoidGeometry
90
- );
91
- scratchOptions.stackPartitions = ellipsoidGeometry._stackPartitions;
92
- scratchOptions.slicePartitions = ellipsoidGeometry._slicePartitions;
93
- scratchOptions.subdivisions = ellipsoidGeometry._subdivisions;
94
-
95
- if (!defaultValue.defined(result)) {
96
- scratchOptions.radius = ellipsoidGeometry._radii.x;
97
- return new SphereOutlineGeometry(scratchOptions);
98
- }
99
-
100
- Matrix3.Cartesian3.clone(ellipsoidGeometry._radii, scratchOptions.radii);
101
- result._ellipsoidGeometry = new EllipsoidOutlineGeometry.EllipsoidOutlineGeometry(scratchOptions);
102
- return result;
103
- };
104
-
105
- /**
106
- * Computes the geometric representation of an outline of a sphere, including its vertices, indices, and a bounding sphere.
107
- *
108
- * @param {SphereOutlineGeometry} sphereGeometry A description of the sphere outline.
109
- * @returns {Geometry|undefined} The computed vertices and indices.
110
- */
111
- SphereOutlineGeometry.createGeometry = function (sphereGeometry) {
112
- return EllipsoidOutlineGeometry.EllipsoidOutlineGeometry.createGeometry(
113
- sphereGeometry._ellipsoidGeometry
114
- );
115
- };
116
-
117
- function createSphereOutlineGeometry(sphereGeometry, offset) {
118
- if (defaultValue.defined(offset)) {
119
- sphereGeometry = SphereOutlineGeometry.unpack(sphereGeometry, offset);
120
- }
121
- return SphereOutlineGeometry.createGeometry(sphereGeometry);
63
+ this._ellipsoidGeometry = new EllipsoidOutlineGeometry_default(ellipsoidOptions);
64
+ this._workerName = "createSphereOutlineGeometry";
65
+ }
66
+ SphereOutlineGeometry.packedLength = EllipsoidOutlineGeometry_default.packedLength;
67
+ SphereOutlineGeometry.pack = function(value, array, startingIndex) {
68
+ Check_default.typeOf.object("value", value);
69
+ return EllipsoidOutlineGeometry_default.pack(
70
+ value._ellipsoidGeometry,
71
+ array,
72
+ startingIndex
73
+ );
74
+ };
75
+ var scratchEllipsoidGeometry = new EllipsoidOutlineGeometry_default();
76
+ var scratchOptions = {
77
+ radius: void 0,
78
+ radii: new Cartesian3_default(),
79
+ stackPartitions: void 0,
80
+ slicePartitions: void 0,
81
+ subdivisions: void 0
82
+ };
83
+ SphereOutlineGeometry.unpack = function(array, startingIndex, result) {
84
+ const ellipsoidGeometry = EllipsoidOutlineGeometry_default.unpack(
85
+ array,
86
+ startingIndex,
87
+ scratchEllipsoidGeometry
88
+ );
89
+ scratchOptions.stackPartitions = ellipsoidGeometry._stackPartitions;
90
+ scratchOptions.slicePartitions = ellipsoidGeometry._slicePartitions;
91
+ scratchOptions.subdivisions = ellipsoidGeometry._subdivisions;
92
+ if (!defined_default(result)) {
93
+ scratchOptions.radius = ellipsoidGeometry._radii.x;
94
+ return new SphereOutlineGeometry(scratchOptions);
122
95
  }
96
+ Cartesian3_default.clone(ellipsoidGeometry._radii, scratchOptions.radii);
97
+ result._ellipsoidGeometry = new EllipsoidOutlineGeometry_default(scratchOptions);
98
+ return result;
99
+ };
100
+ SphereOutlineGeometry.createGeometry = function(sphereGeometry) {
101
+ return EllipsoidOutlineGeometry_default.createGeometry(
102
+ sphereGeometry._ellipsoidGeometry
103
+ );
104
+ };
105
+ var SphereOutlineGeometry_default = SphereOutlineGeometry;
123
106
 
124
- return createSphereOutlineGeometry;
125
-
126
- }));
107
+ // packages/engine/Source/Workers/createSphereOutlineGeometry.js
108
+ function createSphereOutlineGeometry(sphereGeometry, offset) {
109
+ if (defined_default(offset)) {
110
+ sphereGeometry = SphereOutlineGeometry_default.unpack(sphereGeometry, offset);
111
+ }
112
+ return SphereOutlineGeometry_default.createGeometry(sphereGeometry);
113
+ }
114
+ var createSphereOutlineGeometry_default = createSphereOutlineGeometry;
115
+ export {
116
+ createSphereOutlineGeometry_default as default
117
+ };
@@ -1,127 +1,32 @@
1
- define(['./defaultValue-fe22d8c0'], (function (defaultValue) { 'use strict';
2
-
3
- /**
4
- * Formats an error object into a String. If available, uses name, message, and stack
5
- * properties, otherwise, falls back on toString().
6
- *
7
- * @function
8
- *
9
- * @param {*} object The item to find in the array.
10
- * @returns {string} A string containing the formatted error.
11
- */
12
- function formatError(object) {
13
- let result;
14
-
15
- const name = object.name;
16
- const message = object.message;
17
- if (defaultValue.defined(name) && defaultValue.defined(message)) {
18
- result = `${name}: ${message}`;
19
- } else {
20
- result = object.toString();
21
- }
22
-
23
- const stack = object.stack;
24
- if (defaultValue.defined(stack)) {
25
- result += `\n${stack}`;
26
- }
27
-
28
- return result;
29
- }
30
-
31
- // createXXXGeometry functions may return Geometry or a Promise that resolves to Geometry
32
- // if the function requires access to ApproximateTerrainHeights.
33
- // For fully synchronous functions, just wrapping the function call in a Promise doesn't
34
- // handle errors correctly, hence try-catch
35
- function callAndWrap(workerFunction, parameters, transferableObjects) {
36
- let resultOrPromise;
37
- try {
38
- resultOrPromise = workerFunction(parameters, transferableObjects);
39
- return resultOrPromise; // errors handled by Promise
40
- } catch (e) {
41
- return Promise.reject(e);
42
- }
43
- }
44
-
45
- /**
46
- * Creates an adapter function to allow a calculation function to operate as a Web Worker,
47
- * paired with TaskProcessor, to receive tasks and return results.
48
- *
49
- * @function createTaskProcessorWorker
50
- *
51
- * @param {createTaskProcessorWorker.WorkerFunction} workerFunction The calculation function,
52
- * which takes parameters and returns a result.
53
- * @returns {createTaskProcessorWorker.TaskProcessorWorkerFunction} A function that adapts the
54
- * calculation function to work as a Web Worker onmessage listener with TaskProcessor.
55
- *
56
- *
57
- * @example
58
- * function doCalculation(parameters, transferableObjects) {
59
- * // calculate some result using the inputs in parameters
60
- * return result;
61
- * }
62
- *
63
- * return Cesium.createTaskProcessorWorker(doCalculation);
64
- * // the resulting function is compatible with TaskProcessor
65
- *
66
- * @see TaskProcessor
67
- * @see {@link http://www.w3.org/TR/workers/|Web Workers}
68
- * @see {@link http://www.w3.org/TR/html5/common-dom-interfaces.html#transferable-objects|Transferable objects}
69
- */
70
- function createTaskProcessorWorker(workerFunction) {
71
- let postMessage;
72
-
73
- return function (event) {
74
- const data = event.data;
75
-
76
- const transferableObjects = [];
77
- const responseMessage = {
78
- id: data.id,
79
- result: undefined,
80
- error: undefined,
81
- };
82
-
83
- return Promise.resolve(
84
- callAndWrap(workerFunction, data.parameters, transferableObjects)
85
- )
86
- .then(function (result) {
87
- responseMessage.result = result;
88
- })
89
- .catch(function (e) {
90
- if (e instanceof Error) {
91
- // Errors can't be posted in a message, copy the properties
92
- responseMessage.error = {
93
- name: e.name,
94
- message: e.message,
95
- stack: e.stack,
96
- };
97
- } else {
98
- responseMessage.error = e;
99
- }
100
- })
101
- .finally(function () {
102
- if (!defaultValue.defined(postMessage)) {
103
- postMessage = defaultValue.defaultValue(self.webkitPostMessage, self.postMessage);
104
- }
105
-
106
- if (!data.canTransferArrayBuffer) {
107
- transferableObjects.length = 0;
108
- }
109
-
110
- try {
111
- postMessage(responseMessage, transferableObjects);
112
- } catch (e) {
113
- // something went wrong trying to post the message, post a simpler
114
- // error that we can be sure will be cloneable
115
- responseMessage.result = undefined;
116
- responseMessage.error = `postMessage failed with error: ${formatError(
117
- e
118
- )}\n with responseMessage: ${JSON.stringify(responseMessage)}`;
119
- postMessage(responseMessage);
120
- }
121
- });
122
- };
123
- }
124
-
125
- return createTaskProcessorWorker;
126
-
127
- }));
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
+ createTaskProcessorWorker_default
28
+ } from "./chunk-U5LKG6LX.js";
29
+ import "./chunk-QVJ6IRKV.js";
30
+ export {
31
+ createTaskProcessorWorker_default as default
32
+ };