@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.
- package/Build/Workers/{Color-e5bfda3f.js → Color-8e135f71.js} +4 -4
- package/Build/Workers/cesiumWorkerBootstrapper.js +1 -1
- package/Build/Workers/createPolylineGeometry.js +1 -1
- package/Build/Workers/createSimplePolylineGeometry.js +1 -1
- package/Build/Workers/createVectorTileGeometries.js +1 -1
- package/Build/Workers/createVectorTilePolygons.js +1 -1
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +0 -22
- package/Build/Workers/package.js +1 -1
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Source/Core/ArcGISTiledElevationTerrainProvider.js +0 -75
- package/Source/Core/CesiumTerrainProvider.js +25 -75
- package/Source/Core/Color.js +4 -4
- package/Source/Core/CustomHeightmapTerrainProvider.js +0 -38
- package/Source/Core/EllipsoidTerrainProvider.js +0 -37
- package/Source/Core/GoogleEarthEnterpriseMetadata.js +0 -53
- package/Source/Core/GoogleEarthEnterpriseTerrainProvider.js +1 -101
- package/Source/Core/GoogleMaps.js +1 -1
- package/Source/Core/Ion.js +1 -1
- package/Source/Core/TerrainProvider.js +0 -22
- package/Source/Core/VRTheWorldTerrainProvider.js +0 -59
- package/Source/Core/sampleTerrain.js +0 -3
- package/Source/Core/sampleTerrainMostDetailed.js +0 -3
- package/Source/DataSources/Cesium3DTilesetVisualizer.js +6 -5
- package/Source/DataSources/DataSourceDisplay.js +3 -2
- package/Source/DataSources/Entity.js +2 -3
- package/Source/DataSources/KmlTour.js +1 -12
- package/Source/DataSources/ModelVisualizer.js +0 -7
- package/Source/Renderer/Context.js +10 -2
- package/Source/Renderer/demodernizeShader.js +3 -0
- package/Source/Scene/ArcGisMapServerImageryProvider.js +7 -335
- package/Source/Scene/ArcGisMapService.js +1 -1
- package/Source/Scene/Billboard.js +7 -7
- package/Source/Scene/BingMapsImageryProvider.js +0 -326
- package/Source/Scene/Camera.js +1 -1
- package/Source/Scene/Cesium3DTile.js +4 -5
- package/Source/Scene/Cesium3DTileBatchTable.js +0 -3
- package/Source/Scene/Cesium3DTileContent.js +0 -16
- package/Source/Scene/Cesium3DTilesVoxelProvider.js +0 -123
- package/Source/Scene/Cesium3DTileset.js +183 -184
- package/Source/Scene/Cesium3DTilesetBaseTraversal.js +1 -1
- package/Source/Scene/Cesium3DTilesetCache.js +1 -3
- package/Source/Scene/Cesium3DTilesetSkipTraversal.js +5 -2
- package/Source/Scene/Cesium3DTilesetTraversal.js +2 -2
- package/Source/Scene/ClassificationPrimitive.js +5 -43
- package/Source/Scene/Composite3DTileContent.js +0 -27
- package/Source/Scene/CreditDisplay.js +0 -54
- package/Source/Scene/DerivedCommand.js +15 -10
- package/Source/Scene/Empty3DTileContent.js +0 -21
- package/Source/Scene/Geometry3DTileContent.js +0 -29
- package/Source/Scene/Globe.js +0 -4
- package/Source/Scene/GlobeSurfaceTile.js +13 -2
- package/Source/Scene/GlobeSurfaceTileProvider.js +10 -37
- package/Source/Scene/GltfPipeline/removeUnusedElements.js +27 -0
- package/Source/Scene/GltfPipeline/updateVersion.js +21 -4
- package/Source/Scene/GoogleEarthEnterpriseImageryProvider.js +1 -339
- package/Source/Scene/GoogleEarthEnterpriseMapsProvider.js +0 -326
- package/Source/Scene/GridImageryProvider.js +0 -274
- package/Source/Scene/GroundPolylinePrimitive.js +5 -38
- package/Source/Scene/GroundPrimitive.js +5 -43
- package/Source/Scene/I3SDataProvider.js +4 -99
- package/Source/Scene/I3SLayer.js +15 -22
- package/Source/Scene/Imagery.js +1 -6
- package/Source/Scene/ImageryLayer.js +1 -30
- package/Source/Scene/ImageryProvider.js +0 -138
- package/Source/Scene/Implicit3DTileContent.js +0 -23
- package/Source/Scene/IonImageryProvider.js +1 -369
- package/Source/Scene/MapboxImageryProvider.js +0 -276
- package/Source/Scene/MapboxStyleImageryProvider.js +0 -274
- package/Source/Scene/Model/CustomShader.js +1 -1
- package/Source/Scene/Model/Model.js +6 -249
- package/Source/Scene/Model/Model3DTileContent.js +0 -50
- package/Source/Scene/Model/ModelAnimationCollection.js +1 -1
- package/Source/Scene/Model/PointCloudStylingPipelineStage.js +1 -1
- package/Source/Scene/Multiple3DTileContent.js +0 -27
- package/Source/Scene/Primitive.js +10 -38
- package/Source/Scene/QuadtreePrimitive.js +3 -5
- package/Source/Scene/QuadtreeTileProvider.js +0 -10
- package/Source/Scene/Scene.js +3 -3
- package/Source/Scene/ScreenSpaceCameraController.js +7 -6
- package/Source/Scene/SingleTileImageryProvider.js +6 -302
- package/Source/Scene/TileCoordinatesImageryProvider.js +0 -273
- package/Source/Scene/TileMapServiceImageryProvider.js +3 -48
- package/Source/Scene/Tileset3DTileContent.js +0 -22
- package/Source/Scene/TimeDynamicPointCloud.js +0 -28
- package/Source/Scene/UrlTemplateImageryProvider.js +0 -375
- package/Source/Scene/Vector3DTileContent.js +0 -29
- package/Source/Scene/VoxelPrimitive.js +9 -49
- package/Source/Scene/VoxelProvider.js +0 -24
- package/Source/Scene/WebMapServiceImageryProvider.js +0 -274
- package/Source/Scene/WebMapTileServiceImageryProvider.js +0 -274
- package/Source/Scene/computeFlyToLocationForRectangle.js +0 -2
- package/Source/Scene/createGooglePhotorealistic3DTileset.js +5 -0
- package/Source/Shaders/BillboardCollectionFS.glsl +0 -4
- package/Source/Shaders/BillboardCollectionFS.js +1 -5
- package/Source/Shaders/Builtin/Functions/writeLogDepth.glsl +0 -3
- package/Source/Shaders/Builtin/Functions/writeLogDepth.js +0 -3
- package/Source/Shaders/Materials/ElevationContourMaterial.glsl +0 -4
- package/Source/Shaders/Materials/ElevationContourMaterial.js +1 -5
- package/Source/Shaders/Materials/GridMaterial.glsl +0 -4
- package/Source/Shaders/Materials/GridMaterial.js +1 -5
- package/Source/Shaders/Materials/PolylineArrowMaterial.glsl +0 -4
- package/Source/Shaders/Materials/PolylineArrowMaterial.js +1 -5
- package/Source/Shaders/Model/ModelFS.glsl +0 -6
- package/Source/Shaders/Model/ModelFS.js +1 -7
- package/Source/Widget/CesiumWidget.js +2 -19
- package/index.d.ts +69 -1190
- package/index.js +95 -98
- package/package.json +3 -3
- package/Source/Core/createWorldTerrain.js +0 -60
- package/Source/Scene/createOsmBuildings.js +0 -81
- package/Source/Scene/createWorldImagery.js +0 -47
|
@@ -6,8 +6,6 @@ import combine from "../Core/combine.js";
|
|
|
6
6
|
import Credit from "../Core/Credit.js";
|
|
7
7
|
import defaultValue from "../Core/defaultValue.js";
|
|
8
8
|
import defined from "../Core/defined.js";
|
|
9
|
-
import deprecationWarning from "../Core/deprecationWarning.js";
|
|
10
|
-
import DeveloperError from "../Core/DeveloperError.js";
|
|
11
9
|
import Event from "../Core/Event.js";
|
|
12
10
|
import GeographicProjection from "../Core/GeographicProjection.js";
|
|
13
11
|
import CesiumMath from "../Core/Math.js";
|
|
@@ -55,7 +53,6 @@ const pickFeaturesTags = combine(tags, {
|
|
|
55
53
|
*
|
|
56
54
|
* Initialization options for the UrlTemplateImageryProvider constructor
|
|
57
55
|
*
|
|
58
|
-
* @property {Promise<object>|object} [options] Object with the following properties:
|
|
59
56
|
* @property {Resource|string} url The URL template to use to request tiles. It has the following keywords:
|
|
60
57
|
* <ul>
|
|
61
58
|
* <li><code>{z}</code>: The level of the tile in the tiling scheme. Level zero is the root of the quadtree pyramid.</li>
|
|
@@ -194,11 +191,6 @@ function UrlTemplateImageryProvider(options) {
|
|
|
194
191
|
|
|
195
192
|
this._errorEvent = new Event();
|
|
196
193
|
|
|
197
|
-
if (defined(options.then)) {
|
|
198
|
-
this._reinitialize(options);
|
|
199
|
-
return;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
194
|
//>>includeStart('debug', pragmas.debug);
|
|
203
195
|
Check.defined("options.url", options.url);
|
|
204
196
|
//>>includeEnd('debug');
|
|
@@ -254,9 +246,6 @@ function UrlTemplateImageryProvider(options) {
|
|
|
254
246
|
this._tags = allTags;
|
|
255
247
|
this._pickFeaturesTags = allPickFeaturesTags;
|
|
256
248
|
|
|
257
|
-
this._readyPromise = Promise.resolve(true);
|
|
258
|
-
this._ready = true;
|
|
259
|
-
|
|
260
249
|
this._defaultAlpha = undefined;
|
|
261
250
|
this._defaultNightAlpha = undefined;
|
|
262
251
|
this._defaultDayAlpha = undefined;
|
|
@@ -482,40 +471,6 @@ Object.defineProperties(UrlTemplateImageryProvider.prototype, {
|
|
|
482
471
|
},
|
|
483
472
|
},
|
|
484
473
|
|
|
485
|
-
/**
|
|
486
|
-
* Gets a value indicating whether or not the provider is ready for use.
|
|
487
|
-
* @memberof UrlTemplateImageryProvider.prototype
|
|
488
|
-
* @type {boolean}
|
|
489
|
-
* @readonly
|
|
490
|
-
* @deprecated
|
|
491
|
-
*/
|
|
492
|
-
ready: {
|
|
493
|
-
get: function () {
|
|
494
|
-
deprecationWarning(
|
|
495
|
-
"UrlTemplateImageryProvider.ready",
|
|
496
|
-
"UrlTemplateImageryProvider.ready was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107."
|
|
497
|
-
);
|
|
498
|
-
return this._ready && defined(this._resource);
|
|
499
|
-
},
|
|
500
|
-
},
|
|
501
|
-
|
|
502
|
-
/**
|
|
503
|
-
* Gets a promise that resolves to true when the provider is ready for use.
|
|
504
|
-
* @memberof UrlTemplateImageryProvider.prototype
|
|
505
|
-
* @type {Promise<boolean>}
|
|
506
|
-
* @readonly
|
|
507
|
-
* @deprecated
|
|
508
|
-
*/
|
|
509
|
-
readyPromise: {
|
|
510
|
-
get: function () {
|
|
511
|
-
deprecationWarning(
|
|
512
|
-
"UrlTemplateImageryProvider.readyPromise",
|
|
513
|
-
"UrlTemplateImageryProvider.readyPromise was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107."
|
|
514
|
-
);
|
|
515
|
-
return this._readyPromise;
|
|
516
|
-
},
|
|
517
|
-
},
|
|
518
|
-
|
|
519
474
|
/**
|
|
520
475
|
* Gets the credit to display when this imagery provider is active. Typically this is used to credit
|
|
521
476
|
* the source of the imagery.
|
|
@@ -546,338 +501,8 @@ Object.defineProperties(UrlTemplateImageryProvider.prototype, {
|
|
|
546
501
|
return this._hasAlphaChannel;
|
|
547
502
|
},
|
|
548
503
|
},
|
|
549
|
-
|
|
550
|
-
/**
|
|
551
|
-
* The default alpha blending value of this provider, with 0.0 representing fully transparent and
|
|
552
|
-
* 1.0 representing fully opaque.
|
|
553
|
-
* @memberof UrlTemplateImageryProvider.prototype
|
|
554
|
-
* @type {Number|undefined}
|
|
555
|
-
* @deprecated
|
|
556
|
-
*/
|
|
557
|
-
defaultAlpha: {
|
|
558
|
-
get: function () {
|
|
559
|
-
deprecationWarning(
|
|
560
|
-
"UrlTemplateImageryProvider.defaultAlpha",
|
|
561
|
-
"UrlTemplateImageryProvider.defaultAlpha was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.alpha instead."
|
|
562
|
-
);
|
|
563
|
-
return this._defaultAlpha;
|
|
564
|
-
},
|
|
565
|
-
set: function (value) {
|
|
566
|
-
deprecationWarning(
|
|
567
|
-
"UrlTemplateImageryProvider.defaultAlpha",
|
|
568
|
-
"UrlTemplateImageryProvider.defaultAlpha was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.alpha instead."
|
|
569
|
-
);
|
|
570
|
-
this._defaultAlpha = value;
|
|
571
|
-
},
|
|
572
|
-
},
|
|
573
|
-
|
|
574
|
-
/**
|
|
575
|
-
* The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and
|
|
576
|
-
* 1.0 representing fully opaque.
|
|
577
|
-
* @memberof UrlTemplateImageryProvider.prototype
|
|
578
|
-
* @type {Number|undefined}
|
|
579
|
-
* @deprecated
|
|
580
|
-
*/
|
|
581
|
-
defaultNightAlpha: {
|
|
582
|
-
get: function () {
|
|
583
|
-
deprecationWarning(
|
|
584
|
-
"UrlTemplateImageryProvider.defaultNightAlpha",
|
|
585
|
-
"UrlTemplateImageryProvider.defaultNightAlpha was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.nightAlpha instead."
|
|
586
|
-
);
|
|
587
|
-
return this._defaultNightAlpha;
|
|
588
|
-
},
|
|
589
|
-
set: function (value) {
|
|
590
|
-
deprecationWarning(
|
|
591
|
-
"UrlTemplateImageryProvider.defaultNightAlpha",
|
|
592
|
-
"UrlTemplateImageryProvider.defaultNightAlpha was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.nightAlpha instead."
|
|
593
|
-
);
|
|
594
|
-
this._defaultNightAlpha = value;
|
|
595
|
-
},
|
|
596
|
-
},
|
|
597
|
-
|
|
598
|
-
/**
|
|
599
|
-
* The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and
|
|
600
|
-
* 1.0 representing fully opaque.
|
|
601
|
-
* @memberof UrlTemplateImageryProvider.prototype
|
|
602
|
-
* @type {Number|undefined}
|
|
603
|
-
* @deprecated
|
|
604
|
-
*/
|
|
605
|
-
defaultDayAlpha: {
|
|
606
|
-
get: function () {
|
|
607
|
-
deprecationWarning(
|
|
608
|
-
"UrlTemplateImageryProvider.defaultDayAlpha",
|
|
609
|
-
"UrlTemplateImageryProvider.defaultDayAlpha was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.dayAlpha instead."
|
|
610
|
-
);
|
|
611
|
-
return this._defaultDayAlpha;
|
|
612
|
-
},
|
|
613
|
-
set: function (value) {
|
|
614
|
-
deprecationWarning(
|
|
615
|
-
"UrlTemplateImageryProvider.defaultDayAlpha",
|
|
616
|
-
"UrlTemplateImageryProvider.defaultDayAlpha was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.dayAlpha instead."
|
|
617
|
-
);
|
|
618
|
-
this._defaultDayAlpha = value;
|
|
619
|
-
},
|
|
620
|
-
},
|
|
621
|
-
|
|
622
|
-
/**
|
|
623
|
-
* The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0
|
|
624
|
-
* makes the imagery darker while greater than 1.0 makes it brighter.
|
|
625
|
-
* @memberof UrlTemplateImageryProvider.prototype
|
|
626
|
-
* @type {Number|undefined}
|
|
627
|
-
* @deprecated
|
|
628
|
-
*/
|
|
629
|
-
defaultBrightness: {
|
|
630
|
-
get: function () {
|
|
631
|
-
deprecationWarning(
|
|
632
|
-
"UrlTemplateImageryProvider.defaultBrightness",
|
|
633
|
-
"UrlTemplateImageryProvider.defaultBrightness was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.brightness instead."
|
|
634
|
-
);
|
|
635
|
-
return this._defaultBrightness;
|
|
636
|
-
},
|
|
637
|
-
set: function (value) {
|
|
638
|
-
deprecationWarning(
|
|
639
|
-
"UrlTemplateImageryProvider.defaultBrightness",
|
|
640
|
-
"UrlTemplateImageryProvider.defaultBrightness was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.brightness instead."
|
|
641
|
-
);
|
|
642
|
-
this._defaultBrightness = value;
|
|
643
|
-
},
|
|
644
|
-
},
|
|
645
|
-
|
|
646
|
-
/**
|
|
647
|
-
* The default contrast of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces
|
|
648
|
-
* the contrast while greater than 1.0 increases it.
|
|
649
|
-
* @memberof UrlTemplateImageryProvider.prototype
|
|
650
|
-
* @type {Number|undefined}
|
|
651
|
-
* @deprecated
|
|
652
|
-
*/
|
|
653
|
-
defaultContrast: {
|
|
654
|
-
get: function () {
|
|
655
|
-
deprecationWarning(
|
|
656
|
-
"UrlTemplateImageryProvider.defaultContrast",
|
|
657
|
-
"UrlTemplateImageryProvider.defaultContrast was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.contrast instead."
|
|
658
|
-
);
|
|
659
|
-
return this._defaultContrast;
|
|
660
|
-
},
|
|
661
|
-
set: function (value) {
|
|
662
|
-
deprecationWarning(
|
|
663
|
-
"UrlTemplateImageryProvider.defaultContrast",
|
|
664
|
-
"UrlTemplateImageryProvider.defaultContrast was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.contrast instead."
|
|
665
|
-
);
|
|
666
|
-
this._defaultContrast = value;
|
|
667
|
-
},
|
|
668
|
-
},
|
|
669
|
-
|
|
670
|
-
/**
|
|
671
|
-
* The default hue of this provider in radians. 0.0 uses the unmodified imagery color.
|
|
672
|
-
* @memberof UrlTemplateImageryProvider.prototype
|
|
673
|
-
* @type {Number|undefined}
|
|
674
|
-
* @deprecated
|
|
675
|
-
*/
|
|
676
|
-
defaultHue: {
|
|
677
|
-
get: function () {
|
|
678
|
-
deprecationWarning(
|
|
679
|
-
"UrlTemplateImageryProvider.defaultHue",
|
|
680
|
-
"UrlTemplateImageryProvider.defaultHue was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.hue instead."
|
|
681
|
-
);
|
|
682
|
-
return this._defaultHue;
|
|
683
|
-
},
|
|
684
|
-
set: function (value) {
|
|
685
|
-
deprecationWarning(
|
|
686
|
-
"UrlTemplateImageryProvider.defaultHue",
|
|
687
|
-
"UrlTemplateImageryProvider.defaultHue was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.hue instead."
|
|
688
|
-
);
|
|
689
|
-
this._defaultHue = value;
|
|
690
|
-
},
|
|
691
|
-
},
|
|
692
|
-
|
|
693
|
-
/**
|
|
694
|
-
* The default saturation of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the
|
|
695
|
-
* saturation while greater than 1.0 increases it.
|
|
696
|
-
* @memberof UrlTemplateImageryProvider.prototype
|
|
697
|
-
* @type {Number|undefined}
|
|
698
|
-
* @deprecated
|
|
699
|
-
*/
|
|
700
|
-
defaultSaturation: {
|
|
701
|
-
get: function () {
|
|
702
|
-
deprecationWarning(
|
|
703
|
-
"UrlTemplateImageryProvider.defaultSaturation",
|
|
704
|
-
"UrlTemplateImageryProvider.defaultSaturation was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.saturation instead."
|
|
705
|
-
);
|
|
706
|
-
return this._defaultSaturation;
|
|
707
|
-
},
|
|
708
|
-
set: function (value) {
|
|
709
|
-
deprecationWarning(
|
|
710
|
-
"UrlTemplateImageryProvider.defaultSaturation",
|
|
711
|
-
"UrlTemplateImageryProvider.defaultSaturation was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.saturation instead."
|
|
712
|
-
);
|
|
713
|
-
this._defaultSaturation = value;
|
|
714
|
-
},
|
|
715
|
-
},
|
|
716
|
-
|
|
717
|
-
/**
|
|
718
|
-
* The default gamma correction to apply to this provider. 1.0 uses the unmodified imagery color.
|
|
719
|
-
* @memberof UrlTemplateImageryProvider.prototype
|
|
720
|
-
* @type {Number|undefined}
|
|
721
|
-
* @deprecated
|
|
722
|
-
*/
|
|
723
|
-
defaultGamma: {
|
|
724
|
-
get: function () {
|
|
725
|
-
deprecationWarning(
|
|
726
|
-
"UrlTemplateImageryProvider.defaultGamma",
|
|
727
|
-
"UrlTemplateImageryProvider.defaultGamma was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.gamma instead."
|
|
728
|
-
);
|
|
729
|
-
return this._defaultGamma;
|
|
730
|
-
},
|
|
731
|
-
set: function (value) {
|
|
732
|
-
deprecationWarning(
|
|
733
|
-
"UrlTemplateImageryProvider.defaultGamma",
|
|
734
|
-
"UrlTemplateImageryProvider.defaultGamma was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.gamma instead."
|
|
735
|
-
);
|
|
736
|
-
this._defaultGamma = value;
|
|
737
|
-
},
|
|
738
|
-
},
|
|
739
|
-
|
|
740
|
-
/**
|
|
741
|
-
* The default texture minification filter to apply to this provider.
|
|
742
|
-
* @memberof UrlTemplateImageryProvider.prototype
|
|
743
|
-
* @type {TextureMinificationFilter}
|
|
744
|
-
* @deprecated
|
|
745
|
-
*/
|
|
746
|
-
defaultMinificationFilter: {
|
|
747
|
-
get: function () {
|
|
748
|
-
deprecationWarning(
|
|
749
|
-
"UrlTemplateImageryProvider.defaultMinificationFilter",
|
|
750
|
-
"UrlTemplateImageryProvider.defaultMinificationFilter was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.minificationFilter instead."
|
|
751
|
-
);
|
|
752
|
-
return this._defaultMinificationFilter;
|
|
753
|
-
},
|
|
754
|
-
set: function (value) {
|
|
755
|
-
deprecationWarning(
|
|
756
|
-
"UrlTemplateImageryProvider.defaultMinificationFilter",
|
|
757
|
-
"UrlTemplateImageryProvider.defaultMinificationFilter was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.minificationFilter instead."
|
|
758
|
-
);
|
|
759
|
-
this._defaultMinificationFilter = value;
|
|
760
|
-
},
|
|
761
|
-
},
|
|
762
|
-
|
|
763
|
-
/**
|
|
764
|
-
* The default texture magnification filter to apply to this provider.
|
|
765
|
-
* @memberof UrlTemplateImageryProvider.prototype
|
|
766
|
-
* @type {TextureMagnificationFilter}
|
|
767
|
-
* @deprecated
|
|
768
|
-
*/
|
|
769
|
-
defaultMagnificationFilter: {
|
|
770
|
-
get: function () {
|
|
771
|
-
deprecationWarning(
|
|
772
|
-
"UrlTemplateImageryProvider.defaultMagnificationFilter",
|
|
773
|
-
"UrlTemplateImageryProvider.defaultMagnificationFilter was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.magnificationFilter instead."
|
|
774
|
-
);
|
|
775
|
-
return this._defaultMagnificationFilter;
|
|
776
|
-
},
|
|
777
|
-
set: function (value) {
|
|
778
|
-
deprecationWarning(
|
|
779
|
-
"UrlTemplateImageryProvider.defaultMagnificationFilter",
|
|
780
|
-
"UrlTemplateImageryProvider.defaultMagnificationFilter was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.magnificationFilter instead."
|
|
781
|
-
);
|
|
782
|
-
this._defaultMagnificationFilter = value;
|
|
783
|
-
},
|
|
784
|
-
},
|
|
785
504
|
});
|
|
786
505
|
|
|
787
|
-
/**
|
|
788
|
-
* Reinitializes this instance. Reinitializing an instance already in use is supported, but it is not
|
|
789
|
-
* recommended because existing tiles provided by the imagery provider will not be updated.
|
|
790
|
-
* @deprecated
|
|
791
|
-
*
|
|
792
|
-
* @param {Promise<object>|object} options Any of the options that may be passed to the {@link UrlTemplateImageryProvider} constructor.
|
|
793
|
-
*/
|
|
794
|
-
UrlTemplateImageryProvider.prototype.reinitialize = function (options) {
|
|
795
|
-
deprecationWarning(
|
|
796
|
-
"UrlTemplateImageryProvider.reinitialize",
|
|
797
|
-
"UrlTemplateImageryProvider.reinitialize was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107."
|
|
798
|
-
);
|
|
799
|
-
|
|
800
|
-
return this._reinitialize(options);
|
|
801
|
-
};
|
|
802
|
-
|
|
803
|
-
/**
|
|
804
|
-
* @private
|
|
805
|
-
*/
|
|
806
|
-
UrlTemplateImageryProvider.prototype._reinitialize = function (options) {
|
|
807
|
-
const that = this;
|
|
808
|
-
|
|
809
|
-
that._readyPromise = Promise.resolve(options).then(function (properties) {
|
|
810
|
-
//>>includeStart('debug', pragmas.debug);
|
|
811
|
-
if (!defined(properties)) {
|
|
812
|
-
throw new DeveloperError("options is required.");
|
|
813
|
-
}
|
|
814
|
-
if (!defined(properties.url)) {
|
|
815
|
-
throw new DeveloperError("options.url is required.");
|
|
816
|
-
}
|
|
817
|
-
//>>includeEnd('debug');
|
|
818
|
-
|
|
819
|
-
const customTags = properties.customTags;
|
|
820
|
-
const allTags = combine(tags, customTags);
|
|
821
|
-
const allPickFeaturesTags = combine(pickFeaturesTags, customTags);
|
|
822
|
-
const resource = Resource.createIfNeeded(properties.url);
|
|
823
|
-
const pickFeaturesResource = Resource.createIfNeeded(
|
|
824
|
-
properties.pickFeaturesUrl
|
|
825
|
-
);
|
|
826
|
-
|
|
827
|
-
that.enablePickFeatures = defaultValue(
|
|
828
|
-
properties.enablePickFeatures,
|
|
829
|
-
that.enablePickFeatures
|
|
830
|
-
);
|
|
831
|
-
that._urlSchemeZeroPadding = defaultValue(
|
|
832
|
-
properties.urlSchemeZeroPadding,
|
|
833
|
-
that.urlSchemeZeroPadding
|
|
834
|
-
);
|
|
835
|
-
that._tileDiscardPolicy = properties.tileDiscardPolicy;
|
|
836
|
-
that._getFeatureInfoFormats = properties.getFeatureInfoFormats;
|
|
837
|
-
|
|
838
|
-
that._subdomains = properties.subdomains;
|
|
839
|
-
if (Array.isArray(that._subdomains)) {
|
|
840
|
-
that._subdomains = that._subdomains.slice();
|
|
841
|
-
} else if (defined(that._subdomains) && that._subdomains.length > 0) {
|
|
842
|
-
that._subdomains = that._subdomains.split("");
|
|
843
|
-
} else {
|
|
844
|
-
that._subdomains = ["a", "b", "c"];
|
|
845
|
-
}
|
|
846
|
-
|
|
847
|
-
that._tileWidth = defaultValue(properties.tileWidth, 256);
|
|
848
|
-
that._tileHeight = defaultValue(properties.tileHeight, 256);
|
|
849
|
-
that._minimumLevel = defaultValue(properties.minimumLevel, 0);
|
|
850
|
-
that._maximumLevel = properties.maximumLevel;
|
|
851
|
-
that._tilingScheme = defaultValue(
|
|
852
|
-
properties.tilingScheme,
|
|
853
|
-
new WebMercatorTilingScheme({ ellipsoid: properties.ellipsoid })
|
|
854
|
-
);
|
|
855
|
-
that._rectangle = defaultValue(
|
|
856
|
-
properties.rectangle,
|
|
857
|
-
that._tilingScheme.rectangle
|
|
858
|
-
);
|
|
859
|
-
that._rectangle = Rectangle.intersection(
|
|
860
|
-
that._rectangle,
|
|
861
|
-
that._tilingScheme.rectangle
|
|
862
|
-
);
|
|
863
|
-
that._hasAlphaChannel = defaultValue(properties.hasAlphaChannel, true);
|
|
864
|
-
|
|
865
|
-
let credit = properties.credit;
|
|
866
|
-
if (typeof credit === "string") {
|
|
867
|
-
credit = new Credit(credit);
|
|
868
|
-
}
|
|
869
|
-
that._credit = credit;
|
|
870
|
-
|
|
871
|
-
that._resource = resource;
|
|
872
|
-
that._tags = allTags;
|
|
873
|
-
that._pickFeaturesResource = pickFeaturesResource;
|
|
874
|
-
that._pickFeaturesTags = allPickFeaturesTags;
|
|
875
|
-
that._ready = true;
|
|
876
|
-
|
|
877
|
-
return true;
|
|
878
|
-
});
|
|
879
|
-
};
|
|
880
|
-
|
|
881
506
|
/**
|
|
882
507
|
* Gets the credits to be displayed when a given tile is displayed.
|
|
883
508
|
*
|
|
@@ -1,7 +1,6 @@
|
|
|
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";
|
|
5
4
|
import destroyObject from "../Core/destroyObject.js";
|
|
6
5
|
import DeveloperError from "../Core/DeveloperError.js";
|
|
7
6
|
import Ellipsoid from "../Core/Ellipsoid.js";
|
|
@@ -54,12 +53,6 @@ function Vector3DTileContent(tileset, tile, resource, arrayBuffer, byteOffset) {
|
|
|
54
53
|
|
|
55
54
|
this._ready = false;
|
|
56
55
|
|
|
57
|
-
// This is here for backwards compatibility and can be removed when readyPromise is removed.
|
|
58
|
-
this._resolveContent = undefined;
|
|
59
|
-
this._readyPromise = new Promise((resolve) => {
|
|
60
|
-
this._resolveContent = resolve;
|
|
61
|
-
});
|
|
62
|
-
|
|
63
56
|
initialize(this, arrayBuffer, byteOffset);
|
|
64
57
|
}
|
|
65
58
|
|
|
@@ -143,26 +136,6 @@ Object.defineProperties(Vector3DTileContent.prototype, {
|
|
|
143
136
|
},
|
|
144
137
|
},
|
|
145
138
|
|
|
146
|
-
/**
|
|
147
|
-
* Gets the promise that will be resolved when the tile's content is ready to render.
|
|
148
|
-
*
|
|
149
|
-
* @memberof Vector3DTileContent.prototype
|
|
150
|
-
*
|
|
151
|
-
* @type {Promise<Vector3DTileContent>}
|
|
152
|
-
* @readonly
|
|
153
|
-
* @deprecated
|
|
154
|
-
* @private
|
|
155
|
-
*/
|
|
156
|
-
readyPromise: {
|
|
157
|
-
get: function () {
|
|
158
|
-
deprecationWarning(
|
|
159
|
-
"Vector3DTileContent.readyPromise",
|
|
160
|
-
"Vector3DTileContent.readyPromise was deprecated in CesiumJS 1.104. It will be removed in 1.107. Wait for Vector3DTileContent.ready to return true instead."
|
|
161
|
-
);
|
|
162
|
-
return this._readyPromise;
|
|
163
|
-
},
|
|
164
|
-
},
|
|
165
|
-
|
|
166
139
|
tileset: {
|
|
167
140
|
get: function () {
|
|
168
141
|
return this._tileset;
|
|
@@ -335,7 +308,6 @@ function initialize(content, arrayBuffer, byteOffset) {
|
|
|
335
308
|
|
|
336
309
|
if (byteLength === 0) {
|
|
337
310
|
content._ready = true;
|
|
338
|
-
content._resolveContent(content);
|
|
339
311
|
return;
|
|
340
312
|
}
|
|
341
313
|
|
|
@@ -752,7 +724,6 @@ Vector3DTileContent.prototype.update = function (tileset, frameState) {
|
|
|
752
724
|
}
|
|
753
725
|
this._batchTable.update(tileset, frameState);
|
|
754
726
|
this._ready = true;
|
|
755
|
-
this._resolveContent(this);
|
|
756
727
|
}
|
|
757
728
|
};
|
|
758
729
|
|
|
@@ -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
|
|
426
|
-
this._readyPromise = initialize(this, provider);
|
|
424
|
+
initialize(this, provider);
|
|
427
425
|
}
|
|
428
426
|
|
|
429
|
-
|
|
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
|
-
|
|
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
|
|
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
|
*
|