@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
|
@@ -35,7 +35,7 @@ import TextureAtlas from "../Renderer/TextureAtlas.js";
|
|
|
35
35
|
import VerticalOrigin from "./VerticalOrigin.js";
|
|
36
36
|
import Ellipsoid from "../Core/Ellipsoid.js";
|
|
37
37
|
import WebGLConstants from "../Core/WebGLConstants.js";
|
|
38
|
-
import
|
|
38
|
+
import DeveloperError from "../Core/DeveloperError.js";
|
|
39
39
|
|
|
40
40
|
const SHOW_INDEX = Billboard.SHOW_INDEX;
|
|
41
41
|
const POSITION_INDEX = Billboard.POSITION_INDEX;
|
|
@@ -59,25 +59,7 @@ const SDF_INDEX = Billboard.SDF_INDEX;
|
|
|
59
59
|
const SPLIT_DIRECTION_INDEX = Billboard.SPLIT_DIRECTION_INDEX;
|
|
60
60
|
const NUMBER_OF_PROPERTIES = Billboard.NUMBER_OF_PROPERTIES;
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
const attributeLocationsBatched = {
|
|
65
|
-
positionHighAndScale: 0,
|
|
66
|
-
positionLowAndRotation: 1,
|
|
67
|
-
compressedAttribute0: 2, // pixel offset, translate, horizontal origin, vertical origin, show, direction, texture coordinates
|
|
68
|
-
compressedAttribute1: 3, // aligned axis, translucency by distance, image width
|
|
69
|
-
compressedAttribute2: 4, // image height, color, pick color, size in meters, valid aligned axis, 13 bits free
|
|
70
|
-
eyeOffset: 5, // 4 bytes free
|
|
71
|
-
scaleByDistance: 6,
|
|
72
|
-
pixelOffsetScaleByDistance: 7,
|
|
73
|
-
compressedAttribute3: 8,
|
|
74
|
-
textureCoordinateBoundsOrLabelTranslate: 9,
|
|
75
|
-
a_batchId: 10,
|
|
76
|
-
sdf: 11,
|
|
77
|
-
splitDirection: 12,
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
const attributeLocationsInstanced = {
|
|
62
|
+
const attributeLocations = {
|
|
81
63
|
direction: 0,
|
|
82
64
|
positionHighAndScale: 1,
|
|
83
65
|
positionLowAndRotation: 2, // texture offset in w
|
|
@@ -726,44 +708,7 @@ BillboardCollection.prototype.get = function (index) {
|
|
|
726
708
|
return this._billboards[index];
|
|
727
709
|
};
|
|
728
710
|
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
function getIndexBufferBatched(context) {
|
|
732
|
-
const sixteenK = 16 * 1024;
|
|
733
|
-
|
|
734
|
-
let indexBuffer = context.cache.billboardCollection_indexBufferBatched;
|
|
735
|
-
if (defined(indexBuffer)) {
|
|
736
|
-
return indexBuffer;
|
|
737
|
-
}
|
|
738
|
-
|
|
739
|
-
// Subtract 6 because the last index is reserverd for primitive restart.
|
|
740
|
-
// https://www.khronos.org/registry/webgl/specs/latest/2.0/#5.18
|
|
741
|
-
const length = sixteenK * 6 - 6;
|
|
742
|
-
const indices = new Uint16Array(length);
|
|
743
|
-
for (let i = 0, j = 0; i < length; i += 6, j += 4) {
|
|
744
|
-
indices[i] = j;
|
|
745
|
-
indices[i + 1] = j + 1;
|
|
746
|
-
indices[i + 2] = j + 2;
|
|
747
|
-
|
|
748
|
-
indices[i + 3] = j + 0;
|
|
749
|
-
indices[i + 4] = j + 2;
|
|
750
|
-
indices[i + 5] = j + 3;
|
|
751
|
-
}
|
|
752
|
-
|
|
753
|
-
// PERFORMANCE_IDEA: Should we reference count billboard collections, and eventually delete this?
|
|
754
|
-
// Is this too much memory to allocate up front? Should we dynamically grow it?
|
|
755
|
-
indexBuffer = Buffer.createIndexBuffer({
|
|
756
|
-
context: context,
|
|
757
|
-
typedArray: indices,
|
|
758
|
-
usage: BufferUsage.STATIC_DRAW,
|
|
759
|
-
indexDatatype: IndexDatatype.UNSIGNED_SHORT,
|
|
760
|
-
});
|
|
761
|
-
indexBuffer.vertexArrayDestroyable = false;
|
|
762
|
-
context.cache.billboardCollection_indexBufferBatched = indexBuffer;
|
|
763
|
-
return indexBuffer;
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
function getIndexBufferInstanced(context) {
|
|
711
|
+
function getIndexBuffer(context) {
|
|
767
712
|
let indexBuffer = context.cache.billboardCollection_indexBufferInstanced;
|
|
768
713
|
if (defined(indexBuffer)) {
|
|
769
714
|
return indexBuffer;
|
|
@@ -813,14 +758,7 @@ BillboardCollection.prototype.computeNewBuffersUsage = function () {
|
|
|
813
758
|
return usageChanged;
|
|
814
759
|
};
|
|
815
760
|
|
|
816
|
-
function createVAF(
|
|
817
|
-
context,
|
|
818
|
-
numberOfBillboards,
|
|
819
|
-
buffersUsage,
|
|
820
|
-
instanced,
|
|
821
|
-
batchTable,
|
|
822
|
-
sdf,
|
|
823
|
-
) {
|
|
761
|
+
function createVAF(context, numberOfBillboards, buffersUsage, batchTable, sdf) {
|
|
824
762
|
const attributes = [
|
|
825
763
|
{
|
|
826
764
|
index: attributeLocations.positionHighAndScale,
|
|
@@ -888,17 +826,14 @@ function createVAF(
|
|
|
888
826
|
componentDatatype: ComponentDatatype.FLOAT,
|
|
889
827
|
usage: buffersUsage[SPLIT_DIRECTION_INDEX],
|
|
890
828
|
},
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
// Instancing requires one non-instanced attribute.
|
|
894
|
-
if (instanced) {
|
|
895
|
-
attributes.push({
|
|
829
|
+
// Instancing requires one non-instanced attribute.
|
|
830
|
+
{
|
|
896
831
|
index: attributeLocations.direction,
|
|
897
832
|
componentsPerAttribute: 2,
|
|
898
833
|
componentDatatype: ComponentDatatype.FLOAT,
|
|
899
834
|
vertexBuffer: getVertexBufferInstanced(context),
|
|
900
|
-
}
|
|
901
|
-
|
|
835
|
+
},
|
|
836
|
+
];
|
|
902
837
|
|
|
903
838
|
if (defined(batchTable)) {
|
|
904
839
|
attributes.push({
|
|
@@ -918,11 +853,8 @@ function createVAF(
|
|
|
918
853
|
});
|
|
919
854
|
}
|
|
920
855
|
|
|
921
|
-
//
|
|
922
|
-
|
|
923
|
-
? numberOfBillboards
|
|
924
|
-
: 4 * numberOfBillboards;
|
|
925
|
-
return new VertexArrayFacade(context, attributes, sizeInVertices, instanced);
|
|
856
|
+
// One vertex is needed for each (instanced) billboard.
|
|
857
|
+
return new VertexArrayFacade(context, attributes, numberOfBillboards, true);
|
|
926
858
|
}
|
|
927
859
|
|
|
928
860
|
///////////////////////////////////////////////////////////////////////////
|
|
@@ -940,7 +872,6 @@ function writePositionScaleAndRotation(
|
|
|
940
872
|
vafWriters,
|
|
941
873
|
billboard,
|
|
942
874
|
) {
|
|
943
|
-
let i;
|
|
944
875
|
const positionHighWriter =
|
|
945
876
|
vafWriters[attributeLocations.positionHighAndScale];
|
|
946
877
|
const positionLowWriter =
|
|
@@ -972,22 +903,8 @@ function writePositionScaleAndRotation(
|
|
|
972
903
|
const high = writePositionScratch.high;
|
|
973
904
|
const low = writePositionScratch.low;
|
|
974
905
|
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
positionHighWriter(i, high.x, high.y, high.z, scale);
|
|
978
|
-
positionLowWriter(i, low.x, low.y, low.z, rotation);
|
|
979
|
-
} else {
|
|
980
|
-
i = billboard._index * 4;
|
|
981
|
-
positionHighWriter(i + 0, high.x, high.y, high.z, scale);
|
|
982
|
-
positionHighWriter(i + 1, high.x, high.y, high.z, scale);
|
|
983
|
-
positionHighWriter(i + 2, high.x, high.y, high.z, scale);
|
|
984
|
-
positionHighWriter(i + 3, high.x, high.y, high.z, scale);
|
|
985
|
-
|
|
986
|
-
positionLowWriter(i + 0, low.x, low.y, low.z, rotation);
|
|
987
|
-
positionLowWriter(i + 1, low.x, low.y, low.z, rotation);
|
|
988
|
-
positionLowWriter(i + 2, low.x, low.y, low.z, rotation);
|
|
989
|
-
positionLowWriter(i + 3, low.x, low.y, low.z, rotation);
|
|
990
|
-
}
|
|
906
|
+
positionHighWriter(billboard._index, high.x, high.y, high.z, scale);
|
|
907
|
+
positionLowWriter(billboard._index, low.x, low.y, low.z, rotation);
|
|
991
908
|
}
|
|
992
909
|
|
|
993
910
|
const scratchCartesian2 = new Cartesian2();
|
|
@@ -1004,11 +921,6 @@ const LEFT_SHIFT2 = 4.0;
|
|
|
1004
921
|
|
|
1005
922
|
const RIGHT_SHIFT8 = 1.0 / 256.0;
|
|
1006
923
|
|
|
1007
|
-
const LOWER_LEFT = 0.0;
|
|
1008
|
-
const LOWER_RIGHT = 2.0;
|
|
1009
|
-
const UPPER_RIGHT = 3.0;
|
|
1010
|
-
const UPPER_LEFT = 1.0;
|
|
1011
|
-
|
|
1012
924
|
const scratchBoundingRectangle = new BoundingRectangle();
|
|
1013
925
|
|
|
1014
926
|
function writeCompressedAttrib0(
|
|
@@ -1017,7 +929,6 @@ function writeCompressedAttrib0(
|
|
|
1017
929
|
vafWriters,
|
|
1018
930
|
billboard,
|
|
1019
931
|
) {
|
|
1020
|
-
let i;
|
|
1021
932
|
const writer = vafWriters[attributeLocations.compressedAttribute0];
|
|
1022
933
|
const pixelOffset = billboard.pixelOffset;
|
|
1023
934
|
const pixelOffsetX = pixelOffset.x;
|
|
@@ -1057,8 +968,6 @@ function writeCompressedAttrib0(
|
|
|
1057
968
|
|
|
1058
969
|
let bottomLeftX = 0;
|
|
1059
970
|
let bottomLeftY = 0;
|
|
1060
|
-
let width = 0;
|
|
1061
|
-
let height = 0;
|
|
1062
971
|
if (billboard.ready) {
|
|
1063
972
|
const imageRectangle = billboard.computeTextureCoordinates(
|
|
1064
973
|
scratchBoundingRectangle,
|
|
@@ -1066,11 +975,7 @@ function writeCompressedAttrib0(
|
|
|
1066
975
|
|
|
1067
976
|
bottomLeftX = imageRectangle.x;
|
|
1068
977
|
bottomLeftY = imageRectangle.y;
|
|
1069
|
-
width = imageRectangle.width;
|
|
1070
|
-
height = imageRectangle.height;
|
|
1071
978
|
}
|
|
1072
|
-
const topRightX = bottomLeftX + width;
|
|
1073
|
-
const topRightY = bottomLeftY + height;
|
|
1074
979
|
|
|
1075
980
|
let compressed0 =
|
|
1076
981
|
Math.floor(
|
|
@@ -1111,50 +1016,14 @@ function writeCompressedAttrib0(
|
|
|
1111
1016
|
scratchCartesian2.y = bottomLeftY;
|
|
1112
1017
|
const compressedTexCoordsLL =
|
|
1113
1018
|
AttributeCompression.compressTextureCoordinates(scratchCartesian2);
|
|
1114
|
-
scratchCartesian2.x = topRightX;
|
|
1115
|
-
const compressedTexCoordsLR =
|
|
1116
|
-
AttributeCompression.compressTextureCoordinates(scratchCartesian2);
|
|
1117
|
-
scratchCartesian2.y = topRightY;
|
|
1118
|
-
const compressedTexCoordsUR =
|
|
1119
|
-
AttributeCompression.compressTextureCoordinates(scratchCartesian2);
|
|
1120
|
-
scratchCartesian2.x = bottomLeftX;
|
|
1121
|
-
const compressedTexCoordsUL =
|
|
1122
|
-
AttributeCompression.compressTextureCoordinates(scratchCartesian2);
|
|
1123
1019
|
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
compressed0 + LOWER_LEFT,
|
|
1132
|
-
compressed1,
|
|
1133
|
-
compressed2,
|
|
1134
|
-
compressedTexCoordsLL,
|
|
1135
|
-
);
|
|
1136
|
-
writer(
|
|
1137
|
-
i + 1,
|
|
1138
|
-
compressed0 + LOWER_RIGHT,
|
|
1139
|
-
compressed1,
|
|
1140
|
-
compressed2,
|
|
1141
|
-
compressedTexCoordsLR,
|
|
1142
|
-
);
|
|
1143
|
-
writer(
|
|
1144
|
-
i + 2,
|
|
1145
|
-
compressed0 + UPPER_RIGHT,
|
|
1146
|
-
compressed1,
|
|
1147
|
-
compressed2,
|
|
1148
|
-
compressedTexCoordsUR,
|
|
1149
|
-
);
|
|
1150
|
-
writer(
|
|
1151
|
-
i + 3,
|
|
1152
|
-
compressed0 + UPPER_LEFT,
|
|
1153
|
-
compressed1,
|
|
1154
|
-
compressed2,
|
|
1155
|
-
compressedTexCoordsUL,
|
|
1156
|
-
);
|
|
1157
|
-
}
|
|
1020
|
+
writer(
|
|
1021
|
+
billboard._index,
|
|
1022
|
+
compressed0,
|
|
1023
|
+
compressed1,
|
|
1024
|
+
compressed2,
|
|
1025
|
+
compressedTexCoordsLL,
|
|
1026
|
+
);
|
|
1158
1027
|
}
|
|
1159
1028
|
|
|
1160
1029
|
function writeCompressedAttrib1(
|
|
@@ -1163,7 +1032,6 @@ function writeCompressedAttrib1(
|
|
|
1163
1032
|
vafWriters,
|
|
1164
1033
|
billboard,
|
|
1165
1034
|
) {
|
|
1166
|
-
let i;
|
|
1167
1035
|
const writer = vafWriters[attributeLocations.compressedAttribute1];
|
|
1168
1036
|
const alignedAxis = billboard.alignedAxis;
|
|
1169
1037
|
if (!Cartesian3.equals(alignedAxis, Cartesian3.ZERO)) {
|
|
@@ -1213,16 +1081,7 @@ function writeCompressedAttrib1(
|
|
|
1213
1081
|
farValue = farValue === 1.0 ? 255.0 : (farValue * 255.0) | 0;
|
|
1214
1082
|
compressed1 = compressed1 * LEFT_SHIFT8 + farValue;
|
|
1215
1083
|
|
|
1216
|
-
|
|
1217
|
-
i = billboard._index;
|
|
1218
|
-
writer(i, compressed0, compressed1, near, far);
|
|
1219
|
-
} else {
|
|
1220
|
-
i = billboard._index * 4;
|
|
1221
|
-
writer(i + 0, compressed0, compressed1, near, far);
|
|
1222
|
-
writer(i + 1, compressed0, compressed1, near, far);
|
|
1223
|
-
writer(i + 2, compressed0, compressed1, near, far);
|
|
1224
|
-
writer(i + 3, compressed0, compressed1, near, far);
|
|
1225
|
-
}
|
|
1084
|
+
writer(billboard._index, compressed0, compressed1, near, far);
|
|
1226
1085
|
}
|
|
1227
1086
|
|
|
1228
1087
|
function writeCompressedAttrib2(
|
|
@@ -1231,7 +1090,6 @@ function writeCompressedAttrib2(
|
|
|
1231
1090
|
vafWriters,
|
|
1232
1091
|
billboard,
|
|
1233
1092
|
) {
|
|
1234
|
-
let i;
|
|
1235
1093
|
const writer = vafWriters[attributeLocations.compressedAttribute2];
|
|
1236
1094
|
const color = billboard.color;
|
|
1237
1095
|
const pickColor = !defined(billboardCollection._batchTable)
|
|
@@ -1263,16 +1121,7 @@ function writeCompressedAttrib2(
|
|
|
1263
1121
|
(sizeInMeters * 2.0 + validAlignedAxis);
|
|
1264
1122
|
const compressed3 = imageHeight * LEFT_SHIFT2 + labelHorizontalOrigin;
|
|
1265
1123
|
|
|
1266
|
-
|
|
1267
|
-
i = billboard._index;
|
|
1268
|
-
writer(i, compressed0, compressed1, compressed2, compressed3);
|
|
1269
|
-
} else {
|
|
1270
|
-
i = billboard._index * 4;
|
|
1271
|
-
writer(i + 0, compressed0, compressed1, compressed2, compressed3);
|
|
1272
|
-
writer(i + 1, compressed0, compressed1, compressed2, compressed3);
|
|
1273
|
-
writer(i + 2, compressed0, compressed1, compressed2, compressed3);
|
|
1274
|
-
writer(i + 3, compressed0, compressed1, compressed2, compressed3);
|
|
1275
|
-
}
|
|
1124
|
+
writer(billboard._index, compressed0, compressed1, compressed2, compressed3);
|
|
1276
1125
|
}
|
|
1277
1126
|
|
|
1278
1127
|
function writeEyeOffset(
|
|
@@ -1281,7 +1130,6 @@ function writeEyeOffset(
|
|
|
1281
1130
|
vafWriters,
|
|
1282
1131
|
billboard,
|
|
1283
1132
|
) {
|
|
1284
|
-
let i;
|
|
1285
1133
|
const writer = vafWriters[attributeLocations.eyeOffset];
|
|
1286
1134
|
const eyeOffset = billboard.eyeOffset;
|
|
1287
1135
|
|
|
@@ -1297,31 +1145,28 @@ function writeEyeOffset(
|
|
|
1297
1145
|
Math.abs(eyeOffsetZ),
|
|
1298
1146
|
);
|
|
1299
1147
|
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
scratchCartesian2.y = 0;
|
|
1148
|
+
scratchCartesian2.x = 0;
|
|
1149
|
+
scratchCartesian2.y = 0;
|
|
1303
1150
|
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1151
|
+
if (billboard.ready) {
|
|
1152
|
+
const imageRectangle = billboard.computeTextureCoordinates(
|
|
1153
|
+
scratchBoundingRectangle,
|
|
1154
|
+
);
|
|
1308
1155
|
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1156
|
+
scratchCartesian2.x = imageRectangle.width;
|
|
1157
|
+
scratchCartesian2.y = imageRectangle.height;
|
|
1158
|
+
}
|
|
1312
1159
|
|
|
1313
|
-
|
|
1314
|
-
|
|
1160
|
+
const compressedTexCoordsRange =
|
|
1161
|
+
AttributeCompression.compressTextureCoordinates(scratchCartesian2);
|
|
1315
1162
|
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
writer(i + 3, eyeOffset.x, eyeOffset.y, eyeOffsetZ, 0.0);
|
|
1324
|
-
}
|
|
1163
|
+
writer(
|
|
1164
|
+
billboard._index,
|
|
1165
|
+
eyeOffset.x,
|
|
1166
|
+
eyeOffset.y,
|
|
1167
|
+
eyeOffsetZ,
|
|
1168
|
+
compressedTexCoordsRange,
|
|
1169
|
+
);
|
|
1325
1170
|
}
|
|
1326
1171
|
|
|
1327
1172
|
function writeScaleByDistance(
|
|
@@ -1330,7 +1175,6 @@ function writeScaleByDistance(
|
|
|
1330
1175
|
vafWriters,
|
|
1331
1176
|
billboard,
|
|
1332
1177
|
) {
|
|
1333
|
-
let i;
|
|
1334
1178
|
const writer = vafWriters[attributeLocations.scaleByDistance];
|
|
1335
1179
|
let near = 0.0;
|
|
1336
1180
|
let nearValue = 1.0;
|
|
@@ -1351,16 +1195,7 @@ function writeScaleByDistance(
|
|
|
1351
1195
|
}
|
|
1352
1196
|
}
|
|
1353
1197
|
|
|
1354
|
-
|
|
1355
|
-
i = billboard._index;
|
|
1356
|
-
writer(i, near, nearValue, far, farValue);
|
|
1357
|
-
} else {
|
|
1358
|
-
i = billboard._index * 4;
|
|
1359
|
-
writer(i + 0, near, nearValue, far, farValue);
|
|
1360
|
-
writer(i + 1, near, nearValue, far, farValue);
|
|
1361
|
-
writer(i + 2, near, nearValue, far, farValue);
|
|
1362
|
-
writer(i + 3, near, nearValue, far, farValue);
|
|
1363
|
-
}
|
|
1198
|
+
writer(billboard._index, near, nearValue, far, farValue);
|
|
1364
1199
|
}
|
|
1365
1200
|
|
|
1366
1201
|
function writePixelOffsetScaleByDistance(
|
|
@@ -1369,7 +1204,6 @@ function writePixelOffsetScaleByDistance(
|
|
|
1369
1204
|
vafWriters,
|
|
1370
1205
|
billboard,
|
|
1371
1206
|
) {
|
|
1372
|
-
let i;
|
|
1373
1207
|
const writer = vafWriters[attributeLocations.pixelOffsetScaleByDistance];
|
|
1374
1208
|
let near = 0.0;
|
|
1375
1209
|
let nearValue = 1.0;
|
|
@@ -1390,16 +1224,7 @@ function writePixelOffsetScaleByDistance(
|
|
|
1390
1224
|
}
|
|
1391
1225
|
}
|
|
1392
1226
|
|
|
1393
|
-
|
|
1394
|
-
i = billboard._index;
|
|
1395
|
-
writer(i, near, nearValue, far, farValue);
|
|
1396
|
-
} else {
|
|
1397
|
-
i = billboard._index * 4;
|
|
1398
|
-
writer(i + 0, near, nearValue, far, farValue);
|
|
1399
|
-
writer(i + 1, near, nearValue, far, farValue);
|
|
1400
|
-
writer(i + 2, near, nearValue, far, farValue);
|
|
1401
|
-
writer(i + 3, near, nearValue, far, farValue);
|
|
1402
|
-
}
|
|
1227
|
+
writer(billboard._index, near, nearValue, far, farValue);
|
|
1403
1228
|
}
|
|
1404
1229
|
|
|
1405
1230
|
function writeCompressedAttribute3(
|
|
@@ -1408,7 +1233,6 @@ function writeCompressedAttribute3(
|
|
|
1408
1233
|
vafWriters,
|
|
1409
1234
|
billboard,
|
|
1410
1235
|
) {
|
|
1411
|
-
let i;
|
|
1412
1236
|
const writer = vafWriters[attributeLocations.compressedAttribute3];
|
|
1413
1237
|
let near = 0.0;
|
|
1414
1238
|
let far = Number.MAX_VALUE;
|
|
@@ -1452,16 +1276,7 @@ function writeCompressedAttribute3(
|
|
|
1452
1276
|
const h = Math.floor(CesiumMath.clamp(imageHeight, 0.0, LEFT_SHIFT12));
|
|
1453
1277
|
const dimensions = w * LEFT_SHIFT12 + h;
|
|
1454
1278
|
|
|
1455
|
-
|
|
1456
|
-
i = billboard._index;
|
|
1457
|
-
writer(i, near, far, disableDepthTestDistance, dimensions);
|
|
1458
|
-
} else {
|
|
1459
|
-
i = billboard._index * 4;
|
|
1460
|
-
writer(i + 0, near, far, disableDepthTestDistance, dimensions);
|
|
1461
|
-
writer(i + 1, near, far, disableDepthTestDistance, dimensions);
|
|
1462
|
-
writer(i + 2, near, far, disableDepthTestDistance, dimensions);
|
|
1463
|
-
writer(i + 3, near, far, disableDepthTestDistance, dimensions);
|
|
1464
|
-
}
|
|
1279
|
+
writer(billboard._index, near, far, disableDepthTestDistance, dimensions);
|
|
1465
1280
|
}
|
|
1466
1281
|
|
|
1467
1282
|
function writeTextureCoordinateBoundsOrLabelTranslate(
|
|
@@ -1481,59 +1296,18 @@ function writeTextureCoordinateBoundsOrLabelTranslate(
|
|
|
1481
1296
|
billboardCollection._shaderClampToGround =
|
|
1482
1297
|
context.depthTexture && !globeTranslucent && depthTestAgainstTerrain;
|
|
1483
1298
|
}
|
|
1484
|
-
let i;
|
|
1485
1299
|
const writer =
|
|
1486
1300
|
vafWriters[attributeLocations.textureCoordinateBoundsOrLabelTranslate];
|
|
1487
1301
|
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
translateY = billboard._labelTranslate.y;
|
|
1495
|
-
}
|
|
1496
|
-
if (billboardCollection._instanced) {
|
|
1497
|
-
i = billboard._index;
|
|
1498
|
-
writer(i, translateX, translateY, 0.0, 0.0);
|
|
1499
|
-
} else {
|
|
1500
|
-
i = billboard._index * 4;
|
|
1501
|
-
writer(i + 0, translateX, translateY, 0.0, 0.0);
|
|
1502
|
-
writer(i + 1, translateX, translateY, 0.0, 0.0);
|
|
1503
|
-
writer(i + 2, translateX, translateY, 0.0, 0.0);
|
|
1504
|
-
writer(i + 3, translateX, translateY, 0.0, 0.0);
|
|
1505
|
-
}
|
|
1506
|
-
return;
|
|
1507
|
-
}
|
|
1508
|
-
|
|
1509
|
-
// Write texture coordinate bounds, used by depth testing in fragment shader
|
|
1510
|
-
let minX = 0;
|
|
1511
|
-
let minY = 0;
|
|
1512
|
-
let width = 0;
|
|
1513
|
-
let height = 0;
|
|
1514
|
-
if (billboard.ready) {
|
|
1515
|
-
const imageRectangle = billboard.computeTextureCoordinates(
|
|
1516
|
-
scratchBoundingRectangle,
|
|
1517
|
-
);
|
|
1518
|
-
|
|
1519
|
-
minX = imageRectangle.x;
|
|
1520
|
-
minY = imageRectangle.y;
|
|
1521
|
-
width = imageRectangle.width;
|
|
1522
|
-
height = imageRectangle.height;
|
|
1302
|
+
//write _labelTranslate, used by depth testing in the vertex shader
|
|
1303
|
+
let translateX = 0;
|
|
1304
|
+
let translateY = 0;
|
|
1305
|
+
if (defined(billboard._labelTranslate)) {
|
|
1306
|
+
translateX = billboard._labelTranslate.x;
|
|
1307
|
+
translateY = billboard._labelTranslate.y;
|
|
1523
1308
|
}
|
|
1524
|
-
const maxX = minX + width;
|
|
1525
|
-
const maxY = minY + height;
|
|
1526
1309
|
|
|
1527
|
-
|
|
1528
|
-
i = billboard._index;
|
|
1529
|
-
writer(i, minX, minY, maxX, maxY);
|
|
1530
|
-
} else {
|
|
1531
|
-
i = billboard._index * 4;
|
|
1532
|
-
writer(i + 0, minX, minY, maxX, maxY);
|
|
1533
|
-
writer(i + 1, minX, minY, maxX, maxY);
|
|
1534
|
-
writer(i + 2, minX, minY, maxX, maxY);
|
|
1535
|
-
writer(i + 3, minX, minY, maxX, maxY);
|
|
1536
|
-
}
|
|
1310
|
+
writer(billboard._index, translateX, translateY, 0.0, 0.0);
|
|
1537
1311
|
}
|
|
1538
1312
|
|
|
1539
1313
|
function writeBatchId(billboardCollection, frameState, vafWriters, billboard) {
|
|
@@ -1544,17 +1318,7 @@ function writeBatchId(billboardCollection, frameState, vafWriters, billboard) {
|
|
|
1544
1318
|
const writer = vafWriters[attributeLocations.a_batchId];
|
|
1545
1319
|
const id = billboard._batchIndex;
|
|
1546
1320
|
|
|
1547
|
-
|
|
1548
|
-
if (billboardCollection._instanced) {
|
|
1549
|
-
i = billboard._index;
|
|
1550
|
-
writer(i, id);
|
|
1551
|
-
} else {
|
|
1552
|
-
i = billboard._index * 4;
|
|
1553
|
-
writer(i + 0, id);
|
|
1554
|
-
writer(i + 1, id);
|
|
1555
|
-
writer(i + 2, id);
|
|
1556
|
-
writer(i + 3, id);
|
|
1557
|
-
}
|
|
1321
|
+
writer(billboard._index, id);
|
|
1558
1322
|
}
|
|
1559
1323
|
|
|
1560
1324
|
function writeSDF(billboardCollection, frameState, vafWriters, billboard) {
|
|
@@ -1562,7 +1326,6 @@ function writeSDF(billboardCollection, frameState, vafWriters, billboard) {
|
|
|
1562
1326
|
return;
|
|
1563
1327
|
}
|
|
1564
1328
|
|
|
1565
|
-
let i;
|
|
1566
1329
|
const writer = vafWriters[attributeLocations.sdf];
|
|
1567
1330
|
|
|
1568
1331
|
const outlineColor = billboard.outlineColor;
|
|
@@ -1576,16 +1339,7 @@ function writeSDF(billboardCollection, frameState, vafWriters, billboard) {
|
|
|
1576
1339
|
Color.floatToByte(outlineColor.alpha) * LEFT_SHIFT16 +
|
|
1577
1340
|
Color.floatToByte(outlineDistance) * LEFT_SHIFT8;
|
|
1578
1341
|
|
|
1579
|
-
|
|
1580
|
-
i = billboard._index;
|
|
1581
|
-
writer(i, compressed0, compressed1);
|
|
1582
|
-
} else {
|
|
1583
|
-
i = billboard._index * 4;
|
|
1584
|
-
writer(i + 0, compressed0 + LOWER_LEFT, compressed1);
|
|
1585
|
-
writer(i + 1, compressed0 + LOWER_RIGHT, compressed1);
|
|
1586
|
-
writer(i + 2, compressed0 + UPPER_RIGHT, compressed1);
|
|
1587
|
-
writer(i + 3, compressed0 + UPPER_LEFT, compressed1);
|
|
1588
|
-
}
|
|
1342
|
+
writer(billboard._index, compressed0, compressed1);
|
|
1589
1343
|
}
|
|
1590
1344
|
|
|
1591
1345
|
function writeSplitDirection(
|
|
@@ -1602,17 +1356,7 @@ function writeSplitDirection(
|
|
|
1602
1356
|
direction = split;
|
|
1603
1357
|
}
|
|
1604
1358
|
|
|
1605
|
-
|
|
1606
|
-
if (billboardCollection._instanced) {
|
|
1607
|
-
i = billboard._index;
|
|
1608
|
-
writer(i, direction);
|
|
1609
|
-
} else {
|
|
1610
|
-
i = billboard._index * 4;
|
|
1611
|
-
writer(i + 0, direction);
|
|
1612
|
-
writer(i + 1, direction);
|
|
1613
|
-
writer(i + 2, direction);
|
|
1614
|
-
writer(i + 3, direction);
|
|
1615
|
-
}
|
|
1359
|
+
writer(billboard._index, direction);
|
|
1616
1360
|
}
|
|
1617
1361
|
|
|
1618
1362
|
function writeBillboard(
|
|
@@ -1829,22 +1573,13 @@ BillboardCollection.prototype.update = function (frameState) {
|
|
|
1829
1573
|
!context.instancedArrays ||
|
|
1830
1574
|
!(ContextLimits.maximumVertexTextureImageUnits > 0)
|
|
1831
1575
|
) {
|
|
1832
|
-
|
|
1833
|
-
"
|
|
1834
|
-
"Beginning in CesiumJS 1.140, billboards and labels will require device support for WebGL 2, " +
|
|
1576
|
+
throw new DeveloperError(
|
|
1577
|
+
"Beginning in CesiumJS 1.140, billboards and labels require device support for WebGL 2, " +
|
|
1835
1578
|
"or WebGL 1 with ANGLE_instanced_arrays and MAX_VERTEX_TEXTURE_IMAGE_UNITS > 0. For more " +
|
|
1836
1579
|
"information or to share feedback, see: https://github.com/CesiumGS/cesium/issues/13053",
|
|
1837
1580
|
);
|
|
1838
1581
|
}
|
|
1839
1582
|
|
|
1840
|
-
this._instanced = context.instancedArrays;
|
|
1841
|
-
attributeLocations = this._instanced
|
|
1842
|
-
? attributeLocationsInstanced
|
|
1843
|
-
: attributeLocationsBatched;
|
|
1844
|
-
getIndexBuffer = this._instanced
|
|
1845
|
-
? getIndexBufferInstanced
|
|
1846
|
-
: getIndexBufferBatched;
|
|
1847
|
-
|
|
1848
1583
|
let billboards = this._billboards;
|
|
1849
1584
|
let billboardsLength = billboards.length;
|
|
1850
1585
|
let allBillboardsReady = true;
|
|
@@ -1916,7 +1651,6 @@ BillboardCollection.prototype.update = function (frameState) {
|
|
|
1916
1651
|
context,
|
|
1917
1652
|
billboardsLength,
|
|
1918
1653
|
this._buffersUsage,
|
|
1919
|
-
this._instanced,
|
|
1920
1654
|
this._batchTable,
|
|
1921
1655
|
this._sdf,
|
|
1922
1656
|
);
|
|
@@ -1956,9 +1690,7 @@ BillboardCollection.prototype.update = function (frameState) {
|
|
|
1956
1690
|
properties[SHOW_INDEX]
|
|
1957
1691
|
) {
|
|
1958
1692
|
writers.push(writeCompressedAttrib0);
|
|
1959
|
-
|
|
1960
|
-
writers.push(writeEyeOffset);
|
|
1961
|
-
}
|
|
1693
|
+
writers.push(writeEyeOffset);
|
|
1962
1694
|
}
|
|
1963
1695
|
|
|
1964
1696
|
if (
|
|
@@ -2035,11 +1767,7 @@ BillboardCollection.prototype.update = function (frameState) {
|
|
|
2035
1767
|
writers[o](this, frameState, vafWriters, bb);
|
|
2036
1768
|
}
|
|
2037
1769
|
|
|
2038
|
-
|
|
2039
|
-
this._vaf.subCommit(bb._index, 1);
|
|
2040
|
-
} else {
|
|
2041
|
-
this._vaf.subCommit(bb._index * 4, 4);
|
|
2042
|
-
}
|
|
1770
|
+
this._vaf.subCommit(bb._index, 1);
|
|
2043
1771
|
}
|
|
2044
1772
|
this._vaf.endSubCommits();
|
|
2045
1773
|
}
|
|
@@ -2137,9 +1865,6 @@ BillboardCollection.prototype.update = function (frameState) {
|
|
|
2137
1865
|
let fs;
|
|
2138
1866
|
let vertDefines;
|
|
2139
1867
|
|
|
2140
|
-
const supportVSTextureReads =
|
|
2141
|
-
ContextLimits.maximumVertexTextureImageUnits > 0;
|
|
2142
|
-
|
|
2143
1868
|
if (
|
|
2144
1869
|
blendOptionChanged ||
|
|
2145
1870
|
this._shaderRotation !== this._compiledShaderRotation ||
|
|
@@ -2159,7 +1884,7 @@ BillboardCollection.prototype.update = function (frameState) {
|
|
|
2159
1884
|
vsSource = BillboardCollectionVS;
|
|
2160
1885
|
fsSource = BillboardCollectionFS;
|
|
2161
1886
|
|
|
2162
|
-
vertDefines = [];
|
|
1887
|
+
vertDefines = ["INSTANCED"];
|
|
2163
1888
|
if (defined(this._batchTable)) {
|
|
2164
1889
|
vertDefines.push("VECTOR_TILE");
|
|
2165
1890
|
vsSource = this._batchTable.getVertexShaderCallback(
|
|
@@ -2177,9 +1902,7 @@ BillboardCollection.prototype.update = function (frameState) {
|
|
|
2177
1902
|
defines: vertDefines,
|
|
2178
1903
|
sources: [vsSource],
|
|
2179
1904
|
});
|
|
2180
|
-
|
|
2181
|
-
vs.defines.push("INSTANCED");
|
|
2182
|
-
}
|
|
1905
|
+
|
|
2183
1906
|
if (this._shaderRotation) {
|
|
2184
1907
|
vs.defines.push("ROTATION");
|
|
2185
1908
|
}
|
|
@@ -2202,11 +1925,7 @@ BillboardCollection.prototype.update = function (frameState) {
|
|
|
2202
1925
|
vs.defines.push("DISABLE_DEPTH_DISTANCE");
|
|
2203
1926
|
}
|
|
2204
1927
|
if (this._shaderClampToGround) {
|
|
2205
|
-
|
|
2206
|
-
vs.defines.push("VS_THREE_POINT_DEPTH_CHECK");
|
|
2207
|
-
} else {
|
|
2208
|
-
vs.defines.push("FS_THREE_POINT_DEPTH_CHECK");
|
|
2209
|
-
}
|
|
1928
|
+
vs.defines.push("VS_THREE_POINT_DEPTH_CHECK");
|
|
2210
1929
|
}
|
|
2211
1930
|
|
|
2212
1931
|
const sdfEdge = 1.0 - SDFSettings.CUTOFF;
|
|
@@ -2223,11 +1942,7 @@ BillboardCollection.prototype.update = function (frameState) {
|
|
|
2223
1942
|
sources: [fsSource],
|
|
2224
1943
|
});
|
|
2225
1944
|
if (this._shaderClampToGround) {
|
|
2226
|
-
|
|
2227
|
-
fs.defines.push("VS_THREE_POINT_DEPTH_CHECK");
|
|
2228
|
-
} else {
|
|
2229
|
-
fs.defines.push("FS_THREE_POINT_DEPTH_CHECK");
|
|
2230
|
-
}
|
|
1945
|
+
fs.defines.push("VS_THREE_POINT_DEPTH_CHECK");
|
|
2231
1946
|
}
|
|
2232
1947
|
|
|
2233
1948
|
if (this._sdf) {
|
|
@@ -2248,11 +1963,7 @@ BillboardCollection.prototype.update = function (frameState) {
|
|
|
2248
1963
|
sources: [fsSource],
|
|
2249
1964
|
});
|
|
2250
1965
|
if (this._shaderClampToGround) {
|
|
2251
|
-
|
|
2252
|
-
fs.defines.push("VS_THREE_POINT_DEPTH_CHECK");
|
|
2253
|
-
} else {
|
|
2254
|
-
fs.defines.push("FS_THREE_POINT_DEPTH_CHECK");
|
|
2255
|
-
}
|
|
1966
|
+
fs.defines.push("VS_THREE_POINT_DEPTH_CHECK");
|
|
2256
1967
|
}
|
|
2257
1968
|
if (this._sdf) {
|
|
2258
1969
|
fs.defines.push("SDF");
|
|
@@ -2273,11 +1984,7 @@ BillboardCollection.prototype.update = function (frameState) {
|
|
|
2273
1984
|
sources: [fsSource],
|
|
2274
1985
|
});
|
|
2275
1986
|
if (this._shaderClampToGround) {
|
|
2276
|
-
|
|
2277
|
-
fs.defines.push("VS_THREE_POINT_DEPTH_CHECK");
|
|
2278
|
-
} else {
|
|
2279
|
-
fs.defines.push("FS_THREE_POINT_DEPTH_CHECK");
|
|
2280
|
-
}
|
|
1987
|
+
fs.defines.push("VS_THREE_POINT_DEPTH_CHECK");
|
|
2281
1988
|
}
|
|
2282
1989
|
if (this._sdf) {
|
|
2283
1990
|
fs.defines.push("SDF");
|
|
@@ -2298,11 +2005,7 @@ BillboardCollection.prototype.update = function (frameState) {
|
|
|
2298
2005
|
sources: [fsSource],
|
|
2299
2006
|
});
|
|
2300
2007
|
if (this._shaderClampToGround) {
|
|
2301
|
-
|
|
2302
|
-
fs.defines.push("VS_THREE_POINT_DEPTH_CHECK");
|
|
2303
|
-
} else {
|
|
2304
|
-
fs.defines.push("FS_THREE_POINT_DEPTH_CHECK");
|
|
2305
|
-
}
|
|
2008
|
+
fs.defines.push("VS_THREE_POINT_DEPTH_CHECK");
|
|
2306
2009
|
}
|
|
2307
2010
|
if (this._sdf) {
|
|
2308
2011
|
fs.defines.push("SDF");
|
|
@@ -2379,10 +2082,8 @@ BillboardCollection.prototype.update = function (frameState) {
|
|
|
2379
2082
|
command.debugShowBoundingVolume = this.debugShowBoundingVolume;
|
|
2380
2083
|
command.pickId = pickId;
|
|
2381
2084
|
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
command.instanceCount = billboardsLength;
|
|
2385
|
-
}
|
|
2085
|
+
command.count = 6;
|
|
2086
|
+
command.instanceCount = billboardsLength;
|
|
2386
2087
|
|
|
2387
2088
|
commandList.push(command);
|
|
2388
2089
|
}
|