@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
@@ -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 Event from "./Event.js";
7
6
  import GeographicTilingScheme from "./GeographicTilingScheme.js";
8
7
  import GoogleEarthEnterpriseMetadata from "./GoogleEarthEnterpriseMetadata.js";
@@ -14,10 +13,8 @@ import Rectangle from "./Rectangle.js";
14
13
  import Request from "./Request.js";
15
14
  import RequestState from "./RequestState.js";
16
15
  import RequestType from "./RequestType.js";
17
- import Resource from "./Resource.js";
18
16
  import RuntimeError from "./RuntimeError.js";
19
17
  import TaskProcessor from "./TaskProcessor.js";
20
- import TileProviderError from "./TileProviderError.js";
21
18
 
22
19
  const TerrainState = {
23
20
  UNKNOWN: 0,
@@ -74,8 +71,6 @@ TerrainCache.prototype.tidy = function () {
74
71
  *
75
72
  * @property {Ellipsoid} [ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
76
73
  * @property {Credit|string} [credit] A credit for the data source, which is displayed on the canvas.
77
- * @property {Resource|string} [url] The url of the Google Earth Enterprise server hosting the imagery. Deprecated.
78
- * @property {GoogleEarthEnterpriseMetadata} [metadata] A metadata object that can be used to share metadata requests with a GoogleEarthEnterpriseImageryProvider. Deprecated.
79
74
  */
80
75
 
81
76
  /**
@@ -88,7 +83,7 @@ TerrainCache.prototype.tidy = function () {
88
83
  * @alias GoogleEarthEnterpriseTerrainProvider
89
84
  * @constructor
90
85
  *
91
- * @param {GoogleEarthEnterpriseTerrainProvider.ConstructorOptions} options An object describing initialization options
86
+ * @param {GoogleEarthEnterpriseTerrainProvider.ConstructorOptions} [options] An object describing initialization options
92
87
  *
93
88
  * @see GoogleEarthEnterpriseTerrainProvider.fromMetadata
94
89
  * @see GoogleEarthEnterpriseMetadata.fromUrl
@@ -130,65 +125,6 @@ function GoogleEarthEnterpriseTerrainProvider(options) {
130
125
  this._terrainRequests = {};
131
126
 
132
127
  this._errorEvent = new Event();
133
- this._ready = false;
134
-
135
- if (defined(options.url)) {
136
- deprecationWarning(
137
- "GoogleEarthEnterpriseTerrainProvider options.url",
138
- "options.url was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use GoogleEarthEnterpriseTerrainProvider.fromMetadata instead."
139
- );
140
- const resource = Resource.createIfNeeded(options.url);
141
- const that = this;
142
- let metadataError;
143
- this._readyPromise = GoogleEarthEnterpriseMetadata.fromUrl(resource)
144
- .then((metadata) => {
145
- if (!metadata.terrainPresent) {
146
- const e = new RuntimeError(
147
- `The server ${metadata.url} doesn't have terrain`
148
- );
149
-
150
- return Promise.reject(e);
151
- }
152
-
153
- TileProviderError.reportSuccess(metadataError);
154
- that._metadata = metadata;
155
- that._ready = true;
156
- return true;
157
- })
158
- .catch((e) => {
159
- metadataError = TileProviderError.reportError(
160
- metadataError,
161
- that,
162
- that._errorEvent,
163
- e.message,
164
- undefined,
165
- undefined,
166
- undefined,
167
- e
168
- );
169
-
170
- throw e;
171
- });
172
- } else if (defined(options.metadata)) {
173
- deprecationWarning(
174
- "GoogleEarthEnterpriseTerrainProvider options.metadata",
175
- "options.metadata was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use GoogleEarthEnterpriseTerrainProvider.fromMetadata instead."
176
- );
177
- const metadata = options.metadata;
178
- this._metadata = metadata;
179
- const that = this;
180
- this._readyPromise = Promise.resolve(this._metadata._readyPromise).then(
181
- () => {
182
- if (!metadata.terrainPresent) {
183
- throw new RuntimeError(
184
- `The server ${metadata.url} doesn't have terrain`
185
- );
186
- }
187
-
188
- that._ready = true;
189
- }
190
- );
191
- }
192
128
  }
193
129
 
194
130
  Object.defineProperties(GoogleEarthEnterpriseTerrainProvider.prototype, {
@@ -242,40 +178,6 @@ Object.defineProperties(GoogleEarthEnterpriseTerrainProvider.prototype, {
242
178
  },
243
179
  },
244
180
 
245
- /**
246
- * Gets a value indicating whether or not the provider is ready for use.
247
- * @memberof GoogleEarthEnterpriseTerrainProvider.prototype
248
- * @type {boolean}
249
- * @readonly
250
- * @deprecated
251
- */
252
- ready: {
253
- get: function () {
254
- deprecationWarning(
255
- "GoogleEarthEnterpriseTerrainProvider.ready",
256
- "GoogleEarthEnterpriseTerrainProvider.ready was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107."
257
- );
258
- return this._ready;
259
- },
260
- },
261
-
262
- /**
263
- * Gets a promise that resolves to true when the provider is ready for use.
264
- * @memberof GoogleEarthEnterpriseTerrainProvider.prototype
265
- * @type {Promise<boolean>}
266
- * @readonly
267
- * @deprecated
268
- */
269
- readyPromise: {
270
- get: function () {
271
- deprecationWarning(
272
- "GoogleEarthEnterpriseTerrainProvider.readyPromise",
273
- "GoogleEarthEnterpriseTerrainProvider.readyPromise was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107."
274
- );
275
- return this._readyPromise;
276
- },
277
- },
278
-
279
181
  /**
280
182
  * Gets the credit to display when this terrain provider is active. Typically this is used to credit
281
183
  * the source of the terrain.
@@ -359,8 +261,6 @@ GoogleEarthEnterpriseTerrainProvider.fromMetadata = function (
359
261
 
360
262
  const provider = new GoogleEarthEnterpriseTerrainProvider(options);
361
263
  provider._metadata = metadata;
362
- provider._readyPromise = Promise.resolve(true);
363
- provider._ready = true;
364
264
 
365
265
  return provider;
366
266
  };
@@ -3,7 +3,7 @@ import defined from "./defined.js";
3
3
  import Resource from "./Resource.js";
4
4
 
5
5
  let defaultKeyCredit;
6
- const defaultKey = "AIzaSyBESBYnp1EcqtlAcjMTJ65GjUsJtaCWVXA";
6
+ const defaultKey = "AIzaSyCUMejKrafNiN2PiqvWNPxQJBuDRg-VqKQ";
7
7
 
8
8
  /**
9
9
  * Default settings for accessing the Google Maps API.
@@ -4,7 +4,7 @@ import Resource from "./Resource.js";
4
4
 
5
5
  let defaultTokenCredit;
6
6
  const defaultAccessToken =
7
- "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIwZWQ3OWFlZC1kOTg3LTRlZjctYTAyYy0xNjFmODE1MWE2NGUiLCJpZCI6MjU5LCJpYXQiOjE2ODI5NDYzODh9.DEH4GpqliH-xsDE7h-ZCICtHgnGu32wdSjt4hFqw7lU";
7
+ "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJhYzVkMTc1ZS00NTRhLTRjY2QtYTQwZS01YmU2Mjg1ODAwN2YiLCJpZCI6MjU5LCJpYXQiOjE2ODgzOTgwMjl9.MZC_HUBRd0y5HJeB-F5QSpT-fEgTM6mI5gMaSND9FHc";
8
8
  /**
9
9
  * Default settings for accessing the Cesium ion API.
10
10
  *
@@ -54,28 +54,6 @@ Object.defineProperties(TerrainProvider.prototype, {
54
54
  get: DeveloperError.throwInstantiationError,
55
55
  },
56
56
 
57
- /**
58
- * Gets a value indicating whether or not the provider is ready for use.
59
- * @memberof TerrainProvider.prototype
60
- * @type {boolean}
61
- * @readonly
62
- * @deprecated
63
- */
64
- ready: {
65
- get: DeveloperError.throwInstantiationError,
66
- },
67
-
68
- /**
69
- * Gets a promise that resolves to true when the provider is ready for use.
70
- * @memberof TerrainProvider.prototype
71
- * @type {Promise<boolean>}
72
- * @readonly
73
- * @deprecated
74
- */
75
- readyPromise: {
76
- get: DeveloperError.throwInstantiationError,
77
- },
78
-
79
57
  /**
80
58
  * Gets a value indicating whether or not the provider includes a water mask. The water mask
81
59
  * indicates which areas of the globe are water rather than land, so they can be rendered
@@ -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";
@@ -27,7 +26,6 @@ function DataRectangle(rectangle, maxLevel) {
27
26
  *
28
27
  * @property {Ellipsoid} [ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
29
28
  * @property {Credit|string} [credit] A credit for the data source, which is displayed on the canvas.
30
- * @property {Resource|string} [url] The URL of the VR-TheWorld TileMap. Deprecated.
31
29
  */
32
30
 
33
31
  /**
@@ -53,7 +51,6 @@ TerrainProviderBuilder.prototype.build = function (provider) {
53
51
  provider._heightmapHeight = this.heightmapHeight;
54
52
  provider._levelZeroMaximumGeometricError = this.levelZeroMaximumGeometricError;
55
53
  provider._rectangles = this.rectangles;
56
- provider._ready = true;
57
54
  };
58
55
 
59
56
  function metadataSuccess(terrainProviderBuilder, xml) {
@@ -160,7 +157,6 @@ function VRTheWorldTerrainProvider(options) {
160
157
  options = defaultValue(options, defaultValue.EMPTY_OBJECT);
161
158
 
162
159
  this._errorEvent = new Event();
163
- this._ready = false;
164
160
 
165
161
  this._terrainDataStructure = {
166
162
  heightScale: 1.0 / 1000.0,
@@ -181,27 +177,6 @@ function VRTheWorldTerrainProvider(options) {
181
177
 
182
178
  this._tilingScheme = undefined;
183
179
  this._rectangles = [];
184
-
185
- if (defined(options.url)) {
186
- deprecationWarning(
187
- "VRTheWorldTerrainProvider options.url",
188
- "options.url was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. VRTheWorldTerrainProvider.fromUrl instead."
189
- );
190
- const that = this;
191
- const terrainProviderBuilder = new TerrainProviderBuilder(options);
192
- const resource = Resource.createIfNeeded(options.url);
193
-
194
- this._resource = resource;
195
-
196
- this._readyPromise = requestMetadata(
197
- terrainProviderBuilder,
198
- resource,
199
- that
200
- ).then(() => {
201
- terrainProviderBuilder.build(that);
202
- return true;
203
- });
204
- }
205
180
  }
206
181
 
207
182
  Object.defineProperties(VRTheWorldTerrainProvider.prototype, {
@@ -244,40 +219,6 @@ Object.defineProperties(VRTheWorldTerrainProvider.prototype, {
244
219
  },
245
220
  },
246
221
 
247
- /**
248
- * Gets a value indicating whether or not the provider is ready for use.
249
- * @memberof VRTheWorldTerrainProvider.prototype
250
- * @type {boolean}
251
- * @readonly
252
- * @deprecated
253
- */
254
- ready: {
255
- get: function () {
256
- deprecationWarning(
257
- "VRTheWorldTerrainProvider.ready",
258
- "VRTheWorldTerrainProvider.ready was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use VRTheWorldTerrainProvider.fromUrl instead."
259
- );
260
- return this._ready;
261
- },
262
- },
263
-
264
- /**
265
- * Gets a promise that resolves to true when the provider is ready for use.
266
- * @memberof VRTheWorldTerrainProvider.prototype
267
- * @type {Promise<boolean>}
268
- * @readonly
269
- * @deprecated
270
- */
271
- readyPromise: {
272
- get: function () {
273
- deprecationWarning(
274
- "VRTheWorldTerrainProvider.readyPromise",
275
- "VRTheWorldTerrainProvider.readyPromise was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use VRTheWorldTerrainProvider.fromUrl instead."
276
- );
277
- return this._readyPromise;
278
- },
279
- },
280
-
281
222
  /**
282
223
  * Gets a value indicating whether or not the provider includes a water mask. The water mask
283
224
  * indicates which areas of the globe are water rather than land, so they can be rendered
@@ -42,9 +42,6 @@ async function sampleTerrain(terrainProvider, level, positions) {
42
42
  Check.defined("positions", positions);
43
43
  //>>includeEnd('debug');
44
44
 
45
- // readyPromise has been deprecated; This is here for backwards compatibility
46
- await terrainProvider._readyPromise;
47
-
48
45
  return doSampling(terrainProvider, level, positions);
49
46
  }
50
47
 
@@ -39,9 +39,6 @@ async function sampleTerrainMostDetailed(terrainProvider, positions) {
39
39
  const byLevel = [];
40
40
  const maxLevels = [];
41
41
 
42
- // readyPromise has been deprecated; This is here for backwards compatibility
43
- await terrainProvider._readyPromise;
44
-
45
42
  const availability = terrainProvider.availability;
46
43
 
47
44
  //>>includeStart('debug', pragmas.debug);
@@ -79,16 +79,17 @@ Cesium3DTilesetVisualizer.prototype.update = function (time) {
79
79
  );
80
80
  }
81
81
 
82
+ const tileset = defined(tilesetData)
83
+ ? tilesetData.tilesetPrimitive
84
+ : undefined;
85
+
82
86
  if (!show) {
83
- if (defined(tilesetData)) {
84
- tilesetData.tilesetPrimitive.show = false;
87
+ if (defined(tileset)) {
88
+ tileset.show = false;
85
89
  }
86
90
  continue;
87
91
  }
88
92
 
89
- const tileset = defined(tilesetData)
90
- ? tilesetData.tilesetPrimitive
91
- : undefined;
92
93
  if (!defined(tilesetData) || resource.url !== tilesetData.url) {
93
94
  if (defined(tileset)) {
94
95
  primitives.removeAndDestroy(tileset);
@@ -499,12 +499,13 @@ DataSourceDisplay.prototype._onDataSourceMoved = function (
499
499
  * @callback DataSourceDisplay.VisualizersCallback
500
500
  *
501
501
  * @param {Scene} scene The scene to create visualizers for.
502
+ * @param {EntityCluster} entityCluster The entity cluster to create visualizers for.
502
503
  * @param {DataSource} dataSource The data source to create visualizers for.
503
504
  * @returns {Visualizer[]} An array of visualizers used for visualization.
504
505
  *
505
506
  * @example
506
- * function createVisualizers(scene, dataSource) {
507
- * return [new Cesium.BillboardVisualizer(scene, dataSource.entities)];
507
+ * function createVisualizers(scene, entityCluster, dataSource) {
508
+ * return [new Cesium.BillboardVisualizer(entityCluster, dataSource.entities)];
508
509
  * }
509
510
  */
510
511
  export default DataSourceDisplay;
@@ -637,13 +637,12 @@ const positionScratch = new Cartesian3();
637
637
  const orientationScratch = new Quaternion();
638
638
 
639
639
  /**
640
- * Computes the model matrix for the entity's transform at specified time. Returns undefined if orientation or position
641
- * are undefined.
640
+ * Computes the model matrix for the entity's transform at specified time. Returns undefined if position is undefined
642
641
  *
643
642
  * @param {JulianDate} time The time to retrieve model matrix for.
644
643
  * @param {Matrix4} [result] The object onto which to store the result.
645
644
  *
646
- * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if one was not provided. Result is undefined if position or orientation are undefined.
645
+ * @returns {Matrix4} The modified result parameter or a new Matrix4 instance if one was not provided. Result is undefined if position is undefined.
647
646
  */
648
647
  Entity.prototype.computeModelMatrix = function (time, result) {
649
648
  //>>includeStart('debug', pragmas.debug);
@@ -1,5 +1,4 @@
1
1
  import defined from "../Core/defined.js";
2
- import deprecationWarning from "../Core/deprecationWarning.js";
3
2
  import Event from "../Core/Event.js";
4
3
  /**
5
4
  * Describes a KmlTour, which uses KmlTourFlyTo, and KmlTourWait to
@@ -85,21 +84,11 @@ KmlTour.prototype.addPlaylistEntry = function (entry) {
85
84
  /**
86
85
  * Play this tour.
87
86
  *
88
- * @param {Viewer|CesiumWidget} widget The widget.
87
+ * @param {CesiumWidget} widget The widget.
89
88
  * @param {object} [cameraOptions] these options will be merged with {@link Camera#flyTo}
90
89
  * options for FlyTo playlist entries.
91
90
  */
92
91
  KmlTour.prototype.play = function (widget, cameraOptions) {
93
- // We want to avoid importing the Viewer/CesiumWidget class, so we check
94
- // for the presence of the .cesiumWidget property that's only available
95
- // on the Viewer.
96
- if (defined(widget.cesiumWidget)) {
97
- deprecationWarning(
98
- "viewer",
99
- "The viewer parameter has been deprecated in Cesium 1.99. It will be removed in 1.100. Instead of a Viewer, pass a CesiumWidget instead."
100
- );
101
- }
102
-
103
92
  this.tourStart.raiseEvent();
104
93
 
105
94
  const tour = this;
@@ -451,13 +451,6 @@ ModelVisualizer.prototype.getBoundingSphere = function (entity, result) {
451
451
  const hasHeightReference = model.heightReference !== HeightReference.NONE;
452
452
  if (defined(globe) && hasHeightReference) {
453
453
  const ellipsoid = globe.ellipsoid;
454
- // We cannot query the availability of the terrain provider till its ready, so the
455
- // bounding sphere state will remain pending till the terrain provider is ready.
456
- // ready is deprecated. This is here for backwards compatibility
457
- if (!terrainProvider._ready) {
458
- return BoundingSphereState.PENDING;
459
- }
460
-
461
454
  const modelMatrix = model.modelMatrix;
462
455
  scratchPosition.x = modelMatrix[12];
463
456
  scratchPosition.y = modelMatrix[13];
@@ -1340,7 +1340,11 @@ function continueDraw(context, drawCommand, shaderProgram, uniformMap) {
1340
1340
 
1341
1341
  if (defined(indexBuffer)) {
1342
1342
  offset = offset * indexBuffer.bytesPerIndex; // offset in vertices to offset in bytes
1343
- count = defaultValue(count, indexBuffer.numberOfIndices);
1343
+ if (defined(count)) {
1344
+ count = Math.min(count, indexBuffer.numberOfIndices);
1345
+ } else {
1346
+ count = indexBuffer.numberOfIndices;
1347
+ }
1344
1348
  if (instanceCount === 0) {
1345
1349
  context._gl.drawElements(
1346
1350
  primitiveType,
@@ -1358,7 +1362,11 @@ function continueDraw(context, drawCommand, shaderProgram, uniformMap) {
1358
1362
  );
1359
1363
  }
1360
1364
  } else {
1361
- count = defaultValue(count, va.numberOfVertices);
1365
+ if (defined(count)) {
1366
+ count = Math.min(count, va.numberOfVertices);
1367
+ } else {
1368
+ count = va.numberOfVertices;
1369
+ }
1362
1370
  if (instanceCount === 0) {
1363
1371
  context._gl.drawArrays(primitiveType, offset, count);
1364
1372
  } else {
@@ -56,6 +56,9 @@ function demodernizeShader(input, isFragmentShader) {
56
56
  // Replace gl_FragDepth with gl_FragDepthEXT.
57
57
  output = output.replaceAll(/gl_FragDepth/g, `gl_FragDepthEXT`);
58
58
  }
59
+
60
+ // Enable the OES_standard_derivatives extension
61
+ output = `#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n${output}`;
59
62
  } else {
60
63
  // Replace the in with attribute.
61
64
  output = output.replaceAll(/(in)\s+(vec\d|mat\d|float)/g, `attribute $2`);