@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
|
@@ -12,6 +12,7 @@ import IndexDatatype from "../Core/IndexDatatype.js";
|
|
|
12
12
|
import Matrix4 from "../Core/Matrix4.js";
|
|
13
13
|
import OffsetGeometryInstanceAttribute from "../Core/OffsetGeometryInstanceAttribute.js";
|
|
14
14
|
import WebMercatorProjection from "../Core/WebMercatorProjection.js";
|
|
15
|
+
import ColumbusWorlds from "./ColumbusWorlds.js";
|
|
15
16
|
|
|
16
17
|
function transformToWorldCoordinates(
|
|
17
18
|
instances,
|
|
@@ -84,11 +85,120 @@ function addBatchIds(instances) {
|
|
|
84
85
|
}
|
|
85
86
|
}
|
|
86
87
|
|
|
88
|
+
/**
|
|
89
|
+
* Keeps a polyline's projected 2D attributes on one contiguous world copy in
|
|
90
|
+
* Columbus repeat-worlds mode. PolylineGeometry subdivides along the arc and
|
|
91
|
+
* projects every vertex independently, so a line crossing the ±180° meridian
|
|
92
|
+
* ends up with consecutive vertices on opposite sides of the primary world,
|
|
93
|
+
* connected by an edge drawn across the whole map. Consecutive vertices whose
|
|
94
|
+
* projected u jumps by roughly a full world width are seam crossings: lift
|
|
95
|
+
* them onto the adjacent copy (the same rule PolylineCollection.getSegments
|
|
96
|
+
* applies). The per-vertex lift is computed from `position2D` and applied
|
|
97
|
+
* identically to `prevPosition2D` and `nextPosition2D` so each vertex's
|
|
98
|
+
* extrusion references stay on the copy the vertex itself was lifted to.
|
|
99
|
+
*
|
|
100
|
+
* Other primitive types (no prev/next position attributes) keep the stock
|
|
101
|
+
* per-side projection; their own IDL splitting still applies.
|
|
102
|
+
*
|
|
103
|
+
* @private
|
|
104
|
+
*/
|
|
105
|
+
function liftPolyline2DToWorldCopy(geometry, projection) {
|
|
106
|
+
const attributes = geometry.attributes;
|
|
107
|
+
const position2D = attributes.position2D;
|
|
108
|
+
const prevPosition2D = attributes.prevPosition2D;
|
|
109
|
+
const nextPosition2D = attributes.nextPosition2D;
|
|
110
|
+
if (
|
|
111
|
+
!defined(position2D) ||
|
|
112
|
+
!defined(prevPosition2D) ||
|
|
113
|
+
!defined(nextPosition2D)
|
|
114
|
+
) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const worldWidth = ColumbusWorlds.getWorldWidth(projection);
|
|
119
|
+
const halfWorldWidth = worldWidth * 0.5;
|
|
120
|
+
const positions = position2D.values;
|
|
121
|
+
const vertexCount = positions.length / 3;
|
|
122
|
+
const lifts = new Float64Array(vertexCount);
|
|
123
|
+
|
|
124
|
+
let lift = 0.0;
|
|
125
|
+
let lifted = false;
|
|
126
|
+
for (let i = 1; i < vertexCount; ++i) {
|
|
127
|
+
const du = positions[i * 3] - (positions[(i - 1) * 3] + lift);
|
|
128
|
+
if (du > halfWorldWidth) {
|
|
129
|
+
lift -= worldWidth;
|
|
130
|
+
lifted = true;
|
|
131
|
+
} else if (du < -halfWorldWidth) {
|
|
132
|
+
lift += worldWidth;
|
|
133
|
+
lifted = true;
|
|
134
|
+
}
|
|
135
|
+
lifts[i] = lift;
|
|
136
|
+
}
|
|
137
|
+
if (!lifted) {
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
const prevPositions = prevPosition2D.values;
|
|
142
|
+
const nextPositions = nextPosition2D.values;
|
|
143
|
+
for (let i = 0; i < vertexCount; ++i) {
|
|
144
|
+
const vertexLift = lifts[i];
|
|
145
|
+
if (vertexLift !== 0.0) {
|
|
146
|
+
positions[i * 3] += vertexLift;
|
|
147
|
+
prevPositions[i * 3] += vertexLift;
|
|
148
|
+
nextPositions[i * 3] += vertexLift;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Replays the world-copy shift that {@link GroundPolylineGeometry} baked into
|
|
155
|
+
* its 2D shadow-volume attributes onto the projected volume positions. The
|
|
156
|
+
* volume positions are projected here, after the geometry was built, so a
|
|
157
|
+
* ground polyline crossing the antimeridian would otherwise keep one half on
|
|
158
|
+
* the neighbouring world copy while its plane tests sit on the other, and the
|
|
159
|
+
* shifted half is discarded by the fragment shader.
|
|
160
|
+
*
|
|
161
|
+
* @private
|
|
162
|
+
*/
|
|
163
|
+
function liftGroundPolyline2DToWorldCopy(geometry, projection) {
|
|
164
|
+
const attributes = geometry.attributes;
|
|
165
|
+
const startHiLo2D = attributes.startHiLo2D;
|
|
166
|
+
const position2D = attributes.position2D;
|
|
167
|
+
if (!defined(startHiLo2D) || !defined(position2D)) {
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
const worldWidth = ColumbusWorlds.getWorldWidth(projection);
|
|
172
|
+
const halfWorldWidth = worldWidth * 0.5;
|
|
173
|
+
if (!(halfWorldWidth > 0.0)) {
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
const starts = startHiLo2D.values;
|
|
178
|
+
const positions = position2D.values;
|
|
179
|
+
const count = Math.min(starts.length / 4, positions.length / 3);
|
|
180
|
+
for (let i = 0; i < count; ++i) {
|
|
181
|
+
// startHiLo2D holds the segment start in the unwrapped projection space
|
|
182
|
+
// (GroundPolylineGeometry nudges and lifts the 2D attributes so a line
|
|
183
|
+
// crossing the antimeridian stays on one copy), while the volume position
|
|
184
|
+
// is projected from the ECEF position and therefore wraps. Snap the
|
|
185
|
+
// position onto the world copy of its own segment: the two can only
|
|
186
|
+
// differ by whole worlds.
|
|
187
|
+
const startU = starts[i * 4] + starts[i * 4 + 2];
|
|
188
|
+
const u = positions[i * 3];
|
|
189
|
+
const delta = startU - u;
|
|
190
|
+
if (delta > halfWorldWidth || delta < -halfWorldWidth) {
|
|
191
|
+
positions[i * 3] = u + Math.round(delta / worldWidth) * worldWidth;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
87
196
|
function geometryPipeline(parameters) {
|
|
88
197
|
const instances = parameters.instances;
|
|
89
198
|
const projection = parameters.projection;
|
|
90
199
|
const uintIndexSupport = parameters.elementIndexUintSupported;
|
|
91
200
|
const scene3DOnly = parameters.scene3DOnly;
|
|
201
|
+
const columbusRepeatWorlds = parameters.columbusRepeatWorlds === true;
|
|
92
202
|
const vertexCacheOptimize = parameters.vertexCacheOptimize;
|
|
93
203
|
const compressVertices = parameters.compressVertices;
|
|
94
204
|
const modelMatrix = parameters.modelMatrix;
|
|
@@ -170,41 +280,59 @@ function geometryPipeline(parameters) {
|
|
|
170
280
|
// Split positions for GPU RTE
|
|
171
281
|
const attributes = geometry.attributes;
|
|
172
282
|
if (!scene3DOnly) {
|
|
283
|
+
// Collect DOUBLE attribute names up front: projectTo2D renames the
|
|
284
|
+
// attributes it touches, so projecting while iterating them risks
|
|
285
|
+
// reprocessing the freshly added *3D attributes.
|
|
286
|
+
const doubleAttributeNames = [];
|
|
173
287
|
for (const name in attributes) {
|
|
174
288
|
if (
|
|
175
289
|
attributes.hasOwnProperty(name) &&
|
|
176
290
|
attributes[name].componentDatatype === ComponentDatatype.DOUBLE
|
|
177
291
|
) {
|
|
178
|
-
|
|
179
|
-
|
|
292
|
+
doubleAttributeNames.push(name);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
180
295
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
geometry.attributes.position2D.values,
|
|
192
|
-
);
|
|
193
|
-
}
|
|
296
|
+
for (let a = 0; a < doubleAttributeNames.length; ++a) {
|
|
297
|
+
const name = doubleAttributeNames[a];
|
|
298
|
+
GeometryPipeline.projectTo2D(
|
|
299
|
+
geometry,
|
|
300
|
+
name,
|
|
301
|
+
`${name}3D`,
|
|
302
|
+
`${name}2D`,
|
|
303
|
+
projection,
|
|
304
|
+
);
|
|
305
|
+
}
|
|
194
306
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
307
|
+
if (columbusRepeatWorlds) {
|
|
308
|
+
liftPolyline2DToWorldCopy(geometry, projection);
|
|
309
|
+
liftGroundPolyline2DToWorldCopy(geometry, projection);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
// Compute the Columbus-view bounding sphere before encodeAttribute
|
|
313
|
+
// renames position2D into position2DHigh/Low.
|
|
314
|
+
if (defined(geometry.boundingSphere) && defined(attributes.position2D)) {
|
|
315
|
+
geometry.boundingSphereCV = BoundingSphere.fromVertices(
|
|
316
|
+
attributes.position2D.values,
|
|
317
|
+
);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
for (let a = 0; a < doubleAttributeNames.length; ++a) {
|
|
321
|
+
const name3D = `${doubleAttributeNames[a]}3D`;
|
|
322
|
+
const name2D = `${doubleAttributeNames[a]}2D`;
|
|
323
|
+
|
|
324
|
+
GeometryPipeline.encodeAttribute(
|
|
325
|
+
geometry,
|
|
326
|
+
name3D,
|
|
327
|
+
`${name3D}High`,
|
|
328
|
+
`${name3D}Low`,
|
|
329
|
+
);
|
|
330
|
+
GeometryPipeline.encodeAttribute(
|
|
331
|
+
geometry,
|
|
332
|
+
name2D,
|
|
333
|
+
`${name2D}High`,
|
|
334
|
+
`${name2D}Low`,
|
|
335
|
+
);
|
|
208
336
|
}
|
|
209
337
|
} else {
|
|
210
338
|
for (const name in attributes) {
|
|
@@ -715,6 +843,7 @@ PrimitivePipeline.packCombineGeometryParameters = function (
|
|
|
715
843
|
isGeographic: parameters.projection instanceof GeographicProjection,
|
|
716
844
|
elementIndexUintSupported: parameters.elementIndexUintSupported,
|
|
717
845
|
scene3DOnly: parameters.scene3DOnly,
|
|
846
|
+
columbusRepeatWorlds: parameters.columbusRepeatWorlds === true,
|
|
718
847
|
vertexCacheOptimize: parameters.vertexCacheOptimize,
|
|
719
848
|
compressVertices: parameters.compressVertices,
|
|
720
849
|
modelMatrix: parameters.modelMatrix,
|
|
@@ -761,6 +890,7 @@ PrimitivePipeline.unpackCombineGeometryParameters = function (
|
|
|
761
890
|
projection: projection,
|
|
762
891
|
elementIndexUintSupported: packedParameters.elementIndexUintSupported,
|
|
763
892
|
scene3DOnly: packedParameters.scene3DOnly,
|
|
893
|
+
columbusRepeatWorlds: packedParameters.columbusRepeatWorlds === true,
|
|
764
894
|
vertexCacheOptimize: packedParameters.vertexCacheOptimize,
|
|
765
895
|
compressVertices: packedParameters.compressVertices,
|
|
766
896
|
modelMatrix: Matrix4.clone(packedParameters.modelMatrix),
|
|
@@ -1781,11 +1781,12 @@ function updateHeights(primitive, frameState) {
|
|
|
1781
1781
|
);
|
|
1782
1782
|
|
|
1783
1783
|
if (defined(position)) {
|
|
1784
|
-
//
|
|
1784
|
+
// `pick` wrote into the module-level `scratchPosition`, so `position`
|
|
1785
|
+
// aliases it — clone before caching or the next pick mutates every entry.
|
|
1785
1786
|
tile.setPositionCacheEntry(
|
|
1786
1787
|
data.positionCartographic,
|
|
1787
1788
|
primitive.maximumScreenSpaceError,
|
|
1788
|
-
position,
|
|
1789
|
+
Cartesian3.clone(position),
|
|
1789
1790
|
);
|
|
1790
1791
|
}
|
|
1791
1792
|
}
|
|
@@ -419,7 +419,7 @@ ResourceCache.getSpzLoader = function (options) {
|
|
|
419
419
|
|
|
420
420
|
const cacheKey = ResourceCacheKey.getSpzCacheKey({
|
|
421
421
|
gltf: gltf,
|
|
422
|
-
|
|
422
|
+
spz: spz,
|
|
423
423
|
gltfResource: gltfResource,
|
|
424
424
|
baseResource: baseResource,
|
|
425
425
|
});
|
|
@@ -453,13 +453,14 @@ ResourceCache.getSpzLoader = function (options) {
|
|
|
453
453
|
* @param {number} [options.bufferViewId] The bufferView ID corresponding to the vertex buffer.
|
|
454
454
|
* @param {object} [options.primitive] The primitive containing the Draco extension.
|
|
455
455
|
* @param {object} [options.draco] The Draco extension object.
|
|
456
|
+
* @param {object} [options.spz] The SPZ extension object.
|
|
456
457
|
* @param {string} [options.attributeSemantic] The attribute semantic, e.g. POSITION or NORMAL.
|
|
457
458
|
* @param {number} [options.accessorId] The accessor ID.
|
|
458
459
|
* @param {boolean} [options.asynchronous=true] Determines if WebGL resource creation will be spread out over several frames or block until all WebGL resources are created.
|
|
459
460
|
* @param {boolean} [options.dequantize=false] Determines whether or not the vertex buffer will be dequantized on the CPU.
|
|
460
461
|
* @param {boolean} [options.loadBuffer=false] Load vertex buffer as a GPU vertex buffer.
|
|
461
462
|
* @param {boolean} [options.loadTypedArray=false] Load vertex buffer as a typed array.
|
|
462
|
-
* @exception {DeveloperError}
|
|
463
|
+
* @exception {DeveloperError} Exactly one vertex buffer source must be effective: options.bufferViewId, options.spz, or options.draco for options.attributeSemantic.
|
|
463
464
|
* @exception {DeveloperError} When options.draco is defined options.attributeSemantic must also be defined.
|
|
464
465
|
* @exception {DeveloperError} When options.draco is defined options.accessorId must also be defined.
|
|
465
466
|
*
|
|
@@ -503,9 +504,11 @@ ResourceCache.getVertexBufferLoader = function (options) {
|
|
|
503
504
|
const hasAccessorId = defined(accessorId);
|
|
504
505
|
const hasSpz = defined(spz);
|
|
505
506
|
|
|
506
|
-
|
|
507
|
+
const sourceCount =
|
|
508
|
+
Number(hasBufferViewId) + Number(hasDraco) + Number(hasSpz);
|
|
509
|
+
if (sourceCount !== 1) {
|
|
507
510
|
throw new DeveloperError(
|
|
508
|
-
"
|
|
511
|
+
"Exactly one vertex buffer source must be effective: options.bufferViewId, options.spz, or options.draco for options.attributeSemantic.",
|
|
509
512
|
);
|
|
510
513
|
}
|
|
511
514
|
|
|
@@ -3,8 +3,8 @@ import Frozen from "../Core/Frozen.js";
|
|
|
3
3
|
import defined from "../Core/defined.js";
|
|
4
4
|
import DeveloperError from "../Core/DeveloperError.js";
|
|
5
5
|
import getAbsoluteUri from "../Core/getAbsoluteUri.js";
|
|
6
|
+
import findMeshoptExtension from "./findMeshoptExtension.js";
|
|
6
7
|
import GltfLoaderUtil from "./GltfLoaderUtil.js";
|
|
7
|
-
import hasExtension from "./hasExtension.js";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Compute cache keys for resources in {@link ResourceCache}.
|
|
@@ -22,8 +22,8 @@ function getExternalResourceCacheKey(resource) {
|
|
|
22
22
|
function getBufferViewCacheKey(bufferView) {
|
|
23
23
|
let { byteOffset, byteLength } = bufferView;
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
const meshopt = findMeshoptExtension(bufferView);
|
|
26
|
+
if (defined(meshopt)) {
|
|
27
27
|
byteOffset = meshopt.byteOffset ?? 0;
|
|
28
28
|
byteLength = meshopt.byteLength;
|
|
29
29
|
}
|
|
@@ -71,8 +71,8 @@ function getDracoCacheKey(gltf, draco, gltfResource, baseResource) {
|
|
|
71
71
|
return `${bufferCacheKey}-range-${bufferViewCacheKey}`;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
function getSpzCacheKey(gltf,
|
|
75
|
-
const bufferViewId =
|
|
74
|
+
function getSpzCacheKey(gltf, spz, gltfResource, baseResource) {
|
|
75
|
+
const bufferViewId = spz.bufferView;
|
|
76
76
|
const bufferView = gltf.bufferViews[bufferViewId];
|
|
77
77
|
const bufferId = bufferView.buffer;
|
|
78
78
|
const buffer = gltf.buffers[bufferId];
|
|
@@ -247,8 +247,8 @@ ResourceCacheKey.getBufferViewCacheKey = function (options) {
|
|
|
247
247
|
const bufferView = gltf.bufferViews[bufferViewId];
|
|
248
248
|
let bufferId = bufferView.buffer;
|
|
249
249
|
const buffer = gltf.buffers[bufferId];
|
|
250
|
-
|
|
251
|
-
|
|
250
|
+
const meshopt = findMeshoptExtension(bufferView);
|
|
251
|
+
if (defined(meshopt)) {
|
|
252
252
|
bufferId = meshopt.buffer;
|
|
253
253
|
}
|
|
254
254
|
|
|
@@ -292,16 +292,16 @@ ResourceCacheKey.getDracoCacheKey = function (options) {
|
|
|
292
292
|
|
|
293
293
|
ResourceCacheKey.getSpzCacheKey = function (options) {
|
|
294
294
|
options = options ?? Frozen.EMPTY_OBJECT;
|
|
295
|
-
const { gltf,
|
|
295
|
+
const { gltf, spz, gltfResource, baseResource } = options;
|
|
296
296
|
|
|
297
297
|
//>>includeStart('debug', pragmas.debug);
|
|
298
298
|
Check.typeOf.object("options.gltf", gltf);
|
|
299
|
-
Check.typeOf.object("options.
|
|
299
|
+
Check.typeOf.object("options.spz", spz);
|
|
300
300
|
Check.typeOf.object("options.gltfResource", gltfResource);
|
|
301
301
|
Check.typeOf.object("options.baseResource", baseResource);
|
|
302
302
|
//>>includeEnd('debug');
|
|
303
303
|
|
|
304
|
-
return `spz:${getSpzCacheKey(gltf,
|
|
304
|
+
return `spz:${getSpzCacheKey(gltf, spz, gltfResource, baseResource)}`;
|
|
305
305
|
};
|
|
306
306
|
/**
|
|
307
307
|
* Gets the vertex buffer cache key.
|
|
@@ -313,11 +313,12 @@ ResourceCacheKey.getSpzCacheKey = function (options) {
|
|
|
313
313
|
* @param {FrameState} options.frameState The frame state.
|
|
314
314
|
* @param {number} [options.bufferViewId] The bufferView ID corresponding to the vertex buffer.
|
|
315
315
|
* @param {object} [options.draco] The Draco extension object.
|
|
316
|
+
* @param {object} [options.spz] The SPZ extension object.
|
|
316
317
|
* @param {string} [options.attributeSemantic] The attribute semantic, e.g. POSITION or NORMAL.
|
|
317
318
|
* @param {boolean} [options.dequantize=false] Determines whether or not the vertex buffer will be dequantized on the CPU.
|
|
318
319
|
* @param {boolean} [options.loadBuffer=false] Load vertex buffer as a GPU vertex buffer.
|
|
319
320
|
* @param {boolean} [options.loadTypedArray=false] Load vertex buffer as a typed array.
|
|
320
|
-
* @exception {DeveloperError}
|
|
321
|
+
* @exception {DeveloperError} Exactly one vertex buffer source must be effective: options.bufferViewId, options.spz, or options.draco for options.attributeSemantic.
|
|
321
322
|
* @exception {DeveloperError} When options.draco is defined options.attributeSemantic must also be defined.
|
|
322
323
|
*
|
|
323
324
|
* @returns {string} The vertex buffer cache key.
|
|
@@ -350,9 +351,11 @@ ResourceCacheKey.getVertexBufferCacheKey = function (options) {
|
|
|
350
351
|
const hasAttributeSemantic = defined(attributeSemantic);
|
|
351
352
|
const hasSpz = defined(spz);
|
|
352
353
|
|
|
353
|
-
|
|
354
|
+
const sourceCount =
|
|
355
|
+
Number(hasBufferViewId) + Number(hasDraco) + Number(hasSpz);
|
|
356
|
+
if (sourceCount !== 1) {
|
|
354
357
|
throw new DeveloperError(
|
|
355
|
-
"
|
|
358
|
+
"Exactly one vertex buffer source must be effective: options.bufferViewId, options.spz, or options.draco for options.attributeSemantic.",
|
|
356
359
|
);
|
|
357
360
|
}
|
|
358
361
|
|
|
@@ -388,6 +391,11 @@ ResourceCacheKey.getVertexBufferCacheKey = function (options) {
|
|
|
388
391
|
cacheKeySuffix += "-typed-array";
|
|
389
392
|
}
|
|
390
393
|
|
|
394
|
+
if (defined(spz)) {
|
|
395
|
+
const spzCacheKey = getSpzCacheKey(gltf, spz, gltfResource, baseResource);
|
|
396
|
+
return `vertex-buffer:${spzCacheKey}-spz-${attributeSemantic}${cacheKeySuffix}`;
|
|
397
|
+
}
|
|
398
|
+
|
|
391
399
|
if (defined(draco)) {
|
|
392
400
|
const dracoCacheKey = getDracoCacheKey(
|
|
393
401
|
gltf,
|
|
@@ -398,11 +406,6 @@ ResourceCacheKey.getVertexBufferCacheKey = function (options) {
|
|
|
398
406
|
return `vertex-buffer:${dracoCacheKey}-draco-${attributeSemantic}${cacheKeySuffix}`;
|
|
399
407
|
}
|
|
400
408
|
|
|
401
|
-
if (spz) {
|
|
402
|
-
const spzCacheKey = getSpzCacheKey(gltf, spz, gltfResource, baseResource);
|
|
403
|
-
return `vertex-buffer:${spzCacheKey}-spz-${attributeSemantic}${cacheKeySuffix}`;
|
|
404
|
-
}
|
|
405
|
-
|
|
406
409
|
const bufferView = gltf.bufferViews[bufferViewId];
|
|
407
410
|
const bufferId = bufferView.buffer;
|
|
408
411
|
const buffer = gltf.buffers[bufferId];
|