@cesium/engine 1.0.0 → 2.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/{AttributeCompression-4589338a.js → AttributeCompression-b646d393.js} +1 -1
- package/Build/Workers/{AxisAlignedBoundingBox-bfb1234f.js → AxisAlignedBoundingBox-47525601.js} +1 -1
- package/Build/Workers/{BoundingRectangle-7ffc2153.js → BoundingRectangle-93b263ac.js} +1 -1
- package/Build/Workers/{BoxGeometry-93f344a3.js → BoxGeometry-8c4b4125.js} +1 -1
- package/Build/Workers/{Color-0c5aaf47.js → Color-52c60ed7.js} +1 -1
- package/Build/Workers/{CoplanarPolygonGeometryLibrary-6597982a.js → CoplanarPolygonGeometryLibrary-33c4c1f8.js} +1 -1
- package/Build/Workers/{CorridorGeometryLibrary-2119580e.js → CorridorGeometryLibrary-5039cd8e.js} +1 -1
- package/Build/Workers/{CylinderGeometry-f9503c6d.js → CylinderGeometry-3ac44974.js} +1 -1
- package/Build/Workers/{EllipseGeometry-fedf72d5.js → EllipseGeometry-a9c9b3be.js} +1 -1
- package/Build/Workers/{EllipseGeometryLibrary-4ea68687.js → EllipseGeometryLibrary-855d4681.js} +1 -1
- package/Build/Workers/{EllipseOutlineGeometry-e2ae6a35.js → EllipseOutlineGeometry-017a5929.js} +1 -1
- package/Build/Workers/{EllipsoidGeodesic-16de63ea.js → EllipsoidGeodesic-98c62a56.js} +1 -1
- package/Build/Workers/{EllipsoidGeometry-95c0330e.js → EllipsoidGeometry-826e7bce.js} +1 -1
- package/Build/Workers/{EllipsoidOutlineGeometry-d6d2ceec.js → EllipsoidOutlineGeometry-784dcdb5.js} +1 -1
- package/Build/Workers/{EllipsoidRhumbLine-ae5e65e0.js → EllipsoidRhumbLine-19756602.js} +1 -1
- package/Build/Workers/{EllipsoidTangentPlane-bfc674bf.js → EllipsoidTangentPlane-ed9443a1.js} +1 -1
- package/Build/Workers/{EncodedCartesian3-f473ea18.js → EncodedCartesian3-81f70735.js} +1 -1
- package/Build/Workers/{FrustumGeometry-3bf2e4eb.js → FrustumGeometry-9f1ee4d8.js} +1 -1
- package/Build/Workers/{GeometryAttribute-df5f473e.js → GeometryAttribute-334718f8.js} +1 -1
- package/Build/Workers/{GeometryInstance-aa75b4cf.js → GeometryInstance-451dc1cd.js} +1 -1
- package/Build/Workers/{GeometryPipeline-f0e46c42.js → GeometryPipeline-8fb0db69.js} +1 -1
- package/Build/Workers/{IntersectionTests-9de29d51.js → IntersectionTests-27d49265.js} +1 -1
- package/Build/Workers/{Matrix2-ce637455.js → Matrix2-13178034.js} +4 -2
- package/Build/Workers/{Matrix3-4f4df527.js → Matrix3-315394f6.js} +2 -1
- package/Build/Workers/{OrientedBoundingBox-d3ff3d4d.js → OrientedBoundingBox-79ee7cbb.js} +5 -5
- package/Build/Workers/{Plane-b81241c2.js → Plane-900aa728.js} +1 -1
- package/Build/Workers/{PolygonGeometryLibrary-6f4937bb.js → PolygonGeometryLibrary-6b5a29e9.js} +1 -1
- package/Build/Workers/PolygonPipeline-21668b3f.js +1345 -0
- package/Build/Workers/{PolylinePipeline-2e2b015c.js → PolylinePipeline-5e2e1b21.js} +1 -1
- package/Build/Workers/{PolylineVolumeGeometryLibrary-7ee1d449.js → PolylineVolumeGeometryLibrary-97f0b94e.js} +1 -1
- package/Build/Workers/{PrimitivePipeline-a9b7aae0.js → PrimitivePipeline-5640850a.js} +1 -1
- package/Build/Workers/{RectangleGeometryLibrary-9aa6c8f6.js → RectangleGeometryLibrary-d5457f7b.js} +1 -1
- package/Build/Workers/{TerrainEncoding-b52dcfc5.js → TerrainEncoding-bfdf2021.js} +1 -1
- package/Build/Workers/{Transforms-2f755df8.js → Transforms-a05e5e6e.js} +114 -83
- package/Build/Workers/{WallGeometryLibrary-ab19a93d.js → WallGeometryLibrary-6db0ebb6.js} +1 -1
- package/Build/Workers/{WebMercatorProjection-9f25de49.js → WebMercatorProjection-13a90d41.js} +1 -1
- package/Build/Workers/cesiumWorkerBootstrapper.js +92 -2
- package/Build/Workers/combineGeometry.js +1 -1
- package/Build/Workers/createBoxGeometry.js +1 -1
- package/Build/Workers/createBoxOutlineGeometry.js +1 -1
- package/Build/Workers/createCircleGeometry.js +1 -1
- package/Build/Workers/createCircleOutlineGeometry.js +1 -1
- package/Build/Workers/createCoplanarPolygonGeometry.js +1 -1
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +1 -1
- package/Build/Workers/createCorridorGeometry.js +1 -1
- package/Build/Workers/createCorridorOutlineGeometry.js +1 -1
- package/Build/Workers/createCylinderGeometry.js +1 -1
- package/Build/Workers/createCylinderOutlineGeometry.js +1 -1
- package/Build/Workers/createEllipseGeometry.js +1 -1
- package/Build/Workers/createEllipseOutlineGeometry.js +1 -1
- package/Build/Workers/createEllipsoidGeometry.js +1 -1
- package/Build/Workers/createEllipsoidOutlineGeometry.js +1 -1
- package/Build/Workers/createFrustumGeometry.js +1 -1
- package/Build/Workers/createFrustumOutlineGeometry.js +1 -1
- package/Build/Workers/createGeometry.js +1 -1
- package/Build/Workers/createGroundPolylineGeometry.js +1 -1
- package/Build/Workers/createPlaneGeometry.js +1 -1
- package/Build/Workers/createPlaneOutlineGeometry.js +1 -1
- package/Build/Workers/createPolygonGeometry.js +1 -1
- package/Build/Workers/createPolygonOutlineGeometry.js +1 -1
- package/Build/Workers/createPolylineGeometry.js +1 -1
- package/Build/Workers/createPolylineVolumeGeometry.js +1 -1
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +1 -1
- package/Build/Workers/createRectangleGeometry.js +1 -1
- package/Build/Workers/createRectangleOutlineGeometry.js +1 -1
- package/Build/Workers/createSimplePolylineGeometry.js +1 -1
- package/Build/Workers/createSphereGeometry.js +1 -1
- package/Build/Workers/createSphereOutlineGeometry.js +1 -1
- package/Build/Workers/createVectorTileClampedPolylines.js +1 -1
- package/Build/Workers/createVectorTileGeometries.js +1 -1
- package/Build/Workers/createVectorTilePoints.js +1 -1
- package/Build/Workers/createVectorTilePolygons.js +1 -1
- package/Build/Workers/createVectorTilePolylines.js +1 -1
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +1 -1
- package/Build/Workers/createVerticesFromHeightmap.js +7 -3
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +1 -1
- package/Build/Workers/createWallGeometry.js +1 -1
- package/Build/Workers/createWallOutlineGeometry.js +1 -1
- package/Build/Workers/decodeDraco.js +9 -1
- package/Build/Workers/decodeI3S.js +1 -1
- package/Build/Workers/package.js +25 -1
- package/Build/Workers/transcodeKTX2.js +22 -2
- package/Build/Workers/transferTypedArrayTest.js +25 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +1 -1
- package/README.md +14 -16
- package/Source/Core/EarthOrientationParameters.js +67 -63
- package/Source/Core/FeatureDetection.js +18 -0
- package/Source/Core/Ion.js +1 -2
- package/Source/Core/Matrix2.js +2 -1
- package/Source/Core/Matrix3.js +2 -1
- package/Source/Core/Matrix4.js +1 -0
- package/Source/Core/OrientedBoundingBox.js +4 -4
- package/Source/Core/PixelFormat.js +22 -2
- package/Source/Core/S2Cell.js +3 -3
- package/Source/Core/Transforms.js +3 -7
- package/Source/Core/sampleTerrain.js +5 -0
- package/Source/DataSources/GpxDataSource.js +4 -6
- package/Source/DataSources/KmlDataSource.js +3 -5
- package/Source/Renderer/AutomaticUniforms.js +3 -3
- package/Source/Renderer/Context.js +20 -12
- package/Source/Renderer/Pass.js +3 -2
- package/Source/Renderer/ShaderBuilder.js +13 -12
- package/Source/Renderer/ShaderSource.js +31 -26
- package/Source/Renderer/demodernizeShader.js +76 -0
- package/Source/Scene/AutoExposure.js +5 -5
- package/Source/Scene/BatchTable.js +5 -5
- package/Source/Scene/BillboardCollection.js +2 -2
- package/Source/Scene/BingMapsImageryProvider.js +1 -1
- package/Source/Scene/Cesium3DTile.js +8 -2
- package/Source/Scene/Cesium3DTileBatchTable.js +28 -28
- package/Source/Scene/Cesium3DTileContentType.js +19 -0
- package/Source/Scene/Cesium3DTilesVoxelProvider.js +494 -0
- package/Source/Scene/Cesium3DTileset.js +6 -1
- package/Source/Scene/Cesium3DTilesetMetadata.js +2 -2
- package/Source/Scene/ClassificationPrimitive.js +3 -8
- package/Source/Scene/ContentMetadata.js +2 -2
- package/Source/Scene/DebugAppearance.js +7 -9
- package/Source/Scene/DebugInspector.js +5 -5
- package/Source/Scene/DepthPlane.js +0 -6
- package/Source/Scene/DerivedCommand.js +15 -22
- package/Source/Scene/EllipsoidPrimitive.js +0 -7
- package/Source/Scene/Expression.js +1 -1
- package/Source/Scene/Globe.js +10 -0
- package/Source/Scene/GlobeSurfaceTileProvider.js +7 -0
- package/Source/Scene/GlobeTranslucencyState.js +6 -6
- package/Source/Scene/GltfImageLoader.js +1 -1
- package/Source/Scene/GltfVertexBufferLoader.js +10 -2
- package/Source/Scene/GroundPolylinePrimitive.js +2 -4
- package/Source/Scene/GroupMetadata.js +2 -2
- package/Source/Scene/ImplicitMetadataView.js +2 -2
- package/Source/Scene/ImplicitSubtreeCache.js +127 -0
- package/Source/Scene/ImplicitSubtreeMetadata.js +2 -2
- package/Source/Scene/ImplicitTileset.js +3 -2
- package/Source/Scene/InvertClassification.js +9 -10
- package/Source/Scene/KeyframeNode.js +47 -0
- package/Source/Scene/Material.js +6 -6
- package/Source/Scene/Megatexture.js +490 -0
- package/Source/Scene/MetadataClass.js +60 -25
- package/Source/Scene/MetadataClassProperty.js +132 -68
- package/Source/Scene/MetadataComponentType.js +78 -57
- package/Source/Scene/MetadataEnum.js +59 -23
- package/Source/Scene/MetadataEnumValue.js +49 -15
- package/Source/Scene/MetadataSchema.js +53 -24
- package/Source/Scene/MetadataSchemaLoader.js +2 -2
- package/Source/Scene/MetadataSemantic.js +8 -0
- package/Source/Scene/MetadataTableProperty.js +2 -2
- package/Source/Scene/MetadataType.js +6 -14
- package/Source/Scene/Model/CustomShader.js +1 -1
- package/Source/Scene/Model/FeatureIdPipelineStage.js +4 -4
- package/Source/Scene/Model/GeoJsonLoader.js +1 -1
- package/Source/Scene/Model/LightingModel.js +1 -1
- package/Source/Scene/Model/MetadataPipelineStage.js +1 -1
- package/Source/Scene/Model/Model.js +2 -3
- package/Source/Scene/Model/PickingPipelineStage.js +1 -1
- package/Source/Scene/Model/buildDrawCommand.js +19 -11
- package/Source/Scene/OIT.js +211 -119
- package/Source/Scene/PickDepth.js +2 -2
- package/Source/Scene/PointCloud.js +12 -12
- package/Source/Scene/PointCloudEyeDomeLighting.js +9 -4
- package/Source/Scene/PolylineCollection.js +2 -7
- package/Source/Scene/PolylineMaterialAppearance.js +2 -3
- package/Source/Scene/PostProcessStage.js +13 -13
- package/Source/Scene/PostProcessStageLibrary.js +3 -3
- package/Source/Scene/Primitive.js +22 -31
- package/Source/Scene/PropertyAttribute.js +2 -2
- package/Source/Scene/PropertyAttributeProperty.js +2 -2
- package/Source/Scene/PropertyTable.js +2 -2
- package/Source/Scene/PropertyTexture.js +2 -2
- package/Source/Scene/PropertyTextureProperty.js +2 -2
- package/Source/Scene/ResourceCache.js +9 -1
- package/Source/Scene/ResourceCacheKey.js +9 -1
- package/Source/Scene/Scene.js +17 -0
- package/Source/Scene/ShadowMap.js +7 -7
- package/Source/Scene/ShadowMapShader.js +9 -9
- package/Source/Scene/ShadowVolumeAppearance.js +1 -1
- package/Source/Scene/SpatialNode.js +375 -0
- package/Source/Scene/StructuralMetadata.js +2 -2
- package/Source/Scene/TextureAtlas.js +5 -3
- package/Source/Scene/TileMetadata.js +2 -2
- package/Source/Scene/TilesetMetadata.js +2 -2
- package/Source/Scene/Vector3DTilePolylines.js +1 -1
- package/Source/Scene/Vector3DTilePrimitive.js +2 -2
- package/Source/Scene/VoxelBoxShape.js +527 -0
- package/Source/Scene/VoxelContent.js +169 -0
- package/Source/Scene/VoxelCylinderShape.js +937 -0
- package/Source/Scene/VoxelEllipsoidShape.js +945 -0
- package/Source/Scene/VoxelPrimitive.js +1919 -0
- package/Source/Scene/VoxelProvider.js +255 -0
- package/Source/Scene/VoxelRenderResources.js +224 -0
- package/Source/Scene/VoxelShape.js +152 -0
- package/Source/Scene/VoxelShapeType.js +105 -0
- package/Source/Scene/VoxelTraversal.js +1144 -0
- package/Source/Scene/buildVoxelDrawCommands.js +116 -0
- package/Source/Scene/computeFlyToLocationForRectangle.js +10 -1
- package/Source/Scene/createElevationBandMaterial.js +10 -15
- package/Source/Scene/getClipAndStyleCode.js +1 -1
- package/Source/Scene/getClippingFunction.js +3 -3
- package/Source/Scene/parseBatchTable.js +18 -2
- package/Source/Scene/preprocess3DTileContent.js +8 -0
- package/Source/Scene/processVoxelProperties.js +455 -0
- package/Source/Shaders/AdjustTranslucentFS.glsl +9 -6
- package/Source/Shaders/AdjustTranslucentFS.js +9 -6
- package/Source/Shaders/Appearances/AllMaterialAppearanceFS.glsl +7 -7
- package/Source/Shaders/Appearances/AllMaterialAppearanceFS.js +7 -7
- package/Source/Shaders/Appearances/AllMaterialAppearanceVS.glsl +12 -12
- package/Source/Shaders/Appearances/AllMaterialAppearanceVS.js +12 -12
- package/Source/Shaders/Appearances/BasicMaterialAppearanceFS.glsl +4 -4
- package/Source/Shaders/Appearances/BasicMaterialAppearanceFS.js +4 -4
- package/Source/Shaders/Appearances/BasicMaterialAppearanceVS.glsl +6 -6
- package/Source/Shaders/Appearances/BasicMaterialAppearanceVS.js +6 -6
- package/Source/Shaders/Appearances/EllipsoidSurfaceAppearanceFS.glsl +5 -5
- package/Source/Shaders/Appearances/EllipsoidSurfaceAppearanceFS.js +5 -5
- package/Source/Shaders/Appearances/EllipsoidSurfaceAppearanceVS.glsl +7 -7
- package/Source/Shaders/Appearances/EllipsoidSurfaceAppearanceVS.js +7 -7
- package/Source/Shaders/Appearances/PerInstanceColorAppearanceFS.glsl +4 -4
- package/Source/Shaders/Appearances/PerInstanceColorAppearanceFS.js +4 -4
- package/Source/Shaders/Appearances/PerInstanceColorAppearanceVS.glsl +8 -8
- package/Source/Shaders/Appearances/PerInstanceColorAppearanceVS.js +8 -8
- package/Source/Shaders/Appearances/PerInstanceFlatColorAppearanceFS.glsl +2 -2
- package/Source/Shaders/Appearances/PerInstanceFlatColorAppearanceFS.js +2 -2
- package/Source/Shaders/Appearances/PerInstanceFlatColorAppearanceVS.glsl +5 -5
- package/Source/Shaders/Appearances/PerInstanceFlatColorAppearanceVS.js +5 -5
- package/Source/Shaders/Appearances/PolylineColorAppearanceVS.glsl +10 -10
- package/Source/Shaders/Appearances/PolylineColorAppearanceVS.js +10 -10
- package/Source/Shaders/Appearances/PolylineMaterialAppearanceVS.glsl +12 -12
- package/Source/Shaders/Appearances/PolylineMaterialAppearanceVS.js +12 -12
- package/Source/Shaders/Appearances/TexturedMaterialAppearanceFS.glsl +5 -5
- package/Source/Shaders/Appearances/TexturedMaterialAppearanceFS.js +5 -5
- package/Source/Shaders/Appearances/TexturedMaterialAppearanceVS.glsl +8 -8
- package/Source/Shaders/Appearances/TexturedMaterialAppearanceVS.js +8 -8
- package/Source/Shaders/BillboardCollectionFS.glsl +15 -15
- package/Source/Shaders/BillboardCollectionFS.js +15 -15
- package/Source/Shaders/BillboardCollectionVS.glsl +24 -24
- package/Source/Shaders/BillboardCollectionVS.js +24 -24
- package/Source/Shaders/BrdfLutGeneratorFS.glsl +2 -2
- package/Source/Shaders/BrdfLutGeneratorFS.js +2 -2
- package/Source/Shaders/Builtin/Constants/passOverlay.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passOverlay.js +1 -1
- package/Source/Shaders/Builtin/Constants/passVoxels.glsl +9 -0
- package/Source/Shaders/Builtin/Constants/passVoxels.js +11 -0
- package/Source/Shaders/Builtin/CzmBuiltins.js +19 -15
- package/Source/Shaders/Builtin/Functions/depthClamp.glsl +3 -3
- package/Source/Shaders/Builtin/Functions/depthClamp.js +3 -3
- package/Source/Shaders/Builtin/Functions/getWaterNoise.glsl +4 -4
- package/Source/Shaders/Builtin/Functions/getWaterNoise.js +4 -4
- package/Source/Shaders/Builtin/Functions/phong.glsl +1 -1
- package/Source/Shaders/Builtin/Functions/phong.js +1 -1
- package/Source/Shaders/Builtin/Functions/readDepth.glsl +1 -1
- package/Source/Shaders/Builtin/Functions/readDepth.js +1 -1
- package/Source/Shaders/Builtin/Functions/sampleOctahedralProjection.glsl +5 -5
- package/Source/Shaders/Builtin/Functions/sampleOctahedralProjection.js +5 -5
- package/Source/Shaders/Builtin/Functions/shadowDepthCompare.glsl +3 -3
- package/Source/Shaders/Builtin/Functions/shadowDepthCompare.js +3 -3
- package/Source/Shaders/Builtin/Functions/tangentToEyeSpaceMatrix.glsl +1 -1
- package/Source/Shaders/Builtin/Functions/tangentToEyeSpaceMatrix.js +1 -1
- package/Source/Shaders/Builtin/Functions/textureCube.glsl +17 -0
- package/Source/Shaders/Builtin/Functions/textureCube.js +18 -0
- package/Source/Shaders/Builtin/Functions/translateRelativeToEye.glsl +2 -2
- package/Source/Shaders/Builtin/Functions/translateRelativeToEye.js +2 -2
- package/Source/Shaders/Builtin/Functions/vertexLogDepth.glsl +2 -2
- package/Source/Shaders/Builtin/Functions/vertexLogDepth.js +2 -2
- package/Source/Shaders/Builtin/Functions/windowToEyeCoordinates.glsl +55 -43
- package/Source/Shaders/Builtin/Functions/windowToEyeCoordinates.js +55 -43
- package/Source/Shaders/Builtin/Functions/writeDepthClamp.glsl +5 -8
- package/Source/Shaders/Builtin/Functions/writeDepthClamp.js +5 -8
- package/Source/Shaders/Builtin/Functions/writeLogDepth.glsl +6 -6
- package/Source/Shaders/Builtin/Functions/writeLogDepth.js +6 -6
- package/Source/Shaders/CloudCollectionFS.glsl +18 -18
- package/Source/Shaders/CloudCollectionFS.js +18 -18
- package/Source/Shaders/CloudCollectionVS.glsl +11 -11
- package/Source/Shaders/CloudCollectionVS.js +11 -11
- package/Source/Shaders/CloudNoiseFS.glsl +5 -5
- package/Source/Shaders/CloudNoiseFS.js +5 -5
- package/Source/Shaders/CloudNoiseVS.glsl +2 -2
- package/Source/Shaders/CloudNoiseVS.js +2 -2
- package/Source/Shaders/CompareAndPackTranslucentDepth.glsl +4 -4
- package/Source/Shaders/CompareAndPackTranslucentDepth.js +4 -4
- package/Source/Shaders/CompositeOITFS.glsl +6 -6
- package/Source/Shaders/CompositeOITFS.js +6 -6
- package/Source/Shaders/DepthPlaneFS.glsl +2 -2
- package/Source/Shaders/DepthPlaneFS.js +2 -2
- package/Source/Shaders/DepthPlaneVS.glsl +2 -2
- package/Source/Shaders/DepthPlaneVS.js +2 -2
- package/Source/Shaders/EllipsoidFS.glsl +5 -13
- package/Source/Shaders/EllipsoidFS.js +6 -14
- package/Source/Shaders/EllipsoidVS.glsl +2 -2
- package/Source/Shaders/EllipsoidVS.js +2 -2
- package/Source/Shaders/FXAA3_11.glsl +4 -4
- package/Source/Shaders/FXAA3_11.js +4 -4
- package/Source/Shaders/GlobeFS.glsl +17 -16
- package/Source/Shaders/GlobeFS.js +17 -16
- package/Source/Shaders/GlobeVS.glsl +17 -17
- package/Source/Shaders/GlobeVS.js +17 -17
- package/Source/Shaders/Materials/AspectRampMaterial.glsl +1 -1
- package/Source/Shaders/Materials/AspectRampMaterial.js +1 -1
- package/Source/Shaders/Materials/BumpMapMaterial.glsl +3 -3
- package/Source/Shaders/Materials/BumpMapMaterial.js +3 -3
- package/Source/Shaders/Materials/ElevationBandMaterial.glsl +3 -3
- package/Source/Shaders/Materials/ElevationBandMaterial.js +3 -3
- package/Source/Shaders/Materials/ElevationContourMaterial.glsl +2 -1
- package/Source/Shaders/Materials/ElevationContourMaterial.js +2 -1
- package/Source/Shaders/Materials/ElevationRampMaterial.glsl +1 -1
- package/Source/Shaders/Materials/ElevationRampMaterial.js +1 -1
- package/Source/Shaders/Materials/GridMaterial.glsl +3 -2
- package/Source/Shaders/Materials/GridMaterial.js +3 -2
- package/Source/Shaders/Materials/NormalMapMaterial.glsl +1 -1
- package/Source/Shaders/Materials/NormalMapMaterial.js +1 -1
- package/Source/Shaders/Materials/PolylineArrowMaterial.glsl +3 -2
- package/Source/Shaders/Materials/PolylineArrowMaterial.js +3 -2
- package/Source/Shaders/Materials/PolylineDashMaterial.glsl +1 -1
- package/Source/Shaders/Materials/PolylineDashMaterial.js +1 -1
- package/Source/Shaders/Materials/PolylineOutlineMaterial.glsl +1 -1
- package/Source/Shaders/Materials/PolylineOutlineMaterial.js +1 -1
- package/Source/Shaders/Materials/SlopeRampMaterial.glsl +1 -1
- package/Source/Shaders/Materials/SlopeRampMaterial.js +1 -1
- package/Source/Shaders/Materials/Water.glsl +1 -1
- package/Source/Shaders/Materials/Water.js +1 -1
- package/Source/Shaders/Model/ImageBasedLightingStageFS.glsl +3 -3
- package/Source/Shaders/Model/ImageBasedLightingStageFS.js +3 -3
- package/Source/Shaders/Model/MaterialStageFS.glsl +10 -10
- package/Source/Shaders/Model/MaterialStageFS.js +10 -10
- package/Source/Shaders/Model/ModelClippingPlanesStageFS.glsl +3 -3
- package/Source/Shaders/Model/ModelClippingPlanesStageFS.js +3 -3
- package/Source/Shaders/Model/ModelFS.glsl +1 -1
- package/Source/Shaders/Model/ModelFS.js +1 -1
- package/Source/Shaders/Model/PrimitiveOutlineStageFS.glsl +3 -3
- package/Source/Shaders/Model/PrimitiveOutlineStageFS.js +3 -3
- package/Source/Shaders/Model/SelectedFeatureIdStageCommon.glsl +1 -1
- package/Source/Shaders/Model/SelectedFeatureIdStageCommon.js +1 -1
- package/Source/Shaders/OctahedralProjectionAtlasFS.glsl +8 -8
- package/Source/Shaders/OctahedralProjectionAtlasFS.js +8 -8
- package/Source/Shaders/OctahedralProjectionFS.glsl +4 -4
- package/Source/Shaders/OctahedralProjectionFS.js +4 -4
- package/Source/Shaders/OctahedralProjectionVS.glsl +3 -3
- package/Source/Shaders/OctahedralProjectionVS.js +3 -3
- package/Source/Shaders/PointPrimitiveCollectionFS.glsl +6 -6
- package/Source/Shaders/PointPrimitiveCollectionFS.js +6 -6
- package/Source/Shaders/PointPrimitiveCollectionVS.glsl +17 -14
- package/Source/Shaders/PointPrimitiveCollectionVS.js +17 -14
- package/Source/Shaders/PolylineFS.glsl +3 -3
- package/Source/Shaders/PolylineFS.js +3 -3
- package/Source/Shaders/PolylineShadowVolumeFS.glsl +12 -16
- package/Source/Shaders/PolylineShadowVolumeFS.js +12 -16
- package/Source/Shaders/PolylineShadowVolumeMorphFS.glsl +8 -8
- package/Source/Shaders/PolylineShadowVolumeMorphFS.js +8 -8
- package/Source/Shaders/PolylineShadowVolumeMorphVS.glsl +20 -20
- package/Source/Shaders/PolylineShadowVolumeMorphVS.js +20 -20
- package/Source/Shaders/PolylineShadowVolumeVS.glsl +20 -20
- package/Source/Shaders/PolylineShadowVolumeVS.js +20 -20
- package/Source/Shaders/PolylineVS.glsl +17 -17
- package/Source/Shaders/PolylineVS.js +17 -17
- package/Source/Shaders/PostProcessStages/AcesTonemappingStage.glsl +4 -4
- package/Source/Shaders/PostProcessStages/AcesTonemappingStage.js +4 -4
- package/Source/Shaders/PostProcessStages/AdditiveBlend.glsl +4 -4
- package/Source/Shaders/PostProcessStages/AdditiveBlend.js +4 -4
- package/Source/Shaders/PostProcessStages/AmbientOcclusionGenerate.glsl +4 -4
- package/Source/Shaders/PostProcessStages/AmbientOcclusionGenerate.js +4 -4
- package/Source/Shaders/PostProcessStages/AmbientOcclusionModulate.glsl +4 -4
- package/Source/Shaders/PostProcessStages/AmbientOcclusionModulate.js +4 -4
- package/Source/Shaders/PostProcessStages/BlackAndWhite.glsl +4 -4
- package/Source/Shaders/PostProcessStages/BlackAndWhite.js +4 -4
- package/Source/Shaders/PostProcessStages/BloomComposite.glsl +5 -5
- package/Source/Shaders/PostProcessStages/BloomComposite.js +5 -5
- package/Source/Shaders/PostProcessStages/BrightPass.glsl +3 -3
- package/Source/Shaders/PostProcessStages/BrightPass.js +3 -3
- package/Source/Shaders/PostProcessStages/Brightness.glsl +3 -3
- package/Source/Shaders/PostProcessStages/Brightness.js +3 -3
- package/Source/Shaders/PostProcessStages/CompositeTranslucentClassification.glsl +5 -5
- package/Source/Shaders/PostProcessStages/CompositeTranslucentClassification.js +5 -5
- package/Source/Shaders/PostProcessStages/ContrastBias.glsl +3 -3
- package/Source/Shaders/PostProcessStages/ContrastBias.js +3 -3
- package/Source/Shaders/PostProcessStages/DepthOfField.glsl +2 -2
- package/Source/Shaders/PostProcessStages/DepthOfField.js +2 -2
- package/Source/Shaders/PostProcessStages/DepthView.glsl +2 -2
- package/Source/Shaders/PostProcessStages/DepthView.js +2 -2
- package/Source/Shaders/PostProcessStages/DepthViewPacked.glsl +3 -3
- package/Source/Shaders/PostProcessStages/DepthViewPacked.js +3 -3
- package/Source/Shaders/PostProcessStages/EdgeDetection.glsl +7 -7
- package/Source/Shaders/PostProcessStages/EdgeDetection.js +7 -7
- package/Source/Shaders/PostProcessStages/FXAA.glsl +3 -3
- package/Source/Shaders/PostProcessStages/FXAA.js +3 -3
- package/Source/Shaders/PostProcessStages/FilmicTonemapping.glsl +4 -4
- package/Source/Shaders/PostProcessStages/FilmicTonemapping.js +4 -4
- package/Source/Shaders/PostProcessStages/GaussianBlur1D.glsl +5 -5
- package/Source/Shaders/PostProcessStages/GaussianBlur1D.js +5 -5
- package/Source/Shaders/PostProcessStages/LensFlare.glsl +13 -13
- package/Source/Shaders/PostProcessStages/LensFlare.js +13 -13
- package/Source/Shaders/PostProcessStages/ModifiedReinhardTonemapping.glsl +4 -4
- package/Source/Shaders/PostProcessStages/ModifiedReinhardTonemapping.js +4 -4
- package/Source/Shaders/PostProcessStages/NightVision.glsl +3 -3
- package/Source/Shaders/PostProcessStages/NightVision.js +3 -3
- package/Source/Shaders/PostProcessStages/PassThrough.glsl +2 -2
- package/Source/Shaders/PostProcessStages/PassThrough.js +2 -2
- package/Source/Shaders/PostProcessStages/PassThroughDepth.glsl +2 -2
- package/Source/Shaders/PostProcessStages/PassThroughDepth.js +2 -2
- package/Source/Shaders/PostProcessStages/PointCloudEyeDomeLighting.glsl +7 -9
- package/Source/Shaders/PostProcessStages/PointCloudEyeDomeLighting.js +8 -10
- package/Source/Shaders/PostProcessStages/ReinhardTonemapping.glsl +4 -4
- package/Source/Shaders/PostProcessStages/ReinhardTonemapping.js +4 -4
- package/Source/Shaders/PostProcessStages/Silhouette.glsl +4 -4
- package/Source/Shaders/PostProcessStages/Silhouette.js +4 -4
- package/Source/Shaders/ReprojectWebMercatorFS.glsl +2 -2
- package/Source/Shaders/ReprojectWebMercatorFS.js +2 -2
- package/Source/Shaders/ReprojectWebMercatorVS.glsl +3 -3
- package/Source/Shaders/ReprojectWebMercatorVS.js +3 -3
- package/Source/Shaders/ShadowVolumeAppearanceFS.glsl +19 -23
- package/Source/Shaders/ShadowVolumeAppearanceFS.js +20 -24
- package/Source/Shaders/ShadowVolumeAppearanceVS.glsl +12 -12
- package/Source/Shaders/ShadowVolumeAppearanceVS.js +12 -12
- package/Source/Shaders/ShadowVolumeFS.glsl +2 -6
- package/Source/Shaders/ShadowVolumeFS.js +3 -7
- package/Source/Shaders/SkyAtmosphereFS.glsl +6 -6
- package/Source/Shaders/SkyAtmosphereFS.js +6 -6
- package/Source/Shaders/SkyAtmosphereVS.glsl +6 -6
- package/Source/Shaders/SkyAtmosphereVS.js +6 -6
- package/Source/Shaders/SkyBoxFS.glsl +3 -3
- package/Source/Shaders/SkyBoxFS.js +3 -3
- package/Source/Shaders/SkyBoxVS.glsl +2 -2
- package/Source/Shaders/SkyBoxVS.js +2 -2
- package/Source/Shaders/SunFS.glsl +3 -3
- package/Source/Shaders/SunFS.js +3 -3
- package/Source/Shaders/SunTextureFS.glsl +2 -2
- package/Source/Shaders/SunTextureFS.js +2 -2
- package/Source/Shaders/SunVS.glsl +2 -2
- package/Source/Shaders/SunVS.js +2 -2
- package/Source/Shaders/Vector3DTileClampedPolylinesFS.glsl +9 -13
- package/Source/Shaders/Vector3DTileClampedPolylinesFS.js +9 -13
- package/Source/Shaders/Vector3DTileClampedPolylinesVS.glsl +12 -12
- package/Source/Shaders/Vector3DTileClampedPolylinesVS.js +12 -12
- package/Source/Shaders/Vector3DTilePolylinesVS.glsl +5 -5
- package/Source/Shaders/Vector3DTilePolylinesVS.js +5 -5
- package/Source/Shaders/VectorTileVS.glsl +2 -2
- package/Source/Shaders/VectorTileVS.js +2 -2
- package/Source/Shaders/ViewportQuadFS.glsl +2 -2
- package/Source/Shaders/ViewportQuadFS.js +2 -2
- package/Source/Shaders/ViewportQuadVS.glsl +3 -3
- package/Source/Shaders/ViewportQuadVS.js +3 -3
- package/Source/Shaders/Voxels/IntersectBox.glsl +79 -0
- package/Source/Shaders/Voxels/IntersectBox.js +81 -0
- package/Source/Shaders/Voxels/IntersectClippingPlanes.glsl +70 -0
- package/Source/Shaders/Voxels/IntersectClippingPlanes.js +72 -0
- package/Source/Shaders/Voxels/IntersectCylinder.glsl +273 -0
- package/Source/Shaders/Voxels/IntersectCylinder.js +275 -0
- package/Source/Shaders/Voxels/IntersectDepth.glsl +23 -0
- package/Source/Shaders/Voxels/IntersectDepth.js +25 -0
- package/Source/Shaders/Voxels/IntersectEllipsoid.glsl +347 -0
- package/Source/Shaders/Voxels/IntersectEllipsoid.js +349 -0
- package/Source/Shaders/Voxels/Intersection.glsl +54 -0
- package/Source/Shaders/Voxels/Intersection.js +56 -0
- package/Source/Shaders/Voxels/IntersectionUtils.glsl +151 -0
- package/Source/Shaders/Voxels/IntersectionUtils.js +153 -0
- package/Source/Shaders/Voxels/Megatexture.glsl +136 -0
- package/Source/Shaders/Voxels/Megatexture.js +138 -0
- package/Source/Shaders/Voxels/Octree.glsl +221 -0
- package/Source/Shaders/Voxels/Octree.js +223 -0
- package/Source/Shaders/Voxels/VoxelFS.glsl +150 -0
- package/Source/Shaders/Voxels/VoxelFS.js +152 -0
- package/Source/Shaders/Voxels/VoxelVS.glsl +11 -0
- package/Source/Shaders/Voxels/VoxelVS.js +13 -0
- package/Source/Shaders/Voxels/convertUvToBox.glsl +16 -0
- package/Source/Shaders/Voxels/convertUvToBox.js +18 -0
- package/Source/Shaders/Voxels/convertUvToCylinder.glsl +75 -0
- package/Source/Shaders/Voxels/convertUvToCylinder.js +77 -0
- package/Source/Shaders/Voxels/convertUvToEllipsoid.glsl +130 -0
- package/Source/Shaders/Voxels/convertUvToEllipsoid.js +132 -0
- package/Source/ThirdParty/Workers/z-worker-pako.js +0 -0
- package/Source/WorkersES6/decodeDraco.js +9 -1
- package/index.d.ts +3148 -2297
- package/index.js +1118 -1085
- package/package.json +3 -4
- package/Build/Workers/PolygonPipeline-774a8aaf.js +0 -1341
- package/Source/Renderer/modernizeShader.js +0 -242
|
@@ -167,6 +167,7 @@ function Cesium3DTileset(options) {
|
|
|
167
167
|
this._asset = undefined; // Metadata for the entire tileset
|
|
168
168
|
this._properties = undefined; // Metadata for per-model/point/etc properties
|
|
169
169
|
this._geometricError = undefined; // Geometric error when the tree is not rendered at all
|
|
170
|
+
this._scaledGeometricError = undefined; // Geometric error scaled by root tile scale
|
|
170
171
|
this._extensionsUsed = undefined;
|
|
171
172
|
this._extensions = undefined;
|
|
172
173
|
this._modelUpAxis = undefined;
|
|
@@ -1007,6 +1008,11 @@ function Cesium3DTileset(options) {
|
|
|
1007
1008
|
return;
|
|
1008
1009
|
}
|
|
1009
1010
|
|
|
1011
|
+
// Set these before loading the tileset since _geometricError
|
|
1012
|
+
// and _scaledGeometricError get accessed during tile creation
|
|
1013
|
+
that._geometricError = tilesetJson.geometricError;
|
|
1014
|
+
that._scaledGeometricError = tilesetJson.geometricError;
|
|
1015
|
+
|
|
1010
1016
|
that._root = that.loadTileset(resource, tilesetJson);
|
|
1011
1017
|
|
|
1012
1018
|
// Handle legacy gltfUpAxis option
|
|
@@ -1019,7 +1025,6 @@ function Cesium3DTileset(options) {
|
|
|
1019
1025
|
const asset = tilesetJson.asset;
|
|
1020
1026
|
that._asset = asset;
|
|
1021
1027
|
that._properties = tilesetJson.properties;
|
|
1022
|
-
that._geometricError = tilesetJson.geometricError;
|
|
1023
1028
|
that._extensionsUsed = tilesetJson.extensionsUsed;
|
|
1024
1029
|
that._extensions = tilesetJson.extensions;
|
|
1025
1030
|
that._modelUpAxis = modelUpAxis;
|
|
@@ -168,7 +168,7 @@ Object.defineProperties(Cesium3DTilesetMetadata.prototype, {
|
|
|
168
168
|
},
|
|
169
169
|
|
|
170
170
|
/**
|
|
171
|
-
*
|
|
171
|
+
* Extra user-defined properties.
|
|
172
172
|
*
|
|
173
173
|
* @memberof Cesium3DTilesetMetadata.prototype
|
|
174
174
|
* @type {*}
|
|
@@ -182,7 +182,7 @@ Object.defineProperties(Cesium3DTilesetMetadata.prototype, {
|
|
|
182
182
|
},
|
|
183
183
|
|
|
184
184
|
/**
|
|
185
|
-
*
|
|
185
|
+
* An object containing extensions.
|
|
186
186
|
*
|
|
187
187
|
* @memberof Cesium3DTilesetMetadata.prototype
|
|
188
188
|
* @type {Object}
|
|
@@ -493,22 +493,17 @@ function modifyForEncodedNormals(primitive, vertexShaderSource) {
|
|
|
493
493
|
return vertexShaderSource;
|
|
494
494
|
}
|
|
495
495
|
|
|
496
|
-
if (
|
|
497
|
-
vertexShaderSource.search(/attribute\s+vec3\s+extrudeDirection;/g) !== -1
|
|
498
|
-
) {
|
|
496
|
+
if (vertexShaderSource.search(/in\s+vec3\s+extrudeDirection;/g) !== -1) {
|
|
499
497
|
const attributeName = "compressedAttributes";
|
|
500
498
|
|
|
501
499
|
//only shadow volumes use extrudeDirection, and shadow volumes use vertexFormat: POSITION_ONLY so we don't need to check other attributes
|
|
502
|
-
const attributeDecl = `
|
|
500
|
+
const attributeDecl = `in vec2 ${attributeName};`;
|
|
503
501
|
|
|
504
502
|
const globalDecl = "vec3 extrudeDirection;\n";
|
|
505
503
|
const decode = ` extrudeDirection = czm_octDecode(${attributeName}, 65535.0);\n`;
|
|
506
504
|
|
|
507
505
|
let modifiedVS = vertexShaderSource;
|
|
508
|
-
modifiedVS = modifiedVS.replace(
|
|
509
|
-
/attribute\s+vec3\s+extrudeDirection;/g,
|
|
510
|
-
""
|
|
511
|
-
);
|
|
506
|
+
modifiedVS = modifiedVS.replace(/in\s+vec3\s+extrudeDirection;/g, "");
|
|
512
507
|
modifiedVS = ShaderSource.replaceMain(
|
|
513
508
|
modifiedVS,
|
|
514
509
|
"czm_non_compressed_main"
|
|
@@ -50,7 +50,7 @@ Object.defineProperties(ContentMetadata.prototype, {
|
|
|
50
50
|
},
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
|
-
*
|
|
53
|
+
* Extra user-defined properties.
|
|
54
54
|
*
|
|
55
55
|
* @memberof ContentMetadata.prototype
|
|
56
56
|
* @type {Object}
|
|
@@ -64,7 +64,7 @@ Object.defineProperties(ContentMetadata.prototype, {
|
|
|
64
64
|
},
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
|
-
*
|
|
67
|
+
* An object containing extensions.
|
|
68
68
|
*
|
|
69
69
|
* @memberof ContentMetadata.prototype
|
|
70
70
|
* @type {Object}
|
|
@@ -88,14 +88,12 @@ function DebugAppearance(options) {
|
|
|
88
88
|
|
|
89
89
|
const vs =
|
|
90
90
|
`${
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
91
|
+
"in vec3 position3DHigh;\n" +
|
|
92
|
+
"in vec3 position3DLow;\n" +
|
|
93
|
+
"in float batchId;\n"
|
|
94
94
|
}${
|
|
95
|
-
perInstanceAttribute
|
|
96
|
-
|
|
97
|
-
: `attribute ${glslDatatype} ${attributeName};\n`
|
|
98
|
-
}varying ${glslDatatype} ${varyingName};\n` +
|
|
95
|
+
perInstanceAttribute ? "" : `in ${glslDatatype} ${attributeName};\n`
|
|
96
|
+
}out ${glslDatatype} ${varyingName};\n` +
|
|
99
97
|
`void main()\n` +
|
|
100
98
|
`{\n` +
|
|
101
99
|
`vec4 p = czm_translateRelativeToEye(position3DHigh, position3DLow);\n${
|
|
@@ -105,10 +103,10 @@ function DebugAppearance(options) {
|
|
|
105
103
|
}gl_Position = czm_modelViewProjectionRelativeToEye * p;\n` +
|
|
106
104
|
`}`;
|
|
107
105
|
const fs =
|
|
108
|
-
`
|
|
106
|
+
`in ${glslDatatype} ${varyingName};\n${getColor}\n` +
|
|
109
107
|
`void main()\n` +
|
|
110
108
|
`{\n` +
|
|
111
|
-
`
|
|
109
|
+
`out_FragColor = getColor();\n` +
|
|
112
110
|
`}`;
|
|
113
111
|
|
|
114
112
|
/**
|
|
@@ -31,7 +31,7 @@ function createDebugShowFrustumsShaderProgram(scene, shaderProgram) {
|
|
|
31
31
|
const targets = [];
|
|
32
32
|
fs.sources = fs.sources.map(function (source) {
|
|
33
33
|
source = ShaderSource.replaceMain(source, "czm_Debug_main");
|
|
34
|
-
const re = /
|
|
34
|
+
const re = /out_FragData_(\d+)/g;
|
|
35
35
|
let match;
|
|
36
36
|
while ((match = re.exec(source)) !== null) {
|
|
37
37
|
if (targets.indexOf(match[1]) === -1) {
|
|
@@ -52,12 +52,12 @@ function createDebugShowFrustumsShaderProgram(scene, shaderProgram) {
|
|
|
52
52
|
let i;
|
|
53
53
|
if (length > 0) {
|
|
54
54
|
for (i = 0; i < length; ++i) {
|
|
55
|
-
newMain += `
|
|
56
|
-
newMain += `
|
|
55
|
+
newMain += ` out_FragData_${targets[i]}.rgb *= debugShowCommandsColor;\n`;
|
|
56
|
+
newMain += ` out_FragData_${targets[i]}.rgb *= debugShowFrustumsColor;\n`;
|
|
57
57
|
}
|
|
58
58
|
} else {
|
|
59
|
-
newMain += "
|
|
60
|
-
newMain += "
|
|
59
|
+
newMain += " out_FragColor.rgb *= debugShowCommandsColor;\n";
|
|
60
|
+
newMain += " out_FragColor.rgb *= debugShowFrustumsColor;\n";
|
|
61
61
|
}
|
|
62
62
|
newMain += "}";
|
|
63
63
|
|
|
@@ -173,12 +173,6 @@ DepthPlane.prototype.update = function (frameState) {
|
|
|
173
173
|
sources: [DepthPlaneFS],
|
|
174
174
|
});
|
|
175
175
|
if (useLogDepth) {
|
|
176
|
-
const extension =
|
|
177
|
-
"#ifdef GL_EXT_frag_depth \n" +
|
|
178
|
-
"#extension GL_EXT_frag_depth : enable \n" +
|
|
179
|
-
"#endif \n\n";
|
|
180
|
-
|
|
181
|
-
fs.sources.push(extension);
|
|
182
176
|
fs.defines.push("LOG_DEPTH");
|
|
183
177
|
vs.defines.push("LOG_DEPTH");
|
|
184
178
|
}
|
|
@@ -8,7 +8,7 @@ import ShaderSource from "../Renderer/ShaderSource.js";
|
|
|
8
8
|
*/
|
|
9
9
|
function DerivedCommand() {}
|
|
10
10
|
|
|
11
|
-
const fragDepthRegex = /\
|
|
11
|
+
const fragDepthRegex = /\bgl_FragDepth\b/;
|
|
12
12
|
const discardRegex = /\bdiscard\b/;
|
|
13
13
|
|
|
14
14
|
function getDepthOnlyShaderProgram(context, shaderProgram) {
|
|
@@ -44,18 +44,18 @@ function getDepthOnlyShaderProgram(context, shaderProgram) {
|
|
|
44
44
|
let source;
|
|
45
45
|
if (!writesDepthOrDiscards && !usesLogDepth) {
|
|
46
46
|
source =
|
|
47
|
-
"void main() \n" +
|
|
47
|
+
"void main() \n" +
|
|
48
|
+
"{ \n" +
|
|
49
|
+
" out_FragColor = vec4(1.0); \n" +
|
|
50
|
+
"} \n";
|
|
48
51
|
fs = new ShaderSource({
|
|
49
52
|
sources: [source],
|
|
50
53
|
});
|
|
51
54
|
} else if (!writesDepthOrDiscards && usesLogDepth) {
|
|
52
55
|
source =
|
|
53
|
-
"#ifdef GL_EXT_frag_depth \n" +
|
|
54
|
-
"#extension GL_EXT_frag_depth : enable \n" +
|
|
55
|
-
"#endif \n\n" +
|
|
56
56
|
"void main() \n" +
|
|
57
57
|
"{ \n" +
|
|
58
|
-
"
|
|
58
|
+
" out_FragColor = vec4(1.0); \n" +
|
|
59
59
|
" czm_writeLogDepth(); \n" +
|
|
60
60
|
"} \n";
|
|
61
61
|
fs = new ShaderSource({
|
|
@@ -145,9 +145,15 @@ DerivedCommand.createDepthOnlyDerivedCommand = function (
|
|
|
145
145
|
|
|
146
146
|
const writeLogDepthRegex = /\s+czm_writeLogDepth\(/;
|
|
147
147
|
const vertexlogDepthRegex = /\s+czm_vertexLogDepth\(/;
|
|
148
|
-
const extensionRegex = /\s*#extension\s+GL_EXT_frag_depth\s*:\s*enable/;
|
|
149
148
|
|
|
150
149
|
function getLogDepthShaderProgram(context, shaderProgram) {
|
|
150
|
+
const disableLogDepthWrite =
|
|
151
|
+
shaderProgram.fragmentShaderSource.defines.indexOf("LOG_DEPTH_READ_ONLY") >=
|
|
152
|
+
0;
|
|
153
|
+
if (disableLogDepthWrite) {
|
|
154
|
+
return shaderProgram;
|
|
155
|
+
}
|
|
156
|
+
|
|
151
157
|
let shader = context.shaderCache.getDerivedShaderProgram(
|
|
152
158
|
shaderProgram,
|
|
153
159
|
"logDepth"
|
|
@@ -203,20 +209,7 @@ function getLogDepthShaderProgram(context, shaderProgram) {
|
|
|
203
209
|
writesLogDepth = true;
|
|
204
210
|
}
|
|
205
211
|
|
|
206
|
-
let addExtension = true;
|
|
207
|
-
for (i = 0; i < length; ++i) {
|
|
208
|
-
if (extensionRegex.test(sources[i])) {
|
|
209
|
-
addExtension = false;
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
|
|
213
212
|
let logSource = "";
|
|
214
|
-
if (addExtension) {
|
|
215
|
-
logSource +=
|
|
216
|
-
"#ifdef GL_EXT_frag_depth \n" +
|
|
217
|
-
"#extension GL_EXT_frag_depth : enable \n" +
|
|
218
|
-
"#endif \n\n";
|
|
219
|
-
}
|
|
220
213
|
|
|
221
214
|
if (!writesLogDepth) {
|
|
222
215
|
for (i = 0; i < length; i++) {
|
|
@@ -290,10 +283,10 @@ function getPickShaderProgram(context, shaderProgram, pickId) {
|
|
|
290
283
|
"void main() \n" +
|
|
291
284
|
"{ \n" +
|
|
292
285
|
" czm_non_pick_main(); \n" +
|
|
293
|
-
" if (
|
|
286
|
+
" if (out_FragColor.a == 0.0) { \n" +
|
|
294
287
|
" discard; \n" +
|
|
295
288
|
" } \n" +
|
|
296
|
-
"
|
|
289
|
+
" out_FragColor = "
|
|
297
290
|
}${pickId}; \n` + `} \n`;
|
|
298
291
|
const newSources = new Array(length + 1);
|
|
299
292
|
for (let i = 0; i < length; ++i) {
|
|
@@ -238,11 +238,6 @@ function getVertexArray(context) {
|
|
|
238
238
|
return vertexArray;
|
|
239
239
|
}
|
|
240
240
|
|
|
241
|
-
const logDepthExtension =
|
|
242
|
-
"#ifdef GL_EXT_frag_depth \n" +
|
|
243
|
-
"#extension GL_EXT_frag_depth : enable \n" +
|
|
244
|
-
"#endif \n\n";
|
|
245
|
-
|
|
246
241
|
/**
|
|
247
242
|
* Called when {@link Viewer} or {@link CesiumWidget} render the scene to
|
|
248
243
|
* get the draw commands needed to render this primitive.
|
|
@@ -378,7 +373,6 @@ EllipsoidPrimitive.prototype.update = function (frameState) {
|
|
|
378
373
|
if (this._useLogDepth) {
|
|
379
374
|
vs.defines.push("LOG_DEPTH");
|
|
380
375
|
fs.defines.push("LOG_DEPTH");
|
|
381
|
-
fs.sources.push(logDepthExtension);
|
|
382
376
|
}
|
|
383
377
|
|
|
384
378
|
this._sp = ShaderProgram.replaceCache({
|
|
@@ -443,7 +437,6 @@ EllipsoidPrimitive.prototype.update = function (frameState) {
|
|
|
443
437
|
if (this._useLogDepth) {
|
|
444
438
|
vs.defines.push("LOG_DEPTH");
|
|
445
439
|
fs.defines.push("LOG_DEPTH");
|
|
446
|
-
fs.sources.push(logDepthExtension);
|
|
447
440
|
}
|
|
448
441
|
|
|
449
442
|
this._pickSP = ShaderProgram.replaceCache({
|
|
@@ -659,7 +659,7 @@ function parseCall(expression, ast) {
|
|
|
659
659
|
const object = ast.callee.object;
|
|
660
660
|
if (call === "test" || call === "exec") {
|
|
661
661
|
// Make sure this is called on a valid type
|
|
662
|
-
if (object.callee.name !== "regExp") {
|
|
662
|
+
if (!defined(object.callee) || object.callee.name !== "regExp") {
|
|
663
663
|
throw new RuntimeError(`${call} is not a function.`);
|
|
664
664
|
}
|
|
665
665
|
if (argsLength === 0) {
|
package/Source/Scene/Globe.js
CHANGED
|
@@ -379,6 +379,15 @@ function Globe(ellipsoid) {
|
|
|
379
379
|
|
|
380
380
|
this._oceanNormalMap = undefined;
|
|
381
381
|
this._zoomedOutOceanSpecularIntensity = undefined;
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Determines the darkness of the vertex shadow.
|
|
385
|
+
* This only takes effect when <code>enableLighting</code> is <code>true</code>.
|
|
386
|
+
*
|
|
387
|
+
* @type {Number}
|
|
388
|
+
* @default 0.3
|
|
389
|
+
*/
|
|
390
|
+
this.vertexShadowDarkness = 0.3;
|
|
382
391
|
}
|
|
383
392
|
|
|
384
393
|
Object.defineProperties(Globe.prototype, {
|
|
@@ -1046,6 +1055,7 @@ Globe.prototype.beginFrame = function (frameState) {
|
|
|
1046
1055
|
tileProvider.fillHighlightColor = this.fillHighlightColor;
|
|
1047
1056
|
tileProvider.showSkirts = this.showSkirts;
|
|
1048
1057
|
tileProvider.backFaceCulling = this.backFaceCulling;
|
|
1058
|
+
tileProvider.vertexShadowDarkness = this.vertexShadowDarkness;
|
|
1049
1059
|
tileProvider.undergroundColor = this._undergroundColor;
|
|
1050
1060
|
tileProvider.undergroundColorAlphaByDistance = this._undergroundColorAlphaByDistance;
|
|
1051
1061
|
tileProvider.lambertDiffuseMultiplier = this.lambertDiffuseMultiplier;
|
|
@@ -89,6 +89,7 @@ function GlobeSurfaceTileProvider(options) {
|
|
|
89
89
|
this.dynamicAtmosphereLightingFromSun = false;
|
|
90
90
|
this.showGroundAtmosphere = false;
|
|
91
91
|
this.shadows = ShadowMode.RECEIVE_ONLY;
|
|
92
|
+
this.vertexShadowDarkness = 0.3;
|
|
92
93
|
|
|
93
94
|
/**
|
|
94
95
|
* The color to use to highlight terrain fill tiles. If undefined, fill tiles are not
|
|
@@ -1785,6 +1786,9 @@ function createTileUniformMap(frameState, globeSurfaceTileProvider) {
|
|
|
1785
1786
|
u_lambertDiffuseMultiplier: function () {
|
|
1786
1787
|
return this.properties.lambertDiffuseMultiplier;
|
|
1787
1788
|
},
|
|
1789
|
+
u_vertexShadowDarkness: function () {
|
|
1790
|
+
return this.properties.vertexShadowDarkness;
|
|
1791
|
+
},
|
|
1788
1792
|
|
|
1789
1793
|
// make a separate object so that changes to the properties are seen on
|
|
1790
1794
|
// derived commands that combine another uniform map with this one.
|
|
@@ -1846,6 +1850,7 @@ function createTileUniformMap(frameState, globeSurfaceTileProvider) {
|
|
|
1846
1850
|
undergroundColor: Color.clone(Color.TRANSPARENT),
|
|
1847
1851
|
undergroundColorAlphaByDistance: new Cartesian4(),
|
|
1848
1852
|
lambertDiffuseMultiplier: 0.0,
|
|
1853
|
+
vertexShadowDarkness: 0.0,
|
|
1849
1854
|
},
|
|
1850
1855
|
};
|
|
1851
1856
|
|
|
@@ -2112,6 +2117,7 @@ function addDrawCommandsForTile(tileProvider, tile, frameState) {
|
|
|
2112
2117
|
undergroundColorAlphaByDistance.farValue > 0.0);
|
|
2113
2118
|
|
|
2114
2119
|
const lambertDiffuseMultiplier = tileProvider.lambertDiffuseMultiplier;
|
|
2120
|
+
const vertexShadowDarkness = tileProvider.vertexShadowDarkness;
|
|
2115
2121
|
|
|
2116
2122
|
const showReflectiveOcean =
|
|
2117
2123
|
tileProvider.hasWaterMask && defined(waterMaskTexture);
|
|
@@ -2416,6 +2422,7 @@ function addDrawCommandsForTile(tileProvider, tile, frameState) {
|
|
|
2416
2422
|
Color.clone(undergroundColor, uniformMapProperties.undergroundColor);
|
|
2417
2423
|
|
|
2418
2424
|
uniformMapProperties.lambertDiffuseMultiplier = lambertDiffuseMultiplier;
|
|
2425
|
+
uniformMapProperties.vertexShadowDarkness = vertexShadowDarkness;
|
|
2419
2426
|
|
|
2420
2427
|
const highlightFillTile =
|
|
2421
2428
|
!defined(surfaceTile.vertexArray) &&
|
|
@@ -401,7 +401,7 @@ function getDepthOnlyShaderProgram(vs, fs) {
|
|
|
401
401
|
}
|
|
402
402
|
|
|
403
403
|
const depthOnlyShader =
|
|
404
|
-
"void main() \n" + "{ \n" + "
|
|
404
|
+
"void main() \n" + "{ \n" + " out_FragColor = vec4(1.0); \n" + "} \n";
|
|
405
405
|
|
|
406
406
|
fs.sources = [depthOnlyShader];
|
|
407
407
|
}
|
|
@@ -423,7 +423,7 @@ function getTranslucentShaderProgram(vs, fs) {
|
|
|
423
423
|
"{ \n" +
|
|
424
424
|
" vec2 st = gl_FragCoord.xy / czm_viewport.zw; \n" +
|
|
425
425
|
"#ifdef MANUAL_DEPTH_TEST \n" +
|
|
426
|
-
" float logDepthOrDepth = czm_unpackDepth(
|
|
426
|
+
" float logDepthOrDepth = czm_unpackDepth(texture(czm_globeDepthTexture, st)); \n" +
|
|
427
427
|
" if (logDepthOrDepth != 0.0) \n" +
|
|
428
428
|
" { \n" +
|
|
429
429
|
" vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth); \n" +
|
|
@@ -435,13 +435,13 @@ function getTranslucentShaderProgram(vs, fs) {
|
|
|
435
435
|
" } \n" +
|
|
436
436
|
"#endif \n" +
|
|
437
437
|
" czm_globe_translucency_main(); \n" +
|
|
438
|
-
" vec4 classificationColor =
|
|
438
|
+
" vec4 classificationColor = texture(u_classificationTexture, st); \n" +
|
|
439
439
|
" if (classificationColor.a > 0.0) \n" +
|
|
440
440
|
" { \n" +
|
|
441
441
|
" // Reverse premultiplication process to get the correct composited result of the classification primitives \n" +
|
|
442
442
|
" classificationColor.rgb /= classificationColor.a; \n" +
|
|
443
443
|
" } \n" +
|
|
444
|
-
"
|
|
444
|
+
" out_FragColor = classificationColor * vec4(classificationColor.aaa, 1.0) + out_FragColor * (1.0 - classificationColor.a); \n" +
|
|
445
445
|
"} \n";
|
|
446
446
|
|
|
447
447
|
sources.push(globeTranslucencyMain);
|
|
@@ -473,12 +473,12 @@ function getPickShaderProgram(vs, fs) {
|
|
|
473
473
|
"void main() \n" +
|
|
474
474
|
"{ \n" +
|
|
475
475
|
" vec2 st = gl_FragCoord.xy / czm_viewport.zw; \n" +
|
|
476
|
-
" vec4 pickColor =
|
|
476
|
+
" vec4 pickColor = texture(u_classificationTexture, st); \n" +
|
|
477
477
|
" if (pickColor == vec4(0.0)) \n" +
|
|
478
478
|
" { \n" +
|
|
479
479
|
" discard; \n" +
|
|
480
480
|
" } \n" +
|
|
481
|
-
"
|
|
481
|
+
" out_FragColor = pickColor; \n" +
|
|
482
482
|
"} \n";
|
|
483
483
|
|
|
484
484
|
fs.sources = [pickShader];
|
|
@@ -293,7 +293,7 @@ function loadImageFromBufferTypedArray(typedArray) {
|
|
|
293
293
|
const ktx2Regex = /(^data:image\/ktx2)|(\.ktx2$)/i;
|
|
294
294
|
|
|
295
295
|
function loadImageFromUri(resource) {
|
|
296
|
-
const uri = resource.
|
|
296
|
+
const uri = resource.getUrlComponent(false, true);
|
|
297
297
|
if (ktx2Regex.test(uri)) {
|
|
298
298
|
// Resolves to a CompressedTextureBuffer
|
|
299
299
|
return loadKTX2(resource);
|
|
@@ -67,7 +67,7 @@ function GltfVertexBufferLoader(options) {
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
const hasBufferViewId = defined(bufferViewId);
|
|
70
|
-
const hasDraco =
|
|
70
|
+
const hasDraco = hasDracoCompression(draco, attributeSemantic);
|
|
71
71
|
const hasAttributeSemantic = defined(attributeSemantic);
|
|
72
72
|
const hasAccessorId = defined(accessorId);
|
|
73
73
|
|
|
@@ -196,6 +196,14 @@ Object.defineProperties(GltfVertexBufferLoader.prototype, {
|
|
|
196
196
|
},
|
|
197
197
|
});
|
|
198
198
|
|
|
199
|
+
function hasDracoCompression(draco, semantic) {
|
|
200
|
+
return (
|
|
201
|
+
defined(draco) &&
|
|
202
|
+
defined(draco.attributes) &&
|
|
203
|
+
defined(draco.attributes[semantic])
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
|
|
199
207
|
/**
|
|
200
208
|
* Loads the resource.
|
|
201
209
|
* @returns {Promise.<GltfVertexBufferLoader>} A promise which resolves to the loader when the resource loading is completed.
|
|
@@ -204,7 +212,7 @@ Object.defineProperties(GltfVertexBufferLoader.prototype, {
|
|
|
204
212
|
GltfVertexBufferLoader.prototype.load = function () {
|
|
205
213
|
let promise;
|
|
206
214
|
|
|
207
|
-
if (
|
|
215
|
+
if (hasDracoCompression(this._draco, this._attributeSemantic)) {
|
|
208
216
|
promise = loadFromDraco(this);
|
|
209
217
|
} else {
|
|
210
218
|
promise = loadFromBufferView(this);
|
|
@@ -405,12 +405,10 @@ function createShaderProgram(groundPolylinePrimitive, frameState, appearance) {
|
|
|
405
405
|
|
|
406
406
|
// Check for use of v_width and v_polylineAngle in material shader
|
|
407
407
|
// to determine whether these varyings should be active in the vertex shader.
|
|
408
|
-
if (
|
|
409
|
-
materialShaderSource.search(/varying\s+float\s+v_polylineAngle;/g) !== -1
|
|
410
|
-
) {
|
|
408
|
+
if (materialShaderSource.search(/in\s+float\s+v_polylineAngle;/g) !== -1) {
|
|
411
409
|
vsDefines.push("ANGLE_VARYING");
|
|
412
410
|
}
|
|
413
|
-
if (materialShaderSource.search(/
|
|
411
|
+
if (materialShaderSource.search(/in\s+float\s+v_width;/g) !== -1) {
|
|
414
412
|
vsDefines.push("WIDTH_VARYING");
|
|
415
413
|
}
|
|
416
414
|
} else {
|
|
@@ -69,7 +69,7 @@ Object.defineProperties(GroupMetadata.prototype, {
|
|
|
69
69
|
},
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
|
-
*
|
|
72
|
+
* Extra user-defined properties.
|
|
73
73
|
*
|
|
74
74
|
* @memberof GroupMetadata.prototype
|
|
75
75
|
* @type {*}
|
|
@@ -83,7 +83,7 @@ Object.defineProperties(GroupMetadata.prototype, {
|
|
|
83
83
|
},
|
|
84
84
|
|
|
85
85
|
/**
|
|
86
|
-
*
|
|
86
|
+
* An object containing extensions.
|
|
87
87
|
*
|
|
88
88
|
* @memberof GroupMetadata.prototype
|
|
89
89
|
* @type {Object}
|
|
@@ -56,7 +56,7 @@ Object.defineProperties(ImplicitMetadataView.prototype, {
|
|
|
56
56
|
},
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
|
-
*
|
|
59
|
+
* Extra user-defined properties.
|
|
60
60
|
*
|
|
61
61
|
* @memberof ImplicitMetadataView.prototype
|
|
62
62
|
* @type {Object}
|
|
@@ -69,7 +69,7 @@ Object.defineProperties(ImplicitMetadataView.prototype, {
|
|
|
69
69
|
},
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
|
-
*
|
|
72
|
+
* An object containing extensions.
|
|
73
73
|
*
|
|
74
74
|
* @memberof ImplicitMetadataView.prototype
|
|
75
75
|
* @type {Object}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import defaultValue from "../Core/defaultValue.js";
|
|
2
|
+
import DeveloperError from "../Core/DeveloperError.js";
|
|
3
|
+
import DoubleEndedPriorityQueue from "../Core/DoubleEndedPriorityQueue.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @alias ImplicitSubtreeCache
|
|
7
|
+
* @constructor
|
|
8
|
+
*
|
|
9
|
+
* @param {Object} [options] Object with the following properties
|
|
10
|
+
* @param {Number} [options.maximumSubtreeCount=0] The total number of subtrees this cache can store. If adding a new subtree would exceed this limit, the lowest priority subtrees will be removed until there is room, unless the subtree that is going to be removed is the parent of the new subtree, in which case it will not be removed and the new subtree will still be added, exceeding the memory limit.
|
|
11
|
+
*
|
|
12
|
+
* @private
|
|
13
|
+
*/
|
|
14
|
+
function ImplicitSubtreeCache(options) {
|
|
15
|
+
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* @type {Number}
|
|
19
|
+
* @private
|
|
20
|
+
*/
|
|
21
|
+
this._maximumSubtreeCount = defaultValue(options.maximumSubtreeCount, 0);
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* A counter that goes up whenever a subtree is added. Used to sort subtrees by recency.
|
|
25
|
+
* @type {Number}
|
|
26
|
+
* @private
|
|
27
|
+
*/
|
|
28
|
+
this._subtreeRequestCounter = 0;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @type {DoubleEndedPriorityQueue}
|
|
32
|
+
* @private
|
|
33
|
+
*/
|
|
34
|
+
this._queue = new DoubleEndedPriorityQueue({
|
|
35
|
+
comparator: ImplicitSubtreeCache.comparator,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @param {ImplicitSubtree} subtree
|
|
41
|
+
*/
|
|
42
|
+
ImplicitSubtreeCache.prototype.addSubtree = function (subtree) {
|
|
43
|
+
const cacheNode = new ImplicitSubtreeCacheNode(
|
|
44
|
+
subtree,
|
|
45
|
+
this._subtreeRequestCounter
|
|
46
|
+
);
|
|
47
|
+
this._subtreeRequestCounter++;
|
|
48
|
+
this._queue.insert(cacheNode);
|
|
49
|
+
|
|
50
|
+
// Make sure the parent subtree exists in the cache
|
|
51
|
+
const subtreeCoord = subtree.implicitCoordinates;
|
|
52
|
+
if (subtreeCoord.level > 0) {
|
|
53
|
+
const parentCoord = subtreeCoord.getParentSubtreeCoordinates();
|
|
54
|
+
const parentNode = this.find(parentCoord);
|
|
55
|
+
|
|
56
|
+
//>>includeStart('debug', pragmas.debug)
|
|
57
|
+
if (parentNode === undefined) {
|
|
58
|
+
throw new DeveloperError("parent node needs to exist");
|
|
59
|
+
}
|
|
60
|
+
//>>includeEnd('debug');
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (this._maximumSubtreeCount > 0) {
|
|
64
|
+
while (this._queue.length > this._maximumSubtreeCount) {
|
|
65
|
+
const lowestPriorityNode = this._queue.getMinimum();
|
|
66
|
+
if (lowestPriorityNode === cacheNode) {
|
|
67
|
+
// Don't remove itself
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
this._queue.removeMinimum();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* @param {ImplicitTileCoordinates} subtreeCoord
|
|
78
|
+
* @returns {ImplicitSubtree|undefined}
|
|
79
|
+
*/
|
|
80
|
+
ImplicitSubtreeCache.prototype.find = function (subtreeCoord) {
|
|
81
|
+
const queue = this._queue;
|
|
82
|
+
const array = queue.internalArray;
|
|
83
|
+
const arrayLength = queue.length;
|
|
84
|
+
|
|
85
|
+
for (let i = 0; i < arrayLength; i++) {
|
|
86
|
+
const other = array[i];
|
|
87
|
+
const otherSubtree = other.subtree;
|
|
88
|
+
const otherCoord = otherSubtree.implicitCoordinates;
|
|
89
|
+
if (subtreeCoord.isEqual(otherCoord)) {
|
|
90
|
+
return other.subtree;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return undefined;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* @param {ImplicitSubtreeCacheNode} a
|
|
98
|
+
* @param {ImplicitSubtreeCacheNode} b
|
|
99
|
+
* @returns {Number}
|
|
100
|
+
*/
|
|
101
|
+
ImplicitSubtreeCache.comparator = function (a, b) {
|
|
102
|
+
const aCoord = a.subtree.implicitCoordinates;
|
|
103
|
+
const bCoord = b.subtree.implicitCoordinates;
|
|
104
|
+
if (aCoord.isAncestor(bCoord)) {
|
|
105
|
+
// Technically this shouldn't happen because the ancestor subtree was supposed to be added to the cache first.
|
|
106
|
+
return +1.0;
|
|
107
|
+
} else if (bCoord.isAncestor(aCoord)) {
|
|
108
|
+
return -1.0;
|
|
109
|
+
}
|
|
110
|
+
return a.stamp - b.stamp;
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* @alias ImplicitSubtreeCacheNode
|
|
115
|
+
* @constructor
|
|
116
|
+
*
|
|
117
|
+
* @param {ImplicitSubtree} subtree
|
|
118
|
+
* @param {Number} stamp
|
|
119
|
+
*
|
|
120
|
+
* @private
|
|
121
|
+
*/
|
|
122
|
+
function ImplicitSubtreeCacheNode(subtree, stamp) {
|
|
123
|
+
this.subtree = subtree;
|
|
124
|
+
this.stamp = stamp;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export default ImplicitSubtreeCache;
|
|
@@ -54,7 +54,7 @@ Object.defineProperties(ImplicitSubtreeMetadata.prototype, {
|
|
|
54
54
|
},
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
|
-
*
|
|
57
|
+
* Extra user-defined properties.
|
|
58
58
|
*
|
|
59
59
|
* @memberof ImplicitSubtreeMetadata.prototype
|
|
60
60
|
* @type {Object}
|
|
@@ -68,7 +68,7 @@ Object.defineProperties(ImplicitSubtreeMetadata.prototype, {
|
|
|
68
68
|
},
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
|
-
*
|
|
71
|
+
* An object containing extensions.
|
|
72
72
|
*
|
|
73
73
|
* @memberof ImplicitSubtreeMetadata.prototype
|
|
74
74
|
* @type {Object}
|
|
@@ -64,10 +64,11 @@ function ImplicitTileset(baseResource, tileJson, metadataSchema) {
|
|
|
64
64
|
if (
|
|
65
65
|
!defined(boundingVolume.box) &&
|
|
66
66
|
!defined(boundingVolume.region) &&
|
|
67
|
-
!hasExtension(boundingVolume, "3DTILES_bounding_volume_S2")
|
|
67
|
+
!hasExtension(boundingVolume, "3DTILES_bounding_volume_S2") &&
|
|
68
|
+
!hasExtension(boundingVolume, "3DTILES_bounding_volume_cylinder")
|
|
68
69
|
) {
|
|
69
70
|
throw new RuntimeError(
|
|
70
|
-
"Only box, region and
|
|
71
|
+
"Only box, region, 3DTILES_bounding_volume_S2, and 3DTILES_bounding_volume_cylinder are supported for implicit tiling"
|
|
71
72
|
);
|
|
72
73
|
}
|
|
73
74
|
|