@cesium/engine 2.4.0 → 3.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.
Files changed (111) hide show
  1. package/Build/Workers/{Color-e5bfda3f.js → Color-8e135f71.js} +4 -4
  2. package/Build/Workers/cesiumWorkerBootstrapper.js +1 -1
  3. package/Build/Workers/createPolylineGeometry.js +1 -1
  4. package/Build/Workers/createSimplePolylineGeometry.js +1 -1
  5. package/Build/Workers/createVectorTileGeometries.js +1 -1
  6. package/Build/Workers/createVectorTilePolygons.js +1 -1
  7. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +0 -22
  8. package/Build/Workers/package.js +1 -1
  9. package/Build/Workers/transferTypedArrayTest.js +1 -1
  10. package/Source/Core/ArcGISTiledElevationTerrainProvider.js +0 -75
  11. package/Source/Core/CesiumTerrainProvider.js +25 -75
  12. package/Source/Core/Color.js +4 -4
  13. package/Source/Core/CustomHeightmapTerrainProvider.js +0 -38
  14. package/Source/Core/EllipsoidTerrainProvider.js +0 -37
  15. package/Source/Core/GoogleEarthEnterpriseMetadata.js +0 -53
  16. package/Source/Core/GoogleEarthEnterpriseTerrainProvider.js +1 -101
  17. package/Source/Core/GoogleMaps.js +1 -1
  18. package/Source/Core/Ion.js +1 -1
  19. package/Source/Core/TerrainProvider.js +0 -22
  20. package/Source/Core/VRTheWorldTerrainProvider.js +0 -59
  21. package/Source/Core/sampleTerrain.js +0 -3
  22. package/Source/Core/sampleTerrainMostDetailed.js +0 -3
  23. package/Source/DataSources/Cesium3DTilesetVisualizer.js +6 -5
  24. package/Source/DataSources/DataSourceDisplay.js +3 -2
  25. package/Source/DataSources/Entity.js +2 -3
  26. package/Source/DataSources/KmlTour.js +1 -12
  27. package/Source/DataSources/ModelVisualizer.js +0 -7
  28. package/Source/Renderer/Context.js +10 -2
  29. package/Source/Renderer/demodernizeShader.js +3 -0
  30. package/Source/Scene/ArcGisMapServerImageryProvider.js +7 -335
  31. package/Source/Scene/ArcGisMapService.js +1 -1
  32. package/Source/Scene/Billboard.js +7 -7
  33. package/Source/Scene/BingMapsImageryProvider.js +0 -326
  34. package/Source/Scene/Camera.js +1 -1
  35. package/Source/Scene/Cesium3DTile.js +4 -5
  36. package/Source/Scene/Cesium3DTileBatchTable.js +0 -3
  37. package/Source/Scene/Cesium3DTileContent.js +0 -16
  38. package/Source/Scene/Cesium3DTilesVoxelProvider.js +0 -123
  39. package/Source/Scene/Cesium3DTileset.js +183 -184
  40. package/Source/Scene/Cesium3DTilesetBaseTraversal.js +1 -1
  41. package/Source/Scene/Cesium3DTilesetCache.js +1 -3
  42. package/Source/Scene/Cesium3DTilesetSkipTraversal.js +5 -2
  43. package/Source/Scene/Cesium3DTilesetTraversal.js +2 -2
  44. package/Source/Scene/ClassificationPrimitive.js +5 -43
  45. package/Source/Scene/Composite3DTileContent.js +0 -27
  46. package/Source/Scene/CreditDisplay.js +0 -54
  47. package/Source/Scene/DerivedCommand.js +15 -10
  48. package/Source/Scene/Empty3DTileContent.js +0 -21
  49. package/Source/Scene/Geometry3DTileContent.js +0 -29
  50. package/Source/Scene/Globe.js +0 -4
  51. package/Source/Scene/GlobeSurfaceTile.js +13 -2
  52. package/Source/Scene/GlobeSurfaceTileProvider.js +10 -37
  53. package/Source/Scene/GltfPipeline/removeUnusedElements.js +27 -0
  54. package/Source/Scene/GltfPipeline/updateVersion.js +21 -4
  55. package/Source/Scene/GoogleEarthEnterpriseImageryProvider.js +1 -339
  56. package/Source/Scene/GoogleEarthEnterpriseMapsProvider.js +0 -326
  57. package/Source/Scene/GridImageryProvider.js +0 -274
  58. package/Source/Scene/GroundPolylinePrimitive.js +5 -38
  59. package/Source/Scene/GroundPrimitive.js +5 -43
  60. package/Source/Scene/I3SDataProvider.js +4 -99
  61. package/Source/Scene/I3SLayer.js +15 -22
  62. package/Source/Scene/Imagery.js +1 -6
  63. package/Source/Scene/ImageryLayer.js +1 -30
  64. package/Source/Scene/ImageryProvider.js +0 -138
  65. package/Source/Scene/Implicit3DTileContent.js +0 -23
  66. package/Source/Scene/IonImageryProvider.js +1 -369
  67. package/Source/Scene/MapboxImageryProvider.js +0 -276
  68. package/Source/Scene/MapboxStyleImageryProvider.js +0 -274
  69. package/Source/Scene/Model/CustomShader.js +1 -1
  70. package/Source/Scene/Model/Model.js +6 -249
  71. package/Source/Scene/Model/Model3DTileContent.js +0 -50
  72. package/Source/Scene/Model/ModelAnimationCollection.js +1 -1
  73. package/Source/Scene/Model/PointCloudStylingPipelineStage.js +1 -1
  74. package/Source/Scene/Multiple3DTileContent.js +0 -27
  75. package/Source/Scene/Primitive.js +10 -38
  76. package/Source/Scene/QuadtreePrimitive.js +3 -5
  77. package/Source/Scene/QuadtreeTileProvider.js +0 -10
  78. package/Source/Scene/Scene.js +3 -3
  79. package/Source/Scene/ScreenSpaceCameraController.js +7 -6
  80. package/Source/Scene/SingleTileImageryProvider.js +6 -302
  81. package/Source/Scene/TileCoordinatesImageryProvider.js +0 -273
  82. package/Source/Scene/TileMapServiceImageryProvider.js +3 -48
  83. package/Source/Scene/Tileset3DTileContent.js +0 -22
  84. package/Source/Scene/TimeDynamicPointCloud.js +0 -28
  85. package/Source/Scene/UrlTemplateImageryProvider.js +0 -375
  86. package/Source/Scene/Vector3DTileContent.js +0 -29
  87. package/Source/Scene/VoxelPrimitive.js +9 -49
  88. package/Source/Scene/VoxelProvider.js +0 -24
  89. package/Source/Scene/WebMapServiceImageryProvider.js +0 -274
  90. package/Source/Scene/WebMapTileServiceImageryProvider.js +0 -274
  91. package/Source/Scene/computeFlyToLocationForRectangle.js +0 -2
  92. package/Source/Scene/createGooglePhotorealistic3DTileset.js +5 -0
  93. package/Source/Shaders/BillboardCollectionFS.glsl +0 -4
  94. package/Source/Shaders/BillboardCollectionFS.js +1 -5
  95. package/Source/Shaders/Builtin/Functions/writeLogDepth.glsl +0 -3
  96. package/Source/Shaders/Builtin/Functions/writeLogDepth.js +0 -3
  97. package/Source/Shaders/Materials/ElevationContourMaterial.glsl +0 -4
  98. package/Source/Shaders/Materials/ElevationContourMaterial.js +1 -5
  99. package/Source/Shaders/Materials/GridMaterial.glsl +0 -4
  100. package/Source/Shaders/Materials/GridMaterial.js +1 -5
  101. package/Source/Shaders/Materials/PolylineArrowMaterial.glsl +0 -4
  102. package/Source/Shaders/Materials/PolylineArrowMaterial.js +1 -5
  103. package/Source/Shaders/Model/ModelFS.glsl +0 -6
  104. package/Source/Shaders/Model/ModelFS.js +1 -7
  105. package/Source/Widget/CesiumWidget.js +2 -19
  106. package/index.d.ts +69 -1190
  107. package/index.js +95 -98
  108. package/package.json +3 -3
  109. package/Source/Core/createWorldTerrain.js +0 -60
  110. package/Source/Scene/createOsmBuildings.js +0 -81
  111. package/Source/Scene/createWorldImagery.js +0 -47
@@ -348,9 +348,9 @@ define(['exports', './Check-6ede7e26', './defaultValue-fe22d8c0', './Transforms-
348
348
  //#rrggbbaa
349
349
  const rrggbbaaMatcher = /^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i;
350
350
  //rgb(), rgba(), or rgb%()
351
- const rgbParenthesesMatcher = /^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)$/i;
351
+ const rgbParenthesesMatcher = /^rgba?\s*\(\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i;
352
352
  //hsl() or hsla()
353
- const hslParenthesesMatcher = /^hsla?\(\s*([0-9.]+)\s*,\s*([0-9.]+%)\s*,\s*([0-9.]+%)(?:\s*,\s*([0-9.]+))?\s*\)$/i;
353
+ const hslParenthesesMatcher = /^hsla?\s*\(\s*([0-9.]+)\s*[,\s]+\s*([0-9.]+%)\s*[,\s]+\s*([0-9.]+%)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i;
354
354
 
355
355
  /**
356
356
  * Creates a Color instance from a CSS color value.
@@ -375,8 +375,8 @@ define(['exports', './Check-6ede7e26', './defaultValue-fe22d8c0', './Transforms-
375
375
  result = new Color();
376
376
  }
377
377
 
378
- // Remove all whitespaces from the color string
379
- color = color.replace(/\s/g, "");
378
+ // Remove all surrounding whitespaces from the color string
379
+ color = color.trim();
380
380
 
381
381
  const namedColor = Color[color.toUpperCase()];
382
382
  if (defaultValue.defined(namedColor)) {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.105.1
4
+ * Version 1.107
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -1,4 +1,4 @@
1
- define(['./defaultValue-fe22d8c0', './Matrix3-41c58dde', './ArcType-2d9abbbc', './arrayRemoveDuplicates-d2061e85', './Transforms-e2d4a55a', './Color-e5bfda3f', './ComponentDatatype-cf1fa08e', './Check-6ede7e26', './GeometryAttribute-13da9466', './GeometryAttributes-ad136444', './IndexDatatype-2643aa47', './Math-0a2ac845', './PolylinePipeline-7119eb3f', './VertexFormat-030f11ff', './Matrix2-e1298525', './RuntimeError-ef395448', './combine-d9581036', './WebGLConstants-0b1ce7ba', './EllipsoidGeodesic-5b3623dc', './EllipsoidRhumbLine-ef872433', './IntersectionTests-85350792', './Plane-4c3d403b'], (function (defaultValue, Matrix3, ArcType, arrayRemoveDuplicates, Transforms, Color, ComponentDatatype, Check, GeometryAttribute, GeometryAttributes, IndexDatatype, Math$1, PolylinePipeline, VertexFormat, Matrix2, RuntimeError, combine, WebGLConstants, EllipsoidGeodesic, EllipsoidRhumbLine, IntersectionTests, Plane) { 'use strict';
1
+ define(['./defaultValue-fe22d8c0', './Matrix3-41c58dde', './ArcType-2d9abbbc', './arrayRemoveDuplicates-d2061e85', './Transforms-e2d4a55a', './Color-8e135f71', './ComponentDatatype-cf1fa08e', './Check-6ede7e26', './GeometryAttribute-13da9466', './GeometryAttributes-ad136444', './IndexDatatype-2643aa47', './Math-0a2ac845', './PolylinePipeline-7119eb3f', './VertexFormat-030f11ff', './Matrix2-e1298525', './RuntimeError-ef395448', './combine-d9581036', './WebGLConstants-0b1ce7ba', './EllipsoidGeodesic-5b3623dc', './EllipsoidRhumbLine-ef872433', './IntersectionTests-85350792', './Plane-4c3d403b'], (function (defaultValue, Matrix3, ArcType, arrayRemoveDuplicates, Transforms, Color, ComponentDatatype, Check, GeometryAttribute, GeometryAttributes, IndexDatatype, Math$1, PolylinePipeline, VertexFormat, Matrix2, RuntimeError, combine, WebGLConstants, EllipsoidGeodesic, EllipsoidRhumbLine, IntersectionTests, Plane) { 'use strict';
2
2
 
3
3
  const scratchInterpolateColorsArray = [];
4
4
 
@@ -1,4 +1,4 @@
1
- define(['./defaultValue-fe22d8c0', './Matrix3-41c58dde', './ArcType-2d9abbbc', './Transforms-e2d4a55a', './Color-e5bfda3f', './ComponentDatatype-cf1fa08e', './Check-6ede7e26', './GeometryAttribute-13da9466', './GeometryAttributes-ad136444', './IndexDatatype-2643aa47', './Math-0a2ac845', './PolylinePipeline-7119eb3f', './Matrix2-e1298525', './RuntimeError-ef395448', './combine-d9581036', './WebGLConstants-0b1ce7ba', './EllipsoidGeodesic-5b3623dc', './EllipsoidRhumbLine-ef872433', './IntersectionTests-85350792', './Plane-4c3d403b'], (function (defaultValue, Matrix3, ArcType, Transforms, Color, ComponentDatatype, Check, GeometryAttribute, GeometryAttributes, IndexDatatype, Math, PolylinePipeline, Matrix2, RuntimeError, combine, WebGLConstants, EllipsoidGeodesic, EllipsoidRhumbLine, IntersectionTests, Plane) { 'use strict';
1
+ define(['./defaultValue-fe22d8c0', './Matrix3-41c58dde', './ArcType-2d9abbbc', './Transforms-e2d4a55a', './Color-8e135f71', './ComponentDatatype-cf1fa08e', './Check-6ede7e26', './GeometryAttribute-13da9466', './GeometryAttributes-ad136444', './IndexDatatype-2643aa47', './Math-0a2ac845', './PolylinePipeline-7119eb3f', './Matrix2-e1298525', './RuntimeError-ef395448', './combine-d9581036', './WebGLConstants-0b1ce7ba', './EllipsoidGeodesic-5b3623dc', './EllipsoidRhumbLine-ef872433', './IntersectionTests-85350792', './Plane-4c3d403b'], (function (defaultValue, Matrix3, ArcType, Transforms, Color, ComponentDatatype, Check, GeometryAttribute, GeometryAttributes, IndexDatatype, Math, PolylinePipeline, Matrix2, RuntimeError, combine, WebGLConstants, EllipsoidGeodesic, EllipsoidRhumbLine, IntersectionTests, Plane) { 'use strict';
2
2
 
3
3
  function interpolateColors(p0, p1, color0, color1, minDistance, array, offset) {
4
4
  const numPoints = PolylinePipeline.PolylinePipeline.numberOfPoints(p0, p1, minDistance);
@@ -1,4 +1,4 @@
1
- define(['./Transforms-e2d4a55a', './BoxGeometry-af7d05ef', './Matrix3-41c58dde', './Color-e5bfda3f', './CylinderGeometry-dbaa1678', './defaultValue-fe22d8c0', './EllipsoidGeometry-8155e3a2', './IndexDatatype-2643aa47', './Matrix2-e1298525', './createTaskProcessorWorker', './Check-6ede7e26', './Math-0a2ac845', './combine-d9581036', './RuntimeError-ef395448', './ComponentDatatype-cf1fa08e', './WebGLConstants-0b1ce7ba', './GeometryAttribute-13da9466', './GeometryAttributes-ad136444', './GeometryOffsetAttribute-9ad0019c', './VertexFormat-030f11ff', './CylinderGeometryLibrary-7bf291b4'], (function (Transforms, BoxGeometry, Matrix3, Color, CylinderGeometry, defaultValue, EllipsoidGeometry, IndexDatatype, Matrix2, createTaskProcessorWorker, Check, Math$1, combine, RuntimeError, ComponentDatatype, WebGLConstants, GeometryAttribute, GeometryAttributes, GeometryOffsetAttribute, VertexFormat, CylinderGeometryLibrary) { 'use strict';
1
+ define(['./Transforms-e2d4a55a', './BoxGeometry-af7d05ef', './Matrix3-41c58dde', './Color-8e135f71', './CylinderGeometry-dbaa1678', './defaultValue-fe22d8c0', './EllipsoidGeometry-8155e3a2', './IndexDatatype-2643aa47', './Matrix2-e1298525', './createTaskProcessorWorker', './Check-6ede7e26', './Math-0a2ac845', './combine-d9581036', './RuntimeError-ef395448', './ComponentDatatype-cf1fa08e', './WebGLConstants-0b1ce7ba', './GeometryAttribute-13da9466', './GeometryAttributes-ad136444', './GeometryOffsetAttribute-9ad0019c', './VertexFormat-030f11ff', './CylinderGeometryLibrary-7bf291b4'], (function (Transforms, BoxGeometry, Matrix3, Color, CylinderGeometry, defaultValue, EllipsoidGeometry, IndexDatatype, Matrix2, createTaskProcessorWorker, Check, Math$1, combine, RuntimeError, ComponentDatatype, WebGLConstants, GeometryAttribute, GeometryAttributes, GeometryOffsetAttribute, VertexFormat, CylinderGeometryLibrary) { 'use strict';
2
2
 
3
3
  /**
4
4
  * Describes a renderable batch of geometry.
@@ -1,4 +1,4 @@
1
- define(['./AttributeCompression-f9f6c717', './Matrix3-41c58dde', './Color-e5bfda3f', './defaultValue-fe22d8c0', './IndexDatatype-2643aa47', './Math-0a2ac845', './OrientedBoundingBox-29fb0fcd', './Matrix2-e1298525', './createTaskProcessorWorker', './ComponentDatatype-cf1fa08e', './Check-6ede7e26', './WebGLConstants-0b1ce7ba', './Transforms-e2d4a55a', './combine-d9581036', './RuntimeError-ef395448', './EllipsoidTangentPlane-546c0d5e', './AxisAlignedBoundingBox-4bfd84f3', './IntersectionTests-85350792', './Plane-4c3d403b'], (function (AttributeCompression, Matrix3, Color, defaultValue, IndexDatatype, Math$1, OrientedBoundingBox, Matrix2, createTaskProcessorWorker, ComponentDatatype, Check, WebGLConstants, Transforms, combine, RuntimeError, EllipsoidTangentPlane, AxisAlignedBoundingBox, IntersectionTests, Plane) { 'use strict';
1
+ define(['./AttributeCompression-f9f6c717', './Matrix3-41c58dde', './Color-8e135f71', './defaultValue-fe22d8c0', './IndexDatatype-2643aa47', './Math-0a2ac845', './OrientedBoundingBox-29fb0fcd', './Matrix2-e1298525', './createTaskProcessorWorker', './ComponentDatatype-cf1fa08e', './Check-6ede7e26', './WebGLConstants-0b1ce7ba', './Transforms-e2d4a55a', './combine-d9581036', './RuntimeError-ef395448', './EllipsoidTangentPlane-546c0d5e', './AxisAlignedBoundingBox-4bfd84f3', './IntersectionTests-85350792', './Plane-4c3d403b'], (function (AttributeCompression, Matrix3, Color, defaultValue, IndexDatatype, Math$1, OrientedBoundingBox, Matrix2, createTaskProcessorWorker, ComponentDatatype, Check, WebGLConstants, Transforms, combine, RuntimeError, EllipsoidTangentPlane, AxisAlignedBoundingBox, IntersectionTests, Plane) { 'use strict';
2
2
 
3
3
  const scratchCenter = new Matrix3.Cartesian3();
4
4
  const scratchEllipsoid = new Matrix3.Ellipsoid();
@@ -51,28 +51,6 @@ define(['./AxisAlignedBoundingBox-4bfd84f3', './Matrix2-e1298525', './Matrix3-41
51
51
  get: Check.DeveloperError.throwInstantiationError,
52
52
  },
53
53
 
54
- /**
55
- * Gets a value indicating whether or not the provider is ready for use.
56
- * @memberof TerrainProvider.prototype
57
- * @type {boolean}
58
- * @readonly
59
- * @deprecated
60
- */
61
- ready: {
62
- get: Check.DeveloperError.throwInstantiationError,
63
- },
64
-
65
- /**
66
- * Gets a promise that resolves to true when the provider is ready for use.
67
- * @memberof TerrainProvider.prototype
68
- * @type {Promise<boolean>}
69
- * @readonly
70
- * @deprecated
71
- */
72
- readyPromise: {
73
- get: Check.DeveloperError.throwInstantiationError,
74
- },
75
-
76
54
  /**
77
55
  * Gets a value indicating whether or not the provider includes a water mask. The water mask
78
56
  * indicates which areas of the globe are water rather than land, so they can be rendered
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.105.1
4
+ * Version 1.107
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @license
3
3
  * Cesium - https://github.com/CesiumGS/cesium
4
- * Version 1.105.1
4
+ * Version 1.107
5
5
  *
6
6
  * Copyright 2011-2022 Cesium Contributors
7
7
  *
@@ -3,7 +3,6 @@ import Check from "./Check.js";
3
3
  import Credit from "./Credit.js";
4
4
  import defaultValue from "./defaultValue.js";
5
5
  import defined from "./defined.js";
6
- import deprecationWarning from "./deprecationWarning.js";
7
6
  import Ellipsoid from "./Ellipsoid.js";
8
7
  import Event from "./Event.js";
9
8
  import GeographicTilingScheme from "./GeographicTilingScheme.js";
@@ -31,7 +30,6 @@ const ALL_CHILDREN = 15;
31
30
  * @property {Ellipsoid} [ellipsoid] The ellipsoid. If the tilingScheme is specified,
32
31
  * this parameter is ignored and the tiling scheme's ellipsoid is used instead.
33
32
  * If neither parameter is specified, the WGS84 ellipsoid is used.
34
- * @property {Resource|string|Promise<Resource>|Promise<string>} [url] The URL of the ArcGIS ImageServer service. Deprecated.
35
33
  */
36
34
 
37
35
  /**
@@ -77,8 +75,6 @@ TerrainProviderBuilder.prototype.build = function (provider) {
77
75
  provider._tilesAvailabilityLoaded = this.tilesAvailabilityLoaded;
78
76
  provider._levelZeroMaximumGeometricError = this.levelZeroMaximumGeometricError;
79
77
  provider._terrainDataStructure = this.terrainDataStructure;
80
-
81
- provider._ready = true;
82
78
  };
83
79
 
84
80
  function parseMetadataSuccess(terrainProviderBuilder, metadata) {
@@ -248,50 +244,13 @@ function ArcGISTiledElevationTerrainProvider(options) {
248
244
  this._height = undefined;
249
245
  this._encoding = undefined;
250
246
  this._lodCount = undefined;
251
- const token = options.token;
252
247
 
253
248
  this._hasAvailability = false;
254
249
  this._tilesAvailable = undefined;
255
250
  this._tilesAvailabilityLoaded = undefined;
256
251
  this._availableCache = {};
257
- this._ready = false;
258
252
 
259
253
  this._errorEvent = new Event();
260
-
261
- if (defined(options.url)) {
262
- deprecationWarning(
263
- "ArcGISTiledElevationTerrainProvider options.url",
264
- "options.url was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ArcGISTiledElevationTerrainProvider.fromUrl instead."
265
- );
266
-
267
- const that = this;
268
- const terrainProviderBuilder = new TerrainProviderBuilder(options);
269
- this._readyPromise = Promise.resolve(options.url).then(async function (
270
- url
271
- ) {
272
- let resource = Resource.createIfNeeded(url);
273
- resource.appendForwardSlash();
274
- if (defined(token)) {
275
- resource = resource.getDerivedResource({
276
- queryParameters: {
277
- token: token,
278
- },
279
- });
280
- }
281
- that._resource = resource;
282
-
283
- const metadataResource = resource.getDerivedResource({
284
- queryParameters: {
285
- f: "pjson",
286
- },
287
- });
288
-
289
- await requestMetadata(terrainProviderBuilder, metadataResource, that);
290
- terrainProviderBuilder.build(that);
291
-
292
- return true;
293
- });
294
- }
295
254
  }
296
255
 
297
256
  Object.defineProperties(ArcGISTiledElevationTerrainProvider.prototype, {
@@ -334,40 +293,6 @@ Object.defineProperties(ArcGISTiledElevationTerrainProvider.prototype, {
334
293
  },
335
294
  },
336
295
 
337
- /**
338
- * Gets a value indicating whether or not the provider is ready for use.
339
- * @memberof ArcGISTiledElevationTerrainProvider.prototype
340
- * @type {boolean}
341
- * @readonly
342
- * @deprecated
343
- */
344
- ready: {
345
- get: function () {
346
- deprecationWarning(
347
- "ArcGISTiledElevationTerrainProvider.ready",
348
- "ArcGISTiledElevationTerrainProvider.ready was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ArcGISTiledElevationTerrainProvider.fromUrl instead."
349
- );
350
- return this._ready;
351
- },
352
- },
353
-
354
- /**
355
- * Gets a promise that resolves to true when the provider is ready for use.
356
- * @memberof ArcGISTiledElevationTerrainProvider.prototype
357
- * @type {Promise<boolean>}
358
- * @readonly
359
- * @deprecated
360
- */
361
- readyPromise: {
362
- get: function () {
363
- deprecationWarning(
364
- "ArcGISTiledElevationTerrainProvider.readyPromise",
365
- "ArcGISTiledElevationTerrainProvider.readyPromise was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ArcGISTiledElevationTerrainProvider.fromUrl instead."
366
- );
367
- return this._readyPromise;
368
- },
369
- },
370
-
371
296
  /**
372
297
  * Gets a value indicating whether or not the provider includes a water mask. The water mask
373
298
  * indicates which areas of the globe are water rather than land, so they can be rendered
@@ -5,7 +5,6 @@ import Check from "./Check.js";
5
5
  import Credit from "./Credit.js";
6
6
  import defaultValue from "./defaultValue.js";
7
7
  import defined from "./defined.js";
8
- import deprecationWarning from "./deprecationWarning.js";
9
8
  import Event from "./Event.js";
10
9
  import GeographicTilingScheme from "./GeographicTilingScheme.js";
11
10
  import WebMercatorTilingScheme from "./WebMercatorTilingScheme.js";
@@ -48,7 +47,6 @@ function LayerInformation(layer) {
48
47
  * @property {boolean} [requestMetadata=true] Flag that indicates if the client should request per tile metadata from the server, if available.
49
48
  * @property {Ellipsoid} [ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
50
49
  * @property {Credit|string} [credit] A credit for the data source, which is displayed on the canvas.
51
- * @property {Resource|string|Promise<Resource>|Promise<string>} [url] The URL of the Cesium terrain server. Deprecated.
52
50
  */
53
51
 
54
52
  /**
@@ -112,8 +110,6 @@ TerrainProviderBuilder.prototype.build = function (provider) {
112
110
  provider._hasWaterMask = this.hasWaterMask;
113
111
  provider._hasVertexNormals = this.hasVertexNormals;
114
112
  provider._hasMetadata = this.hasMetadata;
115
-
116
- provider._ready = true;
117
113
  };
118
114
 
119
115
  async function parseMetadataSuccess(terrainProviderBuilder, data, provider) {
@@ -527,46 +523,9 @@ function CesiumTerrainProvider(options) {
527
523
  this._tilingScheme = undefined;
528
524
  this._levelZeroMaximumGeometricError = undefined;
529
525
  this._layers = undefined;
530
-
531
- this._ready = false;
532
526
  this._tileCredits = undefined;
533
-
534
- this._readyPromise = Promise.resolve(true);
535
- if (defined(options.url)) {
536
- deprecationWarning(
537
- "CesiumTerrainProvider options.url",
538
- "options.url was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use CesiumTerrainProvider.fromIonAssetId or CesiumTerrainProvider.fromUrl instead."
539
- );
540
- this._readyPromise = CesiumTerrainProvider._initializeReadyPromise(
541
- options,
542
- this
543
- );
544
- }
545
527
  }
546
528
 
547
- // Exposed for deprecation
548
- CesiumTerrainProvider._initializeReadyPromise = async function (
549
- options,
550
- provider
551
- ) {
552
- const url = await Promise.resolve(options.url);
553
-
554
- const terrainProviderBuilder = new TerrainProviderBuilder(options);
555
- const resource = Resource.createIfNeeded(url);
556
- resource.appendForwardSlash();
557
- terrainProviderBuilder.lastResource = resource;
558
- terrainProviderBuilder.layerJsonResource = terrainProviderBuilder.lastResource.getDerivedResource(
559
- {
560
- url: "layer.json",
561
- }
562
- );
563
-
564
- await requestLayerJson(terrainProviderBuilder, provider);
565
- terrainProviderBuilder.build(provider);
566
-
567
- return true;
568
- };
569
-
570
529
  /**
571
530
  * When using the Quantized-Mesh format, a tile may be returned that includes additional extensions, such as PerVertexNormals, watermask, etc.
572
531
  * This enumeration defines the unique identifiers for each type of extension data that has been appended to the standard mesh data.
@@ -901,6 +860,8 @@ CesiumTerrainProvider.prototype.requestTileGeometry = function (
901
860
  const layers = this._layers;
902
861
  let layerToUse;
903
862
  const layerCount = layers.length;
863
+ let unknownAvailability = false;
864
+ let availabilityPromise = Promise.resolve();
904
865
 
905
866
  if (layerCount === 1) {
906
867
  // Optimized path for single layers
@@ -915,9 +876,32 @@ CesiumTerrainProvider.prototype.requestTileGeometry = function (
915
876
  layerToUse = layer;
916
877
  break;
917
878
  }
879
+
880
+ const availabilityUnloaded = checkLayer(
881
+ this,
882
+ x,
883
+ y,
884
+ level,
885
+ layer,
886
+ i === 0
887
+ );
888
+ if (availabilityUnloaded.result) {
889
+ // We can't know yet since the availability is not yet loaded
890
+ unknownAvailability = true;
891
+ availabilityPromise = availabilityPromise.then(
892
+ () => availabilityUnloaded.promise
893
+ );
894
+ }
918
895
  }
919
896
  }
920
897
 
898
+ if (!defined(layerToUse) && unknownAvailability) {
899
+ // Try again when availability data is ready– Otherwise the tile will be marked as failed and never re-requested
900
+ return availabilityPromise.then(() =>
901
+ this.requestTileGeometry(x, y, level, request)
902
+ );
903
+ }
904
+
921
905
  return requestTileGeometry(this, x, y, level, layerToUse, request);
922
906
  };
923
907
 
@@ -1051,40 +1035,6 @@ Object.defineProperties(CesiumTerrainProvider.prototype, {
1051
1035
  },
1052
1036
  },
1053
1037
 
1054
- /**
1055
- * Gets a value indicating whether or not the provider is ready for use.
1056
- * @memberof CesiumTerrainProvider.prototype
1057
- * @type {boolean}
1058
- * @readonly
1059
- * @deprecated
1060
- */
1061
- ready: {
1062
- get: function () {
1063
- deprecationWarning(
1064
- "CesiumTerrainProvider.ready",
1065
- "CesiumTerrainProvider.ready was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use CesiumTerrainProvider.fromIonAssetId or CesiumTerrainProvider.fromUrl instead."
1066
- );
1067
- return this._ready;
1068
- },
1069
- },
1070
-
1071
- /**
1072
- * Gets a promise that resolves to true when the provider is ready for use.
1073
- * @memberof CesiumTerrainProvider.prototype
1074
- * @type {Promise<boolean>}
1075
- * @readonly
1076
- * @deprecated
1077
- */
1078
- readyPromise: {
1079
- get: function () {
1080
- deprecationWarning(
1081
- "CesiumTerrainProvider.readyPromise",
1082
- "CesiumTerrainProvider.readyPromise was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use CesiumTerrainProvider.fromIonAssetId or CesiumTerrainProvider.fromUrl instead."
1083
- );
1084
- return this._readyPromise;
1085
- },
1086
- },
1087
-
1088
1038
  /**
1089
1039
  * Gets a value indicating whether or not the provider includes a water mask. The water mask
1090
1040
  * indicates which areas of the globe are water rather than land, so they can be rendered
@@ -352,9 +352,9 @@ const rgbaMatcher = /^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i;
352
352
  //#rrggbbaa
353
353
  const rrggbbaaMatcher = /^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i;
354
354
  //rgb(), rgba(), or rgb%()
355
- const rgbParenthesesMatcher = /^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)$/i;
355
+ const rgbParenthesesMatcher = /^rgba?\s*\(\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)\s*[,\s]+\s*([0-9.]+%?)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i;
356
356
  //hsl() or hsla()
357
- const hslParenthesesMatcher = /^hsla?\(\s*([0-9.]+)\s*,\s*([0-9.]+%)\s*,\s*([0-9.]+%)(?:\s*,\s*([0-9.]+))?\s*\)$/i;
357
+ const hslParenthesesMatcher = /^hsla?\s*\(\s*([0-9.]+)\s*[,\s]+\s*([0-9.]+%)\s*[,\s]+\s*([0-9.]+%)(?:\s*[,\s/]+\s*([0-9.]+))?\s*\)$/i;
358
358
 
359
359
  /**
360
360
  * Creates a Color instance from a CSS color value.
@@ -379,8 +379,8 @@ Color.fromCssColorString = function (color, result) {
379
379
  result = new Color();
380
380
  }
381
381
 
382
- // Remove all whitespaces from the color string
383
- color = color.replace(/\s/g, "");
382
+ // Remove all surrounding whitespaces from the color string
383
+ color = color.trim();
384
384
 
385
385
  const namedColor = Color[color.toUpperCase()];
386
386
  if (defined(namedColor)) {
@@ -2,7 +2,6 @@ import Check from "./Check.js";
2
2
  import Credit from "./Credit.js";
3
3
  import defaultValue from "./defaultValue.js";
4
4
  import defined from "./defined.js";
5
- import deprecationWarning from "./deprecationWarning.js";
6
5
  import Ellipsoid from "./Ellipsoid.js";
7
6
  import Event from "./Event.js";
8
7
  import GeographicTilingScheme from "./GeographicTilingScheme.js";
@@ -89,9 +88,6 @@ function CustomHeightmapTerrainProvider(options) {
89
88
  credit = new Credit(credit);
90
89
  }
91
90
  this._credit = credit;
92
-
93
- this._ready = true;
94
- this._readyPromise = Promise.resolve(true);
95
91
  }
96
92
 
97
93
  Object.defineProperties(CustomHeightmapTerrainProvider.prototype, {
@@ -134,40 +130,6 @@ Object.defineProperties(CustomHeightmapTerrainProvider.prototype, {
134
130
  },
135
131
  },
136
132
 
137
- /**
138
- * Gets a value indicating whether or not the provider is ready for use.
139
- * @memberof CustomHeightmapTerrainProvider.prototype
140
- * @type {boolean}
141
- * @readonly
142
- * @deprecated
143
- */
144
- ready: {
145
- get: function () {
146
- deprecationWarning(
147
- "CustomHeightmapTerrainProvider.ready",
148
- "CustomHeightmapTerrainProvider.ready was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107."
149
- );
150
- return true;
151
- },
152
- },
153
-
154
- /**
155
- * Gets a promise that resolves to true when the provider is ready for use.
156
- * @memberof CustomHeightmapTerrainProvider.prototype
157
- * @type {Promise<boolean>}
158
- * @readonly
159
- * @deprecated
160
- */
161
- readyPromise: {
162
- get: function () {
163
- deprecationWarning(
164
- "CustomHeightmapTerrainProvider.readyPromise",
165
- "CustomHeightmapTerrainProvider.readyPromise was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107."
166
- );
167
- return this._readyPromise;
168
- },
169
- },
170
-
171
133
  /**
172
134
  * Gets a value indicating whether or not the provider includes a water mask. The water mask
173
135
  * indicates which areas of the globe are water rather than land, so they can be rendered
@@ -1,6 +1,5 @@
1
1
  import defaultValue from "./defaultValue.js";
2
2
  import defined from "./defined.js";
3
- import deprecationWarning from "./deprecationWarning.js";
4
3
  import Ellipsoid from "./Ellipsoid.js";
5
4
  import Event from "./Event.js";
6
5
  import GeographicTilingScheme from "./GeographicTilingScheme.js";
@@ -43,8 +42,6 @@ function EllipsoidTerrainProvider(options) {
43
42
  );
44
43
 
45
44
  this._errorEvent = new Event();
46
- this._ready = true;
47
- this._readyPromise = Promise.resolve(true);
48
45
  }
49
46
 
50
47
  Object.defineProperties(EllipsoidTerrainProvider.prototype, {
@@ -87,40 +84,6 @@ Object.defineProperties(EllipsoidTerrainProvider.prototype, {
87
84
  },
88
85
  },
89
86
 
90
- /**
91
- * Gets a value indicating whether or not the provider is ready for use.
92
- * @memberof EllipsoidTerrainProvider.prototype
93
- * @type {boolean}
94
- * @readonly
95
- * @deprecated
96
- */
97
- ready: {
98
- get: function () {
99
- deprecationWarning(
100
- "EllipsoidTerrainProvider.ready",
101
- "EllipsoidTerrainProvider.ready was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107."
102
- );
103
- return true;
104
- },
105
- },
106
-
107
- /**
108
- * Gets a promise that resolves to true when the provider is ready for use.
109
- * @memberof EllipsoidTerrainProvider.prototype
110
- * @type {Promise<boolean>}
111
- * @readonly
112
- * @deprecated
113
- */
114
- readyPromise: {
115
- get: function () {
116
- deprecationWarning(
117
- "EllipsoidTerrainProvider.readyPromise",
118
- "EllipsoidTerrainProvider.readyPromise was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107."
119
- );
120
- return this._readyPromise;
121
- },
122
- },
123
-
124
87
  /**
125
88
  * Gets a value indicating whether or not the provider includes a water mask. The water mask
126
89
  * indicates which areas of the globe are water rather than land, so they can be rendered
@@ -4,7 +4,6 @@ import Check from "./Check.js";
4
4
  import Credit from "./Credit.js";
5
5
  import defaultValue from "./defaultValue.js";
6
6
  import defined from "./defined.js";
7
- import deprecationWarning from "./deprecationWarning.js";
8
7
  import GoogleEarthEnterpriseTileInformation from "./GoogleEarthEnterpriseTileInformation.js";
9
8
  import isBitSet from "./isBitSet.js";
10
9
  import loadAndExecuteScript from "./loadAndExecuteScript.js";
@@ -41,8 +40,6 @@ const defaultKey = stringToBuffer(
41
40
  * @alias GoogleEarthEnterpriseMetadata
42
41
  * @constructor
43
42
  *
44
- * @param {Resource|string} [resourceOrUrl] The url of the Google Earth Enterprise server hosting the imagery. Deprecated.
45
- *
46
43
  * @see GoogleEarthEnterpriseImageryProvider
47
44
  * @see GoogleEarthEnterpriseTerrainProvider
48
45
  *
@@ -100,39 +97,6 @@ function GoogleEarthEnterpriseMetadata(resourceOrUrl) {
100
97
  this._quadPacketVersion = 1;
101
98
  this._tileInfo = {};
102
99
  this._subtreePromises = {};
103
-
104
- this._readyPromise = Promise.resolve(true);
105
- if (defined(resourceOrUrl)) {
106
- deprecationWarning(
107
- "GoogleEarthEnterpriseMetadata options.url",
108
- "GoogleEarthEnterpriseMetadata constructor parmeter resourceOrUrl was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use GoogleEarthEnterpriseMetadata.fromUrl instead."
109
- );
110
-
111
- let url = resourceOrUrl;
112
-
113
- if (typeof url !== "string" && !(url instanceof Resource)) {
114
- url = resourceOrUrl.url;
115
- }
116
-
117
- const resource = Resource.createIfNeeded(url);
118
- resource.appendForwardSlash();
119
- this._resource = resource;
120
-
121
- const that = this;
122
- this._readyPromise = requestDbRoot(this)
123
- .then(function () {
124
- return that.getQuadTreePacket("", that._quadPacketVersion);
125
- })
126
- .then(function () {
127
- return true;
128
- })
129
- .catch(function (e) {
130
- const message = `An error occurred while accessing ${
131
- getMetadataResource(that, "", 1).url
132
- }.`;
133
- return Promise.reject(new RuntimeError(message));
134
- });
135
- }
136
100
  }
137
101
 
138
102
  Object.defineProperties(GoogleEarthEnterpriseMetadata.prototype, {
@@ -171,23 +135,6 @@ Object.defineProperties(GoogleEarthEnterpriseMetadata.prototype, {
171
135
  return this._resource;
172
136
  },
173
137
  },
174
-
175
- /**
176
- * Gets a promise that resolves to true when the metadata is ready for use.
177
- * @memberof GoogleEarthEnterpriseMetadata.prototype
178
- * @type {Promise<boolean>}
179
- * @readonly
180
- * @deprecated
181
- */
182
- readyPromise: {
183
- get: function () {
184
- deprecationWarning(
185
- "GoogleEarthEnterpriseMetadata.readyPromise",
186
- "GoogleEarthEnterpriseMetadata.readyPromise was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use GoogleEarthEnterpriseMetadata.fromUrl instead."
187
- );
188
- return this._readyPromise;
189
- },
190
- },
191
138
  });
192
139
 
193
140
  /**