@hztxi/cesium-engine 25.0.7 → 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-2NCNUVAT.js +56 -0
- package/Build/Workers/chunk-2ZYRUVVU.js +301 -0
- package/Build/Workers/chunk-36IU7N4V.js +1284 -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-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-77DBX23X.js +455 -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-7Y642MCO.js +352 -0
- package/Build/Workers/chunk-7ZFKBLUE.js +1054 -0
- package/Build/Workers/chunk-A7LGY5XS.js +140 -0
- package/Build/Workers/chunk-AN2NVYL6.js +1483 -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-CEMXKBQO.js +1800 -0
- package/Build/Workers/chunk-CKW3STKA.js +1067 -0
- package/Build/Workers/chunk-CV5RICKT.js +1992 -0
- package/Build/Workers/chunk-DBWSISJT.js +56 -0
- package/Build/Workers/chunk-DSBSPPPJ.js +1344 -0
- package/Build/Workers/chunk-DSGLDRTI.js +278 -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-ECN3VUMA.js +73 -0
- package/Build/Workers/chunk-ECSKVHUB.js +476 -0
- package/Build/Workers/chunk-EL4B5CSQ.js +162 -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-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-KSIEJYNL.js +3822 -0
- package/Build/Workers/chunk-KT3GG7AW.js +754 -0
- package/Build/Workers/chunk-KYCEM22I.js +1800 -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-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-NQZC37F7.js +38 -0
- package/Build/Workers/chunk-O3X3D2Z3.js +352 -0
- package/Build/Workers/chunk-OBUIHPKF.js +352 -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-QQZPPXY4.js +3822 -0
- package/Build/Workers/chunk-QXLQLGL2.js +1067 -0
- package/Build/Workers/chunk-RC4YC3VU.js +278 -0
- package/Build/Workers/chunk-RGNNWVR6.js +171 -0
- package/Build/Workers/chunk-SBBIEHYT.js +44 -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-TLSGD5TR.js +280 -0
- package/Build/Workers/chunk-TOXDLWKZ.js +368 -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-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-W5OCKMPJ.js +101 -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-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-Z7BONRW2.js +241 -0
- package/Build/Workers/chunk-ZK2R3DEJ.js +1054 -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 +26 -26
- 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/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/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/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 +85 -9
- package/Source/Scene/CameraEventAggregator.js +30 -18
- package/Source/Scene/CameraFlightPath.js +7 -4
- 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/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 +17 -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 +22 -1
- package/Source/Scene/GlobeDepth.js +27 -1
- package/Source/Scene/GlobeSurfaceShaderSet.js +637 -540
- package/Source/Scene/GlobeSurfaceTile.js +575 -398
- package/Source/Scene/GlobeSurfaceTileProvider.js +1412 -1184
- 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/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/PolylineCollection.js +5 -3
- package/Source/Scene/PostProcessStage.js +4 -2
- 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 +237 -11
- package/Source/Scene/SceneTransforms.js +6 -5
- 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/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.js +113 -83
- package/package.json +13 -13
|
@@ -22,6 +22,7 @@ import AttributeCompression from "../Core/AttributeCompression.js";
|
|
|
22
22
|
import IndexDatatype from "../Core/IndexDatatype.js";
|
|
23
23
|
import PolylineCommon from "../Shaders/PolylineCommon.js";
|
|
24
24
|
import BufferPolylineMaterial from "./BufferPolylineMaterial.js";
|
|
25
|
+
import BlendOption from "./BlendOption.js";
|
|
25
26
|
|
|
26
27
|
/** @import FrameState from "./FrameState.js"; */
|
|
27
28
|
/** @import BufferPolylineCollection from "./BufferPolylineCollection.js"; */
|
|
@@ -29,15 +30,16 @@ import BufferPolylineMaterial from "./BufferPolylineMaterial.js";
|
|
|
29
30
|
|
|
30
31
|
/**
|
|
31
32
|
* TODO(PR#13211): Need 'keyof' syntax to avoid duplicating attribute names.
|
|
32
|
-
* @typedef {'positionHigh' | 'positionLow' | 'prevPositionHigh' | 'prevPositionLow' | 'nextPositionHigh' | 'nextPositionLow' | 'pickColor' | 'showColorWidthAndTexCoord'} BufferPolylineAttribute
|
|
33
|
+
* @typedef {'positionHigh' | 'positionLow' | 'prevPositionHigh' | 'prevPositionLow' | 'nextPositionHigh' | 'nextPositionLow' | 'pickColor' | 'showColorWidthAndTexCoord' | 'alpha'} BufferPolylineAttribute
|
|
33
34
|
* @ignore
|
|
34
35
|
*/
|
|
35
36
|
|
|
36
37
|
/**
|
|
38
|
+
* Attribute locations when using 64-bit position precision.
|
|
37
39
|
* @type {Record<BufferPolylineAttribute, number>}
|
|
38
40
|
* @ignore
|
|
39
41
|
*/
|
|
40
|
-
const
|
|
42
|
+
const BufferPolylineAttributeLocationsFloat64 = {
|
|
41
43
|
positionHigh: 0,
|
|
42
44
|
positionLow: 1,
|
|
43
45
|
prevPositionHigh: 2,
|
|
@@ -46,12 +48,27 @@ const BufferPolylineAttributeLocations = {
|
|
|
46
48
|
nextPositionLow: 5,
|
|
47
49
|
pickColor: 6,
|
|
48
50
|
showColorWidthAndTexCoord: 7,
|
|
51
|
+
alpha: 8,
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Attribute locations when using <= 32-bit position precision.
|
|
56
|
+
* @type {Record<string, number>}
|
|
57
|
+
* @ignore
|
|
58
|
+
*/
|
|
59
|
+
const BufferPolylineAttributeLocations = {
|
|
60
|
+
position: 0,
|
|
61
|
+
prevPosition: 1,
|
|
62
|
+
nextPosition: 2,
|
|
63
|
+
pickColor: 3,
|
|
64
|
+
showColorWidthAndTexCoord: 4,
|
|
65
|
+
alpha: 5,
|
|
49
66
|
};
|
|
50
67
|
|
|
51
68
|
/**
|
|
52
69
|
* @typedef {object} BufferPolylineRenderContext
|
|
53
70
|
* @property {VertexArray} [vertexArray]
|
|
54
|
-
* @property {Record<
|
|
71
|
+
* @property {Record<string, TypedArray>} [attributeArrays]
|
|
55
72
|
* @property {TypedArray} [indexArray]
|
|
56
73
|
* @property {RenderState} [renderState]
|
|
57
74
|
* @property {ShaderProgram} [shaderProgram]
|
|
@@ -67,9 +84,9 @@ const pickColor = new Color();
|
|
|
67
84
|
const cartesian = new Cartesian3();
|
|
68
85
|
const prevCartesian = new Cartesian3();
|
|
69
86
|
const nextCartesian = new Cartesian3();
|
|
70
|
-
const
|
|
71
|
-
const
|
|
72
|
-
const
|
|
87
|
+
const encodedC = new EncodedCartesian3();
|
|
88
|
+
const encodedP = new EncodedCartesian3();
|
|
89
|
+
const encodedN = new EncodedCartesian3();
|
|
73
90
|
|
|
74
91
|
/**
|
|
75
92
|
* Renders line segments as quads, each composed of two triangles. Writes each
|
|
@@ -94,6 +111,10 @@ const nextCartesianEnc = new EncodedCartesian3();
|
|
|
94
111
|
function renderBufferPolylineCollection(collection, frameState, renderContext) {
|
|
95
112
|
const context = frameState.context;
|
|
96
113
|
renderContext = renderContext || { destroy: destroyRenderContext };
|
|
114
|
+
const useFloat64 = collection._positionDatatype === ComponentDatatype.DOUBLE;
|
|
115
|
+
const attributeLocations = useFloat64
|
|
116
|
+
? BufferPolylineAttributeLocationsFloat64
|
|
117
|
+
: BufferPolylineAttributeLocations;
|
|
97
118
|
|
|
98
119
|
if (
|
|
99
120
|
!defined(renderContext.attributeArrays) ||
|
|
@@ -112,31 +133,62 @@ function renderBufferPolylineCollection(collection, frameState, renderContext) {
|
|
|
112
133
|
);
|
|
113
134
|
|
|
114
135
|
renderContext.attributeArrays = {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
136
|
+
...(!useFloat64
|
|
137
|
+
? {
|
|
138
|
+
// @ts-expect-error https://github.com/CesiumGS/cesium/issues/13420
|
|
139
|
+
position: ComponentDatatype.createTypedArray(
|
|
140
|
+
collection._positionDatatype,
|
|
141
|
+
vertexCountMax * 3,
|
|
142
|
+
),
|
|
143
|
+
// @ts-expect-error https://github.com/CesiumGS/cesium/issues/13420
|
|
144
|
+
prevPosition: ComponentDatatype.createTypedArray(
|
|
145
|
+
collection._positionDatatype,
|
|
146
|
+
vertexCountMax * 3,
|
|
147
|
+
),
|
|
148
|
+
// @ts-expect-error https://github.com/CesiumGS/cesium/issues/13420
|
|
149
|
+
nextPosition: ComponentDatatype.createTypedArray(
|
|
150
|
+
collection._positionDatatype,
|
|
151
|
+
vertexCountMax * 3,
|
|
152
|
+
),
|
|
153
|
+
}
|
|
154
|
+
: {
|
|
155
|
+
positionHigh: new Float32Array(vertexCountMax * 3),
|
|
156
|
+
positionLow: new Float32Array(vertexCountMax * 3),
|
|
157
|
+
prevPositionHigh: new Float32Array(vertexCountMax * 3),
|
|
158
|
+
prevPositionLow: new Float32Array(vertexCountMax * 3),
|
|
159
|
+
nextPositionHigh: new Float32Array(vertexCountMax * 3),
|
|
160
|
+
nextPositionLow: new Float32Array(vertexCountMax * 3),
|
|
161
|
+
}),
|
|
121
162
|
pickColor: new Uint8Array(vertexCountMax * 4),
|
|
122
163
|
showColorWidthAndTexCoord: new Float32Array(vertexCountMax * 4),
|
|
164
|
+
alpha: new Uint8Array(vertexCountMax),
|
|
123
165
|
};
|
|
124
166
|
}
|
|
125
167
|
|
|
126
168
|
if (collection._dirtyCount > 0) {
|
|
127
169
|
const { _dirtyOffset, _dirtyCount } = collection;
|
|
128
|
-
const { attributeArrays } = renderContext;
|
|
129
170
|
|
|
130
171
|
const indexArray = renderContext.indexArray;
|
|
131
|
-
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
172
|
+
|
|
173
|
+
const {
|
|
174
|
+
// Common.
|
|
175
|
+
pickColor: pickColorArray,
|
|
176
|
+
showColorWidthAndTexCoord: showColorWidthAndTexCoordArray,
|
|
177
|
+
alpha: alphaArray,
|
|
178
|
+
|
|
179
|
+
// 8-32 bit.
|
|
180
|
+
position,
|
|
181
|
+
prevPosition,
|
|
182
|
+
nextPosition,
|
|
183
|
+
|
|
184
|
+
// 64 bit.
|
|
185
|
+
positionHigh,
|
|
186
|
+
positionLow,
|
|
187
|
+
prevPositionHigh,
|
|
188
|
+
prevPositionLow,
|
|
189
|
+
nextPositionHigh,
|
|
190
|
+
nextPositionLow,
|
|
191
|
+
} = renderContext.attributeArrays;
|
|
140
192
|
|
|
141
193
|
for (let i = _dirtyOffset, il = _dirtyOffset + _dirtyCount; i < il; i++) {
|
|
142
194
|
collection.get(i, polyline);
|
|
@@ -145,97 +197,119 @@ function renderBufferPolylineCollection(collection, frameState, renderContext) {
|
|
|
145
197
|
continue;
|
|
146
198
|
}
|
|
147
199
|
|
|
148
|
-
const cartesianArray = polyline.getPositions();
|
|
149
200
|
polyline.getMaterial(material);
|
|
150
201
|
const encodedColor = AttributeCompression.encodeRGB8(material.color);
|
|
202
|
+
const colorAlpha = material.color.alpha;
|
|
151
203
|
Color.fromRgba(polyline._pickId, pickColor);
|
|
152
204
|
const show = polyline.show;
|
|
153
205
|
|
|
154
206
|
let vOffset = polyline.vertexOffset * 2; // vertex offset
|
|
155
207
|
let iOffset = (polyline.vertexOffset - i) * 6; // index offset
|
|
156
208
|
|
|
209
|
+
const posView = collection._positionView;
|
|
210
|
+
const posStart = polyline.vertexOffset * 3;
|
|
211
|
+
|
|
157
212
|
for (let j = 0, jl = polyline.vertexCount; j < jl; j++) {
|
|
158
213
|
const isFirstSegment = j === 0;
|
|
159
214
|
const isLastSegment = j === jl - 1;
|
|
160
215
|
|
|
161
|
-
//
|
|
162
|
-
|
|
163
|
-
|
|
216
|
+
// c=current, p=previous, n=next
|
|
217
|
+
|
|
218
|
+
const cx = posView[posStart + j * 3];
|
|
219
|
+
const cy = posView[posStart + j * 3 + 1];
|
|
220
|
+
const cz = posView[posStart + j * 3 + 2];
|
|
221
|
+
|
|
222
|
+
let px, py, pz, nx, ny, nz;
|
|
223
|
+
|
|
164
224
|
if (isFirstSegment) {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
225
|
+
nx = posView[posStart + 1 * 3];
|
|
226
|
+
ny = posView[posStart + 1 * 3 + 1];
|
|
227
|
+
nz = posView[posStart + 1 * 3 + 2];
|
|
228
|
+
// Mirror current over next to get synthetic prev.
|
|
229
|
+
px = 2 * cx - nx;
|
|
230
|
+
py = 2 * cy - ny;
|
|
231
|
+
pz = 2 * cz - nz;
|
|
169
232
|
} else if (isLastSegment) {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
233
|
+
px = posView[posStart + (j - 1) * 3];
|
|
234
|
+
py = posView[posStart + (j - 1) * 3 + 1];
|
|
235
|
+
pz = posView[posStart + (j - 1) * 3 + 2];
|
|
236
|
+
// Mirror current over prev to get synthetic next.
|
|
237
|
+
nx = 2 * cx - px;
|
|
238
|
+
ny = 2 * cy - py;
|
|
239
|
+
nz = 2 * cz - pz;
|
|
174
240
|
} else {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
241
|
+
px = posView[posStart + (j - 1) * 3];
|
|
242
|
+
py = posView[posStart + (j - 1) * 3 + 1];
|
|
243
|
+
pz = posView[posStart + (j - 1) * 3 + 2];
|
|
244
|
+
nx = posView[posStart + (j + 1) * 3];
|
|
245
|
+
ny = posView[posStart + (j + 1) * 3 + 1];
|
|
246
|
+
nz = posView[posStart + (j + 1) * 3 + 2];
|
|
179
247
|
}
|
|
180
248
|
|
|
181
|
-
// For each segment, draw two triangles.
|
|
182
249
|
if (!isLastSegment) {
|
|
183
250
|
indexArray[iOffset] = vOffset;
|
|
184
251
|
indexArray[iOffset + 1] = vOffset + 1;
|
|
185
252
|
indexArray[iOffset + 2] = vOffset + 2;
|
|
186
|
-
|
|
187
253
|
indexArray[iOffset + 3] = vOffset + 2;
|
|
188
254
|
indexArray[iOffset + 4] = vOffset + 1;
|
|
189
255
|
indexArray[iOffset + 5] = vOffset + 3;
|
|
190
|
-
|
|
191
256
|
iOffset += 6;
|
|
192
257
|
}
|
|
193
258
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
259
|
+
if (useFloat64) {
|
|
260
|
+
Cartesian3.fromElements(cx, cy, cz, cartesian);
|
|
261
|
+
Cartesian3.fromElements(px, py, pz, prevCartesian);
|
|
262
|
+
Cartesian3.fromElements(nx, ny, nz, nextCartesian);
|
|
263
|
+
EncodedCartesian3.fromCartesian(cartesian, encodedC);
|
|
264
|
+
EncodedCartesian3.fromCartesian(prevCartesian, encodedP);
|
|
265
|
+
EncodedCartesian3.fromCartesian(nextCartesian, encodedN);
|
|
266
|
+
}
|
|
197
267
|
|
|
198
268
|
// TODO(donmccurdy): Diverging from PolylineCollection.js, which writes
|
|
199
269
|
// internal vertices to buffer 4x, not 2x. Not sure that's needed?
|
|
270
|
+
|
|
271
|
+
// Write each vertex twice for the quad.
|
|
200
272
|
for (let k = 0; k < 2; k++) {
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
273
|
+
if (!useFloat64) {
|
|
274
|
+
position[vOffset * 3] = cx;
|
|
275
|
+
position[vOffset * 3 + 1] = cy;
|
|
276
|
+
position[vOffset * 3 + 2] = cz;
|
|
277
|
+
|
|
278
|
+
prevPosition[vOffset * 3] = px;
|
|
279
|
+
prevPosition[vOffset * 3 + 1] = py;
|
|
280
|
+
prevPosition[vOffset * 3 + 2] = pz;
|
|
281
|
+
|
|
282
|
+
nextPosition[vOffset * 3] = nx;
|
|
283
|
+
nextPosition[vOffset * 3 + 1] = ny;
|
|
284
|
+
nextPosition[vOffset * 3 + 2] = nz;
|
|
285
|
+
} else {
|
|
286
|
+
// @ts-expect-error https://github.com/CesiumGS/cesium/pull/13302
|
|
287
|
+
Cartesian3.pack(encodedC.high, positionHigh, vOffset * 3);
|
|
288
|
+
// @ts-expect-error https://github.com/CesiumGS/cesium/pull/13302
|
|
289
|
+
Cartesian3.pack(encodedC.low, positionLow, vOffset * 3);
|
|
290
|
+
|
|
291
|
+
// @ts-expect-error https://github.com/CesiumGS/cesium/pull/13302
|
|
292
|
+
Cartesian3.pack(encodedP.high, prevPositionHigh, vOffset * 3);
|
|
293
|
+
// @ts-expect-error https://github.com/CesiumGS/cesium/pull/13302
|
|
294
|
+
Cartesian3.pack(encodedP.low, prevPositionLow, vOffset * 3);
|
|
295
|
+
|
|
296
|
+
// @ts-expect-error https://github.com/CesiumGS/cesium/pull/13302
|
|
297
|
+
Cartesian3.pack(encodedN.high, nextPositionHigh, vOffset * 3);
|
|
298
|
+
// @ts-expect-error https://github.com/CesiumGS/cesium/pull/13302
|
|
299
|
+
Cartesian3.pack(encodedN.low, nextPositionLow, vOffset * 3);
|
|
300
|
+
}
|
|
301
|
+
|
|
229
302
|
pickColorArray[vOffset * 4] = Color.floatToByte(pickColor.red);
|
|
230
303
|
pickColorArray[vOffset * 4 + 1] = Color.floatToByte(pickColor.green);
|
|
231
304
|
pickColorArray[vOffset * 4 + 2] = Color.floatToByte(pickColor.blue);
|
|
232
305
|
pickColorArray[vOffset * 4 + 3] = Color.floatToByte(pickColor.alpha);
|
|
233
306
|
|
|
234
|
-
// Properties.
|
|
235
307
|
showColorWidthAndTexCoordArray[vOffset * 4] = show ? 1 : 0;
|
|
236
308
|
showColorWidthAndTexCoordArray[vOffset * 4 + 1] = encodedColor;
|
|
237
309
|
showColorWidthAndTexCoordArray[vOffset * 4 + 2] = material.width;
|
|
238
|
-
showColorWidthAndTexCoordArray[vOffset * 4 + 3] = j / (jl - 1);
|
|
310
|
+
showColorWidthAndTexCoordArray[vOffset * 4 + 3] = j / (jl - 1);
|
|
311
|
+
|
|
312
|
+
alphaArray[vOffset] = colorAlpha * 255.0;
|
|
239
313
|
|
|
240
314
|
vOffset++;
|
|
241
315
|
}
|
|
@@ -260,84 +334,130 @@ function renderBufferPolylineCollection(collection, frameState, renderContext) {
|
|
|
260
334
|
}),
|
|
261
335
|
|
|
262
336
|
attributes: [
|
|
337
|
+
...(!useFloat64
|
|
338
|
+
? [
|
|
339
|
+
{
|
|
340
|
+
index: BufferPolylineAttributeLocations.position,
|
|
341
|
+
componentDatatype: collection._positionDatatype,
|
|
342
|
+
componentsPerAttribute: 3,
|
|
343
|
+
normalize: collection._positionNormalized,
|
|
344
|
+
vertexBuffer: Buffer.createVertexBuffer({
|
|
345
|
+
typedArray: attributeArrays.position,
|
|
346
|
+
context,
|
|
347
|
+
usage: BufferUsage.STATIC_DRAW,
|
|
348
|
+
}),
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
index: BufferPolylineAttributeLocations.prevPosition,
|
|
352
|
+
componentDatatype: collection._positionDatatype,
|
|
353
|
+
componentsPerAttribute: 3,
|
|
354
|
+
normalize: collection._positionNormalized,
|
|
355
|
+
vertexBuffer: Buffer.createVertexBuffer({
|
|
356
|
+
typedArray: attributeArrays.prevPosition,
|
|
357
|
+
context,
|
|
358
|
+
usage: BufferUsage.STATIC_DRAW,
|
|
359
|
+
}),
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
index: BufferPolylineAttributeLocations.nextPosition,
|
|
363
|
+
componentDatatype: collection._positionDatatype,
|
|
364
|
+
componentsPerAttribute: 3,
|
|
365
|
+
normalize: collection._positionNormalized,
|
|
366
|
+
vertexBuffer: Buffer.createVertexBuffer({
|
|
367
|
+
typedArray: attributeArrays.nextPosition,
|
|
368
|
+
context,
|
|
369
|
+
usage: BufferUsage.STATIC_DRAW,
|
|
370
|
+
}),
|
|
371
|
+
},
|
|
372
|
+
]
|
|
373
|
+
: [
|
|
374
|
+
{
|
|
375
|
+
index: BufferPolylineAttributeLocationsFloat64.positionHigh,
|
|
376
|
+
componentDatatype: ComponentDatatype.FLOAT,
|
|
377
|
+
componentsPerAttribute: 3,
|
|
378
|
+
vertexBuffer: Buffer.createVertexBuffer({
|
|
379
|
+
typedArray: attributeArrays.positionHigh,
|
|
380
|
+
context,
|
|
381
|
+
usage: BufferUsage.STATIC_DRAW,
|
|
382
|
+
}),
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
index: BufferPolylineAttributeLocationsFloat64.positionLow,
|
|
386
|
+
componentDatatype: ComponentDatatype.FLOAT,
|
|
387
|
+
componentsPerAttribute: 3,
|
|
388
|
+
vertexBuffer: Buffer.createVertexBuffer({
|
|
389
|
+
typedArray: attributeArrays.positionLow,
|
|
390
|
+
context,
|
|
391
|
+
usage: BufferUsage.STATIC_DRAW,
|
|
392
|
+
}),
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
index: BufferPolylineAttributeLocationsFloat64.prevPositionHigh,
|
|
396
|
+
componentDatatype: ComponentDatatype.FLOAT,
|
|
397
|
+
componentsPerAttribute: 3,
|
|
398
|
+
vertexBuffer: Buffer.createVertexBuffer({
|
|
399
|
+
typedArray: attributeArrays.prevPositionHigh,
|
|
400
|
+
context,
|
|
401
|
+
usage: BufferUsage.STATIC_DRAW,
|
|
402
|
+
}),
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
index: BufferPolylineAttributeLocationsFloat64.prevPositionLow,
|
|
406
|
+
componentDatatype: ComponentDatatype.FLOAT,
|
|
407
|
+
componentsPerAttribute: 3,
|
|
408
|
+
vertexBuffer: Buffer.createVertexBuffer({
|
|
409
|
+
typedArray: attributeArrays.prevPositionLow,
|
|
410
|
+
context,
|
|
411
|
+
usage: BufferUsage.STATIC_DRAW,
|
|
412
|
+
}),
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
index: BufferPolylineAttributeLocationsFloat64.nextPositionHigh,
|
|
416
|
+
componentDatatype: ComponentDatatype.FLOAT,
|
|
417
|
+
componentsPerAttribute: 3,
|
|
418
|
+
vertexBuffer: Buffer.createVertexBuffer({
|
|
419
|
+
typedArray: attributeArrays.nextPositionHigh,
|
|
420
|
+
context,
|
|
421
|
+
usage: BufferUsage.STATIC_DRAW,
|
|
422
|
+
}),
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
index: BufferPolylineAttributeLocationsFloat64.nextPositionLow,
|
|
426
|
+
componentDatatype: ComponentDatatype.FLOAT,
|
|
427
|
+
componentsPerAttribute: 3,
|
|
428
|
+
vertexBuffer: Buffer.createVertexBuffer({
|
|
429
|
+
typedArray: attributeArrays.nextPositionLow,
|
|
430
|
+
context,
|
|
431
|
+
usage: BufferUsage.STATIC_DRAW,
|
|
432
|
+
}),
|
|
433
|
+
},
|
|
434
|
+
]),
|
|
263
435
|
{
|
|
264
|
-
index:
|
|
265
|
-
componentDatatype: ComponentDatatype.
|
|
266
|
-
componentsPerAttribute:
|
|
267
|
-
vertexBuffer: Buffer.createVertexBuffer({
|
|
268
|
-
typedArray: attributeArrays.positionHigh,
|
|
269
|
-
context,
|
|
270
|
-
usage: BufferUsage.STATIC_DRAW,
|
|
271
|
-
}),
|
|
272
|
-
},
|
|
273
|
-
{
|
|
274
|
-
index: BufferPolylineAttributeLocations.positionLow,
|
|
275
|
-
componentDatatype: ComponentDatatype.FLOAT,
|
|
276
|
-
componentsPerAttribute: 3,
|
|
277
|
-
vertexBuffer: Buffer.createVertexBuffer({
|
|
278
|
-
typedArray: attributeArrays.positionLow,
|
|
279
|
-
context,
|
|
280
|
-
usage: BufferUsage.STATIC_DRAW,
|
|
281
|
-
}),
|
|
282
|
-
},
|
|
283
|
-
|
|
284
|
-
{
|
|
285
|
-
index: BufferPolylineAttributeLocations.prevPositionHigh,
|
|
286
|
-
componentDatatype: ComponentDatatype.FLOAT,
|
|
287
|
-
componentsPerAttribute: 3,
|
|
288
|
-
vertexBuffer: Buffer.createVertexBuffer({
|
|
289
|
-
typedArray: attributeArrays.prevPositionHigh,
|
|
290
|
-
context,
|
|
291
|
-
usage: BufferUsage.STATIC_DRAW,
|
|
292
|
-
}),
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
index: BufferPolylineAttributeLocations.prevPositionLow,
|
|
296
|
-
componentDatatype: ComponentDatatype.FLOAT,
|
|
297
|
-
componentsPerAttribute: 3,
|
|
298
|
-
vertexBuffer: Buffer.createVertexBuffer({
|
|
299
|
-
typedArray: attributeArrays.prevPositionLow,
|
|
300
|
-
context,
|
|
301
|
-
usage: BufferUsage.STATIC_DRAW,
|
|
302
|
-
}),
|
|
303
|
-
},
|
|
304
|
-
|
|
305
|
-
{
|
|
306
|
-
index: BufferPolylineAttributeLocations.nextPositionHigh,
|
|
307
|
-
componentDatatype: ComponentDatatype.FLOAT,
|
|
308
|
-
componentsPerAttribute: 3,
|
|
436
|
+
index: attributeLocations.pickColor,
|
|
437
|
+
componentDatatype: ComponentDatatype.UNSIGNED_BYTE,
|
|
438
|
+
componentsPerAttribute: 4,
|
|
309
439
|
vertexBuffer: Buffer.createVertexBuffer({
|
|
310
|
-
typedArray: attributeArrays.
|
|
440
|
+
typedArray: attributeArrays.pickColor,
|
|
311
441
|
context,
|
|
312
442
|
usage: BufferUsage.STATIC_DRAW,
|
|
313
443
|
}),
|
|
314
444
|
},
|
|
315
445
|
{
|
|
316
|
-
index:
|
|
446
|
+
index: attributeLocations.showColorWidthAndTexCoord,
|
|
317
447
|
componentDatatype: ComponentDatatype.FLOAT,
|
|
318
|
-
componentsPerAttribute: 3,
|
|
319
|
-
vertexBuffer: Buffer.createVertexBuffer({
|
|
320
|
-
typedArray: attributeArrays.nextPositionLow,
|
|
321
|
-
context,
|
|
322
|
-
usage: BufferUsage.STATIC_DRAW,
|
|
323
|
-
}),
|
|
324
|
-
},
|
|
325
|
-
{
|
|
326
|
-
index: BufferPolylineAttributeLocations.pickColor,
|
|
327
|
-
componentDatatype: ComponentDatatype.UNSIGNED_BYTE,
|
|
328
448
|
componentsPerAttribute: 4,
|
|
329
449
|
vertexBuffer: Buffer.createVertexBuffer({
|
|
330
|
-
typedArray: attributeArrays.
|
|
450
|
+
typedArray: attributeArrays.showColorWidthAndTexCoord,
|
|
331
451
|
context,
|
|
332
452
|
usage: BufferUsage.STATIC_DRAW,
|
|
333
453
|
}),
|
|
334
454
|
},
|
|
335
455
|
{
|
|
336
|
-
index:
|
|
337
|
-
componentDatatype: ComponentDatatype.
|
|
338
|
-
componentsPerAttribute:
|
|
456
|
+
index: attributeLocations.alpha,
|
|
457
|
+
componentDatatype: ComponentDatatype.UNSIGNED_BYTE,
|
|
458
|
+
componentsPerAttribute: 1,
|
|
339
459
|
vertexBuffer: Buffer.createVertexBuffer({
|
|
340
|
-
typedArray: attributeArrays.
|
|
460
|
+
typedArray: attributeArrays.alpha,
|
|
341
461
|
context,
|
|
342
462
|
usage: BufferUsage.STATIC_DRAW,
|
|
343
463
|
}),
|
|
@@ -354,11 +474,11 @@ function renderBufferPolylineCollection(collection, frameState, renderContext) {
|
|
|
354
474
|
indexCount,
|
|
355
475
|
);
|
|
356
476
|
|
|
357
|
-
for (const key in
|
|
358
|
-
if (Object.hasOwn(
|
|
477
|
+
for (const key in attributeLocations) {
|
|
478
|
+
if (Object.hasOwn(attributeLocations, key)) {
|
|
359
479
|
const attribute = /** @type {BufferPolylineAttribute} */ (key);
|
|
360
480
|
renderContext.vertexArray.copyAttributeFromRange(
|
|
361
|
-
|
|
481
|
+
attributeLocations[attribute],
|
|
362
482
|
renderContext.attributeArrays[attribute],
|
|
363
483
|
vertexOffset,
|
|
364
484
|
vertexCount,
|
|
@@ -369,7 +489,10 @@ function renderBufferPolylineCollection(collection, frameState, renderContext) {
|
|
|
369
489
|
|
|
370
490
|
if (!defined(renderContext.renderState)) {
|
|
371
491
|
renderContext.renderState = RenderState.fromCache({
|
|
372
|
-
blending:
|
|
492
|
+
blending:
|
|
493
|
+
collection._blendOption === BlendOption.OPAQUE
|
|
494
|
+
? BlendingState.DISABLED
|
|
495
|
+
: BlendingState.ALPHA_BLEND,
|
|
373
496
|
depthTest: { enabled: true },
|
|
374
497
|
});
|
|
375
498
|
}
|
|
@@ -379,11 +502,12 @@ function renderBufferPolylineCollection(collection, frameState, renderContext) {
|
|
|
379
502
|
context,
|
|
380
503
|
vertexShaderSource: new ShaderSource({
|
|
381
504
|
sources: [PolylineCommon, BufferPolylineMaterialVS],
|
|
505
|
+
defines: useFloat64 ? ["USE_FLOAT64"] : [],
|
|
382
506
|
}),
|
|
383
507
|
fragmentShaderSource: new ShaderSource({
|
|
384
508
|
sources: [BufferPolylineMaterialFS],
|
|
385
509
|
}),
|
|
386
|
-
attributeLocations
|
|
510
|
+
attributeLocations,
|
|
387
511
|
});
|
|
388
512
|
}
|
|
389
513
|
|
|
@@ -395,12 +519,15 @@ function renderBufferPolylineCollection(collection, frameState, renderContext) {
|
|
|
395
519
|
renderState: renderContext.renderState,
|
|
396
520
|
shaderProgram: renderContext.shaderProgram,
|
|
397
521
|
primitiveType: PrimitiveType.TRIANGLES,
|
|
398
|
-
pass:
|
|
522
|
+
pass:
|
|
523
|
+
collection._blendOption === BlendOption.OPAQUE
|
|
524
|
+
? Pass.OPAQUE
|
|
525
|
+
: Pass.TRANSLUCENT,
|
|
399
526
|
pickId: collection._allowPicking ? "v_pickColor" : undefined,
|
|
400
527
|
owner: collection,
|
|
401
528
|
count: drawCount,
|
|
402
529
|
modelMatrix: collection.modelMatrix, // shared reference
|
|
403
|
-
boundingVolume: collection.
|
|
530
|
+
boundingVolume: collection.boundingVolume, // shared reference
|
|
404
531
|
debugShowBoundingVolume: collection.debugShowBoundingVolume,
|
|
405
532
|
});
|
|
406
533
|
}
|
|
@@ -417,8 +544,7 @@ function renderBufferPolylineCollection(collection, frameState, renderContext) {
|
|
|
417
544
|
|
|
418
545
|
frameState.commandList.push(command);
|
|
419
546
|
|
|
420
|
-
collection.
|
|
421
|
-
collection._dirtyOffset = 0;
|
|
547
|
+
collection._makeClean();
|
|
422
548
|
|
|
423
549
|
return renderContext;
|
|
424
550
|
}
|
|
@@ -292,33 +292,31 @@ void main()
|
|
|
292
292
|
v_compressed.y = enableDepthCheck;
|
|
293
293
|
|
|
294
294
|
#ifdef VS_THREE_POINT_DEPTH_CHECK
|
|
295
|
+
const float anchorTerrainDepthDistance = 100000.0;
|
|
295
296
|
if (lengthSq < (u_threePointDepthTestDistance * u_threePointDepthTestDistance) && (enableDepthCheck == 1.0)) {
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
//
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
depthOrigin.y = origin.y;
|
|
303
|
-
|
|
304
|
-
vec4 pEC1 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0), depthOrigin, vec2(0.0), pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);
|
|
305
|
-
float globeDepth1 = getGlobeDepth(pEC1);
|
|
306
|
-
|
|
307
|
-
if (globeDepth1 != 0.0 && pEC1.z + depthsilon < globeDepth1)
|
|
297
|
+
// Resolve an entire label from its anchor. Sampling the corners of each
|
|
298
|
+
// glyph makes labels near the horizon flip between visible and occluded as
|
|
299
|
+
// individual samples cross the globe-depth boundary between frames.
|
|
300
|
+
float depthsilon = 1000.0;
|
|
301
|
+
bool occluded;
|
|
302
|
+
if (lengthSq > anchorTerrainDepthDistance * anchorTerrainDepthDistance)
|
|
308
303
|
{
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
304
|
+
// The depth texture is updated by tiled globe geometry and can make
|
|
305
|
+
// labels near the horizon flip between frames at long range. Use the
|
|
306
|
+
// deterministic ellipsoid horizon there, while retaining terrain-depth
|
|
307
|
+
// occlusion for closer labels.
|
|
308
|
+
occluded = !czm_isEmpty(intersection) &&
|
|
309
|
+
positionEC.z + depthsilon < -intersection.start;
|
|
310
|
+
}
|
|
311
|
+
else
|
|
312
|
+
{
|
|
313
|
+
float globeDepth = getGlobeDepth(positionEC);
|
|
314
|
+
occluded = globeDepth != 0.0 &&
|
|
315
|
+
positionEC.z + depthsilon < globeDepth;
|
|
316
|
+
}
|
|
317
|
+
if (occluded)
|
|
318
|
+
{
|
|
319
|
+
positionEC.xyz = vec3(0.0);
|
|
322
320
|
}
|
|
323
321
|
}
|
|
324
322
|
#endif
|