@cesium/engine 2.4.1 → 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 (88) hide show
  1. package/Build/Workers/cesiumWorkerBootstrapper.js +1 -1
  2. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +0 -22
  3. package/Build/Workers/package.js +1 -1
  4. package/Build/Workers/transferTypedArrayTest.js +1 -1
  5. package/Source/Core/ArcGISTiledElevationTerrainProvider.js +0 -75
  6. package/Source/Core/CesiumTerrainProvider.js +0 -75
  7. package/Source/Core/CustomHeightmapTerrainProvider.js +0 -38
  8. package/Source/Core/EllipsoidTerrainProvider.js +0 -37
  9. package/Source/Core/GoogleEarthEnterpriseMetadata.js +0 -53
  10. package/Source/Core/GoogleEarthEnterpriseTerrainProvider.js +1 -101
  11. package/Source/Core/GoogleMaps.js +1 -1
  12. package/Source/Core/Ion.js +1 -2
  13. package/Source/Core/TerrainProvider.js +0 -22
  14. package/Source/Core/VRTheWorldTerrainProvider.js +0 -59
  15. package/Source/Core/sampleTerrain.js +0 -7
  16. package/Source/Core/sampleTerrainMostDetailed.js +0 -7
  17. package/Source/DataSources/Cesium3DTilesetVisualizer.js +6 -5
  18. package/Source/DataSources/KmlTour.js +1 -12
  19. package/Source/DataSources/ModelVisualizer.js +0 -12
  20. package/Source/Renderer/Context.js +10 -2
  21. package/Source/Scene/ArcGisMapServerImageryProvider.js +7 -335
  22. package/Source/Scene/ArcGisMapService.js +1 -1
  23. package/Source/Scene/Billboard.js +7 -0
  24. package/Source/Scene/BingMapsImageryProvider.js +0 -326
  25. package/Source/Scene/Camera.js +1 -1
  26. package/Source/Scene/Cesium3DTile.js +4 -5
  27. package/Source/Scene/Cesium3DTileContent.js +0 -16
  28. package/Source/Scene/Cesium3DTilesVoxelProvider.js +0 -123
  29. package/Source/Scene/Cesium3DTileset.js +183 -184
  30. package/Source/Scene/Cesium3DTilesetBaseTraversal.js +1 -1
  31. package/Source/Scene/Cesium3DTilesetCache.js +1 -3
  32. package/Source/Scene/Cesium3DTilesetSkipTraversal.js +5 -2
  33. package/Source/Scene/Cesium3DTilesetTraversal.js +2 -2
  34. package/Source/Scene/ClassificationPrimitive.js +5 -43
  35. package/Source/Scene/Composite3DTileContent.js +0 -27
  36. package/Source/Scene/CreditDisplay.js +0 -54
  37. package/Source/Scene/DerivedCommand.js +15 -10
  38. package/Source/Scene/Empty3DTileContent.js +0 -21
  39. package/Source/Scene/Geometry3DTileContent.js +0 -29
  40. package/Source/Scene/Globe.js +1 -9
  41. package/Source/Scene/GlobeSurfaceTile.js +13 -8
  42. package/Source/Scene/GlobeSurfaceTileProvider.js +8 -60
  43. package/Source/Scene/GltfPipeline/removeUnusedElements.js +27 -0
  44. package/Source/Scene/GltfPipeline/updateVersion.js +21 -4
  45. package/Source/Scene/GoogleEarthEnterpriseImageryProvider.js +1 -339
  46. package/Source/Scene/GoogleEarthEnterpriseMapsProvider.js +0 -326
  47. package/Source/Scene/GridImageryProvider.js +0 -274
  48. package/Source/Scene/GroundPolylinePrimitive.js +5 -38
  49. package/Source/Scene/GroundPrimitive.js +5 -43
  50. package/Source/Scene/I3SDataProvider.js +4 -99
  51. package/Source/Scene/I3SLayer.js +15 -22
  52. package/Source/Scene/Imagery.js +1 -9
  53. package/Source/Scene/ImageryLayer.js +1 -40
  54. package/Source/Scene/ImageryProvider.js +0 -138
  55. package/Source/Scene/Implicit3DTileContent.js +0 -23
  56. package/Source/Scene/IonImageryProvider.js +1 -369
  57. package/Source/Scene/MapboxImageryProvider.js +0 -276
  58. package/Source/Scene/MapboxStyleImageryProvider.js +0 -274
  59. package/Source/Scene/Model/Model.js +6 -249
  60. package/Source/Scene/Model/Model3DTileContent.js +0 -50
  61. package/Source/Scene/Model/ModelAnimationCollection.js +1 -1
  62. package/Source/Scene/Model/PointCloudStylingPipelineStage.js +1 -1
  63. package/Source/Scene/Multiple3DTileContent.js +0 -27
  64. package/Source/Scene/Primitive.js +10 -38
  65. package/Source/Scene/QuadtreePrimitive.js +3 -5
  66. package/Source/Scene/QuadtreeTileProvider.js +0 -10
  67. package/Source/Scene/Scene.js +3 -3
  68. package/Source/Scene/ScreenSpaceCameraController.js +5 -5
  69. package/Source/Scene/SingleTileImageryProvider.js +6 -302
  70. package/Source/Scene/TileCoordinatesImageryProvider.js +0 -273
  71. package/Source/Scene/TileMapServiceImageryProvider.js +3 -48
  72. package/Source/Scene/Tileset3DTileContent.js +0 -22
  73. package/Source/Scene/TimeDynamicPointCloud.js +0 -28
  74. package/Source/Scene/UrlTemplateImageryProvider.js +0 -375
  75. package/Source/Scene/Vector3DTileContent.js +0 -29
  76. package/Source/Scene/VoxelPrimitive.js +9 -49
  77. package/Source/Scene/VoxelProvider.js +0 -24
  78. package/Source/Scene/WebMapServiceImageryProvider.js +0 -274
  79. package/Source/Scene/WebMapTileServiceImageryProvider.js +0 -274
  80. package/Source/Scene/computeFlyToLocationForRectangle.js +0 -6
  81. package/Source/Scene/createGooglePhotorealistic3DTileset.js +5 -0
  82. package/Source/Widget/CesiumWidget.js +2 -19
  83. package/index.d.ts +62 -1183
  84. package/index.js +54 -57
  85. package/package.json +2 -2
  86. package/Source/Core/createWorldTerrain.js +0 -61
  87. package/Source/Scene/createOsmBuildings.js +0 -82
  88. package/Source/Scene/createWorldImagery.js +0 -47
@@ -8,7 +8,6 @@ import clone from "../Core/clone.js";
8
8
  import Color from "../Core/Color.js";
9
9
  import defaultValue from "../Core/defaultValue.js";
10
10
  import defined from "../Core/defined.js";
11
- import deprecationWarning from "../Core/deprecationWarning.js";
12
11
  import destroyObject from "../Core/destroyObject.js";
13
12
  import Event from "../Core/Event.js";
14
13
  import JulianDate from "../Core/JulianDate.js";
@@ -422,28 +421,10 @@ function VoxelPrimitive(options) {
422
421
 
423
422
  // If the provider fails to initialize the primitive will fail too.
424
423
  const provider = this._provider;
425
- this._completeLoad = function (primitive, frameState) {};
426
- this._readyPromise = initialize(this, provider);
424
+ initialize(this, provider);
427
425
  }
428
426
 
429
- async function initialize(primitive, provider) {
430
- const promise = new Promise(function (resolve) {
431
- primitive._completeLoad = function (primitive, frameState) {
432
- // Set the primitive as ready after the first frame render since the user might set up events subscribed to
433
- // the post render event, and the primitive may not be ready for those past the first frame.
434
- frameState.afterRender.push(function () {
435
- primitive._ready = true;
436
- resolve(primitive);
437
- return true;
438
- });
439
- };
440
- });
441
-
442
- // This is here for backwards compatibility. It can be removed when readyPromise is removed.
443
- if (defined(provider._readyPromise) && !provider._ready) {
444
- await provider._readyPromise;
445
- }
446
-
427
+ function initialize(primitive, provider) {
447
428
  // Set the bounds
448
429
  const {
449
430
  shape: shapeType,
@@ -466,8 +447,6 @@ async function initialize(primitive, provider) {
466
447
  primitive._shape,
467
448
  provider
468
449
  );
469
-
470
- return promise;
471
450
  }
472
451
 
473
452
  Object.defineProperties(VoxelPrimitive.prototype, {
@@ -484,24 +463,6 @@ Object.defineProperties(VoxelPrimitive.prototype, {
484
463
  },
485
464
  },
486
465
 
487
- /**
488
- * Gets the promise that will be resolved when the primitive is ready for use.
489
- *
490
- * @memberof VoxelPrimitive.prototype
491
- * @type {Promise<VoxelPrimitive>}
492
- * @readonly
493
- * @deprecated
494
- */
495
- readyPromise: {
496
- get: function () {
497
- deprecationWarning(
498
- "VoxelPrimitive.readyPromise",
499
- "VoxelPrimitive.readyPromise was deprecated in CesiumJS 1.104. It will be removed in 1.107. Wait for VoxelPrimitive.ready to return true instead."
500
- );
501
- return this._readyPromise;
502
- },
503
- },
504
-
505
466
  /**
506
467
  * Gets the {@link VoxelProvider} associated with this primitive.
507
468
  *
@@ -988,19 +949,18 @@ VoxelPrimitive.prototype.update = function (frameState) {
988
949
  // Update the custom shader in case it has texture uniforms.
989
950
  this._customShader.update(frameState);
990
951
 
991
- // Exit early if it's not ready yet.
992
- // This is here for backward compatibility. It can be removed when readyPromise is removed.
993
- if ((defined(provider._ready) && !provider._ready) || !defined(this._shape)) {
994
- return;
995
- }
996
-
997
952
  // Initialize from the ready provider. This only happens once.
998
953
  const context = frameState.context;
999
954
  if (!this._ready) {
1000
955
  initFromProvider(this, provider, context);
1001
- this._completeLoad(this, frameState);
956
+ // Set the primitive as ready after the first frame render since the user might set up events subscribed to
957
+ // the post render event, and the primitive may not be ready for those past the first frame.
958
+ frameState.afterRender.push(() => {
959
+ this._ready = true;
960
+ return true;
961
+ });
1002
962
 
1003
- // Don't render until the next frame after the ready promise is resolved
963
+ // Don't render until the next frame after ready is set to true
1004
964
  return;
1005
965
  }
1006
966
 
@@ -18,30 +18,6 @@ function VoxelProvider() {
18
18
  }
19
19
 
20
20
  Object.defineProperties(VoxelProvider.prototype, {
21
- /**
22
- * Gets a value indicating whether or not the provider is ready for use.
23
- *
24
- * @memberof VoxelProvider.prototype
25
- * @type {boolean}
26
- * @readonly
27
- * @deprecated
28
- */
29
- ready: {
30
- get: DeveloperError.throwInstantiationError,
31
- },
32
-
33
- /**
34
- * Gets the promise that will be resolved when the provider is ready for use.
35
- *
36
- * @memberof VoxelProvider.prototype
37
- * @type {Promise<VoxelProvider>}
38
- * @readonly
39
- * @deprecated
40
- */
41
- readyPromise: {
42
- get: DeveloperError.throwInstantiationError,
43
- },
44
-
45
21
  /**
46
22
  * A transform from local space to global space. If undefined, the identity matrix will be used instead.
47
23
  *
@@ -1,6 +1,5 @@
1
1
  import defaultValue from "../Core/defaultValue.js";
2
2
  import defined from "../Core/defined.js";
3
- import deprecationWarning from "../Core/deprecationWarning.js";
4
3
  import DeveloperError from "../Core/DeveloperError.js";
5
4
  import GeographicTilingScheme from "../Core/GeographicTilingScheme.js";
6
5
  import Resource from "../Core/Resource.js";
@@ -266,9 +265,6 @@ function WebMapServiceImageryProvider(options) {
266
265
  ),
267
266
  enablePickFeatures: options.enablePickFeatures,
268
267
  });
269
-
270
- this._ready = true;
271
- this._readyPromise = Promise.resolve(true);
272
268
  }
273
269
 
274
270
  function requestImage(imageryProvider, col, row, level, request, interval) {
@@ -438,40 +434,6 @@ Object.defineProperties(WebMapServiceImageryProvider.prototype, {
438
434
  },
439
435
  },
440
436
 
441
- /**
442
- * Gets a value indicating whether or not the provider is ready for use.
443
- * @memberof WebMapServiceImageryProvider.prototype
444
- * @type {boolean}
445
- * @readonly
446
- * @deprecated
447
- */
448
- ready: {
449
- get: function () {
450
- deprecationWarning(
451
- "WebMapServiceImageryProvider.ready",
452
- "WebMapServiceImageryProvider.ready was deprecated in CesiumJS 1.104. It will be removed in CesiumJS 1.107."
453
- );
454
- return this._tileProvider.ready;
455
- },
456
- },
457
-
458
- /**
459
- * Gets a promise that resolves to true when the provider is ready for use.
460
- * @memberof WebMapServiceImageryProvider.prototype
461
- * @type {Promise<boolean>}
462
- * @readonly
463
- * @deprecated
464
- */
465
- readyPromise: {
466
- get: function () {
467
- deprecationWarning(
468
- "WebMapServiceImageryProvider.readyPromise",
469
- "WebMapServiceImageryProvider.readyPromise was deprecated in CesiumJS 1.104. It will be removed in CesiumJS 1.107."
470
- );
471
- return this._tileProvider.readyPromise;
472
- },
473
- },
474
-
475
437
  /**
476
438
  * Gets the credit to display when this imagery provider is active. Typically this is used to credit
477
439
  * the source of the imagery.
@@ -560,242 +522,6 @@ Object.defineProperties(WebMapServiceImageryProvider.prototype, {
560
522
  return this._getFeatureInfoUrl;
561
523
  },
562
524
  },
563
-
564
- /**
565
- * The default alpha blending value of this provider, with 0.0 representing fully transparent and
566
- * 1.0 representing fully opaque.
567
- * @memberof WebMapServiceImageryProvider.prototype
568
- * @type {Number|undefined}
569
- * @deprecated
570
- */
571
- defaultAlpha: {
572
- get: function () {
573
- deprecationWarning(
574
- "WebMapServiceImageryProvider.defaultAlpha",
575
- "WebMapServiceImageryProvider.defaultAlpha was deprecated in CesiumJS 1.104. It will be removed in CesiumJS 1.107. Use ImageryLayer.alpha instead."
576
- );
577
- return this._defaultAlpha;
578
- },
579
- set: function (value) {
580
- deprecationWarning(
581
- "WebMapServiceImageryProvider.defaultAlpha",
582
- "WebMapServiceImageryProvider.defaultAlpha was deprecated in CesiumJS 1.104. It will be removed in CesiumJS 1.107. Use ImageryLayer.alpha instead."
583
- );
584
- this._defaultAlpha = value;
585
- },
586
- },
587
-
588
- /**
589
- * The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and
590
- * 1.0 representing fully opaque.
591
- * @memberof WebMapServiceImageryProvider.prototype
592
- * @type {Number|undefined}
593
- * @deprecated
594
- */
595
- defaultNightAlpha: {
596
- get: function () {
597
- deprecationWarning(
598
- "WebMapServiceImageryProvider.defaultNightAlpha",
599
- "WebMapServiceImageryProvider.defaultNightAlpha was deprecated in CesiumJS 1.104. It will be removed in CesiumJS 1.107. Use ImageryLayer.nightAlpha instead."
600
- );
601
- return this._defaultNightAlpha;
602
- },
603
- set: function (value) {
604
- deprecationWarning(
605
- "WebMapServiceImageryProvider.defaultNightAlpha",
606
- "WebMapServiceImageryProvider.defaultNightAlpha was deprecated in CesiumJS 1.104. It will be removed in CesiumJS 1.107. Use ImageryLayer.nightAlpha instead."
607
- );
608
- this._defaultNightAlpha = value;
609
- },
610
- },
611
-
612
- /**
613
- * The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and
614
- * 1.0 representing fully opaque.
615
- * @memberof WebMapServiceImageryProvider.prototype
616
- * @type {Number|undefined}
617
- * @deprecated
618
- */
619
- defaultDayAlpha: {
620
- get: function () {
621
- deprecationWarning(
622
- "WebMapServiceImageryProvider.defaultDayAlpha",
623
- "WebMapServiceImageryProvider.defaultDayAlpha was deprecated in CesiumJS 1.104. It will be removed in CesiumJS 1.107. Use ImageryLayer.dayAlpha instead."
624
- );
625
- return this._defaultDayAlpha;
626
- },
627
- set: function (value) {
628
- deprecationWarning(
629
- "WebMapServiceImageryProvider.defaultDayAlpha",
630
- "WebMapServiceImageryProvider.defaultDayAlpha was deprecated in CesiumJS 1.104. It will be removed in CesiumJS 1.107. Use ImageryLayer.dayAlpha instead."
631
- );
632
- this._defaultDayAlpha = value;
633
- },
634
- },
635
-
636
- /**
637
- * The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0
638
- * makes the imagery darker while greater than 1.0 makes it brighter.
639
- * @memberof WebMapServiceImageryProvider.prototype
640
- * @type {Number|undefined}
641
- * @deprecated
642
- */
643
- defaultBrightness: {
644
- get: function () {
645
- deprecationWarning(
646
- "WebMapServiceImageryProvider.defaultBrightness",
647
- "WebMapServiceImageryProvider.defaultBrightness was deprecated in CesiumJS 1.104. It will be removed in CesiumJS 1.107. Use ImageryLayer.brightness instead."
648
- );
649
- return this._defaultBrightness;
650
- },
651
- set: function (value) {
652
- deprecationWarning(
653
- "WebMapServiceImageryProvider.defaultBrightness",
654
- "WebMapServiceImageryProvider.defaultBrightness was deprecated in CesiumJS 1.104. It will be removed in CesiumJS 1.107. Use ImageryLayer.brightness instead."
655
- );
656
- this._defaultBrightness = value;
657
- },
658
- },
659
-
660
- /**
661
- * The default contrast of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces
662
- * the contrast while greater than 1.0 increases it.
663
- * @memberof WebMapServiceImageryProvider.prototype
664
- * @type {Number|undefined}
665
- * @deprecated
666
- */
667
- defaultContrast: {
668
- get: function () {
669
- deprecationWarning(
670
- "WebMapServiceImageryProvider.defaultContrast",
671
- "WebMapServiceImageryProvider.defaultContrast was deprecated in CesiumJS 1.104. It will be removed in CesiumJS 1.107. Use ImageryLayer.contrast instead."
672
- );
673
- return this._defaultContrast;
674
- },
675
- set: function (value) {
676
- deprecationWarning(
677
- "WebMapServiceImageryProvider.defaultContrast",
678
- "WebMapServiceImageryProvider.defaultContrast was deprecated in CesiumJS 1.104. It will be removed in CesiumJS 1.107. Use ImageryLayer.contrast instead."
679
- );
680
- this._defaultContrast = value;
681
- },
682
- },
683
-
684
- /**
685
- * The default hue of this provider in radians. 0.0 uses the unmodified imagery color.
686
- * @memberof WebMapServiceImageryProvider.prototype
687
- * @type {Number|undefined}
688
- * @deprecated
689
- */
690
- defaultHue: {
691
- get: function () {
692
- deprecationWarning(
693
- "WebMapServiceImageryProvider.defaultHue",
694
- "WebMapServiceImageryProvider.defaultHue was deprecated in CesiumJS 1.104. It will be removed in CesiumJS 1.107. Use ImageryLayer.hue instead."
695
- );
696
- return this._defaultHue;
697
- },
698
- set: function (value) {
699
- deprecationWarning(
700
- "WebMapServiceImageryProvider.defaultHue",
701
- "WebMapServiceImageryProvider.defaultHue was deprecated in CesiumJS 1.104. It will be removed in CesiumJS 1.107. Use ImageryLayer.hue instead."
702
- );
703
- this._defaultHue = value;
704
- },
705
- },
706
-
707
- /**
708
- * The default saturation of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the
709
- * saturation while greater than 1.0 increases it.
710
- * @memberof WebMapServiceImageryProvider.prototype
711
- * @type {Number|undefined}
712
- * @deprecated
713
- */
714
- defaultSaturation: {
715
- get: function () {
716
- deprecationWarning(
717
- "WebMapServiceImageryProvider.defaultSaturation",
718
- "WebMapServiceImageryProvider.defaultSaturation was deprecated in CesiumJS 1.104. It will be removed in CesiumJS 1.107. Use ImageryLayer.saturation instead."
719
- );
720
- return this._defaultSaturation;
721
- },
722
- set: function (value) {
723
- deprecationWarning(
724
- "WebMapServiceImageryProvider.defaultSaturation",
725
- "WebMapServiceImageryProvider.defaultSaturation was deprecated in CesiumJS 1.104. It will be removed in CesiumJS 1.107. Use ImageryLayer.saturation instead."
726
- );
727
- this._defaultSaturation = value;
728
- },
729
- },
730
-
731
- /**
732
- * The default gamma correction to apply to this provider. 1.0 uses the unmodified imagery color.
733
- * @memberof WebMapServiceImageryProvider.prototype
734
- * @type {Number|undefined}
735
- * @deprecated
736
- */
737
- defaultGamma: {
738
- get: function () {
739
- deprecationWarning(
740
- "WebMapServiceImageryProvider.defaultGamma",
741
- "WebMapServiceImageryProvider.defaultGamma was deprecated in CesiumJS 1.104. It will be removed in CesiumJS 1.107. Use ImageryLayer.gamma instead."
742
- );
743
- return this._defaultGamma;
744
- },
745
- set: function (value) {
746
- deprecationWarning(
747
- "WebMapServiceImageryProvider.defaultGamma",
748
- "WebMapServiceImageryProvider.defaultGamma was deprecated in CesiumJS 1.104. It will be removed in CesiumJS 1.107. Use ImageryLayer.gamma instead."
749
- );
750
- this._defaultGamma = value;
751
- },
752
- },
753
-
754
- /**
755
- * The default texture minification filter to apply to this provider.
756
- * @memberof WebMapServiceImageryProvider.prototype
757
- * @type {TextureMinificationFilter}
758
- * @deprecated
759
- */
760
- defaultMinificationFilter: {
761
- get: function () {
762
- deprecationWarning(
763
- "WebMapServiceImageryProvider.defaultMinificationFilter",
764
- "WebMapServiceImageryProvider.defaultMinificationFilter was deprecated in CesiumJS 1.104. It will be removed in CesiumJS 1.107. Use ImageryLayer.minificationFilter instead."
765
- );
766
- return this._defaultMinificationFilter;
767
- },
768
- set: function (value) {
769
- deprecationWarning(
770
- "WebMapServiceImageryProvider.defaultMinificationFilter",
771
- "WebMapServiceImageryProvider.defaultMinificationFilter was deprecated in CesiumJS 1.104. It will be removed in CesiumJS 1.107. Use ImageryLayer.minificationFilter instead."
772
- );
773
- this._defaultMinificationFilter = value;
774
- },
775
- },
776
-
777
- /**
778
- * The default texture magnification filter to apply to this provider.
779
- * @memberof WebMapServiceImageryProvider.prototype
780
- * @type {TextureMagnificationFilter}
781
- * @deprecated
782
- */
783
- defaultMagnificationFilter: {
784
- get: function () {
785
- deprecationWarning(
786
- "WebMapServiceImageryProvider.defaultMagnificationFilter",
787
- "WebMapServiceImageryProvider.defaultMagnificationFilter was deprecated in CesiumJS 1.104. It will be removed in CesiumJS 1.107. Use ImageryLayer.magnificationFilter instead."
788
- );
789
- return this._defaultMagnificationFilter;
790
- },
791
- set: function (value) {
792
- deprecationWarning(
793
- "WebMapServiceImageryProvider.defaultMagnificationFilter",
794
- "WebMapServiceImageryProvider.defaultMagnificationFilter was deprecated in CesiumJS 1.104. It will be removed in CesiumJS 1.107. Use ImageryLayer.magnificationFilter instead."
795
- );
796
- this._defaultMagnificationFilter = value;
797
- },
798
- },
799
525
  });
800
526
 
801
527
  /**