@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
|
@@ -2,6 +2,7 @@ import ColorGeometryInstanceAttribute from "../Core/ColorGeometryInstanceAttribu
|
|
|
2
2
|
import combine from "../Core/combine.js";
|
|
3
3
|
import defaultValue from "../Core/defaultValue.js";
|
|
4
4
|
import defined from "../Core/defined.js";
|
|
5
|
+
import deprecationWarning from "../Core/deprecationWarning.js";
|
|
5
6
|
import destroyObject from "../Core/destroyObject.js";
|
|
6
7
|
import DeveloperError from "../Core/DeveloperError.js";
|
|
7
8
|
import GeometryInstance from "../Core/GeometryInstance.js";
|
|
@@ -164,6 +165,7 @@ function ClassificationPrimitive(options) {
|
|
|
164
165
|
this._ready = false;
|
|
165
166
|
|
|
166
167
|
const classificationPrimitive = this;
|
|
168
|
+
// This is here for backwards compatibility. This promise wrapper can be removed once readyPromise is removed.
|
|
167
169
|
this._readyPromise = new Promise((resolve, reject) => {
|
|
168
170
|
classificationPrimitive._completeLoad = () => {
|
|
169
171
|
if (this._ready) {
|
|
@@ -340,9 +342,14 @@ Object.defineProperties(ClassificationPrimitive.prototype, {
|
|
|
340
342
|
* @memberof ClassificationPrimitive.prototype
|
|
341
343
|
* @type {Promise<ClassificationPrimitive>}
|
|
342
344
|
* @readonly
|
|
345
|
+
* @deprecated
|
|
343
346
|
*/
|
|
344
347
|
readyPromise: {
|
|
345
348
|
get: function () {
|
|
349
|
+
deprecationWarning(
|
|
350
|
+
"ClassificationPrimitive.readyPromise",
|
|
351
|
+
"ClassificationPrimitive.readyPromise was deprecated in CesiumJS 1.104. It will be removed in 1.107. Wait for ClassificationPrimitive.ready to return true instead."
|
|
352
|
+
);
|
|
346
353
|
return this._readyPromise;
|
|
347
354
|
},
|
|
348
355
|
},
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import defaultValue from "../Core/defaultValue.js";
|
|
2
2
|
import defined from "../Core/defined.js";
|
|
3
|
+
import deprecationWarning from "../Core/deprecationWarning.js";
|
|
3
4
|
import destroyObject from "../Core/destroyObject.js";
|
|
4
5
|
import getMagic from "../Core/getMagic.js";
|
|
5
6
|
import RuntimeError from "../Core/RuntimeError.js";
|
|
@@ -17,23 +18,24 @@ import RuntimeError from "../Core/RuntimeError.js";
|
|
|
17
18
|
*
|
|
18
19
|
* @private
|
|
19
20
|
*/
|
|
20
|
-
function Composite3DTileContent(
|
|
21
|
-
tileset,
|
|
22
|
-
tile,
|
|
23
|
-
resource,
|
|
24
|
-
arrayBuffer,
|
|
25
|
-
byteOffset,
|
|
26
|
-
factory
|
|
27
|
-
) {
|
|
21
|
+
function Composite3DTileContent(tileset, tile, resource, contents) {
|
|
28
22
|
this._tileset = tileset;
|
|
29
23
|
this._tile = tile;
|
|
30
24
|
this._resource = resource;
|
|
31
|
-
|
|
25
|
+
|
|
26
|
+
if (!defined(contents)) {
|
|
27
|
+
contents = [];
|
|
28
|
+
}
|
|
29
|
+
this._contents = contents;
|
|
32
30
|
|
|
33
31
|
this._metadata = undefined;
|
|
34
32
|
this._group = undefined;
|
|
33
|
+
this._ready = false;
|
|
35
34
|
|
|
36
|
-
this.
|
|
35
|
+
this._resolveContent = undefined;
|
|
36
|
+
this._readyPromise = new Promise((resolve) => {
|
|
37
|
+
this._resolveContent = resolve;
|
|
38
|
+
});
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
Object.defineProperties(Composite3DTileContent.prototype, {
|
|
@@ -130,8 +132,37 @@ Object.defineProperties(Composite3DTileContent.prototype, {
|
|
|
130
132
|
},
|
|
131
133
|
},
|
|
132
134
|
|
|
135
|
+
/**
|
|
136
|
+
* Returns true when the tile's content is ready to render; otherwise false
|
|
137
|
+
*
|
|
138
|
+
* @memberof Composite3DTileContent.prototype
|
|
139
|
+
*
|
|
140
|
+
* @type {boolean}
|
|
141
|
+
* @readonly
|
|
142
|
+
* @private
|
|
143
|
+
*/
|
|
144
|
+
ready: {
|
|
145
|
+
get: function () {
|
|
146
|
+
return this._ready;
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Gets the promise that will be resolved when the tile's content is ready to render.
|
|
152
|
+
*
|
|
153
|
+
* @memberof Composite3DTileContent.prototype
|
|
154
|
+
*
|
|
155
|
+
* @type {Promise<Composite3DTileContent>}
|
|
156
|
+
* @readonly
|
|
157
|
+
* @deprecated
|
|
158
|
+
* @private
|
|
159
|
+
*/
|
|
133
160
|
readyPromise: {
|
|
134
161
|
get: function () {
|
|
162
|
+
deprecationWarning(
|
|
163
|
+
"Composite3DTileContent.readyPromise",
|
|
164
|
+
"Composite3DTileContent.readyPromise was deprecated in CesiumJS 1.104. It will be removed in 1.107. Wait for Composite3DTileContent.ready to return true instead."
|
|
165
|
+
);
|
|
135
166
|
return this._readyPromise;
|
|
136
167
|
},
|
|
137
168
|
},
|
|
@@ -210,7 +241,14 @@ Object.defineProperties(Composite3DTileContent.prototype, {
|
|
|
210
241
|
|
|
211
242
|
const sizeOfUint32 = Uint32Array.BYTES_PER_ELEMENT;
|
|
212
243
|
|
|
213
|
-
|
|
244
|
+
Composite3DTileContent.fromTileType = async function (
|
|
245
|
+
tileset,
|
|
246
|
+
tile,
|
|
247
|
+
resource,
|
|
248
|
+
arrayBuffer,
|
|
249
|
+
byteOffset,
|
|
250
|
+
factory
|
|
251
|
+
) {
|
|
214
252
|
byteOffset = defaultValue(byteOffset, 0);
|
|
215
253
|
|
|
216
254
|
const uint8Array = new Uint8Array(arrayBuffer);
|
|
@@ -231,14 +269,11 @@ function initialize(content, arrayBuffer, byteOffset, factory) {
|
|
|
231
269
|
const tilesLength = view.getUint32(byteOffset, true);
|
|
232
270
|
byteOffset += sizeOfUint32;
|
|
233
271
|
|
|
234
|
-
const contentPromises = [];
|
|
235
|
-
|
|
236
272
|
// For caching purposes, models within the composite tile must be
|
|
237
273
|
// distinguished. To do this, add a query parameter ?compositeIndex=i.
|
|
238
274
|
// Since composite tiles may contain other composite tiles, check for an
|
|
239
275
|
// existing prefix and separate them with underscores. e.g.
|
|
240
276
|
// ?compositeIndex=0_1_1
|
|
241
|
-
const resource = content._resource;
|
|
242
277
|
let prefix = resource.queryParameters.compositeIndex;
|
|
243
278
|
if (defined(prefix)) {
|
|
244
279
|
// We'll be adding another value at the end, so add an underscore.
|
|
@@ -248,6 +283,8 @@ function initialize(content, arrayBuffer, byteOffset, factory) {
|
|
|
248
283
|
prefix = "";
|
|
249
284
|
}
|
|
250
285
|
|
|
286
|
+
const promises = [];
|
|
287
|
+
promises.length = tilesLength;
|
|
251
288
|
for (let i = 0; i < tilesLength; ++i) {
|
|
252
289
|
const tileType = getMagic(uint8Array, byteOffset);
|
|
253
290
|
|
|
@@ -265,15 +302,9 @@ function initialize(content, arrayBuffer, byteOffset, factory) {
|
|
|
265
302
|
});
|
|
266
303
|
|
|
267
304
|
if (defined(contentFactory)) {
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
content._tile,
|
|
271
|
-
childResource,
|
|
272
|
-
arrayBuffer,
|
|
273
|
-
byteOffset
|
|
305
|
+
promises[i] = Promise.resolve(
|
|
306
|
+
contentFactory(tileset, tile, childResource, arrayBuffer, byteOffset)
|
|
274
307
|
);
|
|
275
|
-
content._contents.push(innerContent);
|
|
276
|
-
contentPromises.push(innerContent.readyPromise);
|
|
277
308
|
} else {
|
|
278
309
|
throw new RuntimeError(
|
|
279
310
|
`Unknown tile content type, ${tileType}, inside Composite tile`
|
|
@@ -283,10 +314,15 @@ function initialize(content, arrayBuffer, byteOffset, factory) {
|
|
|
283
314
|
byteOffset += tileByteLength;
|
|
284
315
|
}
|
|
285
316
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
317
|
+
const innerContents = await Promise.all(promises);
|
|
318
|
+
const content = new Composite3DTileContent(
|
|
319
|
+
tileset,
|
|
320
|
+
tile,
|
|
321
|
+
resource,
|
|
322
|
+
innerContents
|
|
323
|
+
);
|
|
324
|
+
return content;
|
|
325
|
+
};
|
|
290
326
|
|
|
291
327
|
/**
|
|
292
328
|
* Part of the {@link Cesium3DTileContent} interface. <code>Composite3DTileContent</code>
|
|
@@ -326,8 +362,15 @@ Composite3DTileContent.prototype.applyStyle = function (style) {
|
|
|
326
362
|
Composite3DTileContent.prototype.update = function (tileset, frameState) {
|
|
327
363
|
const contents = this._contents;
|
|
328
364
|
const length = contents.length;
|
|
365
|
+
let ready = true;
|
|
329
366
|
for (let i = 0; i < length; ++i) {
|
|
330
367
|
contents[i].update(tileset, frameState);
|
|
368
|
+
ready = ready && contents[i].ready;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
if (!this._ready && ready) {
|
|
372
|
+
this._ready = true;
|
|
373
|
+
this._resolveContent(this);
|
|
331
374
|
}
|
|
332
375
|
};
|
|
333
376
|
|
|
@@ -4,6 +4,7 @@ import Check from "../Core/Check.js";
|
|
|
4
4
|
import Credit from "../Core/Credit.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 Uri from "urijs";
|
|
9
10
|
|
|
@@ -174,7 +175,7 @@ function addStyle(selector, styles) {
|
|
|
174
175
|
return style;
|
|
175
176
|
}
|
|
176
177
|
|
|
177
|
-
function appendCss() {
|
|
178
|
+
function appendCss(container) {
|
|
178
179
|
let style = "";
|
|
179
180
|
style += addStyle(".cesium-credit-lightbox-overlay", {
|
|
180
181
|
display: "none",
|
|
@@ -270,10 +271,26 @@ function appendCss() {
|
|
|
270
271
|
}
|
|
271
272
|
);
|
|
272
273
|
|
|
273
|
-
|
|
274
|
+
function getShadowRoot(container) {
|
|
275
|
+
if (container.shadowRoot) {
|
|
276
|
+
return container.shadowRoot;
|
|
277
|
+
}
|
|
278
|
+
if (container.getRootNode) {
|
|
279
|
+
const root = container.getRootNode();
|
|
280
|
+
if (root instanceof ShadowRoot) {
|
|
281
|
+
return root;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
return undefined;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
const shadowRootOrDocumentHead = defaultValue(
|
|
288
|
+
getShadowRoot(container),
|
|
289
|
+
document.head
|
|
290
|
+
);
|
|
274
291
|
const css = document.createElement("style");
|
|
275
292
|
css.innerHTML = style;
|
|
276
|
-
|
|
293
|
+
shadowRootOrDocumentHead.appendChild(css);
|
|
277
294
|
}
|
|
278
295
|
|
|
279
296
|
/**
|
|
@@ -287,7 +304,14 @@ function appendCss() {
|
|
|
287
304
|
* @constructor
|
|
288
305
|
*
|
|
289
306
|
* @example
|
|
290
|
-
*
|
|
307
|
+
* // Add a credit with a tooltip, image and link to display onscreen
|
|
308
|
+
* const credit = new Cesium.Credit(`<a href="https://cesium.com/" target="_blank"><img src="/images/cesium_logo.png" title="Cesium"/></a>`, true);
|
|
309
|
+
* viewer.creditDisplay.addStaticCredit(credit);
|
|
310
|
+
*
|
|
311
|
+
* @example
|
|
312
|
+
* // Add a credit with a plaintext link to display in the lightbox
|
|
313
|
+
* const credit = new Cesium.Credit('<a href="https://cesium.com/" target="_blank">Cesium</a>');
|
|
314
|
+
* viewer.creditDisplay.addStaticCredit(credit);
|
|
291
315
|
*/
|
|
292
316
|
function CreditDisplay(container, delimiter, viewport) {
|
|
293
317
|
//>>includeStart('debug', pragmas.debug);
|
|
@@ -343,7 +367,7 @@ function CreditDisplay(container, delimiter, viewport) {
|
|
|
343
367
|
expandLink.textContent = "Data attribution";
|
|
344
368
|
container.appendChild(expandLink);
|
|
345
369
|
|
|
346
|
-
appendCss();
|
|
370
|
+
appendCss(container);
|
|
347
371
|
const cesiumCredit = Credit.clone(CreditDisplay.cesiumCredit);
|
|
348
372
|
|
|
349
373
|
this._delimiter = defaultValue(delimiter, " • ");
|
|
@@ -357,7 +381,7 @@ function CreditDisplay(container, delimiter, viewport) {
|
|
|
357
381
|
this._hideLightbox = hideLightbox;
|
|
358
382
|
this._expandLink = expandLink;
|
|
359
383
|
this._expanded = false;
|
|
360
|
-
this.
|
|
384
|
+
this._staticCredits = [];
|
|
361
385
|
this._cesiumCredit = cesiumCredit;
|
|
362
386
|
this._previousCesiumCredit = undefined;
|
|
363
387
|
this._currentCesiumCredit = cesiumCredit;
|
|
@@ -402,17 +426,36 @@ function setCredit(creditDisplay, credits, credit, count) {
|
|
|
402
426
|
}
|
|
403
427
|
/**
|
|
404
428
|
* Adds a credit to the list of current credits to be displayed in the credit container
|
|
429
|
+
* for the next frame
|
|
405
430
|
*
|
|
406
431
|
* @param {Credit} credit The credit to display
|
|
432
|
+
* @deprecated
|
|
407
433
|
*/
|
|
408
434
|
CreditDisplay.prototype.addCredit = function (credit) {
|
|
435
|
+
deprecationWarning(
|
|
436
|
+
"CreditDisplay.addCredit",
|
|
437
|
+
"CreditDisplay.addCredit was deprecated in CesiumJS 1.105. It will be removed in CesiumJS 1.107. Use CreditDisplay.addCreditToNextFrame instead."
|
|
438
|
+
);
|
|
439
|
+
|
|
440
|
+
this.addCreditToNextFrame(credit);
|
|
441
|
+
};
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* Adds a {@link Credit} that will show on screen or in the lightbox until
|
|
445
|
+
* the next frame. This is mostly for internal use. Use {@link CreditDisplay.addStaticCredit} to add a persistent credit to the screen.
|
|
446
|
+
*
|
|
447
|
+
* @see CreditDisplay.addStaticCredit
|
|
448
|
+
*
|
|
449
|
+
* @param {Credit} credit The credit to display in the next frame.
|
|
450
|
+
*/
|
|
451
|
+
CreditDisplay.prototype.addCreditToNextFrame = function (credit) {
|
|
409
452
|
//>>includeStart('debug', pragmas.debug);
|
|
410
453
|
Check.defined("credit", credit);
|
|
411
454
|
//>>includeEnd('debug');
|
|
412
455
|
|
|
413
456
|
if (credit._isIon) {
|
|
414
457
|
// If this is the an ion logo credit from the ion server
|
|
415
|
-
//
|
|
458
|
+
// Just use the default credit (which is identical) to avoid blinking
|
|
416
459
|
if (!defined(this._defaultCredit)) {
|
|
417
460
|
this._defaultCredit = Credit.clone(getDefaultCredit());
|
|
418
461
|
}
|
|
@@ -434,40 +477,94 @@ CreditDisplay.prototype.addCredit = function (credit) {
|
|
|
434
477
|
* Adds credits that will persist until they are removed
|
|
435
478
|
*
|
|
436
479
|
* @param {Credit} credit The credit to added to defaults
|
|
480
|
+
*
|
|
481
|
+
* @deprecated
|
|
437
482
|
*/
|
|
438
483
|
CreditDisplay.prototype.addDefaultCredit = function (credit) {
|
|
439
484
|
//>>includeStart('debug', pragmas.debug);
|
|
440
485
|
Check.defined("credit", credit);
|
|
441
486
|
//>>includeEnd('debug');
|
|
442
487
|
|
|
443
|
-
|
|
488
|
+
deprecationWarning(
|
|
489
|
+
"CreditDisplay.addDefaultCredit",
|
|
490
|
+
"CreditDisplay.addDefaultCredit was deprecated in CesiumJS 1.105. It will be removed in CesiumJS 1.107. Use CreditDisplay.addStaticCredit instead."
|
|
491
|
+
);
|
|
492
|
+
|
|
493
|
+
const defaultCredits = this._staticCredits;
|
|
444
494
|
if (!contains(defaultCredits, credit)) {
|
|
495
|
+
credit.showOnScreen = true;
|
|
445
496
|
defaultCredits.push(credit);
|
|
446
497
|
}
|
|
447
498
|
};
|
|
448
499
|
|
|
449
500
|
/**
|
|
450
|
-
*
|
|
501
|
+
* Adds a {@link Credit} that will show on screen or in the lightbox until removed with {@link CreditDisplay.removeStaticCredit}.
|
|
451
502
|
*
|
|
452
|
-
* @param {Credit} credit The credit to
|
|
503
|
+
* @param {Credit} credit The credit to added
|
|
504
|
+
*
|
|
505
|
+
* @example
|
|
506
|
+
* // Add a credit with a tooltip, image and link to display onscreen
|
|
507
|
+
* const credit = new Cesium.Credit(`<a href="https://cesium.com/" target="_blank"><img src="/images/cesium_logo.png" title="Cesium"/></a>`, true);
|
|
508
|
+
* viewer.creditDisplay.addStaticCredit(credit);
|
|
509
|
+
*
|
|
510
|
+
* @example
|
|
511
|
+
* // Add a credit with a plaintext link to display in the lightbox
|
|
512
|
+
* const credit = new Cesium.Credit('<a href="https://cesium.com/" target="_blank">Cesium</a>');
|
|
513
|
+
* viewer.creditDisplay.addStaticCredit(credit);
|
|
453
514
|
*/
|
|
454
|
-
CreditDisplay.prototype.
|
|
515
|
+
CreditDisplay.prototype.addStaticCredit = function (credit) {
|
|
516
|
+
//>>includeStart('debug', pragmas.debug);
|
|
517
|
+
Check.defined("credit", credit);
|
|
518
|
+
//>>includeEnd('debug');
|
|
519
|
+
|
|
520
|
+
const staticCredits = this._staticCredits;
|
|
521
|
+
if (!contains(staticCredits, credit)) {
|
|
522
|
+
staticCredits.push(credit);
|
|
523
|
+
}
|
|
524
|
+
};
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* Removes a static credit shown on screen or in the lightbox.
|
|
528
|
+
*
|
|
529
|
+
* @param {Credit} credit The credit to be removed.
|
|
530
|
+
*/
|
|
531
|
+
CreditDisplay.prototype.removeStaticCredit = function (credit) {
|
|
455
532
|
//>>includeStart('debug', pragmas.debug);
|
|
456
533
|
Check.defined("credit", credit);
|
|
457
534
|
//>>includeEnd('debug');
|
|
458
535
|
|
|
459
|
-
const
|
|
460
|
-
const index =
|
|
536
|
+
const staticCredits = this._staticCredits;
|
|
537
|
+
const index = staticCredits.indexOf(credit);
|
|
461
538
|
if (index !== -1) {
|
|
462
|
-
|
|
539
|
+
staticCredits.splice(index, 1);
|
|
463
540
|
}
|
|
464
541
|
};
|
|
465
542
|
|
|
543
|
+
/**
|
|
544
|
+
* Removes a default credit.
|
|
545
|
+
*
|
|
546
|
+
* @param {Credit} credit The credit to be removed from defaults
|
|
547
|
+
*/
|
|
548
|
+
CreditDisplay.prototype.removeDefaultCredit = function (credit) {
|
|
549
|
+
deprecationWarning(
|
|
550
|
+
"CreditDisplay.removeDefaultCredit",
|
|
551
|
+
"CreditDisplay.removeDefaultCredit was deprecated in CesiumJS 1.105. It will be removed in CesiumJS 1.107. Use CreditDisplay.addStaticCredit instead."
|
|
552
|
+
);
|
|
553
|
+
|
|
554
|
+
this.removeStaticCredit(credit);
|
|
555
|
+
};
|
|
556
|
+
|
|
557
|
+
/**
|
|
558
|
+
* @private
|
|
559
|
+
*/
|
|
466
560
|
CreditDisplay.prototype.showLightbox = function () {
|
|
467
561
|
this._lightbox.style.display = "block";
|
|
468
562
|
this._expanded = true;
|
|
469
563
|
};
|
|
470
564
|
|
|
565
|
+
/**
|
|
566
|
+
* @private
|
|
567
|
+
*/
|
|
471
568
|
CreditDisplay.prototype.hideLightbox = function () {
|
|
472
569
|
this._lightbox.style.display = "none";
|
|
473
570
|
this._expanded = false;
|
|
@@ -490,14 +587,29 @@ CreditDisplay.prototype.beginFrame = function () {
|
|
|
490
587
|
this._creditDisplayElementPoolIndex = 0;
|
|
491
588
|
|
|
492
589
|
const screenCredits = currentFrameCredits.screenCredits;
|
|
590
|
+
const lightboxCredits = currentFrameCredits.lightboxCredits;
|
|
591
|
+
|
|
493
592
|
screenCredits.removeAll();
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
593
|
+
lightboxCredits.removeAll();
|
|
594
|
+
|
|
595
|
+
const staticCredits = this._staticCredits;
|
|
596
|
+
for (let i = 0; i < staticCredits.length; ++i) {
|
|
597
|
+
const staticCredit = staticCredits[i];
|
|
598
|
+
const creditCollection = staticCredit.showOnScreen
|
|
599
|
+
? screenCredits
|
|
600
|
+
: lightboxCredits;
|
|
499
601
|
|
|
500
|
-
|
|
602
|
+
if (
|
|
603
|
+
staticCredit._isIon &&
|
|
604
|
+
Credit.equals(CreditDisplay.cesiumCredit, this._cesiumCredit)
|
|
605
|
+
) {
|
|
606
|
+
// If this is an ion logo credit from the ion server,
|
|
607
|
+
// make sure to de-duplicate with the default ion credit
|
|
608
|
+
continue;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
setCredit(this, creditCollection, staticCredit, Number.MAX_VALUE);
|
|
612
|
+
}
|
|
501
613
|
|
|
502
614
|
if (!Credit.equals(CreditDisplay.cesiumCredit, this._cesiumCredit)) {
|
|
503
615
|
this._cesiumCredit = Credit.clone(CreditDisplay.cesiumCredit);
|
|
@@ -125,7 +125,7 @@ DepthPlane.prototype.update = function (frameState) {
|
|
|
125
125
|
|
|
126
126
|
const context = frameState.context;
|
|
127
127
|
|
|
128
|
-
// Allow offsetting the ellipsoid radius to address rendering
|
|
128
|
+
// Allow offsetting the ellipsoid radius to address rendering artifacts below ellipsoid zero elevation.
|
|
129
129
|
const radii = frameState.mapProjection.ellipsoid.radii;
|
|
130
130
|
const ellipsoid = new Ellipsoid(
|
|
131
131
|
radii.x + this._ellipsoidOffset,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import deprecationWarning from "../Core/deprecationWarning.js";
|
|
1
2
|
import destroyObject from "../Core/destroyObject.js";
|
|
2
3
|
import DeveloperError from "../Core/DeveloperError.js";
|
|
3
4
|
|
|
@@ -64,9 +65,38 @@ Object.defineProperties(Empty3DTileContent.prototype, {
|
|
|
64
65
|
},
|
|
65
66
|
},
|
|
66
67
|
|
|
68
|
+
/**
|
|
69
|
+
* Returns true when the tile's content is ready to render; otherwise false
|
|
70
|
+
*
|
|
71
|
+
* @memberof Empty3DTileContent.prototype
|
|
72
|
+
*
|
|
73
|
+
* @type {boolean}
|
|
74
|
+
* @readonly
|
|
75
|
+
* @private
|
|
76
|
+
*/
|
|
77
|
+
ready: {
|
|
78
|
+
get: function () {
|
|
79
|
+
return true;
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Gets the promise that will be resolved when the tile's content is ready to render.
|
|
85
|
+
*
|
|
86
|
+
* @memberof Empty3DTileContent.prototype
|
|
87
|
+
*
|
|
88
|
+
* @type {Promise<Empty3DTileContent>}
|
|
89
|
+
* @readonly
|
|
90
|
+
* @deprecated
|
|
91
|
+
* @private
|
|
92
|
+
*/
|
|
67
93
|
readyPromise: {
|
|
68
94
|
get: function () {
|
|
69
|
-
|
|
95
|
+
deprecationWarning(
|
|
96
|
+
"Empty3DTileContent.readyPromise",
|
|
97
|
+
"Empty3DTileContent.readyPromise was deprecated in CesiumJS 1.104. It will be removed in 1.107. Wait for Empty3DTileContent.ready to return true instead."
|
|
98
|
+
);
|
|
99
|
+
return Promise.resolve(this);
|
|
70
100
|
},
|
|
71
101
|
},
|
|
72
102
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Cartesian3 from "../Core/Cartesian3.js";
|
|
2
2
|
import defaultValue from "../Core/defaultValue.js";
|
|
3
3
|
import defined from "../Core/defined.js";
|
|
4
|
+
import deprecationWarning from "../Core/deprecationWarning.js";
|
|
4
5
|
import destroyObject from "../Core/destroyObject.js";
|
|
5
6
|
import DeveloperError from "../Core/DeveloperError.js";
|
|
6
7
|
import getJsonFromTypedArray from "../Core/getJsonFromTypedArray.js";
|
|
@@ -42,7 +43,15 @@ function Geometry3DTileContent(
|
|
|
42
43
|
this.featurePropertiesDirty = false;
|
|
43
44
|
this._group = undefined;
|
|
44
45
|
|
|
45
|
-
this.
|
|
46
|
+
this._ready = false;
|
|
47
|
+
|
|
48
|
+
// This is for backwards compatibility. It can be removed once readyPromise is removed.
|
|
49
|
+
this._resolveContent = undefined;
|
|
50
|
+
this._readyPromise = new Promise((resolve) => {
|
|
51
|
+
this._resolveContent = resolve;
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
initialize(this, arrayBuffer, byteOffset);
|
|
46
55
|
}
|
|
47
56
|
|
|
48
57
|
Object.defineProperties(Geometry3DTileContent.prototype, {
|
|
@@ -96,8 +105,37 @@ Object.defineProperties(Geometry3DTileContent.prototype, {
|
|
|
96
105
|
},
|
|
97
106
|
},
|
|
98
107
|
|
|
108
|
+
/**
|
|
109
|
+
* Returns true when the tile's content is ready to render; otherwise false
|
|
110
|
+
*
|
|
111
|
+
* @memberof Geometry3DTileContent.prototype
|
|
112
|
+
*
|
|
113
|
+
* @type {boolean}
|
|
114
|
+
* @readonly
|
|
115
|
+
* @private
|
|
116
|
+
*/
|
|
117
|
+
ready: {
|
|
118
|
+
get: function () {
|
|
119
|
+
return this._ready;
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Gets the promise that will be resolved when the tile's content is ready to render.
|
|
125
|
+
*
|
|
126
|
+
* @memberof Geometry3DTileContent.prototype
|
|
127
|
+
*
|
|
128
|
+
* @type {Promise<Geometry3DTileContent>}
|
|
129
|
+
* @readonly
|
|
130
|
+
* @deprecated
|
|
131
|
+
* @private
|
|
132
|
+
*/
|
|
99
133
|
readyPromise: {
|
|
100
134
|
get: function () {
|
|
135
|
+
deprecationWarning(
|
|
136
|
+
"Geometry3DTileContent.readyPromise",
|
|
137
|
+
"Geometry3DTileContent.readyPromise was deprecated in CesiumJS 1.104. It will be removed in 1.107. Wait for Geometry3DTileContent.ready to return true instead."
|
|
138
|
+
);
|
|
101
139
|
return this._readyPromise;
|
|
102
140
|
},
|
|
103
141
|
},
|
|
@@ -224,7 +262,7 @@ function getBatchIds(featureTableJson, featureTableBinary) {
|
|
|
224
262
|
|
|
225
263
|
if (atLeastOneDefined && atLeastOneUndefined) {
|
|
226
264
|
throw new RuntimeError(
|
|
227
|
-
"If one group of batch ids is defined, then all batch ids must be defined
|
|
265
|
+
"If one group of batch ids is defined, then all batch ids must be defined"
|
|
228
266
|
);
|
|
229
267
|
}
|
|
230
268
|
|
|
@@ -290,7 +328,8 @@ function initialize(content, arrayBuffer, byteOffset) {
|
|
|
290
328
|
byteOffset += sizeOfUint32;
|
|
291
329
|
|
|
292
330
|
if (byteLength === 0) {
|
|
293
|
-
content.
|
|
331
|
+
content._ready = true;
|
|
332
|
+
content._resolveContent(content);
|
|
294
333
|
return;
|
|
295
334
|
}
|
|
296
335
|
|
|
@@ -451,9 +490,7 @@ function initialize(content, arrayBuffer, byteOffset) {
|
|
|
451
490
|
boundingVolume: content.tile.boundingVolume.boundingVolume,
|
|
452
491
|
});
|
|
453
492
|
|
|
454
|
-
return content
|
|
455
|
-
return content;
|
|
456
|
-
});
|
|
493
|
+
return content;
|
|
457
494
|
}
|
|
458
495
|
|
|
459
496
|
return Promise.resolve(content);
|
|
@@ -509,8 +546,11 @@ Geometry3DTileContent.prototype.update = function (tileset, frameState) {
|
|
|
509
546
|
this._geometries.debugWireframe = this._tileset.debugWireframe;
|
|
510
547
|
this._geometries.update(frameState);
|
|
511
548
|
}
|
|
512
|
-
|
|
549
|
+
|
|
550
|
+
if (defined(this._batchTable) && this._geometries.ready) {
|
|
513
551
|
this._batchTable.update(tileset, frameState);
|
|
552
|
+
this._ready = true;
|
|
553
|
+
this._resolveContent(this);
|
|
514
554
|
}
|
|
515
555
|
};
|
|
516
556
|
|
package/Source/Scene/Globe.js
CHANGED
|
@@ -436,6 +436,7 @@ Object.defineProperties(Globe.prototype, {
|
|
|
436
436
|
return true;
|
|
437
437
|
}
|
|
438
438
|
return (
|
|
439
|
+
// ready is deprecated. This is here for backwards compatibility
|
|
439
440
|
this._surface.tileProvider.ready &&
|
|
440
441
|
this._surface._tileLoadQueueHigh.length === 0 &&
|
|
441
442
|
this._surface._tileLoadQueueMedium.length === 0 &&
|
|
@@ -984,7 +985,10 @@ Globe.prototype.beginFrame = function (frameState) {
|
|
|
984
985
|
const terrainProvider = this.terrainProvider;
|
|
985
986
|
const hasWaterMask =
|
|
986
987
|
this.showWaterEffect &&
|
|
987
|
-
terrainProvider
|
|
988
|
+
defined(terrainProvider) &&
|
|
989
|
+
terrainProvider.hasWaterMask &&
|
|
990
|
+
// ready is deprecated; This is here for backwards compatibility
|
|
991
|
+
terrainProvider._ready &&
|
|
988
992
|
terrainProvider.hasWaterMask;
|
|
989
993
|
|
|
990
994
|
if (hasWaterMask && this._oceanNormalMapResourceDirty) {
|
|
@@ -345,7 +345,8 @@ GlobeSurfaceTile.prototype.processImagery = function (
|
|
|
345
345
|
|
|
346
346
|
if (tileImagery.loadingImagery.state === ImageryState.PLACEHOLDER) {
|
|
347
347
|
const imageryLayer = tileImagery.loadingImagery.imageryLayer;
|
|
348
|
-
|
|
348
|
+
// ImageryProvider.ready is deprecated. This is here for backwards compatibility
|
|
349
|
+
if (imageryLayer.ready && imageryLayer.imageryProvider._ready) {
|
|
349
350
|
// Remove the placeholder and add the actual skeletons (if any)
|
|
350
351
|
// at the same position. Then continue the loop at the same index.
|
|
351
352
|
tileImagery.freeResources();
|