@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
|
@@ -325,11 +325,6 @@ function ArcGisMapServerImageryProvider(options) {
|
|
|
325
325
|
this._credit = options.credit;
|
|
326
326
|
this._tileCredits = undefined;
|
|
327
327
|
|
|
328
|
-
let credit = options.credit;
|
|
329
|
-
if (typeof credit === "string") {
|
|
330
|
-
credit = new Credit(credit);
|
|
331
|
-
}
|
|
332
|
-
|
|
333
328
|
/**
|
|
334
329
|
* Gets or sets a value indicating whether feature picking is enabled. If true, {@link ArcGisMapServerImageryProvider#pickFeatures} will
|
|
335
330
|
* invoke the "identify" operation on the ArcGIS server and return the features included in the response. If false,
|
|
@@ -4,7 +4,7 @@ import Resource from "../Core/Resource.js";
|
|
|
4
4
|
|
|
5
5
|
let defaultTokenCredit;
|
|
6
6
|
const defaultAccessToken =
|
|
7
|
-
"
|
|
7
|
+
"AAPTa7BPWL4PoZRFPJ2CM2YRclg..ub1vMOBXctC7ozMMKNnmx3ZwVTsDJAXo2GLomQ2CZjuOc2HLr1-CryeuRo9ZsV65cuZ9xN1yFKeLTu7Cxld7B97aI28os_NnuC9nvWde_l4G1DTApSHmhrVoZfKgO0bqOrsDfvvSgO-cdkUEvBASNX_4Lb9tB5fEY7lbYaWdOOWBXyZylR9il0-biB248V6HdDT1kgkSwz9esfKialRTLgxJx8AFM9is--UXK0CLvZn6JUU44PZSFuMyAT1_rgxsirsZ";
|
|
8
8
|
/**
|
|
9
9
|
* Default options for accessing the ArcGIS image tile service.
|
|
10
10
|
*
|
|
@@ -706,8 +706,9 @@ Object.defineProperties(Billboard.prototype, {
|
|
|
706
706
|
},
|
|
707
707
|
|
|
708
708
|
/**
|
|
709
|
-
*
|
|
709
|
+
* The aligned axis is the direction vector that the billboard up vector points towards.
|
|
710
710
|
* The default is the zero vector, which means the billboard is aligned to the screen up vector.
|
|
711
|
+
* Note that only the zero vector (0,0,0) resets the alignment to screen up.
|
|
711
712
|
* @memberof Billboard.prototype
|
|
712
713
|
* @type {Cartesian3}
|
|
713
714
|
* @example
|
|
@@ -102,6 +102,7 @@ const attributeLocations = {
|
|
|
102
102
|
* @param {boolean} [options.show=true] Determines if the billboards in the collection will be shown.
|
|
103
103
|
* @param {number} [options.coarseDepthTestDistance] The distance from the camera, beyond which, billboards are depth-tested against an approximation of the globe ellipsoid rather than against the full globe depth buffer. If unspecified, the default value is determined relative to the value of {@link Ellipsoid.default}.
|
|
104
104
|
* @param {number} [options.threePointDepthTestDistance] The distance from the camera, within which, billboards with a {@link Billboard#heightReference} value of {@link HeightReference.CLAMP_TO_GROUND} or {@link HeightReference.CLAMP_TO_TERRAIN} are depth tested against three key points. This ensures that if any key point of the billboard is visible, the whole billboard will be visible. If unspecified, the default value is determined relative to the value of {@link Ellipsoid.default}.
|
|
105
|
+
* @param {boolean} [options.alwaysThreePointDepthTest=false] Enables the three-point depth test even when {@link Globe#depthTestAgainstTerrain} is false.
|
|
105
106
|
* @performance For best performance, prefer a few collections, each with many billboards, to
|
|
106
107
|
* many collections with only a few billboards each. Organize collections so that billboards
|
|
107
108
|
* with the same update frequency are in the same collection, i.e., billboards that do not
|
|
@@ -305,6 +306,7 @@ function BillboardCollection(options) {
|
|
|
305
306
|
this._threePointDepthTestDistance =
|
|
306
307
|
options.threePointDepthTestDistance ??
|
|
307
308
|
Ellipsoid.default.minimumRadius / 1000.0;
|
|
309
|
+
this._alwaysThreePointDepthTest = options.alwaysThreePointDepthTest ?? false;
|
|
308
310
|
|
|
309
311
|
this._uniforms = {
|
|
310
312
|
u_atlas: () => {
|
|
@@ -1033,8 +1035,9 @@ function writeCompressedAttrib1(
|
|
|
1033
1035
|
billboard,
|
|
1034
1036
|
) {
|
|
1035
1037
|
const writer = vafWriters[attributeLocations.compressedAttribute1];
|
|
1036
|
-
|
|
1038
|
+
let alignedAxis = billboard.alignedAxis;
|
|
1037
1039
|
if (!Cartesian3.equals(alignedAxis, Cartesian3.ZERO)) {
|
|
1040
|
+
alignedAxis = Cartesian3.normalize(alignedAxis, new Cartesian3());
|
|
1038
1041
|
billboardCollection._shaderAlignedAxis = true;
|
|
1039
1042
|
}
|
|
1040
1043
|
|
|
@@ -1096,12 +1099,15 @@ function writeCompressedAttrib2(
|
|
|
1096
1099
|
? billboard.getPickId(frameState.context).color
|
|
1097
1100
|
: Color.WHITE;
|
|
1098
1101
|
const sizeInMeters = billboard.sizeInMeters ? 1.0 : 0.0;
|
|
1102
|
+
const rawAxis = billboard.alignedAxis;
|
|
1103
|
+
const normalizedAxis = !Cartesian3.equals(rawAxis, Cartesian3.ZERO)
|
|
1104
|
+
? Cartesian3.normalize(rawAxis, new Cartesian3())
|
|
1105
|
+
: rawAxis;
|
|
1099
1106
|
const validAlignedAxis =
|
|
1100
|
-
Math.abs(Cartesian3.magnitudeSquared(
|
|
1107
|
+
Math.abs(Cartesian3.magnitudeSquared(normalizedAxis) - 1.0) <
|
|
1101
1108
|
CesiumMath.EPSILON6
|
|
1102
1109
|
? 1.0
|
|
1103
1110
|
: 0.0;
|
|
1104
|
-
|
|
1105
1111
|
billboardCollection._allSizedInMeters =
|
|
1106
1112
|
billboardCollection._allSizedInMeters && sizeInMeters === 1.0;
|
|
1107
1113
|
|
|
@@ -1292,9 +1298,13 @@ function writeTextureCoordinateBoundsOrLabelTranslate(
|
|
|
1292
1298
|
const depthTestAgainstTerrain =
|
|
1293
1299
|
defined(scene.globe) && scene.globe.depthTestAgainstTerrain;
|
|
1294
1300
|
|
|
1295
|
-
// Only do manual depth test
|
|
1301
|
+
// Only do manual depth test when the globe is opaque. Collections may
|
|
1302
|
+
// explicitly opt in when the globe does not also depth-test entities.
|
|
1296
1303
|
billboardCollection._shaderClampToGround =
|
|
1297
|
-
context.depthTexture &&
|
|
1304
|
+
context.depthTexture &&
|
|
1305
|
+
!globeTranslucent &&
|
|
1306
|
+
(depthTestAgainstTerrain ||
|
|
1307
|
+
billboardCollection._alwaysThreePointDepthTest);
|
|
1298
1308
|
}
|
|
1299
1309
|
const writer =
|
|
1300
1310
|
vafWriters[attributeLocations.textureCoordinateBoundsOrLabelTranslate];
|
|
@@ -199,9 +199,11 @@ BillboardTexture.prototype.loadImage = async function (
|
|
|
199
199
|
let index;
|
|
200
200
|
const atlas = this._billboardCollection.textureAtlas;
|
|
201
201
|
try {
|
|
202
|
-
|
|
203
|
-
if (
|
|
204
|
-
index =
|
|
202
|
+
const indexOrPromise = atlas.addImage(id, image, width, height);
|
|
203
|
+
if (typeof indexOrPromise === "number") {
|
|
204
|
+
index = indexOrPromise;
|
|
205
|
+
} else {
|
|
206
|
+
index = await indexOrPromise;
|
|
205
207
|
}
|
|
206
208
|
} catch (error) {
|
|
207
209
|
// There was an error loading the image
|
|
@@ -7,6 +7,8 @@ import Frozen from "../Core/Frozen.js";
|
|
|
7
7
|
import renderPoints from "./renderBufferPointCollection.js";
|
|
8
8
|
import BufferPointMaterial from "./BufferPointMaterial.js";
|
|
9
9
|
|
|
10
|
+
/** @import BlendOption from "./BlendOption.js"; */
|
|
11
|
+
/** @import BoundingSphere from "../Core/BoundingSphere.js"; */
|
|
10
12
|
/** @import ComponentDatatype from "../Core/ComponentDatatype.js"; */
|
|
11
13
|
/** @import Matrix4 from "../Core/Matrix4.js"; */
|
|
12
14
|
/** @import FrameState from "./FrameState.js"; */
|
|
@@ -58,10 +60,16 @@ class BufferPointCollection extends BufferPrimitiveCollection {
|
|
|
58
60
|
* @param {object} options
|
|
59
61
|
* @param {Matrix4} [options.modelMatrix=Matrix4.IDENTITY] Transforms geometry from model to world coordinates.
|
|
60
62
|
* @param {number} [options.primitiveCountMax=BufferPrimitiveCollection.DEFAULT_CAPACITY]
|
|
61
|
-
* @param {boolean} [options.show=true]
|
|
62
63
|
* @param {ComponentDatatype} [options.positionDatatype=ComponentDatatype.DOUBLE]
|
|
64
|
+
* @param {boolean} [options.positionNormalized=false]
|
|
65
|
+
* @param {boolean} [options.show=true]
|
|
63
66
|
* @param {boolean} [options.allowPicking=false] When <code>true</code>, primitives are pickable with {@link Scene#pick}. When <code>false</code>, memory and initialization cost are lower.
|
|
67
|
+
* @param {BoundingSphere} [options.boundingVolume] Bounding volume, in world space, for the collection. When
|
|
68
|
+
* unspecified, a bounding volume is computed automatically and updated when primitive positions change. When
|
|
69
|
+
* specified, users are responsible for updating bounding volume as needed. Pre-computing the bounding volume
|
|
70
|
+
* manually, and updating it only as needed, will improve performance for larger dynamic collections.
|
|
64
71
|
* @param {boolean} [options.debugShowBoundingVolume=false]
|
|
72
|
+
* @param {BlendOption} [options.blendOption=BlendOption.TRANSLUCENT]
|
|
65
73
|
*/
|
|
66
74
|
constructor(options = Frozen.EMPTY_OBJECT) {
|
|
67
75
|
super({ ...options, vertexCountMax: options.primitiveCountMax });
|
|
@@ -91,6 +99,8 @@ class BufferPointCollection extends BufferPrimitiveCollection {
|
|
|
91
99
|
static _cloneEmpty(collection) {
|
|
92
100
|
return new BufferPointCollection({
|
|
93
101
|
primitiveCountMax: collection.primitiveCountMax,
|
|
102
|
+
positionDatatype: collection.positionDatatype,
|
|
103
|
+
positionNormalized: collection.positionNormalized,
|
|
94
104
|
});
|
|
95
105
|
}
|
|
96
106
|
|
|
@@ -9,6 +9,8 @@ import IndexDatatype from "../Core/IndexDatatype.js";
|
|
|
9
9
|
import renderPolygons from "./renderBufferPolygonCollection.js";
|
|
10
10
|
import BufferPolygonMaterial from "./BufferPolygonMaterial.js";
|
|
11
11
|
|
|
12
|
+
/** @import BlendOption from "./BlendOption.js"; */
|
|
13
|
+
/** @import BoundingSphere from "../Core/BoundingSphere.js"; */
|
|
12
14
|
/** @import { TypedArray } from "../Core/globalTypes.js"; */
|
|
13
15
|
/** @import Matrix4 from "../Core/Matrix4.js"; */
|
|
14
16
|
/** @import FrameState from "./FrameState.js" */
|
|
@@ -80,9 +82,15 @@ class BufferPolygonCollection extends BufferPrimitiveCollection {
|
|
|
80
82
|
* @param {number} [options.holeCountMax=BufferPrimitiveCollection.DEFAULT_CAPACITY]
|
|
81
83
|
* @param {number} [options.triangleCountMax=BufferPrimitiveCollection.DEFAULT_CAPACITY]
|
|
82
84
|
* @param {ComponentDatatype} [options.positionDatatype=ComponentDatatype.DOUBLE]
|
|
85
|
+
* @param {boolean} [options.positionNormalized=false]
|
|
83
86
|
* @param {boolean} [options.show=true]
|
|
84
87
|
* @param {boolean} [options.allowPicking=true] When <code>true</code>, primitives are pickable with {@link Scene#pick}. When <code>false</code>, memory and initialization cost are lower.
|
|
88
|
+
* @param {BoundingSphere} [options.boundingVolume] Bounding volume, in world space, for the collection. When
|
|
89
|
+
* unspecified, a bounding volume is computed automatically and updated when primitive positions change. When
|
|
90
|
+
* specified, users are responsible for updating bounding volume as needed. Pre-computing the bounding volume
|
|
91
|
+
* manually, and updating it only as needed, will improve performance for larger dynamic collections.
|
|
85
92
|
* @param {boolean} [options.debugShowBoundingVolume=false]
|
|
93
|
+
* @param {BlendOption} [options.blendOption=BlendOption.TRANSLUCENT]
|
|
86
94
|
*/
|
|
87
95
|
constructor(options = Frozen.EMPTY_OBJECT) {
|
|
88
96
|
super(options);
|
|
@@ -107,6 +115,22 @@ class BufferPolygonCollection extends BufferPrimitiveCollection {
|
|
|
107
115
|
*/
|
|
108
116
|
this._holeIndexView = null;
|
|
109
117
|
|
|
118
|
+
/**
|
|
119
|
+
* Per-vertex tile side flags used to suppress outlines along clipped tile
|
|
120
|
+
* boundaries. Undefined for collections that do not originate from MVT.
|
|
121
|
+
* @type {TypedArray|undefined}
|
|
122
|
+
* @ignore
|
|
123
|
+
*/
|
|
124
|
+
this._polygonTileBoundaryFlags = undefined;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Whether the collection draws polygon outlines. Vector tile styling sets
|
|
128
|
+
* this when either outline color or width is present in the style.
|
|
129
|
+
* @type {boolean}
|
|
130
|
+
* @ignore
|
|
131
|
+
*/
|
|
132
|
+
this._polygonOutlineEnabled = false;
|
|
133
|
+
|
|
110
134
|
/**
|
|
111
135
|
* @type {number}
|
|
112
136
|
* @ignore
|
|
@@ -225,6 +249,8 @@ class BufferPolygonCollection extends BufferPrimitiveCollection {
|
|
|
225
249
|
vertexCountMax: collection.vertexCountMax,
|
|
226
250
|
holeCountMax: collection.holeCountMax,
|
|
227
251
|
triangleCountMax: collection.triangleCountMax,
|
|
252
|
+
positionDatatype: collection.positionDatatype,
|
|
253
|
+
positionNormalized: collection.positionNormalized,
|
|
228
254
|
});
|
|
229
255
|
}
|
|
230
256
|
|
|
@@ -82,6 +82,8 @@ class BufferPolylineCollection extends BufferPrimitiveCollection {
|
|
|
82
82
|
return new BufferPolylineCollection({
|
|
83
83
|
primitiveCountMax: collection.primitiveCountMax,
|
|
84
84
|
vertexCountMax: collection.vertexCountMax,
|
|
85
|
+
positionDatatype: collection.positionDatatype,
|
|
86
|
+
positionNormalized: collection.positionNormalized,
|
|
85
87
|
});
|
|
86
88
|
}
|
|
87
89
|
|
|
@@ -9,8 +9,11 @@ import assert from "../Core/assert.js";
|
|
|
9
9
|
import ComponentDatatype from "../Core/ComponentDatatype.js";
|
|
10
10
|
import defined from "../Core/defined.js";
|
|
11
11
|
import Check from "../Core/Check.js";
|
|
12
|
+
import AttributeCompression from "../Core/AttributeCompression.js";
|
|
12
13
|
import SceneMode from "./SceneMode.js";
|
|
14
|
+
import AttributeType from "./AttributeType.js";
|
|
13
15
|
import oneTimeWarning from "../Core/oneTimeWarning.js";
|
|
16
|
+
import BlendOption from "../Scene/BlendOption.js";
|
|
14
17
|
|
|
15
18
|
/** @import { Destroyable, TypedArray, TypedArrayConstructor } from "../Core/globalTypes.js"; */
|
|
16
19
|
/** @import Context from "../Renderer/Context.js"; */
|
|
@@ -74,8 +77,16 @@ class BufferPrimitiveCollection {
|
|
|
74
77
|
* @param {number} [options.vertexCountMax=BufferPrimitiveCollection.DEFAULT_CAPACITY]
|
|
75
78
|
* @param {boolean} [options.show=true]
|
|
76
79
|
* @param {ComponentDatatype} [options.positionDatatype=ComponentDatatype.DOUBLE]
|
|
80
|
+
* @param {boolean} [options.positionNormalized=false] When <code>true</code>, integer position values are treated as normalized,
|
|
81
|
+
* where the full integer range maps to [-1, 1] (signed) or [0, 1] (unsigned). Only relevant for integer position datatypes
|
|
82
|
+
* (BYTE, UNSIGNED_BYTE, SHORT, UNSIGNED_SHORT).
|
|
77
83
|
* @param {boolean} [options.allowPicking=false] When <code>true</code>, primitives are pickable with {@link Scene#pick}. When <code>false</code>, memory and initialization cost are lower.
|
|
84
|
+
* @param {BoundingSphere} [options.boundingVolume] Bounding volume, in world space, for the collection. When
|
|
85
|
+
* unspecified, a bounding volume is computed automatically and updated when primitive positions change. When
|
|
86
|
+
* specified, users are responsible for updating bounding volume as needed. Pre-computing the bounding volume
|
|
87
|
+
* manually, and updating it only as needed, will improve performance for larger dynamic collections.
|
|
78
88
|
* @param {boolean} [options.debugShowBoundingVolume=false]
|
|
89
|
+
* @param {BlendOption} [options.blendOption=BlendOption.TRANSLUCENT]
|
|
79
90
|
*/
|
|
80
91
|
constructor(options = Frozen.EMPTY_OBJECT) {
|
|
81
92
|
/**
|
|
@@ -86,6 +97,15 @@ class BufferPrimitiveCollection {
|
|
|
86
97
|
this.show = options.show ?? true;
|
|
87
98
|
|
|
88
99
|
/**
|
|
100
|
+
* Collection blend option; must be OPAQUE or TRANSLUCENT.
|
|
101
|
+
* @type {BlendOption}
|
|
102
|
+
* @readonly
|
|
103
|
+
* @ignore
|
|
104
|
+
*/
|
|
105
|
+
this._blendOption = options.blendOption ?? BlendOption.TRANSLUCENT;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Transforms geometry from model to world coordinates.
|
|
89
109
|
* @type {Matrix4}
|
|
90
110
|
* @default Matrix4.IDENTITY
|
|
91
111
|
* @readonly
|
|
@@ -98,14 +118,17 @@ class BufferPrimitiveCollection {
|
|
|
98
118
|
* @readonly
|
|
99
119
|
* @protected
|
|
100
120
|
*/
|
|
101
|
-
this._boundingVolume =
|
|
121
|
+
this._boundingVolume = BoundingSphere.clone(
|
|
122
|
+
options.boundingVolume ?? new BoundingSphere(),
|
|
123
|
+
new BoundingSphere(),
|
|
124
|
+
);
|
|
102
125
|
|
|
103
126
|
/**
|
|
104
|
-
* @type {
|
|
127
|
+
* @type {boolean}
|
|
105
128
|
* @readonly
|
|
106
129
|
* @protected
|
|
107
130
|
*/
|
|
108
|
-
this.
|
|
131
|
+
this._boundingVolumeAutoUpdate = !defined(options.boundingVolume);
|
|
109
132
|
|
|
110
133
|
/**
|
|
111
134
|
* When <code>true</code>, primitives are pickable with {@link Scene#pick}.
|
|
@@ -171,7 +194,6 @@ class BufferPrimitiveCollection {
|
|
|
171
194
|
|
|
172
195
|
/**
|
|
173
196
|
* @type {number}
|
|
174
|
-
* @protected
|
|
175
197
|
* @ignore
|
|
176
198
|
*/
|
|
177
199
|
this._positionCountMax =
|
|
@@ -183,6 +205,21 @@ class BufferPrimitiveCollection {
|
|
|
183
205
|
*/
|
|
184
206
|
this._positionView = null;
|
|
185
207
|
|
|
208
|
+
/**
|
|
209
|
+
* @type {ComponentDatatype}
|
|
210
|
+
* @ignore
|
|
211
|
+
*/
|
|
212
|
+
this._positionDatatype =
|
|
213
|
+
options.positionDatatype ?? ComponentDatatype.DOUBLE;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* When <code>true</code>, integer position values represent normalized floats
|
|
217
|
+
* in [-1, 1] (signed) or [0, 1] (unsigned). Only applicable to integer datatypes.
|
|
218
|
+
* @type {boolean}
|
|
219
|
+
* @ignore
|
|
220
|
+
*/
|
|
221
|
+
this._positionNormalized = options.positionNormalized ?? false;
|
|
222
|
+
|
|
186
223
|
/**
|
|
187
224
|
* @type {DataView<ArrayBuffer>}
|
|
188
225
|
* @ignore
|
|
@@ -211,10 +248,15 @@ class BufferPrimitiveCollection {
|
|
|
211
248
|
*/
|
|
212
249
|
this._dirtyBoundingVolume = false;
|
|
213
250
|
|
|
251
|
+
/**
|
|
252
|
+
* Monotonically increasing counter, bumped each time collection is marked "clean".
|
|
253
|
+
* @type {number}
|
|
254
|
+
* @ignore
|
|
255
|
+
*/
|
|
256
|
+
this._version = 0;
|
|
257
|
+
|
|
214
258
|
this._allocatePrimitiveBuffer();
|
|
215
|
-
this._allocatePositionBuffer(
|
|
216
|
-
options.positionDatatype ?? ComponentDatatype.DOUBLE,
|
|
217
|
-
);
|
|
259
|
+
this._allocatePositionBuffer();
|
|
218
260
|
this._allocateMaterialBuffer();
|
|
219
261
|
}
|
|
220
262
|
|
|
@@ -267,14 +309,13 @@ class BufferPrimitiveCollection {
|
|
|
267
309
|
}
|
|
268
310
|
|
|
269
311
|
/**
|
|
270
|
-
* @param {ComponentDatatype} datatype
|
|
271
312
|
* @private
|
|
272
313
|
* @ignore
|
|
273
314
|
*/
|
|
274
|
-
_allocatePositionBuffer(
|
|
275
|
-
// @ts-expect-error
|
|
315
|
+
_allocatePositionBuffer() {
|
|
316
|
+
// @ts-expect-error https://github.com/CesiumGS/cesium/issues/13420
|
|
276
317
|
this._positionView = ComponentDatatype.createTypedArray(
|
|
277
|
-
|
|
318
|
+
this._positionDatatype,
|
|
278
319
|
this._positionCountMax * 3,
|
|
279
320
|
);
|
|
280
321
|
}
|
|
@@ -471,28 +512,32 @@ class BufferPrimitiveCollection {
|
|
|
471
512
|
* @ignore
|
|
472
513
|
*/
|
|
473
514
|
_updateBoundingVolume() {
|
|
474
|
-
const TypedArray = /** @type {TypedArrayConstructor} */ (
|
|
475
|
-
this._positionView.constructor
|
|
476
|
-
);
|
|
477
|
-
|
|
478
515
|
// Exclude unused space in the position buffer.
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
516
|
+
let vertices = this._positionView.subarray(0, this._positionCount * 3);
|
|
517
|
+
|
|
518
|
+
if (this._positionNormalized) {
|
|
519
|
+
vertices = AttributeCompression.dequantize(
|
|
520
|
+
/** @type {Int8Array|Uint8Array|Int16Array|Uint16Array|Int32Array|Uint32Array} */ (
|
|
521
|
+
vertices
|
|
522
|
+
),
|
|
523
|
+
this._positionDatatype,
|
|
524
|
+
AttributeType.VEC3,
|
|
525
|
+
this._positionCount,
|
|
526
|
+
);
|
|
527
|
+
}
|
|
484
528
|
|
|
485
529
|
BoundingSphere.fromVertices(
|
|
486
530
|
vertices,
|
|
487
531
|
Cartesian3.ZERO,
|
|
488
532
|
3,
|
|
489
|
-
this.
|
|
533
|
+
this._boundingVolume,
|
|
490
534
|
);
|
|
491
535
|
BoundingSphere.transform(
|
|
492
|
-
this.
|
|
493
|
-
this.
|
|
494
|
-
this.
|
|
536
|
+
this._boundingVolume,
|
|
537
|
+
this._modelMatrix,
|
|
538
|
+
this._boundingVolume,
|
|
495
539
|
);
|
|
540
|
+
|
|
496
541
|
this._dirtyBoundingVolume = false;
|
|
497
542
|
}
|
|
498
543
|
|
|
@@ -623,11 +668,26 @@ class BufferPrimitiveCollection {
|
|
|
623
668
|
}
|
|
624
669
|
|
|
625
670
|
/**
|
|
626
|
-
* Marks
|
|
671
|
+
* Marks all primitives 'clean', and updates version counter.
|
|
672
|
+
* @ignore
|
|
673
|
+
*/
|
|
674
|
+
_makeClean() {
|
|
675
|
+
if (this._dirtyCount > 0) {
|
|
676
|
+
this._dirtyCount = 0;
|
|
677
|
+
this._dirtyOffset = 0;
|
|
678
|
+
this._version++;
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
/**
|
|
683
|
+
* Marks collection bounding volume as 'dirty', to be updated on next render,
|
|
684
|
+
* if automatic bounding volume updates are enabled.
|
|
627
685
|
* @ignore
|
|
628
686
|
*/
|
|
629
687
|
_makeDirtyBoundingVolume() {
|
|
630
|
-
this.
|
|
688
|
+
if (this._boundingVolumeAutoUpdate) {
|
|
689
|
+
this._dirtyBoundingVolume = true;
|
|
690
|
+
}
|
|
631
691
|
}
|
|
632
692
|
|
|
633
693
|
/////////////////////////////////////////////////////////////////////////////
|
|
@@ -724,23 +784,36 @@ class BufferPrimitiveCollection {
|
|
|
724
784
|
}
|
|
725
785
|
|
|
726
786
|
/**
|
|
727
|
-
*
|
|
787
|
+
* World-space bounding volume for all primitives in the collection, including both
|
|
728
788
|
* shown and hidden primitives.
|
|
729
789
|
* @type {BoundingSphere}
|
|
730
790
|
* @readonly
|
|
731
791
|
*/
|
|
732
792
|
get boundingVolume() {
|
|
793
|
+
if (this._dirtyBoundingVolume) {
|
|
794
|
+
this._updateBoundingVolume();
|
|
795
|
+
}
|
|
733
796
|
return this._boundingVolume;
|
|
734
797
|
}
|
|
735
798
|
|
|
736
799
|
/**
|
|
737
|
-
*
|
|
738
|
-
*
|
|
739
|
-
* @
|
|
800
|
+
* The component datatype used to store position values.
|
|
801
|
+
* @type {ComponentDatatype}
|
|
802
|
+
* @readonly
|
|
803
|
+
*/
|
|
804
|
+
get positionDatatype() {
|
|
805
|
+
return this._positionDatatype;
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
/**
|
|
809
|
+
* When <code>true</code>, integer position values are treated as normalized
|
|
810
|
+
* values, where the full integer range maps to [-1, 1] (signed) or [0, 1]
|
|
811
|
+
* (unsigned).
|
|
812
|
+
* @type {boolean}
|
|
740
813
|
* @readonly
|
|
741
814
|
*/
|
|
742
|
-
get
|
|
743
|
-
return this.
|
|
815
|
+
get positionNormalized() {
|
|
816
|
+
return this._positionNormalized;
|
|
744
817
|
}
|
|
745
818
|
|
|
746
819
|
/////////////////////////////////////////////////////////////////////////////
|