@cesium/engine 26.2.0 → 26.3.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 +656 -518
- package/Build/Workers/{chunk-FU4BGABC.js → chunk-2DKJSPYF.js} +14 -14
- package/Build/Workers/{chunk-NCL22ZUX.js → chunk-2PWVICP6.js} +1 -1
- package/Build/Workers/{chunk-ILME5BXA.js → chunk-2YY724ZX.js} +8 -8
- package/Build/Workers/{chunk-IJZJMIUY.js → chunk-4DMAXPKB.js} +11 -11
- package/Build/Workers/{chunk-IMBVP57H.js → chunk-4LRFYRBX.js} +2 -2
- package/Build/Workers/{chunk-76FDC45O.js → chunk-5JCZHJUU.js} +13 -13
- package/Build/Workers/{chunk-5LSOO2KD.js → chunk-5KG7KDDW.js} +7 -7
- package/Build/Workers/{chunk-UAZUP4I5.js → chunk-6BSNYZZG.js} +5 -5
- package/Build/Workers/{chunk-D6AY775A.js → chunk-6R6SGKYN.js} +6 -6
- package/Build/Workers/{chunk-3PSS3T43.js → chunk-6V2KDEHL.js} +4 -4
- package/Build/Workers/{chunk-GHXVQVUM.js → chunk-75BC2IHI.js} +7 -7
- package/Build/Workers/{chunk-SMTGMFBL.js → chunk-7SESBH2I.js} +4 -4
- package/Build/Workers/{chunk-NEFDMMLY.js → chunk-7WXBTNRV.js} +8 -8
- package/Build/Workers/{chunk-NXGQBQWE.js → chunk-A7SMPV6B.js} +12 -12
- package/Build/Workers/{chunk-O3XFXGPZ.js → chunk-ATSXKJ3L.js} +7 -7
- package/Build/Workers/{chunk-AHWAZRBV.js → chunk-B4AVL7VI.js} +1 -1
- package/Build/Workers/{chunk-OZGPS7FB.js → chunk-B7Q2WF6Q.js} +4 -4
- package/Build/Workers/{chunk-2RGJPWQX.js → chunk-BNDSDQ7D.js} +9 -9
- package/Build/Workers/{chunk-2Z4ZLVOD.js → chunk-CKK6CUXK.js} +6 -6
- package/Build/Workers/{chunk-FCP2QY4G.js → chunk-COKOYTRS.js} +5 -5
- package/Build/Workers/{chunk-6FZDPMTO.js → chunk-CQ4TZXAT.js} +6 -6
- package/Build/Workers/{chunk-HDL4HOXZ.js → chunk-DKSANM4A.js} +12 -12
- package/Build/Workers/{chunk-XCBZVTIV.js → chunk-DZK34ZVD.js} +1 -1
- package/Build/Workers/{chunk-N7CCOFLX.js → chunk-E7G32DWL.js} +1 -1
- package/Build/Workers/{chunk-XDWCTQCZ.js → chunk-EDETO6NY.js} +2 -2
- package/Build/Workers/{chunk-NSKZ6SBK.js → chunk-F34TJJLA.js} +14 -14
- package/Build/Workers/{chunk-GXWQZBAI.js → chunk-GLHDTTTO.js} +2 -2
- package/Build/Workers/{chunk-SJYSIOEM.js → chunk-GS7RY2DH.js} +11 -11
- package/Build/Workers/{chunk-5YPQBFRD.js → chunk-HDD3RFLT.js} +3 -3
- package/Build/Workers/{chunk-36NI5E6W.js → chunk-HDPNFEPP.js} +18 -18
- package/Build/Workers/{chunk-DSGLDRTI.js → chunk-JBJ6BRIM.js} +4 -4
- package/Build/Workers/{chunk-DZUFEE4L.js → chunk-JKTWW7IO.js} +5 -5
- package/Build/Workers/{chunk-O3DKEX7Q.js → chunk-JL4NWWQY.js} +5 -5
- package/Build/Workers/{chunk-I74ZH5LK.js → chunk-JMUUAW4X.js} +10 -10
- package/Build/Workers/{chunk-SXSP3JHS.js → chunk-KBGAHN5R.js} +1 -1
- package/Build/Workers/{chunk-GVA7XQI2.js → chunk-KEWK6VZL.js} +12 -12
- package/Build/Workers/{chunk-EOWDZN5S.js → chunk-L73K5UPP.js} +10 -10
- package/Build/Workers/{chunk-J73T2VOY.js → chunk-LL2SGJYH.js} +6 -6
- package/Build/Workers/{chunk-QFSSCLLZ.js → chunk-LYJUL4XQ.js} +6 -6
- package/Build/Workers/{chunk-MAAHFYPC.js → chunk-M6W46OAP.js} +7 -7
- package/Build/Workers/{chunk-FX3VEAIU.js → chunk-MDDKCLMF.js} +16 -16
- package/Build/Workers/{chunk-M6QKXVAU.js → chunk-MUW4DJV7.js} +17 -17
- package/Build/Workers/{chunk-EZGQPOIG.js → chunk-N5YK44FS.js} +5 -5
- package/Build/Workers/{chunk-27FWRTJI.js → chunk-NZQUP52G.js} +9 -9
- package/Build/Workers/{chunk-A62YI6S6.js → chunk-PKZA44LH.js} +4 -4
- package/Build/Workers/{chunk-7MM3N2VE.js → chunk-Q2JS5LCB.js} +17 -17
- package/Build/Workers/{chunk-KGXSYGBG.js → chunk-QTAEVUED.js} +13 -13
- package/Build/Workers/{chunk-KP5QD7WU.js → chunk-SEJIXZZ4.js} +10 -10
- package/Build/Workers/{chunk-PRWUMCXF.js → chunk-SL2HCFYW.js} +10 -10
- package/Build/Workers/{chunk-NJVBJG63.js → chunk-SLHK3KAR.js} +5 -5
- package/Build/Workers/{chunk-JKXV6PG5.js → chunk-UZY5XRL2.js} +1 -1
- package/Build/Workers/{chunk-LDRQSYBN.js → chunk-VRECSMG3.js} +2 -2
- package/Build/Workers/{chunk-NLLCQBX3.js → chunk-X27HKF5E.js} +2 -2
- package/Build/Workers/{chunk-B3QHNA4A.js → chunk-XBY3354M.js} +6 -6
- package/Build/Workers/{chunk-CRCGE4J4.js → chunk-XRZCS3HE.js} +8 -8
- package/Build/Workers/{chunk-XLQZNQ4Z.js → chunk-XSIUYAT6.js} +2 -2
- package/Build/Workers/{chunk-SA2A2AN5.js → chunk-Z2DW5NM2.js} +4 -4
- 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 +33 -33
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +31 -31
- package/Build/Workers/createCorridorGeometry.js +29 -29
- package/Build/Workers/createCorridorOutlineGeometry.js +28 -28
- 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 +22 -22
- package/Build/Workers/createPlaneGeometry.js +16 -16
- package/Build/Workers/createPlaneOutlineGeometry.js +15 -15
- package/Build/Workers/createPolygonGeometry.js +32 -32
- package/Build/Workers/createPolygonOutlineGeometry.js +30 -30
- package/Build/Workers/createPolylineGeometry.js +25 -25
- 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 +20 -20
- package/Build/Workers/createSimplePolylineGeometry.js +23 -23
- 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 +23 -23
- package/Build/Workers/decodeDraco.js +10 -10
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
- 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/Ion.js +1 -1
- package/Source/Core/IonResource.js +5 -0
- package/Source/Core/IonSnapGeometryType.js +59 -0
- package/Source/Core/IonSnapHeat.js +33 -0
- package/Source/Core/IonSnapMode.js +45 -0
- package/Source/Core/IonSnapParentGeometryType.js +52 -0
- package/Source/Core/IonSnapService.js +369 -0
- package/Source/Core/SnapService.js +63 -0
- package/Source/Core/VectorPipeline.js +139 -45
- package/Source/Core/VectorProvider.js +311 -71
- package/Source/Renderer/AutomaticUniforms.js +44 -2
- package/Source/Renderer/ShaderBuilder.js +1 -1
- package/Source/Renderer/UniformState.js +47 -1
- package/Source/Scene/ArcGisMapService.js +1 -1
- package/Source/Scene/BufferPointCollection.js +4 -7
- package/Source/Scene/BufferPolygonCollection.js +56 -27
- package/Source/Scene/BufferPolylineCollection.js +61 -8
- package/Source/Scene/BufferPolylineMaterial.js +6 -5
- package/Source/Scene/BufferPrimitiveCollection.js +199 -29
- package/Source/Scene/Cesium3DTile.js +12 -0
- package/Source/Scene/Cesium3DTileset.js +61 -8
- package/Source/Scene/Cesium3DTilesetBaseTraversal.js +15 -3
- package/Source/Scene/Cesium3DTilesetCache.js +15 -0
- package/Source/Scene/ClippingPolygon.js +154 -100
- package/Source/Scene/ClippingPolygonCollection.js +352 -694
- package/Source/Scene/CreditDisplay.js +62 -0
- package/Source/Scene/GeoJsonPrimitive.js +114 -24
- package/Source/Scene/GlobeSurfaceShaderSet.js +33 -54
- package/Source/Scene/GlobeSurfaceTile.js +14 -1
- package/Source/Scene/GlobeSurfaceTileProvider.js +232 -25
- package/Source/Scene/GltfLoader.js +56 -6
- package/Source/Scene/HeightReference.js +1 -1
- package/Source/Scene/MVTDataProvider.js +9 -0
- package/Source/Scene/Model/Model.js +242 -16
- package/Source/Scene/Model/Model3DTileContent.js +5 -0
- package/Source/Scene/Model/ModelClippingPolygonsPipelineStage.js +54 -19
- package/Source/Scene/Model/ModelRenderResources.js +2 -3
- package/Source/Scene/Model/ModelSceneGraph.js +10 -1
- package/Source/Scene/Model/ModelVectorLookupPipelineStage.js +205 -0
- package/Source/Scene/Model/PickingPipelineStage.js +4 -0
- package/Source/Scene/PostProcessStage.js +22 -3
- package/Source/Scene/Scene.js +56 -1
- package/Source/Scene/Snapping.js +57 -0
- package/Source/Scene/UrlTemplate3DTilesDataProvider.js +12 -1
- package/Source/Scene/VectorGltf3DTileContent.js +10 -2
- package/Source/Scene/WebMapServiceImageryProvider.js +5 -1
- package/Source/Scene/WebMapTileServiceImageryProvider.js +6 -1
- package/Source/Scene/renderBufferPolylineCollection.js +5 -1
- package/Source/Shaders/BufferPolylineMaterialVS.glsl +14 -2
- package/Source/Shaders/BufferPolylineMaterialVS.js +14 -2
- package/Source/Shaders/Builtin/CzmBuiltins.js +2 -4
- package/Source/Shaders/Builtin/Functions/eyeToCartographicDelta.glsl +74 -0
- package/Source/Shaders/Builtin/Functions/eyeToCartographicDelta.js +76 -0
- package/Source/Shaders/GlobeFS.glsl +10 -9
- package/Source/Shaders/GlobeFS.js +11 -9
- package/Source/Shaders/GlobeVS.glsl +0 -32
- package/Source/Shaders/GlobeVS.js +0 -32
- package/Source/Shaders/Model/ModelClippingPolygonsStageFS.glsl +15 -3
- package/Source/Shaders/Model/ModelClippingPolygonsStageFS.js +15 -3
- package/Source/Shaders/Model/ModelClippingPolygonsStageVS.glsl +20 -24
- package/Source/Shaders/Model/ModelClippingPolygonsStageVS.js +20 -24
- package/Source/Shaders/Model/ModelFS.glsl +4 -0
- package/Source/Shaders/Model/ModelFS.js +4 -0
- package/Source/Shaders/Model/ModelVS.glsl +7 -2
- package/Source/Shaders/Model/ModelVS.js +7 -2
- package/Source/Shaders/Model/ModelVectorLookupStageFS.glsl +6 -0
- package/Source/Shaders/Model/ModelVectorLookupStageFS.js +8 -0
- package/Source/Shaders/Model/ModelVectorLookupStageVS.glsl +15 -0
- package/Source/Shaders/Model/ModelVectorLookupStageVS.js +17 -0
- package/Source/Shaders/Model/VerticalExaggerationStageVS.glsl +9 -10
- package/Source/Shaders/Model/VerticalExaggerationStageVS.js +9 -11
- package/Source/Shaders/VectorCommon.glsl +177 -50
- package/Source/Shaders/VectorCommon.js +251 -19
- package/Source/ThirdParty/Workers/zip-web-worker.js +1 -1
- package/index.d.ts +556 -55
- package/index.js +20 -13
- package/package.json +6 -6
- package/Build/Workers/chunk-2EFYUSUY.js +0 -1483
- package/Build/Workers/chunk-2H5264K7.js +0 -1284
- package/Build/Workers/chunk-2H73KDBM.js +0 -511
- package/Build/Workers/chunk-2ZKH2QZB.js +0 -387
- package/Build/Workers/chunk-37SW7SYS.js +0 -778
- package/Build/Workers/chunk-3GHVJ3SO.js +0 -455
- package/Build/Workers/chunk-3LB4UVPU.js +0 -387
- package/Build/Workers/chunk-3PONLKEL.js +0 -778
- package/Build/Workers/chunk-3QR662HH.js +0 -3820
- package/Build/Workers/chunk-3SX2WYSO.js +0 -973
- package/Build/Workers/chunk-3UDN6LYX.js +0 -476
- package/Build/Workers/chunk-47MCBSXI.js +0 -9237
- package/Build/Workers/chunk-4E626OCE.js +0 -1067
- package/Build/Workers/chunk-4NW2MJKH.js +0 -455
- package/Build/Workers/chunk-52YK5BSN.js +0 -198
- package/Build/Workers/chunk-5RNAQZK6.js +0 -9234
- package/Build/Workers/chunk-6FHT43QR.js +0 -140
- package/Build/Workers/chunk-6HK6IXK2.js +0 -138
- package/Build/Workers/chunk-6R5X2GUA.js +0 -1284
- package/Build/Workers/chunk-6YR6JBMY.js +0 -163
- package/Build/Workers/chunk-7A2OGDHT.js +0 -305
- package/Build/Workers/chunk-7CGEQUM2.js +0 -305
- package/Build/Workers/chunk-7D2HZKH7.js +0 -455
- package/Build/Workers/chunk-7I325HV6.js +0 -1344
- package/Build/Workers/chunk-7KVKHY7O.js +0 -147
- package/Build/Workers/chunk-7TKLTCZW.js +0 -219
- package/Build/Workers/chunk-7UUKBDH6.js +0 -1054
- package/Build/Workers/chunk-7W6DUHAB.js +0 -693
- package/Build/Workers/chunk-7XM5JK5F.js +0 -162
- package/Build/Workers/chunk-7YG3ND3P.js +0 -454
- package/Build/Workers/chunk-A3O6EDBK.js +0 -73
- package/Build/Workers/chunk-A6X24AZI.js +0 -1992
- package/Build/Workers/chunk-A7TTWVTF.js +0 -2719
- package/Build/Workers/chunk-ACTVJHSP.js +0 -519
- package/Build/Workers/chunk-ADX3CBKD.js +0 -9234
- package/Build/Workers/chunk-AF7DTMJ7.js +0 -398
- package/Build/Workers/chunk-AJSFRY4U.js +0 -1344
- package/Build/Workers/chunk-ARZICEEP.js +0 -301
- package/Build/Workers/chunk-B4CQSLZJ.js +0 -305
- package/Build/Workers/chunk-BKPQFCXH.js +0 -511
- package/Build/Workers/chunk-BSPCI2LO.js +0 -959
- package/Build/Workers/chunk-BUJWSX5S.js +0 -301
- package/Build/Workers/chunk-C7JQVRLM.js +0 -497
- package/Build/Workers/chunk-C7QDUNI3.js +0 -138
- package/Build/Workers/chunk-CDJDJ5LK.js +0 -44
- package/Build/Workers/chunk-CEEZE3YZ.js +0 -476
- package/Build/Workers/chunk-CIV5DJOQ.js +0 -778
- package/Build/Workers/chunk-CLCTQVVL.js +0 -241
- package/Build/Workers/chunk-CQNFIAZU.js +0 -56
- package/Build/Workers/chunk-CUTRKXUQ.js +0 -288
- package/Build/Workers/chunk-DBD5WWG2.js +0 -959
- package/Build/Workers/chunk-DIGUUD6G.js +0 -171
- package/Build/Workers/chunk-DZBQUULR.js +0 -138
- package/Build/Workers/chunk-E2NKV5YT.js +0 -3820
- package/Build/Workers/chunk-E7NZJOK7.js +0 -3792
- package/Build/Workers/chunk-EB3Y5P3A.js +0 -368
- package/Build/Workers/chunk-EHTS2YPT.js +0 -2719
- package/Build/Workers/chunk-ELE6SC2C.js +0 -837
- package/Build/Workers/chunk-ENNFMWDW.js +0 -789
- package/Build/Workers/chunk-ERKUET22.js +0 -3201
- package/Build/Workers/chunk-F2IMBMZY.js +0 -241
- package/Build/Workers/chunk-F4CSNRZO.js +0 -219
- package/Build/Workers/chunk-FBP4DUQJ.js +0 -693
- package/Build/Workers/chunk-FDK4K5IA.js +0 -280
- package/Build/Workers/chunk-FGQFQHN5.js +0 -1054
- package/Build/Workers/chunk-FJWZMGOQ.js +0 -1992
- package/Build/Workers/chunk-FQ42MT7M.js +0 -58
- package/Build/Workers/chunk-GGNWQWSB.js +0 -301
- package/Build/Workers/chunk-GNKXEN4C.js +0 -682
- package/Build/Workers/chunk-GSWMAFTE.js +0 -9230
- package/Build/Workers/chunk-GXDHRC4J.js +0 -1344
- package/Build/Workers/chunk-GYSYP6PC.js +0 -1067
- package/Build/Workers/chunk-H2WCFXLP.js +0 -241
- package/Build/Workers/chunk-HHV3MCGV.js +0 -162
- package/Build/Workers/chunk-HLW2ZRVK.js +0 -368
- package/Build/Workers/chunk-HS6AD4P2.js +0 -398
- package/Build/Workers/chunk-HT6FASOT.js +0 -973
- package/Build/Workers/chunk-IDVHUDZT.js +0 -352
- package/Build/Workers/chunk-IGAZBTFZ.js +0 -3201
- package/Build/Workers/chunk-IOO7Z2AV.js +0 -57
- package/Build/Workers/chunk-IUIFLOYO.js +0 -44
- package/Build/Workers/chunk-JALGQYDY.js +0 -288
- package/Build/Workers/chunk-JW6OZT4R.js +0 -288
- package/Build/Workers/chunk-JXYLJCTC.js +0 -124
- package/Build/Workers/chunk-K27QOAW6.js +0 -97
- package/Build/Workers/chunk-KMV25A63.js +0 -789
- package/Build/Workers/chunk-KZWFWJML.js +0 -2719
- package/Build/Workers/chunk-LCXRRALY.js +0 -387
- package/Build/Workers/chunk-LD64RPYV.js +0 -368
- package/Build/Workers/chunk-LGNDTZVX.js +0 -97
- package/Build/Workers/chunk-LNSQVXFH.js +0 -1800
- package/Build/Workers/chunk-M4JZ6TSZ.js +0 -959
- package/Build/Workers/chunk-MCJDRDJQ.js +0 -102
- package/Build/Workers/chunk-MEENMEAH.js +0 -198
- package/Build/Workers/chunk-NAWU5RF4.js +0 -162
- package/Build/Workers/chunk-NIWITKQK.js +0 -693
- package/Build/Workers/chunk-OA6MYL2C.js +0 -837
- package/Build/Workers/chunk-OBEU25PI.js +0 -1067
- package/Build/Workers/chunk-OHP4ELS7.js +0 -198
- package/Build/Workers/chunk-PCL3Y7H5.js +0 -82
- package/Build/Workers/chunk-PD4GK4EM.js +0 -57
- package/Build/Workers/chunk-PEDU33QG.js +0 -2342
- package/Build/Workers/chunk-PVTSNNVI.js +0 -288
- package/Build/Workers/chunk-QHPZH22L.js +0 -241
- package/Build/Workers/chunk-QIZDWZK6.js +0 -301
- package/Build/Workers/chunk-QV6DG2YX.js +0 -1483
- package/Build/Workers/chunk-QVLAFFJY.js +0 -56
- package/Build/Workers/chunk-R4FPNAZ2.js +0 -352
- package/Build/Workers/chunk-R4K7EHOU.js +0 -171
- package/Build/Workers/chunk-R7JGHDD6.js +0 -789
- package/Build/Workers/chunk-RASQEYD4.js +0 -1483
- package/Build/Workers/chunk-RG4F5R57.js +0 -454
- package/Build/Workers/chunk-RW6ITX7Q.js +0 -3820
- package/Build/Workers/chunk-RYSQVJR6.js +0 -398
- package/Build/Workers/chunk-S6RJU5NM.js +0 -1054
- package/Build/Workers/chunk-SDFHDNS4.js +0 -147
- package/Build/Workers/chunk-SF6K72D7.js +0 -124
- package/Build/Workers/chunk-SGRGNDOD.js +0 -682
- package/Build/Workers/chunk-SM2CDCYF.js +0 -198
- package/Build/Workers/chunk-SS5ABQGY.js +0 -102
- package/Build/Workers/chunk-T5QBPLE3.js +0 -414
- package/Build/Workers/chunk-TN35HP5B.js +0 -1067
- package/Build/Workers/chunk-TNWKJNUZ.js +0 -454
- package/Build/Workers/chunk-TOAF47AQ.js +0 -102
- package/Build/Workers/chunk-TQ4QCOXT.js +0 -2719
- package/Build/Workers/chunk-TSDSILQB.js +0 -124
- package/Build/Workers/chunk-TVZD72WJ.js +0 -778
- package/Build/Workers/chunk-U5LV3F3Z.js +0 -1054
- package/Build/Workers/chunk-UEY73NRN.js +0 -38
- package/Build/Workers/chunk-UF46SZEZ.js +0 -789
- package/Build/Workers/chunk-UNRTMCET.js +0 -398
- package/Build/Workers/chunk-UTB7U3O6.js +0 -1992
- package/Build/Workers/chunk-UVO6COT2.js +0 -352
- package/Build/Workers/chunk-V46YGZE6.js +0 -352
- package/Build/Workers/chunk-VAL7DYNR.js +0 -278
- package/Build/Workers/chunk-VDGOCROW.js +0 -57
- package/Build/Workers/chunk-VFWSSBPT.js +0 -511
- package/Build/Workers/chunk-VVYMXI3I.js +0 -1284
- package/Build/Workers/chunk-VXWHPYQM.js +0 -837
- package/Build/Workers/chunk-VXYUBRSB.js +0 -219
- package/Build/Workers/chunk-VZLDLEWI.js +0 -387
- package/Build/Workers/chunk-W5OCKMPJ.js +0 -101
- package/Build/Workers/chunk-WBSY7HDY.js +0 -837
- package/Build/Workers/chunk-WN3F4CVG.js +0 -3201
- package/Build/Workers/chunk-WPRUWXGV.js +0 -693
- package/Build/Workers/chunk-WTO2ERBP.js +0 -414
- package/Build/Workers/chunk-WVHMDVG4.js +0 -959
- package/Build/Workers/chunk-XGA23TAX.js +0 -73
- package/Build/Workers/chunk-XLXSDIP5.js +0 -973
- package/Build/Workers/chunk-XQ3SKCMM.js +0 -140
- package/Build/Workers/chunk-XQH66YJC.js +0 -147
- package/Build/Workers/chunk-XTA7BXJG.js +0 -682
- package/Build/Workers/chunk-XTIDAFRS.js +0 -476
- package/Build/Workers/chunk-XUEDWBUD.js +0 -682
- package/Build/Workers/chunk-XYFLRH3H.js +0 -124
- package/Build/Workers/chunk-Y7JRTRTO.js +0 -305
- package/Build/Workers/chunk-Y7QSMDCJ.js +0 -352
- package/Build/Workers/chunk-YCB5TYTR.js +0 -1483
- package/Build/Workers/chunk-YEYOSTJX.js +0 -219
- package/Build/Workers/chunk-YGFVAGYF.js +0 -630
- package/Build/Workers/chunk-YIIACKQO.js +0 -368
- package/Build/Workers/chunk-YJGSP6PE.js +0 -511
- package/Build/Workers/chunk-YKU2Q3A2.js +0 -1287
- package/Build/Workers/chunk-Z4LR5EHE.js +0 -454
- package/Build/Workers/chunk-Z66EVE2A.js +0 -44
- package/Build/Workers/chunk-ZHIHHHTB.js +0 -414
- package/Build/Workers/chunk-ZMBHFYOX.js +0 -1344
- package/Build/Workers/chunk-ZNWHFSLE.js +0 -171
- package/Build/Workers/chunk-ZQLZG4IN.js +0 -2342
- package/Build/Workers/chunk-ZRTSMUZ2.js +0 -414
- package/Build/Workers/chunk-ZSGUV73H.js +0 -2342
- package/Build/Workers/chunk-ZZUVT5BM.js +0 -476
- package/Source/Shaders/Builtin/Functions/clipPolygons.glsl +0 -37
- package/Source/Shaders/Builtin/Functions/clipPolygons.js +0 -39
- package/Source/Shaders/Builtin/Functions/unpackClippingExtents.glsl +0 -14
- package/Source/Shaders/Builtin/Functions/unpackClippingExtents.js +0 -15
- package/Source/Shaders/PolygonSignedDistanceFS.glsl +0 -131
- package/Source/Shaders/PolygonSignedDistanceFS.js +0 -132
|
@@ -162,6 +162,29 @@ function styleLightboxContainer(that) {
|
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
+
/**
|
|
166
|
+
* Wraps a callback so that it also runs when a keyboard user activates an element
|
|
167
|
+
* with <code>Enter</code> or <code>Space</code>. Elements exposed as <code>role="button"</code>
|
|
168
|
+
* are expected to respond to both keys, which anchors without an <code>href</code> do not do natively.
|
|
169
|
+
*
|
|
170
|
+
* @param {Function} callback The function to invoke when the element is activated.
|
|
171
|
+
* @returns {Function} A <code>keydown</code> handler.
|
|
172
|
+
*
|
|
173
|
+
* @private
|
|
174
|
+
*/
|
|
175
|
+
function activateOnKeydown(callback) {
|
|
176
|
+
return function (event) {
|
|
177
|
+
if (event.key !== "Enter" && event.key !== " ") {
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
// Prevent Space from scrolling the page and stop the event from also
|
|
181
|
+
// reaching the overlay, which would immediately close the lightbox again.
|
|
182
|
+
event.preventDefault();
|
|
183
|
+
event.stopPropagation();
|
|
184
|
+
callback();
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
|
|
165
188
|
function appendCss(container) {
|
|
166
189
|
const style = /*css*/ `
|
|
167
190
|
.cesium-credit-lightbox-overlay {
|
|
@@ -237,6 +260,12 @@ function appendCss(container) {
|
|
|
237
260
|
color: ${highlightColor};
|
|
238
261
|
}
|
|
239
262
|
|
|
263
|
+
.cesium-credit-expand-link:focus-visible,
|
|
264
|
+
.cesium-credit-lightbox-close:focus-visible {
|
|
265
|
+
outline: 2px solid ${highlightColor};
|
|
266
|
+
outline-offset: 2px;
|
|
267
|
+
}
|
|
268
|
+
|
|
240
269
|
.cesium-credit-text {
|
|
241
270
|
color: ${textColor};
|
|
242
271
|
}
|
|
@@ -312,6 +341,9 @@ function CreditDisplay(container, delimiter, viewport) {
|
|
|
312
341
|
|
|
313
342
|
const lightboxCredits = document.createElement("div");
|
|
314
343
|
lightboxCredits.className = "cesium-credit-lightbox";
|
|
344
|
+
lightboxCredits.setAttribute("role", "dialog");
|
|
345
|
+
lightboxCredits.setAttribute("aria-modal", "true");
|
|
346
|
+
lightboxCredits.setAttribute("aria-label", "Data attribution");
|
|
315
347
|
lightbox.appendChild(lightboxCredits);
|
|
316
348
|
|
|
317
349
|
function hideLightbox(event) {
|
|
@@ -322,6 +354,14 @@ function CreditDisplay(container, delimiter, viewport) {
|
|
|
322
354
|
}
|
|
323
355
|
lightbox.addEventListener("click", hideLightbox, false);
|
|
324
356
|
|
|
357
|
+
function hideLightboxOnEscape(event) {
|
|
358
|
+
if (event.key === "Escape") {
|
|
359
|
+
event.preventDefault();
|
|
360
|
+
that.hideLightbox();
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
lightbox.addEventListener("keydown", hideLightboxOnEscape, false);
|
|
364
|
+
|
|
325
365
|
const title = document.createElement("div");
|
|
326
366
|
title.className = "cesium-credit-lightbox-title";
|
|
327
367
|
title.textContent = "Data provided by:";
|
|
@@ -329,8 +369,12 @@ function CreditDisplay(container, delimiter, viewport) {
|
|
|
329
369
|
|
|
330
370
|
const closeButton = document.createElement("a");
|
|
331
371
|
closeButton.onclick = this.hideLightbox.bind(this);
|
|
372
|
+
closeButton.onkeydown = activateOnKeydown(this.hideLightbox.bind(this));
|
|
332
373
|
closeButton.innerHTML = "×";
|
|
333
374
|
closeButton.className = "cesium-credit-lightbox-close";
|
|
375
|
+
closeButton.setAttribute("role", "button");
|
|
376
|
+
closeButton.setAttribute("tabindex", "0");
|
|
377
|
+
closeButton.setAttribute("aria-label", "Close data attribution");
|
|
334
378
|
lightboxCredits.appendChild(closeButton);
|
|
335
379
|
|
|
336
380
|
const creditList = document.createElement("ul");
|
|
@@ -349,7 +393,12 @@ function CreditDisplay(container, delimiter, viewport) {
|
|
|
349
393
|
const expandLink = document.createElement("a");
|
|
350
394
|
expandLink.className = "cesium-credit-expand-link";
|
|
351
395
|
expandLink.onclick = this.showLightbox.bind(this);
|
|
396
|
+
expandLink.onkeydown = activateOnKeydown(this.showLightbox.bind(this));
|
|
352
397
|
expandLink.textContent = "Data attribution";
|
|
398
|
+
expandLink.setAttribute("role", "button");
|
|
399
|
+
expandLink.setAttribute("tabindex", "0");
|
|
400
|
+
expandLink.setAttribute("aria-haspopup", "dialog");
|
|
401
|
+
expandLink.setAttribute("aria-expanded", "false");
|
|
353
402
|
container.appendChild(expandLink);
|
|
354
403
|
|
|
355
404
|
appendCss(container);
|
|
@@ -364,7 +413,9 @@ function CreditDisplay(container, delimiter, viewport) {
|
|
|
364
413
|
this._creditList = creditList;
|
|
365
414
|
this._lightbox = lightbox;
|
|
366
415
|
this._hideLightbox = hideLightbox;
|
|
416
|
+
this._hideLightboxOnEscape = hideLightboxOnEscape;
|
|
367
417
|
this._expandLink = expandLink;
|
|
418
|
+
this._closeButton = closeButton;
|
|
368
419
|
this._expanded = false;
|
|
369
420
|
this._staticCredits = [];
|
|
370
421
|
this._cesiumCredit = cesiumCredit;
|
|
@@ -492,6 +543,9 @@ CreditDisplay.prototype.removeStaticCredit = function (credit) {
|
|
|
492
543
|
CreditDisplay.prototype.showLightbox = function () {
|
|
493
544
|
this._lightbox.style.display = "block";
|
|
494
545
|
this._expanded = true;
|
|
546
|
+
this._expandLink.setAttribute("aria-expanded", "true");
|
|
547
|
+
// Move focus into the dialog so keyboard users can reach its contents.
|
|
548
|
+
this._closeButton.focus();
|
|
495
549
|
};
|
|
496
550
|
|
|
497
551
|
/**
|
|
@@ -500,6 +554,9 @@ CreditDisplay.prototype.showLightbox = function () {
|
|
|
500
554
|
CreditDisplay.prototype.hideLightbox = function () {
|
|
501
555
|
this._lightbox.style.display = "none";
|
|
502
556
|
this._expanded = false;
|
|
557
|
+
this._expandLink.setAttribute("aria-expanded", "false");
|
|
558
|
+
// Restore focus to the element that opened the dialog.
|
|
559
|
+
this._expandLink.focus();
|
|
503
560
|
};
|
|
504
561
|
|
|
505
562
|
/**
|
|
@@ -581,6 +638,11 @@ CreditDisplay.prototype.endFrame = function () {
|
|
|
581
638
|
*/
|
|
582
639
|
CreditDisplay.prototype.destroy = function () {
|
|
583
640
|
this._lightbox.removeEventListener("click", this._hideLightbox, false);
|
|
641
|
+
this._lightbox.removeEventListener(
|
|
642
|
+
"keydown",
|
|
643
|
+
this._hideLightboxOnEscape,
|
|
644
|
+
false,
|
|
645
|
+
);
|
|
584
646
|
|
|
585
647
|
this.container.removeChild(this._cesiumCreditContainer);
|
|
586
648
|
this.container.removeChild(this._screenContainer);
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
|
|
3
|
-
/** @import {GeoJson, GeoJsonFeature, GeoJsonGeometry, GeoJsonPosition} from "../Core/globalTypes.js"; */
|
|
4
|
-
/** @import FrameState from "./FrameState.js"; */
|
|
5
|
-
|
|
6
3
|
import Cartesian2 from "../Core/Cartesian2.js";
|
|
7
4
|
import Cartesian3 from "../Core/Cartesian3.js";
|
|
8
5
|
import Check from "../Core/Check.js";
|
|
@@ -11,6 +8,7 @@ import destroyObject from "../Core/destroyObject.js";
|
|
|
11
8
|
import DeveloperError from "../Core/DeveloperError.js";
|
|
12
9
|
import Ellipsoid from "../Core/Ellipsoid.js";
|
|
13
10
|
import Frozen from "../Core/Frozen.js";
|
|
11
|
+
import HeightReference, { isHeightReferenceClamp } from "./HeightReference.js";
|
|
14
12
|
import PolygonPipeline from "../Core/PolygonPipeline.js";
|
|
15
13
|
import Resource from "../Core/Resource.js";
|
|
16
14
|
import RuntimeError from "../Core/RuntimeError.js";
|
|
@@ -20,6 +18,13 @@ import BufferPolygon from "./BufferPolygon.js";
|
|
|
20
18
|
import BufferPolygonCollection from "./BufferPolygonCollection.js";
|
|
21
19
|
import BufferPolyline from "./BufferPolyline.js";
|
|
22
20
|
import BufferPolylineCollection from "./BufferPolylineCollection.js";
|
|
21
|
+
import assert from "../Core/assert.js";
|
|
22
|
+
import oneTimeWarning from "../Core/oneTimeWarning.js";
|
|
23
|
+
|
|
24
|
+
/** @import FrameState from "./FrameState.js"; */
|
|
25
|
+
/** @import Scene from "./Scene.js"; */
|
|
26
|
+
/** @import {GeoJson, GeoJsonFeature, GeoJsonGeometry, GeoJsonPosition} from "../Core/globalTypes.js"; */
|
|
27
|
+
/** @import VectorProvider from "../Core/VectorProvider.js"; */
|
|
23
28
|
|
|
24
29
|
/**
|
|
25
30
|
* @typedef {object} GeoJsonPrimitiveConstructorOptions
|
|
@@ -29,6 +34,9 @@ import BufferPolylineCollection from "./BufferPolylineCollection.js";
|
|
|
29
34
|
* @property {boolean} [allowPicking=true]
|
|
30
35
|
* @property {boolean} [show=true]
|
|
31
36
|
* @property {function(number, object, Record<string, unknown>):object} [pickObjectFactory]
|
|
37
|
+
* @property {HeightReference} [heightReference=HeightReference.NONE] Allows clamping (draping)
|
|
38
|
+
* polylines and polygons on terrain and 3D Tiles. Point clamping is not currently supported.
|
|
39
|
+
* @property {Scene} [scene] Required for primitives that use a clamping {@link HeightReference}.
|
|
32
40
|
*/
|
|
33
41
|
|
|
34
42
|
/**
|
|
@@ -41,14 +49,36 @@ import BufferPolylineCollection from "./BufferPolylineCollection.js";
|
|
|
41
49
|
* added directly to {@link Scene#primitives}.
|
|
42
50
|
*
|
|
43
51
|
* @example
|
|
52
|
+
* // Load GeoJSON
|
|
44
53
|
* const loader = await Cesium.GeoJsonPrimitive.fromUrl("./data.geojson");
|
|
45
54
|
* viewer.scene.primitives.add(loader);
|
|
46
55
|
*
|
|
56
|
+
* @example
|
|
57
|
+
* // Access GeoJSON features and properties
|
|
47
58
|
* loader.points; // BufferPointCollection | undefined
|
|
48
59
|
* loader.polylines; // BufferPolylineCollection | undefined
|
|
49
60
|
* loader.polygons; // BufferPolygonCollection | undefined
|
|
50
61
|
* loader.ids; // source feature IDs
|
|
51
62
|
* loader.properties; // source feature properties
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* // Style GeoJSON
|
|
66
|
+
* const material = new Cesium.BufferPolylineMaterial({
|
|
67
|
+
* color: Cesium.Color.RED,
|
|
68
|
+
* width: 4,
|
|
69
|
+
* });
|
|
70
|
+
*
|
|
71
|
+
* const polyline = new Cesium.BufferPolyline();
|
|
72
|
+
* const count = primitive.polylines.primitiveCount;
|
|
73
|
+
* for (let i = 0; i < count; i++) {
|
|
74
|
+
* primitive.polylines.get(i, polyline);
|
|
75
|
+
*
|
|
76
|
+
* const properties = primitive.getProperties(polyline.featureId);
|
|
77
|
+
* if (properties.myCustomProperty === true) {
|
|
78
|
+
* polyline.setMaterial(material);
|
|
79
|
+
* }
|
|
80
|
+
* }
|
|
81
|
+
*
|
|
52
82
|
* @experimental This feature is not final and is subject to change without Cesium's standard deprecation policy.
|
|
53
83
|
*/
|
|
54
84
|
class GeoJsonPrimitive {
|
|
@@ -59,9 +89,7 @@ class GeoJsonPrimitive {
|
|
|
59
89
|
options = options ?? Frozen.EMPTY_OBJECT;
|
|
60
90
|
|
|
61
91
|
//>>includeStart('debug', pragmas.debug);
|
|
62
|
-
|
|
63
|
-
throw new DeveloperError("options.geoJson is required.");
|
|
64
|
-
}
|
|
92
|
+
Check.defined("geoJson", options.geoJson);
|
|
65
93
|
//>>includeEnd('debug');
|
|
66
94
|
|
|
67
95
|
const parseResult = parseGeoJson(/** @type {GeoJson} */ (options.geoJson));
|
|
@@ -86,35 +114,62 @@ class GeoJsonPrimitive {
|
|
|
86
114
|
this._polylines = undefined;
|
|
87
115
|
this._polygons = undefined;
|
|
88
116
|
|
|
117
|
+
/**
|
|
118
|
+
* @type {HeightReference}
|
|
119
|
+
* @private
|
|
120
|
+
*/
|
|
121
|
+
this._heightReference = options.heightReference ?? HeightReference.NONE;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* @type {Scene|undefined}
|
|
125
|
+
* @private
|
|
126
|
+
*/
|
|
127
|
+
this._scene = options.scene;
|
|
128
|
+
|
|
129
|
+
const heightReference = this._heightReference;
|
|
130
|
+
const scene = this._scene;
|
|
131
|
+
|
|
132
|
+
//>>includeStart('debug', pragmas.debug);
|
|
133
|
+
assert(
|
|
134
|
+
!isHeightReferenceClamp(heightReference) || defined(scene),
|
|
135
|
+
"Clamped HeightReference requires `options.scene`.",
|
|
136
|
+
);
|
|
137
|
+
//>>includeEnd('debug');
|
|
138
|
+
|
|
89
139
|
if (parseResult.pointCount > 0) {
|
|
90
|
-
|
|
91
|
-
|
|
140
|
+
//>>includeStart('debug', pragmas.debug);
|
|
141
|
+
if (isHeightReferenceClamp(heightReference)) {
|
|
142
|
+
oneTimeWarning(
|
|
143
|
+
"geojson-heightref",
|
|
144
|
+
"Clamped HeightReference unsupported on BufferPointCollection.",
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
//>>includeEnd('debug');
|
|
148
|
+
|
|
149
|
+
this._points = new BufferPointCollection({
|
|
92
150
|
primitiveCountMax: parseResult.pointCount,
|
|
93
151
|
allowPicking: allowPicking,
|
|
94
|
-
};
|
|
95
|
-
this._points = new BufferPointCollection(pointOptions);
|
|
152
|
+
});
|
|
96
153
|
}
|
|
97
154
|
|
|
98
155
|
if (parseResult.polylineCount > 0) {
|
|
99
|
-
|
|
100
|
-
const polylineOptions = {
|
|
156
|
+
this._polylines = new BufferPolylineCollection({
|
|
101
157
|
primitiveCountMax: parseResult.polylineCount,
|
|
102
158
|
vertexCountMax: parseResult.polylineVertexCount,
|
|
103
159
|
allowPicking: allowPicking,
|
|
104
|
-
|
|
105
|
-
|
|
160
|
+
heightReference,
|
|
161
|
+
});
|
|
106
162
|
}
|
|
107
163
|
|
|
108
164
|
if (parseResult.polygonCount > 0) {
|
|
109
|
-
|
|
110
|
-
const polygonOptions = {
|
|
165
|
+
this._polygons = new BufferPolygonCollection({
|
|
111
166
|
primitiveCountMax: parseResult.polygonCount,
|
|
112
167
|
vertexCountMax: parseResult.polygonVertexCount,
|
|
113
168
|
holeCountMax: parseResult.polygonHoleCount,
|
|
114
169
|
triangleCountMax: parseResult.polygonTriangleCount,
|
|
115
170
|
allowPicking: allowPicking,
|
|
116
|
-
|
|
117
|
-
|
|
171
|
+
heightReference,
|
|
172
|
+
});
|
|
118
173
|
}
|
|
119
174
|
|
|
120
175
|
const scratch = new Cartesian3();
|
|
@@ -338,30 +393,65 @@ class GeoJsonPrimitive {
|
|
|
338
393
|
return;
|
|
339
394
|
}
|
|
340
395
|
|
|
341
|
-
|
|
342
|
-
|
|
396
|
+
const points = this._points;
|
|
397
|
+
const polylines = this._polylines;
|
|
398
|
+
const polygons = this._polygons;
|
|
399
|
+
const frameNumber = frameState.frameNumber;
|
|
400
|
+
const heightReference = this._heightReference;
|
|
401
|
+
|
|
402
|
+
const vectorProvider = isHeightReferenceClamp(heightReference)
|
|
403
|
+
? // @ts-expect-error Missing types, non-ES6 class.
|
|
404
|
+
/** @type {VectorProvider} */ (this._scene.vectorProvider)
|
|
405
|
+
: null;
|
|
406
|
+
|
|
407
|
+
if (defined(points)) {
|
|
408
|
+
points.update(frameState);
|
|
343
409
|
}
|
|
344
|
-
|
|
345
|
-
|
|
410
|
+
|
|
411
|
+
if (defined(polylines)) {
|
|
412
|
+
if (defined(vectorProvider)) {
|
|
413
|
+
vectorProvider.markForFrame(polylines, frameNumber, heightReference);
|
|
414
|
+
} else {
|
|
415
|
+
polylines.update(frameState);
|
|
416
|
+
}
|
|
346
417
|
}
|
|
347
|
-
|
|
348
|
-
|
|
418
|
+
|
|
419
|
+
if (defined(polygons)) {
|
|
420
|
+
if (defined(vectorProvider)) {
|
|
421
|
+
vectorProvider.markForFrame(polygons, frameNumber, heightReference);
|
|
422
|
+
} else {
|
|
423
|
+
polygons.update(frameState);
|
|
424
|
+
}
|
|
349
425
|
}
|
|
350
426
|
}
|
|
351
427
|
|
|
352
428
|
destroy() {
|
|
429
|
+
const vectorProvider = isHeightReferenceClamp(this._heightReference)
|
|
430
|
+
? // @ts-expect-error Missing types, non-ES6 class.
|
|
431
|
+
/** @type {VectorProvider} */ (this._scene.vectorProvider)
|
|
432
|
+
: null;
|
|
433
|
+
|
|
353
434
|
if (this._points) {
|
|
354
435
|
this._points.destroy();
|
|
355
436
|
this._points = undefined;
|
|
356
437
|
}
|
|
438
|
+
|
|
357
439
|
if (this._polylines) {
|
|
440
|
+
if (defined(vectorProvider)) {
|
|
441
|
+
vectorProvider.remove(this._polylines);
|
|
442
|
+
}
|
|
358
443
|
this._polylines.destroy();
|
|
359
444
|
this._polylines = undefined;
|
|
360
445
|
}
|
|
446
|
+
|
|
361
447
|
if (this._polygons) {
|
|
448
|
+
if (defined(vectorProvider)) {
|
|
449
|
+
vectorProvider.remove(this._polygons);
|
|
450
|
+
}
|
|
362
451
|
this._polygons.destroy();
|
|
363
452
|
this._polygons = undefined;
|
|
364
453
|
}
|
|
454
|
+
|
|
365
455
|
return destroyObject(this);
|
|
366
456
|
}
|
|
367
457
|
|
|
@@ -82,6 +82,7 @@ class GlobeSurfaceShader {
|
|
|
82
82
|
* @property {boolean} [hasExaggeration]
|
|
83
83
|
* @property {boolean} [showUndergroundColor]
|
|
84
84
|
* @property {boolean} [translucent]
|
|
85
|
+
* @property {boolean} [vectorAntialias]
|
|
85
86
|
* @private
|
|
86
87
|
*/
|
|
87
88
|
|
|
@@ -141,6 +142,12 @@ class GlobeSurfaceShaderSet {
|
|
|
141
142
|
const translucent = options.translucent;
|
|
142
143
|
const vectorData = surfaceTile.vectorData;
|
|
143
144
|
const hasVectorLayer = vectorData?.show;
|
|
145
|
+
const hasVectorPolylines = hasVectorLayer && vectorData.hasPolylines;
|
|
146
|
+
const hasVectorPolygons = hasVectorLayer && vectorData.hasPolygons;
|
|
147
|
+
const vectorAntialias = hasVectorLayer && options.vectorAntialias;
|
|
148
|
+
const vectorWidthInMeters = hasVectorPolylines && vectorData.hasMeterWidths;
|
|
149
|
+
const vectorMixedWidthUnits =
|
|
150
|
+
vectorWidthInMeters && vectorData.hasPixelWidths;
|
|
144
151
|
|
|
145
152
|
let quantization = 0;
|
|
146
153
|
let quantizationDefine = "";
|
|
@@ -205,7 +212,12 @@ class GlobeSurfaceShaderSet {
|
|
|
205
212
|
(+translucent << 31)) >>>
|
|
206
213
|
0) +
|
|
207
214
|
(applyDayNightAlpha ? 0x100000000 : 0) +
|
|
208
|
-
(hasVectorLayer ? 0x200000000 : 0)
|
|
215
|
+
(hasVectorLayer ? 0x200000000 : 0) +
|
|
216
|
+
(hasVectorPolylines ? 0x400000000 : 0) +
|
|
217
|
+
(hasVectorPolygons ? 0x800000000 : 0) +
|
|
218
|
+
(vectorAntialias ? 0x1000000000 : 0) +
|
|
219
|
+
(vectorWidthInMeters ? 0x2000000000 : 0) +
|
|
220
|
+
(vectorMixedWidthUnits ? 0x4000000000 : 0);
|
|
209
221
|
|
|
210
222
|
let currentClippingShaderState = 0;
|
|
211
223
|
// @ts-expect-error Missing types.
|
|
@@ -263,12 +275,6 @@ class GlobeSurfaceShaderSet {
|
|
|
263
275
|
);
|
|
264
276
|
}
|
|
265
277
|
|
|
266
|
-
// Need to go before GlobeFS
|
|
267
|
-
if (currentClippingPolygonsShaderState !== 0) {
|
|
268
|
-
fs.sources.unshift(getPolygonClippingFunction(frameState.context));
|
|
269
|
-
vs.sources.unshift(getUnpackClippingFunction(frameState.context));
|
|
270
|
-
}
|
|
271
|
-
|
|
272
278
|
vs.defines.push(quantizationDefine);
|
|
273
279
|
fs.defines.push(
|
|
274
280
|
`TEXTURE_UNITS ${numberOfDayTextures}`,
|
|
@@ -364,20 +370,10 @@ class GlobeSurfaceShaderSet {
|
|
|
364
370
|
|
|
365
371
|
if (enableClippingPolygons) {
|
|
366
372
|
fs.defines.push("ENABLE_CLIPPING_POLYGONS");
|
|
367
|
-
vs.defines.push("ENABLE_CLIPPING_POLYGONS");
|
|
368
373
|
|
|
369
374
|
if (clippingPolygons.inverse) {
|
|
370
375
|
fs.defines.push("CLIPPING_INVERSE");
|
|
371
376
|
}
|
|
372
|
-
|
|
373
|
-
fs.defines.push(
|
|
374
|
-
// @ts-expect-error Missing types.
|
|
375
|
-
`CLIPPING_POLYGON_REGIONS_LENGTH ${clippingPolygons.extentsCount}`,
|
|
376
|
-
);
|
|
377
|
-
vs.defines.push(
|
|
378
|
-
// @ts-expect-error Missing types.
|
|
379
|
-
`CLIPPING_POLYGON_REGIONS_LENGTH ${clippingPolygons.extentsCount}`,
|
|
380
|
-
);
|
|
381
377
|
}
|
|
382
378
|
|
|
383
379
|
if (colorCorrect) {
|
|
@@ -397,9 +393,27 @@ class GlobeSurfaceShaderSet {
|
|
|
397
393
|
}
|
|
398
394
|
|
|
399
395
|
if (hasVectorLayer) {
|
|
400
|
-
vs.defines.push("HAS_VECTOR_LAYER");
|
|
401
396
|
fs.defines.push("HAS_VECTOR_LAYER");
|
|
402
|
-
|
|
397
|
+
if (hasVectorPolylines) {
|
|
398
|
+
fs.defines.push("HAS_VECTOR_POLYLINES");
|
|
399
|
+
}
|
|
400
|
+
if (hasVectorPolygons) {
|
|
401
|
+
fs.defines.push("HAS_VECTOR_POLYGONS");
|
|
402
|
+
}
|
|
403
|
+
if (vectorAntialias) {
|
|
404
|
+
fs.defines.push("VECTOR_ANTIALIAS");
|
|
405
|
+
}
|
|
406
|
+
if (vectorWidthInMeters) {
|
|
407
|
+
fs.defines.push("VECTOR_WIDTH_IN_METERS");
|
|
408
|
+
}
|
|
409
|
+
if (vectorMixedWidthUnits) {
|
|
410
|
+
fs.defines.push("VECTOR_WIDTH_MIXED_UNITS");
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
// Polygon clipping builds on top of the same machinery vector rendering uses
|
|
415
|
+
if (hasVectorLayer || enableClippingPolygons) {
|
|
416
|
+
fs.sources.unshift(VectorCommon);
|
|
403
417
|
}
|
|
404
418
|
|
|
405
419
|
let computeDayColor =
|
|
@@ -538,41 +552,6 @@ function getPositionMode(sceneMode) {
|
|
|
538
552
|
return positionMode;
|
|
539
553
|
}
|
|
540
554
|
|
|
541
|
-
/**
|
|
542
|
-
* @param {Context} context
|
|
543
|
-
* @ignore
|
|
544
|
-
*/
|
|
545
|
-
function getPolygonClippingFunction(context) {
|
|
546
|
-
// return a noop for webgl1
|
|
547
|
-
// @ts-expect-error Missing types.
|
|
548
|
-
if (!context.webgl2) {
|
|
549
|
-
return `void clipPolygons(highp sampler2D clippingDistance, int regionsLength, vec2 clippingPosition, int regionIndex) {
|
|
550
|
-
}`;
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
return `void clipPolygons(highp sampler2D clippingDistance, int regionsLength, vec2 clippingPosition, int regionIndex) {
|
|
554
|
-
czm_clipPolygons(clippingDistance, regionsLength, clippingPosition, regionIndex);
|
|
555
|
-
}`;
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
/**
|
|
559
|
-
* @param {Context} context
|
|
560
|
-
* @ignore
|
|
561
|
-
*/
|
|
562
|
-
function getUnpackClippingFunction(context) {
|
|
563
|
-
// return a noop for webgl1
|
|
564
|
-
// @ts-expect-error Missing types.
|
|
565
|
-
if (!context.webgl2) {
|
|
566
|
-
return `vec4 unpackClippingExtents(highp sampler2D extentsTexture, int index) {
|
|
567
|
-
return vec4();
|
|
568
|
-
}`;
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
return `vec4 unpackClippingExtents(highp sampler2D extentsTexture, int index) {
|
|
572
|
-
return czm_unpackClippingExtents(extentsTexture, index);
|
|
573
|
-
}`;
|
|
574
|
-
}
|
|
575
|
-
|
|
576
555
|
/**
|
|
577
556
|
* @param {boolean} useWebMercatorProjection
|
|
578
557
|
* @returns {string}
|
|
@@ -19,6 +19,7 @@ import TextureMagnificationFilter from "../Renderer/TextureMagnificationFilter.j
|
|
|
19
19
|
import TextureMinificationFilter from "../Renderer/TextureMinificationFilter.js";
|
|
20
20
|
import TextureWrap from "../Renderer/TextureWrap.js";
|
|
21
21
|
import VertexArray from "../Renderer/VertexArray.js";
|
|
22
|
+
import ClippingPolygonCollection from "./ClippingPolygonCollection.js";
|
|
22
23
|
import ImageryState from "./ImageryState.js";
|
|
23
24
|
import QuadtreeTileLoadState from "./QuadtreeTileLoadState.js";
|
|
24
25
|
import TerrainState from "./TerrainState.js";
|
|
@@ -37,7 +38,8 @@ import TerrainState from "./TerrainState.js";
|
|
|
37
38
|
/** @import TerrainProvider from "../Core/TerrainProvider.js"; */
|
|
38
39
|
/** @import TileBoundingRegion from "./TileBoundingRegion.js"; */
|
|
39
40
|
/** @import TileImagery from "./TileImagery.js"; */
|
|
40
|
-
/** @import VectorProvider
|
|
41
|
+
/** @import VectorProvider from "../Core/VectorProvider.js"; */
|
|
42
|
+
/** @import { VectorTileData } from "../Core/VectorPipeline.js"; */
|
|
41
43
|
|
|
42
44
|
/**
|
|
43
45
|
* Contains additional information about a {@link QuadtreeTile} of the globe's surface, and
|
|
@@ -67,6 +69,12 @@ class GlobeSurfaceTile {
|
|
|
67
69
|
/** @type {VectorTileData} */
|
|
68
70
|
this.vectorData = undefined;
|
|
69
71
|
|
|
72
|
+
/**
|
|
73
|
+
* Clipping polygons build on top of the vector tile data system (both rely on the same rendering technique).
|
|
74
|
+
* @type {VectorTileData}
|
|
75
|
+
*/
|
|
76
|
+
this.clippingPolygonData = undefined;
|
|
77
|
+
|
|
70
78
|
/** @type {VertexArray} */
|
|
71
79
|
this.vertexArray = undefined;
|
|
72
80
|
|
|
@@ -169,6 +177,11 @@ class GlobeSurfaceTile {
|
|
|
169
177
|
this.vectorData = undefined;
|
|
170
178
|
}
|
|
171
179
|
|
|
180
|
+
if (defined(this.clippingPolygonData)) {
|
|
181
|
+
ClippingPolygonCollection.releaseRectangleData(this.clippingPolygonData);
|
|
182
|
+
this.clippingPolygonData = undefined;
|
|
183
|
+
}
|
|
184
|
+
|
|
172
185
|
this.terrainData = undefined;
|
|
173
186
|
|
|
174
187
|
this.terrainState = TerrainState.UNLOADED;
|