From 7e5c468fd826fbc3a282f7c63ec433d4b7735ff8 Mon Sep 17 00:00:00 2001 From: Matthew Amato Date: Wed, 3 Jun 2020 13:08:24 -0400 Subject: [PATCH 1/8] Add additional smokescreen to build-ts 1. Add a Specs/TypeScript directory with a minimal TS configuration that uses the d.ts files generated by build-ts 2. Have `build-ts` compile index.ts from this directory which makes sure various types actually conform to their expected interfaces. 3. Fix ImageryProvider interfaces which had issues exposed by this new test. In the future we can add any additional smokescreens that we think are important to validate our definitions going forward, but this will never be a fully exhaustive check. We currently don't actually execute the output, it's just there for compile-time checking. We can revisit this if we ever feel that it's needed. --- .prettierignore | 1 + .../Scene/ArcGisMapServerImageryProvider.js | 18 +++ Source/Scene/BingMapsImageryProvider.js | 18 +++ .../GoogleEarthEnterpriseImageryProvider.js | 18 +++ .../GoogleEarthEnterpriseMapsProvider.js | 18 +++ Source/Scene/GridImageryProvider.js | 18 +++ Source/Scene/IonImageryProvider.js | 18 +++ Source/Scene/MapboxImageryProvider.js | 18 +++ Source/Scene/MapboxStyleImageryProvider.js | 18 +++ Source/Scene/SingleTileImageryProvider.js | 18 +++ .../Scene/TileCoordinatesImageryProvider.js | 20 ++- Source/Scene/UrlTemplateImageryProvider.js | 18 +++ Source/Scene/WebMapServiceImageryProvider.js | 18 +++ .../Scene/WebMapTileServiceImageryProvider.js | 18 +++ Source/Widgets/Viewer/Viewer.js | 2 +- Specs/TypeScript/index.ts | 142 ++++++++++++++++++ Specs/TypeScript/tsconfig.json | 10 ++ gulpfile.cjs | 5 + 18 files changed, 394 insertions(+), 2 deletions(-) create mode 100644 Specs/TypeScript/index.ts create mode 100644 Specs/TypeScript/tsconfig.json diff --git a/.prettierignore b/.prettierignore index d913489d9fd2..c4fbdbbe4e0c 100644 --- a/.prettierignore +++ b/.prettierignore @@ -17,6 +17,7 @@ !**/*.css !**/*.html !**/*.md +!**/*.ts # Re-ignore a few things caught above **/*.min.js diff --git a/Source/Scene/ArcGisMapServerImageryProvider.js b/Source/Scene/ArcGisMapServerImageryProvider.js index b982130e43b2..054bf1cb1e4a 100644 --- a/Source/Scene/ArcGisMapServerImageryProvider.js +++ b/Source/Scene/ArcGisMapServerImageryProvider.js @@ -106,6 +106,24 @@ function ArcGisMapServerImageryProvider(options) { */ this.defaultAlpha = undefined; + /** + * The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and + * 1.0 representing fully opaque. + * + * @type {Number} + * @default undefined + */ + this.defaultNightAlpha = undefined; + + /** + * The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and + * 1.0 representing fully opaque. + * + * @type {Number} + * @default undefined + */ + this.defaultDayAlpha = undefined; + /** * The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 * makes the imagery darker while greater than 1.0 makes it brighter. diff --git a/Source/Scene/BingMapsImageryProvider.js b/Source/Scene/BingMapsImageryProvider.js index 2e458a5f2e3c..74511508a363 100644 --- a/Source/Scene/BingMapsImageryProvider.js +++ b/Source/Scene/BingMapsImageryProvider.js @@ -85,6 +85,24 @@ function BingMapsImageryProvider(options) { */ this.defaultAlpha = undefined; + /** + * The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and + * 1.0 representing fully opaque. + * + * @type {Number} + * @default undefined + */ + this.defaultNightAlpha = undefined; + + /** + * The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and + * 1.0 representing fully opaque. + * + * @type {Number} + * @default undefined + */ + this.defaultDayAlpha = undefined; + /** * The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 * makes the imagery darker while greater than 1.0 makes it brighter. diff --git a/Source/Scene/GoogleEarthEnterpriseImageryProvider.js b/Source/Scene/GoogleEarthEnterpriseImageryProvider.js index ed6054161d42..bc32e257e1dc 100644 --- a/Source/Scene/GoogleEarthEnterpriseImageryProvider.js +++ b/Source/Scene/GoogleEarthEnterpriseImageryProvider.js @@ -105,6 +105,24 @@ function GoogleEarthEnterpriseImageryProvider(options) { */ this.defaultAlpha = undefined; + /** + * The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and + * 1.0 representing fully opaque. + * + * @type {Number} + * @default undefined + */ + this.defaultNightAlpha = undefined; + + /** + * The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and + * 1.0 representing fully opaque. + * + * @type {Number} + * @default undefined + */ + this.defaultDayAlpha = undefined; + /** * The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 * makes the imagery darker while greater than 1.0 makes it brighter. diff --git a/Source/Scene/GoogleEarthEnterpriseMapsProvider.js b/Source/Scene/GoogleEarthEnterpriseMapsProvider.js index 4f3150017bc4..1f359cab1fa4 100644 --- a/Source/Scene/GoogleEarthEnterpriseMapsProvider.js +++ b/Source/Scene/GoogleEarthEnterpriseMapsProvider.js @@ -110,6 +110,24 @@ function GoogleEarthEnterpriseMapsProvider(options) { */ this.defaultAlpha = undefined; + /** + * The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and + * 1.0 representing fully opaque. + * + * @type {Number} + * @default undefined + */ + this.defaultNightAlpha = undefined; + + /** + * The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and + * 1.0 representing fully opaque. + * + * @type {Number} + * @default undefined + */ + this.defaultDayAlpha = undefined; + /** * The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 * makes the imagery darker while greater than 1.0 makes it brighter. diff --git a/Source/Scene/GridImageryProvider.js b/Source/Scene/GridImageryProvider.js index 875bc143f678..e7a6fc63c325 100644 --- a/Source/Scene/GridImageryProvider.js +++ b/Source/Scene/GridImageryProvider.js @@ -49,6 +49,24 @@ function GridImageryProvider(options) { */ this.defaultAlpha = undefined; + /** + * The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and + * 1.0 representing fully opaque. + * + * @type {Number} + * @default undefined + */ + this.defaultNightAlpha = undefined; + + /** + * The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and + * 1.0 representing fully opaque. + * + * @type {Number} + * @default undefined + */ + this.defaultDayAlpha = undefined; + /** * The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 * makes the imagery darker while greater than 1.0 makes it brighter. diff --git a/Source/Scene/IonImageryProvider.js b/Source/Scene/IonImageryProvider.js index bea2963e3e50..b63145cd6ffa 100644 --- a/Source/Scene/IonImageryProvider.js +++ b/Source/Scene/IonImageryProvider.js @@ -74,6 +74,24 @@ function IonImageryProvider(options) { */ this.defaultAlpha = undefined; + /** + * The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and + * 1.0 representing fully opaque. + * + * @type {Number} + * @default undefined + */ + this.defaultNightAlpha = undefined; + + /** + * The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and + * 1.0 representing fully opaque. + * + * @type {Number} + * @default undefined + */ + this.defaultDayAlpha = undefined; + /** * The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 * makes the imagery darker while greater than 1.0 makes it brighter. diff --git a/Source/Scene/MapboxImageryProvider.js b/Source/Scene/MapboxImageryProvider.js index 0ffa60334167..01c2371dfb3b 100644 --- a/Source/Scene/MapboxImageryProvider.js +++ b/Source/Scene/MapboxImageryProvider.js @@ -65,6 +65,24 @@ function MapboxImageryProvider(options) { */ this.defaultAlpha = undefined; + /** + * The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and + * 1.0 representing fully opaque. + * + * @type {Number} + * @default undefined + */ + this.defaultNightAlpha = undefined; + + /** + * The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and + * 1.0 representing fully opaque. + * + * @type {Number} + * @default undefined + */ + this.defaultDayAlpha = undefined; + /** * The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 * makes the imagery darker while greater than 1.0 makes it brighter. diff --git a/Source/Scene/MapboxStyleImageryProvider.js b/Source/Scene/MapboxStyleImageryProvider.js index c1a063fe7c19..799955ba7e69 100644 --- a/Source/Scene/MapboxStyleImageryProvider.js +++ b/Source/Scene/MapboxStyleImageryProvider.js @@ -67,6 +67,24 @@ function MapboxStyleImageryProvider(options) { */ this.defaultAlpha = undefined; + /** + * The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and + * 1.0 representing fully opaque. + * + * @type {Number} + * @default undefined + */ + this.defaultNightAlpha = undefined; + + /** + * The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and + * 1.0 representing fully opaque. + * + * @type {Number} + * @default undefined + */ + this.defaultDayAlpha = undefined; + /** * The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 * makes the imagery darker while greater than 1.0 makes it brighter. diff --git a/Source/Scene/SingleTileImageryProvider.js b/Source/Scene/SingleTileImageryProvider.js index 070344f0452e..354fdb8640d2 100644 --- a/Source/Scene/SingleTileImageryProvider.js +++ b/Source/Scene/SingleTileImageryProvider.js @@ -57,6 +57,24 @@ function SingleTileImageryProvider(options) { */ this.defaultAlpha = undefined; + /** + * The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and + * 1.0 representing fully opaque. + * + * @type {Number} + * @default undefined + */ + this.defaultNightAlpha = undefined; + + /** + * The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and + * 1.0 representing fully opaque. + * + * @type {Number} + * @default undefined + */ + this.defaultDayAlpha = undefined; + /** * The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 * makes the imagery darker while greater than 1.0 makes it brighter. diff --git a/Source/Scene/TileCoordinatesImageryProvider.js b/Source/Scene/TileCoordinatesImageryProvider.js index 6f5c6f66c320..c503c84bc7ef 100644 --- a/Source/Scene/TileCoordinatesImageryProvider.js +++ b/Source/Scene/TileCoordinatesImageryProvider.js @@ -27,7 +27,7 @@ import when from "../ThirdParty/when.js"; * @alias TileCoordinatesImageryProvider * @constructor * - * @param {TileCoordinatesImageryProvider.ConstructorOptions} options Object describing initialization options + * @param {TileCoordinatesImageryProvider.ConstructorOptions} [options] Object describing initialization options */ function TileCoordinatesImageryProvider(options) { options = defaultValue(options, defaultValue.EMPTY_OBJECT); @@ -50,6 +50,24 @@ function TileCoordinatesImageryProvider(options) { */ this.defaultAlpha = undefined; + /** + * The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and + * 1.0 representing fully opaque. + * + * @type {Number} + * @default undefined + */ + this.defaultNightAlpha = undefined; + + /** + * The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and + * 1.0 representing fully opaque. + * + * @type {Number} + * @default undefined + */ + this.defaultDayAlpha = undefined; + /** * The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 * makes the imagery darker while greater than 1.0 makes it brighter. diff --git a/Source/Scene/UrlTemplateImageryProvider.js b/Source/Scene/UrlTemplateImageryProvider.js index 11ad3d14f5f6..fc0c09b3ee76 100644 --- a/Source/Scene/UrlTemplateImageryProvider.js +++ b/Source/Scene/UrlTemplateImageryProvider.js @@ -225,6 +225,24 @@ function UrlTemplateImageryProvider(options) { */ this.defaultAlpha = undefined; + /** + * The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and + * 1.0 representing fully opaque. + * + * @type {Number} + * @default undefined + */ + this.defaultNightAlpha = undefined; + + /** + * The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and + * 1.0 representing fully opaque. + * + * @type {Number} + * @default undefined + */ + this.defaultDayAlpha = undefined; + /** * The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 * makes the imagery darker while greater than 1.0 makes it brighter. diff --git a/Source/Scene/WebMapServiceImageryProvider.js b/Source/Scene/WebMapServiceImageryProvider.js index 617aa081fcd8..303e43f9741a 100644 --- a/Source/Scene/WebMapServiceImageryProvider.js +++ b/Source/Scene/WebMapServiceImageryProvider.js @@ -103,6 +103,24 @@ function WebMapServiceImageryProvider(options) { */ this.defaultAlpha = undefined; + /** + * The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and + * 1.0 representing fully opaque. + * + * @type {Number} + * @default undefined + */ + this.defaultNightAlpha = undefined; + + /** + * The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and + * 1.0 representing fully opaque. + * + * @type {Number} + * @default undefined + */ + this.defaultDayAlpha = undefined; + /** * The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 * makes the imagery darker while greater than 1.0 makes it brighter. diff --git a/Source/Scene/WebMapTileServiceImageryProvider.js b/Source/Scene/WebMapTileServiceImageryProvider.js index 3f95803b98cb..70c78b09295f 100644 --- a/Source/Scene/WebMapTileServiceImageryProvider.js +++ b/Source/Scene/WebMapTileServiceImageryProvider.js @@ -146,6 +146,24 @@ function WebMapTileServiceImageryProvider(options) { */ this.defaultAlpha = undefined; + /** + * The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and + * 1.0 representing fully opaque. + * + * @type {Number} + * @default undefined + */ + this.defaultNightAlpha = undefined; + + /** + * The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and + * 1.0 representing fully opaque. + * + * @type {Number} + * @default undefined + */ + this.defaultDayAlpha = undefined; + /** * The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 * makes the imagery darker while greater than 1.0 makes it brighter. diff --git a/Source/Widgets/Viewer/Viewer.js b/Source/Widgets/Viewer/Viewer.js index c9d7b4e3c4af..fc205ed446f2 100644 --- a/Source/Widgets/Viewer/Viewer.js +++ b/Source/Widgets/Viewer/Viewer.js @@ -269,7 +269,7 @@ function enableVRUI(viewer, enabled) { * @constructor * * @param {Element|String} container The DOM element or ID that will contain the widget. - * @param {Viewer.ConstructorOptions} options Object describing initialization options + * @param {Viewer.ConstructorOptions} [options] Object describing initialization options * * @exception {DeveloperError} Element with id "container" does not exist in the document. * @exception {DeveloperError} options.selectedImageryProviderViewModel is not available when not using the BaseLayerPicker widget, specify options.imageryProvider instead. diff --git a/Specs/TypeScript/index.ts b/Specs/TypeScript/index.ts new file mode 100644 index 000000000000..fe29ecff98f2 --- /dev/null +++ b/Specs/TypeScript/index.ts @@ -0,0 +1,142 @@ +import { + ArcGisMapServerImageryProvider, + BingMapsImageryProvider, + ImageryProvider, + WebMapServiceImageryProvider, + OpenStreetMapImageryProvider, + TileMapServiceImageryProvider, + GoogleEarthEnterpriseImageryProvider, + GoogleEarthEnterpriseMapsProvider, + GridImageryProvider, + IonImageryProvider, + MapboxImageryProvider, + MapboxStyleImageryProvider, + SingleTileImageryProvider, + TileCoordinatesImageryProvider, + UrlTemplateImageryProvider, + WebMapTileServiceImageryProvider, + GoogleEarthEnterpriseMetadata, + TerrainProvider, + ArcGISTiledElevationTerrainProvider, + CesiumTerrainProvider, + EllipsoidTerrainProvider, + GoogleEarthEnterpriseTerrainProvider, + VRTheWorldTerrainProvider, + DataSource, + CzmlDataSource, + GeoJsonDataSource, + KmlDataSource, + CustomDataSource, + Camera, + Scene, + Property, + ConstantProperty, + SampledProperty, + PositionProperty, + SampledPositionProperty, + TimeIntervalCollectionProperty, + CompositeProperty, + CompositePositionProperty, + Cartesian3, + ReferenceProperty, + MaterialProperty, + EntityCollection, + CallbackProperty, + ConstantPositionProperty, + TimeIntervalCollectionPositionProperty, + ColorMaterialProperty, + CompositeMaterialProperty, + GridMaterialProperty, + ImageMaterialProperty, + PolylineGlowMaterialProperty, + PolylineOutlineMaterialProperty, + StripeMaterialProperty, +} from "cesium"; + +// Verify ImageryProvider instances conform to the expected interface +let imageryProvider: ImageryProvider; +imageryProvider = new WebMapServiceImageryProvider({ url: "", layers: "0" }); +imageryProvider = new BingMapsImageryProvider({ url: "" }); +imageryProvider = new ArcGisMapServerImageryProvider({ url: "" }); +imageryProvider = new BingMapsImageryProvider({ url: "" }); +imageryProvider = new OpenStreetMapImageryProvider({ url: "" }); +imageryProvider = new TileMapServiceImageryProvider({ url: "" }); +imageryProvider = new GridImageryProvider({ url: "" }); +imageryProvider = new IonImageryProvider({ assetId: 2 }); +imageryProvider = new MapboxImageryProvider({ mapId: "" }); +imageryProvider = new MapboxStyleImageryProvider({ styleId: "" }); +imageryProvider = new SingleTileImageryProvider({ url: "" }); +imageryProvider = new TileCoordinatesImageryProvider(); +imageryProvider = new UrlTemplateImageryProvider({ url: "" }); +imageryProvider = new WebMapServiceImageryProvider({ url: "", layers: "" }); +imageryProvider = new GoogleEarthEnterpriseImageryProvider({ + url: "", + metadata: new GoogleEarthEnterpriseMetadata(""), +}); +imageryProvider = new GoogleEarthEnterpriseMapsProvider({ + url: "", + channel: 1, +}); +imageryProvider = new WebMapTileServiceImageryProvider({ + url: "", + layer: "", + style: "", + tileMatrixSetID: "", +}); + +// Verify TerrainProvider instances conform to the expected interface +let terrainProvider: TerrainProvider; +terrainProvider = new ArcGISTiledElevationTerrainProvider({ url: "" }); +terrainProvider = new CesiumTerrainProvider({ url: "" }); +terrainProvider = new EllipsoidTerrainProvider(); +terrainProvider = new VRTheWorldTerrainProvider({ url: "" }); +terrainProvider = new GoogleEarthEnterpriseTerrainProvider({ + url: "", + metadata: new GoogleEarthEnterpriseMetadata(""), +}); + +// Verify DataSource instances conform to the expected interface +let dataSource: DataSource; +dataSource = new CzmlDataSource(); +dataSource = new GeoJsonDataSource(); +dataSource = new KmlDataSource({ + canvas: document.createElement("canvas"), + camera: new Camera(new Scene()), +}); +dataSource = new CustomDataSource(); + +// Verify Property instances conform to the expected interface +let property: Property; +property = new CallbackProperty(() => 0, false); +property = new ConstantProperty(1); +property = new TimeIntervalCollectionProperty(); +property = new CompositeProperty(); +property = new SampledProperty(Cartesian3); +property = new PositionProperty(); +property = new MaterialProperty(); +property = new ReferenceProperty(new EntityCollection(), "object1", [ + "billboard", + "scale", +]); + +// Verify PositionProperty instances conform to the expected PositionProperty and Property interfaces +let positionProperty: PositionProperty; +property = positionProperty = new SampledPositionProperty(); +property = positionProperty = new CompositePositionProperty(); +property = positionProperty = new ConstantPositionProperty(); +property = positionProperty = new TimeIntervalCollectionPositionProperty(); +property = positionProperty = new ReferenceProperty( + new EntityCollection(), + "object1", + ["billboard", "scale"] +); + +// Verify MaterialProperty instances conform to the expected MaterialProperty and Property interfaces +let materialProperty: MaterialProperty; +property = materialProperty = new ColorMaterialProperty(); +property = materialProperty = new CompositeMaterialProperty(); +property = materialProperty = new GridMaterialProperty(); +property = materialProperty = new ImageMaterialProperty(); +property = materialProperty = new PolylineGlowMaterialProperty(); +property = materialProperty = new PolylineOutlineMaterialProperty(); +property = materialProperty = new StripeMaterialProperty(); diff --git a/Specs/TypeScript/tsconfig.json b/Specs/TypeScript/tsconfig.json new file mode 100644 index 000000000000..3f83cf741b1a --- /dev/null +++ b/Specs/TypeScript/tsconfig.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "noEmit": true, + "types": [], + "strict": true + }, + "include": [ + "../.." + ], +} \ No newline at end of file diff --git a/gulpfile.cjs b/gulpfile.cjs index 4d8a703910ac..93c5c34b78cf 100644 --- a/gulpfile.cjs +++ b/gulpfile.cjs @@ -1594,6 +1594,11 @@ ${source} stdio: "inherit", }); + // Also compile our smokescreen to make sure interfaces work as expected. + child_process.execSync("npx tsc -p Specs/TypeScript/tsconfig.json", { + stdio: "inherit", + }); + // Below is a sanity check to make sure we didn't leave anything out that // we don't already know about From 0a285cc3d625145d6a49d711d301670996921ac1 Mon Sep 17 00:00:00 2001 From: Matthew Amato Date: Wed, 3 Jun 2020 13:16:13 -0400 Subject: [PATCH 2/8] Update CHANGES --- CHANGES.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index cac6962e4eae..7f609b96b52f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -9,6 +9,8 @@ ##### Fixes :wrench: - Fixed a bug with handling of PixelFormat's flipY. [#8893](https://github.com/CesiumGS/cesium/pull/8893) +- Fixed JSDoc and TypeScript type definitions for all `ImageryProvider` types, which were missing `defaultNightAlpha` and `defaultDayAlpha` properties. +- Fixed JSDoc and TypeScript type definitions for `Viewer` options parameter, which was incorrectly listed as required. ### 1.70.0 - 2020-06-01 From f6d4c98f4555cede0317635853a0f46a8eb1d09f Mon Sep 17 00:00:00 2001 From: Matthew Amato Date: Wed, 3 Jun 2020 16:34:15 -0400 Subject: [PATCH 3/8] Add missing property typs to TypeScript smokescreen --- Source/DataSources/PositionPropertyArray.js | 2 +- Specs/TypeScript/index.ts | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/Source/DataSources/PositionPropertyArray.js b/Source/DataSources/PositionPropertyArray.js index b4c04259f138..1067d4914735 100644 --- a/Source/DataSources/PositionPropertyArray.js +++ b/Source/DataSources/PositionPropertyArray.js @@ -7,7 +7,7 @@ import ReferenceFrame from "../Core/ReferenceFrame.js"; import Property from "./Property.js"; /** - * A {@link PositionProperty} whose value is an array whose items are the computed value + * A {@link Property} whose value is an array whose items are the computed value * of other PositionProperty instances. * * @alias PositionPropertyArray diff --git a/Specs/TypeScript/index.ts b/Specs/TypeScript/index.ts index fe29ecff98f2..4e07cba7180e 100644 --- a/Specs/TypeScript/index.ts +++ b/Specs/TypeScript/index.ts @@ -30,6 +30,7 @@ import { Camera, Scene, Property, + PropertyBag, ConstantProperty, SampledProperty, PositionProperty, @@ -51,6 +52,14 @@ import { PolylineGlowMaterialProperty, PolylineOutlineMaterialProperty, StripeMaterialProperty, + CheckerboardMaterialProperty, + PolylineDashMaterialProperty, + VelocityVectorProperty, + VelocityOrientationProperty, + PropertyArray, + PositionPropertyArray, + PolylineArrowMaterialProperty, + NodeTransformationProperty, } from "cesium"; // Verify ImageryProvider instances conform to the expected interface @@ -112,8 +121,14 @@ property = new ConstantProperty(1); property = new TimeIntervalCollectionProperty(); property = new CompositeProperty(); property = new SampledProperty(Cartesian3); +property = new PropertyBag(); +property = new PropertyArray(); property = new PositionProperty(); property = new MaterialProperty(); +property = new VelocityVectorProperty(); +property = new VelocityOrientationProperty(); +property = new PositionPropertyArray(); +property = new NodeTransformationProperty(); property = new ReferenceProperty(new EntityCollection(), "object1", [ "billboard", "scale", @@ -140,3 +155,6 @@ property = materialProperty = new ImageMaterialProperty(); property = materialProperty = new PolylineGlowMaterialProperty(); property = materialProperty = new PolylineOutlineMaterialProperty(); property = materialProperty = new StripeMaterialProperty(); +property = materialProperty = new CheckerboardMaterialProperty(); +property = materialProperty = new PolylineDashMaterialProperty(); +property = materialProperty = new PolylineArrowMaterialProperty(); From 0c1c9d1c5f64367bdbeab7dcb0b3a992442ece42 Mon Sep 17 00:00:00 2001 From: Matthew Amato Date: Wed, 3 Jun 2020 16:48:13 -0400 Subject: [PATCH 4/8] Other minor TS improvements. --- Source/DataSources/NodeTransformationProperty.js | 6 +++--- Source/DataSources/VelocityOrientationProperty.js | 2 +- Source/DataSources/VelocityVectorProperty.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/DataSources/NodeTransformationProperty.js b/Source/DataSources/NodeTransformationProperty.js index 9cf7ad22ccda..1d4353db708d 100644 --- a/Source/DataSources/NodeTransformationProperty.js +++ b/Source/DataSources/NodeTransformationProperty.js @@ -13,9 +13,9 @@ var defaultNodeTransformation = new TranslationRotationScale(); * @constructor * * @param {Object} [options] Object with the following properties: - * @param {Property} [options.translation=Cartesian3.ZERO] A {@link Cartesian3} Property specifying the (x, y, z) translation to apply to the node. - * @param {Property} [options.rotation=Quaternion.IDENTITY] A {@link Quaternion} Property specifying the (x, y, z, w) rotation to apply to the node. - * @param {Property} [options.scale=new Cartesian3(1.0, 1.0, 1.0)] A {@link Cartesian3} Property specifying the (x, y, z) scaling to apply to the node. + * @param {Property|Cartesian3} [options.translation=Cartesian3.ZERO] A {@link Cartesian3} Property specifying the (x, y, z) translation to apply to the node. + * @param {Property|Quaternion} [options.rotation=Quaternion.IDENTITY] A {@link Quaternion} Property specifying the (x, y, z, w) rotation to apply to the node. + * @param {Property|Cartesian3} [options.scale=new Cartesian3(1.0, 1.0, 1.0)] A {@link Cartesian3} Property specifying the (x, y, z) scaling to apply to the node. */ function NodeTransformationProperty(options) { options = defaultValue(options, defaultValue.EMPTY_OBJECT); diff --git a/Source/DataSources/VelocityOrientationProperty.js b/Source/DataSources/VelocityOrientationProperty.js index 450b7864d7b4..697dd02bf028 100644 --- a/Source/DataSources/VelocityOrientationProperty.js +++ b/Source/DataSources/VelocityOrientationProperty.js @@ -16,7 +16,7 @@ import VelocityVectorProperty from "./VelocityVectorProperty.js"; * @alias VelocityOrientationProperty * @constructor * - * @param {Property} [position] The position property used to compute the orientation. + * @param {PositionProperty} [position] The position property used to compute the orientation. * @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid used to determine which way is up. * * @example diff --git a/Source/DataSources/VelocityVectorProperty.js b/Source/DataSources/VelocityVectorProperty.js index f6c719369133..85658668b788 100644 --- a/Source/DataSources/VelocityVectorProperty.js +++ b/Source/DataSources/VelocityVectorProperty.js @@ -13,7 +13,7 @@ import Property from "./Property.js"; * @alias VelocityVectorProperty * @constructor * - * @param {Property} [position] The position property used to compute the velocity. + * @param {PositionProperty} [position] The position property used to compute the velocity. * @param {Boolean} [normalize=true] Whether to normalize the computed velocity vector. * * @example From 164a4742415c9a9200b0cd0465540c3f67f63f6f Mon Sep 17 00:00:00 2001 From: Matthew Amato Date: Thu, 4 Jun 2020 11:19:27 -0400 Subject: [PATCH 5/8] Most ImageryProvider properties can be undefined. --- Source/Scene/ArcGisMapServerImageryProvider.js | 18 +++++++++--------- Source/Scene/BingMapsImageryProvider.js | 18 +++++++++--------- .../GoogleEarthEnterpriseImageryProvider.js | 18 +++++++++--------- Source/Scene/GridImageryProvider.js | 18 +++++++++--------- Source/Scene/ImageryProvider.js | 18 +++++++++--------- Source/Scene/IonImageryProvider.js | 18 +++++++++--------- Source/Scene/MapboxImageryProvider.js | 18 +++++++++--------- Source/Scene/MapboxStyleImageryProvider.js | 18 +++++++++--------- Source/Scene/SingleTileImageryProvider.js | 18 +++++++++--------- Source/Scene/TileCoordinatesImageryProvider.js | 18 +++++++++--------- Source/Scene/UrlTemplateImageryProvider.js | 18 +++++++++--------- Source/Scene/WebMapServiceImageryProvider.js | 18 +++++++++--------- .../Scene/WebMapTileServiceImageryProvider.js | 18 +++++++++--------- 13 files changed, 117 insertions(+), 117 deletions(-) diff --git a/Source/Scene/ArcGisMapServerImageryProvider.js b/Source/Scene/ArcGisMapServerImageryProvider.js index 054bf1cb1e4a..240154ae2e4b 100644 --- a/Source/Scene/ArcGisMapServerImageryProvider.js +++ b/Source/Scene/ArcGisMapServerImageryProvider.js @@ -101,7 +101,7 @@ function ArcGisMapServerImageryProvider(options) { * The default alpha blending value of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultAlpha = undefined; @@ -110,7 +110,7 @@ function ArcGisMapServerImageryProvider(options) { * The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultNightAlpha = undefined; @@ -119,7 +119,7 @@ function ArcGisMapServerImageryProvider(options) { * The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultDayAlpha = undefined; @@ -128,7 +128,7 @@ function ArcGisMapServerImageryProvider(options) { * The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 * makes the imagery darker while greater than 1.0 makes it brighter. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultBrightness = undefined; @@ -137,7 +137,7 @@ function ArcGisMapServerImageryProvider(options) { * The default contrast of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces * the contrast while greater than 1.0 increases it. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultContrast = undefined; @@ -145,7 +145,7 @@ function ArcGisMapServerImageryProvider(options) { /** * The default hue of this provider in radians. 0.0 uses the unmodified imagery color. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultHue = undefined; @@ -154,7 +154,7 @@ function ArcGisMapServerImageryProvider(options) { * The default saturation of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the * saturation while greater than 1.0 increases it. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultSaturation = undefined; @@ -162,7 +162,7 @@ function ArcGisMapServerImageryProvider(options) { /** * The default gamma correction to apply to this provider. 1.0 uses the unmodified imagery color. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultGamma = undefined; @@ -542,7 +542,7 @@ Object.defineProperties(ArcGisMapServerImageryProvider.prototype, { * Gets the maximum level-of-detail that can be requested. This function should * not be called before {@link ArcGisMapServerImageryProvider#ready} returns true. * @memberof ArcGisMapServerImageryProvider.prototype - * @type {Number} + * @type {Number|undefined} * @readonly */ maximumLevel: { diff --git a/Source/Scene/BingMapsImageryProvider.js b/Source/Scene/BingMapsImageryProvider.js index 74511508a363..16bedbb4bb3a 100644 --- a/Source/Scene/BingMapsImageryProvider.js +++ b/Source/Scene/BingMapsImageryProvider.js @@ -80,7 +80,7 @@ function BingMapsImageryProvider(options) { * The default alpha blending value of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultAlpha = undefined; @@ -89,7 +89,7 @@ function BingMapsImageryProvider(options) { * The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultNightAlpha = undefined; @@ -98,7 +98,7 @@ function BingMapsImageryProvider(options) { * The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultDayAlpha = undefined; @@ -107,7 +107,7 @@ function BingMapsImageryProvider(options) { * The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 * makes the imagery darker while greater than 1.0 makes it brighter. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultBrightness = undefined; @@ -116,7 +116,7 @@ function BingMapsImageryProvider(options) { * The default contrast of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces * the contrast while greater than 1.0 increases it. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultContrast = undefined; @@ -124,7 +124,7 @@ function BingMapsImageryProvider(options) { /** * The default hue of this provider in radians. 0.0 uses the unmodified imagery color. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultHue = undefined; @@ -133,7 +133,7 @@ function BingMapsImageryProvider(options) { * The default saturation of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the * saturation while greater than 1.0 increases it. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultSaturation = undefined; @@ -141,7 +141,7 @@ function BingMapsImageryProvider(options) { /** * The default gamma correction to apply to this provider. 1.0 uses the unmodified imagery color. * - * @type {Number} + * @type {Number|undefined} * @default 1.0 */ this.defaultGamma = 1.0; @@ -422,7 +422,7 @@ Object.defineProperties(BingMapsImageryProvider.prototype, { * Gets the maximum level-of-detail that can be requested. This function should * not be called before {@link BingMapsImageryProvider#ready} returns true. * @memberof BingMapsImageryProvider.prototype - * @type {Number} + * @type {Number|undefined} * @readonly */ maximumLevel: { diff --git a/Source/Scene/GoogleEarthEnterpriseImageryProvider.js b/Source/Scene/GoogleEarthEnterpriseImageryProvider.js index bc32e257e1dc..54013f15f698 100644 --- a/Source/Scene/GoogleEarthEnterpriseImageryProvider.js +++ b/Source/Scene/GoogleEarthEnterpriseImageryProvider.js @@ -100,7 +100,7 @@ function GoogleEarthEnterpriseImageryProvider(options) { * The default alpha blending value of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultAlpha = undefined; @@ -109,7 +109,7 @@ function GoogleEarthEnterpriseImageryProvider(options) { * The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultNightAlpha = undefined; @@ -118,7 +118,7 @@ function GoogleEarthEnterpriseImageryProvider(options) { * The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultDayAlpha = undefined; @@ -127,7 +127,7 @@ function GoogleEarthEnterpriseImageryProvider(options) { * The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 * makes the imagery darker while greater than 1.0 makes it brighter. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultBrightness = undefined; @@ -136,7 +136,7 @@ function GoogleEarthEnterpriseImageryProvider(options) { * The default contrast of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces * the contrast while greater than 1.0 increases it. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultContrast = undefined; @@ -144,7 +144,7 @@ function GoogleEarthEnterpriseImageryProvider(options) { /** * The default hue of this provider in radians. 0.0 uses the unmodified imagery color. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultHue = undefined; @@ -153,7 +153,7 @@ function GoogleEarthEnterpriseImageryProvider(options) { * The default saturation of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the * saturation while greater than 1.0 increases it. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultSaturation = undefined; @@ -161,7 +161,7 @@ function GoogleEarthEnterpriseImageryProvider(options) { /** * The default gamma correction to apply to this provider. 1.0 uses the unmodified imagery color. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultGamma = undefined; @@ -333,7 +333,7 @@ Object.defineProperties(GoogleEarthEnterpriseImageryProvider.prototype, { * Gets the maximum level-of-detail that can be requested. This function should * not be called before {@link GoogleEarthEnterpriseImageryProvider#ready} returns true. * @memberof GoogleEarthEnterpriseImageryProvider.prototype - * @type {Number} + * @type {Number|undefined} * @readonly */ maximumLevel: { diff --git a/Source/Scene/GridImageryProvider.js b/Source/Scene/GridImageryProvider.js index e7a6fc63c325..1e780c0e6e15 100644 --- a/Source/Scene/GridImageryProvider.js +++ b/Source/Scene/GridImageryProvider.js @@ -44,7 +44,7 @@ function GridImageryProvider(options) { * The default alpha blending value of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultAlpha = undefined; @@ -53,7 +53,7 @@ function GridImageryProvider(options) { * The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultNightAlpha = undefined; @@ -62,7 +62,7 @@ function GridImageryProvider(options) { * The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultDayAlpha = undefined; @@ -71,7 +71,7 @@ function GridImageryProvider(options) { * The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 * makes the imagery darker while greater than 1.0 makes it brighter. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultBrightness = undefined; @@ -80,7 +80,7 @@ function GridImageryProvider(options) { * The default contrast of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces * the contrast while greater than 1.0 increases it. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultContrast = undefined; @@ -88,7 +88,7 @@ function GridImageryProvider(options) { /** * The default hue of this provider in radians. 0.0 uses the unmodified imagery color. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultHue = undefined; @@ -97,7 +97,7 @@ function GridImageryProvider(options) { * The default saturation of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the * saturation while greater than 1.0 increases it. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultSaturation = undefined; @@ -105,7 +105,7 @@ function GridImageryProvider(options) { /** * The default gamma correction to apply to this provider. 1.0 uses the unmodified imagery color. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultGamma = undefined; @@ -195,7 +195,7 @@ Object.defineProperties(GridImageryProvider.prototype, { * Gets the maximum level-of-detail that can be requested. This function should * not be called before {@link GridImageryProvider#ready} returns true. * @memberof GridImageryProvider.prototype - * @type {Number} + * @type {Number|undefined} * @readonly */ maximumLevel: { diff --git a/Source/Scene/ImageryProvider.js b/Source/Scene/ImageryProvider.js index 616bcbcbe8f9..77c53f6975a9 100644 --- a/Source/Scene/ImageryProvider.js +++ b/Source/Scene/ImageryProvider.js @@ -36,7 +36,7 @@ function ImageryProvider() { * The default alpha blending value of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultAlpha = undefined; @@ -45,7 +45,7 @@ function ImageryProvider() { * The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultNightAlpha = undefined; @@ -54,7 +54,7 @@ function ImageryProvider() { * The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultDayAlpha = undefined; @@ -63,7 +63,7 @@ function ImageryProvider() { * The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 * makes the imagery darker while greater than 1.0 makes it brighter. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultBrightness = undefined; @@ -72,7 +72,7 @@ function ImageryProvider() { * The default contrast of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces * the contrast while greater than 1.0 increases it. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultContrast = undefined; @@ -80,7 +80,7 @@ function ImageryProvider() { /** * The default hue of this provider in radians. 0.0 uses the unmodified imagery color. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultHue = undefined; @@ -89,7 +89,7 @@ function ImageryProvider() { * The default saturation of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the * saturation while greater than 1.0 increases it. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultSaturation = undefined; @@ -97,7 +97,7 @@ function ImageryProvider() { /** * The default gamma correction to apply to this provider. 1.0 uses the unmodified imagery color. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultGamma = undefined; @@ -179,7 +179,7 @@ Object.defineProperties(ImageryProvider.prototype, { * Gets the maximum level-of-detail that can be requested. This function should * not be called before {@link ImageryProvider#ready} returns true. * @memberof ImageryProvider.prototype - * @type {Number} + * @type {Number|undefined} * @readonly */ maximumLevel: { diff --git a/Source/Scene/IonImageryProvider.js b/Source/Scene/IonImageryProvider.js index b63145cd6ffa..d13495957e94 100644 --- a/Source/Scene/IonImageryProvider.js +++ b/Source/Scene/IonImageryProvider.js @@ -69,7 +69,7 @@ function IonImageryProvider(options) { * The default alpha blending value of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultAlpha = undefined; @@ -78,7 +78,7 @@ function IonImageryProvider(options) { * The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultNightAlpha = undefined; @@ -87,7 +87,7 @@ function IonImageryProvider(options) { * The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultDayAlpha = undefined; @@ -96,7 +96,7 @@ function IonImageryProvider(options) { * The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 * makes the imagery darker while greater than 1.0 makes it brighter. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultBrightness = undefined; @@ -105,7 +105,7 @@ function IonImageryProvider(options) { * The default contrast of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces * the contrast while greater than 1.0 increases it. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultContrast = undefined; @@ -113,7 +113,7 @@ function IonImageryProvider(options) { /** * The default hue of this provider in radians. 0.0 uses the unmodified imagery color. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultHue = undefined; @@ -122,7 +122,7 @@ function IonImageryProvider(options) { * The default saturation of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the * saturation while greater than 1.0 increases it. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultSaturation = undefined; @@ -130,7 +130,7 @@ function IonImageryProvider(options) { /** * The default gamma correction to apply to this provider. 1.0 uses the unmodified imagery color. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultGamma = undefined; @@ -307,7 +307,7 @@ Object.defineProperties(IonImageryProvider.prototype, { * Gets the maximum level-of-detail that can be requested. This function should * not be called before {@link IonImageryProvider#ready} returns true. * @memberof IonImageryProvider.prototype - * @type {Number} + * @type {Number|undefined} * @readonly */ maximumLevel: { diff --git a/Source/Scene/MapboxImageryProvider.js b/Source/Scene/MapboxImageryProvider.js index 01c2371dfb3b..79caf55821b6 100644 --- a/Source/Scene/MapboxImageryProvider.js +++ b/Source/Scene/MapboxImageryProvider.js @@ -60,7 +60,7 @@ function MapboxImageryProvider(options) { * The default alpha blending value of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultAlpha = undefined; @@ -69,7 +69,7 @@ function MapboxImageryProvider(options) { * The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultNightAlpha = undefined; @@ -78,7 +78,7 @@ function MapboxImageryProvider(options) { * The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultDayAlpha = undefined; @@ -87,7 +87,7 @@ function MapboxImageryProvider(options) { * The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 * makes the imagery darker while greater than 1.0 makes it brighter. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultBrightness = undefined; @@ -96,7 +96,7 @@ function MapboxImageryProvider(options) { * The default contrast of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces * the contrast while greater than 1.0 increases it. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultContrast = undefined; @@ -104,7 +104,7 @@ function MapboxImageryProvider(options) { /** * The default hue of this provider in radians. 0.0 uses the unmodified imagery color. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultHue = undefined; @@ -113,7 +113,7 @@ function MapboxImageryProvider(options) { * The default saturation of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the * saturation while greater than 1.0 increases it. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultSaturation = undefined; @@ -121,7 +121,7 @@ function MapboxImageryProvider(options) { /** * The default gamma correction to apply to this provider. 1.0 uses the unmodified imagery color. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultGamma = undefined; @@ -271,7 +271,7 @@ Object.defineProperties(MapboxImageryProvider.prototype, { * Gets the maximum level-of-detail that can be requested. This function should * not be called before {@link MapboxImageryProvider#ready} returns true. * @memberof MapboxImageryProvider.prototype - * @type {Number} + * @type {Number|undefined} * @readonly */ maximumLevel: { diff --git a/Source/Scene/MapboxStyleImageryProvider.js b/Source/Scene/MapboxStyleImageryProvider.js index 799955ba7e69..6c51a414b32f 100644 --- a/Source/Scene/MapboxStyleImageryProvider.js +++ b/Source/Scene/MapboxStyleImageryProvider.js @@ -62,7 +62,7 @@ function MapboxStyleImageryProvider(options) { * The default alpha blending value of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultAlpha = undefined; @@ -71,7 +71,7 @@ function MapboxStyleImageryProvider(options) { * The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultNightAlpha = undefined; @@ -80,7 +80,7 @@ function MapboxStyleImageryProvider(options) { * The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultDayAlpha = undefined; @@ -89,7 +89,7 @@ function MapboxStyleImageryProvider(options) { * The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 * makes the imagery darker while greater than 1.0 makes it brighter. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultBrightness = undefined; @@ -98,7 +98,7 @@ function MapboxStyleImageryProvider(options) { * The default contrast of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces * the contrast while greater than 1.0 increases it. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultContrast = undefined; @@ -106,7 +106,7 @@ function MapboxStyleImageryProvider(options) { /** * The default hue of this provider in radians. 0.0 uses the unmodified imagery color. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultHue = undefined; @@ -115,7 +115,7 @@ function MapboxStyleImageryProvider(options) { * The default saturation of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the * saturation while greater than 1.0 increases it. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultSaturation = undefined; @@ -123,7 +123,7 @@ function MapboxStyleImageryProvider(options) { /** * The default gamma correction to apply to this provider. 1.0 uses the unmodified imagery color. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultGamma = undefined; @@ -283,7 +283,7 @@ Object.defineProperties(MapboxStyleImageryProvider.prototype, { * Gets the maximum level-of-detail that can be requested. This function should * not be called before {@link MapboxStyleImageryProvider#ready} returns true. * @memberof MapboxStyleImageryProvider.prototype - * @type {Number} + * @type {Number|undefined} * @readonly */ maximumLevel: { diff --git a/Source/Scene/SingleTileImageryProvider.js b/Source/Scene/SingleTileImageryProvider.js index 354fdb8640d2..f78fe92e4649 100644 --- a/Source/Scene/SingleTileImageryProvider.js +++ b/Source/Scene/SingleTileImageryProvider.js @@ -52,7 +52,7 @@ function SingleTileImageryProvider(options) { * The default alpha blending value of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultAlpha = undefined; @@ -61,7 +61,7 @@ function SingleTileImageryProvider(options) { * The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultNightAlpha = undefined; @@ -70,7 +70,7 @@ function SingleTileImageryProvider(options) { * The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultDayAlpha = undefined; @@ -79,7 +79,7 @@ function SingleTileImageryProvider(options) { * The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 * makes the imagery darker while greater than 1.0 makes it brighter. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultBrightness = undefined; @@ -88,7 +88,7 @@ function SingleTileImageryProvider(options) { * The default contrast of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces * the contrast while greater than 1.0 increases it. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultContrast = undefined; @@ -96,7 +96,7 @@ function SingleTileImageryProvider(options) { /** * The default hue of this provider in radians. 0.0 uses the unmodified imagery color. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultHue = undefined; @@ -105,7 +105,7 @@ function SingleTileImageryProvider(options) { * The default saturation of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the * saturation while greater than 1.0 increases it. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultSaturation = undefined; @@ -113,7 +113,7 @@ function SingleTileImageryProvider(options) { /** * The default gamma correction to apply to this provider. 1.0 uses the unmodified imagery color. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultGamma = undefined; @@ -267,7 +267,7 @@ Object.defineProperties(SingleTileImageryProvider.prototype, { * Gets the maximum level-of-detail that can be requested. This function should * not be called before {@link SingleTileImageryProvider#ready} returns true. * @memberof SingleTileImageryProvider.prototype - * @type {Number} + * @type {Number|undefined} * @readonly */ maximumLevel: { diff --git a/Source/Scene/TileCoordinatesImageryProvider.js b/Source/Scene/TileCoordinatesImageryProvider.js index c503c84bc7ef..7194766bcefd 100644 --- a/Source/Scene/TileCoordinatesImageryProvider.js +++ b/Source/Scene/TileCoordinatesImageryProvider.js @@ -45,7 +45,7 @@ function TileCoordinatesImageryProvider(options) { * The default alpha blending value of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultAlpha = undefined; @@ -54,7 +54,7 @@ function TileCoordinatesImageryProvider(options) { * The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultNightAlpha = undefined; @@ -63,7 +63,7 @@ function TileCoordinatesImageryProvider(options) { * The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultDayAlpha = undefined; @@ -72,7 +72,7 @@ function TileCoordinatesImageryProvider(options) { * The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 * makes the imagery darker while greater than 1.0 makes it brighter. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultBrightness = undefined; @@ -81,7 +81,7 @@ function TileCoordinatesImageryProvider(options) { * The default contrast of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces * the contrast while greater than 1.0 increases it. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultContrast = undefined; @@ -89,7 +89,7 @@ function TileCoordinatesImageryProvider(options) { /** * The default hue of this provider in radians. 0.0 uses the unmodified imagery color. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultHue = undefined; @@ -98,7 +98,7 @@ function TileCoordinatesImageryProvider(options) { * The default saturation of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the * saturation while greater than 1.0 increases it. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultSaturation = undefined; @@ -106,7 +106,7 @@ function TileCoordinatesImageryProvider(options) { /** * The default gamma correction to apply to this provider. 1.0 uses the unmodified imagery color. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultGamma = undefined; @@ -171,7 +171,7 @@ Object.defineProperties(TileCoordinatesImageryProvider.prototype, { * Gets the maximum level-of-detail that can be requested. This function should * not be called before {@link TileCoordinatesImageryProvider#ready} returns true. * @memberof TileCoordinatesImageryProvider.prototype - * @type {Number} + * @type {Number|undefined} * @readonly */ maximumLevel: { diff --git a/Source/Scene/UrlTemplateImageryProvider.js b/Source/Scene/UrlTemplateImageryProvider.js index fc0c09b3ee76..3a8482c1f39a 100644 --- a/Source/Scene/UrlTemplateImageryProvider.js +++ b/Source/Scene/UrlTemplateImageryProvider.js @@ -220,7 +220,7 @@ function UrlTemplateImageryProvider(options) { * The default alpha blending value of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultAlpha = undefined; @@ -229,7 +229,7 @@ function UrlTemplateImageryProvider(options) { * The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultNightAlpha = undefined; @@ -238,7 +238,7 @@ function UrlTemplateImageryProvider(options) { * The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultDayAlpha = undefined; @@ -247,7 +247,7 @@ function UrlTemplateImageryProvider(options) { * The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 * makes the imagery darker while greater than 1.0 makes it brighter. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultBrightness = undefined; @@ -256,7 +256,7 @@ function UrlTemplateImageryProvider(options) { * The default contrast of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces * the contrast while greater than 1.0 increases it. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultContrast = undefined; @@ -264,7 +264,7 @@ function UrlTemplateImageryProvider(options) { /** * The default hue of this provider in radians. 0.0 uses the unmodified imagery color. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultHue = undefined; @@ -273,7 +273,7 @@ function UrlTemplateImageryProvider(options) { * The default saturation of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the * saturation while greater than 1.0 increases it. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultSaturation = undefined; @@ -281,7 +281,7 @@ function UrlTemplateImageryProvider(options) { /** * The default gamma correction to apply to this provider. 1.0 uses the unmodified imagery color. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultGamma = undefined; @@ -457,7 +457,7 @@ Object.defineProperties(UrlTemplateImageryProvider.prototype, { * Gets the maximum level-of-detail that can be requested, or undefined if there is no limit. * This function should not be called before {@link UrlTemplateImageryProvider#ready} returns true. * @memberof UrlTemplateImageryProvider.prototype - * @type {Number} + * @type {Number|undefined} * @readonly * @default undefined */ diff --git a/Source/Scene/WebMapServiceImageryProvider.js b/Source/Scene/WebMapServiceImageryProvider.js index 303e43f9741a..c529269da2a5 100644 --- a/Source/Scene/WebMapServiceImageryProvider.js +++ b/Source/Scene/WebMapServiceImageryProvider.js @@ -98,7 +98,7 @@ function WebMapServiceImageryProvider(options) { * The default alpha blending value of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultAlpha = undefined; @@ -107,7 +107,7 @@ function WebMapServiceImageryProvider(options) { * The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultNightAlpha = undefined; @@ -116,7 +116,7 @@ function WebMapServiceImageryProvider(options) { * The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultDayAlpha = undefined; @@ -125,7 +125,7 @@ function WebMapServiceImageryProvider(options) { * The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 * makes the imagery darker while greater than 1.0 makes it brighter. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultBrightness = undefined; @@ -134,7 +134,7 @@ function WebMapServiceImageryProvider(options) { * The default contrast of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces * the contrast while greater than 1.0 increases it. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultContrast = undefined; @@ -142,7 +142,7 @@ function WebMapServiceImageryProvider(options) { /** * The default hue of this provider in radians. 0.0 uses the unmodified imagery color. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultHue = undefined; @@ -151,7 +151,7 @@ function WebMapServiceImageryProvider(options) { * The default saturation of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the * saturation while greater than 1.0 increases it. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultSaturation = undefined; @@ -159,7 +159,7 @@ function WebMapServiceImageryProvider(options) { /** * The default gamma correction to apply to this provider. 1.0 uses the unmodified imagery color. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultGamma = undefined; @@ -386,7 +386,7 @@ Object.defineProperties(WebMapServiceImageryProvider.prototype, { * Gets the maximum level-of-detail that can be requested. This function should * not be called before {@link WebMapServiceImageryProvider#ready} returns true. * @memberof WebMapServiceImageryProvider.prototype - * @type {Number} + * @type {Number|undefined} * @readonly */ maximumLevel: { diff --git a/Source/Scene/WebMapTileServiceImageryProvider.js b/Source/Scene/WebMapTileServiceImageryProvider.js index 70c78b09295f..2b3c14755ca6 100644 --- a/Source/Scene/WebMapTileServiceImageryProvider.js +++ b/Source/Scene/WebMapTileServiceImageryProvider.js @@ -141,7 +141,7 @@ function WebMapTileServiceImageryProvider(options) { * The default alpha blending value of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultAlpha = undefined; @@ -150,7 +150,7 @@ function WebMapTileServiceImageryProvider(options) { * The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultNightAlpha = undefined; @@ -159,7 +159,7 @@ function WebMapTileServiceImageryProvider(options) { * The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultDayAlpha = undefined; @@ -168,7 +168,7 @@ function WebMapTileServiceImageryProvider(options) { * The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 * makes the imagery darker while greater than 1.0 makes it brighter. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultBrightness = undefined; @@ -177,7 +177,7 @@ function WebMapTileServiceImageryProvider(options) { * The default contrast of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces * the contrast while greater than 1.0 increases it. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultContrast = undefined; @@ -185,7 +185,7 @@ function WebMapTileServiceImageryProvider(options) { /** * The default hue of this provider in radians. 0.0 uses the unmodified imagery color. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultHue = undefined; @@ -194,7 +194,7 @@ function WebMapTileServiceImageryProvider(options) { * The default saturation of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the * saturation while greater than 1.0 increases it. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultSaturation = undefined; @@ -202,7 +202,7 @@ function WebMapTileServiceImageryProvider(options) { /** * The default gamma correction to apply to this provider. 1.0 uses the unmodified imagery color. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultGamma = undefined; @@ -432,7 +432,7 @@ Object.defineProperties(WebMapTileServiceImageryProvider.prototype, { * Gets the maximum level-of-detail that can be requested. This function should * not be called before {@link WebMapTileServiceImageryProvider#ready} returns true. * @memberof WebMapTileServiceImageryProvider.prototype - * @type {Number} + * @type {Number|undefined} * @readonly */ maximumLevel: { From bbde6e93ed315b303ed3b8a295af27bb60bd8258 Mon Sep 17 00:00:00 2001 From: Matthew Amato Date: Thu, 4 Jun 2020 11:19:50 -0400 Subject: [PATCH 6/8] Fix missing HeadingPitchRoll/HeadingPitchRange JSDoc --- Source/Core/HeadingPitchRange.js | 3 +++ Source/Core/HeadingPitchRoll.js | 15 +++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/Source/Core/HeadingPitchRange.js b/Source/Core/HeadingPitchRange.js index 974620261628..15741102e771 100644 --- a/Source/Core/HeadingPitchRange.js +++ b/Source/Core/HeadingPitchRange.js @@ -17,6 +17,7 @@ function HeadingPitchRange(heading, pitch, range) { /** * Heading is the rotation from the local north direction where a positive angle is increasing eastward. * @type {Number} + * @default 0.0 */ this.heading = defaultValue(heading, 0.0); @@ -24,12 +25,14 @@ function HeadingPitchRange(heading, pitch, range) { * Pitch is the rotation from the local xy-plane. Positive pitch angles * are above the plane. Negative pitch angles are below the plane. * @type {Number} + * @default 0.0 */ this.pitch = defaultValue(pitch, 0.0); /** * Range is the distance from the center of the local frame. * @type {Number} + * @default 0.0 */ this.range = defaultValue(range, 0.0); } diff --git a/Source/Core/HeadingPitchRoll.js b/Source/Core/HeadingPitchRoll.js index cb037c3c41ce..acfd5c82896c 100644 --- a/Source/Core/HeadingPitchRoll.js +++ b/Source/Core/HeadingPitchRoll.js @@ -15,8 +15,23 @@ import CesiumMath from "./Math.js"; * @param {Number} [roll=0.0] The roll component in radians. */ function HeadingPitchRoll(heading, pitch, roll) { + /** + * Gets or sets the heading. + * @type {Number} + * @default 0.0 + */ this.heading = defaultValue(heading, 0.0); + /** + * Gets or sets the pitch. + * @type {Number} + * @default 0.0 + */ this.pitch = defaultValue(pitch, 0.0); + /** + * Gets or sets the roll. + * @type {Number} + * @default 0.0 + */ this.roll = defaultValue(roll, 0.0); } From c8b3690731f29716832447beb88393d3360373fe Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Fri, 5 Jun 2020 09:08:29 +1000 Subject: [PATCH 7/8] Missing `|undefined` in GoogleEarthEnterpriseMapsProvider --- Source/Scene/GoogleEarthEnterpriseMapsProvider.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Scene/GoogleEarthEnterpriseMapsProvider.js b/Source/Scene/GoogleEarthEnterpriseMapsProvider.js index 1f359cab1fa4..1f1d072230cf 100644 --- a/Source/Scene/GoogleEarthEnterpriseMapsProvider.js +++ b/Source/Scene/GoogleEarthEnterpriseMapsProvider.js @@ -114,7 +114,7 @@ function GoogleEarthEnterpriseMapsProvider(options) { * The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultNightAlpha = undefined; @@ -123,7 +123,7 @@ function GoogleEarthEnterpriseMapsProvider(options) { * The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultDayAlpha = undefined; From 913810ca872a4ff2df302c52f8288b387fb177a5 Mon Sep 17 00:00:00 2001 From: Matthew Amato Date: Thu, 4 Jun 2020 19:29:21 -0400 Subject: [PATCH 8/8] Missing JSDoc --- Source/Scene/GoogleEarthEnterpriseMapsProvider.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Source/Scene/GoogleEarthEnterpriseMapsProvider.js b/Source/Scene/GoogleEarthEnterpriseMapsProvider.js index 1f1d072230cf..5ac25bf96b81 100644 --- a/Source/Scene/GoogleEarthEnterpriseMapsProvider.js +++ b/Source/Scene/GoogleEarthEnterpriseMapsProvider.js @@ -105,7 +105,7 @@ function GoogleEarthEnterpriseMapsProvider(options) { * The default alpha blending value of this provider, with 0.0 representing fully transparent and * 1.0 representing fully opaque. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultAlpha = undefined; @@ -132,7 +132,7 @@ function GoogleEarthEnterpriseMapsProvider(options) { * The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 * makes the imagery darker while greater than 1.0 makes it brighter. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultBrightness = undefined; @@ -141,7 +141,7 @@ function GoogleEarthEnterpriseMapsProvider(options) { * The default contrast of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces * the contrast while greater than 1.0 increases it. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultContrast = undefined; @@ -149,7 +149,7 @@ function GoogleEarthEnterpriseMapsProvider(options) { /** * The default hue of this provider in radians. 0.0 uses the unmodified imagery color. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultHue = undefined; @@ -158,7 +158,7 @@ function GoogleEarthEnterpriseMapsProvider(options) { * The default saturation of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the * saturation while greater than 1.0 increases it. * - * @type {Number} + * @type {Number|undefined} * @default undefined */ this.defaultSaturation = undefined; @@ -166,7 +166,7 @@ function GoogleEarthEnterpriseMapsProvider(options) { /** * The default gamma correction to apply to this provider. 1.0 uses the unmodified imagery color. * - * @type {Number} + * @type {Number|undefined} * @default 1.9 */ this.defaultGamma = 1.9; @@ -443,7 +443,7 @@ Object.defineProperties(GoogleEarthEnterpriseMapsProvider.prototype, { * Gets the maximum level-of-detail that can be requested. This function should * not be called before {@link GoogleEarthEnterpriseMapsProvider#ready} returns true. * @memberof GoogleEarthEnterpriseMapsProvider.prototype - * @type {Number} + * @type {Number|undefined} * @readonly */ maximumLevel: {