@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
package/Source/Scene/Picking.js
CHANGED
|
@@ -247,6 +247,7 @@ const scratchColorZero = new Color(0.0, 0.0, 0.0, 0.0);
|
|
|
247
247
|
* height will default to the value of <code>width</code>
|
|
248
248
|
* @param {BoundingRectangle} result The result rectangle
|
|
249
249
|
* @returns {BoundingRectangle} The result rectangle
|
|
250
|
+
* @ignore
|
|
250
251
|
*/
|
|
251
252
|
function computePickingDrawingBufferRectangle(
|
|
252
253
|
drawingBufferHeight,
|
|
@@ -265,21 +266,31 @@ function computePickingDrawingBufferRectangle(
|
|
|
265
266
|
/**
|
|
266
267
|
* Setup needed before picking.
|
|
267
268
|
*
|
|
269
|
+
* Exported for use by Snapping, which performs the same offscreen pick render
|
|
270
|
+
* but targets the snap framebuffer and flags the pass as a snapping pass.
|
|
271
|
+
*
|
|
268
272
|
* @param {Scene} scene
|
|
269
273
|
* @param {Cartesian2} windowPosition Window coordinates to perform picking on.
|
|
270
274
|
* @param {BoundingRectangle} drawingBufferRectangle The output drawing buffer recangle.
|
|
271
275
|
* @param {number} [width=3] Width of the pick rectangle.
|
|
272
276
|
* @param {number} [height=3] Height of the pick rectangle.
|
|
277
|
+
* @param {object} [options] Object with the following properties:
|
|
278
|
+
* @param {PickFramebuffer|SnapFramebuffer} [options.framebuffer] The framebuffer to render into. Defaults to the view's pick framebuffer.
|
|
279
|
+
* @param {boolean} [options.snap=false] If <code>true</code>, mark the pass as a snapping pass (sets <code>frameState.passes.snap</code>).
|
|
280
|
+
*
|
|
281
|
+
* @private
|
|
273
282
|
*/
|
|
274
|
-
function pickBegin(
|
|
283
|
+
export function pickBegin(
|
|
275
284
|
scene,
|
|
276
285
|
windowPosition,
|
|
277
286
|
drawingBufferRectangle,
|
|
278
287
|
width,
|
|
279
288
|
height,
|
|
289
|
+
options,
|
|
280
290
|
) {
|
|
281
291
|
const { context, frameState, defaultView } = scene;
|
|
282
292
|
const { viewport, pickFramebuffer } = defaultView;
|
|
293
|
+
const framebuffer = options?.framebuffer ?? pickFramebuffer;
|
|
283
294
|
|
|
284
295
|
scene.view = defaultView;
|
|
285
296
|
|
|
@@ -316,13 +327,14 @@ function pickBegin(
|
|
|
316
327
|
);
|
|
317
328
|
frameState.invertClassification = false;
|
|
318
329
|
frameState.passes.pick = true;
|
|
330
|
+
frameState.passes.snap = options?.snap ?? false;
|
|
319
331
|
frameState.tilesetPassState = pickTilesetPassState;
|
|
320
332
|
|
|
321
333
|
context.uniformState.update(frameState);
|
|
322
334
|
|
|
323
335
|
scene.updateEnvironment();
|
|
324
336
|
|
|
325
|
-
passState =
|
|
337
|
+
passState = framebuffer.begin(drawingBufferRectangle, viewport);
|
|
326
338
|
|
|
327
339
|
scene.updateAndExecuteCommands(passState, scratchColorZero);
|
|
328
340
|
scene.resolveFramebuffers(passState);
|
|
@@ -332,8 +344,10 @@ function pickBegin(
|
|
|
332
344
|
* Teardown needed after picking.
|
|
333
345
|
*
|
|
334
346
|
* @param {Scene} scene
|
|
347
|
+
*
|
|
348
|
+
* @private
|
|
335
349
|
*/
|
|
336
|
-
function pickEnd(scene) {
|
|
350
|
+
export function pickEnd(scene) {
|
|
337
351
|
const { context } = scene;
|
|
338
352
|
context.endFrame();
|
|
339
353
|
}
|
|
@@ -808,6 +822,7 @@ Picking.prototype.pickPosition = function (scene, windowPosition, result) {
|
|
|
808
822
|
* @param {object[]} pickedAttributes
|
|
809
823
|
* @param {object[]} pickedFeatures
|
|
810
824
|
* @returns {boolean} whether picking should end
|
|
825
|
+
* @ignore
|
|
811
826
|
*/
|
|
812
827
|
function addDrillPickedResults(
|
|
813
828
|
pickedResults,
|
|
@@ -875,6 +890,7 @@ function addDrillPickedResults(
|
|
|
875
890
|
* @param {function(number): object[]} pickCallback Pick callback to execute each iteration
|
|
876
891
|
* @param {number} [limit=Number.MAX_VALUE] If supplied, stop drilling after collecting this many picks
|
|
877
892
|
* @returns {object[]} List of picked results
|
|
893
|
+
* @ignore
|
|
878
894
|
*/
|
|
879
895
|
function drillPick(pickCallback, limit) {
|
|
880
896
|
// PERFORMANCE_IDEA: This function calls each primitive's update for each pass. Instead
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import defined from "../Core/defined.js";
|
|
2
|
+
import destroyObject from "../Core/destroyObject.js";
|
|
3
|
+
import PixelFormat from "../Core/PixelFormat.js";
|
|
4
|
+
import Color from "../Core/Color.js";
|
|
5
|
+
import PixelDatatype from "../Renderer/PixelDatatype.js";
|
|
6
|
+
import FramebufferManager from "../Renderer/FramebufferManager.js";
|
|
7
|
+
import ClearCommand from "../Renderer/ClearCommand.js";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Creates and manages a framebuffer for the planar fill feature-ID pre-pass.
|
|
11
|
+
*
|
|
12
|
+
* During this pass, non-behind planar fill geometry writes its per-fragment
|
|
13
|
+
* feature ID into a screen-sized texture. Later, primitives with
|
|
14
|
+
* <code>behind: true</code> (BENTLEY_materials_planar_fill) sample this
|
|
15
|
+
* texture to check whether the pixel they are about to overwrite belongs to
|
|
16
|
+
* the same logical object (same feature ID). Only then do they apply an
|
|
17
|
+
* additional depth offset, pushing the fill behind its own object's edges
|
|
18
|
+
* and non-behind fills — but NOT behind other objects.
|
|
19
|
+
*
|
|
20
|
+
* Layout:
|
|
21
|
+
* Color attachment 0 – R32F (single RED channel): encoded feature ID.
|
|
22
|
+
* Depth-stencil attachment – shared with the main scene for correct depth testing.
|
|
23
|
+
*
|
|
24
|
+
* @alias PlanarFillIdFramebuffer
|
|
25
|
+
* @constructor
|
|
26
|
+
* @private
|
|
27
|
+
*/
|
|
28
|
+
function PlanarFillIdFramebuffer() {
|
|
29
|
+
this._framebufferManager = new FramebufferManager({
|
|
30
|
+
colorAttachmentsLength: 1,
|
|
31
|
+
createColorAttachments: true,
|
|
32
|
+
depthStencil: true,
|
|
33
|
+
supportsDepthTexture: true,
|
|
34
|
+
color: true,
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
this._framebuffer = undefined;
|
|
38
|
+
this._idTexture = undefined;
|
|
39
|
+
this._depthStencilTexture = undefined;
|
|
40
|
+
|
|
41
|
+
this._clearCommand = new ClearCommand({
|
|
42
|
+
color: new Color(0.0, 0.0, 0.0, 0.0),
|
|
43
|
+
depth: 1.0,
|
|
44
|
+
stencil: 0,
|
|
45
|
+
owner: this,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
Object.defineProperties(PlanarFillIdFramebuffer.prototype, {
|
|
50
|
+
/**
|
|
51
|
+
* Gets the underlying framebuffer.
|
|
52
|
+
* @memberof PlanarFillIdFramebuffer.prototype
|
|
53
|
+
* @type {Framebuffer}
|
|
54
|
+
* @readonly
|
|
55
|
+
*/
|
|
56
|
+
framebuffer: {
|
|
57
|
+
get: function () {
|
|
58
|
+
return this._framebuffer;
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Gets the feature-ID texture (color attachment 0).
|
|
64
|
+
* @memberof PlanarFillIdFramebuffer.prototype
|
|
65
|
+
* @type {Texture}
|
|
66
|
+
* @readonly
|
|
67
|
+
*/
|
|
68
|
+
idTexture: {
|
|
69
|
+
get: function () {
|
|
70
|
+
return this._idTexture;
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Gets the depth-stencil texture.
|
|
76
|
+
* @memberof PlanarFillIdFramebuffer.prototype
|
|
77
|
+
* @type {Texture}
|
|
78
|
+
* @readonly
|
|
79
|
+
*/
|
|
80
|
+
depthStencilTexture: {
|
|
81
|
+
get: function () {
|
|
82
|
+
return this._depthStencilTexture;
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Updates (creates / resizes) the framebuffer to match the viewport.
|
|
89
|
+
*
|
|
90
|
+
* @param {Context} context
|
|
91
|
+
* @param {BoundingRectangle} viewport
|
|
92
|
+
* @param {boolean} hdr
|
|
93
|
+
* @returns {boolean} <code>true</code> if the framebuffer was recreated.
|
|
94
|
+
*/
|
|
95
|
+
PlanarFillIdFramebuffer.prototype.update = function (context, viewport, hdr) {
|
|
96
|
+
const width = viewport.width;
|
|
97
|
+
const height = viewport.height;
|
|
98
|
+
|
|
99
|
+
// Feature IDs are integers, so a 32-bit float channel provides plenty of range
|
|
100
|
+
// for feature IDs. A single RED channel (R32F) is used since only one value is
|
|
101
|
+
// stored per pixel. Rendering to R32F requires EXT_color_buffer_float, which is
|
|
102
|
+
// available in WebGL2 on all browsers CesiumJS supports; the UNSIGNED_BYTE fallback
|
|
103
|
+
// below only exists for stubbed WebGL contexts possibly used in tests.
|
|
104
|
+
const pixelDatatype = context.colorBufferFloat
|
|
105
|
+
? PixelDatatype.FLOAT
|
|
106
|
+
: PixelDatatype.UNSIGNED_BYTE;
|
|
107
|
+
|
|
108
|
+
const changed = this._framebufferManager.update(
|
|
109
|
+
context,
|
|
110
|
+
width,
|
|
111
|
+
height,
|
|
112
|
+
1, // no MSAA
|
|
113
|
+
pixelDatatype,
|
|
114
|
+
PixelFormat.RED,
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
if (this._framebufferManager.framebuffer) {
|
|
118
|
+
this._framebuffer = this._framebufferManager.framebuffer;
|
|
119
|
+
this._idTexture = this._framebufferManager.getColorTexture(0);
|
|
120
|
+
this._depthStencilTexture =
|
|
121
|
+
this._framebufferManager.getDepthStencilTexture();
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
return changed;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Returns a ClearCommand that targets this framebuffer.
|
|
129
|
+
*
|
|
130
|
+
* @param {Color} [clearColor] Override the clear color (default: transparent black).
|
|
131
|
+
* @returns {ClearCommand}
|
|
132
|
+
*/
|
|
133
|
+
PlanarFillIdFramebuffer.prototype.getClearCommand = function (clearColor) {
|
|
134
|
+
this._clearCommand.framebuffer = this._framebuffer;
|
|
135
|
+
if (defined(clearColor)) {
|
|
136
|
+
Color.clone(clearColor, this._clearCommand.color);
|
|
137
|
+
}
|
|
138
|
+
return this._clearCommand;
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Releases GPU resources without destroying this object; a later call to
|
|
143
|
+
* {@link PlanarFillIdFramebuffer#update} recreates them.
|
|
144
|
+
*/
|
|
145
|
+
PlanarFillIdFramebuffer.prototype.releaseResources = function () {
|
|
146
|
+
if (!defined(this._framebuffer)) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
this._framebufferManager.destroy();
|
|
150
|
+
this._framebuffer = undefined;
|
|
151
|
+
this._idTexture = undefined;
|
|
152
|
+
this._depthStencilTexture = undefined;
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* @returns {boolean}
|
|
157
|
+
*/
|
|
158
|
+
PlanarFillIdFramebuffer.prototype.isDestroyed = function () {
|
|
159
|
+
return false;
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Destroys WebGL resources.
|
|
164
|
+
*/
|
|
165
|
+
PlanarFillIdFramebuffer.prototype.destroy = function () {
|
|
166
|
+
this._framebufferManager =
|
|
167
|
+
this._framebufferManager && this._framebufferManager.destroy();
|
|
168
|
+
this._clearCommand = undefined;
|
|
169
|
+
return destroyObject(this);
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
export default PlanarFillIdFramebuffer;
|
|
@@ -105,7 +105,6 @@ PntsParser.parse = function (arrayBuffer, byteOffset) {
|
|
|
105
105
|
);
|
|
106
106
|
// Copy the batchTableBinary section and let the underlying ArrayBuffer be freed
|
|
107
107
|
batchTableBinary = new Uint8Array(batchTableBinary);
|
|
108
|
-
byteOffset += batchTableBinaryByteLength;
|
|
109
108
|
}
|
|
110
109
|
}
|
|
111
110
|
|
|
@@ -214,6 +213,7 @@ PntsParser.parse = function (arrayBuffer, byteOffset) {
|
|
|
214
213
|
* a one-time warning will be printed.
|
|
215
214
|
*
|
|
216
215
|
* @param {object} parsedContent The parsed content
|
|
216
|
+
* @ignore
|
|
217
217
|
*/
|
|
218
218
|
function removeInvalidBinaryBodyReferences(parsedContent) {
|
|
219
219
|
const batchTableJson = parsedContent.batchTableJson;
|
package/Source/Scene/Polyline.js
CHANGED
|
@@ -34,6 +34,20 @@ import Material from "./Material.js";
|
|
|
34
34
|
* @see PolylineCollection
|
|
35
35
|
*
|
|
36
36
|
*/
|
|
37
|
+
function makePolylineSegments(polyline, modelMatrix, columbusRepeatWorlds) {
|
|
38
|
+
if (columbusRepeatWorlds) {
|
|
39
|
+
// Columbus repeat worlds: keep the polyline continuous through the
|
|
40
|
+
// ±180° meridian instead of splitting it at the IDL.
|
|
41
|
+
// PolylineCollection's getSegments lifts the projected positions onto
|
|
42
|
+
// adjacent world copies so the line draws through the seam.
|
|
43
|
+
return {
|
|
44
|
+
positions: polyline._actualPositions,
|
|
45
|
+
lengths: [polyline._actualPositions.length],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
return PolylinePipeline.wrapLongitude(polyline._actualPositions, modelMatrix);
|
|
49
|
+
}
|
|
50
|
+
|
|
37
51
|
function Polyline(options, polylineCollection) {
|
|
38
52
|
options = options ?? Frozen.EMPTY_OBJECT;
|
|
39
53
|
|
|
@@ -76,9 +90,13 @@ function Polyline(options, polylineCollection) {
|
|
|
76
90
|
}
|
|
77
91
|
|
|
78
92
|
this._modelMatrix = modelMatrix;
|
|
79
|
-
this.
|
|
80
|
-
|
|
93
|
+
this._columbusRepeatWorlds =
|
|
94
|
+
defined(polylineCollection) &&
|
|
95
|
+
polylineCollection._columbusRepeatWorlds === true;
|
|
96
|
+
this._segments = makePolylineSegments(
|
|
97
|
+
this,
|
|
81
98
|
modelMatrix,
|
|
99
|
+
this._columbusRepeatWorlds,
|
|
82
100
|
);
|
|
83
101
|
|
|
84
102
|
this._actualLength = undefined;
|
|
@@ -371,10 +389,19 @@ Polyline.prototype.update = function () {
|
|
|
371
389
|
const positionsChanged =
|
|
372
390
|
this._propertiesChanged[POSITION_INDEX] > 0 ||
|
|
373
391
|
this._propertiesChanged[POSITION_SIZE_INDEX] > 0;
|
|
374
|
-
|
|
375
|
-
this.
|
|
376
|
-
|
|
392
|
+
const columbusRepeatWorlds =
|
|
393
|
+
defined(this._polylineCollection) &&
|
|
394
|
+
this._polylineCollection._columbusRepeatWorlds === true;
|
|
395
|
+
if (
|
|
396
|
+
!Matrix4.equals(modelMatrix, this._modelMatrix) ||
|
|
397
|
+
positionsChanged ||
|
|
398
|
+
columbusRepeatWorlds !== this._columbusRepeatWorlds
|
|
399
|
+
) {
|
|
400
|
+
this._columbusRepeatWorlds = columbusRepeatWorlds;
|
|
401
|
+
this._segments = makePolylineSegments(
|
|
402
|
+
this,
|
|
377
403
|
modelMatrix,
|
|
404
|
+
columbusRepeatWorlds,
|
|
378
405
|
);
|
|
379
406
|
this._boundingVolumeWC = BoundingSphere.transform(
|
|
380
407
|
this._boundingVolume,
|
|
@@ -32,6 +32,7 @@ import PolylineFS from "../Shaders/PolylineFS.js";
|
|
|
32
32
|
import PolylineVS from "../Shaders/PolylineVS.js";
|
|
33
33
|
import BatchTable from "./BatchTable.js";
|
|
34
34
|
import BlendingState from "./BlendingState.js";
|
|
35
|
+
import ColumbusWorlds from "./ColumbusWorlds.js";
|
|
35
36
|
import Material from "./Material.js";
|
|
36
37
|
import Polyline from "./Polyline.js";
|
|
37
38
|
import SceneMode from "./SceneMode.js";
|
|
@@ -168,6 +169,11 @@ function PolylineCollection(options) {
|
|
|
168
169
|
|
|
169
170
|
this._mode = undefined;
|
|
170
171
|
|
|
172
|
+
// Whether Columbus repeat worlds are enabled; when true, polylines are
|
|
173
|
+
// kept continuous through the ±180° meridian instead of being split at the
|
|
174
|
+
// IDL. Set each update() from the frame state.
|
|
175
|
+
this._columbusRepeatWorlds = false;
|
|
176
|
+
|
|
171
177
|
this._polylinesToUpdate = [];
|
|
172
178
|
this._vertexArrays = [];
|
|
173
179
|
this._positionBuffer = undefined;
|
|
@@ -423,6 +429,17 @@ PolylineCollection.prototype.update = function (frameState) {
|
|
|
423
429
|
|
|
424
430
|
updateMode(this, frameState);
|
|
425
431
|
|
|
432
|
+
const columbusRepeatWorlds =
|
|
433
|
+
frameState.columbusRepeatWorlds === true &&
|
|
434
|
+
(frameState.mode === SceneMode.SCENE2D ||
|
|
435
|
+
frameState.mode === SceneMode.COLUMBUS_VIEW);
|
|
436
|
+
if (this._columbusRepeatWorlds !== columbusRepeatWorlds) {
|
|
437
|
+
// Toggling repeat worlds changes whether polylines are split at the IDL,
|
|
438
|
+
// which changes vertex buffer sizes; rebuild the vertex arrays.
|
|
439
|
+
this._columbusRepeatWorlds = columbusRepeatWorlds;
|
|
440
|
+
this._createVertexArray = true;
|
|
441
|
+
}
|
|
442
|
+
|
|
426
443
|
const context = frameState.context;
|
|
427
444
|
const projection = frameState.mapProjection;
|
|
428
445
|
let polyline;
|
|
@@ -1784,6 +1801,28 @@ PolylineBucket.prototype.getSegments = function (polyline, projection) {
|
|
|
1784
1801
|
);
|
|
1785
1802
|
}
|
|
1786
1803
|
|
|
1804
|
+
if (
|
|
1805
|
+
newPositions.length > 0 &&
|
|
1806
|
+
(this.mode === SceneMode.SCENE2D ||
|
|
1807
|
+
this.mode === SceneMode.COLUMBUS_VIEW) &&
|
|
1808
|
+
polyline._polylineCollection._columbusRepeatWorlds === true
|
|
1809
|
+
) {
|
|
1810
|
+
// Repeat worlds: the IDL split is disabled in this mode, so lift
|
|
1811
|
+
// consecutive projected u values onto the same world copy. The line stays
|
|
1812
|
+
// in the primary world; the scene renders the visible world copies by
|
|
1813
|
+
// shifting the camera, so a line crossing the seam needs no per-copy
|
|
1814
|
+
// placement of its own.
|
|
1815
|
+
const worldWidth = ColumbusWorlds.getWorldWidth(projection);
|
|
1816
|
+
for (let n = 1; n < newPositions.length; ++n) {
|
|
1817
|
+
const du = newPositions[n].x - newPositions[n - 1].x;
|
|
1818
|
+
if (du > worldWidth * 0.5) {
|
|
1819
|
+
newPositions[n].x -= worldWidth;
|
|
1820
|
+
} else if (du < -worldWidth * 0.5) {
|
|
1821
|
+
newPositions[n].x += worldWidth;
|
|
1822
|
+
}
|
|
1823
|
+
}
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1787
1826
|
if (newPositions.length > 0) {
|
|
1788
1827
|
polyline._boundingVolume2D = BoundingSphere.fromPoints(
|
|
1789
1828
|
newPositions,
|
|
@@ -640,8 +640,10 @@ function createStageOutputTextureFunction(stage, name) {
|
|
|
640
640
|
function updateUniformTextures(stage, context) {
|
|
641
641
|
const texturesToRelease = stage._texturesToRelease;
|
|
642
642
|
for (let i = 0; i < texturesToRelease.length; ++i) {
|
|
643
|
-
|
|
644
|
-
|
|
643
|
+
const texture = texturesToRelease[i];
|
|
644
|
+
if (defined(texture)) {
|
|
645
|
+
texture.destroy();
|
|
646
|
+
}
|
|
645
647
|
}
|
|
646
648
|
texturesToRelease.length = 0;
|
|
647
649
|
|
|
@@ -683,18 +683,20 @@ function createBatchTable(primitive, context) {
|
|
|
683
683
|
primitive._batchTableOffsetAttribute2DIndex = offset2DIndex;
|
|
684
684
|
}
|
|
685
685
|
|
|
686
|
-
function
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
clonedValues = attribute.values.slice(0);
|
|
690
|
-
} else {
|
|
691
|
-
clonedValues = new attribute.values.constructor(attribute.values);
|
|
686
|
+
function cloneValues(values) {
|
|
687
|
+
if (Array.isArray(values)) {
|
|
688
|
+
return values.slice(0);
|
|
692
689
|
}
|
|
690
|
+
const ValuesConstructor = values.constructor;
|
|
691
|
+
return new ValuesConstructor(values);
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
function cloneAttribute(attribute) {
|
|
693
695
|
return new GeometryAttribute({
|
|
694
696
|
componentDatatype: attribute.componentDatatype,
|
|
695
697
|
componentsPerAttribute: attribute.componentsPerAttribute,
|
|
696
698
|
normalize: attribute.normalize,
|
|
697
|
-
values:
|
|
699
|
+
values: cloneValues(attribute.values),
|
|
698
700
|
});
|
|
699
701
|
}
|
|
700
702
|
|
|
@@ -709,12 +711,7 @@ function cloneGeometry(geometry) {
|
|
|
709
711
|
|
|
710
712
|
let indices;
|
|
711
713
|
if (defined(geometry.indices)) {
|
|
712
|
-
|
|
713
|
-
if (Array.isArray(sourceValues)) {
|
|
714
|
-
indices = sourceValues.slice(0);
|
|
715
|
-
} else {
|
|
716
|
-
indices = new sourceValues.constructor(sourceValues);
|
|
717
|
-
}
|
|
714
|
+
indices = cloneValues(geometry.indices);
|
|
718
715
|
}
|
|
719
716
|
|
|
720
717
|
return new Geometry({
|
|
@@ -1278,6 +1275,7 @@ function loadAsynchronous(primitive, frameState) {
|
|
|
1278
1275
|
projection: projection,
|
|
1279
1276
|
elementIndexUintSupported: frameState.context.elementIndexUint,
|
|
1280
1277
|
scene3DOnly: scene3DOnly,
|
|
1278
|
+
columbusRepeatWorlds: frameState.columbusRepeatWorlds === true,
|
|
1281
1279
|
vertexCacheOptimize: primitive.vertexCacheOptimize,
|
|
1282
1280
|
compressVertices: primitive.compressVertices,
|
|
1283
1281
|
modelMatrix: primitive.modelMatrix,
|
|
@@ -1360,6 +1358,7 @@ function loadSynchronous(primitive, frameState) {
|
|
|
1360
1358
|
projection: projection,
|
|
1361
1359
|
elementIndexUintSupported: frameState.context.elementIndexUint,
|
|
1362
1360
|
scene3DOnly: scene3DOnly,
|
|
1361
|
+
columbusRepeatWorlds: frameState.columbusRepeatWorlds === true,
|
|
1363
1362
|
vertexCacheOptimize: primitive.vertexCacheOptimize,
|
|
1364
1363
|
compressVertices: primitive.compressVertices,
|
|
1365
1364
|
modelMatrix: primitive.modelMatrix,
|