@cesium/engine 23.0.1 → 25.0.0
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-ZEMJQKHD.js → chunk-35H3UBIO.js} +13 -12
- package/Build/Workers/{chunk-PQTSXJBJ.js → chunk-3LSD7OOA.js} +16 -16
- package/Build/Workers/{chunk-PUO7BYDY.js → chunk-3RFFPH4M.js} +1 -1
- package/Build/Workers/{chunk-PBECJOWF.js → chunk-3TKLDHV3.js} +2 -2
- package/Build/Workers/{chunk-TMCTZ5E3.js → chunk-3VDDRF2E.js} +14 -14
- package/Build/Workers/{chunk-FKU77FNM.js → chunk-3XY3MVPG.js} +4 -4
- package/Build/Workers/{chunk-2OBWHTIC.js → chunk-4GF4MVPY.js} +7 -7
- package/Build/Workers/{chunk-JUKGMJX7.js → chunk-4MTRQFJP.js} +3 -2
- package/Build/Workers/{chunk-66OWUDO7.js → chunk-4QQXGTCE.js} +8 -8
- package/Build/Workers/{chunk-ALTCIHRH.js → chunk-4XXHJI6Y.js} +17 -17
- package/Build/Workers/{chunk-K7UTK4OM.js → chunk-5T6QQAJW.js} +3 -2
- package/Build/Workers/{chunk-IJ3SUMK3.js → chunk-6SDGQI27.js} +3 -2
- package/Build/Workers/{chunk-FXSRA5UG.js → chunk-77RL3MBD.js} +6 -5
- package/Build/Workers/{chunk-G6MJ3ZW3.js → chunk-7LSFAEWF.js} +12 -11
- package/Build/Workers/{chunk-C6HHBKT5.js → chunk-A7A433MD.js} +5 -5
- package/Build/Workers/{chunk-PGZ3B6CB.js → chunk-A7ZBMVFS.js} +14 -14
- package/Build/Workers/{chunk-OZYB3AOR.js → chunk-ACFFCHHZ.js} +11 -11
- package/Build/Workers/{chunk-DNMASBMH.js → chunk-AEAVLYPS.js} +2 -2
- package/Build/Workers/{chunk-VPWYHFQA.js → chunk-AWFZHD2B.js} +4 -4
- package/Build/Workers/{chunk-TFPG3ZKW.js → chunk-BTX2NL3P.js} +59 -46
- package/Build/Workers/{chunk-TNXOPEIG.js → chunk-BVAIWR7O.js} +12 -12
- package/Build/Workers/chunk-CKQP3DSS.js +973 -0
- package/Build/Workers/{chunk-N6HRZLS6.js → chunk-CZ23Y3RM.js} +2 -2
- package/Build/Workers/{chunk-EIC3VAOZ.js → chunk-DFEI5MAV.js} +7 -7
- package/Build/Workers/{chunk-BTP3634E.js → chunk-DH26SNAB.js} +4 -1
- package/Build/Workers/{chunk-TXYQNXNW.js → chunk-DYT5NR6P.js} +3 -3
- package/Build/Workers/{chunk-O67UP5YO.js → chunk-EZARA5FJ.js} +13 -13
- package/Build/Workers/{chunk-YSJRB2UZ.js → chunk-FIBS5S7R.js} +2 -2
- package/Build/Workers/{chunk-2M7DKGLW.js → chunk-FVLVVOBQ.js} +10 -10
- package/Build/Workers/{chunk-B2VA6IEL.js → chunk-GL7DNVUS.js} +5 -5
- package/Build/Workers/{chunk-77DJBHMI.js → chunk-GPIGURCG.js} +59 -32
- package/Build/Workers/{chunk-QPXGGVHC.js → chunk-H2A4USJR.js} +10 -10
- package/Build/Workers/chunk-HSVQATK2.js +147 -0
- package/Build/Workers/{chunk-HXEPZWJN.js → chunk-HVMG6AG4.js} +11 -10
- package/Build/Workers/{chunk-H3TVRJLY.js → chunk-I3A6DXYZ.js} +4 -4
- package/Build/Workers/{chunk-UEWYSOFD.js → chunk-ITD2IN7N.js} +2 -2
- package/Build/Workers/{chunk-CYOPNGPX.js → chunk-J3OFS2RD.js} +12 -12
- package/Build/Workers/{chunk-RZX6LOG6.js → chunk-J647NNZW.js} +6 -6
- package/Build/Workers/{chunk-GLCPE2BJ.js → chunk-J7KQEKPK.js} +13 -13
- package/Build/Workers/{chunk-XPMXRJDD.js → chunk-K6NFIRFB.js} +5 -5
- package/Build/Workers/{chunk-CID5SY7L.js → chunk-LH5SF3XV.js} +7 -6
- package/Build/Workers/{chunk-UOQB7XQI.js → chunk-ND3NTTOF.js} +713 -435
- package/Build/Workers/chunk-QO2CGXMP.js +2342 -0
- package/Build/Workers/chunk-QSDY4NS7.js +1287 -0
- package/Build/Workers/chunk-QXNQQYPV.js +3201 -0
- package/Build/Workers/{chunk-CJ7ZDY77.js → chunk-ST2UWDUU.js} +5 -5
- package/Build/Workers/{chunk-YDR5LX5Z.js → chunk-TA777BGS.js} +3 -2
- package/Build/Workers/{chunk-U4SWB6TI.js → chunk-TAI4HLII.js} +4 -4
- package/Build/Workers/{chunk-VX774SWE.js → chunk-URUCCIPS.js} +6 -6
- package/Build/Workers/{chunk-MNSNOONX.js → chunk-VQKLRBIK.js} +7 -7
- package/Build/Workers/{chunk-CVAAIRNP.js → chunk-WC57YYBN.js} +2 -2
- package/Build/Workers/{chunk-QNABVTTP.js → chunk-WN6P5UDH.js} +12 -12
- package/Build/Workers/{chunk-CNLXMOPM.js → chunk-WNN5D4W3.js} +12 -11
- package/Build/Workers/{chunk-4JJQRZYL.js → chunk-WTQGE7Q6.js} +17 -17
- package/Build/Workers/{chunk-FCJQO4NC.js → chunk-WUBKZFF6.js} +2213 -1349
- package/Build/Workers/{chunk-3UQ2YMPP.js → chunk-ZAPOS52G.js} +12 -10
- package/Build/Workers/{chunk-LHFC4R7Z.js → chunk-ZCCIIBZT.js} +6 -6
- package/Build/Workers/combineGeometry.js +24 -24
- package/Build/Workers/createBoxGeometry.js +18 -18
- package/Build/Workers/createBoxOutlineGeometry.js +16 -16
- package/Build/Workers/createCircleGeometry.js +26 -26
- package/Build/Workers/createCircleOutlineGeometry.js +19 -19
- package/Build/Workers/createCoplanarPolygonGeometry.js +33 -33
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +31 -31
- package/Build/Workers/createCorridorGeometry.js +29 -29
- package/Build/Workers/createCorridorOutlineGeometry.js +28 -28
- package/Build/Workers/createCylinderGeometry.js +20 -20
- package/Build/Workers/createCylinderOutlineGeometry.js +18 -18
- 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 +18 -18
- package/Build/Workers/createGeometry.js +24 -24
- package/Build/Workers/createGroundPolylineGeometry.js +175 -118
- package/Build/Workers/createPlaneGeometry.js +16 -16
- package/Build/Workers/createPlaneOutlineGeometry.js +15 -15
- package/Build/Workers/createPolygonGeometry.js +32 -32
- package/Build/Workers/createPolygonOutlineGeometry.js +30 -30
- package/Build/Workers/createPolylineGeometry.js +25 -25
- package/Build/Workers/createPolylineVolumeGeometry.js +31 -31
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +27 -27
- package/Build/Workers/createRectangleGeometry.js +27 -27
- package/Build/Workers/createRectangleOutlineGeometry.js +20 -20
- package/Build/Workers/createSimplePolylineGeometry.js +23 -23
- 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 +25 -25
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +22 -22
- package/Build/Workers/createVerticesFromHeightmap.js +24 -23
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +20 -20
- package/Build/Workers/createWallGeometry.js +25 -25
- package/Build/Workers/createWallOutlineGeometry.js +24 -24
- package/Build/Workers/decodeDraco.js +10 -10
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
- package/Build/Workers/decodeI3S.js +12 -12
- 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 +12 -9
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +22 -22
- package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +25 -25
- package/Source/Core/ArcType.js +6 -1
- package/Source/Core/ArticulationStageType.js +5 -1
- package/Source/Core/AssociativeArray.js +100 -94
- package/Source/Core/BoundingSphere.js +1296 -1300
- package/Source/Core/Cartesian2.js +7 -5
- package/Source/Core/Cartesian3.js +9 -8
- package/Source/Core/Cartesian4.js +8 -6
- package/Source/Core/Cartographic.js +257 -249
- package/Source/Core/ClockRange.js +6 -1
- package/Source/Core/ClockStep.js +6 -1
- package/Source/Core/Color.js +846 -835
- package/Source/Core/ComponentDatatype.js +4 -1
- package/Source/Core/CornerType.js +6 -1
- package/Source/Core/Credit.js +121 -124
- package/Source/Core/DeveloperError.js +2 -1
- package/Source/Core/Ellipsoid.js +637 -660
- package/Source/Core/ExtrapolationType.js +6 -1
- package/Source/Core/GeocodeType.js +6 -1
- package/Source/Core/GeographicProjection.js +74 -74
- package/Source/Core/GeographicTilingScheme.js +179 -198
- package/Source/Core/GeometryOffsetAttribute.js +7 -1
- package/Source/Core/GeometryType.js +7 -1
- package/Source/Core/HeightmapEncoding.js +6 -1
- package/Source/Core/ITwinPlatform.js +1 -0
- package/Source/Core/Iau2006XysData.js +24 -13
- package/Source/Core/IndexDatatype.js +3 -1
- package/Source/Core/InterpolationType.js +5 -1
- package/Source/Core/Intersect.js +6 -1
- package/Source/Core/Ion.js +1 -1
- package/Source/Core/IonGeocodeProviderType.js +5 -1
- package/Source/Core/JulianDate.js +850 -848
- package/Source/Core/KeyboardEventModifier.js +6 -1
- package/Source/Core/MapProjection.js +39 -44
- package/Source/Core/Matrix2.js +906 -893
- package/Source/Core/Matrix3.js +1643 -1575
- package/Source/Core/Matrix4.js +2903 -2872
- package/Source/Core/PixelFormat.js +3 -1
- package/Source/Core/PrimitiveType.js +11 -1
- package/Source/Core/Ray.js +62 -60
- package/Source/Core/Rectangle.js +913 -904
- package/Source/Core/ReferenceFrame.js +6 -1
- package/Source/Core/RequestScheduler.js +8 -3
- package/Source/Core/RequestState.js +6 -1
- package/Source/Core/RequestType.js +6 -1
- package/Source/Core/S2Cell.js +2 -2
- package/Source/Core/ScreenSpaceEventType.js +6 -1
- package/Source/Core/TerrainMesh.js +10 -1
- package/Source/Core/TerrainPicker.js +1 -0
- package/Source/Core/TerrainQuantization.js +6 -1
- package/Source/Core/TilingScheme.js +100 -98
- package/Source/Core/TimeConstants.js +6 -1
- package/Source/Core/TimeStandard.js +6 -1
- package/Source/Core/TrackingReferenceFrame.js +6 -1
- package/Source/Core/Visibility.js +6 -1
- package/Source/Core/VulkanConstants.js +6 -1
- package/Source/Core/WallGeometry.js +1 -1
- package/Source/Core/WallOutlineGeometry.js +1 -1
- package/Source/Core/WebGLConstants.js +6 -1
- package/Source/Core/WebMercatorProjection.js +108 -109
- package/Source/Core/WebMercatorTilingScheme.js +246 -242
- package/Source/Core/WindingOrder.js +3 -1
- package/Source/Core/assert.js +27 -0
- package/Source/Core/globalTypes.js +4 -0
- package/Source/DataSources/CzmlDataSource.js +9 -0
- package/Source/DataSources/PathGraphics.js +13 -0
- package/Source/DataSources/PathVisualizer.js +330 -18
- package/Source/DataSources/StaticGeometryColorBatch.js +7 -2
- package/Source/DataSources/StaticGeometryPerMaterialBatch.js +7 -2
- package/Source/DataSources/StaticGroundGeometryPerMaterialBatch.js +4 -1
- package/Source/DataSources/StaticGroundPolylinePerMaterialBatch.js +4 -1
- package/Source/DataSources/StripeOrientation.js +6 -1
- package/Source/Renderer/BufferUsage.js +20 -9
- package/Source/Renderer/Context.js +2 -29
- package/Source/Renderer/DrawCommand.js +435 -403
- package/Source/Renderer/MipmapHint.js +5 -1
- package/Source/Renderer/Pass.js +7 -1
- package/Source/Renderer/PickId.js +44 -0
- package/Source/Renderer/PixelDatatype.js +3 -1
- package/Source/Renderer/RenderState.js +2 -2
- package/Source/Renderer/RenderbufferFormat.js +5 -1
- package/Source/Renderer/ShaderDestination.js +4 -1
- package/Source/Renderer/TextureMagnificationFilter.js +3 -1
- package/Source/Renderer/TextureMinificationFilter.js +3 -1
- package/Source/Renderer/TextureWrap.js +5 -1
- package/Source/Renderer/VertexArray.js +80 -0
- package/Source/Scene/AlphaMode.js +5 -1
- package/Source/Scene/ArcGisBaseMapType.js +6 -1
- package/Source/Scene/ArcGisMapService.js +1 -1
- package/Source/Scene/AttributeType.js +3 -1
- package/Source/Scene/Axis.js +3 -1
- package/Source/Scene/BillboardCollection.js +65 -364
- package/Source/Scene/BingMapsStyle.js +6 -1
- package/Source/Scene/BlendEquation.js +6 -1
- package/Source/Scene/BlendFunction.js +6 -1
- package/Source/Scene/BlendOption.js +6 -1
- package/Source/Scene/BlendingState.js +6 -1
- package/Source/Scene/BufferLoader.js +0 -2
- package/Source/Scene/BufferPoint.js +148 -0
- package/Source/Scene/BufferPointCollection.js +138 -0
- package/Source/Scene/BufferPointMaterial.js +95 -0
- package/Source/Scene/BufferPolygon.js +516 -0
- package/Source/Scene/BufferPolygonCollection.js +370 -0
- package/Source/Scene/BufferPolygonMaterial.js +41 -0
- package/Source/Scene/BufferPolyline.js +185 -0
- package/Source/Scene/BufferPolylineCollection.js +138 -0
- package/Source/Scene/BufferPolylineMaterial.js +93 -0
- package/Source/Scene/BufferPrimitive.js +347 -0
- package/Source/Scene/BufferPrimitiveCollection.js +818 -0
- package/Source/Scene/BufferPrimitiveMaterial.js +140 -0
- package/Source/Scene/CameraEventType.js +6 -1
- package/Source/Scene/Cesium3DTileColorBlendMode.js +6 -1
- package/Source/Scene/Cesium3DTileContent.js +5 -1
- package/Source/Scene/Cesium3DTileContentFactory.js +9 -0
- package/Source/Scene/Cesium3DTileContentState.js +6 -1
- package/Source/Scene/Cesium3DTileContentType.js +3 -1
- package/Source/Scene/Cesium3DTileFeature.js +289 -306
- package/Source/Scene/Cesium3DTileOptimizationHint.js +6 -1
- package/Source/Scene/Cesium3DTilePass.js +5 -1
- package/Source/Scene/Cesium3DTilePointFeature.js +433 -511
- package/Source/Scene/Cesium3DTileRefine.js +6 -1
- package/Source/Scene/Cesium3DTileStyle.js +22 -0
- package/Source/Scene/Cesium3DTileVectorFeature.js +586 -0
- package/Source/Scene/Cesium3DTileset.js +2 -1
- package/Source/Scene/ClassificationType.js +3 -1
- package/Source/Scene/ClippingPolygonCollection.js +270 -101
- package/Source/Scene/CloudType.js +3 -1
- package/Source/Scene/ColorBlendMode.js +4 -1
- package/Source/Scene/CubeMapPanorama.js +4 -4
- package/Source/Scene/CullFace.js +6 -1
- package/Source/Scene/DepthFunction.js +6 -1
- package/Source/Scene/DynamicAtmosphereLightingType.js +3 -1
- package/Source/Scene/EquirectangularPanorama.js +1 -0
- package/Source/Scene/ExpressionNodeType.js +6 -1
- package/Source/Scene/GaussianSplat3DTileContent.js +40 -46
- package/Source/Scene/GaussianSplatPrimitive.js +413 -70
- package/Source/Scene/GetFeatureInfoFormat.js +3 -3
- package/Source/Scene/GltfBufferViewLoader.js +0 -2
- package/Source/Scene/GltfDracoLoader.js +0 -2
- package/Source/Scene/GltfImageLoader.js +0 -3
- package/Source/Scene/GltfIndexBufferLoader.js +0 -4
- package/Source/Scene/GltfJsonLoader.js +0 -2
- package/Source/Scene/GltfLoader.js +215 -39
- package/Source/Scene/GltfLoaderUtil.js +14 -0
- package/Source/Scene/GltfSpzLoader.js +109 -2
- package/Source/Scene/GltfStructuralMetadataLoader.js +0 -2
- package/Source/Scene/GltfTextureLoader.js +0 -2
- package/Source/Scene/GltfVertexBufferLoader.js +0 -4
- package/Source/Scene/HeightReference.js +5 -1
- package/Source/Scene/HorizontalOrigin.js +6 -1
- package/Source/Scene/ITwinData.js +1 -0
- package/Source/Scene/ImageryProvider.js +1 -1
- package/Source/Scene/ImageryState.js +6 -1
- package/Source/Scene/ImplicitSubdivisionScheme.js +3 -1
- package/Source/Scene/InstanceAttributeSemantic.js +3 -1
- package/Source/Scene/IonWorldImageryStyle.js +6 -1
- package/Source/Scene/JobType.js +6 -1
- package/Source/Scene/Label.js +32 -0
- package/Source/Scene/LabelCollection.js +14 -13
- package/Source/Scene/LabelStyle.js +6 -1
- package/Source/Scene/MapMode2D.js +6 -1
- package/Source/Scene/Material.js +2 -0
- package/Source/Scene/Megatexture.js +1 -0
- package/Source/Scene/MetadataClassProperty.js +24 -10
- package/Source/Scene/MetadataComponentType.js +118 -24
- package/Source/Scene/MetadataSchemaLoader.js +0 -2
- package/Source/Scene/MetadataSemantic.js +6 -2
- package/Source/Scene/MetadataType.js +3 -1
- package/Source/Scene/Model/B3dmLoader.js +0 -3
- package/Source/Scene/Model/CustomShaderMode.js +3 -1
- package/Source/Scene/Model/CustomShaderPipelineStage.js +3 -1
- package/Source/Scene/Model/CustomShaderTranslucencyMode.js +5 -1
- package/Source/Scene/Model/EdgeVisibilityPipelineStage.js +735 -264
- package/Source/Scene/Model/Extensions/Gpm/PpeSource.js +5 -1
- package/Source/Scene/Model/Extensions/Gpm/StorageType.js +5 -1
- package/Source/Scene/Model/GeoJsonLoader.js +0 -2
- package/Source/Scene/Model/I3dmLoader.js +0 -3
- package/Source/Scene/Model/InstancingPipelineStage.js +1 -1
- package/Source/Scene/Model/LightingModel.js +5 -1
- package/Source/Scene/Model/MaterialPipelineStage.js +331 -3
- package/Source/Scene/Model/MetadataPipelineStage.js +3 -3
- package/Source/Scene/Model/ModelDrawCommand.js +6 -0
- package/Source/Scene/Model/ModelReader.js +475 -4
- package/Source/Scene/Model/ModelRuntimePrimitive.js +2 -1
- package/Source/Scene/Model/ModelType.js +3 -1
- package/Source/Scene/Model/ModelUtility.js +3 -1
- package/Source/Scene/Model/PntsLoader.js +4 -3
- package/Source/Scene/Model/StyleCommandsNeeded.js +3 -1
- package/Source/Scene/Model/UniformType.js +5 -1
- package/Source/Scene/Model/VaryingType.js +5 -1
- package/Source/Scene/Model/createVectorTileBuffersFromModelComponents.js +375 -0
- package/Source/Scene/Model/pickModel.js +94 -299
- package/Source/Scene/ModelAnimationLoop.js +6 -1
- package/Source/Scene/ModelAnimationState.js +6 -1
- package/Source/Scene/ModelComponents.js +1639 -1542
- package/Source/Scene/PickedMetadataInfo.js +1 -0
- package/Source/Scene/PrimitiveState.js +7 -1
- package/Source/Scene/QuadtreeOccluders.js +20 -15
- package/Source/Scene/QuadtreeTile.js +547 -541
- package/Source/Scene/QuadtreeTileLoadState.js +6 -1
- package/Source/Scene/QuadtreeTileProvider.js +159 -175
- package/Source/Scene/ResourceLoader.js +0 -1
- package/Source/Scene/ResourceLoaderState.js +7 -1
- package/Source/Scene/SceneMode.js +4 -1
- package/Source/Scene/ScreenSpaceCameraController.js +13 -0
- package/Source/Scene/ShadowMode.js +3 -1
- package/Source/Scene/SkyBox.js +17 -8
- package/Source/Scene/SplitDirection.js +6 -1
- package/Source/Scene/StencilFunction.js +6 -1
- package/Source/Scene/StencilOperation.js +6 -1
- package/Source/Scene/TerrainState.js +7 -1
- package/Source/Scene/TileBoundingRegion.js +1 -1
- package/Source/Scene/TileBoundingS2Cell.js +1 -1
- package/Source/Scene/TileBoundingSphere.js +1 -1
- package/Source/Scene/TileState.js +7 -1
- package/Source/Scene/Tonemapper.js +5 -1
- package/Source/Scene/TweenCollection.js +7 -0
- package/Source/Scene/VectorGltf3DTileContent.js +403 -0
- package/Source/Scene/VertexAttributeSemantic.js +17 -1
- package/Source/Scene/VerticalOrigin.js +6 -1
- package/Source/Scene/VoxelBoxShape.js +12 -6
- package/Source/Scene/VoxelContent.js +2 -0
- package/Source/Scene/VoxelCylinderShape.js +39 -38
- package/Source/Scene/VoxelEllipsoidShape.js +46 -96
- package/Source/Scene/VoxelMetadataOrder.js +6 -1
- package/Source/Scene/VoxelProvider.js +1 -0
- package/Source/Scene/VoxelShapeType.js +3 -1
- package/Source/Scene/WebMapServiceImageryProvider.js +2 -2
- package/Source/Scene/WebMapTileServiceImageryProvider.js +366 -131
- package/Source/Scene/parseStructuralMetadata.js +97 -37
- package/Source/Scene/renderBufferPointCollection.js +285 -0
- package/Source/Scene/renderBufferPolygonCollection.js +339 -0
- package/Source/Scene/renderBufferPolylineCollection.js +478 -0
- package/Source/Shaders/BillboardCollectionFS.glsl +2 -77
- package/Source/Shaders/BillboardCollectionFS.js +2 -77
- package/Source/Shaders/BillboardCollectionVS.glsl +2 -60
- package/Source/Shaders/BillboardCollectionVS.js +2 -60
- package/Source/Shaders/BufferPointMaterialFS.glsl +27 -0
- package/Source/Shaders/BufferPointMaterialFS.js +29 -0
- package/Source/Shaders/BufferPointMaterialVS.glsl +48 -0
- package/Source/Shaders/BufferPointMaterialVS.js +50 -0
- package/Source/Shaders/BufferPolygonMaterialFS.glsl +13 -0
- package/Source/Shaders/BufferPolygonMaterialFS.js +15 -0
- package/Source/Shaders/BufferPolygonMaterialVS.glsl +30 -0
- package/Source/Shaders/BufferPolygonMaterialVS.js +32 -0
- package/Source/Shaders/BufferPolylineMaterialFS.glsl +13 -0
- package/Source/Shaders/BufferPolylineMaterialFS.js +15 -0
- package/Source/Shaders/BufferPolylineMaterialVS.glsl +49 -0
- package/Source/Shaders/BufferPolylineMaterialVS.js +51 -0
- package/Source/Shaders/Builtin/CzmBuiltins.js +2 -0
- package/Source/Shaders/Builtin/Functions/computeTextureTransform.glsl +24 -0
- package/Source/Shaders/Builtin/Functions/computeTextureTransform.js +25 -0
- package/Source/Shaders/Model/ConstantLodStageFS.glsl +60 -0
- package/Source/Shaders/Model/ConstantLodStageFS.js +62 -0
- package/Source/Shaders/Model/ConstantLodStageVS.glsl +12 -0
- package/Source/Shaders/Model/ConstantLodStageVS.js +13 -0
- package/Source/Shaders/Model/EdgeVisibilityStageFS.glsl +34 -48
- package/Source/Shaders/Model/EdgeVisibilityStageFS.js +34 -49
- package/Source/Shaders/Model/EdgeVisibilityStageVS.glsl +98 -0
- package/Source/Shaders/Model/EdgeVisibilityStageVS.js +100 -0
- package/Source/Shaders/Model/MaterialStageFS.glsl +46 -20
- package/Source/Shaders/Model/MaterialStageFS.js +46 -20
- package/Source/Shaders/Model/ModelFS.glsl +15 -0
- package/Source/Shaders/Model/ModelFS.js +15 -0
- package/Source/Shaders/Model/ModelVS.glsl +8 -0
- package/Source/Shaders/Model/ModelVS.js +8 -0
- package/Source/Shaders/PolygonSignedDistanceFS.glsl +64 -33
- package/Source/Shaders/PolygonSignedDistanceFS.js +64 -33
- package/Source/Shaders/PrimitiveGaussianSplatVS.glsl +9 -2
- package/Source/Shaders/PrimitiveGaussianSplatVS.js +9 -2
- package/Source/Shaders/Voxels/VoxelFS.glsl +1 -1
- package/Source/Shaders/Voxels/VoxelFS.js +1 -1
- package/Source/Shaders/Voxels/convertLocalToBoxUv.glsl +0 -1
- package/Source/Shaders/Voxels/convertLocalToBoxUv.js +0 -1
- package/Source/Shaders/Voxels/convertLocalToCylinderUv.glsl +7 -9
- package/Source/Shaders/Voxels/convertLocalToCylinderUv.js +7 -9
- package/Source/Shaders/Voxels/convertLocalToEllipsoidUv.glsl +7 -17
- package/Source/Shaders/Voxels/convertLocalToEllipsoidUv.js +7 -17
- package/Source/Widget/CesiumWidget.js +11 -4
- package/Source/Workers/decodeDraco.js +3 -0
- package/Source/Workers/decodeI3S.js +5 -2
- package/index.d.ts +1332 -402
- package/index.js +111 -81
- package/package.json +3 -3
- package/Build/Workers/chunk-54O3AGOA.js +0 -642
- package/Build/Workers/chunk-6U5QMZU3.js +0 -940
- package/Build/Workers/chunk-HNDE73JK.js +0 -1829
- package/Build/Workers/chunk-PAFMAR7A.js +0 -2357
- package/Build/Workers/chunk-S53HSRT6.js +0 -114
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
in vec3 positionHigh;
|
|
2
|
+
in vec3 positionLow;
|
|
3
|
+
in vec3 prevPositionHigh;
|
|
4
|
+
in vec3 prevPositionLow;
|
|
5
|
+
in vec3 nextPositionHigh;
|
|
6
|
+
in vec3 nextPositionLow;
|
|
7
|
+
in vec4 pickColor;
|
|
8
|
+
in vec4 showColorWidthAndTexCoord;
|
|
9
|
+
|
|
10
|
+
out vec4 v_pickColor;
|
|
11
|
+
out vec4 v_color;
|
|
12
|
+
out vec2 v_st;
|
|
13
|
+
out float v_width;
|
|
14
|
+
out float v_polylineAngle;
|
|
15
|
+
|
|
16
|
+
void main()
|
|
17
|
+
{
|
|
18
|
+
float show = showColorWidthAndTexCoord.x;
|
|
19
|
+
vec4 color = czm_decodeRGB8(showColorWidthAndTexCoord.y);
|
|
20
|
+
float width = showColorWidthAndTexCoord.z;
|
|
21
|
+
float texCoord = showColorWidthAndTexCoord.w;
|
|
22
|
+
|
|
23
|
+
///////////////////////////////////////////////////////////////////////////
|
|
24
|
+
|
|
25
|
+
bool usePrevious = texCoord == 1.0;
|
|
26
|
+
float expandDir = gl_VertexID % 2 == 1 ? 1.0 : -1.0;
|
|
27
|
+
float polylineAngle;
|
|
28
|
+
|
|
29
|
+
vec4 positionEC = czm_translateRelativeToEye(positionHigh, positionLow);
|
|
30
|
+
vec4 prevPositionEC = czm_translateRelativeToEye(prevPositionHigh, prevPositionLow);
|
|
31
|
+
vec4 nextPositionEC = czm_translateRelativeToEye(nextPositionHigh, nextPositionLow);
|
|
32
|
+
|
|
33
|
+
vec4 positionWC = getPolylineWindowCoordinates(positionEC, prevPositionEC, nextPositionEC, expandDir, width, usePrevious, polylineAngle);
|
|
34
|
+
|
|
35
|
+
///////////////////////////////////////////////////////////////////////////
|
|
36
|
+
|
|
37
|
+
gl_Position = czm_viewportOrthographic * positionWC * show;
|
|
38
|
+
|
|
39
|
+
v_pickColor = pickColor / 255.0;
|
|
40
|
+
|
|
41
|
+
v_color = color;
|
|
42
|
+
v_color.a *= show;
|
|
43
|
+
|
|
44
|
+
v_st.s = texCoord;
|
|
45
|
+
v_st.t = czm_writeNonPerspective(clamp(expandDir, 0.0, 1.0), gl_Position.w);
|
|
46
|
+
|
|
47
|
+
v_width = width;
|
|
48
|
+
v_polylineAngle = polylineAngle;
|
|
49
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
//This file is automatically rebuilt by the Cesium build process.
|
|
2
|
+
export default "in vec3 positionHigh;\n\
|
|
3
|
+
in vec3 positionLow;\n\
|
|
4
|
+
in vec3 prevPositionHigh;\n\
|
|
5
|
+
in vec3 prevPositionLow;\n\
|
|
6
|
+
in vec3 nextPositionHigh;\n\
|
|
7
|
+
in vec3 nextPositionLow;\n\
|
|
8
|
+
in vec4 pickColor;\n\
|
|
9
|
+
in vec4 showColorWidthAndTexCoord;\n\
|
|
10
|
+
\n\
|
|
11
|
+
out vec4 v_pickColor;\n\
|
|
12
|
+
out vec4 v_color;\n\
|
|
13
|
+
out vec2 v_st;\n\
|
|
14
|
+
out float v_width;\n\
|
|
15
|
+
out float v_polylineAngle;\n\
|
|
16
|
+
\n\
|
|
17
|
+
void main()\n\
|
|
18
|
+
{\n\
|
|
19
|
+
float show = showColorWidthAndTexCoord.x;\n\
|
|
20
|
+
vec4 color = czm_decodeRGB8(showColorWidthAndTexCoord.y);\n\
|
|
21
|
+
float width = showColorWidthAndTexCoord.z;\n\
|
|
22
|
+
float texCoord = showColorWidthAndTexCoord.w;\n\
|
|
23
|
+
\n\
|
|
24
|
+
///////////////////////////////////////////////////////////////////////////\n\
|
|
25
|
+
\n\
|
|
26
|
+
bool usePrevious = texCoord == 1.0;\n\
|
|
27
|
+
float expandDir = gl_VertexID % 2 == 1 ? 1.0 : -1.0;\n\
|
|
28
|
+
float polylineAngle;\n\
|
|
29
|
+
\n\
|
|
30
|
+
vec4 positionEC = czm_translateRelativeToEye(positionHigh, positionLow);\n\
|
|
31
|
+
vec4 prevPositionEC = czm_translateRelativeToEye(prevPositionHigh, prevPositionLow);\n\
|
|
32
|
+
vec4 nextPositionEC = czm_translateRelativeToEye(nextPositionHigh, nextPositionLow);\n\
|
|
33
|
+
\n\
|
|
34
|
+
vec4 positionWC = getPolylineWindowCoordinates(positionEC, prevPositionEC, nextPositionEC, expandDir, width, usePrevious, polylineAngle);\n\
|
|
35
|
+
\n\
|
|
36
|
+
///////////////////////////////////////////////////////////////////////////\n\
|
|
37
|
+
\n\
|
|
38
|
+
gl_Position = czm_viewportOrthographic * positionWC * show;\n\
|
|
39
|
+
\n\
|
|
40
|
+
v_pickColor = pickColor / 255.0;\n\
|
|
41
|
+
\n\
|
|
42
|
+
v_color = color;\n\
|
|
43
|
+
v_color.a *= show;\n\
|
|
44
|
+
\n\
|
|
45
|
+
v_st.s = texCoord;\n\
|
|
46
|
+
v_st.t = czm_writeNonPerspective(clamp(expandDir, 0.0, 1.0), gl_Position.w);\n\
|
|
47
|
+
\n\
|
|
48
|
+
v_width = width;\n\
|
|
49
|
+
v_polylineAngle = polylineAngle;\n\
|
|
50
|
+
}\n\
|
|
51
|
+
";
|
|
@@ -71,6 +71,7 @@ import czm_computeAtmosphereColor from './Functions/computeAtmosphereColor.js'
|
|
|
71
71
|
import czm_computeGroundAtmosphereScattering from './Functions/computeGroundAtmosphereScattering.js'
|
|
72
72
|
import czm_computePosition from './Functions/computePosition.js'
|
|
73
73
|
import czm_computeScattering from './Functions/computeScattering.js'
|
|
74
|
+
import czm_computeTextureTransform from './Functions/computeTextureTransform.js'
|
|
74
75
|
import czm_cosineAndSine from './Functions/cosineAndSine.js'
|
|
75
76
|
import czm_decodeRGB8 from './Functions/decodeRGB8.js'
|
|
76
77
|
import czm_decompressTextureCoordinates from './Functions/decompressTextureCoordinates.js'
|
|
@@ -213,6 +214,7 @@ export default {
|
|
|
213
214
|
czm_computeGroundAtmosphereScattering : czm_computeGroundAtmosphereScattering,
|
|
214
215
|
czm_computePosition : czm_computePosition,
|
|
215
216
|
czm_computeScattering : czm_computeScattering,
|
|
217
|
+
czm_computeTextureTransform : czm_computeTextureTransform,
|
|
216
218
|
czm_cosineAndSine : czm_cosineAndSine,
|
|
217
219
|
czm_decodeRGB8 : czm_decodeRGB8,
|
|
218
220
|
czm_decompressTextureCoordinates : czm_decompressTextureCoordinates,
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Applies a 2D texture transformation matrix to texture coordinates.
|
|
3
|
+
* This function applies translation, rotation, and scaling transformations
|
|
4
|
+
* as specified by the KHR_texture_transform glTF extension.
|
|
5
|
+
*
|
|
6
|
+
* @name czm_computeTextureTransform
|
|
7
|
+
* @glslFunction
|
|
8
|
+
*
|
|
9
|
+
* @param {vec2} texCoord The texture coordinates to transform.
|
|
10
|
+
* @param {mat3} textureTransform The 3x3 transformation matrix.
|
|
11
|
+
*
|
|
12
|
+
* @returns {vec2} The transformed texture coordinates.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* // GLSL declaration
|
|
16
|
+
* vec2 czm_computeTextureTransform(vec2 texCoord, mat3 textureTransform);
|
|
17
|
+
*
|
|
18
|
+
* // Apply texture transform to UV coordinates
|
|
19
|
+
* vec2 transformedUV = czm_computeTextureTransform(uv, u_textureTransform);
|
|
20
|
+
*/
|
|
21
|
+
vec2 czm_computeTextureTransform(vec2 texCoord, mat3 textureTransform)
|
|
22
|
+
{
|
|
23
|
+
return vec2(textureTransform * vec3(texCoord, 1.0));
|
|
24
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//This file is automatically rebuilt by the Cesium build process.
|
|
2
|
+
export default "/**\n\
|
|
3
|
+
* Applies a 2D texture transformation matrix to texture coordinates.\n\
|
|
4
|
+
* This function applies translation, rotation, and scaling transformations\n\
|
|
5
|
+
* as specified by the KHR_texture_transform glTF extension.\n\
|
|
6
|
+
*\n\
|
|
7
|
+
* @name czm_computeTextureTransform\n\
|
|
8
|
+
* @glslFunction\n\
|
|
9
|
+
*\n\
|
|
10
|
+
* @param {vec2} texCoord The texture coordinates to transform.\n\
|
|
11
|
+
* @param {mat3} textureTransform The 3x3 transformation matrix.\n\
|
|
12
|
+
*\n\
|
|
13
|
+
* @returns {vec2} The transformed texture coordinates.\n\
|
|
14
|
+
*\n\
|
|
15
|
+
* @example\n\
|
|
16
|
+
* // GLSL declaration\n\
|
|
17
|
+
* vec2 czm_computeTextureTransform(vec2 texCoord, mat3 textureTransform);\n\
|
|
18
|
+
*\n\
|
|
19
|
+
* // Apply texture transform to UV coordinates\n\
|
|
20
|
+
* vec2 transformedUV = czm_computeTextureTransform(uv, u_textureTransform);\n\
|
|
21
|
+
*/\n\
|
|
22
|
+
vec2 czm_computeTextureTransform(vec2 texCoord, mat3 textureTransform)\n\
|
|
23
|
+
{\n\
|
|
24
|
+
return vec2(textureTransform * vec3(texCoord, 1.0));\n\
|
|
25
|
+
}";
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
#ifdef HAS_CONSTANT_LOD
|
|
2
|
+
|
|
3
|
+
vec4 constantLodTextureLookup(sampler2D textureSampler, vec3 constantLodParams) {
|
|
4
|
+
bool atMaxClamp = v_constantLodUvCustom.z >= constantLodParams.y;
|
|
5
|
+
bool atMinClamp = v_constantLodUvCustom.z <= constantLodParams.x;
|
|
6
|
+
bool atClampBoundary = atMaxClamp || atMinClamp;
|
|
7
|
+
|
|
8
|
+
float effectiveDistance = atMaxClamp ? constantLodParams.y :
|
|
9
|
+
(atMinClamp ? constantLodParams.x : v_constantLodUvCustom.z);
|
|
10
|
+
|
|
11
|
+
float logDepth = log2(effectiveDistance);
|
|
12
|
+
logDepth = clamp(logDepth, -10.0, 20.0);
|
|
13
|
+
|
|
14
|
+
float f = fract(logDepth);
|
|
15
|
+
float p = floor(logDepth);
|
|
16
|
+
|
|
17
|
+
if (atClampBoundary) {
|
|
18
|
+
float clampedP = ceil(logDepth);
|
|
19
|
+
vec2 tc = v_constantLodUvCustom.xy / pow(2.0, clampedP) * constantLodParams.z;
|
|
20
|
+
return texture(textureSampler, tc);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
vec2 tc1 = v_constantLodUvCustom.xy / pow(2.0, p) * constantLodParams.z;
|
|
24
|
+
vec2 tc2 = v_constantLodUvCustom.xy / pow(2.0, p + 1.0) * constantLodParams.z;
|
|
25
|
+
return mix(texture(textureSampler, tc1), texture(textureSampler, tc2), f);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
vec4 constantLodTextureLookup(sampler2D textureSampler, vec3 constantLodParams, mat3 textureTransform) {
|
|
29
|
+
bool atMaxClamp = v_constantLodUvCustom.z >= constantLodParams.y;
|
|
30
|
+
bool atMinClamp = v_constantLodUvCustom.z <= constantLodParams.x;
|
|
31
|
+
bool atClampBoundary = atMaxClamp || atMinClamp;
|
|
32
|
+
|
|
33
|
+
float effectiveDistance = atMaxClamp ? constantLodParams.y :
|
|
34
|
+
(atMinClamp ? constantLodParams.x : v_constantLodUvCustom.z);
|
|
35
|
+
|
|
36
|
+
float logDepth = log2(effectiveDistance);
|
|
37
|
+
logDepth = clamp(logDepth, -10.0, 20.0);
|
|
38
|
+
|
|
39
|
+
float f = fract(logDepth);
|
|
40
|
+
float p = floor(logDepth);
|
|
41
|
+
|
|
42
|
+
if (atClampBoundary) {
|
|
43
|
+
float clampedP = ceil(logDepth);
|
|
44
|
+
vec2 tc = v_constantLodUvCustom.xy / pow(2.0, clampedP) * constantLodParams.z;
|
|
45
|
+
// Apply texture transform to the final texture coordinates
|
|
46
|
+
tc = czm_computeTextureTransform(tc, textureTransform);
|
|
47
|
+
return texture(textureSampler, tc);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
vec2 tc1 = v_constantLodUvCustom.xy / pow(2.0, p) * constantLodParams.z;
|
|
51
|
+
vec2 tc2 = v_constantLodUvCustom.xy / pow(2.0, p + 1.0) * constantLodParams.z;
|
|
52
|
+
|
|
53
|
+
// Apply texture transform to both LOD texture coordinates before mixing
|
|
54
|
+
tc1 = czm_computeTextureTransform(tc1, textureTransform);
|
|
55
|
+
tc2 = czm_computeTextureTransform(tc2, textureTransform);
|
|
56
|
+
|
|
57
|
+
return mix(texture(textureSampler, tc1), texture(textureSampler, tc2), f);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
#endif
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
//This file is automatically rebuilt by the Cesium build process.
|
|
2
|
+
export default "#ifdef HAS_CONSTANT_LOD\n\
|
|
3
|
+
\n\
|
|
4
|
+
vec4 constantLodTextureLookup(sampler2D textureSampler, vec3 constantLodParams) {\n\
|
|
5
|
+
bool atMaxClamp = v_constantLodUvCustom.z >= constantLodParams.y;\n\
|
|
6
|
+
bool atMinClamp = v_constantLodUvCustom.z <= constantLodParams.x;\n\
|
|
7
|
+
bool atClampBoundary = atMaxClamp || atMinClamp;\n\
|
|
8
|
+
\n\
|
|
9
|
+
float effectiveDistance = atMaxClamp ? constantLodParams.y : \n\
|
|
10
|
+
(atMinClamp ? constantLodParams.x : v_constantLodUvCustom.z);\n\
|
|
11
|
+
\n\
|
|
12
|
+
float logDepth = log2(effectiveDistance);\n\
|
|
13
|
+
logDepth = clamp(logDepth, -10.0, 20.0);\n\
|
|
14
|
+
\n\
|
|
15
|
+
float f = fract(logDepth);\n\
|
|
16
|
+
float p = floor(logDepth);\n\
|
|
17
|
+
\n\
|
|
18
|
+
if (atClampBoundary) {\n\
|
|
19
|
+
float clampedP = ceil(logDepth);\n\
|
|
20
|
+
vec2 tc = v_constantLodUvCustom.xy / pow(2.0, clampedP) * constantLodParams.z;\n\
|
|
21
|
+
return texture(textureSampler, tc);\n\
|
|
22
|
+
}\n\
|
|
23
|
+
\n\
|
|
24
|
+
vec2 tc1 = v_constantLodUvCustom.xy / pow(2.0, p) * constantLodParams.z;\n\
|
|
25
|
+
vec2 tc2 = v_constantLodUvCustom.xy / pow(2.0, p + 1.0) * constantLodParams.z;\n\
|
|
26
|
+
return mix(texture(textureSampler, tc1), texture(textureSampler, tc2), f);\n\
|
|
27
|
+
}\n\
|
|
28
|
+
\n\
|
|
29
|
+
vec4 constantLodTextureLookup(sampler2D textureSampler, vec3 constantLodParams, mat3 textureTransform) {\n\
|
|
30
|
+
bool atMaxClamp = v_constantLodUvCustom.z >= constantLodParams.y;\n\
|
|
31
|
+
bool atMinClamp = v_constantLodUvCustom.z <= constantLodParams.x;\n\
|
|
32
|
+
bool atClampBoundary = atMaxClamp || atMinClamp;\n\
|
|
33
|
+
\n\
|
|
34
|
+
float effectiveDistance = atMaxClamp ? constantLodParams.y : \n\
|
|
35
|
+
(atMinClamp ? constantLodParams.x : v_constantLodUvCustom.z);\n\
|
|
36
|
+
\n\
|
|
37
|
+
float logDepth = log2(effectiveDistance);\n\
|
|
38
|
+
logDepth = clamp(logDepth, -10.0, 20.0);\n\
|
|
39
|
+
\n\
|
|
40
|
+
float f = fract(logDepth);\n\
|
|
41
|
+
float p = floor(logDepth);\n\
|
|
42
|
+
\n\
|
|
43
|
+
if (atClampBoundary) {\n\
|
|
44
|
+
float clampedP = ceil(logDepth);\n\
|
|
45
|
+
vec2 tc = v_constantLodUvCustom.xy / pow(2.0, clampedP) * constantLodParams.z;\n\
|
|
46
|
+
// Apply texture transform to the final texture coordinates\n\
|
|
47
|
+
tc = czm_computeTextureTransform(tc, textureTransform);\n\
|
|
48
|
+
return texture(textureSampler, tc);\n\
|
|
49
|
+
}\n\
|
|
50
|
+
\n\
|
|
51
|
+
vec2 tc1 = v_constantLodUvCustom.xy / pow(2.0, p) * constantLodParams.z;\n\
|
|
52
|
+
vec2 tc2 = v_constantLodUvCustom.xy / pow(2.0, p + 1.0) * constantLodParams.z;\n\
|
|
53
|
+
\n\
|
|
54
|
+
// Apply texture transform to both LOD texture coordinates before mixing\n\
|
|
55
|
+
tc1 = czm_computeTextureTransform(tc1, textureTransform);\n\
|
|
56
|
+
tc2 = czm_computeTextureTransform(tc2, textureTransform);\n\
|
|
57
|
+
\n\
|
|
58
|
+
return mix(texture(textureSampler, tc1), texture(textureSampler, tc2), f);\n\
|
|
59
|
+
}\n\
|
|
60
|
+
\n\
|
|
61
|
+
#endif\n\
|
|
62
|
+
";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#ifdef HAS_CONSTANT_LOD
|
|
2
|
+
// Extract model scale to compensate for minimumPixelSize scaling
|
|
3
|
+
float modelScaleX = length(czm_model[0].xyz);
|
|
4
|
+
float modelScaleY = length(czm_model[1].xyz);
|
|
5
|
+
float modelScaleZ = length(czm_model[2].xyz);
|
|
6
|
+
float modelScale = (modelScaleX + modelScaleY + modelScaleZ) / 3.0;
|
|
7
|
+
|
|
8
|
+
// Transform model position through ENU but as direction only (w=0) to avoid position-dependent rotation
|
|
9
|
+
vec3 enuDir = (u_constantLodWorldToEnu * czm_model * vec4(v_positionMC, 0.0)).xyz;
|
|
10
|
+
v_constantLodUvCustom.xy = (enuDir.yx + u_constantLodOffset) / modelScale;
|
|
11
|
+
v_constantLodUvCustom.z = u_constantLodDistance / modelScale;
|
|
12
|
+
#endif
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//This file is automatically rebuilt by the Cesium build process.
|
|
2
|
+
export default "#ifdef HAS_CONSTANT_LOD\n\
|
|
3
|
+
// Extract model scale to compensate for minimumPixelSize scaling\n\
|
|
4
|
+
float modelScaleX = length(czm_model[0].xyz);\n\
|
|
5
|
+
float modelScaleY = length(czm_model[1].xyz);\n\
|
|
6
|
+
float modelScaleZ = length(czm_model[2].xyz);\n\
|
|
7
|
+
float modelScale = (modelScaleX + modelScaleY + modelScaleZ) / 3.0;\n\
|
|
8
|
+
\n\
|
|
9
|
+
// Transform model position through ENU but as direction only (w=0) to avoid position-dependent rotation\n\
|
|
10
|
+
vec3 enuDir = (u_constantLodWorldToEnu * czm_model * vec4(v_positionMC, 0.0)).xyz;\n\
|
|
11
|
+
v_constantLodUvCustom.xy = (enuDir.yx + u_constantLodOffset) / modelScale;\n\
|
|
12
|
+
v_constantLodUvCustom.z = u_constantLodDistance / modelScale;\n\
|
|
13
|
+
#endif";
|
|
@@ -13,59 +13,45 @@ void edgeVisibilityStage(inout vec4 color, inout FeatureIds featureIds)
|
|
|
13
13
|
if (!u_isEdgePass) {
|
|
14
14
|
return;
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
|
|
17
17
|
float edgeTypeInt = v_edgeType * 255.0;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
if (edgeTypeInt < 0.5) { // HIDDEN (0)
|
|
23
|
-
edgeColor = vec4(0.0, 0.0, 0.0, 0.0); // Transparent for hidden edges
|
|
18
|
+
|
|
19
|
+
if (edgeTypeInt < 0.5) {
|
|
20
|
+
discard;
|
|
24
21
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
vec3 viewDir = -normalize(v_positionEC);
|
|
32
|
-
|
|
33
|
-
// Calculate dot products to determine triangle facing
|
|
34
|
-
float dotA = dot(normalA, viewDir);
|
|
35
|
-
float dotB = dot(normalB, viewDir);
|
|
36
|
-
|
|
37
|
-
const float eps = 1e-3;
|
|
38
|
-
bool frontA = dotA > eps;
|
|
39
|
-
bool backA = dotA < -eps;
|
|
40
|
-
bool frontB = dotB > eps;
|
|
41
|
-
bool backB = dotB < -eps;
|
|
42
|
-
|
|
43
|
-
// True silhouette: one triangle front-facing, other back-facing
|
|
44
|
-
bool oppositeFacing = (frontA && backB) || (backA && frontB);
|
|
45
|
-
|
|
46
|
-
// Exclude edges where both triangles are nearly grazing (perpendicular to view)
|
|
47
|
-
// This handles the top-view cylinder case where both normals are ~horizontal
|
|
48
|
-
bool bothNearGrazing = (abs(dotA) <= eps && abs(dotB) <= eps);
|
|
49
|
-
|
|
50
|
-
if (!(oppositeFacing && !bothNearGrazing)) {
|
|
51
|
-
discard; // Not a true silhouette edge
|
|
52
|
-
} else {
|
|
53
|
-
// True silhouette
|
|
54
|
-
edgeColor = vec4(1.0, 0.0, 0.0, 1.0);
|
|
22
|
+
|
|
23
|
+
if (edgeTypeInt > 0.5 && edgeTypeInt < 1.5) { // silhouette candidate
|
|
24
|
+
// Silhouette check done in vertex shader
|
|
25
|
+
// v_shouldDiscard will be > 0.5 if this edge should be discarded
|
|
26
|
+
if (v_shouldDiscard > 0.5) {
|
|
27
|
+
discard;
|
|
55
28
|
}
|
|
56
29
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
} else {
|
|
63
|
-
edgeColor = vec4(0.0, 0.0, 0.0, 0.0);
|
|
30
|
+
|
|
31
|
+
vec4 finalColor = color;
|
|
32
|
+
#ifdef HAS_EDGE_COLOR_ATTRIBUTE
|
|
33
|
+
if (v_edgeColor.a >= 0.0) {
|
|
34
|
+
finalColor = v_edgeColor;
|
|
64
35
|
}
|
|
36
|
+
#endif
|
|
65
37
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
38
|
+
#ifdef HAS_LINE_PATTERN
|
|
39
|
+
// Pattern is 16-bit, each bit represents visibility at that position
|
|
40
|
+
const float maskLength = 16.0;
|
|
41
|
+
|
|
42
|
+
// Get the relative position within the dash from 0 to 1
|
|
43
|
+
float dashPosition = fract(v_lineCoord / maskLength);
|
|
44
|
+
// Figure out the mask index
|
|
45
|
+
float maskIndex = floor(dashPosition * maskLength);
|
|
46
|
+
// Test the bit mask
|
|
47
|
+
float maskTest = floor(u_linePattern / pow(2.0, maskIndex));
|
|
48
|
+
|
|
49
|
+
// If bit is 0 (gap), discard the fragment (use < 1.0 for better numerical stability)
|
|
50
|
+
if (mod(maskTest, 2.0) < 1.0) {
|
|
51
|
+
discard;
|
|
52
|
+
}
|
|
53
|
+
#endif
|
|
54
|
+
color = finalColor;
|
|
69
55
|
|
|
70
56
|
#if defined(HAS_EDGE_VISIBILITY_MRT) && !defined(CESIUM_REDIRECTED_COLOR_OUTPUT)
|
|
71
57
|
// Write edge metadata
|
|
@@ -80,4 +66,4 @@ void edgeVisibilityStage(inout vec4 color, inout FeatureIds featureIds)
|
|
|
80
66
|
out_edgeDepth = czm_packDepth(gl_FragCoord.z);
|
|
81
67
|
#endif
|
|
82
68
|
#endif
|
|
83
|
-
}
|
|
69
|
+
}
|
|
@@ -14,59 +14,45 @@ void edgeVisibilityStage(inout vec4 color, inout FeatureIds featureIds)\n\
|
|
|
14
14
|
if (!u_isEdgePass) {\n\
|
|
15
15
|
return;\n\
|
|
16
16
|
}\n\
|
|
17
|
-
|
|
17
|
+
\n\
|
|
18
18
|
float edgeTypeInt = v_edgeType * 255.0;\n\
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
\n\
|
|
23
|
-
if (edgeTypeInt < 0.5) { // HIDDEN (0)\n\
|
|
24
|
-
edgeColor = vec4(0.0, 0.0, 0.0, 0.0); // Transparent for hidden edges\n\
|
|
19
|
+
\n\
|
|
20
|
+
if (edgeTypeInt < 0.5) {\n\
|
|
21
|
+
discard;\n\
|
|
25
22
|
}\n\
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
\n\
|
|
31
|
-
|
|
32
|
-
vec3 viewDir = -normalize(v_positionEC);\n\
|
|
33
|
-
\n\
|
|
34
|
-
// Calculate dot products to determine triangle facing\n\
|
|
35
|
-
float dotA = dot(normalA, viewDir);\n\
|
|
36
|
-
float dotB = dot(normalB, viewDir);\n\
|
|
37
|
-
\n\
|
|
38
|
-
const float eps = 1e-3;\n\
|
|
39
|
-
bool frontA = dotA > eps;\n\
|
|
40
|
-
bool backA = dotA < -eps;\n\
|
|
41
|
-
bool frontB = dotB > eps;\n\
|
|
42
|
-
bool backB = dotB < -eps;\n\
|
|
43
|
-
\n\
|
|
44
|
-
// True silhouette: one triangle front-facing, other back-facing\n\
|
|
45
|
-
bool oppositeFacing = (frontA && backB) || (backA && frontB);\n\
|
|
46
|
-
\n\
|
|
47
|
-
// Exclude edges where both triangles are nearly grazing (perpendicular to view)\n\
|
|
48
|
-
// This handles the top-view cylinder case where both normals are ~horizontal\n\
|
|
49
|
-
bool bothNearGrazing = (abs(dotA) <= eps && abs(dotB) <= eps);\n\
|
|
50
|
-
\n\
|
|
51
|
-
if (!(oppositeFacing && !bothNearGrazing)) {\n\
|
|
52
|
-
discard; // Not a true silhouette edge\n\
|
|
53
|
-
} else {\n\
|
|
54
|
-
// True silhouette\n\
|
|
55
|
-
edgeColor = vec4(1.0, 0.0, 0.0, 1.0);\n\
|
|
23
|
+
\n\
|
|
24
|
+
if (edgeTypeInt > 0.5 && edgeTypeInt < 1.5) { // silhouette candidate\n\
|
|
25
|
+
// Silhouette check done in vertex shader\n\
|
|
26
|
+
// v_shouldDiscard will be > 0.5 if this edge should be discarded\n\
|
|
27
|
+
if (v_shouldDiscard > 0.5) {\n\
|
|
28
|
+
discard;\n\
|
|
56
29
|
}\n\
|
|
57
30
|
}\n\
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
} else {\n\
|
|
64
|
-
edgeColor = vec4(0.0, 0.0, 0.0, 0.0);\n\
|
|
31
|
+
\n\
|
|
32
|
+
vec4 finalColor = color;\n\
|
|
33
|
+
#ifdef HAS_EDGE_COLOR_ATTRIBUTE\n\
|
|
34
|
+
if (v_edgeColor.a >= 0.0) {\n\
|
|
35
|
+
finalColor = v_edgeColor;\n\
|
|
65
36
|
}\n\
|
|
37
|
+
#endif\n\
|
|
66
38
|
\n\
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
39
|
+
#ifdef HAS_LINE_PATTERN\n\
|
|
40
|
+
// Pattern is 16-bit, each bit represents visibility at that position\n\
|
|
41
|
+
const float maskLength = 16.0;\n\
|
|
42
|
+
\n\
|
|
43
|
+
// Get the relative position within the dash from 0 to 1\n\
|
|
44
|
+
float dashPosition = fract(v_lineCoord / maskLength);\n\
|
|
45
|
+
// Figure out the mask index\n\
|
|
46
|
+
float maskIndex = floor(dashPosition * maskLength);\n\
|
|
47
|
+
// Test the bit mask\n\
|
|
48
|
+
float maskTest = floor(u_linePattern / pow(2.0, maskIndex));\n\
|
|
49
|
+
\n\
|
|
50
|
+
// If bit is 0 (gap), discard the fragment (use < 1.0 for better numerical stability)\n\
|
|
51
|
+
if (mod(maskTest, 2.0) < 1.0) {\n\
|
|
52
|
+
discard;\n\
|
|
53
|
+
}\n\
|
|
54
|
+
#endif\n\
|
|
55
|
+
color = finalColor;\n\
|
|
70
56
|
\n\
|
|
71
57
|
#if defined(HAS_EDGE_VISIBILITY_MRT) && !defined(CESIUM_REDIRECTED_COLOR_OUTPUT)\n\
|
|
72
58
|
// Write edge metadata\n\
|
|
@@ -81,5 +67,4 @@ void edgeVisibilityStage(inout vec4 color, inout FeatureIds featureIds)\n\
|
|
|
81
67
|
out_edgeDepth = czm_packDepth(gl_FragCoord.z);\n\
|
|
82
68
|
#endif\n\
|
|
83
69
|
#endif\n\
|
|
84
|
-
}
|
|
85
|
-
";
|
|
70
|
+
}";
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
#ifdef HAS_EDGE_VISIBILITY
|
|
2
|
+
void edgeVisibilityStageVS() {
|
|
3
|
+
if (!u_isEdgePass) {
|
|
4
|
+
return;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
v_edgeType = a_edgeType;
|
|
8
|
+
v_silhouetteNormalView = czm_normal * a_silhouetteNormal;
|
|
9
|
+
v_faceNormalAView = czm_normal * a_faceNormalA;
|
|
10
|
+
v_faceNormalBView = czm_normal * a_faceNormalB;
|
|
11
|
+
v_edgeOffset = a_edgeOffset;
|
|
12
|
+
|
|
13
|
+
// Silhouette detection: check both endpoints of the edge
|
|
14
|
+
v_shouldDiscard = 0.0;
|
|
15
|
+
float edgeTypeInt = a_edgeType * 255.0;
|
|
16
|
+
if (edgeTypeInt > 0.5 && edgeTypeInt < 1.5) {
|
|
17
|
+
vec3 normalA = normalize(v_faceNormalAView);
|
|
18
|
+
vec3 normalB = normalize(v_faceNormalBView);
|
|
19
|
+
const float perpTol = 2.5e-4;
|
|
20
|
+
|
|
21
|
+
// Check at current vertex (first endpoint)
|
|
22
|
+
vec4 currentPosEC = czm_modelView * vec4(v_positionMC, 1.0);
|
|
23
|
+
vec3 toEye1 = normalize(-currentPosEC.xyz);
|
|
24
|
+
float dotA1 = dot(normalA, toEye1);
|
|
25
|
+
float dotB1 = dot(normalB, toEye1);
|
|
26
|
+
|
|
27
|
+
// Check at other vertex (second endpoint)
|
|
28
|
+
vec4 otherPosEC = czm_modelView * vec4(a_edgeOtherPos, 1.0);
|
|
29
|
+
vec3 toEye2 = normalize(-otherPosEC.xyz);
|
|
30
|
+
float dotA2 = dot(normalA, toEye2);
|
|
31
|
+
float dotB2 = dot(normalB, toEye2);
|
|
32
|
+
|
|
33
|
+
// Discard if EITHER endpoint is non-silhouette
|
|
34
|
+
if (dotA1 * dotB1 > perpTol || dotA2 * dotB2 > perpTol) {
|
|
35
|
+
v_shouldDiscard = 1.0;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
#ifdef HAS_EDGE_FEATURE_ID
|
|
40
|
+
v_featureId_0 = a_edgeFeatureId;
|
|
41
|
+
#endif
|
|
42
|
+
|
|
43
|
+
#ifdef HAS_EDGE_COLOR_ATTRIBUTE
|
|
44
|
+
v_edgeColor = a_edgeColor;
|
|
45
|
+
#endif
|
|
46
|
+
|
|
47
|
+
#ifdef HAS_LINE_PATTERN
|
|
48
|
+
#ifdef HAS_EDGE_CUMULATIVE_DISTANCE
|
|
49
|
+
v_lineCoord = a_edgeCumulativeDistance * u_pixelsPerWorld;
|
|
50
|
+
#else
|
|
51
|
+
vec4 currentClip = czm_modelViewProjection * vec4(v_positionMC, 1.0);
|
|
52
|
+
vec2 currentScreen = ((currentClip.xy / currentClip.w) * 0.5 + 0.5) * czm_viewport.zw;
|
|
53
|
+
|
|
54
|
+
vec4 otherClip = czm_modelViewProjection * vec4(a_edgeOtherPos, 1.0);
|
|
55
|
+
vec2 otherScreen = ((otherClip.xy / otherClip.w) * 0.5 + 0.5) * czm_viewport.zw;
|
|
56
|
+
vec2 windowDir = otherScreen - currentScreen;
|
|
57
|
+
|
|
58
|
+
const float textureCoordinateBase = 8192.0;
|
|
59
|
+
if (abs(windowDir.x) > abs(windowDir.y)) {
|
|
60
|
+
v_lineCoord = textureCoordinateBase + currentScreen.x;
|
|
61
|
+
} else {
|
|
62
|
+
v_lineCoord = textureCoordinateBase + currentScreen.y;
|
|
63
|
+
}
|
|
64
|
+
#endif
|
|
65
|
+
#endif
|
|
66
|
+
|
|
67
|
+
// Expand vertex to form quad
|
|
68
|
+
vec4 posClip = gl_Position;
|
|
69
|
+
|
|
70
|
+
if (length(a_edgeOtherPos) > 0.0 && abs(a_edgeOffset) > 0.0) {
|
|
71
|
+
vec4 currentClip = posClip;
|
|
72
|
+
vec4 otherClip = czm_modelViewProjection * vec4(a_edgeOtherPos, 1.0);
|
|
73
|
+
|
|
74
|
+
vec2 currentNDC = currentClip.xy / currentClip.w;
|
|
75
|
+
vec2 otherNDC = otherClip.xy / otherClip.w;
|
|
76
|
+
|
|
77
|
+
vec2 edgeDirNDC = otherNDC - currentNDC;
|
|
78
|
+
|
|
79
|
+
// Ensure consistent edge direction
|
|
80
|
+
if (edgeDirNDC.x < 0.0 || (abs(edgeDirNDC.x) < 0.001 && edgeDirNDC.y < 0.0)) {
|
|
81
|
+
edgeDirNDC = -edgeDirNDC;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
edgeDirNDC = normalize(edgeDirNDC);
|
|
85
|
+
vec2 perpNDC = vec2(-edgeDirNDC.y, edgeDirNDC.x);
|
|
86
|
+
|
|
87
|
+
// Convert line width from pixels to clip space
|
|
88
|
+
float lineWidthPixels = u_lineWidth;
|
|
89
|
+
vec2 viewportSize = czm_viewport.zw;
|
|
90
|
+
vec2 clipPerPixel = (2.0 / viewportSize) * currentClip.w;
|
|
91
|
+
vec2 offsetClip = perpNDC * lineWidthPixels * clipPerPixel * 0.5 * a_edgeOffset;
|
|
92
|
+
|
|
93
|
+
posClip.xy += offsetClip;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
gl_Position = posClip;
|
|
97
|
+
}
|
|
98
|
+
#endif
|