@cesium/engine 26.1.0 → 26.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Build/ThirdParty/Workers/zip-web-worker.js +586 -480
- package/Build/Workers/chunk-27FWRTJI.js +454 -0
- package/Build/Workers/chunk-2H5264K7.js +1284 -0
- package/Build/Workers/chunk-2H73KDBM.js +511 -0
- package/Build/Workers/chunk-2RGJPWQX.js +1284 -0
- package/Build/Workers/chunk-2Z4ZLVOD.js +352 -0
- package/Build/Workers/chunk-2ZKH2QZB.js +387 -0
- package/Build/Workers/chunk-36NI5E6W.js +3820 -0
- package/Build/Workers/chunk-37SW7SYS.js +778 -0
- package/Build/Workers/chunk-3GHVJ3SO.js +455 -0
- package/Build/Workers/chunk-3LB4UVPU.js +387 -0
- package/Build/Workers/chunk-3PONLKEL.js +778 -0
- package/Build/Workers/chunk-3PSS3T43.js +102 -0
- package/Build/Workers/chunk-3QR662HH.js +3820 -0
- package/Build/Workers/chunk-3SX2WYSO.js +973 -0
- package/Build/Workers/chunk-3UDN6LYX.js +476 -0
- package/Build/Workers/chunk-47MCBSXI.js +9237 -0
- package/Build/Workers/chunk-4E626OCE.js +1067 -0
- package/Build/Workers/chunk-4NW2MJKH.js +455 -0
- package/Build/Workers/chunk-52YK5BSN.js +198 -0
- package/Build/Workers/chunk-5RNAQZK6.js +9234 -0
- package/Build/Workers/chunk-5YPQBFRD.js +519 -0
- package/Build/Workers/chunk-6FHT43QR.js +140 -0
- package/Build/Workers/chunk-6FZDPMTO.js +455 -0
- package/Build/Workers/chunk-6R5X2GUA.js +1284 -0
- package/Build/Workers/chunk-7A2OGDHT.js +305 -0
- package/Build/Workers/chunk-7CGEQUM2.js +305 -0
- package/Build/Workers/chunk-7I325HV6.js +1344 -0
- package/Build/Workers/chunk-7MM3N2VE.js +1067 -0
- package/Build/Workers/chunk-7TKLTCZW.js +219 -0
- package/Build/Workers/chunk-7UUKBDH6.js +1054 -0
- package/Build/Workers/chunk-7W6DUHAB.js +693 -0
- package/Build/Workers/chunk-7XM5JK5F.js +162 -0
- package/Build/Workers/chunk-7YG3ND3P.js +454 -0
- package/Build/Workers/chunk-A62YI6S6.js +305 -0
- package/Build/Workers/chunk-A7TTWVTF.js +2719 -0
- package/Build/Workers/chunk-ACTVJHSP.js +519 -0
- package/Build/Workers/chunk-ADX3CBKD.js +9234 -0
- package/Build/Workers/chunk-AF7DTMJ7.js +398 -0
- package/Build/Workers/chunk-AJSFRY4U.js +1344 -0
- package/Build/Workers/chunk-ARZICEEP.js +301 -0
- package/Build/Workers/chunk-B3QHNA4A.js +147 -0
- package/Build/Workers/chunk-BKPQFCXH.js +511 -0
- package/Build/Workers/chunk-BSPCI2LO.js +959 -0
- package/Build/Workers/chunk-BUJWSX5S.js +301 -0
- package/Build/Workers/chunk-C7QDUNI3.js +138 -0
- package/Build/Workers/chunk-CIV5DJOQ.js +778 -0
- package/Build/Workers/chunk-CQNFIAZU.js +56 -0
- package/Build/Workers/chunk-CRCGE4J4.js +9237 -0
- package/Build/Workers/chunk-CUTRKXUQ.js +288 -0
- package/Build/Workers/chunk-D6AY775A.js +3201 -0
- package/Build/Workers/chunk-DSGLDRTI.js +278 -0
- package/Build/Workers/chunk-DZBQUULR.js +138 -0
- package/Build/Workers/chunk-DZUFEE4L.js +140 -0
- package/Build/Workers/chunk-E2NKV5YT.js +3820 -0
- package/Build/Workers/chunk-EB3Y5P3A.js +368 -0
- package/Build/Workers/chunk-ELE6SC2C.js +837 -0
- package/Build/Workers/chunk-EOWDZN5S.js +288 -0
- package/Build/Workers/chunk-ERKUET22.js +3201 -0
- package/Build/Workers/chunk-EZGQPOIG.js +162 -0
- package/Build/Workers/chunk-F2IMBMZY.js +241 -0
- package/Build/Workers/chunk-F4CSNRZO.js +219 -0
- package/Build/Workers/chunk-FBP4DUQJ.js +693 -0
- package/Build/Workers/chunk-FJWZMGOQ.js +1992 -0
- package/Build/Workers/chunk-FQ42MT7M.js +58 -0
- package/Build/Workers/chunk-FU4BGABC.js +398 -0
- package/Build/Workers/chunk-FX3VEAIU.js +2719 -0
- package/Build/Workers/chunk-GGNWQWSB.js +301 -0
- package/Build/Workers/chunk-GHXVQVUM.js +1344 -0
- package/Build/Workers/chunk-GNKXEN4C.js +682 -0
- package/Build/Workers/chunk-GVA7XQI2.js +368 -0
- package/Build/Workers/chunk-GXDHRC4J.js +1344 -0
- package/Build/Workers/chunk-GYSYP6PC.js +1067 -0
- package/Build/Workers/chunk-H2WCFXLP.js +241 -0
- package/Build/Workers/chunk-HDL4HOXZ.js +778 -0
- package/Build/Workers/chunk-HLW2ZRVK.js +368 -0
- package/Build/Workers/chunk-HT6FASOT.js +973 -0
- package/Build/Workers/chunk-I74ZH5LK.js +959 -0
- package/Build/Workers/chunk-IDVHUDZT.js +352 -0
- package/Build/Workers/chunk-IJZJMIUY.js +789 -0
- package/Build/Workers/chunk-IMBVP57H.js +44 -0
- package/Build/Workers/chunk-IOO7Z2AV.js +57 -0
- package/Build/Workers/chunk-IUIFLOYO.js +44 -0
- package/Build/Workers/chunk-J73T2VOY.js +171 -0
- package/Build/Workers/chunk-JALGQYDY.js +288 -0
- package/Build/Workers/chunk-JXYLJCTC.js +124 -0
- package/Build/Workers/chunk-K27QOAW6.js +97 -0
- package/Build/Workers/chunk-KMV25A63.js +789 -0
- package/Build/Workers/chunk-KP5QD7WU.js +693 -0
- package/Build/Workers/chunk-KZWFWJML.js +2719 -0
- package/Build/Workers/chunk-LCXRRALY.js +387 -0
- package/Build/Workers/chunk-LDRQSYBN.js +1800 -0
- package/Build/Workers/chunk-M4JZ6TSZ.js +959 -0
- package/Build/Workers/chunk-M6QKXVAU.js +1054 -0
- package/Build/Workers/chunk-MAAHFYPC.js +198 -0
- package/Build/Workers/chunk-MCJDRDJQ.js +102 -0
- package/Build/Workers/chunk-MEENMEAH.js +198 -0
- package/Build/Workers/chunk-NAWU5RF4.js +162 -0
- package/Build/Workers/chunk-NCL22ZUX.js +56 -0
- package/Build/Workers/chunk-NEFDMMLY.js +241 -0
- package/Build/Workers/chunk-NJVBJG63.js +124 -0
- package/Build/Workers/chunk-NLLCQBX3.js +73 -0
- package/Build/Workers/chunk-NSKZ6SBK.js +1483 -0
- package/Build/Workers/chunk-NXGQBQWE.js +837 -0
- package/Build/Workers/chunk-O3DKEX7Q.js +352 -0
- package/Build/Workers/chunk-O3XFXGPZ.js +476 -0
- package/Build/Workers/chunk-OA6MYL2C.js +837 -0
- package/Build/Workers/chunk-OHP4ELS7.js +198 -0
- package/Build/Workers/chunk-OZGPS7FB.js +138 -0
- package/Build/Workers/chunk-PCL3Y7H5.js +82 -0
- package/Build/Workers/chunk-PD4GK4EM.js +57 -0
- package/Build/Workers/chunk-PEDU33QG.js +2342 -0
- package/Build/Workers/chunk-PRWUMCXF.js +682 -0
- package/Build/Workers/chunk-PVTSNNVI.js +288 -0
- package/Build/Workers/chunk-QFSSCLLZ.js +973 -0
- package/Build/Workers/chunk-QHPZH22L.js +241 -0
- package/Build/Workers/chunk-QIZDWZK6.js +301 -0
- package/Build/Workers/chunk-QV6DG2YX.js +1483 -0
- package/Build/Workers/chunk-R4K7EHOU.js +171 -0
- package/Build/Workers/chunk-R7JGHDD6.js +789 -0
- package/Build/Workers/chunk-RASQEYD4.js +1483 -0
- package/Build/Workers/chunk-RW6ITX7Q.js +3820 -0
- package/Build/Workers/chunk-RYSQVJR6.js +398 -0
- package/Build/Workers/chunk-S6RJU5NM.js +1054 -0
- package/Build/Workers/chunk-SA2A2AN5.js +2342 -0
- package/Build/Workers/chunk-SDFHDNS4.js +147 -0
- package/Build/Workers/chunk-SJYSIOEM.js +414 -0
- package/Build/Workers/chunk-SMTGMFBL.js +97 -0
- package/Build/Workers/chunk-SXSP3JHS.js +38 -0
- package/Build/Workers/chunk-TN35HP5B.js +1067 -0
- package/Build/Workers/chunk-TNWKJNUZ.js +454 -0
- package/Build/Workers/chunk-TOAF47AQ.js +102 -0
- package/Build/Workers/chunk-TQ4QCOXT.js +2719 -0
- package/Build/Workers/chunk-TSDSILQB.js +124 -0
- package/Build/Workers/chunk-U5LV3F3Z.js +1054 -0
- package/Build/Workers/chunk-UAZUP4I5.js +1992 -0
- package/Build/Workers/chunk-UF46SZEZ.js +789 -0
- package/Build/Workers/chunk-UNRTMCET.js +398 -0
- package/Build/Workers/chunk-UTB7U3O6.js +1992 -0
- package/Build/Workers/chunk-V46YGZE6.js +352 -0
- package/Build/Workers/chunk-VDGOCROW.js +57 -0
- package/Build/Workers/chunk-VFWSSBPT.js +511 -0
- package/Build/Workers/chunk-VVYMXI3I.js +1284 -0
- package/Build/Workers/chunk-VXWHPYQM.js +837 -0
- package/Build/Workers/chunk-VXYUBRSB.js +219 -0
- package/Build/Workers/chunk-VZLDLEWI.js +387 -0
- package/Build/Workers/chunk-W5OCKMPJ.js +101 -0
- package/Build/Workers/chunk-WN3F4CVG.js +3201 -0
- package/Build/Workers/chunk-WPRUWXGV.js +693 -0
- package/Build/Workers/chunk-WTO2ERBP.js +414 -0
- package/Build/Workers/chunk-WVHMDVG4.js +959 -0
- package/Build/Workers/chunk-XCBZVTIV.js +280 -0
- package/Build/Workers/chunk-XGA23TAX.js +73 -0
- package/Build/Workers/chunk-XLQZNQ4Z.js +163 -0
- package/Build/Workers/chunk-XQH66YJC.js +147 -0
- package/Build/Workers/chunk-XTA7BXJG.js +682 -0
- package/Build/Workers/chunk-XTIDAFRS.js +476 -0
- package/Build/Workers/chunk-XUEDWBUD.js +682 -0
- package/Build/Workers/chunk-XYFLRH3H.js +124 -0
- package/Build/Workers/chunk-Y7JRTRTO.js +305 -0
- package/Build/Workers/chunk-Y7QSMDCJ.js +352 -0
- package/Build/Workers/chunk-YCB5TYTR.js +1483 -0
- package/Build/Workers/chunk-YEYOSTJX.js +219 -0
- package/Build/Workers/chunk-YGFVAGYF.js +630 -0
- package/Build/Workers/chunk-YIIACKQO.js +368 -0
- package/Build/Workers/chunk-YJGSP6PE.js +511 -0
- package/Build/Workers/chunk-Z4LR5EHE.js +454 -0
- package/Build/Workers/chunk-Z66EVE2A.js +44 -0
- package/Build/Workers/chunk-ZHIHHHTB.js +414 -0
- package/Build/Workers/chunk-ZNWHFSLE.js +171 -0
- package/Build/Workers/chunk-ZQLZG4IN.js +2342 -0
- package/Build/Workers/chunk-ZRTSMUZ2.js +414 -0
- package/Build/Workers/chunk-ZZUVT5BM.js +476 -0
- package/Build/Workers/combineGeometry.js +16 -16
- package/Build/Workers/createBoxGeometry.js +10 -10
- package/Build/Workers/createBoxOutlineGeometry.js +8 -8
- package/Build/Workers/createCircleGeometry.js +18 -18
- package/Build/Workers/createCircleOutlineGeometry.js +11 -11
- package/Build/Workers/createCoplanarPolygonGeometry.js +27 -27
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +23 -23
- package/Build/Workers/createCorridorGeometry.js +23 -25
- package/Build/Workers/createCorridorOutlineGeometry.js +21 -23
- package/Build/Workers/createCylinderGeometry.js +12 -12
- package/Build/Workers/createCylinderOutlineGeometry.js +10 -10
- package/Build/Workers/createEllipseGeometry.js +18 -18
- package/Build/Workers/createEllipseOutlineGeometry.js +11 -11
- package/Build/Workers/createEllipsoidGeometry.js +11 -11
- package/Build/Workers/createEllipsoidOutlineGeometry.js +10 -10
- package/Build/Workers/createFrustumGeometry.js +11 -11
- package/Build/Workers/createFrustumOutlineGeometry.js +11 -11
- package/Build/Workers/createGeometry.js +16 -16
- package/Build/Workers/createGroundPolylineGeometry.js +16 -16
- package/Build/Workers/createPlaneGeometry.js +9 -9
- package/Build/Workers/createPlaneOutlineGeometry.js +8 -8
- package/Build/Workers/createPolygonGeometry.js +25 -25
- package/Build/Workers/createPolygonOutlineGeometry.js +22 -22
- package/Build/Workers/createPolylineGeometry.js +18 -18
- package/Build/Workers/createPolylineVolumeGeometry.js +24 -24
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +20 -20
- package/Build/Workers/createRectangleGeometry.js +19 -19
- package/Build/Workers/createRectangleOutlineGeometry.js +13 -13
- package/Build/Workers/createSimplePolylineGeometry.js +16 -16
- package/Build/Workers/createSphereGeometry.js +11 -11
- package/Build/Workers/createSphereOutlineGeometry.js +10 -10
- package/Build/Workers/createVectorTileClampedPolylines.js +7 -7
- package/Build/Workers/createVectorTileGeometries.js +15 -15
- package/Build/Workers/createVectorTilePoints.js +6 -6
- package/Build/Workers/createVectorTilePolygons.js +14 -14
- package/Build/Workers/createVectorTilePolylines.js +7 -7
- package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +17 -17
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +14 -14
- package/Build/Workers/createVerticesFromHeightmap.js +14 -14
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +12 -12
- package/Build/Workers/createWallGeometry.js +17 -17
- package/Build/Workers/createWallOutlineGeometry.js +17 -17
- package/Build/Workers/decodeDraco.js +2 -2
- package/Build/Workers/decodeI3S.js +5 -5
- package/Build/Workers/incrementallyBuildTerrainPicker.js +4 -4
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +14 -14
- package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +17 -17
- package/Source/Core/ArcGISTiledElevationTerrainProvider.js +1 -5
- package/Source/Core/BoundingSphere.js +0 -3
- package/Source/Core/Cesium3DTilesTerrainGeometryProcessor.js +3 -4
- package/Source/Core/CoplanarPolygonGeometry.js +2 -2
- package/Source/Core/CorridorGeometry.js +2 -4
- package/Source/Core/CorridorOutlineGeometry.js +1 -3
- package/Source/Core/EarthOrientationParameters.js +2 -2
- package/Source/Core/EllipseGeometryLibrary.js +2 -2
- package/Source/Core/EllipsoidGeodesic.js +3 -3
- package/Source/Core/EllipsoidRhumbLine.js +1 -1
- package/Source/Core/GroundPolylineGeometry.js +2 -2
- package/Source/Core/Heap.js +1 -1
- package/Source/Core/HermitePolynomialApproximation.js +215 -179
- package/Source/Core/InterpolationAlgorithm.js +1 -0
- package/Source/Core/Ion.js +1 -1
- package/Source/Core/JulianDate.js +1 -1
- package/Source/Core/LagrangePolynomialApproximation.js +55 -52
- package/Source/Core/LinearApproximation.js +69 -66
- package/Source/Core/Math.js +59 -0
- package/Source/Core/Matrix2.js +2 -2
- package/Source/Core/Matrix3.js +2 -2
- package/Source/Core/OrthographicFrustum.js +1 -1
- package/Source/Core/PerspectiveFrustum.js +1 -1
- package/Source/Core/PolygonGeometry.js +2 -2
- package/Source/Core/PolygonGeometryLibrary.js +1 -1
- package/Source/Core/PolygonOutlineGeometry.js +1 -1
- package/Source/Core/PolylineGeometry.js +1 -1
- package/Source/Core/PolylineVolumeGeometryLibrary.js +1 -1
- package/Source/Core/Rectangle.js +7 -1
- package/Source/Core/RectangleOutlineGeometry.js +1 -1
- package/Source/Core/SimplePolylineGeometry.js +1 -1
- package/Source/Core/TerrainEncoding.js +2 -2
- package/Source/Core/TerrainPicker.js +179 -168
- package/Source/Core/TimeIntervalCollection.js +1 -3
- package/Source/Core/Tipsify.js +1 -1
- package/Source/Core/Transforms.js +5 -1
- package/Source/Core/VectorPipeline.js +1117 -0
- package/Source/Core/VectorProvider.js +429 -0
- package/Source/Core/WallOutlineGeometry.js +1 -1
- package/Source/Core/getTimestamp.js +4 -2
- package/Source/DataSources/CompositeEntityCollection.js +0 -1
- package/Source/DataSources/CzmlDataSource.js +2 -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 +1 -2
- package/Source/DataSources/PolylineVisualizer.js +1 -1
- package/Source/DataSources/StaticOutlineGeometryBatch.js +1 -1
- package/Source/Renderer/AutomaticUniforms.js +23 -0
- package/Source/Renderer/Context.js +9 -3
- package/Source/Renderer/DrawCommand.js +22 -0
- package/Source/Renderer/Framebuffer.js +4 -0
- package/Source/Renderer/Pass.js +11 -10
- package/Source/Renderer/Texture.js +11 -0
- package/Source/Renderer/UniformState.js +7 -0
- package/Source/Renderer/VertexArray.js +0 -1
- package/Source/Scene/ArcGisMapServerImageryProvider.js +0 -5
- package/Source/Scene/ArcGisMapService.js +1 -1
- package/Source/Scene/Billboard.js +2 -1
- package/Source/Scene/BillboardCollection.js +7 -3
- package/Source/Scene/BufferPrimitiveCollection.js +27 -5
- package/Source/Scene/Camera.js +71 -5
- package/Source/Scene/Cesium3DTileset.js +1 -1
- package/Source/Scene/ClippingPlaneCollection.js +2 -2
- package/Source/Scene/Controllers/Controller.js +63 -0
- package/Source/Scene/Controllers/ControllerHost.js +78 -0
- package/Source/Scene/Controllers/HybridScreenSpacePanCameraController.js +106 -0
- package/Source/Scene/Controllers/MouseButton.js +32 -0
- package/Source/Scene/Controllers/ScreenSpaceElevatorCameraController.js +295 -0
- package/Source/Scene/Controllers/ScreenSpaceInputBindings.js +154 -0
- package/Source/Scene/Controllers/ScreenSpaceMapCameraController.js +310 -0
- package/Source/Scene/Controllers/ScreenSpaceTiltOrbitCameraController.js +642 -0
- package/Source/Scene/Controllers/ScreenSpaceZoomCameraController.js +431 -0
- package/Source/Scene/Controllers/defaultPickWorldPosition.js +84 -0
- package/Source/Scene/DerivedCommand.js +94 -0
- package/Source/Scene/EdgeFramebuffer.js +1 -5
- package/Source/Scene/FrameState.js +17 -0
- package/Source/Scene/Globe.js +20 -0
- package/Source/Scene/GlobeDepth.js +27 -1
- package/Source/Scene/GlobeSurfaceShaderSet.js +12 -2
- package/Source/Scene/GlobeSurfaceTile.js +48 -10
- package/Source/Scene/GlobeSurfaceTileProvider.js +121 -3
- package/Source/Scene/GltfLoader.js +32 -3
- package/Source/Scene/GltfSpzLoader.js +1 -1
- package/Source/Scene/GltfVertexBufferLoader.js +6 -3
- package/Source/Scene/I3SDataProvider.js +1 -1
- package/Source/Scene/I3SLayer.js +1 -1
- package/Source/Scene/I3SNode.js +2 -2
- package/Source/Scene/ImageryLayerCollection.js +188 -4
- package/Source/Scene/IonImageryProvider.js +1 -5
- package/Source/Scene/Label.js +4 -4
- package/Source/Scene/LabelCollection.js +1 -1
- package/Source/Scene/MVTDataProvider.js +2 -0
- package/Source/Scene/Model/B3dmLoader.js +1 -2
- package/Source/Scene/Model/EdgeVisibilityPipelineStage.js +10 -8
- 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 +8 -10
- package/Source/Scene/Model/ModelClippingPlanesPipelineStage.js +28 -1
- package/Source/Scene/Model/ModelDrawCommand.js +160 -16
- package/Source/Scene/Model/ModelDrawCommands.js +4 -0
- package/Source/Scene/Model/ModelSceneGraph.js +21 -0
- package/Source/Scene/Model/PickingPipelineStage.js +29 -0
- package/Source/Scene/Model/PrimitiveRenderResources.js +24 -0
- package/Source/Scene/ModelComponents.js +71 -0
- package/Source/Scene/Picking.js +16 -5
- package/Source/Scene/PlanarFillIdFramebuffer.js +172 -0
- package/Source/Scene/PntsParser.js +0 -1
- package/Source/Scene/PolylineCollection.js +1 -1
- package/Source/Scene/PostProcessStage.js +4 -2
- package/Source/Scene/ResourceCache.js +7 -4
- package/Source/Scene/ResourceCacheKey.js +16 -13
- package/Source/Scene/Scene.js +202 -5
- package/Source/Scene/ScreenSpaceCameraController.js +1 -2
- package/Source/Scene/ShadowMap.js +9 -3
- package/Source/Scene/ShadowMapShader.js +50 -2
- package/Source/Scene/SnapFramebuffer.js +121 -0
- package/Source/Scene/Snapping.js +184 -0
- package/Source/Scene/TerrainFillMesh.js +3 -2
- package/Source/Scene/UrlTemplate3DTilesDataProvider.js +1 -1
- package/Source/Scene/Vector3DTileContent.js +2 -3
- package/Source/Scene/VectorGltf3DTileContent.js +23 -3
- package/Source/Scene/View.js +10 -8
- package/Source/Scene/VoxelTraversal.js +1 -1
- package/Source/Scene/createElevationBandMaterial.js +1 -1
- package/Source/Scene/renderBufferPointCollection.js +1 -2
- package/Source/Scene/renderBufferPolygonCollection.js +1 -2
- package/Source/Scene/renderBufferPolylineCollection.js +1 -2
- package/Source/Shaders/Builtin/Constants/passCesium3DTile.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passCesium3DTile.js +1 -1
- package/Source/Shaders/Builtin/Constants/passCesium3DTileClassification.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passCesium3DTileClassification.js +1 -1
- package/Source/Shaders/Builtin/Constants/passCesium3DTileClassificationIgnoreShow.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passCesium3DTileClassificationIgnoreShow.js +1 -1
- package/Source/Shaders/Builtin/Constants/passCesium3DTilePlanarFillId.glsl +9 -0
- package/Source/Shaders/Builtin/Constants/passCesium3DTilePlanarFillId.js +11 -0
- package/Source/Shaders/Builtin/Constants/passClassification.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passClassification.js +1 -1
- package/Source/Shaders/Builtin/Constants/passGaussianSplats.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passGaussianSplats.js +1 -1
- package/Source/Shaders/Builtin/Constants/passOpaque.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passOpaque.js +1 -1
- package/Source/Shaders/Builtin/Constants/passTranslucent.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passTranslucent.js +1 -1
- package/Source/Shaders/Builtin/Constants/passVoxels.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passVoxels.js +1 -1
- package/Source/Shaders/Builtin/CzmBuiltins.js +2 -0
- package/Source/Shaders/GlobeFS.glsl +10 -5
- package/Source/Shaders/GlobeFS.js +9 -5
- package/Source/Shaders/Materials/PolylineGlowMaterial.glsl +1 -1
- package/Source/Shaders/Materials/PolylineGlowMaterial.js +1 -1
- package/Source/Shaders/Model/MaterialStageFS.glsl +8 -2
- package/Source/Shaders/Model/MaterialStageFS.js +8 -2
- package/Source/Shaders/Model/ModelFS.glsl +105 -0
- package/Source/Shaders/Model/ModelFS.js +105 -0
- package/Source/Shaders/VectorCommon.glsl +178 -0
- package/Source/Shaders/VectorCommon.js +75 -0
- package/Source/ThirdParty/Workers/zip-web-worker.js +1 -1
- package/Source/ThirdParty/zip-module.wasm +0 -0
- package/Source/Widget/CesiumWidget.js +30 -0
- package/index.d.ts +770 -10
- package/index.js +177 -160
- package/package.json +1 -1
package/Source/Scene/I3SLayer.js
CHANGED
|
@@ -31,7 +31,7 @@ function I3SLayer(dataProvider, layerData, parent) {
|
|
|
31
31
|
|
|
32
32
|
const parentUrl = this._parent.resource.getUrlComponent();
|
|
33
33
|
|
|
34
|
-
let tilesetUrl
|
|
34
|
+
let tilesetUrl;
|
|
35
35
|
if (parentUrl.match(/layers\/\d/)) {
|
|
36
36
|
tilesetUrl = `${parentUrl}`.replace(/\/+$/, "");
|
|
37
37
|
} else {
|
package/Source/Scene/I3SNode.js
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import defined from "../Core/defined.js";
|
|
2
|
+
import Cartesian2 from "../Core/Cartesian2.js";
|
|
3
|
+
import Cartographic from "../Core/Cartographic.js";
|
|
2
4
|
import destroyObject from "../Core/destroyObject.js";
|
|
3
5
|
import DeveloperError from "../Core/DeveloperError.js";
|
|
4
6
|
import Event from "../Core/Event.js";
|
|
7
|
+
import GeographicProjection from "../Core/GeographicProjection.js";
|
|
5
8
|
import CesiumMath from "../Core/Math.js";
|
|
6
9
|
import Rectangle from "../Core/Rectangle.js";
|
|
7
10
|
import ImageryLayer from "./ImageryLayer.js";
|
|
11
|
+
import ImageryState from "./ImageryState.js";
|
|
8
12
|
|
|
9
13
|
/**
|
|
10
14
|
* An ordered collection of imagery layers for rendering raster imagery on a {@link Globe} or {@link Cesium3DTileset}.
|
|
@@ -452,6 +456,152 @@ ImageryLayerCollection.prototype.pickImageryLayers = function (ray, scene) {
|
|
|
452
456
|
return imageryLayers;
|
|
453
457
|
};
|
|
454
458
|
|
|
459
|
+
const nativeBoundingRectangleScratch = new Rectangle();
|
|
460
|
+
const nativeApplicableRectangleScratch = new Rectangle();
|
|
461
|
+
const southwestNativeScratch = new Cartesian2();
|
|
462
|
+
const northeastNativeScratch = new Cartesian2();
|
|
463
|
+
const southwestCartographicScratch = new Cartographic();
|
|
464
|
+
const northeastCartographicScratch = new Cartographic();
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* Maps a texture coordinate rectangle (UV space on the primitive) back to a
|
|
468
|
+
* geographic rectangle, using the primitive cartographic bounds and the
|
|
469
|
+
* imagery tiling scheme's native coordinates.
|
|
470
|
+
*
|
|
471
|
+
* @private
|
|
472
|
+
*/
|
|
473
|
+
|
|
474
|
+
function computeApplicableGeographicRectangle(
|
|
475
|
+
cartographicBoundingRectangle,
|
|
476
|
+
textureCoordinateRectangle,
|
|
477
|
+
imageryLayer,
|
|
478
|
+
result,
|
|
479
|
+
) {
|
|
480
|
+
const tilingScheme = imageryLayer.imageryProvider.tilingScheme;
|
|
481
|
+
const nativeBoundingRectangle = tilingScheme.rectangleToNativeRectangle(
|
|
482
|
+
cartographicBoundingRectangle,
|
|
483
|
+
nativeBoundingRectangleScratch,
|
|
484
|
+
);
|
|
485
|
+
|
|
486
|
+
const epsilon = 1 / 1024; // 1/4 of a pixel in a typical 256x256 tile.
|
|
487
|
+
const applicableNative = nativeApplicableRectangleScratch;
|
|
488
|
+
applicableNative.west = CesiumMath.lerp(
|
|
489
|
+
nativeBoundingRectangle.west,
|
|
490
|
+
nativeBoundingRectangle.east,
|
|
491
|
+
textureCoordinateRectangle.minX - epsilon,
|
|
492
|
+
);
|
|
493
|
+
applicableNative.east = CesiumMath.lerp(
|
|
494
|
+
nativeBoundingRectangle.west,
|
|
495
|
+
nativeBoundingRectangle.east,
|
|
496
|
+
textureCoordinateRectangle.maxX + epsilon,
|
|
497
|
+
);
|
|
498
|
+
applicableNative.south = CesiumMath.lerp(
|
|
499
|
+
nativeBoundingRectangle.south,
|
|
500
|
+
nativeBoundingRectangle.north,
|
|
501
|
+
textureCoordinateRectangle.minY - epsilon,
|
|
502
|
+
);
|
|
503
|
+
applicableNative.north = CesiumMath.lerp(
|
|
504
|
+
nativeBoundingRectangle.south,
|
|
505
|
+
nativeBoundingRectangle.north,
|
|
506
|
+
textureCoordinateRectangle.maxY + epsilon,
|
|
507
|
+
);
|
|
508
|
+
|
|
509
|
+
if (!defined(result)) {
|
|
510
|
+
result = new Rectangle();
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
const projection = tilingScheme.projection;
|
|
514
|
+
if (projection instanceof GeographicProjection) {
|
|
515
|
+
result.west = CesiumMath.toRadians(applicableNative.west);
|
|
516
|
+
result.south = CesiumMath.toRadians(applicableNative.south);
|
|
517
|
+
result.east = CesiumMath.toRadians(applicableNative.east);
|
|
518
|
+
result.north = CesiumMath.toRadians(applicableNative.north);
|
|
519
|
+
return result;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
southwestNativeScratch.x = applicableNative.west;
|
|
523
|
+
southwestNativeScratch.y = applicableNative.south;
|
|
524
|
+
northeastNativeScratch.x = applicableNative.east;
|
|
525
|
+
northeastNativeScratch.y = applicableNative.north;
|
|
526
|
+
|
|
527
|
+
const southwest = projection.unproject(
|
|
528
|
+
southwestNativeScratch,
|
|
529
|
+
southwestCartographicScratch,
|
|
530
|
+
);
|
|
531
|
+
const northeast = projection.unproject(
|
|
532
|
+
northeastNativeScratch,
|
|
533
|
+
northeastCartographicScratch,
|
|
534
|
+
);
|
|
535
|
+
result.west = southwest.longitude;
|
|
536
|
+
result.south = southwest.latitude;
|
|
537
|
+
result.east = northeast.longitude;
|
|
538
|
+
result.north = northeast.latitude;
|
|
539
|
+
return result;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
function pickModelFeatures(model, pickedLocation, callback) {
|
|
543
|
+
const modelImagery = model._modelImagery;
|
|
544
|
+
|
|
545
|
+
if (!defined(modelImagery)) {
|
|
546
|
+
return;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
const modelPrimitiveImageries = modelImagery._modelPrimitiveImageries;
|
|
550
|
+
|
|
551
|
+
if (!defined(modelPrimitiveImageries)) {
|
|
552
|
+
return;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
for (let j = 0; j < modelPrimitiveImageries.length; j++) {
|
|
556
|
+
const modelPrimitiveImagery = modelPrimitiveImageries[j];
|
|
557
|
+
const coveragesPerLayer = modelPrimitiveImagery._coveragesPerLayer;
|
|
558
|
+
if (!defined(coveragesPerLayer)) {
|
|
559
|
+
continue;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
for (let k = coveragesPerLayer.length - 1; k >= 0; --k) {
|
|
563
|
+
const coverages = coveragesPerLayer[k];
|
|
564
|
+
|
|
565
|
+
for (let l = 0; l < coverages.length; l++) {
|
|
566
|
+
const coverage = coverages[l];
|
|
567
|
+
const imagery = coverage.imagery;
|
|
568
|
+
const imageryLayer = imagery.imageryLayer;
|
|
569
|
+
const provider = imageryLayer.imageryProvider;
|
|
570
|
+
|
|
571
|
+
if (!defined(provider.pickFeatures)) {
|
|
572
|
+
continue;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
if (!defined(imagery) || imagery.state !== ImageryState.READY) {
|
|
576
|
+
continue;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
if (!Rectangle.contains(imagery.rectangle, pickedLocation)) {
|
|
580
|
+
continue;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
const mappedPositions =
|
|
584
|
+
modelPrimitiveImagery.mappedPositionsForImageryLayer(imageryLayer);
|
|
585
|
+
const cartographicBoundingRectangle =
|
|
586
|
+
mappedPositions.cartographicBoundingRectangle;
|
|
587
|
+
|
|
588
|
+
const applicableRectangle = computeApplicableGeographicRectangle(
|
|
589
|
+
cartographicBoundingRectangle,
|
|
590
|
+
coverage.textureCoordinateRectangle,
|
|
591
|
+
imageryLayer,
|
|
592
|
+
applicableRectangleScratch,
|
|
593
|
+
);
|
|
594
|
+
|
|
595
|
+
if (!Rectangle.contains(applicableRectangle, pickedLocation)) {
|
|
596
|
+
continue;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
callback(imagery);
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
|
|
455
605
|
/**
|
|
456
606
|
* Asynchronously determines the imagery layer features that are intersected by a pick ray. The intersected imagery
|
|
457
607
|
* layer features are found by invoking {@link ImageryProvider#pickFeatures} for each imagery layer tile intersected
|
|
@@ -485,9 +635,30 @@ ImageryLayerCollection.prototype.pickImageryLayerFeatures = function (
|
|
|
485
635
|
scene,
|
|
486
636
|
) {
|
|
487
637
|
// Find the picked location on the globe.
|
|
488
|
-
|
|
638
|
+
let pickedPosition;
|
|
639
|
+
|
|
640
|
+
if (defined(scene.globe)) {
|
|
641
|
+
pickedPosition = scene.globe.pick(ray, scene);
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
let pickedModel;
|
|
645
|
+
|
|
489
646
|
if (!defined(pickedPosition)) {
|
|
490
|
-
|
|
647
|
+
const result = scene.pickFromRay(ray);
|
|
648
|
+
|
|
649
|
+
if (!defined(result)) {
|
|
650
|
+
return undefined;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
pickedPosition = result.position;
|
|
654
|
+
|
|
655
|
+
if (!defined(pickedPosition)) {
|
|
656
|
+
return undefined;
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
if (defined(result.object) && defined(result.object.detail)) {
|
|
660
|
+
pickedModel = result.object.detail.model;
|
|
661
|
+
}
|
|
491
662
|
}
|
|
492
663
|
|
|
493
664
|
const pickedLocation =
|
|
@@ -496,7 +667,7 @@ ImageryLayerCollection.prototype.pickImageryLayerFeatures = function (
|
|
|
496
667
|
const promises = [];
|
|
497
668
|
const imageryLayers = [];
|
|
498
669
|
|
|
499
|
-
|
|
670
|
+
function queuePickFeatures(imagery) {
|
|
500
671
|
if (!imagery.imageryLayer.ready) {
|
|
501
672
|
return undefined;
|
|
502
673
|
}
|
|
@@ -512,11 +683,24 @@ ImageryLayerCollection.prototype.pickImageryLayerFeatures = function (
|
|
|
512
683
|
promises.push(promise);
|
|
513
684
|
imageryLayers.push(imagery.imageryLayer);
|
|
514
685
|
}
|
|
515
|
-
}
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
if (defined(scene.globe)) {
|
|
689
|
+
pickImageryHelper(scene, pickedLocation, true, function (imagery) {
|
|
690
|
+
queuePickFeatures(imagery);
|
|
691
|
+
});
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
if (defined(pickedModel)) {
|
|
695
|
+
pickModelFeatures(pickedModel, pickedLocation, function (imagery) {
|
|
696
|
+
queuePickFeatures(imagery);
|
|
697
|
+
});
|
|
698
|
+
}
|
|
516
699
|
|
|
517
700
|
if (promises.length === 0) {
|
|
518
701
|
return undefined;
|
|
519
702
|
}
|
|
703
|
+
|
|
520
704
|
return Promise.all(promises).then(function (results) {
|
|
521
705
|
const features = [];
|
|
522
706
|
for (let resultIndex = 0; resultIndex < results.length; ++resultIndex) {
|
|
@@ -26,17 +26,13 @@ import IonImageryProviderFactory from "./IonImageryProviderFactory.js";
|
|
|
26
26
|
* @alias IonImageryProvider
|
|
27
27
|
* @constructor
|
|
28
28
|
*
|
|
29
|
-
* @param {IonImageryProvider.ConstructorOptions} [options] Object describing initialization options
|
|
30
|
-
*
|
|
31
29
|
* @example
|
|
32
30
|
* const imageryLayer = Cesium.ImageryLayer.fromProviderAsync(Cesium.IonImageryProvider.fromAssetId(3812));
|
|
33
31
|
* viewer.imageryLayers.add(imageryLayer);
|
|
34
32
|
*
|
|
35
33
|
* @see IonImageryProvider.fromAssetId
|
|
36
34
|
*/
|
|
37
|
-
function IonImageryProvider(
|
|
38
|
-
options = options ?? Frozen.EMPTY_OBJECT;
|
|
39
|
-
|
|
35
|
+
function IonImageryProvider() {
|
|
40
36
|
this._defaultAlpha = undefined;
|
|
41
37
|
this._defaultNightAlpha = undefined;
|
|
42
38
|
this._defaultDayAlpha = undefined;
|
package/Source/Scene/Label.js
CHANGED
|
@@ -1282,10 +1282,10 @@ Label.getScreenSpaceBoundingBox = function (
|
|
|
1282
1282
|
screenSpacePosition,
|
|
1283
1283
|
result,
|
|
1284
1284
|
) {
|
|
1285
|
-
let x
|
|
1286
|
-
let y
|
|
1287
|
-
let width
|
|
1288
|
-
let height
|
|
1285
|
+
let x;
|
|
1286
|
+
let y;
|
|
1287
|
+
let width;
|
|
1288
|
+
let height;
|
|
1289
1289
|
const scale = label.totalScale;
|
|
1290
1290
|
|
|
1291
1291
|
const backgroundBillboard = label._backgroundBillboard;
|
|
@@ -335,7 +335,7 @@ function updateBackgroundBillboard(
|
|
|
335
335
|
// Label is shown and background is hidden - remove the background billboard
|
|
336
336
|
if (label.show && !showBackground) {
|
|
337
337
|
backgroundBillboardCollection.remove(backgroundBillboard);
|
|
338
|
-
label._backgroundBillboard =
|
|
338
|
+
label._backgroundBillboard = undefined;
|
|
339
339
|
return;
|
|
340
340
|
}
|
|
341
341
|
|
|
@@ -23,6 +23,7 @@ import defined from "../Core/defined.js";
|
|
|
23
23
|
* This object is normally not instantiated directly, use {@link MVTDataProvider.fromUrl}.
|
|
24
24
|
* </div>
|
|
25
25
|
*
|
|
26
|
+
* @extends UrlTemplate3DTilesDataProvider
|
|
26
27
|
* @experimental This feature is not final and is subject to change without Cesium's standard deprecation policy.
|
|
27
28
|
*/
|
|
28
29
|
class MVTDataProvider extends UrlTemplate3DTilesDataProvider {
|
|
@@ -35,6 +36,7 @@ class MVTDataProvider extends UrlTemplate3DTilesDataProvider {
|
|
|
35
36
|
* @param {number} [options.maxZoom=14] Maximum zoom level represented in the generated tileset.
|
|
36
37
|
* @param {Rectangle} [options.extent] Optional geographic extent in radians to constrain the generated tile tree.
|
|
37
38
|
* @param {string} [options.featureIdProperty] MVT property name to use as feature ID.
|
|
39
|
+
* @returns {Promise<MVTDataProvider>}
|
|
38
40
|
*/
|
|
39
41
|
static async fromUrl(url, options) {
|
|
40
42
|
return /** @type {Promise<MVTDataProvider>} */ (
|
|
@@ -163,7 +163,6 @@ class B3dmLoader extends ResourceLoader {
|
|
|
163
163
|
|
|
164
164
|
const b3dm = B3dmParser.parse(this._arrayBuffer, this._byteOffset);
|
|
165
165
|
|
|
166
|
-
let batchLength = b3dm.batchLength;
|
|
167
166
|
const featureTableJson = b3dm.featureTableJson;
|
|
168
167
|
const featureTableBinary = b3dm.featureTableBinary;
|
|
169
168
|
const batchTableJson = b3dm.batchTableJson;
|
|
@@ -173,7 +172,7 @@ class B3dmLoader extends ResourceLoader {
|
|
|
173
172
|
featureTableJson,
|
|
174
173
|
featureTableBinary,
|
|
175
174
|
);
|
|
176
|
-
batchLength = featureTable.getGlobalProperty("BATCH_LENGTH");
|
|
175
|
+
const batchLength = featureTable.getGlobalProperty("BATCH_LENGTH");
|
|
177
176
|
// Set batch length.
|
|
178
177
|
this._batchLength = batchLength;
|
|
179
178
|
// Set the RTC Center transform, if present.
|
|
@@ -276,15 +276,17 @@ function generateEdgeFaceNormals(edgeIndices, edgeData, edgeVisibility) {
|
|
|
276
276
|
// No silhouette edges in this primitive, the shader only checks normals for SILHOUETTE edges.
|
|
277
277
|
return edgeFaceNormals;
|
|
278
278
|
}
|
|
279
|
-
|
|
279
|
+
// raw is a packed typed array (x0,y0,z0, x1,y1,z1, ...) of float, byte, or
|
|
280
|
+
// short components. The vectors are normalized below, which cancels the
|
|
281
|
+
// quantization scale, so raw components can be used directly for all three.
|
|
282
|
+
const normalCount = raw.length / 3;
|
|
283
|
+
const silhouetteNormalsFloat = new Float32Array(raw.length);
|
|
280
284
|
const scratchNormal = new Cartesian3();
|
|
281
285
|
|
|
282
|
-
for (let i = 0; i <
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
scratchNormal.
|
|
286
|
-
scratchNormal.y = 2 * ((vec3.y + 128) / 255) - 1;
|
|
287
|
-
scratchNormal.z = 2 * ((vec3.z + 128) / 255) - 1;
|
|
286
|
+
for (let i = 0; i < normalCount; i++) {
|
|
287
|
+
scratchNormal.x = raw[i * 3];
|
|
288
|
+
scratchNormal.y = raw[i * 3 + 1];
|
|
289
|
+
scratchNormal.z = raw[i * 3 + 2];
|
|
288
290
|
|
|
289
291
|
if (Cartesian3.magnitudeSquared(scratchNormal) > 0) {
|
|
290
292
|
Cartesian3.normalize(scratchNormal, scratchNormal);
|
|
@@ -609,7 +611,7 @@ function collectVertexColors(runtimePrimitive) {
|
|
|
609
611
|
* @param {number} edgeOtherPosLocation Shader attribute location for the other endpoint position
|
|
610
612
|
* @param {number} edgeOffsetLocation Shader attribute location for edge offset (-1 or +1)
|
|
611
613
|
* @param {VertexColorInfo} [vertexColorInfo] Packed per-vertex colors (optional)
|
|
612
|
-
* @param {Object} edgeVisibility Edge visibility extension object (may contain silhouetteNormals
|
|
614
|
+
* @param {Object} edgeVisibility Edge visibility extension object (may contain silhouetteNormals, a packed typed array of VEC3 components)
|
|
613
615
|
* @param {Float32Array} edgeFaceNormals Packed face normals (6 floats per edge)
|
|
614
616
|
* @param {Object} [cumDistAttribute] Cumulative distance attribute
|
|
615
617
|
* @param {number} [edgeCumDistLocation] Cumulative distance location
|
|
@@ -407,7 +407,7 @@ function createInstances(loader, components, frameState) {
|
|
|
407
407
|
const featureIdArray = new Float32Array(instancesLength);
|
|
408
408
|
|
|
409
409
|
const instancePositions = Cartesian3.unpackArray(translationTypedArray);
|
|
410
|
-
let instancePosition
|
|
410
|
+
let instancePosition;
|
|
411
411
|
|
|
412
412
|
const instanceNormalRight = new Cartesian3();
|
|
413
413
|
const instanceNormalUp = new Cartesian3();
|
|
@@ -294,13 +294,13 @@ function getModelMatrixAndNodeTransform(
|
|
|
294
294
|
const instances = renderResources.runtimeNode.node.instances;
|
|
295
295
|
if (instances.transformInWorldSpace) {
|
|
296
296
|
// Replicate the multiplication order in LegacyInstancingStageVS.
|
|
297
|
-
|
|
297
|
+
Matrix4.multiplyTransformation(
|
|
298
298
|
model.modelMatrix,
|
|
299
299
|
sceneGraph.components.transform,
|
|
300
300
|
modelMatrix,
|
|
301
301
|
);
|
|
302
302
|
|
|
303
|
-
|
|
303
|
+
Matrix4.multiplyTransformation(
|
|
304
304
|
sceneGraph.axisCorrectionMatrix,
|
|
305
305
|
renderResources.runtimeNode.computedTransform,
|
|
306
306
|
nodeComputedTransform,
|
|
@@ -308,16 +308,13 @@ function getModelMatrixAndNodeTransform(
|
|
|
308
308
|
} else {
|
|
309
309
|
// The node transform should be pre-multiplied with the instancing transform.
|
|
310
310
|
modelMatrix = Matrix4.clone(sceneGraph.computedModelMatrix, modelMatrix);
|
|
311
|
-
|
|
311
|
+
Matrix4.multiplyTransformation(
|
|
312
312
|
modelMatrix,
|
|
313
313
|
renderResources.runtimeNode.computedTransform,
|
|
314
314
|
modelMatrix,
|
|
315
315
|
);
|
|
316
316
|
|
|
317
|
-
|
|
318
|
-
Matrix4.IDENTITY,
|
|
319
|
-
nodeComputedTransform,
|
|
320
|
-
);
|
|
317
|
+
Matrix4.clone(Matrix4.IDENTITY, nodeComputedTransform);
|
|
321
318
|
}
|
|
322
319
|
}
|
|
323
320
|
|
|
@@ -170,13 +170,28 @@ MaterialPipelineStage.process = function (
|
|
|
170
170
|
const disablePointCloudNormals =
|
|
171
171
|
defined(model.pointCloudShading) && !model.pointCloudShading.normalShading;
|
|
172
172
|
|
|
173
|
+
if (defined(material.planarFill)) {
|
|
174
|
+
processPlanarFill(
|
|
175
|
+
material.planarFill,
|
|
176
|
+
primitive,
|
|
177
|
+
renderResources,
|
|
178
|
+
frameState,
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// When backgroundFill is true (BENTLEY_materials_planar_fill), the primitive
|
|
183
|
+
// must be unlit so it matches the background color exactly.
|
|
184
|
+
const hasBackgroundFill =
|
|
185
|
+
defined(material.planarFill) && material.planarFill.backgroundFill;
|
|
186
|
+
|
|
173
187
|
// Classification models will be rendered as unlit.
|
|
174
188
|
const lightingOptions = renderResources.lightingOptions;
|
|
175
189
|
if (
|
|
176
190
|
material.unlit ||
|
|
177
191
|
!hasNormals ||
|
|
178
192
|
hasClassification ||
|
|
179
|
-
disablePointCloudNormals
|
|
193
|
+
disablePointCloudNormals ||
|
|
194
|
+
hasBackgroundFill
|
|
180
195
|
) {
|
|
181
196
|
lightingOptions.lightingModel = LightingModel.UNLIT;
|
|
182
197
|
} else {
|
|
@@ -232,6 +247,114 @@ MaterialPipelineStage.process = function (
|
|
|
232
247
|
}
|
|
233
248
|
};
|
|
234
249
|
|
|
250
|
+
/**
|
|
251
|
+
* Add uniforms and defines for the BENTLEY_materials_planar_fill extension.
|
|
252
|
+
*
|
|
253
|
+
* Per the BENTLEY_materials_planar_fill spec:
|
|
254
|
+
* <ul>
|
|
255
|
+
* <li>ALL planar primitives must render in front of non-planar (Depth Ordering).</li>
|
|
256
|
+
* <li><code>behind</code> fills must render behind coplanar geometry from the SAME
|
|
257
|
+
* logical object only (same feature ID from EXT_mesh_features).</li>
|
|
258
|
+
* </ul>
|
|
259
|
+
*
|
|
260
|
+
* Instead of using fixed polygon offset units (which don't scale well with
|
|
261
|
+
* logarithmic depth), we use proportional depth scaling in the shader.
|
|
262
|
+
* This approach matches the edge visibility system and scales naturally
|
|
263
|
+
* at all viewing distances.
|
|
264
|
+
*
|
|
265
|
+
* @param {ModelComponents.PlanarFill} planarFill The planar fill properties of the material
|
|
266
|
+
* @param {ModelComponents.Primitive} primitive The primitive to be rendered
|
|
267
|
+
* @param {PrimitiveRenderResources} renderResources The render resources for the primitive
|
|
268
|
+
* @param {FrameState} frameState The frame state.
|
|
269
|
+
* @private
|
|
270
|
+
*/
|
|
271
|
+
function processPlanarFill(planarFill, primitive, renderResources, frameState) {
|
|
272
|
+
const { uniformMap, shaderBuilder } = renderResources;
|
|
273
|
+
|
|
274
|
+
// Signal to Scene that the planar fill ID framebuffer is needed.
|
|
275
|
+
frameState.planarFillRequested = true;
|
|
276
|
+
|
|
277
|
+
// All planar fills get a proportional depth pull toward camera. Behind fills
|
|
278
|
+
// additionally sample the planar fill ID texture to test same-feature; if so,
|
|
279
|
+
// they apply a small proportional push to sit behind non-behind geometry.
|
|
280
|
+
shaderBuilder.addDefine(
|
|
281
|
+
"HAS_PLANAR_FILL_DEPTH",
|
|
282
|
+
undefined,
|
|
283
|
+
ShaderDestination.FRAGMENT,
|
|
284
|
+
);
|
|
285
|
+
|
|
286
|
+
// Configure background fill for BENTLEY_materials_planar_fill extension.
|
|
287
|
+
// When backgroundFill is true, the fill is rendered using the view's background color
|
|
288
|
+
// to create an invisible masking polygon. Lighting is forced to unlit in process().
|
|
289
|
+
//
|
|
290
|
+
// NOTE: The wireframeFill property from BENTLEY_materials_planar_fill is intentionally
|
|
291
|
+
// not handled here. CesiumJS does not yet have a proper wireframe rendering mode
|
|
292
|
+
// (debugWireframe is not a true wireframe mode), so wireframeFill is loaded as a NO-OP.
|
|
293
|
+
// When a proper wireframe mode is added to CesiumJS, wireframeFill support should be
|
|
294
|
+
// implemented here to control fill visibility in that mode. See
|
|
295
|
+
// https://github.com/CesiumGS/cesium/issues/13620.
|
|
296
|
+
if (planarFill.backgroundFill) {
|
|
297
|
+
shaderBuilder.addDefine(
|
|
298
|
+
"HAS_BACKGROUND_FILL",
|
|
299
|
+
undefined,
|
|
300
|
+
ShaderDestination.FRAGMENT,
|
|
301
|
+
);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
const hasFeatureIds =
|
|
305
|
+
defined(primitive.featureIds) && primitive.featureIds.length > 0;
|
|
306
|
+
if (!hasFeatureIds) {
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
// "Same logical object" is implementation-defined per the spec; this
|
|
311
|
+
// implementation uses the primitive's first feature ID set. Primitives
|
|
312
|
+
// without feature IDs (checked above) don't participate in the
|
|
313
|
+
// behind-fill same-object test.
|
|
314
|
+
const featureIdMember = primitive.featureIds[0].positionalLabel;
|
|
315
|
+
shaderBuilder.addDefine(
|
|
316
|
+
"PLANAR_FILL_FEATURE_ID",
|
|
317
|
+
featureIdMember,
|
|
318
|
+
ShaderDestination.FRAGMENT,
|
|
319
|
+
);
|
|
320
|
+
|
|
321
|
+
if (planarFill.behind) {
|
|
322
|
+
// Behind fills READ the planar fill ID texture to test whether the
|
|
323
|
+
// pixel they cover belongs to the same logical object.
|
|
324
|
+
shaderBuilder.addDefine(
|
|
325
|
+
"HAS_PLANAR_FILL_BEHIND",
|
|
326
|
+
undefined,
|
|
327
|
+
ShaderDestination.FRAGMENT,
|
|
328
|
+
);
|
|
329
|
+
} else {
|
|
330
|
+
// Non-behind fills WRITE their feature IDs to the planar fill ID
|
|
331
|
+
// texture in a pre-pass so behind fills can test same-object
|
|
332
|
+
// coplanarity. Mark this primitive for the pre-pass derived command.
|
|
333
|
+
renderResources.planarFillIdPass = true;
|
|
334
|
+
|
|
335
|
+
// Add a define so that during the pre-pass the shader outputs
|
|
336
|
+
// the feature ID instead of the normal color.
|
|
337
|
+
shaderBuilder.addDefine(
|
|
338
|
+
"HAS_PLANAR_FILL_ID_PASS",
|
|
339
|
+
undefined,
|
|
340
|
+
ShaderDestination.FRAGMENT,
|
|
341
|
+
);
|
|
342
|
+
|
|
343
|
+
// Runtime uniform to distinguish the pre-pass from the main pass
|
|
344
|
+
// (same shader program serves both commands). This default returns false
|
|
345
|
+
// for the main command; the derived pre-pass command overrides it to
|
|
346
|
+
// return true (see derivePlanarFillIdCommand in ModelDrawCommand.js).
|
|
347
|
+
shaderBuilder.addUniform(
|
|
348
|
+
"bool",
|
|
349
|
+
"u_isPlanarFillIdPass",
|
|
350
|
+
ShaderDestination.FRAGMENT,
|
|
351
|
+
);
|
|
352
|
+
uniformMap.u_isPlanarFillIdPass = function () {
|
|
353
|
+
return false;
|
|
354
|
+
};
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
|
|
235
358
|
/**
|
|
236
359
|
* Process constant LOD extension for a texture
|
|
237
360
|
*
|
|
@@ -73,7 +73,7 @@ import ModelImagery from "./ModelImagery.js";
|
|
|
73
73
|
* {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/EXT_mesh_gpu_instancing|EXT_mesh_gpu_instancing}
|
|
74
74
|
* </li>
|
|
75
75
|
* <li>
|
|
76
|
-
* {@link https://github.com/KhronosGroup/glTF/
|
|
76
|
+
* {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/EXT_mesh_primitive_restart|EXT_mesh_primitive_restart}
|
|
77
77
|
* </li>
|
|
78
78
|
* <li>
|
|
79
79
|
* {@link https://github.com/KhronosGroup/glTF/pull/2479|EXT_mesh_primitive_edge_visibility}
|
|
@@ -105,6 +105,10 @@ import ModelImagery from "./ModelImagery.js";
|
|
|
105
105
|
* {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit/README.md|KHR_materials_unlit}
|
|
106
106
|
* </li>
|
|
107
107
|
* <li>
|
|
108
|
+
* {@link https://github.com/KhronosGroup/glTF/pull/2569|KHR_mesh_primitive_restart}
|
|
109
|
+
* (requires a WebGL 2 context; behavior on WebGL 1 is undefined)
|
|
110
|
+
* </li>
|
|
111
|
+
* <li>
|
|
108
112
|
* {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_mesh_quantization|KHR_mesh_quantization}
|
|
109
113
|
* </li>
|
|
110
114
|
* <li>
|
|
@@ -269,6 +273,7 @@ function Model(options) {
|
|
|
269
273
|
*/
|
|
270
274
|
this.referenceMatrix = undefined;
|
|
271
275
|
this._iblReferenceFrameMatrix = Matrix3.clone(Matrix3.IDENTITY); // Derived from reference matrix and the current view matrix
|
|
276
|
+
this._clippingPlanesMatrix = Matrix4.clone(Matrix4.IDENTITY); // Derived from the reference matrix and the clipping planes' own model matrix
|
|
272
277
|
|
|
273
278
|
this._resourcesLoaded = false;
|
|
274
279
|
this._drawCommandsBuilt = false;
|
|
@@ -380,7 +385,6 @@ function Model(options) {
|
|
|
380
385
|
this._clippingPlanes = clippingPlanes;
|
|
381
386
|
}
|
|
382
387
|
this._clippingPlanesState = 0; // If this value changes, the shaders need to be regenerated.
|
|
383
|
-
this._clippingPlanesMatrix = Matrix4.clone(Matrix4.IDENTITY); // Derived from reference matrix and the current view matrix
|
|
384
388
|
|
|
385
389
|
// If the given clipping polygons don't have an owner, make this model its owner.
|
|
386
390
|
// Otherwise, the clipping polygons are passed down from a tileset.
|
|
@@ -2479,16 +2483,10 @@ function updateReferenceMatrices(model, frameState) {
|
|
|
2479
2483
|
);
|
|
2480
2484
|
|
|
2481
2485
|
if (model.isClippingEnabled()) {
|
|
2482
|
-
|
|
2483
|
-
clippingPlanesMatrix = Matrix4.multiply(
|
|
2484
|
-
context.uniformState.view3D,
|
|
2486
|
+
const clippingPlanesMatrix = Matrix4.multiply(
|
|
2485
2487
|
referenceMatrix,
|
|
2486
|
-
clippingPlanesMatrix,
|
|
2487
|
-
);
|
|
2488
|
-
clippingPlanesMatrix = Matrix4.multiply(
|
|
2489
|
-
clippingPlanesMatrix,
|
|
2490
2488
|
model._clippingPlanes.modelMatrix,
|
|
2491
|
-
|
|
2489
|
+
scratchClippingPlanesMatrix,
|
|
2492
2490
|
);
|
|
2493
2491
|
model._clippingPlanesMatrix = Matrix4.inverseTranspose(
|
|
2494
2492
|
clippingPlanesMatrix,
|
|
@@ -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
|
|