@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
|
@@ -14,10 +14,11 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
|
|
|
14
14
|
* @property {Property | number} [leadTime] A Property specifying the number of seconds in front the object to show.
|
|
15
15
|
* @property {Property | number} [trailTime] A Property specifying the number of seconds behind of the object to show.
|
|
16
16
|
* @property {Property | number} [width=1.0] A numeric Property specifying the width in pixels.
|
|
17
|
-
* @property {Property | number} [resolution=60] A numeric Property specifying the maximum number of seconds to step when sampling the position.
|
|
17
|
+
* @property {Property | number} [resolution=60] A numeric Property specifying the maximum number of seconds to step when sampling the position. Fractional positive values are allowed; in PORTIONS materialMode, non-positive values fall back to the default resolution of 60 seconds.
|
|
18
18
|
* @property {MaterialProperty | Color} [material=Color.WHITE] A Property specifying the material used to draw the path.
|
|
19
19
|
* @property {Property | DistanceDisplayCondition} [distanceDisplayCondition] A Property specifying at what distance from the camera that this path will be displayed.
|
|
20
20
|
* @property {Property | string} [relativeTo] A Property specifying the frame in which to visualize the path. Use another entity's id to visualize the path relative to that entity, or use the string values "FIXED" or "INERTIAL" to visualize the path in those reference frames.
|
|
21
|
+
* @property {Property | PathMode} [materialMode] A Property specifying how material properties are applied along the path.
|
|
21
22
|
*/
|
|
22
23
|
|
|
23
24
|
/**
|
|
@@ -46,6 +47,8 @@ function PathGraphics(options) {
|
|
|
46
47
|
this._distanceDisplayConditionSubscription = undefined;
|
|
47
48
|
this._relativeTo = undefined;
|
|
48
49
|
this._relativeToSubscription = undefined;
|
|
50
|
+
this._materialMode = undefined;
|
|
51
|
+
this._materialModeSubscription = undefined;
|
|
49
52
|
|
|
50
53
|
this.merge(options ?? Frozen.EMPTY_OBJECT);
|
|
51
54
|
}
|
|
@@ -95,6 +98,7 @@ Object.defineProperties(PathGraphics.prototype, {
|
|
|
95
98
|
|
|
96
99
|
/**
|
|
97
100
|
* Gets or sets the Property specifying the maximum number of seconds to step when sampling the position.
|
|
101
|
+
* Fractional positive values are allowed; in PORTIONS materialMode, non-positive values fall back to the default resolution of 60 seconds.
|
|
98
102
|
* @memberof PathGraphics.prototype
|
|
99
103
|
* @type {Property|undefined}
|
|
100
104
|
* @default 60
|
|
@@ -125,6 +129,7 @@ Object.defineProperties(PathGraphics.prototype, {
|
|
|
125
129
|
* @experimental This feature is not final and is subject to change without Cesium's standard deprecation policy.
|
|
126
130
|
*/
|
|
127
131
|
relativeTo: createPropertyDescriptor("relativeTo"),
|
|
132
|
+
materialMode: createPropertyDescriptor("materialMode"),
|
|
128
133
|
});
|
|
129
134
|
|
|
130
135
|
/**
|
|
@@ -145,6 +150,7 @@ PathGraphics.prototype.clone = function (result) {
|
|
|
145
150
|
result.material = this.material;
|
|
146
151
|
result.distanceDisplayCondition = this.distanceDisplayCondition;
|
|
147
152
|
result.relativeTo = this.relativeTo;
|
|
153
|
+
result.materialMode = this.materialMode;
|
|
148
154
|
return result;
|
|
149
155
|
};
|
|
150
156
|
|
|
@@ -170,5 +176,6 @@ PathGraphics.prototype.merge = function (source) {
|
|
|
170
176
|
this.distanceDisplayCondition =
|
|
171
177
|
this.distanceDisplayCondition ?? source.distanceDisplayCondition;
|
|
172
178
|
this.relativeTo = this.relativeTo ?? source.relativeTo;
|
|
179
|
+
this.materialMode = this.materialMode ?? source.materialMode;
|
|
173
180
|
};
|
|
174
181
|
export default PathGraphics;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Defines how material properties are applied along a path.
|
|
5
|
+
*
|
|
6
|
+
* @enum {number}
|
|
7
|
+
*/
|
|
8
|
+
const PathMode = {
|
|
9
|
+
/**
|
|
10
|
+
* The material is applied to the entire path as a whole.
|
|
11
|
+
* @type {number}
|
|
12
|
+
* @constant
|
|
13
|
+
*/
|
|
14
|
+
WHOLE: 0,
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The material is applied in portions based on temporal position information,
|
|
18
|
+
* using interval-based material properties.
|
|
19
|
+
* @type {number}
|
|
20
|
+
* @constant
|
|
21
|
+
*/
|
|
22
|
+
PORTIONS: 1,
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
Object.freeze(PathMode);
|
|
26
|
+
|
|
27
|
+
export default PathMode;
|
|
@@ -17,12 +17,14 @@ import CallbackPositionProperty from "./CallbackPositionProperty.js";
|
|
|
17
17
|
import CompositePositionProperty from "./CompositePositionProperty.js";
|
|
18
18
|
import ConstantPositionProperty from "./ConstantPositionProperty.js";
|
|
19
19
|
import MaterialProperty from "./MaterialProperty.js";
|
|
20
|
+
import PathMode from "./PathMode.js";
|
|
20
21
|
import Property from "./Property.js";
|
|
21
22
|
import ReferenceProperty from "./ReferenceProperty.js";
|
|
22
23
|
import SampledPositionProperty from "./SampledPositionProperty.js";
|
|
23
24
|
import ScaledPositionProperty from "./ScaledPositionProperty.js";
|
|
24
25
|
import TimeIntervalCollectionPositionProperty from "./TimeIntervalCollectionPositionProperty.js";
|
|
25
26
|
import Quaternion from "../Core/Quaternion.js";
|
|
27
|
+
import arrayRemoveDuplicates from "../Core/arrayRemoveDuplicates.js";
|
|
26
28
|
|
|
27
29
|
const update3DMatrix3Scratch1 = new Matrix3();
|
|
28
30
|
const update3DMatrix3Scratch2 = new Matrix3();
|
|
@@ -210,6 +212,7 @@ const subSampleIntervalPropertyScratch = new TimeInterval();
|
|
|
210
212
|
function EntityData(entity) {
|
|
211
213
|
this.entity = entity;
|
|
212
214
|
this.polyline = undefined;
|
|
215
|
+
this.segmentPolylines = [];
|
|
213
216
|
this.index = undefined;
|
|
214
217
|
this.updater = undefined;
|
|
215
218
|
}
|
|
@@ -734,6 +737,111 @@ function subSample(
|
|
|
734
737
|
const toFixedScratch = new Matrix3();
|
|
735
738
|
const updateOrientationScratch = new Quaternion();
|
|
736
739
|
const updateRotationScratch = new Matrix3();
|
|
740
|
+
const portionsVisibleIntervalScratch = new TimeInterval();
|
|
741
|
+
const portionsSegmentIntervalScratch = new TimeInterval();
|
|
742
|
+
const portionsDynamicIntervalScratch = new TimeInterval();
|
|
743
|
+
|
|
744
|
+
function getDynamicMaterialProperties(materialData) {
|
|
745
|
+
const dynamic = [];
|
|
746
|
+
if (!defined(materialData)) {
|
|
747
|
+
return dynamic;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
for (const key in materialData) {
|
|
751
|
+
// Material properties store uniforms as underscored backing fields.
|
|
752
|
+
// Ignore event and subscription bookkeeping fields.
|
|
753
|
+
if (
|
|
754
|
+
key[0] !== "_" ||
|
|
755
|
+
key === "_definitionChanged" ||
|
|
756
|
+
key.endsWith("Subscription")
|
|
757
|
+
) {
|
|
758
|
+
continue;
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
const prop = materialData[key];
|
|
762
|
+
if (
|
|
763
|
+
defined(prop) &&
|
|
764
|
+
typeof prop.getValue === "function" &&
|
|
765
|
+
!Property.isConstant(prop)
|
|
766
|
+
) {
|
|
767
|
+
dynamic.push(prop);
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
return dynamic;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
function emitSegmentsForSplitTimes(
|
|
775
|
+
splitTimes,
|
|
776
|
+
positionProperty,
|
|
777
|
+
time,
|
|
778
|
+
pathGraphics,
|
|
779
|
+
entity,
|
|
780
|
+
item,
|
|
781
|
+
polylineCollection,
|
|
782
|
+
resolution,
|
|
783
|
+
referenceFrame,
|
|
784
|
+
materialProp,
|
|
785
|
+
startingSegIndex,
|
|
786
|
+
) {
|
|
787
|
+
// Sort and dedupe
|
|
788
|
+
splitTimes.sort(JulianDate.compare);
|
|
789
|
+
splitTimes = arrayRemoveDuplicates(splitTimes, JulianDate.equalsEpsilon);
|
|
790
|
+
|
|
791
|
+
let segIndex = startingSegIndex;
|
|
792
|
+
for (let j = 0; j < splitTimes.length - 1; j++) {
|
|
793
|
+
const splitStart = splitTimes[j];
|
|
794
|
+
const splitStop = splitTimes[j + 1];
|
|
795
|
+
if (!JulianDate.lessThan(splitStart, splitStop)) {
|
|
796
|
+
continue;
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
// Get segment midpoint
|
|
800
|
+
const splitMidTime = JulianDate.addSeconds(
|
|
801
|
+
splitStart,
|
|
802
|
+
JulianDate.secondsDifference(splitStop, splitStart) / 2,
|
|
803
|
+
new JulianDate(),
|
|
804
|
+
);
|
|
805
|
+
|
|
806
|
+
// Subsample positions
|
|
807
|
+
const subPositions = subSample(
|
|
808
|
+
positionProperty,
|
|
809
|
+
splitStart,
|
|
810
|
+
splitStop,
|
|
811
|
+
time,
|
|
812
|
+
referenceFrame,
|
|
813
|
+
resolution,
|
|
814
|
+
[],
|
|
815
|
+
);
|
|
816
|
+
if (subPositions.length < 2) {
|
|
817
|
+
continue;
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
// Get or create a polyline for this segment
|
|
821
|
+
let segPolyline = item.segmentPolylines[segIndex];
|
|
822
|
+
if (!defined(segPolyline)) {
|
|
823
|
+
segPolyline = polylineCollection.add();
|
|
824
|
+
segPolyline.id = entity;
|
|
825
|
+
item.segmentPolylines[segIndex] = segPolyline;
|
|
826
|
+
}
|
|
827
|
+
segPolyline.show = true;
|
|
828
|
+
segPolyline.positions = subPositions;
|
|
829
|
+
segPolyline.material = MaterialProperty.getValue(
|
|
830
|
+
splitMidTime,
|
|
831
|
+
materialProp,
|
|
832
|
+
segPolyline.material,
|
|
833
|
+
);
|
|
834
|
+
segPolyline.width = Property.getValueOrDefault(
|
|
835
|
+
pathGraphics._width,
|
|
836
|
+
time,
|
|
837
|
+
defaultWidth,
|
|
838
|
+
);
|
|
839
|
+
|
|
840
|
+
segIndex++;
|
|
841
|
+
}
|
|
842
|
+
return segIndex;
|
|
843
|
+
}
|
|
844
|
+
|
|
737
845
|
function PolylineUpdater(scene, referenceFrame) {
|
|
738
846
|
this._unusedIndexes = [];
|
|
739
847
|
this._polylineCollection = new PolylineCollection();
|
|
@@ -845,6 +953,9 @@ PolylineUpdater.prototype.updateObject = function (time, item) {
|
|
|
845
953
|
polyline.show = false;
|
|
846
954
|
item.index = undefined;
|
|
847
955
|
}
|
|
956
|
+
for (let j = 0; j < item.segmentPolylines.length; j++) {
|
|
957
|
+
item.segmentPolylines[j].show = false;
|
|
958
|
+
}
|
|
848
959
|
return;
|
|
849
960
|
}
|
|
850
961
|
|
|
@@ -883,16 +994,198 @@ PolylineUpdater.prototype.updateObject = function (time, item) {
|
|
|
883
994
|
// This can happen if the position is sampled at a time when it is only defined at a single point
|
|
884
995
|
if (positions.length < 2) {
|
|
885
996
|
polyline.show = false;
|
|
997
|
+
for (let j = 0; j < item.segmentPolylines.length; j++) {
|
|
998
|
+
item.segmentPolylines[j].show = false;
|
|
999
|
+
}
|
|
886
1000
|
return;
|
|
887
1001
|
}
|
|
888
1002
|
|
|
889
1003
|
polyline.show = true;
|
|
890
1004
|
polyline.positions = positions;
|
|
1005
|
+
|
|
891
1006
|
polyline.material = MaterialProperty.getValue(
|
|
892
1007
|
time,
|
|
893
|
-
pathGraphics.
|
|
1008
|
+
pathGraphics.material,
|
|
894
1009
|
polyline.material,
|
|
895
1010
|
);
|
|
1011
|
+
|
|
1012
|
+
const materialMode = Property.getValueOrUndefined(
|
|
1013
|
+
pathGraphics.materialMode,
|
|
1014
|
+
time,
|
|
1015
|
+
);
|
|
1016
|
+
const materialProp = pathGraphics.material;
|
|
1017
|
+
if (materialMode === PathMode.PORTIONS && !materialProp.isConstant) {
|
|
1018
|
+
// Hide the single polyline if it exists
|
|
1019
|
+
if (defined(polyline)) {
|
|
1020
|
+
polyline.show = false;
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
// Prevent non-positive split steps from creating non-terminating loops.
|
|
1024
|
+
// Positive fractional resolutions are valid; only values <= 0 fall back to the default.
|
|
1025
|
+
const splitResolution = resolution > 0 ? resolution : defaultResolution;
|
|
1026
|
+
|
|
1027
|
+
const intervals = materialProp.intervals;
|
|
1028
|
+
let nextSegIndex = 0;
|
|
1029
|
+
|
|
1030
|
+
if (!defined(intervals)) {
|
|
1031
|
+
// Sampled/interpolated root material - generate synthetic times at resolution intervals
|
|
1032
|
+
const splitTimes = [
|
|
1033
|
+
JulianDate.clone(sampleStart),
|
|
1034
|
+
JulianDate.clone(sampleStop),
|
|
1035
|
+
];
|
|
1036
|
+
let splitTime = JulianDate.addSeconds(
|
|
1037
|
+
sampleStart,
|
|
1038
|
+
splitResolution,
|
|
1039
|
+
new JulianDate(),
|
|
1040
|
+
);
|
|
1041
|
+
while (JulianDate.lessThan(splitTime, sampleStop)) {
|
|
1042
|
+
splitTimes.push(JulianDate.clone(splitTime));
|
|
1043
|
+
splitTime = JulianDate.addSeconds(
|
|
1044
|
+
splitTime,
|
|
1045
|
+
splitResolution,
|
|
1046
|
+
new JulianDate(),
|
|
1047
|
+
);
|
|
1048
|
+
}
|
|
1049
|
+
nextSegIndex = emitSegmentsForSplitTimes(
|
|
1050
|
+
splitTimes,
|
|
1051
|
+
positionProperty,
|
|
1052
|
+
time,
|
|
1053
|
+
pathGraphics,
|
|
1054
|
+
entity,
|
|
1055
|
+
item,
|
|
1056
|
+
this._polylineCollection,
|
|
1057
|
+
splitResolution,
|
|
1058
|
+
this._referenceFrame,
|
|
1059
|
+
pathGraphics.material,
|
|
1060
|
+
nextSegIndex,
|
|
1061
|
+
);
|
|
1062
|
+
} else {
|
|
1063
|
+
portionsVisibleIntervalScratch.start = sampleStart;
|
|
1064
|
+
portionsVisibleIntervalScratch.stop = sampleStop;
|
|
1065
|
+
portionsVisibleIntervalScratch.isStartIncluded = true;
|
|
1066
|
+
portionsVisibleIntervalScratch.isStopIncluded = true;
|
|
1067
|
+
|
|
1068
|
+
// Interval-based material - process each interval separately
|
|
1069
|
+
for (let i = 0; i < intervals.length; i++) {
|
|
1070
|
+
const interval = intervals.get(i);
|
|
1071
|
+
|
|
1072
|
+
if (
|
|
1073
|
+
!TimeInterval.intersect(
|
|
1074
|
+
interval,
|
|
1075
|
+
portionsVisibleIntervalScratch,
|
|
1076
|
+
portionsSegmentIntervalScratch,
|
|
1077
|
+
)
|
|
1078
|
+
) {
|
|
1079
|
+
continue;
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
const segStart = portionsSegmentIntervalScratch.start;
|
|
1083
|
+
const segStop = portionsSegmentIntervalScratch.stop;
|
|
1084
|
+
|
|
1085
|
+
if (JulianDate.greaterThanOrEquals(segStart, segStop)) {
|
|
1086
|
+
continue;
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
// Detect dynamic properties and collect their split times
|
|
1090
|
+
const dynamic = getDynamicMaterialProperties(interval.data);
|
|
1091
|
+
const splitTimes = [
|
|
1092
|
+
JulianDate.clone(segStart),
|
|
1093
|
+
JulianDate.clone(segStop),
|
|
1094
|
+
];
|
|
1095
|
+
|
|
1096
|
+
for (let j = 0; j < dynamic.length; j++) {
|
|
1097
|
+
const prop = dynamic[j];
|
|
1098
|
+
const timeDynamicIntervals = prop.intervals;
|
|
1099
|
+
|
|
1100
|
+
if (defined(timeDynamicIntervals)) {
|
|
1101
|
+
// Interval-based property: collect interval boundaries
|
|
1102
|
+
for (let k = 0; k < timeDynamicIntervals.length; k++) {
|
|
1103
|
+
const timeDynamicInterval = timeDynamicIntervals.get(k);
|
|
1104
|
+
|
|
1105
|
+
if (
|
|
1106
|
+
!TimeInterval.intersect(
|
|
1107
|
+
timeDynamicInterval,
|
|
1108
|
+
portionsSegmentIntervalScratch,
|
|
1109
|
+
portionsDynamicIntervalScratch,
|
|
1110
|
+
)
|
|
1111
|
+
) {
|
|
1112
|
+
continue;
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
if (
|
|
1116
|
+
JulianDate.greaterThan(
|
|
1117
|
+
portionsDynamicIntervalScratch.start,
|
|
1118
|
+
segStart,
|
|
1119
|
+
) &&
|
|
1120
|
+
JulianDate.lessThan(
|
|
1121
|
+
portionsDynamicIntervalScratch.start,
|
|
1122
|
+
segStop,
|
|
1123
|
+
)
|
|
1124
|
+
) {
|
|
1125
|
+
splitTimes.push(
|
|
1126
|
+
JulianDate.clone(portionsDynamicIntervalScratch.start),
|
|
1127
|
+
);
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
if (
|
|
1131
|
+
JulianDate.greaterThan(
|
|
1132
|
+
portionsDynamicIntervalScratch.stop,
|
|
1133
|
+
segStart,
|
|
1134
|
+
) &&
|
|
1135
|
+
JulianDate.lessThan(
|
|
1136
|
+
portionsDynamicIntervalScratch.stop,
|
|
1137
|
+
segStop,
|
|
1138
|
+
)
|
|
1139
|
+
) {
|
|
1140
|
+
splitTimes.push(
|
|
1141
|
+
JulianDate.clone(portionsDynamicIntervalScratch.stop),
|
|
1142
|
+
);
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
} else if (!Property.isConstant(prop)) {
|
|
1146
|
+
// Sampled/interpolated property: add resolution-based split times
|
|
1147
|
+
let sampledTime = JulianDate.clone(segStart);
|
|
1148
|
+
while (JulianDate.lessThan(sampledTime, segStop)) {
|
|
1149
|
+
splitTimes.push(JulianDate.clone(sampledTime));
|
|
1150
|
+
sampledTime = JulianDate.addSeconds(
|
|
1151
|
+
sampledTime,
|
|
1152
|
+
splitResolution,
|
|
1153
|
+
new JulianDate(),
|
|
1154
|
+
);
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
// Emit segments for this interval's split times
|
|
1160
|
+
nextSegIndex = emitSegmentsForSplitTimes(
|
|
1161
|
+
splitTimes,
|
|
1162
|
+
positionProperty,
|
|
1163
|
+
time,
|
|
1164
|
+
pathGraphics,
|
|
1165
|
+
entity,
|
|
1166
|
+
item,
|
|
1167
|
+
this._polylineCollection,
|
|
1168
|
+
splitResolution,
|
|
1169
|
+
this._referenceFrame,
|
|
1170
|
+
interval.data,
|
|
1171
|
+
nextSegIndex,
|
|
1172
|
+
);
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
// Hide any excess segment polylines from previous frames.
|
|
1177
|
+
for (let j = nextSegIndex; j < item.segmentPolylines.length; j++) {
|
|
1178
|
+
if (defined(item.segmentPolylines[j])) {
|
|
1179
|
+
item.segmentPolylines[j].show = false;
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
} else {
|
|
1183
|
+
// Not in PORTIONS mode, hide all segment polylines from previous frames
|
|
1184
|
+
for (let j = 0; j < item.segmentPolylines.length; j++) {
|
|
1185
|
+
item.segmentPolylines[j].show = false;
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
|
|
896
1189
|
polyline.width = Property.getValueOrDefault(
|
|
897
1190
|
pathGraphics._width,
|
|
898
1191
|
time,
|
|
@@ -914,6 +1207,10 @@ PolylineUpdater.prototype.removeObject = function (item) {
|
|
|
914
1207
|
polyline.id = undefined;
|
|
915
1208
|
item.index = undefined;
|
|
916
1209
|
}
|
|
1210
|
+
for (let i = 0; i < item.segmentPolylines.length; i++) {
|
|
1211
|
+
item.segmentPolylines[i].show = false;
|
|
1212
|
+
}
|
|
1213
|
+
item.segmentPolylines.length = 0;
|
|
917
1214
|
};
|
|
918
1215
|
|
|
919
1216
|
PolylineUpdater.prototype.destroy = function () {
|
|
@@ -649,6 +649,8 @@ function DynamicGeometryUpdater(primitives, groundPrimitives, geometryUpdater) {
|
|
|
649
649
|
this._primitives = primitives;
|
|
650
650
|
this._groundPrimitives = groundPrimitives;
|
|
651
651
|
this._groundPolylinePrimitive = undefined;
|
|
652
|
+
this._groundGeometrySignature = undefined;
|
|
653
|
+
this._colorAppearance = undefined;
|
|
652
654
|
this._material = undefined;
|
|
653
655
|
this._geometryUpdater = geometryUpdater;
|
|
654
656
|
this._positions = [];
|
|
@@ -692,6 +694,81 @@ function invalidateGroundPolylinePrimitiveGeometry(groundPolylinePrimitive) {
|
|
|
692
694
|
groundPolylinePrimitive._spMorph = undefined;
|
|
693
695
|
}
|
|
694
696
|
|
|
697
|
+
/**
|
|
698
|
+
* Compares the evaluated ground polyline geometry attributes with the ones the
|
|
699
|
+
* current primitive was built from and refreshes the stored signature.
|
|
700
|
+
* Returns true when the primitive has to be rebuilt.
|
|
701
|
+
*
|
|
702
|
+
* Entity polylines driven by a dynamic property (e.g. a CallbackProperty used
|
|
703
|
+
* by the editors) are evaluated every frame. Editors usually return the same
|
|
704
|
+
* positions frame after frame - the camera moves, not the line - so rebuilding
|
|
705
|
+
* the ground polyline primitive unconditionally would destroy its vertex
|
|
706
|
+
* arrays and shader programs on every rendered frame, which is very expensive
|
|
707
|
+
* and makes the line flicker while the view changes.
|
|
708
|
+
*
|
|
709
|
+
* @private
|
|
710
|
+
*/
|
|
711
|
+
function updateGroundPolylineSignature(
|
|
712
|
+
dynamicUpdater,
|
|
713
|
+
positions,
|
|
714
|
+
width,
|
|
715
|
+
arcType,
|
|
716
|
+
granularity,
|
|
717
|
+
color,
|
|
718
|
+
) {
|
|
719
|
+
const length = positions.length;
|
|
720
|
+
const previous = dynamicUpdater._groundGeometrySignature;
|
|
721
|
+
const sameLength = defined(previous) && previous.xyz.length === length * 3;
|
|
722
|
+
const xyz = sameLength ? previous.xyz : new Float64Array(length * 3);
|
|
723
|
+
const colorChanged =
|
|
724
|
+
!sameLength ||
|
|
725
|
+
!defined(previous.color) !== !defined(color) ||
|
|
726
|
+
(defined(color) &&
|
|
727
|
+
(previous.color.red !== color.red ||
|
|
728
|
+
previous.color.green !== color.green ||
|
|
729
|
+
previous.color.blue !== color.blue ||
|
|
730
|
+
previous.color.alpha !== color.alpha));
|
|
731
|
+
let changed =
|
|
732
|
+
!sameLength ||
|
|
733
|
+
colorChanged ||
|
|
734
|
+
previous.width !== width ||
|
|
735
|
+
previous.arcType !== arcType ||
|
|
736
|
+
previous.granularity !== granularity;
|
|
737
|
+
|
|
738
|
+
// Compare the positions by value: the editors move the nodes of the line
|
|
739
|
+
// while the property keeps returning an array of the same length, so only
|
|
740
|
+
// the coordinates tell an edit from a plain re-evaluation.
|
|
741
|
+
for (let i = 0, j = 0; i < length; ++i) {
|
|
742
|
+
const position = positions[i];
|
|
743
|
+
const x = position.x;
|
|
744
|
+
const y = position.y;
|
|
745
|
+
const z = position.z;
|
|
746
|
+
if (!sameLength || xyz[j] !== x || xyz[j + 1] !== y || xyz[j + 2] !== z) {
|
|
747
|
+
changed = true;
|
|
748
|
+
}
|
|
749
|
+
xyz[j++] = x;
|
|
750
|
+
xyz[j++] = y;
|
|
751
|
+
xyz[j++] = z;
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
dynamicUpdater._groundGeometrySignature = {
|
|
755
|
+
xyz,
|
|
756
|
+
width,
|
|
757
|
+
arcType,
|
|
758
|
+
granularity,
|
|
759
|
+
// Copy the components: colors are evaluated into shared scratch objects.
|
|
760
|
+
color: defined(color)
|
|
761
|
+
? {
|
|
762
|
+
red: color.red,
|
|
763
|
+
green: color.green,
|
|
764
|
+
blue: color.blue,
|
|
765
|
+
alpha: color.alpha,
|
|
766
|
+
}
|
|
767
|
+
: undefined,
|
|
768
|
+
};
|
|
769
|
+
return changed;
|
|
770
|
+
}
|
|
771
|
+
|
|
695
772
|
DynamicGeometryUpdater.prototype.update = function (time) {
|
|
696
773
|
const geometryUpdater = this._geometryUpdater;
|
|
697
774
|
const entity = geometryUpdater._entity;
|
|
@@ -754,9 +831,45 @@ DynamicGeometryUpdater.prototype.update = function (time) {
|
|
|
754
831
|
}
|
|
755
832
|
|
|
756
833
|
const fillMaterialProperty = geometryUpdater.fillMaterialProperty;
|
|
834
|
+
const isColorMaterial =
|
|
835
|
+
fillMaterialProperty instanceof ColorMaterialProperty;
|
|
836
|
+
|
|
837
|
+
// Per-instance attributes (show, distance display condition and the
|
|
838
|
+
// material color) are baked into the geometry instance, so any animated
|
|
839
|
+
// one of them requires a rebuild every frame.
|
|
840
|
+
const attributesAnimated =
|
|
841
|
+
!Property.isConstant(polyline._show) ||
|
|
842
|
+
!Property.isConstant(geometryUpdater._distanceDisplayConditionProperty) ||
|
|
843
|
+
(isColorMaterial &&
|
|
844
|
+
defined(fillMaterialProperty.color) &&
|
|
845
|
+
!Property.isConstant(fillMaterialProperty.color));
|
|
846
|
+
|
|
847
|
+
// The per-instance color is part of the geometry instance as well.
|
|
848
|
+
const colorAttribute =
|
|
849
|
+
isColorMaterial && defined(fillMaterialProperty.color)
|
|
850
|
+
? fillMaterialProperty.color.getValue(time, scratchColor)
|
|
851
|
+
: undefined;
|
|
852
|
+
|
|
853
|
+
// Only rebuild the ground polyline primitive when the evaluated geometry
|
|
854
|
+
// actually changed. See updateGroundPolylineSignature.
|
|
855
|
+
const geometryChanged =
|
|
856
|
+
attributesAnimated ||
|
|
857
|
+
updateGroundPolylineSignature(
|
|
858
|
+
this,
|
|
859
|
+
positions,
|
|
860
|
+
geometryUpdater._groundGeometryOptions.width,
|
|
861
|
+
geometryUpdater._groundGeometryOptions.arcType,
|
|
862
|
+
geometryUpdater._groundGeometryOptions.granularity,
|
|
863
|
+
colorAttribute,
|
|
864
|
+
);
|
|
865
|
+
|
|
757
866
|
let appearance;
|
|
758
|
-
if (
|
|
759
|
-
appearance
|
|
867
|
+
if (isColorMaterial) {
|
|
868
|
+
// Reuse one appearance instance: assigning a new appearance makes the
|
|
869
|
+
// primitive rebuild its render states and shader programs.
|
|
870
|
+
appearance =
|
|
871
|
+
this._colorAppearance ??
|
|
872
|
+
(this._colorAppearance = new PolylineColorAppearance());
|
|
760
873
|
} else {
|
|
761
874
|
const material = MaterialProperty.getValue(
|
|
762
875
|
time,
|
|
@@ -770,7 +883,6 @@ DynamicGeometryUpdater.prototype.update = function (time) {
|
|
|
770
883
|
this._material = material;
|
|
771
884
|
}
|
|
772
885
|
|
|
773
|
-
const geometryInstance = geometryUpdater.createFillGeometryInstance(time);
|
|
774
886
|
const classificationType =
|
|
775
887
|
geometryUpdater.classificationTypeProperty.getValue(time);
|
|
776
888
|
const zIndex = Property.getValueOrUndefined(geometryUpdater.zIndex, time);
|
|
@@ -779,7 +891,7 @@ DynamicGeometryUpdater.prototype.update = function (time) {
|
|
|
779
891
|
if (!defined(this._groundPolylinePrimitive)) {
|
|
780
892
|
this._groundPolylinePrimitive = groundPrimitives.add(
|
|
781
893
|
new GroundPolylinePrimitive({
|
|
782
|
-
geometryInstances:
|
|
894
|
+
geometryInstances: geometryUpdater.createFillGeometryInstance(time),
|
|
783
895
|
appearance: appearance,
|
|
784
896
|
classificationType: classificationType,
|
|
785
897
|
asynchronous: false,
|
|
@@ -791,9 +903,15 @@ DynamicGeometryUpdater.prototype.update = function (time) {
|
|
|
791
903
|
if (groundPolylinePrimitive._zIndex !== zIndexKey) {
|
|
792
904
|
groundPrimitives.set(groundPolylinePrimitive, zIndexKey);
|
|
793
905
|
}
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
906
|
+
if (geometryChanged) {
|
|
907
|
+
groundPolylinePrimitive.geometryInstances =
|
|
908
|
+
geometryUpdater.createFillGeometryInstance(time);
|
|
909
|
+
invalidateGroundPolylinePrimitiveGeometry(groundPolylinePrimitive);
|
|
910
|
+
}
|
|
911
|
+
// Animated materials still need their uniforms refreshed per frame.
|
|
912
|
+
if (geometryChanged || !isColorMaterial) {
|
|
913
|
+
groundPolylinePrimitive.appearance = appearance;
|
|
914
|
+
}
|
|
797
915
|
groundPolylinePrimitive.classificationType = classificationType;
|
|
798
916
|
}
|
|
799
917
|
|
|
@@ -298,7 +298,7 @@ PolylineVisualizer.prototype.getBoundingSphere = function (entity, result) {
|
|
|
298
298
|
const tmp = getBoundingSphereBoundingSphereScratch;
|
|
299
299
|
|
|
300
300
|
let count = 0;
|
|
301
|
-
let state
|
|
301
|
+
let state;
|
|
302
302
|
const batches = this._batches;
|
|
303
303
|
const batchesLength = batches.length;
|
|
304
304
|
const updater = this._updaters.get(entity.id);
|
|
@@ -375,7 +375,7 @@ StaticOutlineGeometryBatch.prototype.update = function (time) {
|
|
|
375
375
|
const translucentBatchesLength = translucentBatches.length;
|
|
376
376
|
let itemsToRemove;
|
|
377
377
|
let isUpdated = true;
|
|
378
|
-
let needUpdate
|
|
378
|
+
let needUpdate;
|
|
379
379
|
|
|
380
380
|
do {
|
|
381
381
|
needUpdate = false;
|
|
@@ -222,6 +222,29 @@ const AutomaticUniforms = {
|
|
|
222
222
|
},
|
|
223
223
|
}),
|
|
224
224
|
|
|
225
|
+
/**
|
|
226
|
+
* An automatic GLSL uniform containing the feature-ID texture produced by
|
|
227
|
+
* the planar fill pre-pass (BENTLEY_materials_planar_fill). Non-behind
|
|
228
|
+
* planar fill geometry writes its per-fragment feature ID here so that
|
|
229
|
+
* behind fills can test whether the existing pixel belongs to the same
|
|
230
|
+
* logical object.
|
|
231
|
+
*
|
|
232
|
+
* @example
|
|
233
|
+
* // GLSL declaration
|
|
234
|
+
* uniform sampler2D czm_planarFillIdTexture;
|
|
235
|
+
*
|
|
236
|
+
* // Sample
|
|
237
|
+
* vec2 coords = gl_FragCoord.xy / czm_viewport.zw;
|
|
238
|
+
* float existingFeatureId = texture(czm_planarFillIdTexture, coords).r;
|
|
239
|
+
*/
|
|
240
|
+
czm_planarFillIdTexture: new AutomaticUniform({
|
|
241
|
+
size: 1,
|
|
242
|
+
datatype: WebGLConstants.SAMPLER_2D,
|
|
243
|
+
getValue: function (uniformState) {
|
|
244
|
+
return uniformState.planarFillIdTexture;
|
|
245
|
+
},
|
|
246
|
+
}),
|
|
247
|
+
|
|
225
248
|
/**
|
|
226
249
|
* An automatic GLSL uniform representing a 4x4 model transformation matrix that
|
|
227
250
|
* transforms model coordinates to world coordinates.
|
|
@@ -1011,20 +1011,26 @@ Object.defineProperties(Context.prototype, {
|
|
|
1011
1011
|
},
|
|
1012
1012
|
|
|
1013
1013
|
/**
|
|
1014
|
-
* A 1x1 RGBA texture initialized to
|
|
1015
|
-
* be used as a placeholder texture while other textures are downloaded.
|
|
1014
|
+
* A 1x1 RGBA texture initialized to the color defined by {@link Texture.defaultColor}.
|
|
1015
|
+
* This can be used as a placeholder texture while other textures are downloaded.
|
|
1016
1016
|
* @memberof Context.prototype
|
|
1017
1017
|
* @type {Texture}
|
|
1018
1018
|
*/
|
|
1019
1019
|
defaultTexture: {
|
|
1020
1020
|
get: function () {
|
|
1021
1021
|
if (this._defaultTexture === undefined) {
|
|
1022
|
+
const color = Texture.defaultColor;
|
|
1022
1023
|
this._defaultTexture = new Texture({
|
|
1023
1024
|
context: this,
|
|
1024
1025
|
source: {
|
|
1025
1026
|
width: 1,
|
|
1026
1027
|
height: 1,
|
|
1027
|
-
arrayBufferView: new Uint8Array([
|
|
1028
|
+
arrayBufferView: new Uint8Array([
|
|
1029
|
+
color.red * 255,
|
|
1030
|
+
color.green * 255,
|
|
1031
|
+
color.blue * 255,
|
|
1032
|
+
color.alpha * 255,
|
|
1033
|
+
]),
|
|
1028
1034
|
},
|
|
1029
1035
|
flipY: false,
|
|
1030
1036
|
});
|