@hztxi/cesium-engine 25.0.6 → 26.2.1
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/Workers/chunk-2GJAWJJT.js +1344 -0
- package/Build/Workers/chunk-2J2VS5RI.js +288 -0
- package/Build/Workers/chunk-2NCNUVAT.js +56 -0
- package/Build/Workers/chunk-2ZYRUVVU.js +301 -0
- package/Build/Workers/chunk-36IU7N4V.js +1284 -0
- package/Build/Workers/chunk-375SHKGW.js +44 -0
- package/Build/Workers/chunk-3BDLET5S.js +198 -0
- package/Build/Workers/chunk-3PRHI4KX.js +241 -0
- package/Build/Workers/chunk-3R6E2SH4.js +672 -0
- package/Build/Workers/chunk-3ZKKXEXL.js +415 -0
- package/Build/Workers/chunk-47KVKPTO.js +415 -0
- package/Build/Workers/chunk-4N227IPR.js +973 -0
- package/Build/Workers/chunk-4P6OAPBM.js +97 -0
- package/Build/Workers/chunk-4ZOLEPZK.js +519 -0
- package/Build/Workers/chunk-5EF3WWQG.js +352 -0
- package/Build/Workers/chunk-5FYUSABU.js +945 -0
- package/Build/Workers/chunk-5I76476T.js +288 -0
- package/Build/Workers/chunk-5PBZKBAP.js +511 -0
- package/Build/Workers/chunk-5RVAAW26.js +82 -0
- package/Build/Workers/chunk-5VWK76PO.js +511 -0
- package/Build/Workers/chunk-5WU37CUJ.js +630 -0
- package/Build/Workers/chunk-6EBDN5WS.js +97 -0
- package/Build/Workers/chunk-75HIWCEV.js +301 -0
- package/Build/Workers/chunk-77DBX23X.js +455 -0
- package/Build/Workers/chunk-7AMVPXZY.js +1992 -0
- package/Build/Workers/chunk-7BMDD6SM.js +124 -0
- package/Build/Workers/chunk-7GQOWCSN.js +959 -0
- package/Build/Workers/chunk-7J2ONMKC.js +198 -0
- package/Build/Workers/chunk-7MHUHXZZ.js +219 -0
- package/Build/Workers/chunk-7MQPHOAS.js +455 -0
- package/Build/Workers/chunk-7NJ5O7TP.js +387 -0
- package/Build/Workers/chunk-7OME2OKM.js +171 -0
- package/Build/Workers/chunk-7Y642MCO.js +352 -0
- package/Build/Workers/chunk-7ZFKBLUE.js +1054 -0
- package/Build/Workers/chunk-A2BROW3D.js +352 -0
- package/Build/Workers/chunk-A7LGY5XS.js +140 -0
- package/Build/Workers/chunk-AN2NVYL6.js +1483 -0
- package/Build/Workers/chunk-B4XOVZGA.js +476 -0
- package/Build/Workers/chunk-B7PT2VL5.js +630 -0
- package/Build/Workers/chunk-C6XQGBPV.js +476 -0
- package/Build/Workers/chunk-CAEC5DA2.js +57 -0
- package/Build/Workers/chunk-CBCOHH5O.js +837 -0
- package/Build/Workers/chunk-CDLPLYLV.js +1287 -0
- package/Build/Workers/chunk-CEKCKPFN.js +368 -0
- package/Build/Workers/chunk-CEMXKBQO.js +1800 -0
- package/Build/Workers/chunk-CHMDKP5L.js +2342 -0
- package/Build/Workers/chunk-CKW3STKA.js +1067 -0
- package/Build/Workers/chunk-CV5RICKT.js +1992 -0
- package/Build/Workers/chunk-CWGB3D4Z.js +257 -0
- package/Build/Workers/chunk-DBWSISJT.js +56 -0
- package/Build/Workers/chunk-DQEUGBGA.js +2719 -0
- package/Build/Workers/chunk-DSBSPPPJ.js +1344 -0
- package/Build/Workers/chunk-DSGLDRTI.js +278 -0
- package/Build/Workers/chunk-DUBE5G2H.js +497 -0
- package/Build/Workers/chunk-DXD7OPSP.js +1992 -0
- package/Build/Workers/chunk-DXECZBSA.js +368 -0
- package/Build/Workers/chunk-DZIRO6ZK.js +682 -0
- package/Build/Workers/chunk-E4CRPGX5.js +140 -0
- package/Build/Workers/chunk-E4IVMEBH.js +52 -0
- package/Build/Workers/chunk-E4PBNWWK.js +58 -0
- package/Build/Workers/chunk-E5MWOMVC.js +57 -0
- package/Build/Workers/chunk-ECN3VUMA.js +73 -0
- package/Build/Workers/chunk-ECSKVHUB.js +476 -0
- package/Build/Workers/chunk-EE3XBOQI.js +1483 -0
- package/Build/Workers/chunk-EHA2ZDPZ.js +415 -0
- package/Build/Workers/chunk-EKEKPAJF.js +454 -0
- package/Build/Workers/chunk-EL4B5CSQ.js +162 -0
- package/Build/Workers/chunk-EOHKUXPX.js +198 -0
- package/Build/Workers/chunk-ERENMHG2.js +754 -0
- package/Build/Workers/chunk-ESQGFRLZ.js +163 -0
- package/Build/Workers/chunk-FAYBQGKO.js +219 -0
- package/Build/Workers/chunk-FGCXPEZM.js +3201 -0
- package/Build/Workers/chunk-FHCRXPA6.js +44 -0
- package/Build/Workers/chunk-FQ42MT7M.js +58 -0
- package/Build/Workers/chunk-FQDYQG4P.js +1284 -0
- package/Build/Workers/chunk-FTCBY5HH.js +138 -0
- package/Build/Workers/chunk-FV4OWDV4.js +9230 -0
- package/Build/Workers/chunk-FYRNNQSL.js +280 -0
- package/Build/Workers/chunk-GI5RWJAY.js +101 -0
- package/Build/Workers/chunk-GNLMSDRO.js +945 -0
- package/Build/Workers/chunk-GVUJ6O3R.js +73 -0
- package/Build/Workers/chunk-HCGU7OCG.js +97 -0
- package/Build/Workers/chunk-HRIPVWSC.js +58 -0
- package/Build/Workers/chunk-IC3BR6SC.js +102 -0
- package/Build/Workers/chunk-IU3YAYPT.js +1344 -0
- package/Build/Workers/chunk-J7MZR7B2.js +1483 -0
- package/Build/Workers/chunk-JMF4ATAS.js +3794 -0
- package/Build/Workers/chunk-KEJKMITY.js +82 -0
- package/Build/Workers/chunk-KSIEJYNL.js +3822 -0
- package/Build/Workers/chunk-KT3GG7AW.js +754 -0
- package/Build/Workers/chunk-KW2QZDUS.js +147 -0
- package/Build/Workers/chunk-KYCEM22I.js +1800 -0
- package/Build/Workers/chunk-L6B5XPBL.js +73 -0
- package/Build/Workers/chunk-LGJXN2VP.js +352 -0
- package/Build/Workers/chunk-LJTQW46H.js +57 -0
- package/Build/Workers/chunk-LMQGYJME.js +672 -0
- package/Build/Workers/chunk-LOBYJQA4.js +76 -0
- package/Build/Workers/chunk-LOF32O7F.js +163 -0
- package/Build/Workers/chunk-LOTIJA7D.js +124 -0
- package/Build/Workers/chunk-LY2UG3HV.js +38 -0
- package/Build/Workers/chunk-M7Z3MPAX.js +973 -0
- package/Build/Workers/chunk-MHNLTQHO.js +3201 -0
- package/Build/Workers/chunk-ML7OMD72.js +2342 -0
- package/Build/Workers/chunk-NBTGXEMT.js +945 -0
- package/Build/Workers/chunk-NCPJBP24.js +140 -0
- package/Build/Workers/chunk-NFY5V6MR.js +102 -0
- package/Build/Workers/chunk-NQZC37F7.js +38 -0
- package/Build/Workers/chunk-O3X3D2Z3.js +352 -0
- package/Build/Workers/chunk-OBUIHPKF.js +352 -0
- package/Build/Workers/chunk-OYPSUED3.js +1067 -0
- package/Build/Workers/chunk-PAEWNYIV.js +138 -0
- package/Build/Workers/chunk-PANJ7YH6.js +102 -0
- package/Build/Workers/chunk-PCL3Y7H5.js +82 -0
- package/Build/Workers/chunk-PIIUGRQD.js +387 -0
- package/Build/Workers/chunk-POKD22OT.js +2719 -0
- package/Build/Workers/chunk-PQMA7MFS.js +9237 -0
- package/Build/Workers/chunk-PURIPUSY.js +682 -0
- package/Build/Workers/chunk-QIOOTLWN.js +56 -0
- package/Build/Workers/chunk-QQZPPXY4.js +3822 -0
- package/Build/Workers/chunk-QUPRALOD.js +101 -0
- package/Build/Workers/chunk-QXLQLGL2.js +1067 -0
- package/Build/Workers/chunk-RBEVHHXK.js +3201 -0
- package/Build/Workers/chunk-RC4YC3VU.js +278 -0
- package/Build/Workers/chunk-RGNNWVR6.js +171 -0
- package/Build/Workers/chunk-RHO5HV52.js +305 -0
- package/Build/Workers/chunk-SBBIEHYT.js +44 -0
- package/Build/Workers/chunk-SVCZUP5R.js +837 -0
- package/Build/Workers/chunk-SWVZTU6X.js +305 -0
- package/Build/Workers/chunk-T3EUPM5A.js +454 -0
- package/Build/Workers/chunk-TA6IU2XL.js +171 -0
- package/Build/Workers/chunk-TBHW5UME.js +973 -0
- package/Build/Workers/chunk-TLSGD5TR.js +280 -0
- package/Build/Workers/chunk-TOXDLWKZ.js +368 -0
- package/Build/Workers/chunk-TPOX6IOR.js +1054 -0
- package/Build/Workers/chunk-TZBM6TAB.js +124 -0
- package/Build/Workers/chunk-U2OY6MX6.js +398 -0
- package/Build/Workers/chunk-UCY4B5EV.js +288 -0
- package/Build/Workers/chunk-ULNBTI6R.js +138 -0
- package/Build/Workers/chunk-UMUS2AQQ.js +398 -0
- package/Build/Workers/chunk-UZ7GTP2L.js +162 -0
- package/Build/Workers/chunk-V52FEPCV.js +754 -0
- package/Build/Workers/chunk-VBEXZBG5.js +147 -0
- package/Build/Workers/chunk-VC76B6GM.js +959 -0
- package/Build/Workers/chunk-VCUOYHWC.js +519 -0
- package/Build/Workers/chunk-VJIL5H6K.js +2719 -0
- package/Build/Workers/chunk-VMF7KOGY.js +162 -0
- package/Build/Workers/chunk-W3C7OHXF.js +387 -0
- package/Build/Workers/chunk-W5OCKMPJ.js +101 -0
- package/Build/Workers/chunk-WB5GWYDP.js +455 -0
- package/Build/Workers/chunk-WN6MAL25.js +682 -0
- package/Build/Workers/chunk-WTR7KMQA.js +693 -0
- package/Build/Workers/chunk-WTTFMU3P.js +241 -0
- package/Build/Workers/chunk-WULONJZC.js +1800 -0
- package/Build/Workers/chunk-WZPMAVTV.js +511 -0
- package/Build/Workers/chunk-XHT5SVP4.js +52 -0
- package/Build/Workers/chunk-XITBARMZ.js +2342 -0
- package/Build/Workers/chunk-XLQZNQ4Z.js +163 -0
- package/Build/Workers/chunk-XZ6HDXKM.js +76 -0
- package/Build/Workers/chunk-Y7KVUJEB.js +219 -0
- package/Build/Workers/chunk-Y7NDFEQ3.js +398 -0
- package/Build/Workers/chunk-YBBQDYX2.js +301 -0
- package/Build/Workers/chunk-YHPYPVAB.js +837 -0
- package/Build/Workers/chunk-YNKK6BXY.js +454 -0
- package/Build/Workers/chunk-YRAJ74HR.js +305 -0
- package/Build/Workers/chunk-YULTZK5O.js +147 -0
- package/Build/Workers/chunk-YUNQYP3Z.js +9237 -0
- package/Build/Workers/chunk-Z6JV4DZG.js +1046 -0
- package/Build/Workers/chunk-Z7BONRW2.js +241 -0
- package/Build/Workers/chunk-ZK2R3DEJ.js +1054 -0
- package/Build/Workers/chunk-ZTK5EBUI.js +76 -0
- package/Build/Workers/chunk-ZZPDORJK.js +56 -0
- package/Build/Workers/combineGeometry.js +24 -24
- package/Build/Workers/createBoxGeometry.js +18 -18
- package/Build/Workers/createBoxOutlineGeometry.js +18 -18
- package/Build/Workers/createCircleGeometry.js +26 -26
- package/Build/Workers/createCircleOutlineGeometry.js +19 -19
- package/Build/Workers/createCoplanarPolygonGeometry.js +39 -39
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +33 -33
- package/Build/Workers/createCorridorGeometry.js +36 -37
- package/Build/Workers/createCorridorOutlineGeometry.js +34 -35
- package/Build/Workers/createCylinderGeometry.js +20 -20
- package/Build/Workers/createCylinderOutlineGeometry.js +20 -20
- 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 +20 -20
- package/Build/Workers/createGeometry.js +25 -24
- package/Build/Workers/createGroundPolylineGeometry.js +98 -34
- package/Build/Workers/createMvtTile.js +111 -19
- package/Build/Workers/createPlaneGeometry.js +18 -18
- package/Build/Workers/createPlaneOutlineGeometry.js +17 -17
- package/Build/Workers/createPolygonGeometry.js +36 -36
- package/Build/Workers/createPolygonOutlineGeometry.js +33 -33
- package/Build/Workers/createPolylineGeometry.js +28 -28
- package/Build/Workers/createPolylineVolumeGeometry.js +38 -36
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +32 -31
- package/Build/Workers/createRectangleGeometry.js +29 -29
- package/Build/Workers/createRectangleOutlineGeometry.js +23 -23
- package/Build/Workers/createSimplePolylineGeometry.js +26 -26
- 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 +26 -26
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +23 -23
- package/Build/Workers/createVerticesFromHeightmap.js +23 -23
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +21 -21
- package/Build/Workers/createWallGeometry.js +26 -26
- package/Build/Workers/createWallOutlineGeometry.js +26 -26
- package/Build/Workers/decodeDraco.js +10 -10
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +993 -2334
- 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 +23 -23
- package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +26 -26
- package/Source/Core/ArcGISTiledElevationTerrainProvider.js +1 -5
- package/Source/Core/BoundingRectangle.js +6 -8
- package/Source/Core/BoundingSphere.js +0 -3
- package/Source/Core/Cartesian2.js +1 -1
- package/Source/Core/Cartesian3.js +1 -1
- package/Source/Core/Cartesian4.js +1 -1
- package/Source/Core/Cesium3DTilesTerrainGeometryProcessor.js +3 -4
- package/Source/Core/Color.js +1 -0
- package/Source/Core/ComponentDatatype.js +35 -0
- package/Source/Core/CoplanarPolygonGeometry.js +2 -2
- package/Source/Core/CorridorGeometry.js +2 -4
- package/Source/Core/CorridorOutlineGeometry.js +1 -3
- package/Source/Core/EarthOrientationParameters.js +2 -2
- package/Source/Core/EllipseGeometryLibrary.js +2 -2
- package/Source/Core/EllipsoidGeodesic.js +3 -3
- package/Source/Core/EllipsoidRhumbLine.js +1 -1
- package/Source/Core/GroundPolylineGeometry.js +99 -4
- package/Source/Core/Heap.js +1 -1
- package/Source/Core/HermitePolynomialApproximation.js +215 -179
- package/Source/Core/InterpolationAlgorithm.js +58 -50
- package/Source/Core/Ion.js +1 -1
- package/Source/Core/JulianDate.js +1 -1
- package/Source/Core/LagrangePolynomialApproximation.js +55 -52
- package/Source/Core/LinearApproximation.js +69 -66
- package/Source/Core/MapProjection.js +1 -0
- package/Source/Core/Math.js +59 -0
- package/Source/Core/Matrix2.js +3 -3
- package/Source/Core/Matrix3.js +3 -3
- package/Source/Core/Matrix4.js +1 -1
- package/Source/Core/OrthographicFrustum.js +1 -1
- package/Source/Core/PerspectiveFrustum.js +1 -1
- package/Source/Core/PolygonGeometry.js +2 -2
- package/Source/Core/PolygonGeometryLibrary.js +1 -1
- package/Source/Core/PolygonOutlineGeometry.js +1 -1
- package/Source/Core/PolylineGeometry.js +1 -1
- package/Source/Core/PolylinePipeline.js +9 -2
- package/Source/Core/PolylineVolumeGeometryLibrary.js +1 -1
- package/Source/Core/Rectangle.js +7 -1
- package/Source/Core/RectangleOutlineGeometry.js +1 -1
- package/Source/Core/Resource.js +1 -1
- package/Source/Core/ScreenSpaceEventHandler.js +51 -41
- package/Source/Core/SimplePolylineGeometry.js +1 -1
- package/Source/Core/TerrainEncoding.js +2 -2
- package/Source/Core/TerrainMesh.js +3 -3
- package/Source/Core/TerrainPicker.js +180 -168
- package/Source/Core/TimeIntervalCollection.js +1 -3
- package/Source/Core/Tipsify.js +1 -1
- package/Source/Core/Transforms.js +5 -1
- package/Source/Core/VectorPipeline.js +1117 -0
- package/Source/Core/VectorProvider.js +429 -0
- package/Source/Core/WallOutlineGeometry.js +1 -1
- package/Source/Core/createColorRamp.js +37 -0
- package/Source/Core/getTimestamp.js +4 -2
- package/Source/Core/globalTypes.js +25 -0
- package/Source/Core/writeTextToCanvas.js +1 -0
- package/Source/DataSources/CompositeEntityCollection.js +0 -1
- package/Source/DataSources/CzmlDataSource.js +14 -0
- package/Source/DataSources/DataSourceDisplay.js +1 -1
- package/Source/DataSources/GeoJsonDataSource.js +0 -1
- package/Source/DataSources/GeometryVisualizer.js +1 -1
- package/Source/DataSources/KmlDataSource.js +529 -557
- package/Source/DataSources/PathGraphics.js +8 -1
- package/Source/DataSources/PathMode.js +27 -0
- package/Source/DataSources/PathVisualizer.js +298 -1
- package/Source/DataSources/PolylineGeometryUpdater.js +125 -7
- package/Source/DataSources/PolylineVisualizer.js +1 -1
- package/Source/DataSources/StaticOutlineGeometryBatch.js +1 -1
- package/Source/Renderer/AutomaticUniforms.js +23 -0
- package/Source/Renderer/Context.js +9 -3
- package/Source/Renderer/DrawCommand.js +22 -0
- package/Source/Renderer/Framebuffer.js +4 -0
- package/Source/Renderer/Pass.js +11 -9
- package/Source/Renderer/Texture.js +12 -1
- package/Source/Renderer/UniformState.js +7 -0
- package/Source/Renderer/VertexArray.js +1 -1
- package/Source/Renderer/createUniform.js +346 -239
- package/Source/Renderer/createUniformArray.js +494 -381
- package/Source/Scene/ArcGisMapServerImageryProvider.js +0 -5
- package/Source/Scene/ArcGisMapService.js +1 -1
- package/Source/Scene/Billboard.js +2 -1
- package/Source/Scene/BillboardCollection.js +15 -5
- package/Source/Scene/BillboardTexture.js +5 -3
- package/Source/Scene/BufferPointCollection.js +11 -1
- package/Source/Scene/BufferPolygonCollection.js +26 -0
- package/Source/Scene/BufferPolylineCollection.js +2 -0
- package/Source/Scene/BufferPrimitiveCollection.js +105 -32
- package/Source/Scene/Camera.js +137 -8
- package/Source/Scene/CameraEventAggregator.js +30 -18
- package/Source/Scene/CameraFlightPath.js +17 -0
- package/Source/Scene/Cesium3DTile.js +102 -4
- package/Source/Scene/Cesium3DTileContent.js +195 -254
- package/Source/Scene/Cesium3DTileContentFactory.js +10 -2
- package/Source/Scene/Cesium3DTileOptimizations.js +4 -6
- package/Source/Scene/Cesium3DTileStyle.js +40 -0
- package/Source/Scene/Cesium3DTileset.js +213 -8
- package/Source/Scene/Cesium3DTilesetTraversal.js +14 -0
- package/Source/Scene/ClippingPlaneCollection.js +4 -4
- package/Source/Scene/ClippingPolygon.js +2 -0
- package/Source/Scene/ClippingPolygonCollection.js +2 -2
- package/Source/Scene/ColumbusWorlds.js +190 -0
- package/Source/Scene/Composite3DTileContent.js +254 -292
- package/Source/Scene/Controllers/Controller.js +63 -0
- package/Source/Scene/Controllers/ControllerHost.js +78 -0
- package/Source/Scene/Controllers/HybridScreenSpacePanCameraController.js +106 -0
- package/Source/Scene/Controllers/MouseButton.js +32 -0
- package/Source/Scene/Controllers/ScreenSpaceElevatorCameraController.js +295 -0
- package/Source/Scene/Controllers/ScreenSpaceInputBindings.js +154 -0
- package/Source/Scene/Controllers/ScreenSpaceMapCameraController.js +310 -0
- package/Source/Scene/Controllers/ScreenSpaceTiltOrbitCameraController.js +642 -0
- package/Source/Scene/Controllers/ScreenSpaceZoomCameraController.js +431 -0
- package/Source/Scene/Controllers/defaultPickWorldPosition.js +84 -0
- package/Source/Scene/DerivedCommand.js +98 -0
- package/Source/Scene/EdgeDisplayMode.js +50 -0
- package/Source/Scene/EdgeFramebuffer.js +1 -5
- package/Source/Scene/Empty3DTileContent.js +100 -132
- package/Source/Scene/Expression.js +6 -8
- package/Source/Scene/FrameState.js +27 -0
- package/Source/Scene/GaussianSplat3DTileContent.js +436 -478
- package/Source/Scene/GeoJsonPrimitive.js +874 -0
- package/Source/Scene/Geometry3DTileContent.js +151 -185
- package/Source/Scene/Globe.js +110 -22
- package/Source/Scene/GlobeDepth.js +243 -6
- package/Source/Scene/GlobeSurfaceShaderSet.js +637 -540
- package/Source/Scene/GlobeSurfaceTile.js +575 -398
- package/Source/Scene/GlobeSurfaceTileProvider.js +2289 -1842
- package/Source/Scene/GltfBufferViewLoader.js +3 -3
- package/Source/Scene/GltfLoader.js +146 -3
- package/Source/Scene/GltfLoaderUtil.js +20 -4
- package/Source/Scene/GltfPipeline/forEachTextureInMaterial.js +10 -0
- package/Source/Scene/GltfPipeline/removeUnusedElements.js +21 -11
- package/Source/Scene/GltfSpzLoader.js +1 -1
- package/Source/Scene/GltfVertexBufferLoader.js +6 -3
- package/Source/Scene/GroundPolylinePrimitive.js +2 -1
- package/Source/Scene/I3SDataProvider.js +1 -1
- package/Source/Scene/I3SLayer.js +1 -1
- package/Source/Scene/I3SNode.js +2 -2
- package/Source/Scene/ImageryLayer.js +2 -2
- package/Source/Scene/ImageryLayerCollection.js +190 -6
- package/Source/Scene/Implicit3DTileContent.js +192 -216
- package/Source/Scene/ImplicitTileCoordinates.js +17 -0
- package/Source/Scene/IonImageryProvider.js +1 -5
- package/Source/Scene/Label.js +4 -4
- package/Source/Scene/LabelCollection.js +4 -1
- package/Source/Scene/MVTDataProvider.js +555 -0
- package/Source/Scene/Material.js +1 -0
- package/Source/Scene/Model/B3dmLoader.js +1 -2
- package/Source/Scene/Model/EdgeVisibilityPipelineStage.js +82 -312
- package/Source/Scene/Model/Extensions/Gpm/GltfGpmLoader.js +4 -0
- package/Source/Scene/Model/I3dmLoader.js +1 -1
- package/Source/Scene/Model/InstancingPipelineStage.js +4 -7
- package/Source/Scene/Model/MaterialPipelineStage.js +124 -1
- package/Source/Scene/Model/Model.js +45 -10
- package/Source/Scene/Model/Model3DTileContent.js +424 -458
- package/Source/Scene/Model/ModelClippingPlanesPipelineStage.js +28 -1
- package/Source/Scene/Model/ModelDrawCommand.js +180 -8
- package/Source/Scene/Model/ModelDrawCommands.js +4 -0
- package/Source/Scene/Model/ModelSceneGraph.js +21 -0
- package/Source/Scene/Model/ModelUtility.js +5 -0
- package/Source/Scene/Model/PickingPipelineStage.js +29 -0
- package/Source/Scene/Model/PrimitiveRenderResources.js +24 -0
- package/Source/Scene/Model/createVectorTileBuffersFromModelComponents.js +645 -153
- package/Source/Scene/ModelComponents.js +112 -0
- package/Source/Scene/Multiple3DTileContent.js +291 -334
- package/Source/Scene/MvtLabelCandidates.js +295 -0
- package/Source/Scene/MvtLabelManager.js +1069 -0
- package/Source/Scene/Picking.js +19 -3
- package/Source/Scene/PlanarFillIdFramebuffer.js +172 -0
- package/Source/Scene/PntsParser.js +1 -1
- package/Source/Scene/Polyline.js +32 -5
- package/Source/Scene/PolylineCollection.js +39 -0
- package/Source/Scene/PostProcessStage.js +4 -2
- package/Source/Scene/Primitive.js +12 -13
- package/Source/Scene/PrimitivePipeline.js +158 -28
- package/Source/Scene/QuadtreePrimitive.js +3 -2
- package/Source/Scene/ResourceCache.js +7 -4
- package/Source/Scene/ResourceCacheKey.js +21 -18
- package/Source/Scene/Scene.js +655 -6
- package/Source/Scene/SceneTransforms.js +18 -0
- package/Source/Scene/ScreenSpaceCameraController.js +12 -3
- package/Source/Scene/ShadowMap.js +9 -3
- package/Source/Scene/ShadowMapShader.js +50 -2
- package/Source/Scene/SnapFramebuffer.js +121 -0
- package/Source/Scene/Snapping.js +184 -0
- package/Source/Scene/TerrainFillMesh.js +3 -2
- package/Source/Scene/Tileset3DTileContent.js +113 -146
- package/Source/Scene/UrlTemplate3DTilesDataProvider.js +543 -0
- package/Source/Scene/Vector3DTileContent.js +207 -237
- package/Source/Scene/VectorGltf3DTileContent.js +185 -45
- package/Source/Scene/View.js +10 -8
- package/Source/Scene/VoxelPrimitive.js +159 -175
- package/Source/Scene/VoxelProvider.js +64 -91
- package/Source/Scene/VoxelTraversal.js +1 -1
- package/Source/Scene/buildVectorGltfFromMVT.js +1208 -0
- package/Source/Scene/buildVoxelCustomShader.js +199 -0
- package/Source/Scene/createElevationBandMaterial.js +1 -1
- package/Source/Scene/decodeMVT.js +877 -0
- package/Source/Scene/findMeshoptExtension.js +23 -0
- package/Source/Scene/renderBufferPointCollection.js +114 -64
- package/Source/Scene/renderBufferPolygonCollection.js +245 -53
- package/Source/Scene/renderBufferPolylineCollection.js +271 -145
- package/Source/Shaders/BillboardCollectionVS.glsl +23 -25
- package/Source/Shaders/BillboardCollectionVS.js +23 -25
- package/Source/Shaders/BufferPointMaterialFS.glsl +1 -0
- package/Source/Shaders/BufferPointMaterialFS.js +1 -0
- package/Source/Shaders/BufferPointMaterialVS.glsl +19 -9
- package/Source/Shaders/BufferPointMaterialVS.js +20 -10
- package/Source/Shaders/BufferPolygonMaterialFS.glsl +13 -0
- package/Source/Shaders/BufferPolygonMaterialFS.js +13 -0
- package/Source/Shaders/BufferPolygonMaterialVS.glsl +22 -4
- package/Source/Shaders/BufferPolygonMaterialVS.js +23 -5
- package/Source/Shaders/BufferPolylineMaterialVS.glsl +16 -2
- package/Source/Shaders/BufferPolylineMaterialVS.js +17 -3
- package/Source/Shaders/Builtin/Constants/passCesium3DTile.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passCesium3DTile.js +1 -1
- package/Source/Shaders/Builtin/Constants/passCesium3DTileClassification.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passCesium3DTileClassification.js +1 -1
- package/Source/Shaders/Builtin/Constants/passCesium3DTileClassificationIgnoreShow.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passCesium3DTileClassificationIgnoreShow.js +1 -1
- package/Source/Shaders/Builtin/Constants/passCesium3DTileEdgesDirect.glsl +9 -0
- package/Source/Shaders/Builtin/Constants/passCesium3DTileEdgesDirect.js +11 -0
- package/Source/Shaders/Builtin/Constants/passCesium3DTilePlanarFillId.glsl +9 -0
- package/Source/Shaders/Builtin/Constants/passCesium3DTilePlanarFillId.js +11 -0
- package/Source/Shaders/Builtin/Constants/passClassification.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passClassification.js +1 -1
- package/Source/Shaders/Builtin/Constants/passGaussianSplats.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passGaussianSplats.js +1 -1
- package/Source/Shaders/Builtin/Constants/passOpaque.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passOpaque.js +1 -1
- package/Source/Shaders/Builtin/Constants/passOverlay.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passOverlay.js +1 -1
- package/Source/Shaders/Builtin/Constants/passTranslucent.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passTranslucent.js +1 -1
- package/Source/Shaders/Builtin/Constants/passVoxels.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passVoxels.js +1 -1
- package/Source/Shaders/Builtin/CzmBuiltins.js +4 -0
- package/Source/Shaders/GlobeFS.glsl +10 -6
- package/Source/Shaders/GlobeFS.js +10 -6
- package/Source/Shaders/Materials/PolylineGlowMaterial.glsl +1 -1
- package/Source/Shaders/Materials/PolylineGlowMaterial.js +1 -1
- package/Source/Shaders/Model/EdgeVisibilityStageVS.glsl +0 -1
- package/Source/Shaders/Model/EdgeVisibilityStageVS.js +0 -1
- package/Source/Shaders/Model/MaterialStageFS.glsl +8 -2
- package/Source/Shaders/Model/MaterialStageFS.js +8 -2
- package/Source/Shaders/Model/ModelFS.glsl +105 -0
- package/Source/Shaders/Model/ModelFS.js +105 -0
- package/Source/Shaders/PolylineShadowVolumeFS.glsl +14 -0
- package/Source/Shaders/PolylineShadowVolumeFS.js +14 -0
- package/Source/Shaders/RestoreDepth.glsl +8 -0
- package/Source/Shaders/RestoreDepth.js +10 -0
- package/Source/Shaders/VectorCommon.glsl +178 -0
- package/Source/Shaders/VectorCommon.js +180 -0
- package/Source/ThirdParty/zip-module.wasm +0 -0
- package/Source/Widget/CesiumWidget.js +30 -0
- package/Source/Workers/createMvtTile.js +39 -0
- package/Source/Workers/decodeGoogleEarthEnterprisePacket.js +2 -2
- package/Source/Workers/incrementallyBuildTerrainPicker.js +2 -0
- package/index.d.ts +535 -1393
- package/index.js +125 -93
- package/package.json +13 -13
|
@@ -2,6 +2,7 @@ import Cartesian2 from "../../Core/Cartesian2.js";
|
|
|
2
2
|
import ClippingPlaneCollection from "../ClippingPlaneCollection.js";
|
|
3
3
|
import combine from "../../Core/combine.js";
|
|
4
4
|
import Color from "../../Core/Color.js";
|
|
5
|
+
import Matrix4 from "../../Core/Matrix4.js";
|
|
5
6
|
import ModelClippingPlanesStageFS from "../../Shaders/Model/ModelClippingPlanesStageFS.js";
|
|
6
7
|
import ShaderDestination from "../../Renderer/ShaderDestination.js";
|
|
7
8
|
|
|
@@ -17,6 +18,9 @@ const ModelClippingPlanesPipelineStage = {
|
|
|
17
18
|
};
|
|
18
19
|
|
|
19
20
|
const textureResolutionScratch = new Cartesian2();
|
|
21
|
+
const scratchClippingPlanesMatrix = new Matrix4();
|
|
22
|
+
const scratchClippingPlanesMatrix2 = new Matrix4();
|
|
23
|
+
|
|
20
24
|
/**
|
|
21
25
|
* Process a model. This modifies the following parts of the render resources:
|
|
22
26
|
*
|
|
@@ -116,7 +120,30 @@ ModelClippingPlanesPipelineStage.process = function (
|
|
|
116
120
|
return style;
|
|
117
121
|
},
|
|
118
122
|
model_clippingPlanesMatrix: function () {
|
|
119
|
-
|
|
123
|
+
// The clipping planes matrix is factored into a view-dependent and a
|
|
124
|
+
// view-independent part:
|
|
125
|
+
// inverseTranspose(view3D * reference * clipping)
|
|
126
|
+
// = transpose(inverseView3D) * inverseTranspose(reference * clipping).
|
|
127
|
+
//
|
|
128
|
+
// The view-dependent part, transpose(inverseView3D), reuses inverseView3D
|
|
129
|
+
// already maintained on UniformState. Since it uses the active view, this is
|
|
130
|
+
// also correct in the shadow cast pass, where inverseView3D is the light's
|
|
131
|
+
// view rather than the camera's. Only a transpose is needed here, no inverse.
|
|
132
|
+
const inverseViewTranspose = Matrix4.transpose(
|
|
133
|
+
context.uniformState.inverseView3D,
|
|
134
|
+
scratchClippingPlanesMatrix,
|
|
135
|
+
);
|
|
136
|
+
// The view-independent part, inverseTranspose(reference * clipping), is
|
|
137
|
+
// computed once per frame in Model.updateReferenceMatrices.
|
|
138
|
+
//
|
|
139
|
+
// This recomputes the same product for every primitive of a model within
|
|
140
|
+
// a pass. If it ever shows up in profiling, see the discussion of
|
|
141
|
+
// alternatives in https://github.com/CesiumGS/cesium/pull/13388.
|
|
142
|
+
return Matrix4.multiply(
|
|
143
|
+
inverseViewTranspose,
|
|
144
|
+
model._clippingPlanesMatrix,
|
|
145
|
+
scratchClippingPlanesMatrix2,
|
|
146
|
+
);
|
|
120
147
|
},
|
|
121
148
|
};
|
|
122
149
|
|
|
@@ -14,6 +14,7 @@ import BlendingState from "../BlendingState.js";
|
|
|
14
14
|
import CullFace from "../CullFace.js";
|
|
15
15
|
import SceneMode from "../SceneMode.js";
|
|
16
16
|
import ShadowMode from "../ShadowMode.js";
|
|
17
|
+
import EdgeDisplayMode from "../EdgeDisplayMode.js";
|
|
17
18
|
import StencilConstants from "../StencilConstants.js";
|
|
18
19
|
import StencilFunction from "../StencilFunction.js";
|
|
19
20
|
import StencilOperation from "../StencilOperation.js";
|
|
@@ -102,6 +103,9 @@ function ModelDrawCommand(options) {
|
|
|
102
103
|
this._needsSkipLevelOfDetailCommands = needsSkipLevelOfDetailCommands;
|
|
103
104
|
this._needsSilhouetteCommands = needsSilhouetteCommands;
|
|
104
105
|
this._needsEdgeCommands = needsEdgeCommands;
|
|
106
|
+
// Non-behind planar fill primitives write their feature IDs in a pre-pass
|
|
107
|
+
// so that behind fills can test same-object coplanarity.
|
|
108
|
+
this._needsPlanarFillIdCommand = renderResources.planarFillIdPass;
|
|
105
109
|
|
|
106
110
|
// Derived commands
|
|
107
111
|
this._originalCommand = undefined;
|
|
@@ -111,6 +115,10 @@ function ModelDrawCommand(options) {
|
|
|
111
115
|
this._silhouetteModelCommand = undefined;
|
|
112
116
|
this._silhouetteColorCommand = undefined;
|
|
113
117
|
this._edgeCommand = undefined;
|
|
118
|
+
// Snap-pass variant of the edge command, pinned at 1 px width.
|
|
119
|
+
// See deriveEdgeCommand.
|
|
120
|
+
this._edgeSnapCommand = undefined;
|
|
121
|
+
this._planarFillIdCommand = undefined;
|
|
114
122
|
|
|
115
123
|
// All derived commands (including 2D commands)
|
|
116
124
|
this._derivedCommands = [];
|
|
@@ -225,8 +233,27 @@ function initialize(drawCommand) {
|
|
|
225
233
|
|
|
226
234
|
if (drawCommand._needsEdgeCommands) {
|
|
227
235
|
const renderResources = drawCommand._primitiveRenderResources;
|
|
236
|
+
const edgeGeometry = renderResources.edgeGeometry;
|
|
237
|
+
const colorLineWidth = defined(edgeGeometry.lineWidth)
|
|
238
|
+
? edgeGeometry.lineWidth
|
|
239
|
+
: 1.0;
|
|
240
|
+
// Snap-pass edge width is held at 1 px independent of the color width.
|
|
241
|
+
// A wider snap band results in snap wiggle: as the cursor moves
|
|
242
|
+
// perpendicular to an edge inside the band, the "edge pixel nearest
|
|
243
|
+
// the cursor" shifts, so Snapping.snap returns a slightly different
|
|
244
|
+
// point each frame.
|
|
245
|
+
const snapLineWidth = 1.0;
|
|
246
|
+
|
|
228
247
|
drawCommand._edgeCommand = new ModelDerivedCommand({
|
|
229
|
-
command: deriveEdgeCommand(command, renderResources,
|
|
248
|
+
command: deriveEdgeCommand(command, renderResources, colorLineWidth),
|
|
249
|
+
updateShadows: false,
|
|
250
|
+
updateBackFaceCulling: false,
|
|
251
|
+
updateCullFace: false,
|
|
252
|
+
updateDebugShowBoundingVolume: false,
|
|
253
|
+
});
|
|
254
|
+
|
|
255
|
+
drawCommand._edgeSnapCommand = new ModelDerivedCommand({
|
|
256
|
+
command: deriveEdgeCommand(command, renderResources, snapLineWidth),
|
|
230
257
|
updateShadows: false,
|
|
231
258
|
updateBackFaceCulling: false,
|
|
232
259
|
updateCullFace: false,
|
|
@@ -234,6 +261,19 @@ function initialize(drawCommand) {
|
|
|
234
261
|
});
|
|
235
262
|
|
|
236
263
|
derivedCommands.push(drawCommand._edgeCommand);
|
|
264
|
+
derivedCommands.push(drawCommand._edgeSnapCommand);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
if (drawCommand._needsPlanarFillIdCommand) {
|
|
268
|
+
drawCommand._planarFillIdCommand = new ModelDerivedCommand({
|
|
269
|
+
command: derivePlanarFillIdCommand(command),
|
|
270
|
+
updateShadows: false,
|
|
271
|
+
updateBackFaceCulling: false,
|
|
272
|
+
updateCullFace: false,
|
|
273
|
+
updateDebugShowBoundingVolume: false,
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
derivedCommands.push(drawCommand._planarFillIdCommand);
|
|
237
277
|
}
|
|
238
278
|
}
|
|
239
279
|
|
|
@@ -572,13 +612,17 @@ ModelDrawCommand.prototype.pushCommands = function (frameState, result) {
|
|
|
572
612
|
return;
|
|
573
613
|
}
|
|
574
614
|
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
615
|
+
// Skip surface rendering if EDGES_ONLY mode is enabled and this primitive
|
|
616
|
+
// has edge visibility data. Only the edges will render (via pushEdgeCommands).
|
|
617
|
+
if (
|
|
618
|
+
this._model.edgeDisplayMode === EdgeDisplayMode.EDGES_ONLY &&
|
|
619
|
+
this._needsEdgeCommands
|
|
620
|
+
) {
|
|
621
|
+
return result;
|
|
580
622
|
}
|
|
581
623
|
|
|
624
|
+
pushCommand(result, this._originalCommand, use2D);
|
|
625
|
+
|
|
582
626
|
return result;
|
|
583
627
|
};
|
|
584
628
|
|
|
@@ -623,12 +667,87 @@ ModelDrawCommand.prototype.pushEdgeCommands = function (frameState, result) {
|
|
|
623
667
|
return result;
|
|
624
668
|
}
|
|
625
669
|
|
|
670
|
+
const mode = this._model.edgeDisplayMode;
|
|
671
|
+
const passes = frameState.passes;
|
|
626
672
|
const use2D = shouldUse2DCommands(this, frameState);
|
|
673
|
+
|
|
674
|
+
if (passes.snap) {
|
|
675
|
+
// Snapping pass: route the 1 px snap variant directly into the bound
|
|
676
|
+
// snap framebuffer, regardless of display mode -- snapping works even
|
|
677
|
+
// when edges are visually suppressed (SURFACES_ONLY).
|
|
678
|
+
const edgeCommand = this._edgeSnapCommand;
|
|
679
|
+
edgeCommand.command.pass = Pass.CESIUM_3D_TILE_EDGES_DIRECT;
|
|
680
|
+
if (defined(edgeCommand.derivedCommand2D)) {
|
|
681
|
+
edgeCommand.derivedCommand2D.command.pass =
|
|
682
|
+
Pass.CESIUM_3D_TILE_EDGES_DIRECT;
|
|
683
|
+
}
|
|
684
|
+
pushCommand(result, edgeCommand, use2D);
|
|
685
|
+
return result;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
if (passes.pick) {
|
|
689
|
+
// Plain pick pass: edges contribute nothing to the RGBA8 pick
|
|
690
|
+
// framebuffer except in EDGES_ONLY mode, where they are the only
|
|
691
|
+
// pickable geometry (pushCommands skips the surface command).
|
|
692
|
+
if (mode !== EdgeDisplayMode.EDGES_ONLY) {
|
|
693
|
+
return result;
|
|
694
|
+
}
|
|
695
|
+
const edgeCommand = this._edgeCommand;
|
|
696
|
+
edgeCommand.command.pass = Pass.CESIUM_3D_TILE_EDGES_DIRECT;
|
|
697
|
+
if (defined(edgeCommand.derivedCommand2D)) {
|
|
698
|
+
edgeCommand.derivedCommand2D.command.pass =
|
|
699
|
+
Pass.CESIUM_3D_TILE_EDGES_DIRECT;
|
|
700
|
+
}
|
|
701
|
+
pushCommand(result, edgeCommand, use2D);
|
|
702
|
+
return result;
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
// Color pass. SURFACES_ONLY mode suppresses all edge rendering.
|
|
706
|
+
if (mode === EdgeDisplayMode.SURFACES_ONLY) {
|
|
707
|
+
return result;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
// Use direct pass (renders to currently bound framebuffer) when EDGES_ONLY
|
|
711
|
+
// mode is enabled, otherwise use MRT pass (renders to edge framebuffer for
|
|
712
|
+
// compositing).
|
|
713
|
+
const edgePass =
|
|
714
|
+
mode === EdgeDisplayMode.EDGES_ONLY
|
|
715
|
+
? Pass.CESIUM_3D_TILE_EDGES_DIRECT
|
|
716
|
+
: Pass.CESIUM_3D_TILE_EDGES;
|
|
717
|
+
|
|
718
|
+
this._edgeCommand.command.pass = edgePass;
|
|
719
|
+
if (defined(this._edgeCommand.derivedCommand2D)) {
|
|
720
|
+
this._edgeCommand.derivedCommand2D.command.pass = edgePass;
|
|
721
|
+
}
|
|
722
|
+
|
|
627
723
|
pushCommand(result, this._edgeCommand, use2D);
|
|
628
724
|
|
|
629
725
|
return result;
|
|
630
726
|
};
|
|
631
727
|
|
|
728
|
+
/**
|
|
729
|
+
* Push the planar fill feature-ID pre-pass command (if any).
|
|
730
|
+
*
|
|
731
|
+
* @param {FrameState} frameState The frame state.
|
|
732
|
+
* @param {DrawCommand[]} result The draw commands to push to.
|
|
733
|
+
* @returns {DrawCommand[]} The modified command list.
|
|
734
|
+
*
|
|
735
|
+
* @private
|
|
736
|
+
*/
|
|
737
|
+
ModelDrawCommand.prototype.pushPlanarFillIdCommands = function (
|
|
738
|
+
frameState,
|
|
739
|
+
result,
|
|
740
|
+
) {
|
|
741
|
+
if (!defined(this._planarFillIdCommand)) {
|
|
742
|
+
return result;
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
const use2D = shouldUse2DCommands(this, frameState);
|
|
746
|
+
pushCommand(result, this._planarFillIdCommand, use2D);
|
|
747
|
+
|
|
748
|
+
return result;
|
|
749
|
+
};
|
|
750
|
+
|
|
632
751
|
function pushCommand(commandList, derivedCommand, use2D) {
|
|
633
752
|
commandList.push(derivedCommand.command);
|
|
634
753
|
if (use2D) {
|
|
@@ -688,6 +807,8 @@ function derive2DCommands(drawCommand) {
|
|
|
688
807
|
derive2DCommand(drawCommand, drawCommand._silhouetteModelCommand);
|
|
689
808
|
derive2DCommand(drawCommand, drawCommand._silhouetteColorCommand);
|
|
690
809
|
derive2DCommand(drawCommand, drawCommand._edgeCommand);
|
|
810
|
+
derive2DCommand(drawCommand, drawCommand._edgeSnapCommand);
|
|
811
|
+
derive2DCommand(drawCommand, drawCommand._planarFillIdCommand);
|
|
691
812
|
}
|
|
692
813
|
|
|
693
814
|
function deriveTranslucentCommand(command) {
|
|
@@ -796,7 +917,13 @@ function deriveSilhouetteColorCommand(command, model) {
|
|
|
796
917
|
return silhouetteColorCommand;
|
|
797
918
|
}
|
|
798
919
|
|
|
799
|
-
|
|
920
|
+
// Builds an edge draw command at the given screen-space line width.
|
|
921
|
+
//
|
|
922
|
+
// Two variants are derived per primitive (one for the color pass and one
|
|
923
|
+
// for the snapping pass). Therefore, the visual line width and the snap-pass line
|
|
924
|
+
// width can be set independently. The snap variant is pinned at 1 px to
|
|
925
|
+
// avoid snap wiggle (see initialize). In practice both default to 1 px.
|
|
926
|
+
function deriveEdgeCommand(command, renderResources, lineWidth) {
|
|
800
927
|
const edgeGeometry = renderResources.edgeGeometry;
|
|
801
928
|
const edgeCommand = DrawCommand.shallowClone(command);
|
|
802
929
|
|
|
@@ -818,7 +945,11 @@ function deriveEdgeCommand(command, renderResources) {
|
|
|
818
945
|
uniformMap.u_isEdgePass = function () {
|
|
819
946
|
return true; // This is the edge pass
|
|
820
947
|
};
|
|
821
|
-
|
|
948
|
+
|
|
949
|
+
// Set line width uniform for quad-based edge rendering
|
|
950
|
+
uniformMap.u_lineWidth = function () {
|
|
951
|
+
return lineWidth;
|
|
952
|
+
};
|
|
822
953
|
|
|
823
954
|
edgeCommand.uniformMap = uniformMap;
|
|
824
955
|
edgeCommand.castShadows = false;
|
|
@@ -827,6 +958,47 @@ function deriveEdgeCommand(command, renderResources) {
|
|
|
827
958
|
return edgeCommand;
|
|
828
959
|
}
|
|
829
960
|
|
|
961
|
+
/**
|
|
962
|
+
* Derive a command for the planar fill feature-ID pre-pass.
|
|
963
|
+
*
|
|
964
|
+
* This command uses the same geometry as the original but writes only a
|
|
965
|
+
* feature-ID value to the color attachment (no lighting, no material).
|
|
966
|
+
* The fragment shader outputs <code>vec4(featureId, 0, 0, 1)</code>
|
|
967
|
+
* via the <code>PLANAR_FILL_ID_PASS</code> define.
|
|
968
|
+
*
|
|
969
|
+
* No polygon offset is applied: the pre-pass uses the natural depth of the
|
|
970
|
+
* non-behind planar fill geometry (same program as the main command minus
|
|
971
|
+
* the POLYGON_OFFSET path that would shift it).
|
|
972
|
+
*
|
|
973
|
+
* Like the other derived commands (translucent, silhouette, edge, etc.),
|
|
974
|
+
* this is called once per draw command from <code>initialize</code> when the
|
|
975
|
+
* ModelDrawCommand is constructed — not per frame.
|
|
976
|
+
*
|
|
977
|
+
* @param {DrawCommand} command The original draw command.
|
|
978
|
+
* @returns {DrawCommand} The derived command for the feature-ID pass.
|
|
979
|
+
* @private
|
|
980
|
+
*/
|
|
981
|
+
function derivePlanarFillIdCommand(command) {
|
|
982
|
+
const derived = DrawCommand.shallowClone(command);
|
|
983
|
+
derived.pass = Pass.CESIUM_3D_TILE_PLANAR_FILL_ID;
|
|
984
|
+
derived.castShadows = false;
|
|
985
|
+
derived.receiveShadows = false;
|
|
986
|
+
|
|
987
|
+
// Use the same render state but disable blending.
|
|
988
|
+
const rs = clone(command.renderState, true);
|
|
989
|
+
rs.blending.enabled = false;
|
|
990
|
+
derived.renderState = RenderState.fromCache(rs);
|
|
991
|
+
|
|
992
|
+
// Override uniformMap to set u_isPlanarFillIdPass to true for the pre-pass
|
|
993
|
+
const uniformMap = clone(command.uniformMap);
|
|
994
|
+
uniformMap.u_isPlanarFillIdPass = function () {
|
|
995
|
+
return true;
|
|
996
|
+
};
|
|
997
|
+
derived.uniformMap = uniformMap;
|
|
998
|
+
|
|
999
|
+
return derived;
|
|
1000
|
+
}
|
|
1001
|
+
|
|
830
1002
|
function updateSkipLodStencilCommand(drawCommand, tile, use2D) {
|
|
831
1003
|
const stencilDerivedComand = drawCommand._skipLodStencilCommand;
|
|
832
1004
|
const stencilCommand = stencilDerivedComand.command;
|
|
@@ -169,6 +169,9 @@ function buildDrawCommandForModel(
|
|
|
169
169
|
const pickId = hasClassification
|
|
170
170
|
? undefined
|
|
171
171
|
: primitiveRenderResources.pickId;
|
|
172
|
+
const snapId = hasClassification
|
|
173
|
+
? undefined
|
|
174
|
+
: primitiveRenderResources.snapId;
|
|
172
175
|
|
|
173
176
|
const command = new DrawCommand({
|
|
174
177
|
boundingVolume: boundingSphere,
|
|
@@ -182,6 +185,7 @@ function buildDrawCommandForModel(
|
|
|
182
185
|
count: primitiveRenderResources.count,
|
|
183
186
|
owner: model,
|
|
184
187
|
pickId: pickId,
|
|
188
|
+
snapId: snapId,
|
|
185
189
|
pickMetadataAllowed: true,
|
|
186
190
|
instanceCount: primitiveRenderResources.instanceCount,
|
|
187
191
|
primitiveType: primitiveRenderResources.primitiveType,
|
|
@@ -986,6 +986,7 @@ function updatePrimitiveShowBoundingVolume(runtimePrimitive, options) {
|
|
|
986
986
|
|
|
987
987
|
const scratchSilhouetteCommands = [];
|
|
988
988
|
const scratchEdgeCommands = [];
|
|
989
|
+
const scratchPlanarFillIdCommands = [];
|
|
989
990
|
const scratchPushDrawCommandOptions = {
|
|
990
991
|
frameState: undefined,
|
|
991
992
|
hasSilhouette: undefined,
|
|
@@ -1011,6 +1012,10 @@ ModelSceneGraph.prototype.pushDrawCommands = function (frameState) {
|
|
|
1011
1012
|
const edgeCommands = scratchEdgeCommands;
|
|
1012
1013
|
edgeCommands.length = 0;
|
|
1013
1014
|
|
|
1015
|
+
// Gather planar fill feature-ID pre-pass commands
|
|
1016
|
+
const planarFillIdCommands = scratchPlanarFillIdCommands;
|
|
1017
|
+
planarFillIdCommands.length = 0;
|
|
1018
|
+
|
|
1014
1019
|
// Since this function is called each frame, the options object is
|
|
1015
1020
|
// preallocated in a scratch variable
|
|
1016
1021
|
const pushDrawCommandOptions = scratchPushDrawCommandOptions;
|
|
@@ -1026,6 +1031,7 @@ ModelSceneGraph.prototype.pushDrawCommands = function (frameState) {
|
|
|
1026
1031
|
|
|
1027
1032
|
addAllToArray(frameState.commandList, silhouetteCommands);
|
|
1028
1033
|
addAllToArray(frameState.commandList, edgeCommands);
|
|
1034
|
+
addAllToArray(frameState.commandList, planarFillIdCommands);
|
|
1029
1035
|
};
|
|
1030
1036
|
|
|
1031
1037
|
// Callback is defined here to avoid allocating a closure in the render loop
|
|
@@ -1036,9 +1042,16 @@ function pushPrimitiveDrawCommands(runtimePrimitive, options) {
|
|
|
1036
1042
|
const passes = frameState.passes;
|
|
1037
1043
|
const silhouetteCommands = scratchSilhouetteCommands;
|
|
1038
1044
|
const edgeCommands = scratchEdgeCommands;
|
|
1045
|
+
const planarFillIdCommands = scratchPlanarFillIdCommands;
|
|
1039
1046
|
const primitiveDrawCommand = runtimePrimitive.drawCommand;
|
|
1040
1047
|
primitiveDrawCommand.pushCommands(frameState, frameState.commandList);
|
|
1041
1048
|
|
|
1049
|
+
// Renew the per-frame planar fill request while this primitive renders.
|
|
1050
|
+
const material = runtimePrimitive.primitive.material;
|
|
1051
|
+
if (defined(material) && defined(material.planarFill)) {
|
|
1052
|
+
frameState.planarFillRequested = true;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1042
1055
|
// If a model has silhouettes, the commands that draw the silhouettes for
|
|
1043
1056
|
// each primitive can only be invoked after the entire model has drawn.
|
|
1044
1057
|
// Otherwise, the silhouette may draw on top of the model. This requires
|
|
@@ -1051,6 +1064,14 @@ function pushPrimitiveDrawCommands(runtimePrimitive, options) {
|
|
|
1051
1064
|
if (defined(primitiveDrawCommand.pushEdgeCommands)) {
|
|
1052
1065
|
primitiveDrawCommand.pushEdgeCommands(frameState, edgeCommands);
|
|
1053
1066
|
}
|
|
1067
|
+
|
|
1068
|
+
// Add planar fill feature-ID pre-pass commands
|
|
1069
|
+
if (defined(primitiveDrawCommand.pushPlanarFillIdCommands)) {
|
|
1070
|
+
primitiveDrawCommand.pushPlanarFillIdCommands(
|
|
1071
|
+
frameState,
|
|
1072
|
+
planarFillIdCommands,
|
|
1073
|
+
);
|
|
1074
|
+
}
|
|
1054
1075
|
}
|
|
1055
1076
|
|
|
1056
1077
|
/**
|
|
@@ -345,6 +345,7 @@ ModelUtility.sanitizeGlslIdentifier = function (identifier) {
|
|
|
345
345
|
|
|
346
346
|
ModelUtility.supportedExtensions = {
|
|
347
347
|
AGI_articulations: true,
|
|
348
|
+
CESIUM_mesh_vector: true,
|
|
348
349
|
CESIUM_primitive_outline: true,
|
|
349
350
|
CESIUM_RTC: true,
|
|
350
351
|
EXT_feature_metadata: true,
|
|
@@ -353,6 +354,8 @@ ModelUtility.supportedExtensions = {
|
|
|
353
354
|
EXT_instance_features: true,
|
|
354
355
|
EXT_mesh_features: true,
|
|
355
356
|
EXT_mesh_gpu_instancing: true,
|
|
357
|
+
EXT_mesh_polygon: true,
|
|
358
|
+
EXT_mesh_primitive_edge_visibility: true,
|
|
356
359
|
EXT_meshopt_compression: true,
|
|
357
360
|
EXT_primitive_voxels: true,
|
|
358
361
|
EXT_structural_metadata: true,
|
|
@@ -367,6 +370,8 @@ ModelUtility.supportedExtensions = {
|
|
|
367
370
|
KHR_materials_clearcoat: true,
|
|
368
371
|
KHR_materials_unlit: true,
|
|
369
372
|
KHR_mesh_quantization: true,
|
|
373
|
+
KHR_mesh_primitive_restart: true,
|
|
374
|
+
KHR_meshopt_compression: true,
|
|
370
375
|
KHR_techniques_webgl: true,
|
|
371
376
|
KHR_texture_basisu: true,
|
|
372
377
|
KHR_texture_transform: true,
|
|
@@ -17,6 +17,32 @@ const PickingPipelineStage = {
|
|
|
17
17
|
name: "PickingPipelineStage", // Helps with debugging
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Builds the GLSL expression for the float snap payload written during a
|
|
22
|
+
* snapping pass (see {@link Scene#snap}), from the expression that evaluates
|
|
23
|
+
* to the primitive's RGBA8-normalized pick color.
|
|
24
|
+
*
|
|
25
|
+
* Channel layout (RGBA32F snap framebuffer):
|
|
26
|
+
* <ul>
|
|
27
|
+
* <li>R: pick ID, repacked from the RGBA8 pick color to a uint32 via
|
|
28
|
+
* <code>rgba8UnormToUint32</code> (injected by DerivedCommand.createSnapDerivedCommand).
|
|
29
|
+
* Implicitly cast to float32, which represents far more pick IDs than occur in practice.</li>
|
|
30
|
+
* <li>G: isEdge flag (0.0/1.0). <code>isEdge</code> is a ModelFS.glsl global, set by
|
|
31
|
+
* edge-pass fragments under <code>u_isEdgePass</code>.</li>
|
|
32
|
+
* <li>B: linear eye-space depth (<code>-v_positionEC.z</code>, meters). Eye space is
|
|
33
|
+
* global across multifrustum and independent of log-depth encoding.</li>
|
|
34
|
+
* <li>A: unused</li>
|
|
35
|
+
* </ul>
|
|
36
|
+
*
|
|
37
|
+
* @param {string} pickId The GLSL expression for the RGBA8 pick color.
|
|
38
|
+
* @returns {string} The GLSL expression for the snap payload.
|
|
39
|
+
*
|
|
40
|
+
* @private
|
|
41
|
+
*/
|
|
42
|
+
function snapIdFromPickId(pickId) {
|
|
43
|
+
return `vec4(rgba8UnormToUint32(${pickId}), isEdge ? 1.0 : 0.0, -v_positionEC.z, 0.0)`;
|
|
44
|
+
}
|
|
45
|
+
|
|
20
46
|
/**
|
|
21
47
|
* Process a primitive. This modifies the following parts of the render resources:
|
|
22
48
|
* <ul>
|
|
@@ -65,6 +91,7 @@ PickingPipelineStage.process = function (
|
|
|
65
91
|
};
|
|
66
92
|
|
|
67
93
|
renderResources.pickId = "czm_pickColor";
|
|
94
|
+
renderResources.snapId = snapIdFromPickId(renderResources.pickId);
|
|
68
95
|
}
|
|
69
96
|
};
|
|
70
97
|
|
|
@@ -157,6 +184,7 @@ function processPickTexture(renderResources, primitive, instances) {
|
|
|
157
184
|
// The feature ID is ignored if it is greater than the number of features.
|
|
158
185
|
renderResources.pickId =
|
|
159
186
|
"((selectedFeature.id < int(model_featuresLength)) ? texture(model_pickTexture, selectedFeature.st) : vec4(0.0))";
|
|
187
|
+
renderResources.snapId = snapIdFromPickId(renderResources.pickId);
|
|
160
188
|
}
|
|
161
189
|
|
|
162
190
|
function processInstancedPickIds(renderResources, context) {
|
|
@@ -213,6 +241,7 @@ function processInstancedPickIds(renderResources, context) {
|
|
|
213
241
|
shaderBuilder.addAttribute("vec4", "a_pickColor");
|
|
214
242
|
shaderBuilder.addVarying("vec4", "v_pickColor");
|
|
215
243
|
renderResources.pickId = "v_pickColor";
|
|
244
|
+
renderResources.snapId = snapIdFromPickId(renderResources.pickId);
|
|
216
245
|
}
|
|
217
246
|
|
|
218
247
|
export default PickingPipelineStage;
|
|
@@ -133,6 +133,19 @@ function PrimitiveRenderResources(nodeRenderResources, runtimePrimitive) {
|
|
|
133
133
|
*/
|
|
134
134
|
this.hasSkipLevelOfDetail = nodeRenderResources.hasSkipLevelOfDetail;
|
|
135
135
|
|
|
136
|
+
/**
|
|
137
|
+
* Whether this primitive writes its feature IDs to the planar fill ID
|
|
138
|
+
* texture in a pre-pass (BENTLEY_materials_planar_fill). Set by the
|
|
139
|
+
* material pipeline stage for non-behind planar fill primitives so that
|
|
140
|
+
* behind fills can test same-object coplanarity. This value indicates
|
|
141
|
+
* what draw commands are needed.
|
|
142
|
+
*
|
|
143
|
+
* @type {boolean}
|
|
144
|
+
*
|
|
145
|
+
* @private
|
|
146
|
+
*/
|
|
147
|
+
this.planarFillIdPass = false;
|
|
148
|
+
|
|
136
149
|
/**
|
|
137
150
|
* An object used to build a shader incrementally. This is cloned from the
|
|
138
151
|
* node render resources because each primitive can compute a different shader.
|
|
@@ -292,6 +305,17 @@ function PrimitiveRenderResources(nodeRenderResources, runtimePrimitive) {
|
|
|
292
305
|
* @private
|
|
293
306
|
*/
|
|
294
307
|
this.pickId = undefined;
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* The shader expression for the float snap payload written during a snapping
|
|
311
|
+
* pass (see Scene#snap). If picking is enabled, this value is set by
|
|
312
|
+
* PickingPipelineStage.
|
|
313
|
+
*
|
|
314
|
+
* @type {string|undefined}
|
|
315
|
+
*
|
|
316
|
+
* @private
|
|
317
|
+
*/
|
|
318
|
+
this.snapId = undefined;
|
|
295
319
|
}
|
|
296
320
|
|
|
297
321
|
export default PrimitiveRenderResources;
|