@cesium/engine 22.0.0 → 22.1.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 (151) hide show
  1. package/Build/ThirdParty/Workers/zip-web-worker.js +10 -7
  2. package/Build/Workers/chunk-23T2IPHV.js +55 -0
  3. package/Build/Workers/{chunk-VVZ667H6.js → chunk-2AM4E2WD.js} +2 -2
  4. package/Build/Workers/{chunk-XQ347YWU.js → chunk-2MWF4IES.js} +16 -14
  5. package/Build/Workers/{chunk-75HAJIDT.js → chunk-2RCIRXNI.js} +1 -1
  6. package/Build/Workers/{chunk-RQRODXVN.js → chunk-3YTMGEXW.js} +5 -1424
  7. package/Build/Workers/{chunk-N52ZRKUE.js → chunk-4BHWJWS3.js} +6 -6
  8. package/Build/Workers/{chunk-5T5SY63I.js → chunk-5JKH4AMT.js} +2 -2
  9. package/Build/Workers/{chunk-EJO3NKMS.js → chunk-6HKAPCSO.js} +1 -1
  10. package/Build/Workers/{chunk-BJSNGGBM.js → chunk-A53R2F2L.js} +4 -4
  11. package/Build/Workers/{chunk-H7B7FU2U.js → chunk-A6YFUGJO.js} +5 -5
  12. package/Build/Workers/{chunk-VCVA7BMD.js → chunk-AJYWXC6I.js} +4 -4
  13. package/Build/Workers/{chunk-3GL53OCU.js → chunk-AOIO5VUS.js} +276 -2277
  14. package/Build/Workers/{chunk-SZN34LQ5.js → chunk-B7JRBTT6.js} +10 -10
  15. package/Build/Workers/{chunk-726NINF5.js → chunk-CHNDJRYA.js} +20 -18
  16. package/Build/Workers/{chunk-L7U26FFD.js → chunk-CJOV55CW.js} +20 -18
  17. package/Build/Workers/{chunk-NE5JTQJP.js → chunk-COGPE5Z2.js} +10 -8
  18. package/Build/Workers/{chunk-XPVZWY4A.js → chunk-CW7W27IZ.js} +12 -8
  19. package/Build/Workers/{chunk-GYRDA3XK.js → chunk-DICY26ID.js} +20 -16
  20. package/Build/Workers/{chunk-AOM3FHBN.js → chunk-DMEFNTUV.js} +69 -7
  21. package/Build/Workers/{chunk-XZO6F23E.js → chunk-DQSJEOZY.js} +1 -1
  22. package/Build/Workers/{chunk-MXHRZHDF.js → chunk-GDU4RZSZ.js} +16 -36
  23. package/Build/Workers/{chunk-JDJAPBZP.js → chunk-GKWOUMYA.js} +1 -1
  24. package/Build/Workers/{chunk-OUBBMEWX.js → chunk-GTY4K4IA.js} +9 -7
  25. package/Build/Workers/{chunk-LWJXCI3F.js → chunk-H6Q7E4BQ.js} +8 -6
  26. package/Build/Workers/{chunk-YLXWC7OW.js → chunk-HHGOFZVQ.js} +7 -5
  27. package/Build/Workers/{chunk-34YXP222.js → chunk-HXKUEOOD.js} +5 -5
  28. package/Build/Workers/{chunk-EZ7NJXQN.js → chunk-I4REFVXB.js} +4 -4
  29. package/Build/Workers/{chunk-OE22564R.js → chunk-IL5F6WEE.js} +3 -3
  30. package/Build/Workers/{chunk-QSMIHPUM.js → chunk-JKXPC5HD.js} +2 -2
  31. package/Build/Workers/{chunk-7KAXDKRU.js → chunk-KKGD7HAW.js} +13 -11
  32. package/Build/Workers/{chunk-YLILBDWK.js → chunk-KROSQJUA.js} +2 -2
  33. package/Build/Workers/{chunk-NHZNMTIR.js → chunk-L4JLDVCM.js} +5 -5
  34. package/Build/Workers/{chunk-2D3GLFZD.js → chunk-LIYMRHGR.js} +15 -13
  35. package/Build/Workers/{chunk-P2H75UV5.js → chunk-MKMZHRB3.js} +16 -11
  36. package/Build/Workers/{chunk-KUB64XW6.js → chunk-MO25ZQ2I.js} +12 -10
  37. package/Build/Workers/{chunk-ECHAJNQJ.js → chunk-O6RZEKHZ.js} +12 -12
  38. package/Build/Workers/{chunk-5ZF53EY6.js → chunk-OOCGX2OD.js} +4 -4
  39. package/Build/Workers/{chunk-NGKF5NTR.js → chunk-OXFU5HNU.js} +13 -5
  40. package/Build/Workers/{chunk-FA3SCJDX.js → chunk-P5CGIJUY.js} +2 -2
  41. package/Build/Workers/{chunk-W4PIP5PG.js → chunk-QEANVUGT.js} +2 -2
  42. package/Build/Workers/{chunk-AARZSH4V.js → chunk-QFBCIX7J.js} +8 -6
  43. package/Build/Workers/{chunk-JZFU2LEM.js → chunk-QUAH3XOT.js} +4 -4
  44. package/Build/Workers/{chunk-6HBKE43B.js → chunk-RXZDTDIY.js} +13 -9
  45. package/Build/Workers/{chunk-LEFQBK6H.js → chunk-SPA2KPH3.js} +14 -12
  46. package/Build/Workers/chunk-TDSVSW5A.js +1460 -0
  47. package/Build/Workers/{chunk-A6JAFSZT.js → chunk-UG2DPFOL.js} +8 -6
  48. package/Build/Workers/{chunk-U4XMLGSR.js → chunk-URGEDZBS.js} +7 -7
  49. package/Build/Workers/{chunk-A4DPJIWS.js → chunk-V35NQOJC.js} +8 -6
  50. package/Build/Workers/chunk-W4XUEDU5.js +2058 -0
  51. package/Build/Workers/{chunk-7XEJGXX2.js → chunk-WB4TSSBQ.js} +779 -24
  52. package/Build/Workers/{chunk-RCCYW6E7.js → chunk-WTLYD4FE.js} +19 -15
  53. package/Build/Workers/{chunk-5B7VZQZY.js → chunk-Y4ALZ4SS.js} +9 -7
  54. package/Build/Workers/{chunk-KGLDJRSO.js → chunk-YF2NVO5B.js} +19 -13
  55. package/Build/Workers/{chunk-IGX772ZQ.js → chunk-YSYSXSHF.js} +1 -1
  56. package/Build/Workers/{chunk-M7HRE4QR.js → chunk-YX562XOB.js} +15 -11
  57. package/Build/Workers/{chunk-QCMRUVVF.js → chunk-YZWA5B4R.js} +15 -13
  58. package/Build/Workers/{chunk-U7CX3HHE.js → chunk-Z6DFT4D3.js} +15 -11
  59. package/Build/Workers/combineGeometry.js +24 -21
  60. package/Build/Workers/createBoxGeometry.js +18 -15
  61. package/Build/Workers/createBoxOutlineGeometry.js +16 -13
  62. package/Build/Workers/createCircleGeometry.js +28 -24
  63. package/Build/Workers/createCircleOutlineGeometry.js +21 -17
  64. package/Build/Workers/createCoplanarPolygonGeometry.js +35 -31
  65. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +33 -29
  66. package/Build/Workers/createCorridorGeometry.js +32 -28
  67. package/Build/Workers/createCorridorOutlineGeometry.js +30 -26
  68. package/Build/Workers/createCylinderGeometry.js +20 -17
  69. package/Build/Workers/createCylinderOutlineGeometry.js +20 -16
  70. package/Build/Workers/createEllipseGeometry.js +28 -24
  71. package/Build/Workers/createEllipseOutlineGeometry.js +21 -17
  72. package/Build/Workers/createEllipsoidGeometry.js +19 -16
  73. package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -15
  74. package/Build/Workers/createFrustumGeometry.js +18 -15
  75. package/Build/Workers/createFrustumOutlineGeometry.js +18 -15
  76. package/Build/Workers/createGeometry.js +25 -21
  77. package/Build/Workers/createGroundPolylineGeometry.js +25 -21
  78. package/Build/Workers/createPlaneGeometry.js +16 -13
  79. package/Build/Workers/createPlaneOutlineGeometry.js +15 -12
  80. package/Build/Workers/createPolygonGeometry.js +35 -31
  81. package/Build/Workers/createPolygonOutlineGeometry.js +32 -28
  82. package/Build/Workers/createPolylineGeometry.js +27 -23
  83. package/Build/Workers/createPolylineVolumeGeometry.js +33 -29
  84. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +29 -25
  85. package/Build/Workers/createRectangleGeometry.js +30 -26
  86. package/Build/Workers/createRectangleOutlineGeometry.js +23 -19
  87. package/Build/Workers/createSimplePolylineGeometry.js +25 -21
  88. package/Build/Workers/createSphereGeometry.js +19 -16
  89. package/Build/Workers/createSphereOutlineGeometry.js +18 -15
  90. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  91. package/Build/Workers/createVectorTileClampedPolylines.js +16 -13
  92. package/Build/Workers/createVectorTileGeometries.js +24 -21
  93. package/Build/Workers/createVectorTilePoints.js +15 -12
  94. package/Build/Workers/createVectorTilePolygons.js +24 -20
  95. package/Build/Workers/createVectorTilePolylines.js +16 -13
  96. package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +25 -22
  97. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +26 -21
  98. package/Build/Workers/createVerticesFromHeightmap.js +26 -21
  99. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +24 -19
  100. package/Build/Workers/createWallGeometry.js +26 -22
  101. package/Build/Workers/createWallOutlineGeometry.js +25 -21
  102. package/Build/Workers/decodeDraco.js +10 -10
  103. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
  104. package/Build/Workers/decodeI3S.js +13 -11
  105. package/Build/Workers/gaussianSplatSorter.js +4 -4
  106. package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
  107. package/Build/Workers/incrementallyBuildTerrainPicker.js +121 -0
  108. package/Build/Workers/transcodeKTX2.js +6 -6
  109. package/Build/Workers/transferTypedArrayTest.js +1 -1
  110. package/Build/Workers/upsampleQuantizedTerrainMesh.js +24 -20
  111. package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +25 -22
  112. package/Source/Core/AxisAlignedBoundingBox.js +36 -0
  113. package/Source/Core/Cesium3DTilesTerrainData.js +2 -0
  114. package/Source/Core/Cesium3DTilesTerrainGeometryProcessor.js +2 -0
  115. package/Source/Core/GoogleEarthEnterpriseTerrainData.js +1 -0
  116. package/Source/Core/HeightmapTerrainData.js +2 -0
  117. package/Source/Core/IntersectionTests.js +80 -0
  118. package/Source/Core/Ion.js +1 -1
  119. package/Source/Core/QuantizedMeshTerrainData.js +1 -0
  120. package/Source/Core/TerrainMesh.js +207 -0
  121. package/Source/Core/TerrainPicker.js +607 -0
  122. package/Source/Core/TexturePacker.js +27 -12
  123. package/Source/Core/Transforms.js +28 -19
  124. package/Source/DataSources/BillboardGraphics.js +1 -1
  125. package/Source/DataSources/BillboardVisualizer.js +7 -4
  126. package/Source/Renderer/Buffer.js +32 -0
  127. package/Source/Renderer/BufferUsage.js +3 -1
  128. package/Source/Renderer/Context.js +85 -7
  129. package/Source/Renderer/Sync.js +104 -0
  130. package/Source/Renderer/TextureAtlas.js +67 -27
  131. package/Source/Scene/ArcGisMapService.js +1 -1
  132. package/Source/Scene/Azure2DImageryProvider.js +96 -12
  133. package/Source/Scene/Billboard.js +75 -28
  134. package/Source/Scene/BillboardCollection.js +7 -2
  135. package/Source/Scene/BillboardTexture.js +56 -7
  136. package/Source/Scene/Globe.js +3 -1
  137. package/Source/Scene/GlobeSurfaceTile.js +18 -66
  138. package/Source/Scene/GlobeSurfaceTileProvider.js +11 -0
  139. package/Source/Scene/Google2DImageryProvider.js +10 -15
  140. package/Source/Scene/PickFramebuffer.js +124 -36
  141. package/Source/Scene/Picking.js +99 -17
  142. package/Source/Scene/Scene.js +36 -4
  143. package/Source/Scene/TerrainFillMesh.js +1 -0
  144. package/Source/Shaders/BillboardCollectionFS.glsl +22 -9
  145. package/Source/Shaders/BillboardCollectionFS.js +22 -9
  146. package/Source/ThirdParty/Workers/zip-web-worker.js +1 -1
  147. package/Source/ThirdParty/zip-module.wasm +0 -0
  148. package/Source/Workers/incrementallyBuildTerrainPicker.js +108 -0
  149. package/index.d.ts +207 -4
  150. package/index.js +28 -26
  151. package/package.json +2 -2
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.135.0
4
+ * Version 1.136.0
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -25,14 +25,14 @@
25
25
 
26
26
  import {
27
27
  Math_default
28
- } from "./chunk-OE22564R.js";
28
+ } from "./chunk-IL5F6WEE.js";
29
29
  import {
30
30
  Check_default,
31
31
  DeveloperError_default
32
- } from "./chunk-W4PIP5PG.js";
32
+ } from "./chunk-QEANVUGT.js";
33
33
  import {
34
34
  defined_default
35
- } from "./chunk-75HAJIDT.js";
35
+ } from "./chunk-2RCIRXNI.js";
36
36
 
37
37
  // packages/engine/Source/Core/Cartesian3.js
38
38
  function Cartesian3(x, y, z) {
@@ -551,959 +551,6 @@ Cartesian3.prototype.toString = function() {
551
551
  };
552
552
  var Cartesian3_default = Cartesian3;
553
553
 
554
- // packages/engine/Source/Core/scaleToGeodeticSurface.js
555
- var scaleToGeodeticSurfaceIntersection = new Cartesian3_default();
556
- var scaleToGeodeticSurfaceGradient = new Cartesian3_default();
557
- function scaleToGeodeticSurface(cartesian, oneOverRadii, oneOverRadiiSquared, centerToleranceSquared, result) {
558
- if (!defined_default(cartesian)) {
559
- throw new DeveloperError_default("cartesian is required.");
560
- }
561
- if (!defined_default(oneOverRadii)) {
562
- throw new DeveloperError_default("oneOverRadii is required.");
563
- }
564
- if (!defined_default(oneOverRadiiSquared)) {
565
- throw new DeveloperError_default("oneOverRadiiSquared is required.");
566
- }
567
- if (!defined_default(centerToleranceSquared)) {
568
- throw new DeveloperError_default("centerToleranceSquared is required.");
569
- }
570
- const positionX = cartesian.x;
571
- const positionY = cartesian.y;
572
- const positionZ = cartesian.z;
573
- const oneOverRadiiX = oneOverRadii.x;
574
- const oneOverRadiiY = oneOverRadii.y;
575
- const oneOverRadiiZ = oneOverRadii.z;
576
- const x2 = positionX * positionX * oneOverRadiiX * oneOverRadiiX;
577
- const y2 = positionY * positionY * oneOverRadiiY * oneOverRadiiY;
578
- const z2 = positionZ * positionZ * oneOverRadiiZ * oneOverRadiiZ;
579
- const squaredNorm = x2 + y2 + z2;
580
- const ratio = Math.sqrt(1 / squaredNorm);
581
- const intersection = Cartesian3_default.multiplyByScalar(
582
- cartesian,
583
- ratio,
584
- scaleToGeodeticSurfaceIntersection
585
- );
586
- if (squaredNorm < centerToleranceSquared) {
587
- return !isFinite(ratio) ? void 0 : Cartesian3_default.clone(intersection, result);
588
- }
589
- const oneOverRadiiSquaredX = oneOverRadiiSquared.x;
590
- const oneOverRadiiSquaredY = oneOverRadiiSquared.y;
591
- const oneOverRadiiSquaredZ = oneOverRadiiSquared.z;
592
- const gradient = scaleToGeodeticSurfaceGradient;
593
- gradient.x = intersection.x * oneOverRadiiSquaredX * 2;
594
- gradient.y = intersection.y * oneOverRadiiSquaredY * 2;
595
- gradient.z = intersection.z * oneOverRadiiSquaredZ * 2;
596
- let lambda = (1 - ratio) * Cartesian3_default.magnitude(cartesian) / (0.5 * Cartesian3_default.magnitude(gradient));
597
- let correction = 0;
598
- let func;
599
- let denominator;
600
- let xMultiplier;
601
- let yMultiplier;
602
- let zMultiplier;
603
- let xMultiplier2;
604
- let yMultiplier2;
605
- let zMultiplier2;
606
- let xMultiplier3;
607
- let yMultiplier3;
608
- let zMultiplier3;
609
- do {
610
- lambda -= correction;
611
- xMultiplier = 1 / (1 + lambda * oneOverRadiiSquaredX);
612
- yMultiplier = 1 / (1 + lambda * oneOverRadiiSquaredY);
613
- zMultiplier = 1 / (1 + lambda * oneOverRadiiSquaredZ);
614
- xMultiplier2 = xMultiplier * xMultiplier;
615
- yMultiplier2 = yMultiplier * yMultiplier;
616
- zMultiplier2 = zMultiplier * zMultiplier;
617
- xMultiplier3 = xMultiplier2 * xMultiplier;
618
- yMultiplier3 = yMultiplier2 * yMultiplier;
619
- zMultiplier3 = zMultiplier2 * zMultiplier;
620
- func = x2 * xMultiplier2 + y2 * yMultiplier2 + z2 * zMultiplier2 - 1;
621
- denominator = x2 * xMultiplier3 * oneOverRadiiSquaredX + y2 * yMultiplier3 * oneOverRadiiSquaredY + z2 * zMultiplier3 * oneOverRadiiSquaredZ;
622
- const derivative = -2 * denominator;
623
- correction = func / derivative;
624
- } while (Math.abs(func) > Math_default.EPSILON12);
625
- if (!defined_default(result)) {
626
- return new Cartesian3_default(
627
- positionX * xMultiplier,
628
- positionY * yMultiplier,
629
- positionZ * zMultiplier
630
- );
631
- }
632
- result.x = positionX * xMultiplier;
633
- result.y = positionY * yMultiplier;
634
- result.z = positionZ * zMultiplier;
635
- return result;
636
- }
637
- var scaleToGeodeticSurface_default = scaleToGeodeticSurface;
638
-
639
- // packages/engine/Source/Core/Cartographic.js
640
- function Cartographic(longitude, latitude, height) {
641
- this.longitude = longitude ?? 0;
642
- this.latitude = latitude ?? 0;
643
- this.height = height ?? 0;
644
- }
645
- Cartographic.fromRadians = function(longitude, latitude, height, result) {
646
- Check_default.typeOf.number("longitude", longitude);
647
- Check_default.typeOf.number("latitude", latitude);
648
- height = height ?? 0;
649
- if (!defined_default(result)) {
650
- return new Cartographic(longitude, latitude, height);
651
- }
652
- result.longitude = longitude;
653
- result.latitude = latitude;
654
- result.height = height;
655
- return result;
656
- };
657
- Cartographic.fromDegrees = function(longitude, latitude, height, result) {
658
- Check_default.typeOf.number("longitude", longitude);
659
- Check_default.typeOf.number("latitude", latitude);
660
- longitude = Math_default.toRadians(longitude);
661
- latitude = Math_default.toRadians(latitude);
662
- return Cartographic.fromRadians(longitude, latitude, height, result);
663
- };
664
- var cartesianToCartographicN = new Cartesian3_default();
665
- var cartesianToCartographicP = new Cartesian3_default();
666
- var cartesianToCartographicH = new Cartesian3_default();
667
- Cartographic._ellipsoidOneOverRadii = new Cartesian3_default(
668
- 1 / 6378137,
669
- 1 / 6378137,
670
- 1 / 6356752314245179e-9
671
- );
672
- Cartographic._ellipsoidOneOverRadiiSquared = new Cartesian3_default(
673
- 1 / (6378137 * 6378137),
674
- 1 / (6378137 * 6378137),
675
- 1 / (6356752314245179e-9 * 6356752314245179e-9)
676
- );
677
- Cartographic._ellipsoidCenterToleranceSquared = Math_default.EPSILON1;
678
- Cartographic.fromCartesian = function(cartesian, ellipsoid, result) {
679
- const oneOverRadii = defined_default(ellipsoid) ? ellipsoid.oneOverRadii : Cartographic._ellipsoidOneOverRadii;
680
- const oneOverRadiiSquared = defined_default(ellipsoid) ? ellipsoid.oneOverRadiiSquared : Cartographic._ellipsoidOneOverRadiiSquared;
681
- const centerToleranceSquared = defined_default(ellipsoid) ? ellipsoid._centerToleranceSquared : Cartographic._ellipsoidCenterToleranceSquared;
682
- const p = scaleToGeodeticSurface_default(
683
- cartesian,
684
- oneOverRadii,
685
- oneOverRadiiSquared,
686
- centerToleranceSquared,
687
- cartesianToCartographicP
688
- );
689
- if (!defined_default(p)) {
690
- return void 0;
691
- }
692
- let n = Cartesian3_default.multiplyComponents(
693
- p,
694
- oneOverRadiiSquared,
695
- cartesianToCartographicN
696
- );
697
- n = Cartesian3_default.normalize(n, n);
698
- const h = Cartesian3_default.subtract(cartesian, p, cartesianToCartographicH);
699
- const longitude = Math.atan2(n.y, n.x);
700
- const latitude = Math.asin(n.z);
701
- const height = Math_default.sign(Cartesian3_default.dot(h, cartesian)) * Cartesian3_default.magnitude(h);
702
- if (!defined_default(result)) {
703
- return new Cartographic(longitude, latitude, height);
704
- }
705
- result.longitude = longitude;
706
- result.latitude = latitude;
707
- result.height = height;
708
- return result;
709
- };
710
- Cartographic.toCartesian = function(cartographic, ellipsoid, result) {
711
- Check_default.defined("cartographic", cartographic);
712
- return Cartesian3_default.fromRadians(
713
- cartographic.longitude,
714
- cartographic.latitude,
715
- cartographic.height,
716
- ellipsoid,
717
- result
718
- );
719
- };
720
- Cartographic.clone = function(cartographic, result) {
721
- if (!defined_default(cartographic)) {
722
- return void 0;
723
- }
724
- if (!defined_default(result)) {
725
- return new Cartographic(
726
- cartographic.longitude,
727
- cartographic.latitude,
728
- cartographic.height
729
- );
730
- }
731
- result.longitude = cartographic.longitude;
732
- result.latitude = cartographic.latitude;
733
- result.height = cartographic.height;
734
- return result;
735
- };
736
- Cartographic.equals = function(left, right) {
737
- return left === right || defined_default(left) && defined_default(right) && left.longitude === right.longitude && left.latitude === right.latitude && left.height === right.height;
738
- };
739
- Cartographic.equalsEpsilon = function(left, right, epsilon) {
740
- epsilon = epsilon ?? 0;
741
- return left === right || defined_default(left) && defined_default(right) && Math.abs(left.longitude - right.longitude) <= epsilon && Math.abs(left.latitude - right.latitude) <= epsilon && Math.abs(left.height - right.height) <= epsilon;
742
- };
743
- Cartographic.ZERO = Object.freeze(new Cartographic(0, 0, 0));
744
- Cartographic.prototype.clone = function(result) {
745
- return Cartographic.clone(this, result);
746
- };
747
- Cartographic.prototype.equals = function(right) {
748
- return Cartographic.equals(this, right);
749
- };
750
- Cartographic.prototype.equalsEpsilon = function(right, epsilon) {
751
- return Cartographic.equalsEpsilon(this, right, epsilon);
752
- };
753
- Cartographic.prototype.toString = function() {
754
- return `(${this.longitude}, ${this.latitude}, ${this.height})`;
755
- };
756
- var Cartographic_default = Cartographic;
757
-
758
- // packages/engine/Source/Core/Cartesian2.js
759
- function Cartesian2(x, y) {
760
- this.x = x ?? 0;
761
- this.y = y ?? 0;
762
- }
763
- Cartesian2.fromElements = function(x, y, result) {
764
- if (!defined_default(result)) {
765
- return new Cartesian2(x, y);
766
- }
767
- result.x = x;
768
- result.y = y;
769
- return result;
770
- };
771
- Cartesian2.clone = function(cartesian, result) {
772
- if (!defined_default(cartesian)) {
773
- return void 0;
774
- }
775
- if (!defined_default(result)) {
776
- return new Cartesian2(cartesian.x, cartesian.y);
777
- }
778
- result.x = cartesian.x;
779
- result.y = cartesian.y;
780
- return result;
781
- };
782
- Cartesian2.fromCartesian3 = Cartesian2.clone;
783
- Cartesian2.fromCartesian4 = Cartesian2.clone;
784
- Cartesian2.packedLength = 2;
785
- Cartesian2.pack = function(value, array, startingIndex) {
786
- Check_default.typeOf.object("value", value);
787
- Check_default.defined("array", array);
788
- startingIndex = startingIndex ?? 0;
789
- array[startingIndex++] = value.x;
790
- array[startingIndex] = value.y;
791
- return array;
792
- };
793
- Cartesian2.unpack = function(array, startingIndex, result) {
794
- Check_default.defined("array", array);
795
- startingIndex = startingIndex ?? 0;
796
- if (!defined_default(result)) {
797
- result = new Cartesian2();
798
- }
799
- result.x = array[startingIndex++];
800
- result.y = array[startingIndex];
801
- return result;
802
- };
803
- Cartesian2.packArray = function(array, result) {
804
- Check_default.defined("array", array);
805
- const length = array.length;
806
- const resultLength = length * 2;
807
- if (!defined_default(result)) {
808
- result = new Array(resultLength);
809
- } else if (!Array.isArray(result) && result.length !== resultLength) {
810
- throw new DeveloperError_default(
811
- "If result is a typed array, it must have exactly array.length * 2 elements"
812
- );
813
- } else if (result.length !== resultLength) {
814
- result.length = resultLength;
815
- }
816
- for (let i = 0; i < length; ++i) {
817
- Cartesian2.pack(array[i], result, i * 2);
818
- }
819
- return result;
820
- };
821
- Cartesian2.unpackArray = function(array, result) {
822
- Check_default.defined("array", array);
823
- Check_default.typeOf.number.greaterThanOrEquals("array.length", array.length, 2);
824
- if (array.length % 2 !== 0) {
825
- throw new DeveloperError_default("array length must be a multiple of 2.");
826
- }
827
- const length = array.length;
828
- if (!defined_default(result)) {
829
- result = new Array(length / 2);
830
- } else {
831
- result.length = length / 2;
832
- }
833
- for (let i = 0; i < length; i += 2) {
834
- const index = i / 2;
835
- result[index] = Cartesian2.unpack(array, i, result[index]);
836
- }
837
- return result;
838
- };
839
- Cartesian2.fromArray = Cartesian2.unpack;
840
- Cartesian2.maximumComponent = function(cartesian) {
841
- Check_default.typeOf.object("cartesian", cartesian);
842
- return Math.max(cartesian.x, cartesian.y);
843
- };
844
- Cartesian2.minimumComponent = function(cartesian) {
845
- Check_default.typeOf.object("cartesian", cartesian);
846
- return Math.min(cartesian.x, cartesian.y);
847
- };
848
- Cartesian2.minimumByComponent = function(first, second, result) {
849
- Check_default.typeOf.object("first", first);
850
- Check_default.typeOf.object("second", second);
851
- Check_default.typeOf.object("result", result);
852
- result.x = Math.min(first.x, second.x);
853
- result.y = Math.min(first.y, second.y);
854
- return result;
855
- };
856
- Cartesian2.maximumByComponent = function(first, second, result) {
857
- Check_default.typeOf.object("first", first);
858
- Check_default.typeOf.object("second", second);
859
- Check_default.typeOf.object("result", result);
860
- result.x = Math.max(first.x, second.x);
861
- result.y = Math.max(first.y, second.y);
862
- return result;
863
- };
864
- Cartesian2.clamp = function(value, min, max, result) {
865
- Check_default.typeOf.object("value", value);
866
- Check_default.typeOf.object("min", min);
867
- Check_default.typeOf.object("max", max);
868
- Check_default.typeOf.object("result", result);
869
- const x = Math_default.clamp(value.x, min.x, max.x);
870
- const y = Math_default.clamp(value.y, min.y, max.y);
871
- result.x = x;
872
- result.y = y;
873
- return result;
874
- };
875
- Cartesian2.magnitudeSquared = function(cartesian) {
876
- Check_default.typeOf.object("cartesian", cartesian);
877
- return cartesian.x * cartesian.x + cartesian.y * cartesian.y;
878
- };
879
- Cartesian2.magnitude = function(cartesian) {
880
- return Math.sqrt(Cartesian2.magnitudeSquared(cartesian));
881
- };
882
- var distanceScratch2 = new Cartesian2();
883
- Cartesian2.distance = function(left, right) {
884
- Check_default.typeOf.object("left", left);
885
- Check_default.typeOf.object("right", right);
886
- Cartesian2.subtract(left, right, distanceScratch2);
887
- return Cartesian2.magnitude(distanceScratch2);
888
- };
889
- Cartesian2.distanceSquared = function(left, right) {
890
- Check_default.typeOf.object("left", left);
891
- Check_default.typeOf.object("right", right);
892
- Cartesian2.subtract(left, right, distanceScratch2);
893
- return Cartesian2.magnitudeSquared(distanceScratch2);
894
- };
895
- Cartesian2.normalize = function(cartesian, result) {
896
- Check_default.typeOf.object("cartesian", cartesian);
897
- Check_default.typeOf.object("result", result);
898
- const magnitude = Cartesian2.magnitude(cartesian);
899
- result.x = cartesian.x / magnitude;
900
- result.y = cartesian.y / magnitude;
901
- if (isNaN(result.x) || isNaN(result.y)) {
902
- throw new DeveloperError_default("normalized result is not a number");
903
- }
904
- return result;
905
- };
906
- Cartesian2.dot = function(left, right) {
907
- Check_default.typeOf.object("left", left);
908
- Check_default.typeOf.object("right", right);
909
- return left.x * right.x + left.y * right.y;
910
- };
911
- Cartesian2.cross = function(left, right) {
912
- Check_default.typeOf.object("left", left);
913
- Check_default.typeOf.object("right", right);
914
- return left.x * right.y - left.y * right.x;
915
- };
916
- Cartesian2.multiplyComponents = function(left, right, result) {
917
- Check_default.typeOf.object("left", left);
918
- Check_default.typeOf.object("right", right);
919
- Check_default.typeOf.object("result", result);
920
- result.x = left.x * right.x;
921
- result.y = left.y * right.y;
922
- return result;
923
- };
924
- Cartesian2.divideComponents = function(left, right, result) {
925
- Check_default.typeOf.object("left", left);
926
- Check_default.typeOf.object("right", right);
927
- Check_default.typeOf.object("result", result);
928
- result.x = left.x / right.x;
929
- result.y = left.y / right.y;
930
- return result;
931
- };
932
- Cartesian2.add = function(left, right, result) {
933
- Check_default.typeOf.object("left", left);
934
- Check_default.typeOf.object("right", right);
935
- Check_default.typeOf.object("result", result);
936
- result.x = left.x + right.x;
937
- result.y = left.y + right.y;
938
- return result;
939
- };
940
- Cartesian2.subtract = function(left, right, result) {
941
- Check_default.typeOf.object("left", left);
942
- Check_default.typeOf.object("right", right);
943
- Check_default.typeOf.object("result", result);
944
- result.x = left.x - right.x;
945
- result.y = left.y - right.y;
946
- return result;
947
- };
948
- Cartesian2.multiplyByScalar = function(cartesian, scalar, result) {
949
- Check_default.typeOf.object("cartesian", cartesian);
950
- Check_default.typeOf.number("scalar", scalar);
951
- Check_default.typeOf.object("result", result);
952
- result.x = cartesian.x * scalar;
953
- result.y = cartesian.y * scalar;
954
- return result;
955
- };
956
- Cartesian2.divideByScalar = function(cartesian, scalar, result) {
957
- Check_default.typeOf.object("cartesian", cartesian);
958
- Check_default.typeOf.number("scalar", scalar);
959
- Check_default.typeOf.object("result", result);
960
- result.x = cartesian.x / scalar;
961
- result.y = cartesian.y / scalar;
962
- return result;
963
- };
964
- Cartesian2.negate = function(cartesian, result) {
965
- Check_default.typeOf.object("cartesian", cartesian);
966
- Check_default.typeOf.object("result", result);
967
- result.x = -cartesian.x;
968
- result.y = -cartesian.y;
969
- return result;
970
- };
971
- Cartesian2.abs = function(cartesian, result) {
972
- Check_default.typeOf.object("cartesian", cartesian);
973
- Check_default.typeOf.object("result", result);
974
- result.x = Math.abs(cartesian.x);
975
- result.y = Math.abs(cartesian.y);
976
- return result;
977
- };
978
- var lerpScratch2 = new Cartesian2();
979
- Cartesian2.lerp = function(start, end, t, result) {
980
- Check_default.typeOf.object("start", start);
981
- Check_default.typeOf.object("end", end);
982
- Check_default.typeOf.number("t", t);
983
- Check_default.typeOf.object("result", result);
984
- Cartesian2.multiplyByScalar(end, t, lerpScratch2);
985
- result = Cartesian2.multiplyByScalar(start, 1 - t, result);
986
- return Cartesian2.add(lerpScratch2, result, result);
987
- };
988
- var angleBetweenScratch3 = new Cartesian2();
989
- var angleBetweenScratch22 = new Cartesian2();
990
- Cartesian2.angleBetween = function(left, right) {
991
- Check_default.typeOf.object("left", left);
992
- Check_default.typeOf.object("right", right);
993
- Cartesian2.normalize(left, angleBetweenScratch3);
994
- Cartesian2.normalize(right, angleBetweenScratch22);
995
- return Math_default.acosClamped(
996
- Cartesian2.dot(angleBetweenScratch3, angleBetweenScratch22)
997
- );
998
- };
999
- var mostOrthogonalAxisScratch2 = new Cartesian2();
1000
- Cartesian2.mostOrthogonalAxis = function(cartesian, result) {
1001
- Check_default.typeOf.object("cartesian", cartesian);
1002
- Check_default.typeOf.object("result", result);
1003
- const f = Cartesian2.normalize(cartesian, mostOrthogonalAxisScratch2);
1004
- Cartesian2.abs(f, f);
1005
- if (f.x <= f.y) {
1006
- result = Cartesian2.clone(Cartesian2.UNIT_X, result);
1007
- } else {
1008
- result = Cartesian2.clone(Cartesian2.UNIT_Y, result);
1009
- }
1010
- return result;
1011
- };
1012
- Cartesian2.equals = function(left, right) {
1013
- return left === right || defined_default(left) && defined_default(right) && left.x === right.x && left.y === right.y;
1014
- };
1015
- Cartesian2.equalsArray = function(cartesian, array, offset) {
1016
- return cartesian.x === array[offset] && cartesian.y === array[offset + 1];
1017
- };
1018
- Cartesian2.equalsEpsilon = function(left, right, relativeEpsilon, absoluteEpsilon) {
1019
- return left === right || defined_default(left) && defined_default(right) && Math_default.equalsEpsilon(
1020
- left.x,
1021
- right.x,
1022
- relativeEpsilon,
1023
- absoluteEpsilon
1024
- ) && Math_default.equalsEpsilon(
1025
- left.y,
1026
- right.y,
1027
- relativeEpsilon,
1028
- absoluteEpsilon
1029
- );
1030
- };
1031
- Cartesian2.ZERO = Object.freeze(new Cartesian2(0, 0));
1032
- Cartesian2.ONE = Object.freeze(new Cartesian2(1, 1));
1033
- Cartesian2.UNIT_X = Object.freeze(new Cartesian2(1, 0));
1034
- Cartesian2.UNIT_Y = Object.freeze(new Cartesian2(0, 1));
1035
- Cartesian2.prototype.clone = function(result) {
1036
- return Cartesian2.clone(this, result);
1037
- };
1038
- Cartesian2.prototype.equals = function(right) {
1039
- return Cartesian2.equals(this, right);
1040
- };
1041
- Cartesian2.prototype.equalsEpsilon = function(right, relativeEpsilon, absoluteEpsilon) {
1042
- return Cartesian2.equalsEpsilon(
1043
- this,
1044
- right,
1045
- relativeEpsilon,
1046
- absoluteEpsilon
1047
- );
1048
- };
1049
- Cartesian2.prototype.toString = function() {
1050
- return `(${this.x}, ${this.y})`;
1051
- };
1052
- var Cartesian2_default = Cartesian2;
1053
-
1054
- // packages/engine/Source/Core/Ellipsoid.js
1055
- function initialize(ellipsoid, x, y, z) {
1056
- x = x ?? 0;
1057
- y = y ?? 0;
1058
- z = z ?? 0;
1059
- Check_default.typeOf.number.greaterThanOrEquals("x", x, 0);
1060
- Check_default.typeOf.number.greaterThanOrEquals("y", y, 0);
1061
- Check_default.typeOf.number.greaterThanOrEquals("z", z, 0);
1062
- ellipsoid._radii = new Cartesian3_default(x, y, z);
1063
- ellipsoid._radiiSquared = new Cartesian3_default(x * x, y * y, z * z);
1064
- ellipsoid._radiiToTheFourth = new Cartesian3_default(
1065
- x * x * x * x,
1066
- y * y * y * y,
1067
- z * z * z * z
1068
- );
1069
- ellipsoid._oneOverRadii = new Cartesian3_default(
1070
- x === 0 ? 0 : 1 / x,
1071
- y === 0 ? 0 : 1 / y,
1072
- z === 0 ? 0 : 1 / z
1073
- );
1074
- ellipsoid._oneOverRadiiSquared = new Cartesian3_default(
1075
- x === 0 ? 0 : 1 / (x * x),
1076
- y === 0 ? 0 : 1 / (y * y),
1077
- z === 0 ? 0 : 1 / (z * z)
1078
- );
1079
- ellipsoid._minimumRadius = Math.min(x, y, z);
1080
- ellipsoid._maximumRadius = Math.max(x, y, z);
1081
- ellipsoid._centerToleranceSquared = Math_default.EPSILON1;
1082
- if (ellipsoid._radiiSquared.z !== 0) {
1083
- ellipsoid._squaredXOverSquaredZ = ellipsoid._radiiSquared.x / ellipsoid._radiiSquared.z;
1084
- }
1085
- }
1086
- function Ellipsoid(x, y, z) {
1087
- this._radii = void 0;
1088
- this._radiiSquared = void 0;
1089
- this._radiiToTheFourth = void 0;
1090
- this._oneOverRadii = void 0;
1091
- this._oneOverRadiiSquared = void 0;
1092
- this._minimumRadius = void 0;
1093
- this._maximumRadius = void 0;
1094
- this._centerToleranceSquared = void 0;
1095
- this._squaredXOverSquaredZ = void 0;
1096
- initialize(this, x, y, z);
1097
- }
1098
- Object.defineProperties(Ellipsoid.prototype, {
1099
- /**
1100
- * Gets the radii of the ellipsoid.
1101
- * @memberof Ellipsoid.prototype
1102
- * @type {Cartesian3}
1103
- * @readonly
1104
- */
1105
- radii: {
1106
- get: function() {
1107
- return this._radii;
1108
- }
1109
- },
1110
- /**
1111
- * Gets the squared radii of the ellipsoid.
1112
- * @memberof Ellipsoid.prototype
1113
- * @type {Cartesian3}
1114
- * @readonly
1115
- */
1116
- radiiSquared: {
1117
- get: function() {
1118
- return this._radiiSquared;
1119
- }
1120
- },
1121
- /**
1122
- * Gets the radii of the ellipsoid raise to the fourth power.
1123
- * @memberof Ellipsoid.prototype
1124
- * @type {Cartesian3}
1125
- * @readonly
1126
- */
1127
- radiiToTheFourth: {
1128
- get: function() {
1129
- return this._radiiToTheFourth;
1130
- }
1131
- },
1132
- /**
1133
- * Gets one over the radii of the ellipsoid.
1134
- * @memberof Ellipsoid.prototype
1135
- * @type {Cartesian3}
1136
- * @readonly
1137
- */
1138
- oneOverRadii: {
1139
- get: function() {
1140
- return this._oneOverRadii;
1141
- }
1142
- },
1143
- /**
1144
- * Gets one over the squared radii of the ellipsoid.
1145
- * @memberof Ellipsoid.prototype
1146
- * @type {Cartesian3}
1147
- * @readonly
1148
- */
1149
- oneOverRadiiSquared: {
1150
- get: function() {
1151
- return this._oneOverRadiiSquared;
1152
- }
1153
- },
1154
- /**
1155
- * Gets the minimum radius of the ellipsoid.
1156
- * @memberof Ellipsoid.prototype
1157
- * @type {number}
1158
- * @readonly
1159
- */
1160
- minimumRadius: {
1161
- get: function() {
1162
- return this._minimumRadius;
1163
- }
1164
- },
1165
- /**
1166
- * Gets the maximum radius of the ellipsoid.
1167
- * @memberof Ellipsoid.prototype
1168
- * @type {number}
1169
- * @readonly
1170
- */
1171
- maximumRadius: {
1172
- get: function() {
1173
- return this._maximumRadius;
1174
- }
1175
- }
1176
- });
1177
- Ellipsoid.clone = function(ellipsoid, result) {
1178
- if (!defined_default(ellipsoid)) {
1179
- return void 0;
1180
- }
1181
- const radii = ellipsoid._radii;
1182
- if (!defined_default(result)) {
1183
- return new Ellipsoid(radii.x, radii.y, radii.z);
1184
- }
1185
- Cartesian3_default.clone(radii, result._radii);
1186
- Cartesian3_default.clone(ellipsoid._radiiSquared, result._radiiSquared);
1187
- Cartesian3_default.clone(ellipsoid._radiiToTheFourth, result._radiiToTheFourth);
1188
- Cartesian3_default.clone(ellipsoid._oneOverRadii, result._oneOverRadii);
1189
- Cartesian3_default.clone(ellipsoid._oneOverRadiiSquared, result._oneOverRadiiSquared);
1190
- result._minimumRadius = ellipsoid._minimumRadius;
1191
- result._maximumRadius = ellipsoid._maximumRadius;
1192
- result._centerToleranceSquared = ellipsoid._centerToleranceSquared;
1193
- return result;
1194
- };
1195
- Ellipsoid.fromCartesian3 = function(cartesian, result) {
1196
- if (!defined_default(result)) {
1197
- result = new Ellipsoid();
1198
- }
1199
- if (!defined_default(cartesian)) {
1200
- return result;
1201
- }
1202
- initialize(result, cartesian.x, cartesian.y, cartesian.z);
1203
- return result;
1204
- };
1205
- Ellipsoid.WGS84 = Object.freeze(
1206
- new Ellipsoid(6378137, 6378137, 6356752314245179e-9)
1207
- );
1208
- Ellipsoid.UNIT_SPHERE = Object.freeze(new Ellipsoid(1, 1, 1));
1209
- Ellipsoid.MOON = Object.freeze(
1210
- new Ellipsoid(
1211
- Math_default.LUNAR_RADIUS,
1212
- Math_default.LUNAR_RADIUS,
1213
- Math_default.LUNAR_RADIUS
1214
- )
1215
- );
1216
- Ellipsoid.MARS = Object.freeze(new Ellipsoid(3396190, 3396190, 3376200));
1217
- Ellipsoid._default = Ellipsoid.WGS84;
1218
- Object.defineProperties(Ellipsoid, {
1219
- /**
1220
- * The default ellipsoid used when not otherwise specified.
1221
- * @memberof Ellipsoid
1222
- * @type {Ellipsoid}
1223
- * @example
1224
- * Cesium.Ellipsoid.default = Cesium.Ellipsoid.MOON;
1225
- *
1226
- * // Apollo 11 landing site
1227
- * const position = Cesium.Cartesian3.fromRadians(
1228
- * 0.67416,
1229
- * 23.47315,
1230
- * );
1231
- */
1232
- default: {
1233
- get: function() {
1234
- return Ellipsoid._default;
1235
- },
1236
- set: function(value) {
1237
- Check_default.typeOf.object("value", value);
1238
- Ellipsoid._default = value;
1239
- Cartesian3_default._ellipsoidRadiiSquared = value.radiiSquared;
1240
- Cartographic_default._ellipsoidOneOverRadii = value.oneOverRadii;
1241
- Cartographic_default._ellipsoidOneOverRadiiSquared = value.oneOverRadiiSquared;
1242
- Cartographic_default._ellipsoidCenterToleranceSquared = value._centerToleranceSquared;
1243
- }
1244
- }
1245
- });
1246
- Ellipsoid.prototype.clone = function(result) {
1247
- return Ellipsoid.clone(this, result);
1248
- };
1249
- Ellipsoid.packedLength = Cartesian3_default.packedLength;
1250
- Ellipsoid.pack = function(value, array, startingIndex) {
1251
- Check_default.typeOf.object("value", value);
1252
- Check_default.defined("array", array);
1253
- startingIndex = startingIndex ?? 0;
1254
- Cartesian3_default.pack(value._radii, array, startingIndex);
1255
- return array;
1256
- };
1257
- Ellipsoid.unpack = function(array, startingIndex, result) {
1258
- Check_default.defined("array", array);
1259
- startingIndex = startingIndex ?? 0;
1260
- const radii = Cartesian3_default.unpack(array, startingIndex);
1261
- return Ellipsoid.fromCartesian3(radii, result);
1262
- };
1263
- Ellipsoid.prototype.geocentricSurfaceNormal = Cartesian3_default.normalize;
1264
- Ellipsoid.prototype.geodeticSurfaceNormalCartographic = function(cartographic, result) {
1265
- Check_default.typeOf.object("cartographic", cartographic);
1266
- const longitude = cartographic.longitude;
1267
- const latitude = cartographic.latitude;
1268
- const cosLatitude = Math.cos(latitude);
1269
- const x = cosLatitude * Math.cos(longitude);
1270
- const y = cosLatitude * Math.sin(longitude);
1271
- const z = Math.sin(latitude);
1272
- if (!defined_default(result)) {
1273
- result = new Cartesian3_default();
1274
- }
1275
- result.x = x;
1276
- result.y = y;
1277
- result.z = z;
1278
- return Cartesian3_default.normalize(result, result);
1279
- };
1280
- Ellipsoid.prototype.geodeticSurfaceNormal = function(cartesian, result) {
1281
- Check_default.typeOf.object("cartesian", cartesian);
1282
- if (isNaN(cartesian.x) || isNaN(cartesian.y) || isNaN(cartesian.z)) {
1283
- throw new DeveloperError_default("cartesian has a NaN component");
1284
- }
1285
- if (Cartesian3_default.equalsEpsilon(cartesian, Cartesian3_default.ZERO, Math_default.EPSILON14)) {
1286
- return void 0;
1287
- }
1288
- if (!defined_default(result)) {
1289
- result = new Cartesian3_default();
1290
- }
1291
- result = Cartesian3_default.multiplyComponents(
1292
- cartesian,
1293
- this._oneOverRadiiSquared,
1294
- result
1295
- );
1296
- return Cartesian3_default.normalize(result, result);
1297
- };
1298
- var cartographicToCartesianNormal = new Cartesian3_default();
1299
- var cartographicToCartesianK = new Cartesian3_default();
1300
- Ellipsoid.prototype.cartographicToCartesian = function(cartographic, result) {
1301
- const n = cartographicToCartesianNormal;
1302
- const k = cartographicToCartesianK;
1303
- this.geodeticSurfaceNormalCartographic(cartographic, n);
1304
- Cartesian3_default.multiplyComponents(this._radiiSquared, n, k);
1305
- const gamma = Math.sqrt(Cartesian3_default.dot(n, k));
1306
- Cartesian3_default.divideByScalar(k, gamma, k);
1307
- Cartesian3_default.multiplyByScalar(n, cartographic.height, n);
1308
- if (!defined_default(result)) {
1309
- result = new Cartesian3_default();
1310
- }
1311
- return Cartesian3_default.add(k, n, result);
1312
- };
1313
- Ellipsoid.prototype.cartographicArrayToCartesianArray = function(cartographics, result) {
1314
- Check_default.defined("cartographics", cartographics);
1315
- const length = cartographics.length;
1316
- if (!defined_default(result)) {
1317
- result = new Array(length);
1318
- } else {
1319
- result.length = length;
1320
- }
1321
- for (let i = 0; i < length; i++) {
1322
- result[i] = this.cartographicToCartesian(cartographics[i], result[i]);
1323
- }
1324
- return result;
1325
- };
1326
- var cartesianToCartographicN2 = new Cartesian3_default();
1327
- var cartesianToCartographicP2 = new Cartesian3_default();
1328
- var cartesianToCartographicH2 = new Cartesian3_default();
1329
- Ellipsoid.prototype.cartesianToCartographic = function(cartesian, result) {
1330
- const p = this.scaleToGeodeticSurface(cartesian, cartesianToCartographicP2);
1331
- if (!defined_default(p)) {
1332
- return void 0;
1333
- }
1334
- const n = this.geodeticSurfaceNormal(p, cartesianToCartographicN2);
1335
- const h = Cartesian3_default.subtract(cartesian, p, cartesianToCartographicH2);
1336
- const longitude = Math.atan2(n.y, n.x);
1337
- const latitude = Math.asin(n.z);
1338
- const height = Math_default.sign(Cartesian3_default.dot(h, cartesian)) * Cartesian3_default.magnitude(h);
1339
- if (!defined_default(result)) {
1340
- return new Cartographic_default(longitude, latitude, height);
1341
- }
1342
- result.longitude = longitude;
1343
- result.latitude = latitude;
1344
- result.height = height;
1345
- return result;
1346
- };
1347
- Ellipsoid.prototype.cartesianArrayToCartographicArray = function(cartesians, result) {
1348
- Check_default.defined("cartesians", cartesians);
1349
- const length = cartesians.length;
1350
- if (!defined_default(result)) {
1351
- result = new Array(length);
1352
- } else {
1353
- result.length = length;
1354
- }
1355
- for (let i = 0; i < length; ++i) {
1356
- result[i] = this.cartesianToCartographic(cartesians[i], result[i]);
1357
- }
1358
- return result;
1359
- };
1360
- Ellipsoid.prototype.scaleToGeodeticSurface = function(cartesian, result) {
1361
- return scaleToGeodeticSurface_default(
1362
- cartesian,
1363
- this._oneOverRadii,
1364
- this._oneOverRadiiSquared,
1365
- this._centerToleranceSquared,
1366
- result
1367
- );
1368
- };
1369
- Ellipsoid.prototype.scaleToGeocentricSurface = function(cartesian, result) {
1370
- Check_default.typeOf.object("cartesian", cartesian);
1371
- if (!defined_default(result)) {
1372
- result = new Cartesian3_default();
1373
- }
1374
- const positionX = cartesian.x;
1375
- const positionY = cartesian.y;
1376
- const positionZ = cartesian.z;
1377
- const oneOverRadiiSquared = this._oneOverRadiiSquared;
1378
- const beta = 1 / Math.sqrt(
1379
- positionX * positionX * oneOverRadiiSquared.x + positionY * positionY * oneOverRadiiSquared.y + positionZ * positionZ * oneOverRadiiSquared.z
1380
- );
1381
- return Cartesian3_default.multiplyByScalar(cartesian, beta, result);
1382
- };
1383
- Ellipsoid.prototype.transformPositionToScaledSpace = function(position, result) {
1384
- if (!defined_default(result)) {
1385
- result = new Cartesian3_default();
1386
- }
1387
- return Cartesian3_default.multiplyComponents(position, this._oneOverRadii, result);
1388
- };
1389
- Ellipsoid.prototype.transformPositionFromScaledSpace = function(position, result) {
1390
- if (!defined_default(result)) {
1391
- result = new Cartesian3_default();
1392
- }
1393
- return Cartesian3_default.multiplyComponents(position, this._radii, result);
1394
- };
1395
- Ellipsoid.prototype.equals = function(right) {
1396
- return this === right || defined_default(right) && Cartesian3_default.equals(this._radii, right._radii);
1397
- };
1398
- Ellipsoid.prototype.toString = function() {
1399
- return this._radii.toString();
1400
- };
1401
- Ellipsoid.prototype.getSurfaceNormalIntersectionWithZAxis = function(position, buffer, result) {
1402
- Check_default.typeOf.object("position", position);
1403
- if (!Math_default.equalsEpsilon(
1404
- this._radii.x,
1405
- this._radii.y,
1406
- Math_default.EPSILON15
1407
- )) {
1408
- throw new DeveloperError_default(
1409
- "Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)"
1410
- );
1411
- }
1412
- Check_default.typeOf.number.greaterThan("Ellipsoid.radii.z", this._radii.z, 0);
1413
- buffer = buffer ?? 0;
1414
- const squaredXOverSquaredZ = this._squaredXOverSquaredZ;
1415
- if (!defined_default(result)) {
1416
- result = new Cartesian3_default();
1417
- }
1418
- result.x = 0;
1419
- result.y = 0;
1420
- result.z = position.z * (1 - squaredXOverSquaredZ);
1421
- if (Math.abs(result.z) >= this._radii.z - buffer) {
1422
- return void 0;
1423
- }
1424
- return result;
1425
- };
1426
- var scratchEndpoint = new Cartesian3_default();
1427
- Ellipsoid.prototype.getLocalCurvature = function(surfacePosition, result) {
1428
- Check_default.typeOf.object("surfacePosition", surfacePosition);
1429
- if (!defined_default(result)) {
1430
- result = new Cartesian2_default();
1431
- }
1432
- const primeVerticalEndpoint = this.getSurfaceNormalIntersectionWithZAxis(
1433
- surfacePosition,
1434
- 0,
1435
- scratchEndpoint
1436
- );
1437
- const primeVerticalRadius = Cartesian3_default.distance(
1438
- surfacePosition,
1439
- primeVerticalEndpoint
1440
- );
1441
- const radiusRatio = this.minimumRadius * primeVerticalRadius / this.maximumRadius ** 2;
1442
- const meridionalRadius = primeVerticalRadius * radiusRatio ** 2;
1443
- return Cartesian2_default.fromElements(
1444
- 1 / primeVerticalRadius,
1445
- 1 / meridionalRadius,
1446
- result
1447
- );
1448
- };
1449
- var abscissas = [
1450
- 0.14887433898163,
1451
- 0.43339539412925,
1452
- 0.67940956829902,
1453
- 0.86506336668898,
1454
- 0.97390652851717,
1455
- 0
1456
- ];
1457
- var weights = [
1458
- 0.29552422471475,
1459
- 0.26926671930999,
1460
- 0.21908636251598,
1461
- 0.14945134915058,
1462
- 0.066671344308684,
1463
- 0
1464
- ];
1465
- function gaussLegendreQuadrature(a, b, func) {
1466
- Check_default.typeOf.number("a", a);
1467
- Check_default.typeOf.number("b", b);
1468
- Check_default.typeOf.func("func", func);
1469
- const xMean = 0.5 * (b + a);
1470
- const xRange = 0.5 * (b - a);
1471
- let sum = 0;
1472
- for (let i = 0; i < 5; i++) {
1473
- const dx = xRange * abscissas[i];
1474
- sum += weights[i] * (func(xMean + dx) + func(xMean - dx));
1475
- }
1476
- sum *= xRange;
1477
- return sum;
1478
- }
1479
- Ellipsoid.prototype.surfaceArea = function(rectangle) {
1480
- Check_default.typeOf.object("rectangle", rectangle);
1481
- const minLongitude = rectangle.west;
1482
- let maxLongitude = rectangle.east;
1483
- const minLatitude = rectangle.south;
1484
- const maxLatitude = rectangle.north;
1485
- while (maxLongitude < minLongitude) {
1486
- maxLongitude += Math_default.TWO_PI;
1487
- }
1488
- const radiiSquared = this._radiiSquared;
1489
- const a2 = radiiSquared.x;
1490
- const b2 = radiiSquared.y;
1491
- const c2 = radiiSquared.z;
1492
- const a2b2 = a2 * b2;
1493
- return gaussLegendreQuadrature(minLatitude, maxLatitude, function(lat) {
1494
- const sinPhi = Math.cos(lat);
1495
- const cosPhi = Math.sin(lat);
1496
- return Math.cos(lat) * gaussLegendreQuadrature(minLongitude, maxLongitude, function(lon) {
1497
- const cosTheta = Math.cos(lon);
1498
- const sinTheta = Math.sin(lon);
1499
- return Math.sqrt(
1500
- a2b2 * cosPhi * cosPhi + c2 * (b2 * cosTheta * cosTheta + a2 * sinTheta * sinTheta) * sinPhi * sinPhi
1501
- );
1502
- });
1503
- });
1504
- };
1505
- var Ellipsoid_default = Ellipsoid;
1506
-
1507
554
  // packages/engine/Source/Core/Matrix3.js
1508
555
  function Matrix3(column0Row0, column1Row0, column2Row0, column0Row1, column1Row1, column2Row1, column0Row2, column1Row2, column2Row2) {
1509
556
  this[0] = column0Row0 ?? 0;
@@ -2389,474 +1436,8 @@ Frozen.EMPTY_OBJECT = Object.freeze({});
2389
1436
  Frozen.EMPTY_ARRAY = Object.freeze([]);
2390
1437
  var Frozen_default = Frozen;
2391
1438
 
2392
- // packages/engine/Source/Core/Fullscreen.js
2393
- var _supportsFullscreen;
2394
- var _names = {
2395
- requestFullscreen: void 0,
2396
- exitFullscreen: void 0,
2397
- fullscreenEnabled: void 0,
2398
- fullscreenElement: void 0,
2399
- fullscreenchange: void 0,
2400
- fullscreenerror: void 0
2401
- };
2402
- var Fullscreen = {};
2403
- Object.defineProperties(Fullscreen, {
2404
- /**
2405
- * The element that is currently fullscreen, if any. To simply check if the
2406
- * browser is in fullscreen mode or not, use {@link Fullscreen#fullscreen}.
2407
- * @memberof Fullscreen
2408
- * @type {object}
2409
- * @readonly
2410
- */
2411
- element: {
2412
- get: function() {
2413
- if (!Fullscreen.supportsFullscreen()) {
2414
- return void 0;
2415
- }
2416
- return document[_names.fullscreenElement];
2417
- }
2418
- },
2419
- /**
2420
- * The name of the event on the document that is fired when fullscreen is
2421
- * entered or exited. This event name is intended for use with addEventListener.
2422
- * In your event handler, to determine if the browser is in fullscreen mode or not,
2423
- * use {@link Fullscreen#fullscreen}.
2424
- * @memberof Fullscreen
2425
- * @type {string}
2426
- * @readonly
2427
- */
2428
- changeEventName: {
2429
- get: function() {
2430
- if (!Fullscreen.supportsFullscreen()) {
2431
- return void 0;
2432
- }
2433
- return _names.fullscreenchange;
2434
- }
2435
- },
2436
- /**
2437
- * The name of the event that is fired when a fullscreen error
2438
- * occurs. This event name is intended for use with addEventListener.
2439
- * @memberof Fullscreen
2440
- * @type {string}
2441
- * @readonly
2442
- */
2443
- errorEventName: {
2444
- get: function() {
2445
- if (!Fullscreen.supportsFullscreen()) {
2446
- return void 0;
2447
- }
2448
- return _names.fullscreenerror;
2449
- }
2450
- },
2451
- /**
2452
- * Determine whether the browser will allow an element to be made fullscreen, or not.
2453
- * For example, by default, iframes cannot go fullscreen unless the containing page
2454
- * adds an "allowfullscreen" attribute (or prefixed equivalent).
2455
- * @memberof Fullscreen
2456
- * @type {boolean}
2457
- * @readonly
2458
- */
2459
- enabled: {
2460
- get: function() {
2461
- if (!Fullscreen.supportsFullscreen()) {
2462
- return void 0;
2463
- }
2464
- return document[_names.fullscreenEnabled];
2465
- }
2466
- },
2467
- /**
2468
- * Determines if the browser is currently in fullscreen mode.
2469
- * @memberof Fullscreen
2470
- * @type {boolean}
2471
- * @readonly
2472
- */
2473
- fullscreen: {
2474
- get: function() {
2475
- if (!Fullscreen.supportsFullscreen()) {
2476
- return void 0;
2477
- }
2478
- return Fullscreen.element !== null;
2479
- }
2480
- }
2481
- });
2482
- Fullscreen.supportsFullscreen = function() {
2483
- if (defined_default(_supportsFullscreen)) {
2484
- return _supportsFullscreen;
2485
- }
2486
- _supportsFullscreen = false;
2487
- const body = document.body;
2488
- if (typeof body.requestFullscreen === "function") {
2489
- _names.requestFullscreen = "requestFullscreen";
2490
- _names.exitFullscreen = "exitFullscreen";
2491
- _names.fullscreenEnabled = "fullscreenEnabled";
2492
- _names.fullscreenElement = "fullscreenElement";
2493
- _names.fullscreenchange = "fullscreenchange";
2494
- _names.fullscreenerror = "fullscreenerror";
2495
- _supportsFullscreen = true;
2496
- return _supportsFullscreen;
2497
- }
2498
- const prefixes = ["webkit", "moz", "o", "ms", "khtml"];
2499
- let name;
2500
- for (let i = 0, len = prefixes.length; i < len; ++i) {
2501
- const prefix = prefixes[i];
2502
- name = `${prefix}RequestFullscreen`;
2503
- if (typeof body[name] === "function") {
2504
- _names.requestFullscreen = name;
2505
- _supportsFullscreen = true;
2506
- } else {
2507
- name = `${prefix}RequestFullScreen`;
2508
- if (typeof body[name] === "function") {
2509
- _names.requestFullscreen = name;
2510
- _supportsFullscreen = true;
2511
- }
2512
- }
2513
- name = `${prefix}ExitFullscreen`;
2514
- if (typeof document[name] === "function") {
2515
- _names.exitFullscreen = name;
2516
- } else {
2517
- name = `${prefix}CancelFullScreen`;
2518
- if (typeof document[name] === "function") {
2519
- _names.exitFullscreen = name;
2520
- }
2521
- }
2522
- name = `${prefix}FullscreenEnabled`;
2523
- if (document[name] !== void 0) {
2524
- _names.fullscreenEnabled = name;
2525
- } else {
2526
- name = `${prefix}FullScreenEnabled`;
2527
- if (document[name] !== void 0) {
2528
- _names.fullscreenEnabled = name;
2529
- }
2530
- }
2531
- name = `${prefix}FullscreenElement`;
2532
- if (document[name] !== void 0) {
2533
- _names.fullscreenElement = name;
2534
- } else {
2535
- name = `${prefix}FullScreenElement`;
2536
- if (document[name] !== void 0) {
2537
- _names.fullscreenElement = name;
2538
- }
2539
- }
2540
- name = `${prefix}fullscreenchange`;
2541
- if (document[`on${name}`] !== void 0) {
2542
- if (prefix === "ms") {
2543
- name = "MSFullscreenChange";
2544
- }
2545
- _names.fullscreenchange = name;
2546
- }
2547
- name = `${prefix}fullscreenerror`;
2548
- if (document[`on${name}`] !== void 0) {
2549
- if (prefix === "ms") {
2550
- name = "MSFullscreenError";
2551
- }
2552
- _names.fullscreenerror = name;
2553
- }
2554
- }
2555
- return _supportsFullscreen;
2556
- };
2557
- Fullscreen.requestFullscreen = function(element, vrDevice) {
2558
- if (!Fullscreen.supportsFullscreen()) {
2559
- return;
2560
- }
2561
- element[_names.requestFullscreen]({ vrDisplay: vrDevice });
2562
- };
2563
- Fullscreen.exitFullscreen = function() {
2564
- if (!Fullscreen.supportsFullscreen()) {
2565
- return;
2566
- }
2567
- document[_names.exitFullscreen]();
2568
- };
2569
- Fullscreen._names = _names;
2570
- var Fullscreen_default = Fullscreen;
2571
-
2572
- // packages/engine/Source/Core/FeatureDetection.js
2573
- var theNavigator;
2574
- if (typeof navigator !== "undefined") {
2575
- theNavigator = navigator;
2576
- } else {
2577
- theNavigator = {};
2578
- }
2579
- function extractVersion(versionString) {
2580
- const parts = versionString.split(".");
2581
- for (let i = 0, len = parts.length; i < len; ++i) {
2582
- parts[i] = parseInt(parts[i], 10);
2583
- }
2584
- return parts;
2585
- }
2586
- var isChromeResult;
2587
- var chromeVersionResult;
2588
- function isChrome() {
2589
- if (!defined_default(isChromeResult)) {
2590
- isChromeResult = false;
2591
- if (!isEdge()) {
2592
- const fields = / Chrome\/([\.0-9]+)/.exec(theNavigator.userAgent);
2593
- if (fields !== null) {
2594
- isChromeResult = true;
2595
- chromeVersionResult = extractVersion(fields[1]);
2596
- }
2597
- }
2598
- }
2599
- return isChromeResult;
2600
- }
2601
- function chromeVersion() {
2602
- return isChrome() && chromeVersionResult;
2603
- }
2604
- var isSafariResult;
2605
- var safariVersionResult;
2606
- function isSafari() {
2607
- if (!defined_default(isSafariResult)) {
2608
- isSafariResult = false;
2609
- if (!isChrome() && !isEdge() && / Safari\/[\.0-9]+/.test(theNavigator.userAgent)) {
2610
- const fields = / Version\/([\.0-9]+)/.exec(theNavigator.userAgent);
2611
- if (fields !== null) {
2612
- isSafariResult = true;
2613
- safariVersionResult = extractVersion(fields[1]);
2614
- }
2615
- }
2616
- }
2617
- return isSafariResult;
2618
- }
2619
- function safariVersion() {
2620
- return isSafari() && safariVersionResult;
2621
- }
2622
- var isWebkitResult;
2623
- var webkitVersionResult;
2624
- function isWebkit() {
2625
- if (!defined_default(isWebkitResult)) {
2626
- isWebkitResult = false;
2627
- const fields = / AppleWebKit\/([\.0-9]+)(\+?)/.exec(theNavigator.userAgent);
2628
- if (fields !== null) {
2629
- isWebkitResult = true;
2630
- webkitVersionResult = extractVersion(fields[1]);
2631
- webkitVersionResult.isNightly = !!fields[2];
2632
- }
2633
- }
2634
- return isWebkitResult;
2635
- }
2636
- function webkitVersion() {
2637
- return isWebkit() && webkitVersionResult;
2638
- }
2639
- var isInternetExplorerResult;
2640
- var internetExplorerVersionResult;
2641
- function isInternetExplorer() {
2642
- if (!defined_default(isInternetExplorerResult)) {
2643
- isInternetExplorerResult = false;
2644
- let fields;
2645
- if (theNavigator.appName === "Microsoft Internet Explorer") {
2646
- fields = /MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(theNavigator.userAgent);
2647
- if (fields !== null) {
2648
- isInternetExplorerResult = true;
2649
- internetExplorerVersionResult = extractVersion(fields[1]);
2650
- }
2651
- } else if (theNavigator.appName === "Netscape") {
2652
- fields = /Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(
2653
- theNavigator.userAgent
2654
- );
2655
- if (fields !== null) {
2656
- isInternetExplorerResult = true;
2657
- internetExplorerVersionResult = extractVersion(fields[1]);
2658
- }
2659
- }
2660
- }
2661
- return isInternetExplorerResult;
2662
- }
2663
- function internetExplorerVersion() {
2664
- return isInternetExplorer() && internetExplorerVersionResult;
2665
- }
2666
- var isEdgeResult;
2667
- var edgeVersionResult;
2668
- function isEdge() {
2669
- if (!defined_default(isEdgeResult)) {
2670
- isEdgeResult = false;
2671
- const fields = / Edg\/([\.0-9]+)/.exec(theNavigator.userAgent);
2672
- if (fields !== null) {
2673
- isEdgeResult = true;
2674
- edgeVersionResult = extractVersion(fields[1]);
2675
- }
2676
- }
2677
- return isEdgeResult;
2678
- }
2679
- function edgeVersion() {
2680
- return isEdge() && edgeVersionResult;
2681
- }
2682
- var isFirefoxResult;
2683
- var firefoxVersionResult;
2684
- function isFirefox() {
2685
- if (!defined_default(isFirefoxResult)) {
2686
- isFirefoxResult = false;
2687
- const fields = /Firefox\/([\.0-9]+)/.exec(theNavigator.userAgent);
2688
- if (fields !== null) {
2689
- isFirefoxResult = true;
2690
- firefoxVersionResult = extractVersion(fields[1]);
2691
- }
2692
- }
2693
- return isFirefoxResult;
2694
- }
2695
- var isWindowsResult;
2696
- function isWindows() {
2697
- if (!defined_default(isWindowsResult)) {
2698
- isWindowsResult = /Windows/i.test(theNavigator.appVersion);
2699
- }
2700
- return isWindowsResult;
2701
- }
2702
- var isIPadOrIOSResult;
2703
- function isIPadOrIOS() {
2704
- if (!defined_default(isIPadOrIOSResult)) {
2705
- isIPadOrIOSResult = navigator.platform === "iPhone" || navigator.platform === "iPod" || navigator.platform === "iPad";
2706
- }
2707
- return isIPadOrIOSResult;
2708
- }
2709
- function firefoxVersion() {
2710
- return isFirefox() && firefoxVersionResult;
2711
- }
2712
- var hasPointerEvents;
2713
- function supportsPointerEvents() {
2714
- if (!defined_default(hasPointerEvents)) {
2715
- hasPointerEvents = !isFirefox() && typeof PointerEvent !== "undefined" && (!defined_default(theNavigator.pointerEnabled) || theNavigator.pointerEnabled);
2716
- }
2717
- return hasPointerEvents;
2718
- }
2719
- var imageRenderingValueResult;
2720
- var supportsImageRenderingPixelatedResult;
2721
- function supportsImageRenderingPixelated() {
2722
- if (!defined_default(supportsImageRenderingPixelatedResult)) {
2723
- const canvas = document.createElement("canvas");
2724
- canvas.setAttribute(
2725
- "style",
2726
- "image-rendering: -moz-crisp-edges;image-rendering: pixelated;"
2727
- );
2728
- const tmp = canvas.style.imageRendering;
2729
- supportsImageRenderingPixelatedResult = defined_default(tmp) && tmp !== "";
2730
- if (supportsImageRenderingPixelatedResult) {
2731
- imageRenderingValueResult = tmp;
2732
- }
2733
- }
2734
- return supportsImageRenderingPixelatedResult;
2735
- }
2736
- function imageRenderingValue() {
2737
- return supportsImageRenderingPixelated() ? imageRenderingValueResult : void 0;
2738
- }
2739
- function supportsWebP() {
2740
- if (!supportsWebP.initialized) {
2741
- throw new DeveloperError_default(
2742
- "You must call FeatureDetection.supportsWebP.initialize and wait for the promise to resolve before calling FeatureDetection.supportsWebP"
2743
- );
2744
- }
2745
- return supportsWebP._result;
2746
- }
2747
- supportsWebP._promise = void 0;
2748
- supportsWebP._result = void 0;
2749
- supportsWebP.initialize = function() {
2750
- if (defined_default(supportsWebP._promise)) {
2751
- return supportsWebP._promise;
2752
- }
2753
- supportsWebP._promise = new Promise((resolve) => {
2754
- const image = new Image();
2755
- image.onload = function() {
2756
- supportsWebP._result = image.width > 0 && image.height > 0;
2757
- resolve(supportsWebP._result);
2758
- };
2759
- image.onerror = function() {
2760
- supportsWebP._result = false;
2761
- resolve(supportsWebP._result);
2762
- };
2763
- image.src = "data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA";
2764
- });
2765
- return supportsWebP._promise;
2766
- };
2767
- Object.defineProperties(supportsWebP, {
2768
- initialized: {
2769
- get: function() {
2770
- return defined_default(supportsWebP._result);
2771
- }
2772
- }
2773
- });
2774
- var typedArrayTypes = [];
2775
- if (typeof ArrayBuffer !== "undefined") {
2776
- typedArrayTypes.push(
2777
- Int8Array,
2778
- Uint8Array,
2779
- Int16Array,
2780
- Uint16Array,
2781
- Int32Array,
2782
- Uint32Array,
2783
- Float32Array,
2784
- Float64Array
2785
- );
2786
- if (typeof Uint8ClampedArray !== "undefined") {
2787
- typedArrayTypes.push(Uint8ClampedArray);
2788
- }
2789
- if (typeof Uint8ClampedArray !== "undefined") {
2790
- typedArrayTypes.push(Uint8ClampedArray);
2791
- }
2792
- if (typeof BigInt64Array !== "undefined") {
2793
- typedArrayTypes.push(BigInt64Array);
2794
- }
2795
- if (typeof BigUint64Array !== "undefined") {
2796
- typedArrayTypes.push(BigUint64Array);
2797
- }
2798
- }
2799
- var FeatureDetection = {
2800
- isChrome,
2801
- chromeVersion,
2802
- isSafari,
2803
- safariVersion,
2804
- isWebkit,
2805
- webkitVersion,
2806
- isInternetExplorer,
2807
- internetExplorerVersion,
2808
- isEdge,
2809
- edgeVersion,
2810
- isFirefox,
2811
- firefoxVersion,
2812
- isWindows,
2813
- isIPadOrIOS,
2814
- hardwareConcurrency: theNavigator.hardwareConcurrency ?? 3,
2815
- supportsPointerEvents,
2816
- supportsImageRenderingPixelated,
2817
- supportsWebP,
2818
- imageRenderingValue,
2819
- typedArrayTypes
2820
- };
2821
- FeatureDetection.supportsBasis = function(scene) {
2822
- return FeatureDetection.supportsWebAssembly() && scene.context.supportsBasis;
2823
- };
2824
- FeatureDetection.supportsFullscreen = function() {
2825
- return Fullscreen_default.supportsFullscreen();
2826
- };
2827
- FeatureDetection.supportsTypedArrays = function() {
2828
- return typeof ArrayBuffer !== "undefined";
2829
- };
2830
- FeatureDetection.supportsBigInt64Array = function() {
2831
- return typeof BigInt64Array !== "undefined";
2832
- };
2833
- FeatureDetection.supportsBigUint64Array = function() {
2834
- return typeof BigUint64Array !== "undefined";
2835
- };
2836
- FeatureDetection.supportsBigInt = function() {
2837
- return typeof BigInt !== "undefined";
2838
- };
2839
- FeatureDetection.supportsWebWorkers = function() {
2840
- return typeof Worker !== "undefined";
2841
- };
2842
- FeatureDetection.supportsWebAssembly = function() {
2843
- return typeof WebAssembly !== "undefined";
2844
- };
2845
- FeatureDetection.supportsWebgl2 = function(scene) {
2846
- Check_default.defined("scene", scene);
2847
- return scene.context.webgl2;
2848
- };
2849
- FeatureDetection.supportsEsmWebWorkers = function() {
2850
- return !isFirefox() || parseInt(firefoxVersionResult) >= 114;
2851
- };
2852
- var FeatureDetection_default = FeatureDetection;
2853
-
2854
1439
  export {
2855
1440
  Cartesian3_default,
2856
- Cartographic_default,
2857
- Cartesian2_default,
2858
- Ellipsoid_default,
2859
1441
  Matrix3_default,
2860
- Frozen_default,
2861
- FeatureDetection_default
1442
+ Frozen_default
2862
1443
  };