@cesium/engine 2.1.0 → 2.3.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-8a5a065e.js → AttributeCompression-f9f6c717.js} +1 -1
- package/Build/Workers/{AxisAlignedBoundingBox-a6f9f0e5.js → AxisAlignedBoundingBox-31fadcf0.js} +1 -1
- package/Build/Workers/{BoundingRectangle-b0a68595.js → BoundingRectangle-995f0079.js} +1 -1
- package/Build/Workers/{BoxGeometry-baedd794.js → BoxGeometry-7eb1af60.js} +1 -1
- package/Build/Workers/{Color-f85df1be.js → Color-2dc49658.js} +1 -1
- package/Build/Workers/{CoplanarPolygonGeometryLibrary-30516950.js → CoplanarPolygonGeometryLibrary-d7d972d6.js} +1 -1
- package/Build/Workers/{CorridorGeometryLibrary-5d5d3b3a.js → CorridorGeometryLibrary-1f5ef7b3.js} +1 -1
- package/Build/Workers/{CylinderGeometry-d899ae26.js → CylinderGeometry-23c67a6c.js} +1 -1
- package/Build/Workers/{CylinderGeometryLibrary-135b0858.js → CylinderGeometryLibrary-7bf291b4.js} +1 -1
- package/Build/Workers/{EllipseGeometry-a49f8449.js → EllipseGeometry-37014da4.js} +1 -1
- package/Build/Workers/{EllipseGeometryLibrary-cba7edde.js → EllipseGeometryLibrary-92ab6b1e.js} +1 -1
- package/Build/Workers/{EllipseOutlineGeometry-8095c8cb.js → EllipseOutlineGeometry-12b6fef5.js} +1 -1
- package/Build/Workers/{EllipsoidGeodesic-dcff5cbd.js → EllipsoidGeodesic-5b3623dc.js} +1 -1
- package/Build/Workers/{EllipsoidGeometry-ed93f571.js → EllipsoidGeometry-508da15c.js} +1 -1
- package/Build/Workers/{EllipsoidOutlineGeometry-e4854854.js → EllipsoidOutlineGeometry-40d97455.js} +1 -1
- package/Build/Workers/{EllipsoidRhumbLine-b672d507.js → EllipsoidRhumbLine-ef872433.js} +1 -1
- package/Build/Workers/{EllipsoidTangentPlane-7ae1aa9a.js → EllipsoidTangentPlane-46d4d9c2.js} +1 -1
- package/Build/Workers/{EncodedCartesian3-e8bbca36.js → EncodedCartesian3-57415c8a.js} +1 -1
- package/Build/Workers/{FrustumGeometry-b62db3e3.js → FrustumGeometry-38605e69.js} +32 -4
- package/Build/Workers/{GeometryAttribute-780af4fa.js → GeometryAttribute-a466e9c7.js} +1 -1
- package/Build/Workers/{GeometryInstance-3fb607b7.js → GeometryInstance-34d9e21e.js} +1 -1
- package/Build/Workers/{GeometryPipeline-36b61c99.js → GeometryPipeline-dcf79306.js} +1 -1
- package/Build/Workers/{IndexDatatype-b8f3e09d.js → IndexDatatype-2643aa47.js} +1 -1
- package/Build/Workers/{IntersectionTests-e889fcf0.js → IntersectionTests-88c49b2e.js} +1 -1
- package/Build/Workers/{Math-dad82b4d.js → Math-0a2ac845.js} +12 -2
- package/Build/Workers/{Matrix2-1e403d0e.js → Matrix2-e1298525.js} +1 -1
- package/Build/Workers/{Matrix3-fa806b97.js → Matrix3-41c58dde.js} +1 -1
- package/Build/Workers/{OrientedBoundingBox-43478ac8.js → OrientedBoundingBox-2dd47921.js} +5 -3
- package/Build/Workers/{Plane-c27e1ac6.js → Plane-4c3d403b.js} +1 -1
- package/Build/Workers/{PolygonGeometryLibrary-38a98276.js → PolygonGeometryLibrary-59126025.js} +1 -1
- package/Build/Workers/PolygonPipeline-1fe328c0.js +1344 -0
- package/Build/Workers/{PolylinePipeline-30e4cec9.js → PolylinePipeline-896735cc.js} +1 -1
- package/Build/Workers/{PolylineVolumeGeometryLibrary-90551d26.js → PolylineVolumeGeometryLibrary-9c0639f7.js} +1 -1
- package/Build/Workers/{PrimitivePipeline-558d9cb0.js → PrimitivePipeline-fc1a47ff.js} +1 -1
- package/Build/Workers/{RectangleGeometryLibrary-815c68df.js → RectangleGeometryLibrary-a23c9ebe.js} +1 -1
- package/Build/Workers/{TerrainEncoding-341ead52.js → TerrainEncoding-51b8b33b.js} +1 -1
- package/Build/Workers/Transforms-bc45e707.js +14699 -0
- package/Build/Workers/{WallGeometryLibrary-ccf90976.js → WallGeometryLibrary-007e9883.js} +1 -1
- package/Build/Workers/{WebMercatorProjection-76a3fcc0.js → WebMercatorProjection-13ed1a6e.js} +1 -1
- package/Build/Workers/{arrayRemoveDuplicates-fac118a8.js → arrayRemoveDuplicates-d2061e85.js} +1 -1
- package/Build/Workers/cesiumWorkerBootstrapper.js +1 -1
- 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 +5 -8
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +10 -15
- package/Build/Workers/createWallGeometry.js +1 -1
- package/Build/Workers/createWallOutlineGeometry.js +1 -1
- package/Build/Workers/decodeDraco.js +1 -1
- package/Build/Workers/decodeI3S.js +1 -1
- package/Build/Workers/package.js +1 -1
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +1 -1
- package/Source/Core/ArcGISTiledElevationTerrainProvider.js +291 -191
- package/Source/Core/BingMapsGeocoderService.js +19 -1
- package/Source/Core/CartographicGeocoderService.js +15 -0
- package/Source/Core/CesiumTerrainProvider.js +571 -434
- package/Source/Core/Credit.js +1 -1
- package/Source/Core/CustomHeightmapTerrainProvider.js +12 -0
- package/Source/Core/EllipsoidTerrainProvider.js +17 -10
- package/Source/Core/FrustumGeometry.js +4 -3
- package/Source/Core/GeocoderService.js +32 -1
- package/Source/Core/GoogleEarthEnterpriseMetadata.js +86 -34
- package/Source/Core/GoogleEarthEnterpriseTerrainProvider.js +119 -82
- package/Source/Core/Ion.js +1 -1
- package/Source/Core/IonGeocoderService.js +17 -2
- package/Source/Core/IonResource.js +14 -3
- package/Source/Core/OpenCageGeocoderService.js +18 -1
- package/Source/Core/OrientedBoundingBox.js +4 -2
- package/Source/Core/OrthographicFrustum.js +13 -0
- package/Source/Core/PeliasGeocoderService.js +14 -1
- package/Source/Core/PerspectiveFrustum.js +14 -0
- package/Source/Core/Request.js +3 -2
- package/Source/Core/RequestScheduler.js +10 -5
- package/Source/Core/Resource.js +230 -236
- package/Source/Core/TerrainProvider.js +9 -14
- package/Source/Core/TileProviderError.js +8 -8
- package/Source/Core/VRTheWorldTerrainProvider.js +193 -124
- package/Source/Core/buildModuleUrl.js +4 -3
- package/Source/Core/createWorldTerrain.js +20 -2
- package/Source/Core/createWorldTerrainAsync.js +48 -0
- package/Source/Core/sampleTerrain.js +9 -10
- package/Source/Core/sampleTerrainMostDetailed.js +66 -72
- package/Source/DataSources/Cesium3DTilesetVisualizer.js +37 -26
- package/Source/DataSources/DataSourceDisplay.js +2 -2
- package/Source/DataSources/Entity.js +6 -1
- package/Source/DataSources/EntityCluster.js +126 -128
- package/Source/DataSources/ModelVisualizer.js +104 -34
- package/Source/DataSources/PolygonGraphics.js +1 -1
- package/Source/Renderer/UniformState.js +3 -2
- package/Source/Renderer/demodernizeShader.js +5 -5
- package/Source/Scene/ArcGisBaseMapType.js +12 -0
- package/Source/Scene/ArcGisMapServerImageryProvider.js +694 -376
- package/Source/Scene/ArcGisMapService.js +83 -0
- package/Source/Scene/BingMapsImageryProvider.js +511 -305
- package/Source/Scene/BufferLoader.js +29 -34
- package/Source/Scene/Camera.js +8 -7
- package/Source/Scene/Cesium3DTile.js +392 -254
- package/Source/Scene/Cesium3DTileBatchTable.js +2 -2
- package/Source/Scene/Cesium3DTileContent.js +16 -0
- package/Source/Scene/Cesium3DTileContentFactory.js +4 -4
- package/Source/Scene/Cesium3DTilePass.js +8 -11
- package/Source/Scene/Cesium3DTileStyleEngine.js +1 -1
- package/Source/Scene/Cesium3DTilesVoxelProvider.js +225 -117
- package/Source/Scene/Cesium3DTileset.js +756 -482
- package/Source/Scene/Cesium3DTilesetBaseTraversal.js +301 -0
- package/Source/Scene/Cesium3DTilesetMostDetailedTraversal.js +33 -46
- package/Source/Scene/Cesium3DTilesetSkipTraversal.js +421 -0
- package/Source/Scene/Cesium3DTilesetTraversal.js +219 -671
- package/Source/Scene/ClassificationPrimitive.js +7 -0
- package/Source/Scene/Composite3DTileContent.js +69 -26
- package/Source/Scene/CreditDisplay.js +132 -20
- package/Source/Scene/DepthPlane.js +1 -1
- package/Source/Scene/Empty3DTileContent.js +31 -1
- package/Source/Scene/Geometry3DTileContent.js +47 -7
- package/Source/Scene/Globe.js +5 -1
- package/Source/Scene/GlobeSurfaceTile.js +2 -1
- package/Source/Scene/GlobeSurfaceTileProvider.js +53 -30
- package/Source/Scene/GltfBufferViewLoader.js +47 -91
- package/Source/Scene/GltfDracoLoader.js +110 -112
- package/Source/Scene/GltfImageLoader.js +71 -78
- package/Source/Scene/GltfIndexBufferLoader.js +108 -121
- package/Source/Scene/GltfJsonLoader.js +87 -74
- package/Source/Scene/GltfLoader.js +381 -300
- package/Source/Scene/GltfStructuralMetadataLoader.js +109 -110
- package/Source/Scene/GltfTextureLoader.js +97 -96
- package/Source/Scene/GltfVertexBufferLoader.js +128 -133
- package/Source/Scene/GoogleEarthEnterpriseImageryProvider.js +353 -225
- package/Source/Scene/GoogleEarthEnterpriseMapsProvider.js +491 -331
- package/Source/Scene/GridImageryProvider.js +267 -104
- package/Source/Scene/GroundPolylinePrimitive.js +12 -1
- package/Source/Scene/GroundPrimitive.js +8 -1
- package/Source/Scene/I3SDataProvider.js +214 -113
- package/Source/Scene/I3SFeature.js +7 -6
- package/Source/Scene/I3SLayer.js +26 -37
- package/Source/Scene/I3SNode.js +59 -66
- package/Source/Scene/Imagery.js +6 -1
- package/Source/Scene/ImageryLayer.js +299 -48
- package/Source/Scene/ImageryLayerCollection.js +26 -0
- package/Source/Scene/ImageryProvider.js +129 -111
- package/Source/Scene/Implicit3DTileContent.js +72 -23
- package/Source/Scene/ImplicitSubtree.js +66 -45
- package/Source/Scene/IonImageryProvider.js +482 -275
- package/Source/Scene/MapboxImageryProvider.js +272 -112
- package/Source/Scene/MapboxStyleImageryProvider.js +270 -111
- package/Source/Scene/MetadataSchemaLoader.js +26 -36
- package/Source/Scene/Model/B3dmLoader.js +42 -46
- package/Source/Scene/Model/GeoJsonLoader.js +8 -32
- package/Source/Scene/Model/I3dmLoader.js +48 -74
- package/Source/Scene/Model/MaterialPipelineStage.js +12 -12
- package/Source/Scene/Model/Model.js +514 -135
- package/Source/Scene/Model/Model3DTileContent.js +83 -31
- package/Source/Scene/Model/ModelAnimationCollection.js +3 -3
- package/Source/Scene/Model/ModelDrawCommand.js +15 -26
- package/Source/Scene/Model/ModelUtility.js +16 -16
- package/Source/Scene/Model/PntsLoader.js +27 -32
- package/Source/Scene/Model/UniformType.js +1 -1
- package/Source/Scene/Multiple3DTileContent.js +134 -115
- package/Source/Scene/Picking.js +3 -2
- package/Source/Scene/PointCloud.js +11 -19
- package/Source/Scene/Primitive.js +20 -0
- package/Source/Scene/QuadtreePrimitive.js +5 -2
- package/Source/Scene/QuadtreeTileProvider.js +4 -8
- package/Source/Scene/ResourceCache.js +47 -105
- package/Source/Scene/ResourceCacheStatistics.js +24 -58
- package/Source/Scene/ResourceLoader.js +5 -17
- package/Source/Scene/ResourceLoaderState.js +12 -4
- package/Source/Scene/Scene.js +65 -0
- package/Source/Scene/SceneTransforms.js +3 -2
- package/Source/Scene/ScreenSpaceCameraController.js +2 -2
- package/Source/Scene/SingleTileImageryProvider.js +382 -209
- package/Source/Scene/Terrain.js +196 -0
- package/Source/Scene/TileCoordinatesImageryProvider.js +267 -104
- package/Source/Scene/TileMapServiceImageryProvider.js +177 -85
- package/Source/Scene/Tileset3DTileContent.js +47 -5
- package/Source/Scene/TimeDynamicPointCloud.js +15 -2
- package/Source/Scene/UrlTemplateImageryProvider.js +343 -215
- package/Source/Scene/Vector3DTileClampedPolylines.js +96 -84
- package/Source/Scene/Vector3DTileContent.js +47 -22
- package/Source/Scene/Vector3DTileGeometry.js +57 -52
- package/Source/Scene/Vector3DTilePoints.js +97 -81
- package/Source/Scene/Vector3DTilePolygons.js +118 -117
- package/Source/Scene/Vector3DTilePolylines.js +86 -82
- package/Source/Scene/Vector3DTilePrimitive.js +0 -1
- package/Source/Scene/VoxelContent.js +61 -63
- package/Source/Scene/VoxelPrimitive.js +39 -91
- package/Source/Scene/VoxelProvider.js +2 -2
- package/Source/Scene/WebMapServiceImageryProvider.js +272 -111
- package/Source/Scene/WebMapTileServiceImageryProvider.js +270 -107
- package/Source/Scene/computeFlyToLocationForRectangle.js +33 -37
- package/Source/Scene/createOsmBuildings.js +6 -0
- package/Source/Scene/createOsmBuildingsAsync.js +82 -0
- package/Source/Scene/createWorldImagery.js +14 -5
- package/Source/Scene/createWorldImageryAsync.js +39 -0
- package/Source/Shaders/AtmosphereCommon.glsl +51 -8
- package/Source/Shaders/AtmosphereCommon.js +51 -8
- package/Source/Shaders/PostProcessStages/AmbientOcclusionGenerate.glsl +1 -1
- package/Source/Shaders/PostProcessStages/AmbientOcclusionGenerate.js +1 -1
- package/Source/Shaders/PostProcessStages/AmbientOcclusionModulate.glsl +3 -3
- package/Source/Shaders/PostProcessStages/AmbientOcclusionModulate.js +3 -3
- package/Source/Widget/CesiumWidget.js +67 -27
- package/index.d.ts +2429 -1475
- package/index.js +324 -315
- package/package.json +4 -4
- package/Build/Workers/PolygonPipeline-d31ff61c.js +0 -1345
- package/Build/Workers/Transforms-9e9df299.js +0 -14714
|
@@ -43,92 +43,6 @@ import Resource from "../Core/Resource.js";
|
|
|
43
43
|
* @demo {@link https://sandcastle.cesium.com/index.html?src=Imagery%20Layers%20Manipulation.html|Cesium Sandcastle Imagery Manipulation Demo}
|
|
44
44
|
*/
|
|
45
45
|
function ImageryProvider() {
|
|
46
|
-
/**
|
|
47
|
-
* The default alpha blending value of this provider, with 0.0 representing fully transparent and
|
|
48
|
-
* 1.0 representing fully opaque.
|
|
49
|
-
*
|
|
50
|
-
* @type {number|undefined}
|
|
51
|
-
* @default undefined
|
|
52
|
-
*/
|
|
53
|
-
this.defaultAlpha = undefined;
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and
|
|
57
|
-
* 1.0 representing fully opaque.
|
|
58
|
-
*
|
|
59
|
-
* @type {number|undefined}
|
|
60
|
-
* @default undefined
|
|
61
|
-
*/
|
|
62
|
-
this.defaultNightAlpha = undefined;
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and
|
|
66
|
-
* 1.0 representing fully opaque.
|
|
67
|
-
*
|
|
68
|
-
* @type {number|undefined}
|
|
69
|
-
* @default undefined
|
|
70
|
-
*/
|
|
71
|
-
this.defaultDayAlpha = undefined;
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0
|
|
75
|
-
* makes the imagery darker while greater than 1.0 makes it brighter.
|
|
76
|
-
*
|
|
77
|
-
* @type {number|undefined}
|
|
78
|
-
* @default undefined
|
|
79
|
-
*/
|
|
80
|
-
this.defaultBrightness = undefined;
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* The default contrast of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces
|
|
84
|
-
* the contrast while greater than 1.0 increases it.
|
|
85
|
-
*
|
|
86
|
-
* @type {number|undefined}
|
|
87
|
-
* @default undefined
|
|
88
|
-
*/
|
|
89
|
-
this.defaultContrast = undefined;
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* The default hue of this provider in radians. 0.0 uses the unmodified imagery color.
|
|
93
|
-
*
|
|
94
|
-
* @type {number|undefined}
|
|
95
|
-
* @default undefined
|
|
96
|
-
*/
|
|
97
|
-
this.defaultHue = undefined;
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* The default saturation of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the
|
|
101
|
-
* saturation while greater than 1.0 increases it.
|
|
102
|
-
*
|
|
103
|
-
* @type {number|undefined}
|
|
104
|
-
* @default undefined
|
|
105
|
-
*/
|
|
106
|
-
this.defaultSaturation = undefined;
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* The default gamma correction to apply to this provider. 1.0 uses the unmodified imagery color.
|
|
110
|
-
*
|
|
111
|
-
* @type {number|undefined}
|
|
112
|
-
* @default undefined
|
|
113
|
-
*/
|
|
114
|
-
this.defaultGamma = undefined;
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* The default texture minification filter to apply to this provider.
|
|
118
|
-
*
|
|
119
|
-
* @type {TextureMinificationFilter}
|
|
120
|
-
* @default undefined
|
|
121
|
-
*/
|
|
122
|
-
this.defaultMinificationFilter = undefined;
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* The default texture magnification filter to apply to this provider.
|
|
126
|
-
*
|
|
127
|
-
* @type {TextureMagnificationFilter}
|
|
128
|
-
* @default undefined
|
|
129
|
-
*/
|
|
130
|
-
this.defaultMagnificationFilter = undefined;
|
|
131
|
-
|
|
132
46
|
DeveloperError.throwInstantiationError();
|
|
133
47
|
}
|
|
134
48
|
|
|
@@ -138,6 +52,7 @@ Object.defineProperties(ImageryProvider.prototype, {
|
|
|
138
52
|
* @memberof ImageryProvider.prototype
|
|
139
53
|
* @type {boolean}
|
|
140
54
|
* @readonly
|
|
55
|
+
* @deprecated
|
|
141
56
|
*/
|
|
142
57
|
ready: {
|
|
143
58
|
get: DeveloperError.throwInstantiationError,
|
|
@@ -148,14 +63,14 @@ Object.defineProperties(ImageryProvider.prototype, {
|
|
|
148
63
|
* @memberof ImageryProvider.prototype
|
|
149
64
|
* @type {Promise<boolean>}
|
|
150
65
|
* @readonly
|
|
66
|
+
* @deprecated
|
|
151
67
|
*/
|
|
152
68
|
readyPromise: {
|
|
153
69
|
get: DeveloperError.throwInstantiationError,
|
|
154
70
|
},
|
|
155
71
|
|
|
156
72
|
/**
|
|
157
|
-
* Gets the rectangle, in radians, of the imagery provided by the instance.
|
|
158
|
-
* not be called before {@link ImageryProvider#ready} returns true.
|
|
73
|
+
* Gets the rectangle, in radians, of the imagery provided by the instance.
|
|
159
74
|
* @memberof ImageryProvider.prototype
|
|
160
75
|
* @type {Rectangle}
|
|
161
76
|
* @readonly
|
|
@@ -165,8 +80,7 @@ Object.defineProperties(ImageryProvider.prototype, {
|
|
|
165
80
|
},
|
|
166
81
|
|
|
167
82
|
/**
|
|
168
|
-
* Gets the width of each tile, in pixels.
|
|
169
|
-
* not be called before {@link ImageryProvider#ready} returns true.
|
|
83
|
+
* Gets the width of each tile, in pixels.
|
|
170
84
|
* @memberof ImageryProvider.prototype
|
|
171
85
|
* @type {number}
|
|
172
86
|
* @readonly
|
|
@@ -176,8 +90,7 @@ Object.defineProperties(ImageryProvider.prototype, {
|
|
|
176
90
|
},
|
|
177
91
|
|
|
178
92
|
/**
|
|
179
|
-
* Gets the height of each tile, in pixels.
|
|
180
|
-
* not be called before {@link ImageryProvider#ready} returns true.
|
|
93
|
+
* Gets the height of each tile, in pixels.
|
|
181
94
|
* @memberof ImageryProvider.prototype
|
|
182
95
|
* @type {number}
|
|
183
96
|
* @readonly
|
|
@@ -187,8 +100,7 @@ Object.defineProperties(ImageryProvider.prototype, {
|
|
|
187
100
|
},
|
|
188
101
|
|
|
189
102
|
/**
|
|
190
|
-
* Gets the maximum level-of-detail that can be requested.
|
|
191
|
-
* not be called before {@link ImageryProvider#ready} returns true.
|
|
103
|
+
* Gets the maximum level-of-detail that can be requested.
|
|
192
104
|
* @memberof ImageryProvider.prototype
|
|
193
105
|
* @type {number|undefined}
|
|
194
106
|
* @readonly
|
|
@@ -198,8 +110,7 @@ Object.defineProperties(ImageryProvider.prototype, {
|
|
|
198
110
|
},
|
|
199
111
|
|
|
200
112
|
/**
|
|
201
|
-
* Gets the minimum level-of-detail that can be requested.
|
|
202
|
-
* not be called before {@link ImageryProvider#ready} returns true. Generally,
|
|
113
|
+
* Gets the minimum level-of-detail that can be requested. Generally,
|
|
203
114
|
* a minimum level should only be used when the rectangle of the imagery is small
|
|
204
115
|
* enough that the number of tiles at the minimum level is small. An imagery
|
|
205
116
|
* provider with more than a few tiles at the minimum level will lead to
|
|
@@ -213,8 +124,7 @@ Object.defineProperties(ImageryProvider.prototype, {
|
|
|
213
124
|
},
|
|
214
125
|
|
|
215
126
|
/**
|
|
216
|
-
* Gets the tiling scheme used by the provider.
|
|
217
|
-
* not be called before {@link ImageryProvider#ready} returns true.
|
|
127
|
+
* Gets the tiling scheme used by the provider.
|
|
218
128
|
* @memberof ImageryProvider.prototype
|
|
219
129
|
* @type {TilingScheme}
|
|
220
130
|
* @readonly
|
|
@@ -226,8 +136,7 @@ Object.defineProperties(ImageryProvider.prototype, {
|
|
|
226
136
|
/**
|
|
227
137
|
* Gets the tile discard policy. If not undefined, the discard policy is responsible
|
|
228
138
|
* for filtering out "missing" tiles via its shouldDiscardImage function. If this function
|
|
229
|
-
* returns undefined, no tiles are filtered.
|
|
230
|
-
* not be called before {@link ImageryProvider#ready} returns true.
|
|
139
|
+
* returns undefined, no tiles are filtered.
|
|
231
140
|
* @memberof ImageryProvider.prototype
|
|
232
141
|
* @type {TileDiscardPolicy}
|
|
233
142
|
* @readonly
|
|
@@ -237,7 +146,7 @@ Object.defineProperties(ImageryProvider.prototype, {
|
|
|
237
146
|
},
|
|
238
147
|
|
|
239
148
|
/**
|
|
240
|
-
* Gets an event that is raised when the imagery provider encounters an asynchronous error
|
|
149
|
+
* Gets an event that is raised when the imagery provider encounters an asynchronous error. By subscribing
|
|
241
150
|
* to the event, you will be notified of the error and can potentially recover from it. Event listeners
|
|
242
151
|
* are passed an instance of {@link TileProviderError}.
|
|
243
152
|
* @memberof ImageryProvider.prototype
|
|
@@ -250,8 +159,7 @@ Object.defineProperties(ImageryProvider.prototype, {
|
|
|
250
159
|
|
|
251
160
|
/**
|
|
252
161
|
* Gets the credit to display when this imagery provider is active. Typically this is used to credit
|
|
253
|
-
* the source of the imagery.
|
|
254
|
-
* not be called before {@link ImageryProvider#ready} returns true.
|
|
162
|
+
* the source of the imagery.
|
|
255
163
|
* @memberof ImageryProvider.prototype
|
|
256
164
|
* @type {Credit}
|
|
257
165
|
* @readonly
|
|
@@ -283,6 +191,122 @@ Object.defineProperties(ImageryProvider.prototype, {
|
|
|
283
191
|
hasAlphaChannel: {
|
|
284
192
|
get: DeveloperError.throwInstantiationError,
|
|
285
193
|
},
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* The default alpha blending value of this provider, with 0.0 representing fully transparent and
|
|
197
|
+
* 1.0 representing fully opaque.
|
|
198
|
+
* @memberof ImageryProvider.prototype
|
|
199
|
+
* @type {Number|undefined}
|
|
200
|
+
* @deprecated
|
|
201
|
+
*/
|
|
202
|
+
defaultAlpha: {
|
|
203
|
+
get: DeveloperError.throwInstantiationError,
|
|
204
|
+
set: DeveloperError.throwInstantiationError,
|
|
205
|
+
},
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and
|
|
209
|
+
* 1.0 representing fully opaque.
|
|
210
|
+
* @memberof ImageryProvider.prototype
|
|
211
|
+
* @type {Number|undefined}
|
|
212
|
+
* @deprecated
|
|
213
|
+
*/
|
|
214
|
+
defaultNightAlpha: {
|
|
215
|
+
get: DeveloperError.throwInstantiationError,
|
|
216
|
+
set: DeveloperError.throwInstantiationError,
|
|
217
|
+
},
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and
|
|
221
|
+
* 1.0 representing fully opaque.
|
|
222
|
+
* @memberof ImageryProvider.prototype
|
|
223
|
+
* @type {Number|undefined}
|
|
224
|
+
* @deprecated
|
|
225
|
+
*/
|
|
226
|
+
defaultDayAlpha: {
|
|
227
|
+
get: DeveloperError.throwInstantiationError,
|
|
228
|
+
set: DeveloperError.throwInstantiationError,
|
|
229
|
+
},
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0
|
|
233
|
+
* makes the imagery darker while greater than 1.0 makes it brighter.
|
|
234
|
+
* @memberof ImageryProvider.prototype
|
|
235
|
+
* @type {Number|undefined}
|
|
236
|
+
* @deprecated
|
|
237
|
+
*/
|
|
238
|
+
defaultBrightness: {
|
|
239
|
+
get: DeveloperError.throwInstantiationError,
|
|
240
|
+
set: DeveloperError.throwInstantiationError,
|
|
241
|
+
},
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* The default contrast of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces
|
|
245
|
+
* the contrast while greater than 1.0 increases it.
|
|
246
|
+
* @memberof ImageryProvider.prototype
|
|
247
|
+
* @type {Number|undefined}
|
|
248
|
+
* @deprecated
|
|
249
|
+
*/
|
|
250
|
+
defaultContrast: {
|
|
251
|
+
get: DeveloperError.throwInstantiationError,
|
|
252
|
+
set: DeveloperError.throwInstantiationError,
|
|
253
|
+
},
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* The default hue of this provider in radians. 0.0 uses the unmodified imagery color.
|
|
257
|
+
* @memberof ImageryProvider.prototype
|
|
258
|
+
* @type {Number|undefined}
|
|
259
|
+
* @deprecated
|
|
260
|
+
*/
|
|
261
|
+
defaultHue: {
|
|
262
|
+
get: DeveloperError.throwInstantiationError,
|
|
263
|
+
set: DeveloperError.throwInstantiationError,
|
|
264
|
+
},
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* The default saturation of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the
|
|
268
|
+
* saturation while greater than 1.0 increases it.
|
|
269
|
+
* @memberof ImageryProvider.prototype
|
|
270
|
+
* @type {Number|undefined}
|
|
271
|
+
* @deprecated
|
|
272
|
+
*/
|
|
273
|
+
defaultSaturation: {
|
|
274
|
+
get: DeveloperError.throwInstantiationError,
|
|
275
|
+
set: DeveloperError.throwInstantiationError,
|
|
276
|
+
},
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* The default gamma correction to apply to this provider. 1.0 uses the unmodified imagery color.
|
|
280
|
+
* @memberof ImageryProvider.prototype
|
|
281
|
+
* @type {Number|undefined}
|
|
282
|
+
* @deprecated
|
|
283
|
+
*/
|
|
284
|
+
defaultGamma: {
|
|
285
|
+
get: DeveloperError.throwInstantiationError,
|
|
286
|
+
set: DeveloperError.throwInstantiationError,
|
|
287
|
+
},
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* The default texture minification filter to apply to this provider.
|
|
291
|
+
* @memberof ImageryProvider.prototype
|
|
292
|
+
* @type {TextureMinificationFilter}
|
|
293
|
+
* @deprecated
|
|
294
|
+
*/
|
|
295
|
+
defaultMinificationFilter: {
|
|
296
|
+
get: DeveloperError.throwInstantiationError,
|
|
297
|
+
set: DeveloperError.throwInstantiationError,
|
|
298
|
+
},
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* The default texture magnification filter to apply to this provider.
|
|
302
|
+
* @memberof ImageryProvider.prototype
|
|
303
|
+
* @type {TextureMagnificationFilter}
|
|
304
|
+
* @deprecated
|
|
305
|
+
*/
|
|
306
|
+
defaultMagnificationFilter: {
|
|
307
|
+
get: DeveloperError.throwInstantiationError,
|
|
308
|
+
set: DeveloperError.throwInstantiationError,
|
|
309
|
+
},
|
|
286
310
|
});
|
|
287
311
|
|
|
288
312
|
/**
|
|
@@ -292,16 +316,13 @@ Object.defineProperties(ImageryProvider.prototype, {
|
|
|
292
316
|
* @param {number} y The tile Y coordinate.
|
|
293
317
|
* @param {number} level The tile level;
|
|
294
318
|
* @returns {Credit[]} The credits to be displayed when the tile is displayed.
|
|
295
|
-
*
|
|
296
|
-
* @exception {DeveloperError} <code>getTileCredits</code> must not be called before the imagery provider is ready.
|
|
297
319
|
*/
|
|
298
320
|
ImageryProvider.prototype.getTileCredits = function (x, y, level) {
|
|
299
321
|
DeveloperError.throwInstantiationError();
|
|
300
322
|
};
|
|
301
323
|
|
|
302
324
|
/**
|
|
303
|
-
* Requests the image for a given tile.
|
|
304
|
-
* not be called before {@link ImageryProvider#ready} returns true.
|
|
325
|
+
* Requests the image for a given tile.
|
|
305
326
|
*
|
|
306
327
|
* @param {number} x The tile X coordinate.
|
|
307
328
|
* @param {number} y The tile Y coordinate.
|
|
@@ -309,8 +330,6 @@ ImageryProvider.prototype.getTileCredits = function (x, y, level) {
|
|
|
309
330
|
* @param {Request} [request] The request object. Intended for internal use only.
|
|
310
331
|
* @returns {Promise<ImageryTypes>|undefined} Returns a promise for the image that will resolve when the image is available, or
|
|
311
332
|
* undefined if there are too many active requests to the server, and the request should be retried later.
|
|
312
|
-
*
|
|
313
|
-
* @exception {DeveloperError} <code>requestImage</code> must not be called before the imagery provider is ready.
|
|
314
333
|
*/
|
|
315
334
|
ImageryProvider.prototype.requestImage = function (x, y, level, request) {
|
|
316
335
|
DeveloperError.throwInstantiationError();
|
|
@@ -318,7 +337,7 @@ ImageryProvider.prototype.requestImage = function (x, y, level, request) {
|
|
|
318
337
|
|
|
319
338
|
/**
|
|
320
339
|
* Asynchronously determines what features, if any, are located at a given longitude and latitude within
|
|
321
|
-
* a tile.
|
|
340
|
+
* a tile.
|
|
322
341
|
* This function is optional, so it may not exist on all ImageryProviders.
|
|
323
342
|
*
|
|
324
343
|
* @function
|
|
@@ -333,7 +352,6 @@ ImageryProvider.prototype.requestImage = function (x, y, level, request) {
|
|
|
333
352
|
* instances. The array may be empty if no features are found at the given location.
|
|
334
353
|
* It may also be undefined if picking is not supported.
|
|
335
354
|
*
|
|
336
|
-
* @exception {DeveloperError} <code>pickFeatures</code> must not be called before the imagery provider is ready.
|
|
337
355
|
*/
|
|
338
356
|
ImageryProvider.prototype.pickFeatures = function (
|
|
339
357
|
x,
|
|
@@ -4,6 +4,7 @@ import clone from "../Core/clone.js";
|
|
|
4
4
|
import combine from "../Core/combine.js";
|
|
5
5
|
import defaultValue from "../Core/defaultValue.js";
|
|
6
6
|
import defined from "../Core/defined.js";
|
|
7
|
+
import deprecationWarning from "../Core/deprecationWarning.js";
|
|
7
8
|
import destroyObject from "../Core/destroyObject.js";
|
|
8
9
|
import DeveloperError from "../Core/DeveloperError.js";
|
|
9
10
|
import CesiumMath from "../Core/Math.js";
|
|
@@ -26,6 +27,7 @@ import parseBoundingVolumeSemantics from "./parseBoundingVolumeSemantics.js";
|
|
|
26
27
|
* <p>
|
|
27
28
|
* Implements the {@link Cesium3DTileContent} interface.
|
|
28
29
|
* </p>
|
|
30
|
+
* This object is normally not instantiated directly, use {@link Implicit3DTileContent.fromSubtreeJson}.
|
|
29
31
|
*
|
|
30
32
|
* @alias Implicit3DTileContent
|
|
31
33
|
* @constructor
|
|
@@ -42,20 +44,10 @@ import parseBoundingVolumeSemantics from "./parseBoundingVolumeSemantics.js";
|
|
|
42
44
|
* @private
|
|
43
45
|
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
|
|
44
46
|
*/
|
|
45
|
-
function Implicit3DTileContent(
|
|
46
|
-
tileset,
|
|
47
|
-
tile,
|
|
48
|
-
resource,
|
|
49
|
-
json,
|
|
50
|
-
arrayBuffer,
|
|
51
|
-
byteOffset
|
|
52
|
-
) {
|
|
47
|
+
function Implicit3DTileContent(tileset, tile, resource) {
|
|
53
48
|
//>>includeStart('debug', pragmas.debug);
|
|
54
49
|
Check.defined("tile.implicitTileset", tile.implicitTileset);
|
|
55
50
|
Check.defined("tile.implicitCoordinates", tile.implicitCoordinates);
|
|
56
|
-
if (defined(json) === defined(arrayBuffer)) {
|
|
57
|
-
throw new DeveloperError("One of json and arrayBuffer must be defined.");
|
|
58
|
-
}
|
|
59
51
|
//>>includeEnd('debug');
|
|
60
52
|
|
|
61
53
|
const implicitTileset = tile.implicitTileset;
|
|
@@ -81,7 +73,8 @@ function Implicit3DTileContent(
|
|
|
81
73
|
);
|
|
82
74
|
this._url = subtreeResource.getUrlComponent(true);
|
|
83
75
|
|
|
84
|
-
this.
|
|
76
|
+
this._ready = false;
|
|
77
|
+
this._readyPromise = undefined;
|
|
85
78
|
}
|
|
86
79
|
|
|
87
80
|
Object.defineProperties(Implicit3DTileContent.prototype, {
|
|
@@ -127,8 +120,37 @@ Object.defineProperties(Implicit3DTileContent.prototype, {
|
|
|
127
120
|
},
|
|
128
121
|
},
|
|
129
122
|
|
|
123
|
+
/**
|
|
124
|
+
* Returns true when the tile's content is ready to render; otherwise false
|
|
125
|
+
*
|
|
126
|
+
* @memberof Implicit3DTileContent.prototype
|
|
127
|
+
*
|
|
128
|
+
* @type {boolean}
|
|
129
|
+
* @readonly
|
|
130
|
+
* @private
|
|
131
|
+
*/
|
|
132
|
+
ready: {
|
|
133
|
+
get: function () {
|
|
134
|
+
return this._ready;
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Gets the promise that will be resolved when the tile's content is ready to render.
|
|
140
|
+
*
|
|
141
|
+
* @memberof Implicit3DTileContent.prototype
|
|
142
|
+
*
|
|
143
|
+
* @type {Promise<Implicit3DTileContent>}
|
|
144
|
+
* @readonly
|
|
145
|
+
* @deprecated
|
|
146
|
+
* @private
|
|
147
|
+
*/
|
|
130
148
|
readyPromise: {
|
|
131
149
|
get: function () {
|
|
150
|
+
deprecationWarning(
|
|
151
|
+
"Implicit3DTileContent.readyPromise",
|
|
152
|
+
"Implicit3DTileContent.readyPromise was deprecated in CesiumJS 1.104. It will be removed in 1.107. Wait for Implicit3DTileContent.ready to return true instead."
|
|
153
|
+
);
|
|
132
154
|
return this._readyPromise;
|
|
133
155
|
},
|
|
134
156
|
},
|
|
@@ -188,33 +210,60 @@ Object.defineProperties(Implicit3DTileContent.prototype, {
|
|
|
188
210
|
* Initialize the implicit content by parsing the subtree resource and setting
|
|
189
211
|
* up a promise chain to expand the immediate subtree.
|
|
190
212
|
*
|
|
191
|
-
* @param {
|
|
213
|
+
* @param {Cesium3DTileset} tileset The tileset this content belongs to
|
|
214
|
+
* @param {Cesium3DTile} tile The tile this content belongs to.
|
|
215
|
+
* @param {Resource} resource The resource for the tileset
|
|
192
216
|
* @param {object} [json] The JSON containing the subtree. Mutually exclusive with arrayBuffer.
|
|
193
217
|
* @param {ArrayBuffer} [arrayBuffer] The ArrayBuffer containing a subtree binary. Mutually exclusive with json.
|
|
194
218
|
* @param {number} [byteOffset=0] The byte offset into the arrayBuffer
|
|
219
|
+
* @return {Promise<Implicit3DTileContent>}
|
|
220
|
+
*
|
|
221
|
+
* @exception {DeveloperError} One of json and arrayBuffer must be defined.
|
|
222
|
+
*
|
|
195
223
|
* @private
|
|
196
224
|
*/
|
|
197
|
-
|
|
225
|
+
Implicit3DTileContent.fromSubtreeJson = async function (
|
|
226
|
+
tileset,
|
|
227
|
+
tile,
|
|
228
|
+
resource,
|
|
229
|
+
json,
|
|
230
|
+
arrayBuffer,
|
|
231
|
+
byteOffset
|
|
232
|
+
) {
|
|
233
|
+
//>>includeStart('debug', pragmas.debug);
|
|
234
|
+
Check.defined("tile.implicitTileset", tile.implicitTileset);
|
|
235
|
+
Check.defined("tile.implicitCoordinates", tile.implicitCoordinates);
|
|
236
|
+
if (defined(json) === defined(arrayBuffer)) {
|
|
237
|
+
throw new DeveloperError("One of json and arrayBuffer must be defined.");
|
|
238
|
+
}
|
|
239
|
+
//>>includeEnd('debug');
|
|
240
|
+
|
|
198
241
|
byteOffset = defaultValue(byteOffset, 0);
|
|
199
242
|
let uint8Array;
|
|
200
243
|
if (defined(arrayBuffer)) {
|
|
201
244
|
uint8Array = new Uint8Array(arrayBuffer, byteOffset);
|
|
202
245
|
}
|
|
203
246
|
|
|
204
|
-
const
|
|
205
|
-
|
|
247
|
+
const implicitTileset = tile.implicitTileset;
|
|
248
|
+
const implicitCoordinates = tile.implicitCoordinates;
|
|
249
|
+
|
|
250
|
+
const subtree = await ImplicitSubtree.fromSubtreeJson(
|
|
251
|
+
resource,
|
|
206
252
|
json,
|
|
207
253
|
uint8Array,
|
|
208
|
-
|
|
209
|
-
|
|
254
|
+
implicitTileset,
|
|
255
|
+
implicitCoordinates
|
|
210
256
|
);
|
|
211
257
|
|
|
258
|
+
const content = new Implicit3DTileContent(tileset, tile, resource);
|
|
259
|
+
|
|
212
260
|
content._implicitSubtree = subtree;
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
261
|
+
expandSubtree(content, subtree);
|
|
262
|
+
content._ready = true;
|
|
263
|
+
content._readyPromise = Promise.resolve(content);
|
|
264
|
+
|
|
265
|
+
return content;
|
|
266
|
+
};
|
|
218
267
|
|
|
219
268
|
/**
|
|
220
269
|
* Expand a single subtree placeholder tile. This transcodes the subtree into
|