@cesium/engine 26.0.0 → 26.2.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.
- package/Build/ThirdParty/Workers/zip-web-worker.js +586 -480
- package/Build/Workers/{chunk-7J2HKPRH.js → chunk-27FWRTJI.js} +9 -9
- package/Build/Workers/{chunk-EF2QYXGA.js → chunk-2EFYUSUY.js} +14 -14
- package/Build/Workers/chunk-2H5264K7.js +1284 -0
- package/Build/Workers/{chunk-DOBXCNC3.js → chunk-2H73KDBM.js} +13 -13
- package/Build/Workers/chunk-2RGJPWQX.js +1284 -0
- package/Build/Workers/chunk-2Z4ZLVOD.js +352 -0
- package/Build/Workers/{chunk-F6QDY6HU.js → chunk-2ZKH2QZB.js} +13 -13
- package/Build/Workers/chunk-36NI5E6W.js +3820 -0
- package/Build/Workers/{chunk-ZK3CF7ZD.js → chunk-37SW7SYS.js} +12 -12
- package/Build/Workers/chunk-3GHVJ3SO.js +455 -0
- package/Build/Workers/chunk-3LB4UVPU.js +387 -0
- package/Build/Workers/chunk-3PONLKEL.js +778 -0
- package/Build/Workers/{chunk-Y57HREW5.js → chunk-3PSS3T43.js} +4 -4
- package/Build/Workers/chunk-3QR662HH.js +3820 -0
- package/Build/Workers/{chunk-QN67VG36.js → chunk-3SX2WYSO.js} +6 -6
- package/Build/Workers/{chunk-G7PXZRVF.js → chunk-3UDN6LYX.js} +7 -7
- package/Build/Workers/chunk-47MCBSXI.js +9237 -0
- package/Build/Workers/{chunk-KKOSKAZB.js → chunk-4E626OCE.js} +17 -17
- package/Build/Workers/chunk-4NW2MJKH.js +455 -0
- package/Build/Workers/{chunk-DBOEKL43.js → chunk-52YK5BSN.js} +7 -7
- package/Build/Workers/{chunk-KFSTQKNM.js → chunk-5LSOO2KD.js} +7 -7
- package/Build/Workers/chunk-5RNAQZK6.js +9234 -0
- package/Build/Workers/chunk-5YPQBFRD.js +519 -0
- package/Build/Workers/{chunk-S4MCOY6I.js → chunk-6FHT43QR.js} +5 -5
- package/Build/Workers/chunk-6FZDPMTO.js +455 -0
- package/Build/Workers/{chunk-VQYETPWC.js → chunk-6HK6IXK2.js} +4 -4
- package/Build/Workers/chunk-6R5X2GUA.js +1284 -0
- package/Build/Workers/{chunk-AYKR4VBR.js → chunk-6YR6JBMY.js} +2 -2
- package/Build/Workers/chunk-76FDC45O.js +511 -0
- package/Build/Workers/chunk-7A2OGDHT.js +305 -0
- package/Build/Workers/chunk-7CGEQUM2.js +305 -0
- package/Build/Workers/{chunk-54I6Y66F.js → chunk-7D2HZKH7.js} +6 -6
- package/Build/Workers/{chunk-3VFEWOBI.js → chunk-7I325HV6.js} +7 -7
- package/Build/Workers/{chunk-4MGMYHOO.js → chunk-7KVKHY7O.js} +6 -6
- package/Build/Workers/chunk-7MM3N2VE.js +1067 -0
- package/Build/Workers/chunk-7TKLTCZW.js +219 -0
- package/Build/Workers/chunk-7UUKBDH6.js +1054 -0
- package/Build/Workers/chunk-7W6DUHAB.js +693 -0
- package/Build/Workers/{chunk-DDWSZVMY.js → chunk-7XM5JK5F.js} +5 -5
- package/Build/Workers/chunk-7YG3ND3P.js +454 -0
- package/Build/Workers/{chunk-IRBKFCEJ.js → chunk-A3O6EDBK.js} +2 -2
- package/Build/Workers/chunk-A62YI6S6.js +305 -0
- package/Build/Workers/{chunk-V7VQKN6N.js → chunk-A6X24AZI.js} +5 -5
- package/Build/Workers/chunk-A7TTWVTF.js +2719 -0
- package/Build/Workers/chunk-ACTVJHSP.js +519 -0
- package/Build/Workers/chunk-ADX3CBKD.js +9234 -0
- package/Build/Workers/{chunk-52JDLOEM.js → chunk-AF7DTMJ7.js} +14 -14
- package/Build/Workers/{chunk-ZP7JMQV4.js → chunk-AHWAZRBV.js} +6 -2
- package/Build/Workers/chunk-AJSFRY4U.js +1344 -0
- package/Build/Workers/{chunk-EBSIOBXY.js → chunk-ARZICEEP.js} +8 -8
- package/Build/Workers/chunk-B3QHNA4A.js +147 -0
- package/Build/Workers/{chunk-YLY7NKAB.js → chunk-B4CQSLZJ.js} +4 -4
- package/Build/Workers/chunk-BKPQFCXH.js +511 -0
- package/Build/Workers/{chunk-O3EA5HS7.js → chunk-BSPCI2LO.js} +10 -10
- package/Build/Workers/chunk-BUJWSX5S.js +301 -0
- package/Build/Workers/{chunk-J6BWOHUF.js → chunk-C7JQVRLM.js} +3 -3
- package/Build/Workers/chunk-C7QDUNI3.js +138 -0
- package/Build/Workers/{chunk-KSSWJIZW.js → chunk-CDJDJ5LK.js} +2 -2
- package/Build/Workers/chunk-CEEZE3YZ.js +476 -0
- package/Build/Workers/chunk-CIV5DJOQ.js +778 -0
- package/Build/Workers/{chunk-INUEEEQA.js → chunk-CLCTQVVL.js} +8 -8
- package/Build/Workers/{chunk-C6J67V5A.js → chunk-CQNFIAZU.js} +1 -1
- package/Build/Workers/chunk-CRCGE4J4.js +9237 -0
- package/Build/Workers/{chunk-SMQZZOW6.js → chunk-CUTRKXUQ.js} +10 -10
- package/Build/Workers/{chunk-Q3PY526V.js → chunk-D6AY775A.js} +6 -6
- package/Build/Workers/chunk-DBD5WWG2.js +959 -0
- package/Build/Workers/{chunk-E7VQ76KE.js → chunk-DIGUUD6G.js} +6 -6
- package/Build/Workers/{chunk-P3CK7MCY.js → chunk-DSGLDRTI.js} +4 -4
- package/Build/Workers/chunk-DZBQUULR.js +138 -0
- package/Build/Workers/chunk-DZUFEE4L.js +140 -0
- package/Build/Workers/chunk-E2NKV5YT.js +3820 -0
- package/Build/Workers/{chunk-424RNO3D.js → chunk-E7NZJOK7.js} +196 -22
- package/Build/Workers/{chunk-UOOIQ3KX.js → chunk-EB3Y5P3A.js} +12 -12
- package/Build/Workers/{chunk-ACXQXN46.js → chunk-EHTS2YPT.js} +16 -16
- package/Build/Workers/{chunk-EPYXRCDB.js → chunk-ELE6SC2C.js} +12 -12
- package/Build/Workers/{chunk-VWV2IJRB.js → chunk-ENNFMWDW.js} +11 -11
- package/Build/Workers/chunk-EOWDZN5S.js +288 -0
- package/Build/Workers/chunk-ERKUET22.js +3201 -0
- package/Build/Workers/chunk-EZGQPOIG.js +162 -0
- package/Build/Workers/chunk-F2IMBMZY.js +241 -0
- package/Build/Workers/chunk-F4CSNRZO.js +219 -0
- package/Build/Workers/chunk-FBP4DUQJ.js +693 -0
- package/Build/Workers/{chunk-FRQZECAO.js → chunk-FCP2QY4G.js} +5 -5
- package/Build/Workers/{chunk-ZZ46LWL6.js → chunk-FDK4K5IA.js} +1 -1
- package/Build/Workers/{chunk-C6KNZ7T4.js → chunk-FGQFQHN5.js} +17 -17
- package/Build/Workers/chunk-FJWZMGOQ.js +1992 -0
- package/Build/Workers/{chunk-Y5BF6AFU.js → chunk-FQ42MT7M.js} +2 -2
- package/Build/Workers/chunk-FU4BGABC.js +398 -0
- package/Build/Workers/chunk-FX3VEAIU.js +2719 -0
- package/Build/Workers/chunk-GGNWQWSB.js +301 -0
- package/Build/Workers/chunk-GHXVQVUM.js +1344 -0
- package/Build/Workers/{chunk-CZEYZU4N.js → chunk-GNKXEN4C.js} +10 -10
- package/Build/Workers/{chunk-MYP774IS.js → chunk-GSWMAFTE.js} +8 -8
- package/Build/Workers/chunk-GVA7XQI2.js +368 -0
- package/Build/Workers/chunk-GXDHRC4J.js +1344 -0
- package/Build/Workers/chunk-GXWQZBAI.js +58 -0
- package/Build/Workers/chunk-GYSYP6PC.js +1067 -0
- package/Build/Workers/chunk-H2WCFXLP.js +241 -0
- package/Build/Workers/chunk-HDL4HOXZ.js +778 -0
- package/Build/Workers/chunk-HHV3MCGV.js +162 -0
- package/Build/Workers/chunk-HLW2ZRVK.js +368 -0
- package/Build/Workers/chunk-HS6AD4P2.js +398 -0
- package/Build/Workers/chunk-HT6FASOT.js +973 -0
- package/Build/Workers/chunk-I74ZH5LK.js +959 -0
- package/Build/Workers/{chunk-7WM2PX4V.js → chunk-IDVHUDZT.js} +5 -5
- package/Build/Workers/chunk-IGAZBTFZ.js +3201 -0
- package/Build/Workers/chunk-IJZJMIUY.js +789 -0
- package/Build/Workers/chunk-ILME5BXA.js +301 -0
- package/Build/Workers/chunk-IMBVP57H.js +44 -0
- package/Build/Workers/chunk-IOO7Z2AV.js +57 -0
- package/Build/Workers/chunk-IUIFLOYO.js +44 -0
- package/Build/Workers/chunk-J73T2VOY.js +171 -0
- package/Build/Workers/chunk-JALGQYDY.js +288 -0
- package/Build/Workers/chunk-JKXV6PG5.js +56 -0
- package/Build/Workers/chunk-JW6OZT4R.js +288 -0
- package/Build/Workers/{chunk-CXOYE2WM.js → chunk-JXYLJCTC.js} +5 -5
- package/Build/Workers/{chunk-CFQP6LYM.js → chunk-K27QOAW6.js} +4 -4
- package/Build/Workers/chunk-KGXSYGBG.js +387 -0
- package/Build/Workers/chunk-KMV25A63.js +789 -0
- package/Build/Workers/chunk-KP5QD7WU.js +693 -0
- package/Build/Workers/chunk-KZWFWJML.js +2719 -0
- package/Build/Workers/chunk-LCXRRALY.js +387 -0
- package/Build/Workers/chunk-LD64RPYV.js +368 -0
- package/Build/Workers/{chunk-U3ZA64U7.js → chunk-LDRQSYBN.js} +2 -2
- package/Build/Workers/chunk-LGNDTZVX.js +97 -0
- package/Build/Workers/chunk-LNSQVXFH.js +1800 -0
- package/Build/Workers/chunk-M4JZ6TSZ.js +959 -0
- package/Build/Workers/chunk-M6QKXVAU.js +1054 -0
- package/Build/Workers/chunk-MAAHFYPC.js +198 -0
- package/Build/Workers/chunk-MCJDRDJQ.js +102 -0
- package/Build/Workers/chunk-MEENMEAH.js +198 -0
- package/Build/Workers/{chunk-TKKIREQ6.js → chunk-N7CCOFLX.js} +1 -1
- package/Build/Workers/chunk-NAWU5RF4.js +162 -0
- package/Build/Workers/{chunk-M3B5JKSM.js → chunk-NCL22ZUX.js} +1 -1
- package/Build/Workers/chunk-NEFDMMLY.js +241 -0
- package/Build/Workers/{chunk-UA25D5MX.js → chunk-NIWITKQK.js} +10 -10
- package/Build/Workers/chunk-NJVBJG63.js +124 -0
- package/Build/Workers/chunk-NLLCQBX3.js +73 -0
- package/Build/Workers/chunk-NSKZ6SBK.js +1483 -0
- package/Build/Workers/chunk-NXGQBQWE.js +837 -0
- package/Build/Workers/chunk-O3DKEX7Q.js +352 -0
- package/Build/Workers/chunk-O3XFXGPZ.js +476 -0
- package/Build/Workers/chunk-OA6MYL2C.js +837 -0
- package/Build/Workers/chunk-OBEU25PI.js +1067 -0
- package/Build/Workers/chunk-OHP4ELS7.js +198 -0
- package/Build/Workers/chunk-OZGPS7FB.js +138 -0
- package/Build/Workers/chunk-PCL3Y7H5.js +82 -0
- package/Build/Workers/chunk-PD4GK4EM.js +57 -0
- package/Build/Workers/chunk-PEDU33QG.js +2342 -0
- package/Build/Workers/chunk-PRWUMCXF.js +682 -0
- package/Build/Workers/chunk-PVTSNNVI.js +288 -0
- package/Build/Workers/chunk-QFSSCLLZ.js +973 -0
- package/Build/Workers/chunk-QHPZH22L.js +241 -0
- package/Build/Workers/chunk-QIZDWZK6.js +301 -0
- package/Build/Workers/chunk-QV6DG2YX.js +1483 -0
- package/Build/Workers/chunk-QVLAFFJY.js +56 -0
- package/Build/Workers/{chunk-6YEE6JDR.js → chunk-R4FPNAZ2.js} +6 -6
- package/Build/Workers/chunk-R4K7EHOU.js +171 -0
- package/Build/Workers/chunk-R7JGHDD6.js +789 -0
- package/Build/Workers/chunk-RASQEYD4.js +1483 -0
- package/Build/Workers/chunk-RG4F5R57.js +454 -0
- package/Build/Workers/chunk-RW6ITX7Q.js +3820 -0
- package/Build/Workers/chunk-RYSQVJR6.js +398 -0
- package/Build/Workers/chunk-S6RJU5NM.js +1054 -0
- package/Build/Workers/chunk-SA2A2AN5.js +2342 -0
- package/Build/Workers/chunk-SDFHDNS4.js +147 -0
- package/Build/Workers/chunk-SF6K72D7.js +124 -0
- package/Build/Workers/chunk-SGRGNDOD.js +682 -0
- package/Build/Workers/{chunk-QRWGUWI6.js → chunk-SJYSIOEM.js} +11 -11
- package/Build/Workers/chunk-SM2CDCYF.js +198 -0
- package/Build/Workers/chunk-SMTGMFBL.js +97 -0
- package/Build/Workers/chunk-SS5ABQGY.js +102 -0
- package/Build/Workers/{chunk-IYOUHCZB.js → chunk-SXSP3JHS.js} +1 -1
- package/Build/Workers/chunk-T5QBPLE3.js +414 -0
- package/Build/Workers/chunk-TN35HP5B.js +1067 -0
- package/Build/Workers/chunk-TNWKJNUZ.js +454 -0
- package/Build/Workers/chunk-TOAF47AQ.js +102 -0
- package/Build/Workers/chunk-TQ4QCOXT.js +2719 -0
- package/Build/Workers/chunk-TSDSILQB.js +124 -0
- package/Build/Workers/chunk-TVZD72WJ.js +778 -0
- package/Build/Workers/chunk-U5LV3F3Z.js +1054 -0
- package/Build/Workers/chunk-UAZUP4I5.js +1992 -0
- package/Build/Workers/chunk-UEY73NRN.js +38 -0
- package/Build/Workers/chunk-UF46SZEZ.js +789 -0
- package/Build/Workers/chunk-UNRTMCET.js +398 -0
- package/Build/Workers/chunk-UTB7U3O6.js +1992 -0
- package/Build/Workers/chunk-UVO6COT2.js +352 -0
- package/Build/Workers/chunk-V46YGZE6.js +352 -0
- package/Build/Workers/chunk-VAL7DYNR.js +278 -0
- package/Build/Workers/chunk-VDGOCROW.js +57 -0
- package/Build/Workers/chunk-VFWSSBPT.js +511 -0
- package/Build/Workers/chunk-VVYMXI3I.js +1284 -0
- package/Build/Workers/chunk-VXWHPYQM.js +837 -0
- package/Build/Workers/chunk-VXYUBRSB.js +219 -0
- package/Build/Workers/chunk-VZLDLEWI.js +387 -0
- package/Build/Workers/{chunk-4S7IE3LB.js → chunk-W5OCKMPJ.js} +2 -2
- package/Build/Workers/chunk-WBSY7HDY.js +837 -0
- package/Build/Workers/chunk-WN3F4CVG.js +3201 -0
- package/Build/Workers/chunk-WPRUWXGV.js +693 -0
- package/Build/Workers/chunk-WTO2ERBP.js +414 -0
- package/Build/Workers/chunk-WVHMDVG4.js +959 -0
- package/Build/Workers/chunk-XCBZVTIV.js +280 -0
- package/Build/Workers/chunk-XDWCTQCZ.js +101 -0
- package/Build/Workers/chunk-XGA23TAX.js +73 -0
- package/Build/Workers/chunk-XLQZNQ4Z.js +163 -0
- package/Build/Workers/chunk-XLXSDIP5.js +973 -0
- package/Build/Workers/chunk-XQ3SKCMM.js +140 -0
- package/Build/Workers/chunk-XQH66YJC.js +147 -0
- package/Build/Workers/chunk-XTA7BXJG.js +682 -0
- package/Build/Workers/chunk-XTIDAFRS.js +476 -0
- package/Build/Workers/chunk-XUEDWBUD.js +682 -0
- package/Build/Workers/chunk-XYFLRH3H.js +124 -0
- package/Build/Workers/chunk-Y7JRTRTO.js +305 -0
- package/Build/Workers/chunk-Y7QSMDCJ.js +352 -0
- package/Build/Workers/chunk-YCB5TYTR.js +1483 -0
- package/Build/Workers/chunk-YEYOSTJX.js +219 -0
- package/Build/Workers/chunk-YGFVAGYF.js +630 -0
- package/Build/Workers/chunk-YIIACKQO.js +368 -0
- package/Build/Workers/chunk-YJGSP6PE.js +511 -0
- package/Build/Workers/{chunk-XZMBNNDX.js → chunk-YKU2Q3A2.js} +9 -9
- package/Build/Workers/chunk-Z4LR5EHE.js +454 -0
- package/Build/Workers/chunk-Z66EVE2A.js +44 -0
- package/Build/Workers/chunk-ZHIHHHTB.js +414 -0
- package/Build/Workers/chunk-ZMBHFYOX.js +1344 -0
- package/Build/Workers/chunk-ZNWHFSLE.js +171 -0
- package/Build/Workers/chunk-ZQLZG4IN.js +2342 -0
- package/Build/Workers/chunk-ZRTSMUZ2.js +414 -0
- package/Build/Workers/{chunk-MPZHGZU6.js → chunk-ZSGUV73H.js} +4 -4
- package/Build/Workers/chunk-ZZUVT5BM.js +476 -0
- package/Build/Workers/combineGeometry.js +24 -24
- package/Build/Workers/createBoxGeometry.js +18 -18
- package/Build/Workers/createBoxOutlineGeometry.js +16 -16
- package/Build/Workers/createCircleGeometry.js +26 -26
- package/Build/Workers/createCircleOutlineGeometry.js +19 -19
- package/Build/Workers/createCoplanarPolygonGeometry.js +35 -35
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +31 -31
- package/Build/Workers/createCorridorGeometry.js +31 -33
- package/Build/Workers/createCorridorOutlineGeometry.js +29 -31
- package/Build/Workers/createCylinderGeometry.js +20 -20
- package/Build/Workers/createCylinderOutlineGeometry.js +18 -18
- package/Build/Workers/createEllipseGeometry.js +26 -26
- package/Build/Workers/createEllipseOutlineGeometry.js +19 -19
- package/Build/Workers/createEllipsoidGeometry.js +19 -19
- package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -18
- package/Build/Workers/createFrustumGeometry.js +18 -18
- package/Build/Workers/createFrustumOutlineGeometry.js +18 -18
- package/Build/Workers/createGeometry.js +24 -24
- package/Build/Workers/createGroundPolylineGeometry.js +24 -24
- package/Build/Workers/createPlaneGeometry.js +16 -16
- package/Build/Workers/createPlaneOutlineGeometry.js +15 -15
- package/Build/Workers/createPolygonGeometry.js +34 -34
- package/Build/Workers/createPolygonOutlineGeometry.js +31 -31
- package/Build/Workers/createPolylineGeometry.js +26 -26
- package/Build/Workers/createPolylineVolumeGeometry.js +31 -31
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +27 -27
- package/Build/Workers/createRectangleGeometry.js +27 -27
- package/Build/Workers/createRectangleOutlineGeometry.js +21 -21
- package/Build/Workers/createSimplePolylineGeometry.js +24 -24
- package/Build/Workers/createSphereGeometry.js +19 -19
- package/Build/Workers/createSphereOutlineGeometry.js +18 -18
- package/Build/Workers/createTaskProcessorWorker.js +3 -3
- package/Build/Workers/createVectorTileClampedPolylines.js +14 -14
- package/Build/Workers/createVectorTileGeometries.js +24 -24
- package/Build/Workers/createVectorTilePoints.js +13 -13
- package/Build/Workers/createVectorTilePolygons.js +22 -22
- package/Build/Workers/createVectorTilePolylines.js +14 -14
- package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +25 -25
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +22 -22
- package/Build/Workers/createVerticesFromHeightmap.js +22 -22
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +20 -20
- package/Build/Workers/createWallGeometry.js +24 -24
- package/Build/Workers/createWallOutlineGeometry.js +24 -24
- package/Build/Workers/decodeDraco.js +10 -10
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +987 -2320
- package/Build/Workers/decodeI3S.js +10 -10
- package/Build/Workers/gaussianSplatSorter.js +4 -4
- package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
- package/Build/Workers/incrementallyBuildTerrainPicker.js +10 -10
- package/Build/Workers/transcodeKTX2.js +6 -6
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +22 -22
- package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +25 -25
- package/Source/Core/ArcGISTiledElevationTerrainProvider.js +1 -5
- package/Source/Core/BoundingRectangle.js +6 -8
- package/Source/Core/BoundingSphere.js +0 -3
- package/Source/Core/Cesium3DTilesTerrainGeometryProcessor.js +3 -4
- package/Source/Core/Color.js +1 -0
- package/Source/Core/CoplanarPolygonGeometry.js +2 -2
- package/Source/Core/CorridorGeometry.js +2 -4
- package/Source/Core/CorridorOutlineGeometry.js +1 -3
- package/Source/Core/EarthOrientationParameters.js +2 -2
- package/Source/Core/EllipseGeometryLibrary.js +2 -2
- package/Source/Core/EllipsoidGeodesic.js +3 -3
- package/Source/Core/EllipsoidRhumbLine.js +1 -1
- package/Source/Core/GroundPolylineGeometry.js +2 -2
- package/Source/Core/Heap.js +1 -1
- package/Source/Core/HermitePolynomialApproximation.js +215 -179
- package/Source/Core/InterpolationAlgorithm.js +58 -50
- package/Source/Core/Ion.js +1 -1
- package/Source/Core/JulianDate.js +1 -1
- package/Source/Core/LagrangePolynomialApproximation.js +55 -52
- package/Source/Core/LinearApproximation.js +69 -66
- package/Source/Core/Math.js +59 -0
- package/Source/Core/Matrix2.js +2 -2
- package/Source/Core/Matrix3.js +2 -2
- package/Source/Core/OrthographicFrustum.js +1 -1
- package/Source/Core/PerspectiveFrustum.js +1 -1
- package/Source/Core/PolygonGeometry.js +2 -2
- package/Source/Core/PolygonGeometryLibrary.js +1 -1
- package/Source/Core/PolygonOutlineGeometry.js +1 -1
- package/Source/Core/PolylineGeometry.js +1 -1
- package/Source/Core/PolylineVolumeGeometryLibrary.js +1 -1
- package/Source/Core/Rectangle.js +7 -1
- package/Source/Core/RectangleOutlineGeometry.js +1 -1
- package/Source/Core/SimplePolylineGeometry.js +1 -1
- package/Source/Core/TerrainEncoding.js +2 -2
- package/Source/Core/TerrainMesh.js +3 -3
- package/Source/Core/TerrainPicker.js +180 -168
- package/Source/Core/TimeIntervalCollection.js +1 -3
- package/Source/Core/Tipsify.js +1 -1
- package/Source/Core/Transforms.js +5 -1
- package/Source/Core/VectorPipeline.js +1117 -0
- package/Source/Core/VectorProvider.js +429 -0
- package/Source/Core/WallOutlineGeometry.js +1 -1
- package/Source/Core/getTimestamp.js +4 -2
- package/Source/Core/writeTextToCanvas.js +1 -0
- package/Source/DataSources/CompositeEntityCollection.js +0 -1
- package/Source/DataSources/CzmlDataSource.js +14 -0
- package/Source/DataSources/DataSourceDisplay.js +1 -1
- package/Source/DataSources/GeoJsonDataSource.js +0 -1
- package/Source/DataSources/GeometryVisualizer.js +1 -1
- package/Source/DataSources/KmlDataSource.js +529 -557
- package/Source/DataSources/PathGraphics.js +8 -1
- package/Source/DataSources/PathMode.js +27 -0
- package/Source/DataSources/PathVisualizer.js +298 -1
- package/Source/DataSources/PolylineVisualizer.js +1 -1
- package/Source/DataSources/StaticOutlineGeometryBatch.js +1 -1
- package/Source/Renderer/AutomaticUniforms.js +23 -0
- package/Source/Renderer/Context.js +9 -3
- package/Source/Renderer/DrawCommand.js +22 -0
- package/Source/Renderer/Framebuffer.js +4 -0
- package/Source/Renderer/Pass.js +11 -10
- package/Source/Renderer/Texture.js +12 -1
- package/Source/Renderer/UniformState.js +7 -0
- package/Source/Renderer/VertexArray.js +1 -1
- package/Source/Scene/ArcGisMapServerImageryProvider.js +0 -5
- package/Source/Scene/ArcGisMapService.js +1 -1
- package/Source/Scene/Billboard.js +2 -1
- package/Source/Scene/BillboardCollection.js +7 -3
- package/Source/Scene/BillboardTexture.js +5 -3
- package/Source/Scene/BufferPrimitiveCollection.js +27 -5
- package/Source/Scene/Camera.js +71 -5
- package/Source/Scene/Cesium3DTileOptimizations.js +4 -6
- package/Source/Scene/Cesium3DTileset.js +1 -1
- package/Source/Scene/ClippingPlaneCollection.js +4 -4
- package/Source/Scene/ClippingPolygon.js +2 -0
- package/Source/Scene/ClippingPolygonCollection.js +2 -2
- package/Source/Scene/Controllers/Controller.js +63 -0
- package/Source/Scene/Controllers/ControllerHost.js +78 -0
- package/Source/Scene/Controllers/HybridScreenSpacePanCameraController.js +106 -0
- package/Source/Scene/Controllers/MouseButton.js +32 -0
- package/Source/Scene/Controllers/ScreenSpaceElevatorCameraController.js +295 -0
- package/Source/Scene/Controllers/ScreenSpaceInputBindings.js +154 -0
- package/Source/Scene/Controllers/ScreenSpaceMapCameraController.js +310 -0
- package/Source/Scene/Controllers/ScreenSpaceTiltOrbitCameraController.js +642 -0
- package/Source/Scene/Controllers/ScreenSpaceZoomCameraController.js +431 -0
- package/Source/Scene/Controllers/defaultPickWorldPosition.js +84 -0
- package/Source/Scene/DerivedCommand.js +98 -0
- package/Source/Scene/EdgeFramebuffer.js +1 -5
- package/Source/Scene/Expression.js +6 -8
- package/Source/Scene/FrameState.js +17 -0
- package/Source/Scene/Globe.js +20 -0
- package/Source/Scene/GlobeDepth.js +27 -1
- package/Source/Scene/GlobeSurfaceShaderSet.js +511 -409
- package/Source/Scene/GlobeSurfaceTile.js +575 -398
- package/Source/Scene/GlobeSurfaceTileProvider.js +1382 -1151
- package/Source/Scene/GltfBufferViewLoader.js +3 -3
- package/Source/Scene/GltfLoader.js +33 -3
- package/Source/Scene/GltfLoaderUtil.js +20 -4
- package/Source/Scene/GltfPipeline/forEachTextureInMaterial.js +10 -0
- package/Source/Scene/GltfPipeline/removeUnusedElements.js +21 -11
- package/Source/Scene/GltfSpzLoader.js +1 -1
- package/Source/Scene/GltfVertexBufferLoader.js +6 -3
- package/Source/Scene/I3SDataProvider.js +1 -1
- package/Source/Scene/I3SLayer.js +1 -1
- package/Source/Scene/I3SNode.js +2 -2
- package/Source/Scene/ImageryLayer.js +2 -2
- package/Source/Scene/ImageryLayerCollection.js +190 -6
- package/Source/Scene/IonImageryProvider.js +1 -5
- package/Source/Scene/Label.js +4 -4
- package/Source/Scene/LabelCollection.js +1 -1
- package/Source/Scene/MVTDataProvider.js +2 -0
- package/Source/Scene/Material.js +1 -0
- package/Source/Scene/Model/B3dmLoader.js +1 -2
- package/Source/Scene/Model/EdgeVisibilityPipelineStage.js +10 -8
- package/Source/Scene/Model/Extensions/Gpm/GltfGpmLoader.js +4 -0
- package/Source/Scene/Model/I3dmLoader.js +1 -1
- package/Source/Scene/Model/InstancingPipelineStage.js +4 -7
- package/Source/Scene/Model/MaterialPipelineStage.js +124 -1
- package/Source/Scene/Model/Model.js +11 -10
- package/Source/Scene/Model/ModelClippingPlanesPipelineStage.js +28 -1
- package/Source/Scene/Model/ModelDrawCommand.js +160 -16
- package/Source/Scene/Model/ModelDrawCommands.js +4 -0
- package/Source/Scene/Model/ModelSceneGraph.js +21 -0
- package/Source/Scene/Model/ModelUtility.js +1 -0
- package/Source/Scene/Model/PickingPipelineStage.js +29 -0
- package/Source/Scene/Model/PrimitiveRenderResources.js +24 -0
- package/Source/Scene/ModelComponents.js +71 -0
- package/Source/Scene/Picking.js +19 -3
- package/Source/Scene/PlanarFillIdFramebuffer.js +172 -0
- package/Source/Scene/PntsParser.js +1 -1
- package/Source/Scene/PolylineCollection.js +1 -1
- package/Source/Scene/PostProcessStage.js +4 -2
- package/Source/Scene/QuadtreePrimitive.js +3 -2
- package/Source/Scene/ResourceCache.js +7 -4
- package/Source/Scene/ResourceCacheKey.js +21 -18
- package/Source/Scene/Scene.js +203 -5
- package/Source/Scene/ScreenSpaceCameraController.js +1 -2
- package/Source/Scene/ShadowMap.js +9 -3
- package/Source/Scene/ShadowMapShader.js +50 -2
- package/Source/Scene/SnapFramebuffer.js +121 -0
- package/Source/Scene/Snapping.js +184 -0
- package/Source/Scene/TerrainFillMesh.js +3 -2
- package/Source/Scene/UrlTemplate3DTilesDataProvider.js +1 -1
- package/Source/Scene/Vector3DTileContent.js +2 -3
- package/Source/Scene/VectorGltf3DTileContent.js +23 -3
- package/Source/Scene/View.js +10 -8
- package/Source/Scene/VoxelTraversal.js +1 -1
- package/Source/Scene/createElevationBandMaterial.js +1 -1
- package/Source/Scene/findMeshoptExtension.js +23 -0
- package/Source/Scene/renderBufferPointCollection.js +14 -10
- package/Source/Scene/renderBufferPolygonCollection.js +10 -15
- package/Source/Scene/renderBufferPolylineCollection.js +121 -194
- package/Source/Shaders/Builtin/Constants/passCesium3DTile.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passCesium3DTile.js +1 -1
- package/Source/Shaders/Builtin/Constants/passCesium3DTileClassification.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passCesium3DTileClassification.js +1 -1
- package/Source/Shaders/Builtin/Constants/passCesium3DTileClassificationIgnoreShow.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passCesium3DTileClassificationIgnoreShow.js +1 -1
- package/Source/Shaders/Builtin/Constants/passCesium3DTilePlanarFillId.glsl +9 -0
- package/Source/Shaders/Builtin/Constants/passCesium3DTilePlanarFillId.js +11 -0
- package/Source/Shaders/Builtin/Constants/passClassification.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passClassification.js +1 -1
- package/Source/Shaders/Builtin/Constants/passGaussianSplats.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passGaussianSplats.js +1 -1
- package/Source/Shaders/Builtin/Constants/passOpaque.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passOpaque.js +1 -1
- package/Source/Shaders/Builtin/Constants/passTranslucent.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passTranslucent.js +1 -1
- package/Source/Shaders/Builtin/Constants/passVoxels.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passVoxels.js +1 -1
- package/Source/Shaders/Builtin/CzmBuiltins.js +2 -0
- package/Source/Shaders/GlobeFS.glsl +10 -5
- package/Source/Shaders/GlobeFS.js +9 -5
- package/Source/Shaders/Materials/PolylineGlowMaterial.glsl +1 -1
- package/Source/Shaders/Materials/PolylineGlowMaterial.js +1 -1
- package/Source/Shaders/Model/MaterialStageFS.glsl +8 -2
- package/Source/Shaders/Model/MaterialStageFS.js +8 -2
- package/Source/Shaders/Model/ModelFS.glsl +105 -0
- package/Source/Shaders/Model/ModelFS.js +105 -0
- package/Source/Shaders/VectorCommon.glsl +178 -0
- package/Source/Shaders/VectorCommon.js +75 -0
- package/Source/ThirdParty/Workers/zip-web-worker.js +1 -1
- package/Source/ThirdParty/zip-module.wasm +0 -0
- package/Source/Widget/CesiumWidget.js +30 -0
- package/Source/Workers/decodeGoogleEarthEnterprisePacket.js +2 -2
- package/Source/Workers/incrementallyBuildTerrainPicker.js +2 -0
- package/index.d.ts +825 -260
- package/index.js +29 -10
- package/package.json +4 -4
|
@@ -191,133 +191,131 @@ const featureTypes = {
|
|
|
191
191
|
Tour: processTour,
|
|
192
192
|
};
|
|
193
193
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
this._started = 0;
|
|
203
|
-
this._timeThreshold = 1000; // Initial load is 1 second
|
|
204
|
-
}
|
|
194
|
+
class DeferredLoading {
|
|
195
|
+
constructor(dataSource) {
|
|
196
|
+
this._dataSource = dataSource;
|
|
197
|
+
this._deferred = defer();
|
|
198
|
+
this._stack = [];
|
|
199
|
+
this._promises = [];
|
|
200
|
+
this._timeoutSet = false;
|
|
201
|
+
this._used = false;
|
|
205
202
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
return this._dataSource;
|
|
210
|
-
},
|
|
211
|
-
},
|
|
212
|
-
});
|
|
213
|
-
|
|
214
|
-
DeferredLoading.prototype.addNodes = function (nodes, processingData) {
|
|
215
|
-
this._stack.push({
|
|
216
|
-
nodes: nodes,
|
|
217
|
-
index: 0,
|
|
218
|
-
processingData: processingData,
|
|
219
|
-
});
|
|
220
|
-
this._used = true;
|
|
221
|
-
};
|
|
222
|
-
|
|
223
|
-
DeferredLoading.prototype.addPromise = function (promise) {
|
|
224
|
-
this._promises.push(promise);
|
|
225
|
-
};
|
|
203
|
+
this._started = 0;
|
|
204
|
+
this._timeThreshold = 1000; // Initial load is 1 second
|
|
205
|
+
}
|
|
226
206
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
const deferred = this._deferred;
|
|
230
|
-
if (!this._used) {
|
|
231
|
-
deferred.resolve();
|
|
207
|
+
get dataSource() {
|
|
208
|
+
return this._dataSource;
|
|
232
209
|
}
|
|
233
210
|
|
|
234
|
-
|
|
235
|
-
|
|
211
|
+
addNodes(nodes, processingData) {
|
|
212
|
+
this._stack.push({
|
|
213
|
+
nodes: nodes,
|
|
214
|
+
index: 0,
|
|
215
|
+
processingData: processingData,
|
|
216
|
+
});
|
|
217
|
+
this._used = true;
|
|
218
|
+
}
|
|
236
219
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
if (isFirstCall) {
|
|
240
|
-
this._started = KmlDataSource._getTimestamp();
|
|
220
|
+
addPromise(promise) {
|
|
221
|
+
this._promises.push(promise);
|
|
241
222
|
}
|
|
242
223
|
|
|
243
|
-
|
|
244
|
-
|
|
224
|
+
wait() {
|
|
225
|
+
// Case where we had a non-document/folder as the root
|
|
226
|
+
const deferred = this._deferred;
|
|
227
|
+
if (!this._used) {
|
|
228
|
+
deferred.resolve();
|
|
229
|
+
}
|
|
245
230
|
|
|
246
|
-
|
|
247
|
-
if (this._timeoutSet) {
|
|
248
|
-
// Timeout was already set so just return
|
|
249
|
-
return;
|
|
231
|
+
return Promise.all([deferred.promise, Promise.all(this._promises)]);
|
|
250
232
|
}
|
|
251
233
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
that._started = KmlDataSource._getTimestamp();
|
|
258
|
-
that._process(true);
|
|
259
|
-
}, 0);
|
|
260
|
-
};
|
|
234
|
+
process() {
|
|
235
|
+
const isFirstCall = this._stack.length === 1;
|
|
236
|
+
if (isFirstCall) {
|
|
237
|
+
this._started = KmlDataSource._getTimestamp();
|
|
238
|
+
}
|
|
261
239
|
|
|
262
|
-
|
|
263
|
-
const stack = this._stack;
|
|
264
|
-
const top = stack[stack.length - 1];
|
|
265
|
-
const index = top.index;
|
|
266
|
-
const nodes = top.nodes;
|
|
267
|
-
if (index === nodes.length) {
|
|
268
|
-
return;
|
|
240
|
+
return this._process(isFirstCall);
|
|
269
241
|
}
|
|
270
|
-
++top.index;
|
|
271
242
|
|
|
272
|
-
|
|
273
|
-
|
|
243
|
+
_giveUpTime() {
|
|
244
|
+
if (this._timeoutSet) {
|
|
245
|
+
// Timeout was already set so just return
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
274
248
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
249
|
+
this._timeoutSet = true;
|
|
250
|
+
this._timeThreshold = 50; // After the first load lower threshold to 0.5 seconds
|
|
251
|
+
const that = this;
|
|
252
|
+
setTimeout(function () {
|
|
253
|
+
that._timeoutSet = false;
|
|
254
|
+
that._started = KmlDataSource._getTimestamp();
|
|
255
|
+
that._process(true);
|
|
256
|
+
}, 0);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
_nextNode() {
|
|
260
|
+
const stack = this._stack;
|
|
261
|
+
const top = stack[stack.length - 1];
|
|
262
|
+
const index = top.index;
|
|
263
|
+
const nodes = top.nodes;
|
|
264
|
+
if (index === nodes.length) {
|
|
265
|
+
return;
|
|
266
|
+
}
|
|
267
|
+
++top.index;
|
|
278
268
|
|
|
279
|
-
|
|
280
|
-
if (stack.length === 0) {
|
|
281
|
-
this._deferred.resolve();
|
|
282
|
-
return false;
|
|
269
|
+
return nodes[index];
|
|
283
270
|
}
|
|
284
271
|
|
|
285
|
-
|
|
286
|
-
|
|
272
|
+
_pop() {
|
|
273
|
+
const stack = this._stack;
|
|
274
|
+
stack.pop();
|
|
287
275
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
276
|
+
// Return false if we are done
|
|
277
|
+
if (stack.length === 0) {
|
|
278
|
+
this._deferred.resolve();
|
|
279
|
+
return false;
|
|
280
|
+
}
|
|
291
281
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
const featureProcessor = featureTypes[child.localName];
|
|
295
|
-
if (
|
|
296
|
-
defined(featureProcessor) &&
|
|
297
|
-
(namespaces.kml.indexOf(child.namespaceURI) !== -1 ||
|
|
298
|
-
namespaces.gx.indexOf(child.namespaceURI) !== -1)
|
|
299
|
-
) {
|
|
300
|
-
featureProcessor(dataSource, child, processingData, this);
|
|
282
|
+
return true;
|
|
283
|
+
}
|
|
301
284
|
|
|
302
|
-
|
|
285
|
+
_process(isFirstCall) {
|
|
286
|
+
const dataSource = this.dataSource;
|
|
287
|
+
const processingData = this._stack[this._stack.length - 1].processingData;
|
|
288
|
+
|
|
289
|
+
let child = this._nextNode();
|
|
290
|
+
while (defined(child)) {
|
|
291
|
+
const featureProcessor = featureTypes[child.localName];
|
|
303
292
|
if (
|
|
304
|
-
|
|
305
|
-
|
|
293
|
+
defined(featureProcessor) &&
|
|
294
|
+
(namespaces.kml.indexOf(child.namespaceURI) !== -1 ||
|
|
295
|
+
namespaces.gx.indexOf(child.namespaceURI) !== -1)
|
|
306
296
|
) {
|
|
307
|
-
this
|
|
308
|
-
|
|
297
|
+
featureProcessor(dataSource, child, processingData, this);
|
|
298
|
+
|
|
299
|
+
// Give up time and continue loading later
|
|
300
|
+
if (
|
|
301
|
+
this._timeoutSet ||
|
|
302
|
+
KmlDataSource._getTimestamp() > this._started + this._timeThreshold
|
|
303
|
+
) {
|
|
304
|
+
this._giveUpTime();
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
309
307
|
}
|
|
310
|
-
}
|
|
311
308
|
|
|
312
|
-
|
|
313
|
-
|
|
309
|
+
child = this._nextNode();
|
|
310
|
+
}
|
|
314
311
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
312
|
+
// If we are a recursive call from a subfolder, just return so the parent folder can continue processing
|
|
313
|
+
// If we aren't then make another call to processNodes because there is stuff still left in the queue
|
|
314
|
+
if (this._pop() && isFirstCall) {
|
|
315
|
+
this._process(true);
|
|
316
|
+
}
|
|
319
317
|
}
|
|
320
|
-
}
|
|
318
|
+
}
|
|
321
319
|
|
|
322
320
|
function isZipFile(blob) {
|
|
323
321
|
const magicBlob = blob.slice(0, Math.min(4, blob.size));
|
|
@@ -1497,9 +1495,8 @@ function processPositionGraphics(
|
|
|
1497
1495
|
billboard.image = undefined;
|
|
1498
1496
|
}
|
|
1499
1497
|
|
|
1500
|
-
let scale = 1.0;
|
|
1501
1498
|
if (defined(billboard.scale)) {
|
|
1502
|
-
scale = billboard.scale.getValue();
|
|
1499
|
+
const scale = billboard.scale.getValue();
|
|
1503
1500
|
if (scale !== 0) {
|
|
1504
1501
|
label.pixelOffset = new Cartesian2(scale * 16 + 1, 0);
|
|
1505
1502
|
} else {
|
|
@@ -3510,11 +3507,6 @@ function load(dataSource, entityCollection, data, options) {
|
|
|
3510
3507
|
* under the <code>kml</code> property.
|
|
3511
3508
|
* </p>
|
|
3512
3509
|
*
|
|
3513
|
-
* @alias KmlDataSource
|
|
3514
|
-
* @constructor
|
|
3515
|
-
*
|
|
3516
|
-
* @param {KmlDataSource.ConstructorOptions} [options] Object describing initialization options
|
|
3517
|
-
*
|
|
3518
3510
|
* @see {@link http://www.opengeospatial.org/standards/kml/|Open Geospatial Consortium KML Standard}
|
|
3519
3511
|
* @see {@link https://developers.google.com/kml/|Google KML Documentation}
|
|
3520
3512
|
*
|
|
@@ -3529,339 +3521,455 @@ function load(dataSource, entityCollection, data, options) {
|
|
|
3529
3521
|
* })
|
|
3530
3522
|
* );
|
|
3531
3523
|
*/
|
|
3532
|
-
|
|
3533
|
-
options = options ?? Frozen.EMPTY_OBJECT;
|
|
3534
|
-
const camera = options.camera;
|
|
3535
|
-
const canvas = options.canvas;
|
|
3536
|
-
|
|
3537
|
-
this._changed = new Event();
|
|
3538
|
-
this._error = new Event();
|
|
3539
|
-
this._loading = new Event();
|
|
3540
|
-
this._refresh = new Event();
|
|
3541
|
-
this._unsupportedNode = new Event();
|
|
3542
|
-
|
|
3543
|
-
this._clock = undefined;
|
|
3544
|
-
this._entityCollection = new EntityCollection(this);
|
|
3545
|
-
this._name = undefined;
|
|
3546
|
-
this._isLoading = false;
|
|
3547
|
-
this._pinBuilder = new PinBuilder();
|
|
3548
|
-
this._networkLinks = new AssociativeArray();
|
|
3549
|
-
this._entityCluster = new EntityCluster();
|
|
3550
|
-
|
|
3524
|
+
class KmlDataSource {
|
|
3551
3525
|
/**
|
|
3552
|
-
*
|
|
3553
|
-
* for client height and width.
|
|
3554
|
-
*
|
|
3555
|
-
* @type {HTMLCanvasElement | undefined}
|
|
3526
|
+
* @param {KmlDataSource.ConstructorOptions} [options] Object describing initialization options
|
|
3556
3527
|
*/
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3528
|
+
constructor(options) {
|
|
3529
|
+
options = options ?? Frozen.EMPTY_OBJECT;
|
|
3530
|
+
const camera = options.camera;
|
|
3531
|
+
const canvas = options.canvas;
|
|
3532
|
+
|
|
3533
|
+
this._changed = new Event();
|
|
3534
|
+
this._error = new Event();
|
|
3535
|
+
this._loading = new Event();
|
|
3536
|
+
this._refresh = new Event();
|
|
3537
|
+
this._unsupportedNode = new Event();
|
|
3538
|
+
|
|
3539
|
+
this._clock = undefined;
|
|
3540
|
+
this._entityCollection = new EntityCollection(this);
|
|
3541
|
+
this._name = undefined;
|
|
3542
|
+
this._isLoading = false;
|
|
3543
|
+
this._pinBuilder = new PinBuilder();
|
|
3544
|
+
this._networkLinks = new AssociativeArray();
|
|
3545
|
+
this._entityCluster = new EntityCluster();
|
|
3546
|
+
|
|
3547
|
+
/**
|
|
3548
|
+
* The current size of this Canvas will be used to populate the Link parameters
|
|
3549
|
+
* for client height and width.
|
|
3550
|
+
*
|
|
3551
|
+
* @type {HTMLCanvasElement | undefined}
|
|
3552
|
+
*/
|
|
3553
|
+
this.canvas = canvas;
|
|
3554
|
+
|
|
3555
|
+
/**
|
|
3556
|
+
* The position and orientation of this {@link Camera} will be used to
|
|
3557
|
+
* populate various camera parameters when making network requests.
|
|
3558
|
+
* Camera movement will determine when to trigger NetworkLink refresh if
|
|
3559
|
+
* <code>viewRefreshMode</code> is <code>onStop</code>.
|
|
3560
|
+
*
|
|
3561
|
+
* @type {Camera | undefined}
|
|
3562
|
+
*/
|
|
3563
|
+
this.camera = camera;
|
|
3564
|
+
|
|
3565
|
+
this._lastCameraView = {
|
|
3566
|
+
position: defined(camera)
|
|
3567
|
+
? Cartesian3.clone(camera.positionWC)
|
|
3568
|
+
: undefined,
|
|
3569
|
+
direction: defined(camera)
|
|
3570
|
+
? Cartesian3.clone(camera.directionWC)
|
|
3571
|
+
: undefined,
|
|
3572
|
+
up: defined(camera) ? Cartesian3.clone(camera.upWC) : undefined,
|
|
3573
|
+
bbox: defined(camera)
|
|
3574
|
+
? camera.computeViewRectangle()
|
|
3575
|
+
: Rectangle.clone(Rectangle.MAX_VALUE),
|
|
3576
|
+
};
|
|
3579
3577
|
|
|
3580
|
-
|
|
3578
|
+
this._ellipsoid = options.ellipsoid ?? Ellipsoid.default;
|
|
3581
3579
|
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3580
|
+
// User specified credit
|
|
3581
|
+
let credit = options.credit;
|
|
3582
|
+
if (typeof credit === "string") {
|
|
3583
|
+
credit = new Credit(credit);
|
|
3584
|
+
}
|
|
3585
|
+
this._credit = credit;
|
|
3588
3586
|
|
|
3589
|
-
|
|
3590
|
-
|
|
3587
|
+
// Create a list of Credit's from the resource that the user can't remove
|
|
3588
|
+
this._resourceCredits = [];
|
|
3591
3589
|
|
|
3592
|
-
|
|
3590
|
+
this._kmlTours = [];
|
|
3593
3591
|
|
|
3594
|
-
|
|
3595
|
-
}
|
|
3592
|
+
this._screenOverlays = [];
|
|
3593
|
+
}
|
|
3596
3594
|
|
|
3597
|
-
/**
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
}
|
|
3595
|
+
/**
|
|
3596
|
+
* Creates a Promise to a new instance loaded with the provided KML data.
|
|
3597
|
+
*
|
|
3598
|
+
* @param {Resource|string|Document|Blob} data A url, parsed KML document, or Blob containing binary KMZ data or a parsed KML document.
|
|
3599
|
+
* @param {KmlDataSource.ConstructorOptions} [options] An object specifying configuration options
|
|
3600
|
+
*
|
|
3601
|
+
* @returns {Promise<KmlDataSource>} A promise that will resolve to a new KmlDataSource instance once the KML is loaded.
|
|
3602
|
+
*/
|
|
3603
|
+
static load(data, options) {
|
|
3604
|
+
options = options ?? Frozen.EMPTY_OBJECT;
|
|
3605
|
+
const dataSource = new KmlDataSource(options);
|
|
3606
|
+
return dataSource.load(data, options);
|
|
3607
|
+
}
|
|
3610
3608
|
|
|
3611
|
-
Object.defineProperties(KmlDataSource.prototype, {
|
|
3612
3609
|
/**
|
|
3613
3610
|
* Gets or sets a human-readable name for this instance.
|
|
3614
3611
|
* This will be automatically be set to the KML document name on load.
|
|
3615
|
-
* @memberof KmlDataSource.prototype
|
|
3616
3612
|
* @type {string}
|
|
3617
3613
|
*/
|
|
3618
|
-
name
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3614
|
+
get name() {
|
|
3615
|
+
return this._name;
|
|
3616
|
+
}
|
|
3617
|
+
|
|
3618
|
+
set name(value) {
|
|
3619
|
+
if (this._name !== value) {
|
|
3620
|
+
this._name = value;
|
|
3621
|
+
this._changed.raiseEvent(this);
|
|
3622
|
+
}
|
|
3623
|
+
}
|
|
3624
|
+
|
|
3629
3625
|
/**
|
|
3630
3626
|
* Gets the clock settings defined by the loaded KML. This represents the total
|
|
3631
3627
|
* availability interval for all time-dynamic data. If the KML does not contain
|
|
3632
3628
|
* time-dynamic data, this value is undefined.
|
|
3633
|
-
* @memberof KmlDataSource.prototype
|
|
3634
3629
|
* @type {DataSourceClock}
|
|
3635
3630
|
*/
|
|
3636
|
-
clock
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
},
|
|
3631
|
+
get clock() {
|
|
3632
|
+
return this._clock;
|
|
3633
|
+
}
|
|
3634
|
+
|
|
3641
3635
|
/**
|
|
3642
3636
|
* Gets the collection of {@link Entity} instances.
|
|
3643
|
-
* @memberof KmlDataSource.prototype
|
|
3644
3637
|
* @type {EntityCollection}
|
|
3645
3638
|
*/
|
|
3646
|
-
entities
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
},
|
|
3639
|
+
get entities() {
|
|
3640
|
+
return this._entityCollection;
|
|
3641
|
+
}
|
|
3642
|
+
|
|
3651
3643
|
/**
|
|
3652
3644
|
* Gets a value indicating if the data source is currently loading data.
|
|
3653
|
-
* @memberof KmlDataSource.prototype
|
|
3654
3645
|
* @type {boolean}
|
|
3655
3646
|
*/
|
|
3656
|
-
isLoading
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
},
|
|
3647
|
+
get isLoading() {
|
|
3648
|
+
return this._isLoading;
|
|
3649
|
+
}
|
|
3650
|
+
|
|
3661
3651
|
/**
|
|
3662
3652
|
* Gets an event that will be raised when the underlying data changes.
|
|
3663
|
-
* @memberof KmlDataSource.prototype
|
|
3664
3653
|
* @type {Event}
|
|
3665
3654
|
*/
|
|
3666
|
-
changedEvent
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
},
|
|
3655
|
+
get changedEvent() {
|
|
3656
|
+
return this._changed;
|
|
3657
|
+
}
|
|
3658
|
+
|
|
3671
3659
|
/**
|
|
3672
3660
|
* Gets an event that will be raised if an error is encountered during processing.
|
|
3673
|
-
* @memberof KmlDataSource.prototype
|
|
3674
3661
|
* @type {Event}
|
|
3675
3662
|
*/
|
|
3676
|
-
errorEvent
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3680
|
-
},
|
|
3663
|
+
get errorEvent() {
|
|
3664
|
+
return this._error;
|
|
3665
|
+
}
|
|
3666
|
+
|
|
3681
3667
|
/**
|
|
3682
3668
|
* Gets an event that will be raised when the data source either starts or stops loading.
|
|
3683
|
-
* @memberof KmlDataSource.prototype
|
|
3684
3669
|
* @type {Event}
|
|
3685
3670
|
*/
|
|
3686
|
-
loadingEvent
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
},
|
|
3671
|
+
get loadingEvent() {
|
|
3672
|
+
return this._loading;
|
|
3673
|
+
}
|
|
3674
|
+
|
|
3691
3675
|
/**
|
|
3692
3676
|
* Gets an event that will be raised when the data source refreshes a network link.
|
|
3693
|
-
* @memberof KmlDataSource.prototype
|
|
3694
3677
|
* @type {Event}
|
|
3695
3678
|
*/
|
|
3696
|
-
refreshEvent
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
},
|
|
3679
|
+
get refreshEvent() {
|
|
3680
|
+
return this._refresh;
|
|
3681
|
+
}
|
|
3682
|
+
|
|
3701
3683
|
/**
|
|
3702
3684
|
* Gets an event that will be raised when the data source finds an unsupported node type.
|
|
3703
|
-
* @memberof KmlDataSource.prototype
|
|
3704
3685
|
* @type {Event}
|
|
3705
3686
|
*/
|
|
3706
|
-
unsupportedNodeEvent
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
},
|
|
3687
|
+
get unsupportedNodeEvent() {
|
|
3688
|
+
return this._unsupportedNode;
|
|
3689
|
+
}
|
|
3690
|
+
|
|
3711
3691
|
/**
|
|
3712
3692
|
* Gets whether or not this data source should be displayed.
|
|
3713
|
-
* @memberof KmlDataSource.prototype
|
|
3714
3693
|
* @type {boolean}
|
|
3715
3694
|
*/
|
|
3716
|
-
show
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
},
|
|
3695
|
+
get show() {
|
|
3696
|
+
return this._entityCollection.show;
|
|
3697
|
+
}
|
|
3698
|
+
|
|
3699
|
+
set show(value) {
|
|
3700
|
+
this._entityCollection.show = value;
|
|
3701
|
+
}
|
|
3724
3702
|
|
|
3725
3703
|
/**
|
|
3726
3704
|
* Gets or sets the clustering options for this data source. This object can be shared between multiple data sources.
|
|
3727
3705
|
*
|
|
3728
|
-
* @memberof KmlDataSource.prototype
|
|
3729
3706
|
* @type {EntityCluster}
|
|
3730
3707
|
*/
|
|
3731
|
-
clustering
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3708
|
+
get clustering() {
|
|
3709
|
+
return this._entityCluster;
|
|
3710
|
+
}
|
|
3711
|
+
|
|
3712
|
+
set clustering(value) {
|
|
3713
|
+
//>>includeStart('debug', pragmas.debug);
|
|
3714
|
+
if (!defined(value)) {
|
|
3715
|
+
throw new DeveloperError("value must be defined.");
|
|
3716
|
+
}
|
|
3717
|
+
//>>includeEnd('debug');
|
|
3718
|
+
this._entityCluster = value;
|
|
3719
|
+
}
|
|
3720
|
+
|
|
3744
3721
|
/**
|
|
3745
3722
|
* Gets the credit that will be displayed for the data source
|
|
3746
|
-
* @memberof KmlDataSource.prototype
|
|
3747
3723
|
* @type {Credit}
|
|
3748
3724
|
*/
|
|
3749
|
-
credit
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
},
|
|
3725
|
+
get credit() {
|
|
3726
|
+
return this._credit;
|
|
3727
|
+
}
|
|
3728
|
+
|
|
3754
3729
|
/**
|
|
3755
3730
|
* Gets the KML Tours that are used to guide the camera to specified destinations on given time intervals.
|
|
3756
|
-
* @memberof KmlDataSource.prototype
|
|
3757
3731
|
* @type {KmlTour[]}
|
|
3758
3732
|
*/
|
|
3759
|
-
kmlTours
|
|
3760
|
-
|
|
3761
|
-
return this._kmlTours;
|
|
3762
|
-
},
|
|
3763
|
-
},
|
|
3764
|
-
});
|
|
3765
|
-
|
|
3766
|
-
/**
|
|
3767
|
-
* Asynchronously loads the provided KML data, replacing any existing data.
|
|
3768
|
-
*
|
|
3769
|
-
* @param {Resource|string|Document|Blob} data A url, parsed KML document, or Blob containing binary KMZ data or a parsed KML document.
|
|
3770
|
-
* @param {KmlDataSource.LoadOptions} [options] An object specifying configuration options
|
|
3771
|
-
*
|
|
3772
|
-
* @returns {Promise<KmlDataSource>} A promise that will resolve to this instances once the KML is loaded.
|
|
3773
|
-
*/
|
|
3774
|
-
KmlDataSource.prototype.load = function (data, options) {
|
|
3775
|
-
//>>includeStart('debug', pragmas.debug);
|
|
3776
|
-
if (!defined(data)) {
|
|
3777
|
-
throw new DeveloperError("data is required.");
|
|
3733
|
+
get kmlTours() {
|
|
3734
|
+
return this._kmlTours;
|
|
3778
3735
|
}
|
|
3779
|
-
//>>includeEnd('debug');
|
|
3780
3736
|
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3737
|
+
/**
|
|
3738
|
+
* Asynchronously loads the provided KML data, replacing any existing data.
|
|
3739
|
+
*
|
|
3740
|
+
* @param {Resource|string|Document|Blob} data A url, parsed KML document, or Blob containing binary KMZ data or a parsed KML document.
|
|
3741
|
+
* @param {KmlDataSource.LoadOptions} [options] An object specifying configuration options
|
|
3742
|
+
*
|
|
3743
|
+
* @returns {Promise<KmlDataSource>} A promise that will resolve to this instances once the KML is loaded.
|
|
3744
|
+
*/
|
|
3745
|
+
load(data, options) {
|
|
3746
|
+
//>>includeStart('debug', pragmas.debug);
|
|
3747
|
+
if (!defined(data)) {
|
|
3748
|
+
throw new DeveloperError("data is required.");
|
|
3749
|
+
}
|
|
3750
|
+
//>>includeEnd('debug');
|
|
3751
|
+
|
|
3752
|
+
options = options ?? Frozen.EMPTY_OBJECT;
|
|
3753
|
+
DataSource.setLoading(this, true);
|
|
3754
|
+
|
|
3755
|
+
const oldName = this._name;
|
|
3756
|
+
this._name = undefined;
|
|
3757
|
+
this._clampToGround = options.clampToGround ?? false;
|
|
3758
|
+
|
|
3759
|
+
const that = this;
|
|
3760
|
+
return load(this, this._entityCollection, data, options)
|
|
3761
|
+
.then(function () {
|
|
3762
|
+
let clock;
|
|
3763
|
+
|
|
3764
|
+
const availability = that._entityCollection.computeAvailability();
|
|
3765
|
+
|
|
3766
|
+
let start = availability.start;
|
|
3767
|
+
let stop = availability.stop;
|
|
3768
|
+
const isMinStart = JulianDate.equals(start, Iso8601.MINIMUM_VALUE);
|
|
3769
|
+
const isMaxStop = JulianDate.equals(stop, Iso8601.MAXIMUM_VALUE);
|
|
3770
|
+
if (!isMinStart || !isMaxStop) {
|
|
3771
|
+
let date;
|
|
3772
|
+
|
|
3773
|
+
//If start is min time just start at midnight this morning, local time
|
|
3774
|
+
if (isMinStart) {
|
|
3775
|
+
date = new Date();
|
|
3776
|
+
date.setHours(0, 0, 0, 0);
|
|
3777
|
+
start = JulianDate.fromDate(date);
|
|
3778
|
+
}
|
|
3779
|
+
|
|
3780
|
+
//If stop is max value just stop at midnight tonight, local time
|
|
3781
|
+
if (isMaxStop) {
|
|
3782
|
+
date = new Date();
|
|
3783
|
+
date.setHours(24, 0, 0, 0);
|
|
3784
|
+
stop = JulianDate.fromDate(date);
|
|
3785
|
+
}
|
|
3786
|
+
|
|
3787
|
+
clock = new DataSourceClock();
|
|
3788
|
+
clock.startTime = start;
|
|
3789
|
+
clock.stopTime = stop;
|
|
3790
|
+
clock.currentTime = JulianDate.clone(start);
|
|
3791
|
+
clock.clockRange = ClockRange.LOOP_STOP;
|
|
3792
|
+
clock.clockStep = ClockStep.SYSTEM_CLOCK_MULTIPLIER;
|
|
3793
|
+
clock.multiplier = Math.round(
|
|
3794
|
+
Math.min(
|
|
3795
|
+
Math.max(JulianDate.secondsDifference(stop, start) / 60, 1),
|
|
3796
|
+
3.15569e7,
|
|
3797
|
+
),
|
|
3798
|
+
);
|
|
3807
3799
|
}
|
|
3808
3800
|
|
|
3809
|
-
|
|
3810
|
-
if (
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
stop = JulianDate.fromDate(date);
|
|
3801
|
+
let changed = false;
|
|
3802
|
+
if (clock !== that._clock) {
|
|
3803
|
+
that._clock = clock;
|
|
3804
|
+
changed = true;
|
|
3814
3805
|
}
|
|
3815
3806
|
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
clock.currentTime = JulianDate.clone(start);
|
|
3820
|
-
clock.clockRange = ClockRange.LOOP_STOP;
|
|
3821
|
-
clock.clockStep = ClockStep.SYSTEM_CLOCK_MULTIPLIER;
|
|
3822
|
-
clock.multiplier = Math.round(
|
|
3823
|
-
Math.min(
|
|
3824
|
-
Math.max(JulianDate.secondsDifference(stop, start) / 60, 1),
|
|
3825
|
-
3.15569e7,
|
|
3826
|
-
),
|
|
3827
|
-
);
|
|
3828
|
-
}
|
|
3807
|
+
if (oldName !== that._name) {
|
|
3808
|
+
changed = true;
|
|
3809
|
+
}
|
|
3829
3810
|
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3811
|
+
if (changed) {
|
|
3812
|
+
that._changed.raiseEvent(that);
|
|
3813
|
+
}
|
|
3814
|
+
|
|
3815
|
+
DataSource.setLoading(that, false);
|
|
3816
|
+
|
|
3817
|
+
return that;
|
|
3818
|
+
})
|
|
3819
|
+
.catch(function (error) {
|
|
3820
|
+
DataSource.setLoading(that, false);
|
|
3821
|
+
that._error.raiseEvent(that, error);
|
|
3822
|
+
console.log(error);
|
|
3823
|
+
return Promise.reject(error);
|
|
3824
|
+
});
|
|
3825
|
+
}
|
|
3826
|
+
|
|
3827
|
+
/**
|
|
3828
|
+
* Cleans up any non-entity elements created by the data source. Currently this only affects ScreenOverlay elements.
|
|
3829
|
+
*/
|
|
3830
|
+
destroy() {
|
|
3831
|
+
while (this._screenOverlays.length > 0) {
|
|
3832
|
+
const elem = this._screenOverlays.pop();
|
|
3833
|
+
elem.remove();
|
|
3834
|
+
}
|
|
3835
|
+
}
|
|
3835
3836
|
|
|
3836
|
-
|
|
3837
|
-
|
|
3837
|
+
/**
|
|
3838
|
+
* Updates any NetworkLink that require updating.
|
|
3839
|
+
*
|
|
3840
|
+
* @param {JulianDate} time The simulation time.
|
|
3841
|
+
* @returns {boolean} True if this data source is ready to be displayed at the provided time, false otherwise.
|
|
3842
|
+
*/
|
|
3843
|
+
update(time) {
|
|
3844
|
+
const networkLinks = this._networkLinks;
|
|
3845
|
+
if (networkLinks.length === 0) {
|
|
3846
|
+
return true;
|
|
3847
|
+
}
|
|
3848
|
+
|
|
3849
|
+
const now = JulianDate.now();
|
|
3850
|
+
const that = this;
|
|
3851
|
+
|
|
3852
|
+
entitiesToIgnore.removeAll();
|
|
3853
|
+
|
|
3854
|
+
function recurseIgnoreEntities(entity) {
|
|
3855
|
+
const children = entity._children;
|
|
3856
|
+
const count = children.length;
|
|
3857
|
+
for (let i = 0; i < count; ++i) {
|
|
3858
|
+
const child = children[i];
|
|
3859
|
+
entitiesToIgnore.set(child.id, child);
|
|
3860
|
+
recurseIgnoreEntities(child);
|
|
3838
3861
|
}
|
|
3862
|
+
}
|
|
3863
|
+
|
|
3864
|
+
let cameraViewUpdate = false;
|
|
3865
|
+
const lastCameraView = this._lastCameraView;
|
|
3866
|
+
const camera = this.camera;
|
|
3867
|
+
if (
|
|
3868
|
+
defined(camera) &&
|
|
3869
|
+
!(
|
|
3870
|
+
camera.positionWC.equalsEpsilon(
|
|
3871
|
+
lastCameraView.position,
|
|
3872
|
+
CesiumMath.EPSILON7,
|
|
3873
|
+
) &&
|
|
3874
|
+
camera.directionWC.equalsEpsilon(
|
|
3875
|
+
lastCameraView.direction,
|
|
3876
|
+
CesiumMath.EPSILON7,
|
|
3877
|
+
) &&
|
|
3878
|
+
camera.upWC.equalsEpsilon(lastCameraView.up, CesiumMath.EPSILON7)
|
|
3879
|
+
)
|
|
3880
|
+
) {
|
|
3881
|
+
// Camera has changed so update the last view
|
|
3882
|
+
lastCameraView.position = Cartesian3.clone(camera.positionWC);
|
|
3883
|
+
lastCameraView.direction = Cartesian3.clone(camera.directionWC);
|
|
3884
|
+
lastCameraView.up = Cartesian3.clone(camera.upWC);
|
|
3885
|
+
lastCameraView.bbox = camera.computeViewRectangle();
|
|
3886
|
+
cameraViewUpdate = true;
|
|
3887
|
+
}
|
|
3839
3888
|
|
|
3840
|
-
|
|
3841
|
-
|
|
3889
|
+
const newNetworkLinks = new AssociativeArray();
|
|
3890
|
+
let changed = false;
|
|
3891
|
+
networkLinks.values.forEach(function (networkLink) {
|
|
3892
|
+
const entity = networkLink.entity;
|
|
3893
|
+
if (entitiesToIgnore.contains(entity.id)) {
|
|
3894
|
+
return;
|
|
3842
3895
|
}
|
|
3843
3896
|
|
|
3844
|
-
|
|
3897
|
+
if (!networkLink.updating) {
|
|
3898
|
+
let doUpdate = false;
|
|
3899
|
+
if (networkLink.refreshMode === RefreshMode.INTERVAL) {
|
|
3900
|
+
if (
|
|
3901
|
+
JulianDate.secondsDifference(now, networkLink.lastUpdated) >
|
|
3902
|
+
networkLink.time
|
|
3903
|
+
) {
|
|
3904
|
+
doUpdate = true;
|
|
3905
|
+
}
|
|
3906
|
+
} else if (networkLink.refreshMode === RefreshMode.EXPIRE) {
|
|
3907
|
+
if (JulianDate.greaterThan(now, networkLink.time)) {
|
|
3908
|
+
doUpdate = true;
|
|
3909
|
+
}
|
|
3910
|
+
} else if (networkLink.refreshMode === RefreshMode.STOP) {
|
|
3911
|
+
if (cameraViewUpdate) {
|
|
3912
|
+
networkLink.needsUpdate = true;
|
|
3913
|
+
networkLink.cameraUpdateTime = now;
|
|
3914
|
+
}
|
|
3845
3915
|
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3916
|
+
if (
|
|
3917
|
+
networkLink.needsUpdate &&
|
|
3918
|
+
JulianDate.secondsDifference(now, networkLink.cameraUpdateTime) >=
|
|
3919
|
+
networkLink.time
|
|
3920
|
+
) {
|
|
3921
|
+
doUpdate = true;
|
|
3922
|
+
}
|
|
3923
|
+
}
|
|
3924
|
+
|
|
3925
|
+
if (doUpdate) {
|
|
3926
|
+
recurseIgnoreEntities(entity);
|
|
3927
|
+
networkLink.updating = true;
|
|
3928
|
+
const newEntityCollection = new EntityCollection();
|
|
3929
|
+
const href = networkLink.href.clone();
|
|
3930
|
+
|
|
3931
|
+
href.setQueryParameters(networkLink.cookie);
|
|
3932
|
+
const ellipsoid = that._ellipsoid ?? Ellipsoid.default;
|
|
3933
|
+
processNetworkLinkQueryString(
|
|
3934
|
+
href,
|
|
3935
|
+
that.camera,
|
|
3936
|
+
that.canvas,
|
|
3937
|
+
networkLink.viewBoundScale,
|
|
3938
|
+
lastCameraView.bbox,
|
|
3939
|
+
ellipsoid,
|
|
3940
|
+
);
|
|
3941
|
+
|
|
3942
|
+
load(that, newEntityCollection, href, {
|
|
3943
|
+
context: entity.id,
|
|
3944
|
+
})
|
|
3945
|
+
.then(
|
|
3946
|
+
getNetworkLinkUpdateCallback(
|
|
3947
|
+
that,
|
|
3948
|
+
networkLink,
|
|
3949
|
+
newEntityCollection,
|
|
3950
|
+
newNetworkLinks,
|
|
3951
|
+
href,
|
|
3952
|
+
),
|
|
3953
|
+
)
|
|
3954
|
+
.catch(function (error) {
|
|
3955
|
+
const msg = `NetworkLink ${networkLink.href} refresh failed: ${error}`;
|
|
3956
|
+
console.log(msg);
|
|
3957
|
+
that._error.raiseEvent(that, msg);
|
|
3958
|
+
});
|
|
3959
|
+
changed = true;
|
|
3960
|
+
}
|
|
3961
|
+
}
|
|
3962
|
+
newNetworkLinks.set(networkLink.id, networkLink);
|
|
3853
3963
|
});
|
|
3854
|
-
};
|
|
3855
3964
|
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
elem.remove();
|
|
3965
|
+
if (changed) {
|
|
3966
|
+
this._networkLinks = newNetworkLinks;
|
|
3967
|
+
this._changed.raiseEvent(this);
|
|
3968
|
+
}
|
|
3969
|
+
|
|
3970
|
+
return true;
|
|
3863
3971
|
}
|
|
3864
|
-
}
|
|
3972
|
+
}
|
|
3865
3973
|
|
|
3866
3974
|
function mergeAvailabilityWithParent(child) {
|
|
3867
3975
|
const parent = child.parent;
|
|
@@ -4035,211 +4143,75 @@ function getNetworkLinkUpdateCallback(
|
|
|
4035
4143
|
const entitiesToIgnore = new AssociativeArray();
|
|
4036
4144
|
|
|
4037
4145
|
/**
|
|
4038
|
-
*
|
|
4039
|
-
*
|
|
4040
|
-
* @
|
|
4041
|
-
* @
|
|
4146
|
+
* @typedef KmlFeatureData.Author
|
|
4147
|
+
* @type {object}
|
|
4148
|
+
* @property {string} name Gets the name.
|
|
4149
|
+
* @property {string} uri Gets the URI.
|
|
4150
|
+
* @property {number} age Gets the email.
|
|
4042
4151
|
*/
|
|
4043
|
-
KmlDataSource.prototype.update = function (time) {
|
|
4044
|
-
const networkLinks = this._networkLinks;
|
|
4045
|
-
if (networkLinks.length === 0) {
|
|
4046
|
-
return true;
|
|
4047
|
-
}
|
|
4048
|
-
|
|
4049
|
-
const now = JulianDate.now();
|
|
4050
|
-
const that = this;
|
|
4051
|
-
|
|
4052
|
-
entitiesToIgnore.removeAll();
|
|
4053
|
-
|
|
4054
|
-
function recurseIgnoreEntities(entity) {
|
|
4055
|
-
const children = entity._children;
|
|
4056
|
-
const count = children.length;
|
|
4057
|
-
for (let i = 0; i < count; ++i) {
|
|
4058
|
-
const child = children[i];
|
|
4059
|
-
entitiesToIgnore.set(child.id, child);
|
|
4060
|
-
recurseIgnoreEntities(child);
|
|
4061
|
-
}
|
|
4062
|
-
}
|
|
4063
|
-
|
|
4064
|
-
let cameraViewUpdate = false;
|
|
4065
|
-
const lastCameraView = this._lastCameraView;
|
|
4066
|
-
const camera = this.camera;
|
|
4067
|
-
if (
|
|
4068
|
-
defined(camera) &&
|
|
4069
|
-
!(
|
|
4070
|
-
camera.positionWC.equalsEpsilon(
|
|
4071
|
-
lastCameraView.position,
|
|
4072
|
-
CesiumMath.EPSILON7,
|
|
4073
|
-
) &&
|
|
4074
|
-
camera.directionWC.equalsEpsilon(
|
|
4075
|
-
lastCameraView.direction,
|
|
4076
|
-
CesiumMath.EPSILON7,
|
|
4077
|
-
) &&
|
|
4078
|
-
camera.upWC.equalsEpsilon(lastCameraView.up, CesiumMath.EPSILON7)
|
|
4079
|
-
)
|
|
4080
|
-
) {
|
|
4081
|
-
// Camera has changed so update the last view
|
|
4082
|
-
lastCameraView.position = Cartesian3.clone(camera.positionWC);
|
|
4083
|
-
lastCameraView.direction = Cartesian3.clone(camera.directionWC);
|
|
4084
|
-
lastCameraView.up = Cartesian3.clone(camera.upWC);
|
|
4085
|
-
lastCameraView.bbox = camera.computeViewRectangle();
|
|
4086
|
-
cameraViewUpdate = true;
|
|
4087
|
-
}
|
|
4088
|
-
|
|
4089
|
-
const newNetworkLinks = new AssociativeArray();
|
|
4090
|
-
let changed = false;
|
|
4091
|
-
networkLinks.values.forEach(function (networkLink) {
|
|
4092
|
-
const entity = networkLink.entity;
|
|
4093
|
-
if (entitiesToIgnore.contains(entity.id)) {
|
|
4094
|
-
return;
|
|
4095
|
-
}
|
|
4096
|
-
|
|
4097
|
-
if (!networkLink.updating) {
|
|
4098
|
-
let doUpdate = false;
|
|
4099
|
-
if (networkLink.refreshMode === RefreshMode.INTERVAL) {
|
|
4100
|
-
if (
|
|
4101
|
-
JulianDate.secondsDifference(now, networkLink.lastUpdated) >
|
|
4102
|
-
networkLink.time
|
|
4103
|
-
) {
|
|
4104
|
-
doUpdate = true;
|
|
4105
|
-
}
|
|
4106
|
-
} else if (networkLink.refreshMode === RefreshMode.EXPIRE) {
|
|
4107
|
-
if (JulianDate.greaterThan(now, networkLink.time)) {
|
|
4108
|
-
doUpdate = true;
|
|
4109
|
-
}
|
|
4110
|
-
} else if (networkLink.refreshMode === RefreshMode.STOP) {
|
|
4111
|
-
if (cameraViewUpdate) {
|
|
4112
|
-
networkLink.needsUpdate = true;
|
|
4113
|
-
networkLink.cameraUpdateTime = now;
|
|
4114
|
-
}
|
|
4115
|
-
|
|
4116
|
-
if (
|
|
4117
|
-
networkLink.needsUpdate &&
|
|
4118
|
-
JulianDate.secondsDifference(now, networkLink.cameraUpdateTime) >=
|
|
4119
|
-
networkLink.time
|
|
4120
|
-
) {
|
|
4121
|
-
doUpdate = true;
|
|
4122
|
-
}
|
|
4123
|
-
}
|
|
4124
|
-
|
|
4125
|
-
if (doUpdate) {
|
|
4126
|
-
recurseIgnoreEntities(entity);
|
|
4127
|
-
networkLink.updating = true;
|
|
4128
|
-
const newEntityCollection = new EntityCollection();
|
|
4129
|
-
const href = networkLink.href.clone();
|
|
4130
|
-
|
|
4131
|
-
href.setQueryParameters(networkLink.cookie);
|
|
4132
|
-
const ellipsoid = that._ellipsoid ?? Ellipsoid.default;
|
|
4133
|
-
processNetworkLinkQueryString(
|
|
4134
|
-
href,
|
|
4135
|
-
that.camera,
|
|
4136
|
-
that.canvas,
|
|
4137
|
-
networkLink.viewBoundScale,
|
|
4138
|
-
lastCameraView.bbox,
|
|
4139
|
-
ellipsoid,
|
|
4140
|
-
);
|
|
4141
|
-
|
|
4142
|
-
load(that, newEntityCollection, href, {
|
|
4143
|
-
context: entity.id,
|
|
4144
|
-
})
|
|
4145
|
-
.then(
|
|
4146
|
-
getNetworkLinkUpdateCallback(
|
|
4147
|
-
that,
|
|
4148
|
-
networkLink,
|
|
4149
|
-
newEntityCollection,
|
|
4150
|
-
newNetworkLinks,
|
|
4151
|
-
href,
|
|
4152
|
-
),
|
|
4153
|
-
)
|
|
4154
|
-
.catch(function (error) {
|
|
4155
|
-
const msg = `NetworkLink ${networkLink.href} refresh failed: ${error}`;
|
|
4156
|
-
console.log(msg);
|
|
4157
|
-
that._error.raiseEvent(that, msg);
|
|
4158
|
-
});
|
|
4159
|
-
changed = true;
|
|
4160
|
-
}
|
|
4161
|
-
}
|
|
4162
|
-
newNetworkLinks.set(networkLink.id, networkLink);
|
|
4163
|
-
});
|
|
4164
|
-
|
|
4165
|
-
if (changed) {
|
|
4166
|
-
this._networkLinks = newNetworkLinks;
|
|
4167
|
-
this._changed.raiseEvent(this);
|
|
4168
|
-
}
|
|
4169
|
-
|
|
4170
|
-
return true;
|
|
4171
|
-
};
|
|
4172
4152
|
|
|
4173
4153
|
/**
|
|
4174
4154
|
* Contains KML Feature data loaded into the <code>Entity.kml</code> property by {@link KmlDataSource}.
|
|
4175
|
-
* @alias KmlFeatureData
|
|
4176
|
-
* @constructor
|
|
4177
4155
|
*/
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
* @type {KmlFeatureData.Author}
|
|
4190
|
-
*/
|
|
4191
|
-
this.author = {
|
|
4192
|
-
name: undefined,
|
|
4193
|
-
uri: undefined,
|
|
4194
|
-
email: undefined,
|
|
4195
|
-
};
|
|
4196
|
-
|
|
4197
|
-
/**
|
|
4198
|
-
* @typedef KmlFeatureData.Link
|
|
4199
|
-
* @type {object}
|
|
4200
|
-
* @property {string} href Gets the href.
|
|
4201
|
-
* @property {string} hreflang Gets the language of the linked resource.
|
|
4202
|
-
* @property {string} rel Gets the link relation.
|
|
4203
|
-
* @property {string} type Gets the link type.
|
|
4204
|
-
* @property {string} title Gets the link title.
|
|
4205
|
-
* @property {string} length Gets the link length.
|
|
4206
|
-
*/
|
|
4156
|
+
class KmlFeatureData {
|
|
4157
|
+
constructor() {
|
|
4158
|
+
/**
|
|
4159
|
+
* Gets the atom syndication format author field.
|
|
4160
|
+
* @type {KmlFeatureData.Author}
|
|
4161
|
+
*/
|
|
4162
|
+
this.author = {
|
|
4163
|
+
name: undefined,
|
|
4164
|
+
uri: undefined,
|
|
4165
|
+
email: undefined,
|
|
4166
|
+
};
|
|
4207
4167
|
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4168
|
+
/**
|
|
4169
|
+
* @typedef KmlFeatureData.Link
|
|
4170
|
+
* @type {object}
|
|
4171
|
+
* @property {string} href Gets the href.
|
|
4172
|
+
* @property {string} hreflang Gets the language of the linked resource.
|
|
4173
|
+
* @property {string} rel Gets the link relation.
|
|
4174
|
+
* @property {string} type Gets the link type.
|
|
4175
|
+
* @property {string} title Gets the link title.
|
|
4176
|
+
* @property {string} length Gets the link length.
|
|
4177
|
+
*/
|
|
4178
|
+
|
|
4179
|
+
/**
|
|
4180
|
+
* Gets the link.
|
|
4181
|
+
* @type {KmlFeatureData.Link}
|
|
4182
|
+
*/
|
|
4183
|
+
this.link = {
|
|
4184
|
+
href: undefined,
|
|
4185
|
+
hreflang: undefined,
|
|
4186
|
+
rel: undefined,
|
|
4187
|
+
type: undefined,
|
|
4188
|
+
title: undefined,
|
|
4189
|
+
length: undefined,
|
|
4190
|
+
};
|
|
4220
4191
|
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4192
|
+
/**
|
|
4193
|
+
* Gets the unstructured address field.
|
|
4194
|
+
* @type {string}
|
|
4195
|
+
*/
|
|
4196
|
+
this.address = undefined;
|
|
4197
|
+
/**
|
|
4198
|
+
* Gets the phone number.
|
|
4199
|
+
* @type {string}
|
|
4200
|
+
*/
|
|
4201
|
+
this.phoneNumber = undefined;
|
|
4202
|
+
/**
|
|
4203
|
+
* Gets the snippet.
|
|
4204
|
+
* @type {string}
|
|
4205
|
+
*/
|
|
4206
|
+
this.snippet = undefined;
|
|
4207
|
+
/**
|
|
4208
|
+
* Gets the extended data, parsed into a JSON object.
|
|
4209
|
+
* Currently only the <code>Data</code> property is supported.
|
|
4210
|
+
* <code>SchemaData</code> and custom data are ignored.
|
|
4211
|
+
* @type {string}
|
|
4212
|
+
*/
|
|
4213
|
+
this.extendedData = undefined;
|
|
4214
|
+
}
|
|
4243
4215
|
}
|
|
4244
4216
|
|
|
4245
4217
|
// For testing
|