@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
|
@@ -14,6 +14,7 @@ import SceneMode from "./SceneMode.js";
|
|
|
14
14
|
import AttributeType from "./AttributeType.js";
|
|
15
15
|
import oneTimeWarning from "../Core/oneTimeWarning.js";
|
|
16
16
|
import BlendOption from "../Scene/BlendOption.js";
|
|
17
|
+
import HeightReference, { isHeightReferenceClamp } from "./HeightReference.js";
|
|
17
18
|
|
|
18
19
|
/** @import { Destroyable, TypedArray, TypedArrayConstructor } from "../Core/globalTypes.js"; */
|
|
19
20
|
/** @import Context from "../Renderer/Context.js"; */
|
|
@@ -32,6 +33,31 @@ import BlendOption from "../Scene/BlendOption.js";
|
|
|
32
33
|
* @experimental This feature is not final and is subject to change without Cesium's standard deprecation policy.
|
|
33
34
|
*/
|
|
34
35
|
|
|
36
|
+
/**
|
|
37
|
+
* @typedef {object} BufferPrimitiveCollectionOptions
|
|
38
|
+
* @property {Matrix4} [modelMatrix=Matrix4.IDENTITY] Transforms geometry from model to world coordinates.
|
|
39
|
+
* @property {number} [primitiveCountMax=BufferPrimitiveCollection.DEFAULT_CAPACITY] Maximum number of primitives.
|
|
40
|
+
* @property {number} [vertexCountMax=BufferPrimitiveCollection.DEFAULT_CAPACITY] Maximum number of vertices.
|
|
41
|
+
* @property {boolean} [show=true]
|
|
42
|
+
* @property {ComponentDatatype} [positionDatatype=ComponentDatatype.DOUBLE] The component datatype used to store position values.
|
|
43
|
+
* @property {boolean} [positionNormalized=false] When <code>true</code>, integer position values are treated as normalized,
|
|
44
|
+
* where the full integer range maps to [-1, 1] (signed) or [0, 1] (unsigned). Only relevant for integer position datatypes
|
|
45
|
+
* (BYTE, UNSIGNED_BYTE, SHORT, UNSIGNED_SHORT).
|
|
46
|
+
* @property {boolean} [allowPicking=false] When <code>true</code>, primitives are pickable with {@link Scene#pick}. When <code>false</code>, memory and initialization cost are lower.
|
|
47
|
+
* @property {BoundingSphere} [boundingVolume] Bounding volume, in world space, for the collection. When
|
|
48
|
+
* unspecified, a bounding volume is computed automatically and updated when primitive positions change. When
|
|
49
|
+
* specified, users are responsible for updating bounding volume as needed. Pre-computing the bounding volume
|
|
50
|
+
* manually, and updating it only as needed, will improve performance for larger dynamic collections.
|
|
51
|
+
* @property {boolean} [debugShowBoundingVolume=false]
|
|
52
|
+
* @property {BlendOption} [blendOption=BlendOption.TRANSLUCENT]
|
|
53
|
+
* @property {HeightReference} [options.heightReference=HeightReference.NONE] When set to a clamping value, the
|
|
54
|
+
* collection is draped onto the surfaces selected by the value: {@link HeightReference.CLAMP_TO_TERRAIN} drapes
|
|
55
|
+
* onto the globe, {@link HeightReference.CLAMP_TO_3D_TILE} drapes onto 3D Tiles, and
|
|
56
|
+
* {@link HeightReference.CLAMP_TO_GROUND} drapes onto both. Only {@link BufferPolylineCollection} and
|
|
57
|
+
* {@link BufferPolygonCollection} support draping, and only once the collection has been added to
|
|
58
|
+
* {@link Scene#primitives}. A draped collection is not also drawn as geometry of its own.
|
|
59
|
+
*/
|
|
60
|
+
|
|
35
61
|
/**
|
|
36
62
|
* Collection of primitives held in ArrayBuffer storage for performance and memory optimization.
|
|
37
63
|
*
|
|
@@ -71,22 +97,7 @@ class BufferPrimitiveCollection {
|
|
|
71
97
|
_renderContext = null;
|
|
72
98
|
|
|
73
99
|
/**
|
|
74
|
-
* @param {
|
|
75
|
-
* @param {Matrix4} [options.modelMatrix=Matrix4.IDENTITY] Transforms geometry from model to world coordinates.
|
|
76
|
-
* @param {number} [options.primitiveCountMax=BufferPrimitiveCollection.DEFAULT_CAPACITY]
|
|
77
|
-
* @param {number} [options.vertexCountMax=BufferPrimitiveCollection.DEFAULT_CAPACITY]
|
|
78
|
-
* @param {boolean} [options.show=true]
|
|
79
|
-
* @param {ComponentDatatype} [options.positionDatatype=ComponentDatatype.DOUBLE]
|
|
80
|
-
* @param {boolean} [options.positionNormalized=false] When <code>true</code>, integer position values are treated as normalized,
|
|
81
|
-
* where the full integer range maps to [-1, 1] (signed) or [0, 1] (unsigned). Only relevant for integer position datatypes
|
|
82
|
-
* (BYTE, UNSIGNED_BYTE, SHORT, UNSIGNED_SHORT).
|
|
83
|
-
* @param {boolean} [options.allowPicking=false] When <code>true</code>, primitives are pickable with {@link Scene#pick}. When <code>false</code>, memory and initialization cost are lower.
|
|
84
|
-
* @param {BoundingSphere} [options.boundingVolume] Bounding volume, in world space, for the collection. When
|
|
85
|
-
* unspecified, a bounding volume is computed automatically and updated when primitive positions change. When
|
|
86
|
-
* specified, users are responsible for updating bounding volume as needed. Pre-computing the bounding volume
|
|
87
|
-
* manually, and updating it only as needed, will improve performance for larger dynamic collections.
|
|
88
|
-
* @param {boolean} [options.debugShowBoundingVolume=false]
|
|
89
|
-
* @param {BlendOption} [options.blendOption=BlendOption.TRANSLUCENT]
|
|
100
|
+
* @param {BufferPrimitiveCollectionOptions} [options]
|
|
90
101
|
*/
|
|
91
102
|
constructor(options = Frozen.EMPTY_OBJECT) {
|
|
92
103
|
/**
|
|
@@ -96,6 +107,13 @@ class BufferPrimitiveCollection {
|
|
|
96
107
|
*/
|
|
97
108
|
this.show = options.show ?? true;
|
|
98
109
|
|
|
110
|
+
/**
|
|
111
|
+
* @type {HeightReference}
|
|
112
|
+
* @readonly
|
|
113
|
+
* @protected
|
|
114
|
+
*/
|
|
115
|
+
this._heightReference = options.heightReference ?? HeightReference.NONE;
|
|
116
|
+
|
|
99
117
|
/**
|
|
100
118
|
* Collection blend option; must be OPAQUE or TRANSLUCENT.
|
|
101
119
|
* @type {BlendOption}
|
|
@@ -148,11 +166,14 @@ class BufferPrimitiveCollection {
|
|
|
148
166
|
this._pickIds = new Map();
|
|
149
167
|
|
|
150
168
|
/**
|
|
169
|
+
* User-defined pick objects. Primitives without custom pick objects will have default
|
|
170
|
+
* pick objects assigned instead.
|
|
171
|
+
*
|
|
151
172
|
* @type {object[]}
|
|
152
173
|
* @readonly
|
|
153
174
|
* @ignore
|
|
154
175
|
*/
|
|
155
|
-
this.
|
|
176
|
+
this._customPickObjects = [];
|
|
156
177
|
|
|
157
178
|
/**
|
|
158
179
|
* This property is for debugging only; it is not for production use nor is it optimized.
|
|
@@ -342,7 +363,7 @@ class BufferPrimitiveCollection {
|
|
|
342
363
|
|
|
343
364
|
/** Destroys collection and its GPU resources. */
|
|
344
365
|
destroy() {
|
|
345
|
-
this.
|
|
366
|
+
this._customPickObjects.length = 0;
|
|
346
367
|
|
|
347
368
|
for (const contextPickIds of this._pickIds.values()) {
|
|
348
369
|
for (const pickId of contextPickIds) {
|
|
@@ -394,7 +415,7 @@ class BufferPrimitiveCollection {
|
|
|
394
415
|
}
|
|
395
416
|
|
|
396
417
|
// Copy primitives to temporary collection, in sort order.
|
|
397
|
-
const tmp =
|
|
418
|
+
const tmp = this._cloneEmpty();
|
|
398
419
|
for (let i = 0; i < primitiveCount; i++) {
|
|
399
420
|
const src = this.get(dstSrcMap[i], a);
|
|
400
421
|
const dst = tmp.add({}, b);
|
|
@@ -424,9 +445,14 @@ class BufferPrimitiveCollection {
|
|
|
424
445
|
*
|
|
425
446
|
* @param {BufferPrimitiveCollection<T>} collection
|
|
426
447
|
* @param {BufferPrimitiveCollection<T>} result
|
|
448
|
+
* @param {function(BufferPrimitive, number): boolean} [predicate] When provided, only primitives for which this returns <code>true</code> are copied. Surviving primitives are compacted into contiguous indices.
|
|
427
449
|
* @template T extends BufferPrimitive
|
|
428
450
|
*/
|
|
429
|
-
static clone(collection, result) {
|
|
451
|
+
static clone(collection, result, predicate) {
|
|
452
|
+
if (defined(predicate)) {
|
|
453
|
+
return this._cloneFiltered(collection, result, predicate);
|
|
454
|
+
}
|
|
455
|
+
|
|
430
456
|
//>>includeStart('debug', pragmas.debug);
|
|
431
457
|
const { ERR_CAPACITY } = BufferPrimitiveCollection.Error;
|
|
432
458
|
assert(collection.primitiveCount <= result.primitiveCountMax, ERR_CAPACITY);
|
|
@@ -455,14 +481,19 @@ class BufferPrimitiveCollection {
|
|
|
455
481
|
collection.primitiveCount * MaterialClass.packedLength,
|
|
456
482
|
);
|
|
457
483
|
|
|
458
|
-
|
|
459
|
-
|
|
484
|
+
// Collection-level display flags (show, debugShowBoundingVolume) are carried
|
|
485
|
+
// by the constructor, so they are intentionally not copied here.
|
|
460
486
|
result._primitiveCount = collection._primitiveCount;
|
|
461
487
|
result._positionCount = collection._positionCount;
|
|
462
488
|
|
|
463
|
-
//
|
|
489
|
+
// Copy per-primitive pick objects and unset each GPU PickId.
|
|
490
|
+
// PickIds are regenerated for the result collection on next render.
|
|
491
|
+
const srcPickObjects = collection._customPickObjects;
|
|
492
|
+
const dstPickObjects = result._customPickObjects;
|
|
493
|
+
dstPickObjects.length = 0;
|
|
464
494
|
const primitive = new PrimitiveClass();
|
|
465
495
|
for (let i = 0, il = result.primitiveCount; i < il; i++) {
|
|
496
|
+
dstPickObjects[i] = srcPickObjects[i];
|
|
466
497
|
result.get(i, primitive)._pickId = 0;
|
|
467
498
|
}
|
|
468
499
|
|
|
@@ -475,17 +506,123 @@ class BufferPrimitiveCollection {
|
|
|
475
506
|
}
|
|
476
507
|
|
|
477
508
|
/**
|
|
478
|
-
*
|
|
479
|
-
*
|
|
509
|
+
* Filtered variant of {@link BufferPrimitiveCollection.clone}. Copies
|
|
510
|
+
* primitive-by-primitive via {@link BufferPrimitive.clone}, so it handles
|
|
511
|
+
* subclass data generically and needs no per-subclass override.
|
|
480
512
|
*
|
|
481
513
|
* @param {BufferPrimitiveCollection<T>} collection
|
|
514
|
+
* @param {BufferPrimitiveCollection<T>} result
|
|
515
|
+
* @param {function(BufferPrimitive, number): boolean} predicate
|
|
516
|
+
* @template T extends BufferPrimitive
|
|
517
|
+
* @protected
|
|
518
|
+
* @ignore
|
|
519
|
+
*/
|
|
520
|
+
static _cloneFiltered(collection, result, predicate) {
|
|
521
|
+
const PrimitiveClass = collection._getPrimitiveClass();
|
|
522
|
+
const src = new PrimitiveClass();
|
|
523
|
+
const dst = new PrimitiveClass();
|
|
524
|
+
|
|
525
|
+
const srcPickObjects = collection._customPickObjects;
|
|
526
|
+
const dstPickObjects = result._customPickObjects;
|
|
527
|
+
dstPickObjects.length = 0;
|
|
528
|
+
|
|
529
|
+
for (let i = 0, il = collection._primitiveCount; i < il; i++) {
|
|
530
|
+
collection.get(i, src);
|
|
531
|
+
if (!predicate(src, i)) {
|
|
532
|
+
continue;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
const dstIndex = result._primitiveCount;
|
|
536
|
+
PrimitiveClass.clone(src, result.add({}, dst));
|
|
537
|
+
|
|
538
|
+
if (defined(srcPickObjects[i])) {
|
|
539
|
+
dstPickObjects[dstIndex] = srcPickObjects[i];
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
return result;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
* Returns a copy of the given collection, overriding any constructor options
|
|
548
|
+
* provided. Omitted options are inherited from the source collection. Any
|
|
549
|
+
* resized buffers must be large enough to hold every primitive.
|
|
550
|
+
*
|
|
551
|
+
* <p>Collection-level state (model matrix, blend option, picking, bounding-volume
|
|
552
|
+
* mode, etc.) is carried over, but GPU resources are not: the source collection
|
|
553
|
+
* retains ownership of its renderer resources, so the caller is responsible for
|
|
554
|
+
* calling {@link BufferPrimitiveCollection#destroy} on the source once it is no
|
|
555
|
+
* longer needed.</p>
|
|
556
|
+
*
|
|
557
|
+
* @example
|
|
558
|
+
* const grown = BufferPrimitiveCollection.fromCollection(collection, {
|
|
559
|
+
* primitiveCountMax: collection.primitiveCountMax * 2,
|
|
560
|
+
* vertexCountMax: collection.vertexCountMax * 2,
|
|
561
|
+
* });
|
|
562
|
+
* collection.destroy(); // release the source collection's GPU resources
|
|
563
|
+
*
|
|
564
|
+
* @example
|
|
565
|
+
* // Grow while dropping hidden primitives.
|
|
566
|
+
* const compacted = BufferPrimitiveCollection.fromCollection(
|
|
567
|
+
* collection,
|
|
568
|
+
* { primitiveCountMax: collection.primitiveCountMax * 2 },
|
|
569
|
+
* (primitive) => primitive.show,
|
|
570
|
+
* );
|
|
571
|
+
*
|
|
572
|
+
* @param {BufferPrimitiveCollection<T>} collection Source collection to copy.
|
|
573
|
+
* @param {BufferPrimitiveCollectionOptions} [options] Constructor options to override. Omitted options are inherited from the source collection.
|
|
574
|
+
* @param {function(BufferPrimitive, number): boolean} [predicate] When provided, only primitives for which this returns <code>true</code> are copied. Surviving primitives are compacted into contiguous indices.
|
|
482
575
|
* @returns {BufferPrimitiveCollection<T>}
|
|
483
576
|
* @template T extends BufferPrimitive
|
|
577
|
+
*/
|
|
578
|
+
static fromCollection(collection, options = Frozen.EMPTY_OBJECT, predicate) {
|
|
579
|
+
const result = collection._cloneEmpty(options);
|
|
580
|
+
collection._getCollectionClass().clone(collection, result, predicate);
|
|
581
|
+
return result;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* Base constructor arguments that carry over collection-level state to an
|
|
586
|
+
* empty copy created by {@link BufferPrimitiveCollection.fromCollection}.
|
|
587
|
+
* Subclasses should spread the result into their constructor arguments,
|
|
588
|
+
* adding any type-specific options. Provided options override inherited
|
|
589
|
+
* state; omitted options are inherited from this collection.
|
|
590
|
+
*
|
|
591
|
+
* @param {BufferPrimitiveCollectionOptions} options
|
|
592
|
+
* @returns {object}
|
|
593
|
+
* @protected
|
|
594
|
+
* @ignore
|
|
595
|
+
*/
|
|
596
|
+
_cloneEmptyBaseArgs(options) {
|
|
597
|
+
return {
|
|
598
|
+
primitiveCountMax: this.primitiveCountMax,
|
|
599
|
+
vertexCountMax: this.vertexCountMax,
|
|
600
|
+
positionDatatype: this.positionDatatype,
|
|
601
|
+
positionNormalized: this.positionNormalized,
|
|
602
|
+
modelMatrix: this._modelMatrix,
|
|
603
|
+
show: this.show,
|
|
604
|
+
debugShowBoundingVolume: this.debugShowBoundingVolume,
|
|
605
|
+
blendOption: this._blendOption,
|
|
606
|
+
allowPicking: this._allowPicking,
|
|
607
|
+
boundingVolume: this._boundingVolumeAutoUpdate
|
|
608
|
+
? undefined
|
|
609
|
+
: this._boundingVolume,
|
|
610
|
+
...options,
|
|
611
|
+
};
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
/**
|
|
615
|
+
* Returns an empty collection with the same structure as this one, overriding
|
|
616
|
+
* any constructor options provided. Omitted options are inherited from this
|
|
617
|
+
* collection.
|
|
618
|
+
*
|
|
619
|
+
* @param {BufferPrimitiveCollectionOptions} [options]
|
|
620
|
+
* @returns {BufferPrimitiveCollection<T>}
|
|
484
621
|
* @protected
|
|
485
622
|
* @abstract
|
|
486
623
|
* @ignore
|
|
487
624
|
*/
|
|
488
|
-
|
|
625
|
+
_cloneEmpty(options) {
|
|
489
626
|
DeveloperError.throwInstantiationError();
|
|
490
627
|
}
|
|
491
628
|
|
|
@@ -566,7 +703,7 @@ class BufferPrimitiveCollection {
|
|
|
566
703
|
for (let i = pickIds.length, il = this._primitiveCount; i < il; i++) {
|
|
567
704
|
this.get(i, primitive);
|
|
568
705
|
|
|
569
|
-
const pickObject = this.
|
|
706
|
+
const pickObject = this._customPickObjects[i] || {
|
|
570
707
|
collection: this,
|
|
571
708
|
index: i,
|
|
572
709
|
get primitive() {
|
|
@@ -644,7 +781,7 @@ class BufferPrimitiveCollection {
|
|
|
644
781
|
result._dirty = true;
|
|
645
782
|
|
|
646
783
|
if (defined(options.pickObject)) {
|
|
647
|
-
this.
|
|
784
|
+
this._customPickObjects[index] = options.pickObject;
|
|
648
785
|
}
|
|
649
786
|
|
|
650
787
|
return result;
|
|
@@ -705,11 +842,31 @@ class BufferPrimitiveCollection {
|
|
|
705
842
|
if (this._dirtyBoundingVolume) {
|
|
706
843
|
this._updateBoundingVolume();
|
|
707
844
|
}
|
|
708
|
-
|
|
845
|
+
// Not gated on the dirty count: a draped collection is packed by a surface,
|
|
846
|
+
// which may read the ids and mark the collection clean before this runs.
|
|
847
|
+
if (this._allowPicking) {
|
|
709
848
|
this._updatePickIds(/** @type {FrameState} */ (frameState).context);
|
|
710
849
|
}
|
|
711
850
|
}
|
|
712
851
|
|
|
852
|
+
/**
|
|
853
|
+
* Whether the collection draws itself this frame. A draped collection is
|
|
854
|
+
* rendered by the surface it is draped onto.
|
|
855
|
+
*
|
|
856
|
+
* @param {FrameState} frameState
|
|
857
|
+
* @returns {boolean}
|
|
858
|
+
* @protected
|
|
859
|
+
* @ignore
|
|
860
|
+
*/
|
|
861
|
+
_isRendered(frameState) {
|
|
862
|
+
const passes = frameState.passes;
|
|
863
|
+
return (
|
|
864
|
+
this.show &&
|
|
865
|
+
!isHeightReferenceClamp(this._heightReference) &&
|
|
866
|
+
(passes.render || passes.pick)
|
|
867
|
+
);
|
|
868
|
+
}
|
|
869
|
+
|
|
713
870
|
/////////////////////////////////////////////////////////////////////////////
|
|
714
871
|
// ACCESSORS
|
|
715
872
|
|
|
@@ -816,6 +973,19 @@ class BufferPrimitiveCollection {
|
|
|
816
973
|
return this._positionNormalized;
|
|
817
974
|
}
|
|
818
975
|
|
|
976
|
+
/**
|
|
977
|
+
* Determines which surfaces the collection is draped onto, in addition to
|
|
978
|
+
* being drawn as standalone geometry. Draping requires that the collection
|
|
979
|
+
* has been added to {@link Scene#primitives}.
|
|
980
|
+
*
|
|
981
|
+
* @type {HeightReference}
|
|
982
|
+
* @readonly
|
|
983
|
+
* @default HeightReference.NONE
|
|
984
|
+
*/
|
|
985
|
+
get heightReference() {
|
|
986
|
+
return this._heightReference;
|
|
987
|
+
}
|
|
988
|
+
|
|
819
989
|
/////////////////////////////////////////////////////////////////////////////
|
|
820
990
|
// UTILS
|
|
821
991
|
|
|
@@ -438,6 +438,16 @@ function Cesium3DTile(tileset, baseResource, header, parent) {
|
|
|
438
438
|
*/
|
|
439
439
|
this.clippingPolygonsDirty = false;
|
|
440
440
|
|
|
441
|
+
/**
|
|
442
|
+
* Tracks if the tileset's ClippingPolygonCollection's geometry changed (a polygon was added or removed),
|
|
443
|
+
* which requires the tile's content to rebake its clipping textures.
|
|
444
|
+
*
|
|
445
|
+
* @type {boolean}
|
|
446
|
+
*
|
|
447
|
+
* @private
|
|
448
|
+
*/
|
|
449
|
+
this.clippingPolygonsNeedRebake = false;
|
|
450
|
+
|
|
441
451
|
/**
|
|
442
452
|
* Tracks if the tile's request should be deferred until all non-deferred
|
|
443
453
|
* tiles load.
|
|
@@ -1483,6 +1493,7 @@ Cesium3DTile.prototype.unloadContent = function () {
|
|
|
1483
1493
|
this._clippingPlanesState = 0;
|
|
1484
1494
|
this.clippingPolygonsDirty = this._clippingPolygonsState === 0;
|
|
1485
1495
|
this._clippingPolygonsState = 0;
|
|
1496
|
+
this.clippingPolygonsNeedRebake = false;
|
|
1486
1497
|
|
|
1487
1498
|
this._debugColorizeTiles = false;
|
|
1488
1499
|
|
|
@@ -2315,6 +2326,7 @@ Cesium3DTile.prototype.update = function (tileset, frameState, passOptions) {
|
|
|
2315
2326
|
|
|
2316
2327
|
this.clippingPlanesDirty = false; // reset after content update
|
|
2317
2328
|
this.clippingPolygonsDirty = false;
|
|
2329
|
+
this.clippingPolygonsNeedRebake = false;
|
|
2318
2330
|
};
|
|
2319
2331
|
|
|
2320
2332
|
const scratchCommandList = [];
|
|
@@ -11,6 +11,7 @@ import Frozen from "../Core/Frozen.js";
|
|
|
11
11
|
import defined from "../Core/defined.js";
|
|
12
12
|
import deprecationWarning from "../Core/deprecationWarning.js";
|
|
13
13
|
import destroyObject from "../Core/destroyObject.js";
|
|
14
|
+
import DeveloperError from "../Core/DeveloperError.js";
|
|
14
15
|
import Ellipsoid from "../Core/Ellipsoid.js";
|
|
15
16
|
import Event from "../Core/Event.js";
|
|
16
17
|
import ImageBasedLighting from "./ImageBasedLighting.js";
|
|
@@ -44,6 +45,7 @@ import ClippingPlaneCollection from "./ClippingPlaneCollection.js";
|
|
|
44
45
|
import ClippingPolygonCollection from "./ClippingPolygonCollection.js";
|
|
45
46
|
import EdgeDisplayMode from "./EdgeDisplayMode.js";
|
|
46
47
|
import hasExtension from "./hasExtension.js";
|
|
48
|
+
import { isHeightReferenceClamp } from "./HeightReference.js";
|
|
47
49
|
import ImplicitTileset from "./ImplicitTileset.js";
|
|
48
50
|
import ImplicitTileCoordinates from "./ImplicitTileCoordinates.js";
|
|
49
51
|
import LabelCollection from "./LabelCollection.js";
|
|
@@ -153,6 +155,7 @@ import ImageryLayerCollection from "./ImageryLayerCollection.js";
|
|
|
153
155
|
* @param {Cesium3DTileset.ConstructorOptions} options An object describing initialization options
|
|
154
156
|
*
|
|
155
157
|
* @exception {DeveloperError} The tileset must be 3D Tiles version 0.0 or 1.0.
|
|
158
|
+
* @exception {DeveloperError} Height reference is not supported without a scene.
|
|
156
159
|
*
|
|
157
160
|
* @example
|
|
158
161
|
* try {
|
|
@@ -343,6 +346,14 @@ function Cesium3DTileset(options) {
|
|
|
343
346
|
this._heightReference = options.heightReference;
|
|
344
347
|
this._scene = options.scene;
|
|
345
348
|
|
|
349
|
+
//>>includeStart('debug', pragmas.debug);
|
|
350
|
+
if (isHeightReferenceClamp(this._heightReference) && !defined(this._scene)) {
|
|
351
|
+
throw new DeveloperError(
|
|
352
|
+
"Height reference is not supported without a scene.",
|
|
353
|
+
);
|
|
354
|
+
}
|
|
355
|
+
//>>includeEnd('debug');
|
|
356
|
+
|
|
346
357
|
this._ellipsoid = options.ellipsoid ?? Ellipsoid.WGS84;
|
|
347
358
|
|
|
348
359
|
this._initialClippingPlanesOriginMatrix = Matrix4.IDENTITY; // Computed from the tileset JSON.
|
|
@@ -856,12 +867,16 @@ function Cesium3DTileset(options) {
|
|
|
856
867
|
}
|
|
857
868
|
|
|
858
869
|
this._clippingPolygons = undefined;
|
|
870
|
+
this._clippingPolygonsNeedRebake = false;
|
|
871
|
+
this._removeClippingPolygonAdded = undefined;
|
|
872
|
+
this._removeClippingPolygonRemoved = undefined;
|
|
859
873
|
if (defined(options.clippingPolygons)) {
|
|
860
874
|
ClippingPolygonCollection.setOwner(
|
|
861
875
|
options.clippingPolygons,
|
|
862
876
|
this,
|
|
863
877
|
"_clippingPolygons",
|
|
864
878
|
);
|
|
879
|
+
updateTilesetClippingPolygonListeners(this);
|
|
865
880
|
}
|
|
866
881
|
|
|
867
882
|
if (defined(options.imageBasedLighting)) {
|
|
@@ -1193,6 +1208,8 @@ Object.defineProperties(Cesium3DTileset.prototype, {
|
|
|
1193
1208
|
},
|
|
1194
1209
|
set: function (value) {
|
|
1195
1210
|
ClippingPolygonCollection.setOwner(value, this, "_clippingPolygons");
|
|
1211
|
+
updateTilesetClippingPolygonListeners(this);
|
|
1212
|
+
this._clippingPolygonsNeedRebake = true;
|
|
1196
1213
|
},
|
|
1197
1214
|
},
|
|
1198
1215
|
|
|
@@ -2693,6 +2710,34 @@ Cesium3DTileset.prototype.postPassesUpdate = function (frameState) {
|
|
|
2693
2710
|
this._styleApplied = false;
|
|
2694
2711
|
};
|
|
2695
2712
|
|
|
2713
|
+
/**
|
|
2714
|
+
* Subscribes the owning tileset to its clipping polygon add/remove events so
|
|
2715
|
+
* tile content can rebake clipping textures when the geometry changes.
|
|
2716
|
+
* @private
|
|
2717
|
+
* @param {Cesium3DTileset} tileset
|
|
2718
|
+
*/
|
|
2719
|
+
function updateTilesetClippingPolygonListeners(tileset) {
|
|
2720
|
+
tileset._removeClippingPolygonAdded =
|
|
2721
|
+
tileset._removeClippingPolygonAdded &&
|
|
2722
|
+
tileset._removeClippingPolygonAdded();
|
|
2723
|
+
tileset._removeClippingPolygonRemoved =
|
|
2724
|
+
tileset._removeClippingPolygonRemoved &&
|
|
2725
|
+
tileset._removeClippingPolygonRemoved();
|
|
2726
|
+
|
|
2727
|
+
const clippingPolygons = tileset._clippingPolygons;
|
|
2728
|
+
if (!defined(clippingPolygons)) {
|
|
2729
|
+
return;
|
|
2730
|
+
}
|
|
2731
|
+
|
|
2732
|
+
const markDirty = () => {
|
|
2733
|
+
tileset._clippingPolygonsNeedRebake = true;
|
|
2734
|
+
};
|
|
2735
|
+
tileset._removeClippingPolygonAdded =
|
|
2736
|
+
clippingPolygons.polygonAdded.addEventListener(markDirty);
|
|
2737
|
+
tileset._removeClippingPolygonRemoved =
|
|
2738
|
+
clippingPolygons.polygonRemoved.addEventListener(markDirty);
|
|
2739
|
+
}
|
|
2740
|
+
|
|
2696
2741
|
/**
|
|
2697
2742
|
* Perform any pass invariant tasks here. Called before any passes are executed.
|
|
2698
2743
|
* @ignore
|
|
@@ -2718,6 +2763,15 @@ Cesium3DTileset.prototype.prePassesUpdate = function (frameState) {
|
|
|
2718
2763
|
clippingPolygons.update(frameState);
|
|
2719
2764
|
}
|
|
2720
2765
|
|
|
2766
|
+
// After a polygon add/remove, mark loaded tiles so their content rebakes
|
|
2767
|
+
// clipping textures. Done once per frame to dedupe multiple changes.
|
|
2768
|
+
if (this._clippingPolygonsNeedRebake) {
|
|
2769
|
+
this._clippingPolygonsNeedRebake = false;
|
|
2770
|
+
this._cache.forEachLoadedTile((tile) => {
|
|
2771
|
+
tile.clippingPolygonsNeedRebake = true;
|
|
2772
|
+
});
|
|
2773
|
+
}
|
|
2774
|
+
|
|
2721
2775
|
if (!defined(this._loadTimestamp)) {
|
|
2722
2776
|
this._loadTimestamp = JulianDate.clone(frameState.time);
|
|
2723
2777
|
}
|
|
@@ -3579,12 +3633,6 @@ Cesium3DTileset.prototype.updateForPass = function (
|
|
|
3579
3633
|
environmentMapManager.update(frameState);
|
|
3580
3634
|
}
|
|
3581
3635
|
|
|
3582
|
-
// Update clipping polygons
|
|
3583
|
-
const clippingPolygons = this._clippingPolygons;
|
|
3584
|
-
if (defined(clippingPolygons) && clippingPolygons.enabled) {
|
|
3585
|
-
clippingPolygons.queueCommands(frameState);
|
|
3586
|
-
}
|
|
3587
|
-
|
|
3588
3636
|
const passStatistics = this._statisticsPerPass[pass];
|
|
3589
3637
|
|
|
3590
3638
|
if (this.show || ignoreCommands) {
|
|
@@ -3652,9 +3700,14 @@ Cesium3DTileset.prototype.isDestroyed = function () {
|
|
|
3652
3700
|
Cesium3DTileset.prototype.destroy = function () {
|
|
3653
3701
|
this._tileDebugLabels =
|
|
3654
3702
|
this._tileDebugLabels && this._tileDebugLabels.destroy();
|
|
3703
|
+
|
|
3704
|
+
this._removeClippingPolygonAdded =
|
|
3705
|
+
this._removeClippingPolygonAdded && this._removeClippingPolygonAdded();
|
|
3706
|
+
this._removeClippingPolygonRemoved =
|
|
3707
|
+
this._removeClippingPolygonRemoved && this._removeClippingPolygonRemoved();
|
|
3708
|
+
|
|
3655
3709
|
this._clippingPlanes = this._clippingPlanes && this._clippingPlanes.destroy();
|
|
3656
|
-
this._clippingPolygons =
|
|
3657
|
-
this._clippingPolygons && this._clippingPolygons.destroy();
|
|
3710
|
+
this._clippingPolygons = undefined;
|
|
3658
3711
|
|
|
3659
3712
|
// Traverse the tree and destroy all tiles
|
|
3660
3713
|
if (defined(this._root)) {
|
|
@@ -247,6 +247,13 @@ function executeTraversal(root, frameState) {
|
|
|
247
247
|
function executeEmptyTraversal(root, frameState) {
|
|
248
248
|
const { canTraverse, updateTile, loadTile, touchTile } =
|
|
249
249
|
Cesium3DTilesetTraversal;
|
|
250
|
+
// Vector tilesets opt into relaxed empty-tile refinement so empty regions reached
|
|
251
|
+
// through implicit or external placeholders do not block their content siblings.
|
|
252
|
+
// Note: it's likely we don't need to limit this behavior to vector tilesets. However,
|
|
253
|
+
// we are being cautious of breaking changes to existing tilesets.
|
|
254
|
+
const isVectorTileset = root.tileset.hasExtension(
|
|
255
|
+
"3DTILES_content_gltf_vector",
|
|
256
|
+
);
|
|
250
257
|
let allDescendantsLoaded = true;
|
|
251
258
|
const stack = emptyTraversal.stack;
|
|
252
259
|
stack.push(root);
|
|
@@ -264,9 +271,14 @@ function executeEmptyTraversal(root, frameState) {
|
|
|
264
271
|
// Only traverse if the tile is empty - traversal stops at descendants with content
|
|
265
272
|
const traverse = !tile.hasRenderableContent && canTraverse(tile);
|
|
266
273
|
|
|
267
|
-
//
|
|
268
|
-
//
|
|
269
|
-
|
|
274
|
+
// For vector tilesets only unloaded renderable content blocks refinement, so an empty
|
|
275
|
+
// tile at its resolved level of detail does not hold back its content siblings,
|
|
276
|
+
// including across implicit or external placeholders. All other tilesets keep the
|
|
277
|
+
// original behavior of blocking whenever traversal stops without content available.
|
|
278
|
+
const blocksRefinement = isVectorTileset
|
|
279
|
+
? tile.hasRenderableContent
|
|
280
|
+
: !traverse;
|
|
281
|
+
if (blocksRefinement && !tile.contentAvailable) {
|
|
270
282
|
allDescendantsLoaded = false;
|
|
271
283
|
}
|
|
272
284
|
|
|
@@ -34,6 +34,21 @@ Cesium3DTilesetCache.prototype.add = function (tile) {
|
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
+
/**
|
|
38
|
+
* Invokes the callback for each tile with loaded content in the cache.
|
|
39
|
+
*
|
|
40
|
+
* @param {Function} callback A function that takes a {@link Cesium3DTile}.
|
|
41
|
+
* @private
|
|
42
|
+
*/
|
|
43
|
+
Cesium3DTilesetCache.prototype.forEachLoadedTile = function (callback) {
|
|
44
|
+
for (let node = this._list.head; defined(node); node = node.next) {
|
|
45
|
+
// The sentinel node has no item.
|
|
46
|
+
if (defined(node.item)) {
|
|
47
|
+
callback(node.item);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
|
|
37
52
|
Cesium3DTilesetCache.prototype.unloadTile = function (
|
|
38
53
|
tileset,
|
|
39
54
|
tile,
|