Date: Thu, 28 May 2020 21:43:54 +1000
Subject: [PATCH 18/36] Lots of small changes to improve the typescript
definitions.
---
Source/Core/BingMapsApi.js | 6 +
Source/DataSources/BillboardGraphics.js | 40 +++---
Source/DataSources/BoxGraphics.js | 18 +--
Source/DataSources/Cesium3DTilesetGraphics.js | 6 +-
Source/DataSources/CorridorGraphics.js | 36 ++---
Source/DataSources/CylinderGraphics.js | 28 ++--
Source/DataSources/EllipseGraphics.js | 40 +++---
Source/DataSources/EllipsoidGraphics.js | 34 ++---
Source/DataSources/Entity.js | 52 +++----
Source/DataSources/KmlDataSource.js | 2 +-
Source/DataSources/LabelGraphics.js | 42 +++---
Source/DataSources/ModelGraphics.js | 38 ++---
Source/DataSources/PathGraphics.js | 12 +-
Source/DataSources/PlaneGraphics.js | 18 +--
Source/DataSources/PointGraphics.js | 20 +--
Source/DataSources/PolygonGraphics.js | 40 +++---
Source/DataSources/PolylineGraphics.js | 20 +--
Source/DataSources/PolylineVolumeGraphics.js | 22 +--
Source/DataSources/RectangleGraphics.js | 34 ++---
Source/DataSources/WallGraphics.js | 22 +--
Source/Scene/Axis.js | 134 +++++++++---------
Source/Scene/Cesium3DTileFeature.js | 2 +-
Source/Scene/Cesium3DTilePointFeature.js | 2 +-
Source/Scene/Cesium3DTileset.js | 2 +-
Source/Scene/ImageryLayerFeatureInfo.js | 10 +-
Source/Scene/Scene.js | 7 +-
gulpfile.cjs | 3 +
27 files changed, 349 insertions(+), 341 deletions(-)
diff --git a/Source/Core/BingMapsApi.js b/Source/Core/BingMapsApi.js
index 6b2cbad640b2..4b8ce8feaa5b 100644
--- a/Source/Core/BingMapsApi.js
+++ b/Source/Core/BingMapsApi.js
@@ -19,6 +19,12 @@ var BingMapsApi = {};
*/
BingMapsApi.defaultKey = undefined;
+/**
+ * Gets the key to use to access the Bing Maps API. If the provided
+ * key is defined, it is returned. Otherwise, returns {@link BingMapsApi.defaultKey}.
+ * @param {string|null|undefined} providedKey The provided key to use if defined.
+ * @returns {string|undefined} The Bing Maps API key to use.
+ */
BingMapsApi.getKey = function (providedKey) {
if (defined(providedKey)) {
return providedKey;
diff --git a/Source/DataSources/BillboardGraphics.js b/Source/DataSources/BillboardGraphics.js
index e6cb06452cd9..e96da59d0f90 100644
--- a/Source/DataSources/BillboardGraphics.js
+++ b/Source/DataSources/BillboardGraphics.js
@@ -103,7 +103,7 @@ Object.defineProperties(BillboardGraphics.prototype, {
/**
* Gets or sets the boolean Property specifying the visibility of the billboard.
* @memberof BillboardGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default true
*/
show: createPropertyDescriptor("show"),
@@ -111,7 +111,7 @@ Object.defineProperties(BillboardGraphics.prototype, {
/**
* Gets or sets the Property specifying the Image, URI, or Canvas to use for the billboard.
* @memberof BillboardGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
image: createPropertyDescriptor("image"),
@@ -125,7 +125,7 @@ Object.defineProperties(BillboardGraphics.prototype, {
*
*
* @memberof BillboardGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 1.0
*/
scale: createPropertyDescriptor("scale"),
@@ -145,7 +145,7 @@ Object.defineProperties(BillboardGraphics.prototype, {
*
*
* @memberof BillboardGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default Cartesian2.ZERO
*/
pixelOffset: createPropertyDescriptor("pixelOffset"),
@@ -170,7 +170,7 @@ Object.defineProperties(BillboardGraphics.prototype, {
*
*
* @memberof BillboardGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default Cartesian3.ZERO
*/
eyeOffset: createPropertyDescriptor("eyeOffset"),
@@ -178,7 +178,7 @@ Object.defineProperties(BillboardGraphics.prototype, {
/**
* Gets or sets the Property specifying the {@link HorizontalOrigin}.
* @memberof BillboardGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default HorizontalOrigin.CENTER
*/
horizontalOrigin: createPropertyDescriptor("horizontalOrigin"),
@@ -186,7 +186,7 @@ Object.defineProperties(BillboardGraphics.prototype, {
/**
* Gets or sets the Property specifying the {@link VerticalOrigin}.
* @memberof BillboardGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default VerticalOrigin.CENTER
*/
verticalOrigin: createPropertyDescriptor("verticalOrigin"),
@@ -194,7 +194,7 @@ Object.defineProperties(BillboardGraphics.prototype, {
/**
* Gets or sets the Property specifying the {@link HeightReference}.
* @memberof BillboardGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default HeightReference.NONE
*/
heightReference: createPropertyDescriptor("heightReference"),
@@ -214,7 +214,7 @@ Object.defineProperties(BillboardGraphics.prototype, {
*
*
* @memberof BillboardGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default Color.WHITE
*/
color: createPropertyDescriptor("color"),
@@ -223,7 +223,7 @@ Object.defineProperties(BillboardGraphics.prototype, {
* Gets or sets the numeric Property specifying the rotation of the image
* counter clockwise from the alignedAxis
.
* @memberof BillboardGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 0
*/
rotation: createPropertyDescriptor("rotation"),
@@ -232,7 +232,7 @@ Object.defineProperties(BillboardGraphics.prototype, {
* Gets or sets the {@link Cartesian3} Property specifying the unit vector axis of rotation
* in the fixed frame. When set to Cartesian3.ZERO the rotation is from the top of the screen.
* @memberof BillboardGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default Cartesian3.ZERO
*/
alignedAxis: createPropertyDescriptor("alignedAxis"),
@@ -240,7 +240,7 @@ Object.defineProperties(BillboardGraphics.prototype, {
/**
* Gets or sets the boolean Property specifying if this billboard's size will be measured in meters.
* @memberof BillboardGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default false
*/
sizeInMeters: createPropertyDescriptor("sizeInMeters"),
@@ -249,7 +249,7 @@ Object.defineProperties(BillboardGraphics.prototype, {
* Gets or sets the numeric Property specifying the width of the billboard in pixels.
* When undefined, the native width is used.
* @memberof BillboardGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
width: createPropertyDescriptor("width"),
@@ -257,7 +257,7 @@ Object.defineProperties(BillboardGraphics.prototype, {
* Gets or sets the numeric Property specifying the height of the billboard in pixels.
* When undefined, the native height is used.
* @memberof BillboardGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
height: createPropertyDescriptor("height"),
@@ -268,7 +268,7 @@ Object.defineProperties(BillboardGraphics.prototype, {
* of the specified {@link NearFarScalar#near} and {@link NearFarScalar#far}.
* Outside of these ranges the billboard's scale remains clamped to the nearest bound.
* @memberof BillboardGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
scaleByDistance: createPropertyDescriptor("scaleByDistance"),
@@ -279,7 +279,7 @@ Object.defineProperties(BillboardGraphics.prototype, {
* of the specified {@link NearFarScalar#near} and {@link NearFarScalar#far}.
* Outside of these ranges the billboard's translucency remains clamped to the nearest bound.
* @memberof BillboardGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
translucencyByDistance: createPropertyDescriptor("translucencyByDistance"),
@@ -290,7 +290,7 @@ Object.defineProperties(BillboardGraphics.prototype, {
* of the specified {@link NearFarScalar#near} and {@link NearFarScalar#far}.
* Outside of these ranges the billboard's pixel offset remains clamped to the nearest bound.
* @memberof BillboardGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
pixelOffsetScaleByDistance: createPropertyDescriptor(
"pixelOffsetScaleByDistance"
@@ -301,14 +301,14 @@ Object.defineProperties(BillboardGraphics.prototype, {
* sub-region of the image
to use for the billboard, rather than the entire image,
* measured in pixels from the bottom-left.
* @memberof BillboardGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
imageSubRegion: createPropertyDescriptor("imageSubRegion"),
/**
* Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this billboard will be displayed.
* @memberof BillboardGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
distanceDisplayCondition: createPropertyDescriptor(
"distanceDisplayCondition"
@@ -318,7 +318,7 @@ Object.defineProperties(BillboardGraphics.prototype, {
* Gets or sets the distance from the camera at which to disable the depth test to, for example, prevent clipping against terrain.
* When set to zero, the depth test is always applied. When set to Number.POSITIVE_INFINITY, the depth test is never applied.
* @memberof BillboardGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
disableDepthTestDistance: createPropertyDescriptor(
"disableDepthTestDistance"
diff --git a/Source/DataSources/BoxGraphics.js b/Source/DataSources/BoxGraphics.js
index 981782d7d6fa..db4c4dc2a6d1 100644
--- a/Source/DataSources/BoxGraphics.js
+++ b/Source/DataSources/BoxGraphics.js
@@ -67,7 +67,7 @@ Object.defineProperties(BoxGraphics.prototype, {
/**
* Gets or sets the boolean Property specifying the visibility of the box.
* @memberof BoxGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default true
*/
show: createPropertyDescriptor("show"),
@@ -82,7 +82,7 @@ Object.defineProperties(BoxGraphics.prototype, {
/**
* Gets or sets the Property specifying the {@link HeightReference}.
* @memberof BoxGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default HeightReference.NONE
*/
heightReference: createPropertyDescriptor("heightReference"),
@@ -90,7 +90,7 @@ Object.defineProperties(BoxGraphics.prototype, {
/**
* Gets or sets the boolean Property specifying whether the box is filled with the provided material.
* @memberof BoxGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default true
*/
fill: createPropertyDescriptor("fill"),
@@ -98,7 +98,7 @@ Object.defineProperties(BoxGraphics.prototype, {
/**
* Gets or sets the material used to fill the box.
* @memberof BoxGraphics.prototype
- * @type {MaterialProperty}
+ * @type {MaterialProperty|undefined}
* @default Color.WHITE
*/
material: createMaterialPropertyDescriptor("material"),
@@ -106,7 +106,7 @@ Object.defineProperties(BoxGraphics.prototype, {
/**
* Gets or sets the Property specifying whether the box is outlined.
* @memberof BoxGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default false
*/
outline: createPropertyDescriptor("outline"),
@@ -114,7 +114,7 @@ Object.defineProperties(BoxGraphics.prototype, {
/**
* Gets or sets the Property specifying the {@link Color} of the outline.
* @memberof BoxGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default Color.BLACK
*/
outlineColor: createPropertyDescriptor("outlineColor"),
@@ -122,7 +122,7 @@ Object.defineProperties(BoxGraphics.prototype, {
/**
* Gets or sets the numeric Property specifying the width of the outline.
* @memberof BoxGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 1.0
*/
outlineWidth: createPropertyDescriptor("outlineWidth"),
@@ -131,7 +131,7 @@ Object.defineProperties(BoxGraphics.prototype, {
* Get or sets the enum Property specifying whether the box
* casts or receives shadows from light sources.
* @memberof BoxGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default ShadowMode.DISABLED
*/
shadows: createPropertyDescriptor("shadows"),
@@ -139,7 +139,7 @@ Object.defineProperties(BoxGraphics.prototype, {
/**
* Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this box will be displayed.
* @memberof BoxGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
distanceDisplayCondition: createPropertyDescriptor(
"distanceDisplayCondition"
diff --git a/Source/DataSources/Cesium3DTilesetGraphics.js b/Source/DataSources/Cesium3DTilesetGraphics.js
index 9a76ece06a0e..c826ea25757e 100644
--- a/Source/DataSources/Cesium3DTilesetGraphics.js
+++ b/Source/DataSources/Cesium3DTilesetGraphics.js
@@ -45,7 +45,7 @@ Object.defineProperties(Cesium3DTilesetGraphics.prototype, {
/**
* Gets or sets the boolean Property specifying the visibility of the model.
* @memberof Cesium3DTilesetGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default true
*/
show: createPropertyDescriptor("show"),
@@ -53,14 +53,14 @@ Object.defineProperties(Cesium3DTilesetGraphics.prototype, {
/**
* Gets or sets the string Property specifying the URI of the glTF asset.
* @memberof Cesium3DTilesetGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
uri: createPropertyDescriptor("uri"),
/**
* Gets or sets the maximum screen space error used to drive level of detail refinement.
* @memberof Cesium3DTilesetGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
maximumScreenSpaceError: createPropertyDescriptor("maximumScreenSpaceError"),
});
diff --git a/Source/DataSources/CorridorGraphics.js b/Source/DataSources/CorridorGraphics.js
index bf529b5a75a8..b19f77448e28 100644
--- a/Source/DataSources/CorridorGraphics.js
+++ b/Source/DataSources/CorridorGraphics.js
@@ -94,7 +94,7 @@ Object.defineProperties(CorridorGraphics.prototype, {
/**
* Gets or sets the boolean Property specifying the visibility of the corridor.
* @memberof CorridorGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default true
*/
show: createPropertyDescriptor("show"),
@@ -102,21 +102,21 @@ Object.defineProperties(CorridorGraphics.prototype, {
/**
* Gets or sets a Property specifying the array of {@link Cartesian3} positions that define the centerline of the corridor.
* @memberof CorridorGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
positions: createPropertyDescriptor("positions"),
/**
* Gets or sets the numeric Property specifying the width of the corridor.
* @memberof CorridorGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
width: createPropertyDescriptor("width"),
/**
* Gets or sets the numeric Property specifying the altitude of the corridor.
* @memberof CorridorGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 0.0
*/
height: createPropertyDescriptor("height"),
@@ -124,7 +124,7 @@ Object.defineProperties(CorridorGraphics.prototype, {
/**
* Gets or sets the Property specifying the {@link HeightReference}.
* @memberof CorridorGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default HeightReference.NONE
*/
heightReference: createPropertyDescriptor("heightReference"),
@@ -134,14 +134,14 @@ Object.defineProperties(CorridorGraphics.prototype, {
* Setting this property creates a corridor shaped volume starting at height and ending
* at this altitude.
* @memberof CorridorGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
extrudedHeight: createPropertyDescriptor("extrudedHeight"),
/**
* Gets or sets the Property specifying the extruded {@link HeightReference}.
* @memberof CorridorGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default HeightReference.NONE
*/
extrudedHeightReference: createPropertyDescriptor("extrudedHeightReference"),
@@ -149,7 +149,7 @@ Object.defineProperties(CorridorGraphics.prototype, {
/**
* Gets or sets the {@link CornerType} Property specifying how corners are styled.
* @memberof CorridorGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default CornerType.ROUNDED
*/
cornerType: createPropertyDescriptor("cornerType"),
@@ -157,7 +157,7 @@ Object.defineProperties(CorridorGraphics.prototype, {
/**
* Gets or sets the numeric Property specifying the sampling distance between each latitude and longitude point.
* @memberof CorridorGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default {CesiumMath.RADIANS_PER_DEGREE}
*/
granularity: createPropertyDescriptor("granularity"),
@@ -165,7 +165,7 @@ Object.defineProperties(CorridorGraphics.prototype, {
/**
* Gets or sets the boolean Property specifying whether the corridor is filled with the provided material.
* @memberof CorridorGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default true
*/
fill: createPropertyDescriptor("fill"),
@@ -173,7 +173,7 @@ Object.defineProperties(CorridorGraphics.prototype, {
/**
* Gets or sets the Property specifying the material used to fill the corridor.
* @memberof CorridorGraphics.prototype
- * @type {MaterialProperty}
+ * @type {MaterialProperty|undefined}
* @default Color.WHITE
*/
material: createMaterialPropertyDescriptor("material"),
@@ -181,7 +181,7 @@ Object.defineProperties(CorridorGraphics.prototype, {
/**
* Gets or sets the Property specifying whether the corridor is outlined.
* @memberof CorridorGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default false
*/
outline: createPropertyDescriptor("outline"),
@@ -189,7 +189,7 @@ Object.defineProperties(CorridorGraphics.prototype, {
/**
* Gets or sets the Property specifying the {@link Color} of the outline.
* @memberof CorridorGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default Color.BLACK
*/
outlineColor: createPropertyDescriptor("outlineColor"),
@@ -197,7 +197,7 @@ Object.defineProperties(CorridorGraphics.prototype, {
/**
* Gets or sets the numeric Property specifying the width of the outline.
* @memberof CorridorGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 1.0
*/
outlineWidth: createPropertyDescriptor("outlineWidth"),
@@ -206,7 +206,7 @@ Object.defineProperties(CorridorGraphics.prototype, {
* Get or sets the enum Property specifying whether the corridor
* casts or receives shadows from light sources.
* @memberof CorridorGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default ShadowMode.DISABLED
*/
shadows: createPropertyDescriptor("shadows"),
@@ -214,7 +214,7 @@ Object.defineProperties(CorridorGraphics.prototype, {
/**
* Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this corridor will be displayed.
* @memberof CorridorGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
distanceDisplayCondition: createPropertyDescriptor(
"distanceDisplayCondition"
@@ -223,7 +223,7 @@ Object.defineProperties(CorridorGraphics.prototype, {
/**
* Gets or sets the {@link ClassificationType} Property specifying whether this corridor will classify terrain, 3D Tiles, or both when on the ground.
* @memberof CorridorGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default ClassificationType.BOTH
*/
classificationType: createPropertyDescriptor("classificationType"),
@@ -231,7 +231,7 @@ Object.defineProperties(CorridorGraphics.prototype, {
/**
* Gets or sets the zIndex Property specifying the ordering of the corridor. Only has an effect if the coridor is static and neither height or exturdedHeight are specified.
* @memberof CorridorGraphics.prototype
- * @type {ConstantProperty}
+ * @type {ConstantProperty|undefined}
* @default 0
*/
zIndex: createPropertyDescriptor("zIndex"),
diff --git a/Source/DataSources/CylinderGraphics.js b/Source/DataSources/CylinderGraphics.js
index 0e9733b5ae8e..2972fb4221ca 100644
--- a/Source/DataSources/CylinderGraphics.js
+++ b/Source/DataSources/CylinderGraphics.js
@@ -79,7 +79,7 @@ Object.defineProperties(CylinderGraphics.prototype, {
/**
* Gets or sets the boolean Property specifying the visibility of the cylinder.
* @memberof CylinderGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default true
*/
show: createPropertyDescriptor("show"),
@@ -87,28 +87,28 @@ Object.defineProperties(CylinderGraphics.prototype, {
/**
* Gets or sets the numeric Property specifying the length of the cylinder.
* @memberof CylinderGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
length: createPropertyDescriptor("length"),
/**
* Gets or sets the numeric Property specifying the radius of the top of the cylinder.
* @memberof CylinderGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
topRadius: createPropertyDescriptor("topRadius"),
/**
* Gets or sets the numeric Property specifying the radius of the bottom of the cylinder.
* @memberof CylinderGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
bottomRadius: createPropertyDescriptor("bottomRadius"),
/**
* Gets or sets the Property specifying the {@link HeightReference}.
* @memberof CylinderGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default HeightReference.NONE
*/
heightReference: createPropertyDescriptor("heightReference"),
@@ -116,7 +116,7 @@ Object.defineProperties(CylinderGraphics.prototype, {
/**
* Gets or sets the boolean Property specifying whether the cylinder is filled with the provided material.
* @memberof CylinderGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default true
*/
fill: createPropertyDescriptor("fill"),
@@ -124,7 +124,7 @@ Object.defineProperties(CylinderGraphics.prototype, {
/**
* Gets or sets the Property specifying the material used to fill the cylinder.
* @memberof CylinderGraphics.prototype
- * @type {MaterialProperty}
+ * @type {MaterialProperty|undefined}
* @default Color.WHITE
*/
material: createMaterialPropertyDescriptor("material"),
@@ -132,7 +132,7 @@ Object.defineProperties(CylinderGraphics.prototype, {
/**
* Gets or sets the boolean Property specifying whether the cylinder is outlined.
* @memberof CylinderGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default false
*/
outline: createPropertyDescriptor("outline"),
@@ -140,7 +140,7 @@ Object.defineProperties(CylinderGraphics.prototype, {
/**
* Gets or sets the Property specifying the {@link Color} of the outline.
* @memberof CylinderGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default Color.BLACK
*/
outlineColor: createPropertyDescriptor("outlineColor"),
@@ -148,7 +148,7 @@ Object.defineProperties(CylinderGraphics.prototype, {
/**
* Gets or sets the numeric Property specifying the width of the outline.
* @memberof CylinderGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 1.0
*/
outlineWidth: createPropertyDescriptor("outlineWidth"),
@@ -156,7 +156,7 @@ Object.defineProperties(CylinderGraphics.prototype, {
/**
* Gets or sets the Property specifying the number of vertical lines to draw along the perimeter for the outline.
* @memberof CylinderGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 16
*/
numberOfVerticalLines: createPropertyDescriptor("numberOfVerticalLines"),
@@ -164,7 +164,7 @@ Object.defineProperties(CylinderGraphics.prototype, {
/**
* Gets or sets the Property specifying the number of edges around the perimeter of the cylinder.
* @memberof CylinderGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 128
*/
slices: createPropertyDescriptor("slices"),
@@ -173,7 +173,7 @@ Object.defineProperties(CylinderGraphics.prototype, {
* Get or sets the enum Property specifying whether the cylinder
* casts or receives shadows from light sources.
* @memberof CylinderGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default ShadowMode.DISABLED
*/
shadows: createPropertyDescriptor("shadows"),
@@ -181,7 +181,7 @@ Object.defineProperties(CylinderGraphics.prototype, {
/**
* Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this cylinder will be displayed.
* @memberof CylinderGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
distanceDisplayCondition: createPropertyDescriptor(
"distanceDisplayCondition"
diff --git a/Source/DataSources/EllipseGraphics.js b/Source/DataSources/EllipseGraphics.js
index 56c64aa94697..bb4ccaa45ed8 100644
--- a/Source/DataSources/EllipseGraphics.js
+++ b/Source/DataSources/EllipseGraphics.js
@@ -101,7 +101,7 @@ Object.defineProperties(EllipseGraphics.prototype, {
/**
* Gets or sets the boolean Property specifying the visibility of the ellipse.
* @memberof EllipseGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default true
*/
show: createPropertyDescriptor("show"),
@@ -109,21 +109,21 @@ Object.defineProperties(EllipseGraphics.prototype, {
/**
* Gets or sets the numeric Property specifying the semi-major axis.
* @memberof EllipseGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
semiMajorAxis: createPropertyDescriptor("semiMajorAxis"),
/**
* Gets or sets the numeric Property specifying the semi-minor axis.
* @memberof EllipseGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
semiMinorAxis: createPropertyDescriptor("semiMinorAxis"),
/**
* Gets or sets the numeric Property specifying the altitude of the ellipse.
* @memberof EllipseGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 0.0
*/
height: createPropertyDescriptor("height"),
@@ -131,7 +131,7 @@ Object.defineProperties(EllipseGraphics.prototype, {
/**
* Gets or sets the Property specifying the {@link HeightReference}.
* @memberof EllipseGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default HeightReference.NONE
*/
heightReference: createPropertyDescriptor("heightReference"),
@@ -140,14 +140,14 @@ Object.defineProperties(EllipseGraphics.prototype, {
* Gets or sets the numeric Property specifying the altitude of the ellipse extrusion.
* Setting this property creates volume starting at height and ending at this altitude.
* @memberof EllipseGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
extrudedHeight: createPropertyDescriptor("extrudedHeight"),
/**
* Gets or sets the Property specifying the extruded {@link HeightReference}.
* @memberof EllipseGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default HeightReference.NONE
*/
extrudedHeightReference: createPropertyDescriptor("extrudedHeightReference"),
@@ -155,7 +155,7 @@ Object.defineProperties(EllipseGraphics.prototype, {
/**
* Gets or sets the numeric property specifying the rotation of the ellipse clockwise from north.
* @memberof EllipseGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 0
*/
rotation: createPropertyDescriptor("rotation"),
@@ -163,7 +163,7 @@ Object.defineProperties(EllipseGraphics.prototype, {
/**
* Gets or sets the numeric property specifying the rotation of the ellipse texture counter-clockwise from north.
* @memberof EllipseGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 0
*/
stRotation: createPropertyDescriptor("stRotation"),
@@ -171,7 +171,7 @@ Object.defineProperties(EllipseGraphics.prototype, {
/**
* Gets or sets the numeric Property specifying the angular distance between points on the ellipse.
* @memberof EllipseGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default {CesiumMath.RADIANS_PER_DEGREE}
*/
granularity: createPropertyDescriptor("granularity"),
@@ -179,7 +179,7 @@ Object.defineProperties(EllipseGraphics.prototype, {
/**
* Gets or sets the boolean Property specifying whether the ellipse is filled with the provided material.
* @memberof EllipseGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default true
*/
fill: createPropertyDescriptor("fill"),
@@ -187,7 +187,7 @@ Object.defineProperties(EllipseGraphics.prototype, {
/**
* Gets or sets the Property specifying the material used to fill the ellipse.
* @memberof EllipseGraphics.prototype
- * @type {MaterialProperty}
+ * @type {MaterialProperty|undefined}
* @default Color.WHITE
*/
material: createMaterialPropertyDescriptor("material"),
@@ -195,7 +195,7 @@ Object.defineProperties(EllipseGraphics.prototype, {
/**
* Gets or sets the Property specifying whether the ellipse is outlined.
* @memberof EllipseGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default false
*/
outline: createPropertyDescriptor("outline"),
@@ -203,7 +203,7 @@ Object.defineProperties(EllipseGraphics.prototype, {
/**
* Gets or sets the Property specifying the {@link Color} of the outline.
* @memberof EllipseGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default Color.BLACK
*/
outlineColor: createPropertyDescriptor("outlineColor"),
@@ -211,7 +211,7 @@ Object.defineProperties(EllipseGraphics.prototype, {
/**
* Gets or sets the numeric Property specifying the width of the outline.
* @memberof EllipseGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 1.0
*/
outlineWidth: createPropertyDescriptor("outlineWidth"),
@@ -219,7 +219,7 @@ Object.defineProperties(EllipseGraphics.prototype, {
/**
* Gets or sets the numeric Property specifying the number of vertical lines to draw along the perimeter for the outline.
* @memberof EllipseGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 16
*/
numberOfVerticalLines: createPropertyDescriptor("numberOfVerticalLines"),
@@ -228,7 +228,7 @@ Object.defineProperties(EllipseGraphics.prototype, {
* Get or sets the enum Property specifying whether the ellipse
* casts or receives shadows from light sources.
* @memberof EllipseGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default ShadowMode.DISABLED
*/
shadows: createPropertyDescriptor("shadows"),
@@ -236,7 +236,7 @@ Object.defineProperties(EllipseGraphics.prototype, {
/**
* Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this ellipse will be displayed.
* @memberof EllipseGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
distanceDisplayCondition: createPropertyDescriptor(
"distanceDisplayCondition"
@@ -245,7 +245,7 @@ Object.defineProperties(EllipseGraphics.prototype, {
/**
* Gets or sets the {@link ClassificationType} Property specifying whether this ellipse will classify terrain, 3D Tiles, or both when on the ground.
* @memberof EllipseGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default ClassificationType.BOTH
*/
classificationType: createPropertyDescriptor("classificationType"),
@@ -253,7 +253,7 @@ Object.defineProperties(EllipseGraphics.prototype, {
/**
* Gets or sets the zIndex Property specifying the ellipse ordering. Only has an effect if the ellipse is constant and neither height or extrudedHeight are specified
* @memberof EllipseGraphics.prototype
- * @type {ConstantProperty}
+ * @type {ConstantProperty|undefined}
* @default 0
*/
zIndex: createPropertyDescriptor("zIndex"),
diff --git a/Source/DataSources/EllipsoidGraphics.js b/Source/DataSources/EllipsoidGraphics.js
index 262f65c0cea1..ef2ad391be52 100644
--- a/Source/DataSources/EllipsoidGraphics.js
+++ b/Source/DataSources/EllipsoidGraphics.js
@@ -92,7 +92,7 @@ Object.defineProperties(EllipsoidGraphics.prototype, {
/**
* Gets or sets the boolean Property specifying the visibility of the ellipsoid.
* @memberof EllipsoidGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default true
*/
show: createPropertyDescriptor("show"),
@@ -100,14 +100,14 @@ Object.defineProperties(EllipsoidGraphics.prototype, {
/**
* Gets or sets the {@link Cartesian3} {@link Property} specifying the radii of the ellipsoid.
* @memberof EllipsoidGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
radii: createPropertyDescriptor("radii"),
/**
* Gets or sets the {@link Cartesian3} {@link Property} specifying the inner radii of the ellipsoid.
* @memberof EllipsoidGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default radii
*/
innerRadii: createPropertyDescriptor("innerRadii"),
@@ -115,7 +115,7 @@ Object.defineProperties(EllipsoidGraphics.prototype, {
/**
* Gets or sets the Property specifying the minimum clock angle of the ellipsoid.
* @memberof EllipsoidGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 0.0
*/
minimumClock: createPropertyDescriptor("minimumClock"),
@@ -123,7 +123,7 @@ Object.defineProperties(EllipsoidGraphics.prototype, {
/**
* Gets or sets the Property specifying the maximum clock angle of the ellipsoid.
* @memberof EllipsoidGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 2*PI
*/
maximumClock: createPropertyDescriptor("maximumClock"),
@@ -131,7 +131,7 @@ Object.defineProperties(EllipsoidGraphics.prototype, {
/**
* Gets or sets the Property specifying the minimum cone angle of the ellipsoid.
* @memberof EllipsoidGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 0.0
*/
minimumCone: createPropertyDescriptor("minimumCone"),
@@ -139,7 +139,7 @@ Object.defineProperties(EllipsoidGraphics.prototype, {
/**
* Gets or sets the Property specifying the maximum cone angle of the ellipsoid.
* @memberof EllipsoidGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default PI
*/
maximumCone: createPropertyDescriptor("maximumCone"),
@@ -147,7 +147,7 @@ Object.defineProperties(EllipsoidGraphics.prototype, {
/**
* Gets or sets the Property specifying the {@link HeightReference}.
* @memberof EllipsoidGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default HeightReference.NONE
*/
heightReference: createPropertyDescriptor("heightReference"),
@@ -155,7 +155,7 @@ Object.defineProperties(EllipsoidGraphics.prototype, {
/**
* Gets or sets the boolean Property specifying whether the ellipsoid is filled with the provided material.
* @memberof EllipsoidGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default true
*/
fill: createPropertyDescriptor("fill"),
@@ -171,7 +171,7 @@ Object.defineProperties(EllipsoidGraphics.prototype, {
/**
* Gets or sets the Property specifying whether the ellipsoid is outlined.
* @memberof EllipsoidGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default false
*/
outline: createPropertyDescriptor("outline"),
@@ -179,7 +179,7 @@ Object.defineProperties(EllipsoidGraphics.prototype, {
/**
* Gets or sets the Property specifying the {@link Color} of the outline.
* @memberof EllipsoidGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default Color.BLACK
*/
outlineColor: createPropertyDescriptor("outlineColor"),
@@ -187,7 +187,7 @@ Object.defineProperties(EllipsoidGraphics.prototype, {
/**
* Gets or sets the numeric Property specifying the width of the outline.
* @memberof EllipsoidGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 1.0
*/
outlineWidth: createPropertyDescriptor("outlineWidth"),
@@ -195,7 +195,7 @@ Object.defineProperties(EllipsoidGraphics.prototype, {
/**
* Gets or sets the Property specifying the number of stacks.
* @memberof EllipsoidGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 64
*/
stackPartitions: createPropertyDescriptor("stackPartitions"),
@@ -203,7 +203,7 @@ Object.defineProperties(EllipsoidGraphics.prototype, {
/**
* Gets or sets the Property specifying the number of radial slices per 360 degrees.
* @memberof EllipsoidGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 64
*/
slicePartitions: createPropertyDescriptor("slicePartitions"),
@@ -211,7 +211,7 @@ Object.defineProperties(EllipsoidGraphics.prototype, {
/**
* Gets or sets the Property specifying the number of samples per outline ring, determining the granularity of the curvature.
* @memberof EllipsoidGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 128
*/
subdivisions: createPropertyDescriptor("subdivisions"),
@@ -220,7 +220,7 @@ Object.defineProperties(EllipsoidGraphics.prototype, {
* Get or sets the enum Property specifying whether the ellipsoid
* casts or receives shadows from light sources.
* @memberof EllipsoidGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default ShadowMode.DISABLED
*/
shadows: createPropertyDescriptor("shadows"),
@@ -228,7 +228,7 @@ Object.defineProperties(EllipsoidGraphics.prototype, {
/**
* Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this ellipsoid will be displayed.
* @memberof EllipsoidGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
distanceDisplayCondition: createPropertyDescriptor(
"distanceDisplayCondition"
diff --git a/Source/DataSources/Entity.js b/Source/DataSources/Entity.js
index 119711736bce..c0a8097b1ea0 100644
--- a/Source/DataSources/Entity.js
+++ b/Source/DataSources/Entity.js
@@ -220,7 +220,7 @@ Object.defineProperties(Entity.prototype, {
* If availability exists, the objects other properties will only
* provide valid data if queried within the given interval.
* @memberof Entity.prototype
- * @type {TimeIntervalCollection}
+ * @type {TimeIntervalCollection|undefined}
*/
availability: createRawPropertyDescriptor("availability"),
/**
@@ -249,7 +249,7 @@ Object.defineProperties(Entity.prototype, {
* Gets or sets the name of the object. The name is intended for end-user
* consumption and does not need to be unique.
* @memberof Entity.prototype
- * @type {String}
+ * @type {String|undefined}
*/
name: createRawPropertyDescriptor("name"),
/**
@@ -302,7 +302,7 @@ Object.defineProperties(Entity.prototype, {
/**
* Gets or sets the parent object.
* @memberof Entity.prototype
- * @type {Entity}
+ * @type {Entity|undefined}
*/
parent: {
get: function () {
@@ -338,7 +338,7 @@ Object.defineProperties(Entity.prototype, {
/**
* Gets the names of all properties registered on this instance.
* @memberof Entity.prototype
- * @type {Array}
+ * @type {string[]}
*/
propertyNames: {
get: function () {
@@ -348,103 +348,103 @@ Object.defineProperties(Entity.prototype, {
/**
* Gets or sets the billboard.
* @memberof Entity.prototype
- * @type {BillboardGraphics}
+ * @type {BillboardGraphics|undefined}
*/
billboard: createPropertyTypeDescriptor("billboard", BillboardGraphics),
/**
* Gets or sets the box.
* @memberof Entity.prototype
- * @type {BoxGraphics}
+ * @type {BoxGraphics|undefined}
*/
box: createPropertyTypeDescriptor("box", BoxGraphics),
/**
* Gets or sets the corridor.
* @memberof Entity.prototype
- * @type {CorridorGraphics}
+ * @type {CorridorGraphics|undefined}
*/
corridor: createPropertyTypeDescriptor("corridor", CorridorGraphics),
/**
* Gets or sets the cylinder.
* @memberof Entity.prototype
- * @type {CylinderGraphics}
+ * @type {CylinderGraphics|undefined}
*/
cylinder: createPropertyTypeDescriptor("cylinder", CylinderGraphics),
/**
* Gets or sets the description.
* @memberof Entity.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
description: createPropertyDescriptor("description"),
/**
* Gets or sets the ellipse.
* @memberof Entity.prototype
- * @type {EllipseGraphics}
+ * @type {EllipseGraphics|undefined}
*/
ellipse: createPropertyTypeDescriptor("ellipse", EllipseGraphics),
/**
* Gets or sets the ellipsoid.
* @memberof Entity.prototype
- * @type {EllipsoidGraphics}
+ * @type {EllipsoidGraphics|undefined}
*/
ellipsoid: createPropertyTypeDescriptor("ellipsoid", EllipsoidGraphics),
/**
* Gets or sets the label.
* @memberof Entity.prototype
- * @type {LabelGraphics}
+ * @type {LabelGraphics|undefined}
*/
label: createPropertyTypeDescriptor("label", LabelGraphics),
/**
* Gets or sets the model.
* @memberof Entity.prototype
- * @type {ModelGraphics}
+ * @type {ModelGraphics|undefined}
*/
model: createPropertyTypeDescriptor("model", ModelGraphics),
/**
* Gets or sets the tileset.
* @memberof Entity.prototype
- * @type {Cesium3DTilesetGraphics}
+ * @type {Cesium3DTilesetGraphics|undefined}
*/
tileset: createPropertyTypeDescriptor("tileset", Cesium3DTilesetGraphics),
/**
* Gets or sets the orientation.
* @memberof Entity.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
orientation: createPropertyDescriptor("orientation"),
/**
* Gets or sets the path.
* @memberof Entity.prototype
- * @type {PathGraphics}
+ * @type {PathGraphics|undefined}
*/
path: createPropertyTypeDescriptor("path", PathGraphics),
/**
* Gets or sets the plane.
* @memberof Entity.prototype
- * @type {PlaneGraphics}
+ * @type {PlaneGraphics|undefined}
*/
plane: createPropertyTypeDescriptor("plane", PlaneGraphics),
/**
* Gets or sets the point graphic.
* @memberof Entity.prototype
- * @type {PointGraphics}
+ * @type {PointGraphics|undefined}
*/
point: createPropertyTypeDescriptor("point", PointGraphics),
/**
* Gets or sets the polygon.
* @memberof Entity.prototype
- * @type {PolygonGraphics}
+ * @type {PolygonGraphics|undefined}
*/
polygon: createPropertyTypeDescriptor("polygon", PolygonGraphics),
/**
* Gets or sets the polyline.
* @memberof Entity.prototype
- * @type {PolylineGraphics}
+ * @type {PolylineGraphics|undefined}
*/
polyline: createPropertyTypeDescriptor("polyline", PolylineGraphics),
/**
* Gets or sets the polyline volume.
* @memberof Entity.prototype
- * @type {PolylineVolumeGraphics}
+ * @type {PolylineVolumeGraphics|undefined}
*/
polylineVolume: createPropertyTypeDescriptor(
"polylineVolume",
@@ -453,19 +453,19 @@ Object.defineProperties(Entity.prototype, {
/**
* Gets or sets the bag of arbitrary properties associated with this entity.
* @memberof Entity.prototype
- * @type {PropertyBag}
+ * @type {PropertyBag|undefined}
*/
properties: createPropertyTypeDescriptor("properties", PropertyBag),
/**
* Gets or sets the position.
* @memberof Entity.prototype
- * @type {PositionProperty}
+ * @type {PositionProperty|undefined}
*/
position: createPositionPropertyDescriptor("position"),
/**
* Gets or sets the rectangle.
* @memberof Entity.prototype
- * @type {RectangleGraphics}
+ * @type {RectangleGraphics|undefined}
*/
rectangle: createPropertyTypeDescriptor("rectangle", RectangleGraphics),
/**
@@ -473,13 +473,13 @@ Object.defineProperties(Entity.prototype, {
* The offset is typically defined in the east-north-up reference frame,
* but may be another frame depending on the object's velocity.
* @memberof Entity.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
viewFrom: createPropertyDescriptor("viewFrom"),
/**
* Gets or sets the wall.
* @memberof Entity.prototype
- * @type {WallGraphics}
+ * @type {WallGraphics|undefined}
*/
wall: createPropertyTypeDescriptor("wall", WallGraphics),
});
diff --git a/Source/DataSources/KmlDataSource.js b/Source/DataSources/KmlDataSource.js
index 3a0d357dc78b..7cecb01405b4 100644
--- a/Source/DataSources/KmlDataSource.js
+++ b/Source/DataSources/KmlDataSource.js
@@ -3434,7 +3434,7 @@ function KmlDataSource(options) {
* Creates a Promise to a new instance loaded with the provided KML data.
*
* @param {Resource|String|Document|Blob} data A url, parsed KML document, or Blob containing binary KMZ data or a parsed KML document.
- * @param {Object} options An object with the following properties:
+ * @param {Object} [options] An object with the following properties:
* @param {Camera} options.camera The camera that is used for viewRefreshModes and sending camera properties to network links.
* @param {HTMLCanvasElement} options.canvas The canvas that is used for sending viewer properties to network links.
* @param {String} [options.sourceUri] Overrides the url to use for resolving relative links and other KML network features.
diff --git a/Source/DataSources/LabelGraphics.js b/Source/DataSources/LabelGraphics.js
index 0684a8e9f1b0..18502e83b813 100644
--- a/Source/DataSources/LabelGraphics.js
+++ b/Source/DataSources/LabelGraphics.js
@@ -106,7 +106,7 @@ Object.defineProperties(LabelGraphics.prototype, {
/**
* Gets or sets the boolean Property specifying the visibility of the label.
* @memberof LabelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
show: createPropertyDescriptor("show"),
@@ -114,14 +114,14 @@ Object.defineProperties(LabelGraphics.prototype, {
* Gets or sets the string Property specifying the text of the label.
* Explicit newlines '\n' are supported.
* @memberof LabelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
text: createPropertyDescriptor("text"),
/**
* Gets or sets the string Property specifying the font in CSS syntax.
* @memberof LabelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/font|CSS font on MDN}
*/
font: createPropertyDescriptor("font"),
@@ -129,7 +129,7 @@ Object.defineProperties(LabelGraphics.prototype, {
/**
* Gets or sets the Property specifying the {@link LabelStyle}.
* @memberof LabelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
style: createPropertyDescriptor("style"),
@@ -144,7 +144,7 @@ Object.defineProperties(LabelGraphics.prototype, {
*
*
* @memberof LabelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 1.0
*/
scale: createPropertyDescriptor("scale"),
@@ -152,7 +152,7 @@ Object.defineProperties(LabelGraphics.prototype, {
/**
* Gets or sets the boolean Property specifying the visibility of the background behind the label.
* @memberof LabelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default false
*/
showBackground: createPropertyDescriptor("showBackground"),
@@ -160,7 +160,7 @@ Object.defineProperties(LabelGraphics.prototype, {
/**
* Gets or sets the Property specifying the background {@link Color}.
* @memberof LabelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default new Color(0.165, 0.165, 0.165, 0.8)
*/
backgroundColor: createPropertyDescriptor("backgroundColor"),
@@ -169,7 +169,7 @@ Object.defineProperties(LabelGraphics.prototype, {
* Gets or sets the {@link Cartesian2} Property specifying the label's horizontal and vertical
* background padding in pixels.
* @memberof LabelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default new Cartesian2(7, 5)
*/
backgroundPadding: createPropertyDescriptor("backgroundPadding"),
@@ -189,7 +189,7 @@ Object.defineProperties(LabelGraphics.prototype, {
*
*
* @memberof LabelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default Cartesian2.ZERO
*/
pixelOffset: createPropertyDescriptor("pixelOffset"),
@@ -214,7 +214,7 @@ Object.defineProperties(LabelGraphics.prototype, {
*
*
* @memberof LabelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default Cartesian3.ZERO
*/
eyeOffset: createPropertyDescriptor("eyeOffset"),
@@ -222,21 +222,21 @@ Object.defineProperties(LabelGraphics.prototype, {
/**
* Gets or sets the Property specifying the {@link HorizontalOrigin}.
* @memberof LabelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
horizontalOrigin: createPropertyDescriptor("horizontalOrigin"),
/**
* Gets or sets the Property specifying the {@link VerticalOrigin}.
* @memberof LabelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
verticalOrigin: createPropertyDescriptor("verticalOrigin"),
/**
* Gets or sets the Property specifying the {@link HeightReference}.
* @memberof LabelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default HeightReference.NONE
*/
heightReference: createPropertyDescriptor("heightReference"),
@@ -244,21 +244,21 @@ Object.defineProperties(LabelGraphics.prototype, {
/**
* Gets or sets the Property specifying the fill {@link Color}.
* @memberof LabelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
fillColor: createPropertyDescriptor("fillColor"),
/**
* Gets or sets the Property specifying the outline {@link Color}.
* @memberof LabelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
outlineColor: createPropertyDescriptor("outlineColor"),
/**
* Gets or sets the numeric Property specifying the outline width.
* @memberof LabelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
outlineWidth: createPropertyDescriptor("outlineWidth"),
@@ -269,7 +269,7 @@ Object.defineProperties(LabelGraphics.prototype, {
* of the specified {@link NearFarScalar#near} and {@link NearFarScalar#far}.
* Outside of these ranges the label's translucency remains clamped to the nearest bound.
* @memberof LabelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
translucencyByDistance: createPropertyDescriptor("translucencyByDistance"),
@@ -280,7 +280,7 @@ Object.defineProperties(LabelGraphics.prototype, {
* of the specified {@link NearFarScalar#near} and {@link NearFarScalar#far}.
* Outside of these ranges the label's pixel offset remains clamped to the nearest bound.
* @memberof LabelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
pixelOffsetScaleByDistance: createPropertyDescriptor(
"pixelOffsetScaleByDistance"
@@ -294,14 +294,14 @@ Object.defineProperties(LabelGraphics.prototype, {
* Outside of these ranges the label's scale remains clamped to the nearest bound. If undefined,
* scaleByDistance will be disabled.
* @memberof LabelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
scaleByDistance: createPropertyDescriptor("scaleByDistance"),
/**
* Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this label will be displayed.
* @memberof LabelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
distanceDisplayCondition: createPropertyDescriptor(
"distanceDisplayCondition"
@@ -311,7 +311,7 @@ Object.defineProperties(LabelGraphics.prototype, {
* Gets or sets the distance from the camera at which to disable the depth test to, for example, prevent clipping against terrain.
* When set to zero, the depth test is always applied. When set to Number.POSITIVE_INFINITY, the depth test is never applied.
* @memberof LabelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
disableDepthTestDistance: createPropertyDescriptor(
"disableDepthTestDistance"
diff --git a/Source/DataSources/ModelGraphics.js b/Source/DataSources/ModelGraphics.js
index 94a52176a947..feb714d52cbb 100644
--- a/Source/DataSources/ModelGraphics.js
+++ b/Source/DataSources/ModelGraphics.js
@@ -119,7 +119,7 @@ Object.defineProperties(ModelGraphics.prototype, {
/**
* Gets or sets the boolean Property specifying the visibility of the model.
* @memberof ModelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default true
*/
show: createPropertyDescriptor("show"),
@@ -127,7 +127,7 @@ Object.defineProperties(ModelGraphics.prototype, {
/**
* Gets or sets the string Property specifying the URI of the glTF asset.
* @memberof ModelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
uri: createPropertyDescriptor("uri"),
@@ -136,7 +136,7 @@ Object.defineProperties(ModelGraphics.prototype, {
* for this model. Values greater than 1.0 increase the size of the model while
* values less than 1.0 decrease it.
* @memberof ModelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 1.0
*/
scale: createPropertyDescriptor("scale"),
@@ -147,7 +147,7 @@ Object.defineProperties(ModelGraphics.prototype, {
* a model is visible even when the viewer zooms out. When 0.0
,
* no minimum size is enforced.
* @memberof ModelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 0.0
*/
minimumPixelSize: createPropertyDescriptor("minimumPixelSize"),
@@ -157,7 +157,7 @@ Object.defineProperties(ModelGraphics.prototype, {
* size of a model. This property is used as an upper limit for
* {@link ModelGraphics#minimumPixelSize}.
* @memberof ModelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
maximumScale: createPropertyDescriptor("maximumScale"),
@@ -165,7 +165,7 @@ Object.defineProperties(ModelGraphics.prototype, {
* Get or sets the boolean Property specifying whether textures
* may continue to stream in after the model is loaded.
* @memberof ModelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
incrementallyLoadTextures: createPropertyDescriptor(
"incrementallyLoadTextures"
@@ -174,7 +174,7 @@ Object.defineProperties(ModelGraphics.prototype, {
/**
* Gets or sets the boolean Property specifying if glTF animations should be run.
* @memberof ModelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default true
*/
runAnimations: createPropertyDescriptor("runAnimations"),
@@ -182,7 +182,7 @@ Object.defineProperties(ModelGraphics.prototype, {
/**
* Gets or sets the boolean Property specifying if glTF animations should hold the last pose for time durations with no keyframes.
* @memberof ModelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default true
*/
clampAnimations: createPropertyDescriptor("clampAnimations"),
@@ -191,7 +191,7 @@ Object.defineProperties(ModelGraphics.prototype, {
* Get or sets the enum Property specifying whether the model
* casts or receives shadows from light sources.
* @memberof ModelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default ShadowMode.ENABLED
*/
shadows: createPropertyDescriptor("shadows"),
@@ -199,7 +199,7 @@ Object.defineProperties(ModelGraphics.prototype, {
/**
* Gets or sets the Property specifying the {@link HeightReference}.
* @memberof ModelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default HeightReference.NONE
*/
heightReference: createPropertyDescriptor("heightReference"),
@@ -207,7 +207,7 @@ Object.defineProperties(ModelGraphics.prototype, {
/**
* Gets or sets the Property specifying the {@link Color} of the silhouette.
* @memberof ModelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default Color.RED
*/
silhouetteColor: createPropertyDescriptor("silhouetteColor"),
@@ -215,7 +215,7 @@ Object.defineProperties(ModelGraphics.prototype, {
/**
* Gets or sets the numeric Property specifying the size of the silhouette in pixels.
* @memberof ModelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 0.0
*/
silhouetteSize: createPropertyDescriptor("silhouetteSize"),
@@ -223,7 +223,7 @@ Object.defineProperties(ModelGraphics.prototype, {
/**
* Gets or sets the Property specifying the {@link Color} that blends with the model's rendered color.
* @memberof ModelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default Color.WHITE
*/
color: createPropertyDescriptor("color"),
@@ -231,7 +231,7 @@ Object.defineProperties(ModelGraphics.prototype, {
/**
* Gets or sets the enum Property specifying how the color blends with the model.
* @memberof ModelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default ColorBlendMode.HIGHLIGHT
*/
colorBlendMode: createPropertyDescriptor("colorBlendMode"),
@@ -241,7 +241,7 @@ Object.defineProperties(ModelGraphics.prototype, {
* A value of 0.0 results in the model's rendered color while a value of 1.0 results in a solid color, with
* any value in-between resulting in a mix of the two.
* @memberof ModelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 0.5
*/
colorBlendAmount: createPropertyDescriptor("colorBlendAmount"),
@@ -249,7 +249,7 @@ Object.defineProperties(ModelGraphics.prototype, {
/**
* A property specifying the {@link Cartesian2} used to scale the diffuse and specular image-based lighting contribution to the final color.
* @memberof ModelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
imageBasedLightingFactor: createPropertyDescriptor(
"imageBasedLightingFactor"
@@ -258,14 +258,14 @@ Object.defineProperties(ModelGraphics.prototype, {
/**
* A property specifying the {@link Cartesian3} light color when shading the model. When undefined
the scene's light color is used instead.
* @memberOf ModelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
lightColor: createPropertyDescriptor("lightColor"),
/**
* Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this model will be displayed.
* @memberof ModelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
distanceDisplayCondition: createPropertyDescriptor(
"distanceDisplayCondition"
@@ -299,7 +299,7 @@ Object.defineProperties(ModelGraphics.prototype, {
/**
* A property specifying the {@link ClippingPlaneCollection} used to selectively disable rendering the model.
* @memberof ModelGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
clippingPlanes: createPropertyDescriptor("clippingPlanes"),
});
diff --git a/Source/DataSources/PathGraphics.js b/Source/DataSources/PathGraphics.js
index b2d36c1ba7c5..ba377b917498 100644
--- a/Source/DataSources/PathGraphics.js
+++ b/Source/DataSources/PathGraphics.js
@@ -56,7 +56,7 @@ Object.defineProperties(PathGraphics.prototype, {
/**
* Gets or sets the boolean Property specifying the visibility of the path.
* @memberof PathGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default true
*/
show: createPropertyDescriptor("show"),
@@ -64,21 +64,21 @@ Object.defineProperties(PathGraphics.prototype, {
/**
* Gets or sets the Property specifying the number of seconds in front of the object to show.
* @memberof PathGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
leadTime: createPropertyDescriptor("leadTime"),
/**
* Gets or sets the Property specifying the number of seconds behind the object to show.
* @memberof PathGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
trailTime: createPropertyDescriptor("trailTime"),
/**
* Gets or sets the numeric Property specifying the width in pixels.
* @memberof PathGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 1.0
*/
width: createPropertyDescriptor("width"),
@@ -86,7 +86,7 @@ Object.defineProperties(PathGraphics.prototype, {
/**
* Gets or sets the Property specifying the maximum number of seconds to step when sampling the position.
* @memberof PathGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 60
*/
resolution: createPropertyDescriptor("resolution"),
@@ -102,7 +102,7 @@ Object.defineProperties(PathGraphics.prototype, {
/**
* Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this path will be displayed.
* @memberof PathGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
distanceDisplayCondition: createPropertyDescriptor(
"distanceDisplayCondition"
diff --git a/Source/DataSources/PlaneGraphics.js b/Source/DataSources/PlaneGraphics.js
index 3cd6e2a33f54..610733a723b6 100644
--- a/Source/DataSources/PlaneGraphics.js
+++ b/Source/DataSources/PlaneGraphics.js
@@ -67,7 +67,7 @@ Object.defineProperties(PlaneGraphics.prototype, {
/**
* Gets or sets the boolean Property specifying the visibility of the plane.
* @memberof PlaneGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default true
*/
show: createPropertyDescriptor("show"),
@@ -76,7 +76,7 @@ Object.defineProperties(PlaneGraphics.prototype, {
* Gets or sets the {@link Plane} Property specifying the normal and distance of the plane.
*
* @memberof PlaneGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
plane: createPropertyDescriptor("plane"),
@@ -84,14 +84,14 @@ Object.defineProperties(PlaneGraphics.prototype, {
* Gets or sets the {@link Cartesian2} Property specifying the width and height of the plane.
*
* @memberof PlaneGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
dimensions: createPropertyDescriptor("dimensions"),
/**
* Gets or sets the boolean Property specifying whether the plane is filled with the provided material.
* @memberof PlaneGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default true
*/
fill: createPropertyDescriptor("fill"),
@@ -107,7 +107,7 @@ Object.defineProperties(PlaneGraphics.prototype, {
/**
* Gets or sets the Property specifying whether the plane is outlined.
* @memberof PlaneGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default false
*/
outline: createPropertyDescriptor("outline"),
@@ -115,7 +115,7 @@ Object.defineProperties(PlaneGraphics.prototype, {
/**
* Gets or sets the Property specifying the {@link Color} of the outline.
* @memberof PlaneGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default Color.BLACK
*/
outlineColor: createPropertyDescriptor("outlineColor"),
@@ -123,7 +123,7 @@ Object.defineProperties(PlaneGraphics.prototype, {
/**
* Gets or sets the numeric Property specifying the width of the outline.
* @memberof PlaneGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 1.0
*/
outlineWidth: createPropertyDescriptor("outlineWidth"),
@@ -132,7 +132,7 @@ Object.defineProperties(PlaneGraphics.prototype, {
* Get or sets the enum Property specifying whether the plane
* casts or receives shadows from light sources.
* @memberof PlaneGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default ShadowMode.DISABLED
*/
shadows: createPropertyDescriptor("shadows"),
@@ -140,7 +140,7 @@ Object.defineProperties(PlaneGraphics.prototype, {
/**
* Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this plane will be displayed.
* @memberof PlaneGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
distanceDisplayCondition: createPropertyDescriptor(
"distanceDisplayCondition"
diff --git a/Source/DataSources/PointGraphics.js b/Source/DataSources/PointGraphics.js
index 04404e86a8a6..eff6d916eeec 100644
--- a/Source/DataSources/PointGraphics.js
+++ b/Source/DataSources/PointGraphics.js
@@ -65,7 +65,7 @@ Object.defineProperties(PointGraphics.prototype, {
/**
* Gets or sets the boolean Property specifying the visibility of the point.
* @memberof PointGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default true
*/
show: createPropertyDescriptor("show"),
@@ -73,7 +73,7 @@ Object.defineProperties(PointGraphics.prototype, {
/**
* Gets or sets the numeric Property specifying the size in pixels.
* @memberof PointGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 1
*/
pixelSize: createPropertyDescriptor("pixelSize"),
@@ -81,7 +81,7 @@ Object.defineProperties(PointGraphics.prototype, {
/**
* Gets or sets the Property specifying the {@link HeightReference}.
* @memberof PointGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default HeightReference.NONE
*/
heightReference: createPropertyDescriptor("heightReference"),
@@ -89,7 +89,7 @@ Object.defineProperties(PointGraphics.prototype, {
/**
* Gets or sets the Property specifying the {@link Color} of the point.
* @memberof PointGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default Color.WHITE
*/
color: createPropertyDescriptor("color"),
@@ -97,7 +97,7 @@ Object.defineProperties(PointGraphics.prototype, {
/**
* Gets or sets the Property specifying the {@link Color} of the outline.
* @memberof PointGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default Color.BLACK
*/
outlineColor: createPropertyDescriptor("outlineColor"),
@@ -105,7 +105,7 @@ Object.defineProperties(PointGraphics.prototype, {
/**
* Gets or sets the numeric Property specifying the the outline width in pixels.
* @memberof PointGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 0
*/
outlineWidth: createPropertyDescriptor("outlineWidth"),
@@ -114,7 +114,7 @@ Object.defineProperties(PointGraphics.prototype, {
* Gets or sets the {@link NearFarScalar} Property used to scale the point based on distance.
* If undefined, a constant size is used.
* @memberof PointGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
scaleByDistance: createPropertyDescriptor("scaleByDistance"),
@@ -125,14 +125,14 @@ Object.defineProperties(PointGraphics.prototype, {
* of the specified {@link NearFarScalar#near} and {@link NearFarScalar#far}.
* Outside of these ranges the points's translucency remains clamped to the nearest bound.
* @memberof PointGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
translucencyByDistance: createPropertyDescriptor("translucencyByDistance"),
/**
* Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this point will be displayed.
* @memberof PointGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
distanceDisplayCondition: createPropertyDescriptor(
"distanceDisplayCondition"
@@ -142,7 +142,7 @@ Object.defineProperties(PointGraphics.prototype, {
* Gets or sets the distance from the camera at which to disable the depth test to, for example, prevent clipping against terrain.
* When set to zero, the depth test is always applied. When set to Number.POSITIVE_INFINITY, the depth test is never applied.
* @memberof PointGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
disableDepthTestDistance: createPropertyDescriptor(
"disableDepthTestDistance"
diff --git a/Source/DataSources/PolygonGraphics.js b/Source/DataSources/PolygonGraphics.js
index 72f3d8a88751..c3fb0b10d854 100644
--- a/Source/DataSources/PolygonGraphics.js
+++ b/Source/DataSources/PolygonGraphics.js
@@ -114,7 +114,7 @@ Object.defineProperties(PolygonGraphics.prototype, {
/**
* Gets or sets the boolean Property specifying the visibility of the polygon.
* @memberof PolygonGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default true
*/
show: createPropertyDescriptor("show"),
@@ -122,7 +122,7 @@ Object.defineProperties(PolygonGraphics.prototype, {
/**
* Gets or sets the Property specifying the {@link PolygonHierarchy}.
* @memberof PolygonGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
hierarchy: createPropertyDescriptor(
"hierarchy",
@@ -133,7 +133,7 @@ Object.defineProperties(PolygonGraphics.prototype, {
/**
* Gets or sets the numeric Property specifying the constant altitude of the polygon.
* @memberof PolygonGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 0.0
*/
height: createPropertyDescriptor("height"),
@@ -141,7 +141,7 @@ Object.defineProperties(PolygonGraphics.prototype, {
/**
* Gets or sets the Property specifying the {@link HeightReference}.
* @memberof PolygonGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default HeightReference.NONE
*/
heightReference: createPropertyDescriptor("heightReference"),
@@ -151,14 +151,14 @@ Object.defineProperties(PolygonGraphics.prototype, {
* If {@link PolygonGraphics#perPositionHeight} is false, the volume starts at {@link PolygonGraphics#height} and ends at this altitude.
* If {@link PolygonGraphics#perPositionHeight} is true, the volume starts at the height of each {@link PolygonGraphics#hierarchy} position and ends at this altitude.
* @memberof PolygonGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
extrudedHeight: createPropertyDescriptor("extrudedHeight"),
/**
* Gets or sets the Property specifying the extruded {@link HeightReference}.
* @memberof PolygonGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default HeightReference.NONE
*/
extrudedHeightReference: createPropertyDescriptor("extrudedHeightReference"),
@@ -166,7 +166,7 @@ Object.defineProperties(PolygonGraphics.prototype, {
/**
* Gets or sets the numeric property specifying the rotation of the polygon texture counter-clockwise from north.
* @memberof PolygonGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 0
*/
stRotation: createPropertyDescriptor("stRotation"),
@@ -174,7 +174,7 @@ Object.defineProperties(PolygonGraphics.prototype, {
/**
* Gets or sets the numeric Property specifying the angular distance between points on the polygon.
* @memberof PolygonGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default {CesiumMath.RADIANS_PER_DEGREE}
*/
granularity: createPropertyDescriptor("granularity"),
@@ -182,7 +182,7 @@ Object.defineProperties(PolygonGraphics.prototype, {
/**
* Gets or sets the boolean Property specifying whether the polygon is filled with the provided material.
* @memberof PolygonGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default true
*/
fill: createPropertyDescriptor("fill"),
@@ -198,7 +198,7 @@ Object.defineProperties(PolygonGraphics.prototype, {
/**
* Gets or sets the Property specifying whether the polygon is outlined.
* @memberof PolygonGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default false
*/
outline: createPropertyDescriptor("outline"),
@@ -206,7 +206,7 @@ Object.defineProperties(PolygonGraphics.prototype, {
/**
* Gets or sets the Property specifying the {@link Color} of the outline.
* @memberof PolygonGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default Color.BLACK
*/
outlineColor: createPropertyDescriptor("outlineColor"),
@@ -214,7 +214,7 @@ Object.defineProperties(PolygonGraphics.prototype, {
/**
* Gets or sets the numeric Property specifying the width of the outline.
* @memberof PolygonGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 1.0
*/
outlineWidth: createPropertyDescriptor("outlineWidth"),
@@ -224,28 +224,28 @@ Object.defineProperties(PolygonGraphics.prototype, {
* If true, the shape will have non-uniform altitude defined by the height of each {@link PolygonGraphics#hierarchy} position.
* If false, the shape will have a constant altitude as specified by {@link PolygonGraphics#height}.
* @memberof PolygonGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
perPositionHeight: createPropertyDescriptor("perPositionHeight"),
/**
* Gets or sets a boolean specifying whether or not the top of an extruded polygon is included.
* @memberof PolygonGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
closeTop: createPropertyDescriptor("closeTop"),
/**
* Gets or sets a boolean specifying whether or not the bottom of an extruded polygon is included.
* @memberof PolygonGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
closeBottom: createPropertyDescriptor("closeBottom"),
/**
* Gets or sets the {@link ArcType} Property specifying the type of lines the polygon edges use.
* @memberof PolygonGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default ArcType.GEODESIC
*/
arcType: createPropertyDescriptor("arcType"),
@@ -254,7 +254,7 @@ Object.defineProperties(PolygonGraphics.prototype, {
* Get or sets the enum Property specifying whether the polygon
* casts or receives shadows from light sources.
* @memberof PolygonGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default ShadowMode.DISABLED
*/
shadows: createPropertyDescriptor("shadows"),
@@ -262,7 +262,7 @@ Object.defineProperties(PolygonGraphics.prototype, {
/**
* Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this polygon will be displayed.
* @memberof PolygonGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
distanceDisplayCondition: createPropertyDescriptor(
"distanceDisplayCondition"
@@ -271,7 +271,7 @@ Object.defineProperties(PolygonGraphics.prototype, {
/**
* Gets or sets the {@link ClassificationType} Property specifying whether this polygon will classify terrain, 3D Tiles, or both when on the ground.
* @memberof PolygonGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default ClassificationType.BOTH
*/
classificationType: createPropertyDescriptor("classificationType"),
@@ -279,7 +279,7 @@ Object.defineProperties(PolygonGraphics.prototype, {
/**
* Gets or sets the zIndex Prperty specifying the ordering of ground geometry. Only has an effect if the polygon is constant and neither height or extrudedHeight are specified.
* @memberof PolygonGraphics.prototype
- * @type {ConstantProperty}
+ * @type {ConstantProperty|undefined}
* @default 0
*/
zIndex: createPropertyDescriptor("zIndex"),
diff --git a/Source/DataSources/PolylineGraphics.js b/Source/DataSources/PolylineGraphics.js
index 11338241b749..2096a57ec31b 100644
--- a/Source/DataSources/PolylineGraphics.js
+++ b/Source/DataSources/PolylineGraphics.js
@@ -77,7 +77,7 @@ Object.defineProperties(PolylineGraphics.prototype, {
/**
* Gets or sets the boolean Property specifying the visibility of the polyline.
* @memberof PolylineGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default true
*/
show: createPropertyDescriptor("show"),
@@ -86,14 +86,14 @@ Object.defineProperties(PolylineGraphics.prototype, {
* Gets or sets the Property specifying the array of {@link Cartesian3}
* positions that define the line strip.
* @memberof PolylineGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
positions: createPropertyDescriptor("positions"),
/**
* Gets or sets the numeric Property specifying the width in pixels.
* @memberof PolylineGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 1.0
*/
width: createPropertyDescriptor("width"),
@@ -101,7 +101,7 @@ Object.defineProperties(PolylineGraphics.prototype, {
/**
* Gets or sets the numeric Property specifying the angular distance between each latitude and longitude if arcType is not ArcType.NONE and clampToGround is false.
* @memberof PolylineGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default Cesium.Math.RADIANS_PER_DEGREE
*/
granularity: createPropertyDescriptor("granularity"),
@@ -129,7 +129,7 @@ Object.defineProperties(PolylineGraphics.prototype, {
/**
* Gets or sets the {@link ArcType} Property specifying whether the line segments should be great arcs, rhumb lines or linearly connected.
* @memberof PolylineGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default ArcType.GEODESIC
*/
arcType: createPropertyDescriptor("arcType"),
@@ -138,7 +138,7 @@ Object.defineProperties(PolylineGraphics.prototype, {
* Gets or sets the boolean Property specifying whether the polyline
* should be clamped to the ground.
* @memberof PolylineGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default false
*/
clampToGround: createPropertyDescriptor("clampToGround"),
@@ -147,7 +147,7 @@ Object.defineProperties(PolylineGraphics.prototype, {
* Get or sets the enum Property specifying whether the polyline
* casts or receives shadows from light sources.
* @memberof PolylineGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default ShadowMode.DISABLED
*/
shadows: createPropertyDescriptor("shadows"),
@@ -155,7 +155,7 @@ Object.defineProperties(PolylineGraphics.prototype, {
/**
* Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this polyline will be displayed.
* @memberof PolylineGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
distanceDisplayCondition: createPropertyDescriptor(
"distanceDisplayCondition"
@@ -164,7 +164,7 @@ Object.defineProperties(PolylineGraphics.prototype, {
/**
* Gets or sets the {@link ClassificationType} Property specifying whether this polyline will classify terrain, 3D Tiles, or both when on the ground.
* @memberof PolylineGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default ClassificationType.BOTH
*/
classificationType: createPropertyDescriptor("classificationType"),
@@ -172,7 +172,7 @@ Object.defineProperties(PolylineGraphics.prototype, {
/**
* Gets or sets the zIndex Property specifying the ordering of the polyline. Only has an effect if `clampToGround` is true and polylines on terrain is supported.
* @memberof PolylineGraphics.prototype
- * @type {ConstantProperty}
+ * @type {ConstantProperty|undefined}
* @default 0
*/
zIndex: createPropertyDescriptor("zIndex"),
diff --git a/Source/DataSources/PolylineVolumeGraphics.js b/Source/DataSources/PolylineVolumeGraphics.js
index 541e5b8892b7..bbc4dda8fdbd 100644
--- a/Source/DataSources/PolylineVolumeGraphics.js
+++ b/Source/DataSources/PolylineVolumeGraphics.js
@@ -76,7 +76,7 @@ Object.defineProperties(PolylineVolumeGraphics.prototype, {
/**
* Gets or sets the boolean Property specifying the visibility of the volume.
* @memberof PolylineVolumeGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default true
*/
show: createPropertyDescriptor("show"),
@@ -84,21 +84,21 @@ Object.defineProperties(PolylineVolumeGraphics.prototype, {
/**
* Gets or sets the Property specifying the array of {@link Cartesian3} positions which define the line strip.
* @memberof PolylineVolumeGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
positions: createPropertyDescriptor("positions"),
/**
* Gets or sets the Property specifying the array of {@link Cartesian2} positions which define the shape to be extruded.
* @memberof PolylineVolumeGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
shape: createPropertyDescriptor("shape"),
/**
* Gets or sets the {@link CornerType} Property specifying the style of the corners.
* @memberof PolylineVolumeGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default CornerType.ROUNDED
*/
cornerType: createPropertyDescriptor("cornerType"),
@@ -106,7 +106,7 @@ Object.defineProperties(PolylineVolumeGraphics.prototype, {
/**
* Gets or sets the numeric Property specifying the angular distance between points on the volume.
* @memberof PolylineVolumeGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default {CesiumMath.RADIANS_PER_DEGREE}
*/
granularity: createPropertyDescriptor("granularity"),
@@ -114,7 +114,7 @@ Object.defineProperties(PolylineVolumeGraphics.prototype, {
/**
* Gets or sets the boolean Property specifying whether the volume is filled with the provided material.
* @memberof PolylineVolumeGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default true
*/
fill: createPropertyDescriptor("fill"),
@@ -130,7 +130,7 @@ Object.defineProperties(PolylineVolumeGraphics.prototype, {
/**
* Gets or sets the Property specifying whether the volume is outlined.
* @memberof PolylineVolumeGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default false
*/
outline: createPropertyDescriptor("outline"),
@@ -138,7 +138,7 @@ Object.defineProperties(PolylineVolumeGraphics.prototype, {
/**
* Gets or sets the Property specifying the {@link Color} of the outline.
* @memberof PolylineVolumeGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default Color.BLACK
*/
outlineColor: createPropertyDescriptor("outlineColor"),
@@ -146,7 +146,7 @@ Object.defineProperties(PolylineVolumeGraphics.prototype, {
/**
* Gets or sets the numeric Property specifying the width of the outline.
* @memberof PolylineVolumeGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 1.0
*/
outlineWidth: createPropertyDescriptor("outlineWidth"),
@@ -155,7 +155,7 @@ Object.defineProperties(PolylineVolumeGraphics.prototype, {
* Get or sets the enum Property specifying whether the volume
* casts or receives shadows from light sources.
* @memberof PolylineVolumeGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default ShadowMode.DISABLED
*/
shadows: createPropertyDescriptor("shadows"),
@@ -163,7 +163,7 @@ Object.defineProperties(PolylineVolumeGraphics.prototype, {
/**
* Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this volume will be displayed.
* @memberof PolylineVolumeGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
distanceDisplayCondition: createPropertyDescriptor(
"distanceDisplayCondition"
diff --git a/Source/DataSources/RectangleGraphics.js b/Source/DataSources/RectangleGraphics.js
index fa553282f7d2..1c36248a7635 100644
--- a/Source/DataSources/RectangleGraphics.js
+++ b/Source/DataSources/RectangleGraphics.js
@@ -95,7 +95,7 @@ Object.defineProperties(RectangleGraphics.prototype, {
/**
* Gets or sets the boolean Property specifying the visibility of the rectangle.
* @memberof RectangleGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default true
*/
show: createPropertyDescriptor("show"),
@@ -103,14 +103,14 @@ Object.defineProperties(RectangleGraphics.prototype, {
/**
* Gets or sets the Property specifying the {@link Rectangle}.
* @memberof RectangleGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
coordinates: createPropertyDescriptor("coordinates"),
/**
* Gets or sets the numeric Property specifying the altitude of the rectangle.
* @memberof RectangleGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 0.0
*/
height: createPropertyDescriptor("height"),
@@ -118,7 +118,7 @@ Object.defineProperties(RectangleGraphics.prototype, {
/**
* Gets or sets the Property specifying the {@link HeightReference}.
* @memberof RectangleGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default HeightReference.NONE
*/
heightReference: createPropertyDescriptor("heightReference"),
@@ -127,14 +127,14 @@ Object.defineProperties(RectangleGraphics.prototype, {
* Gets or sets the numeric Property specifying the altitude of the rectangle extrusion.
* Setting this property creates volume starting at height and ending at this altitude.
* @memberof RectangleGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
extrudedHeight: createPropertyDescriptor("extrudedHeight"),
/**
* Gets or sets the Property specifying the extruded {@link HeightReference}.
* @memberof RectangleGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default HeightReference.NONE
*/
extrudedHeightReference: createPropertyDescriptor("extrudedHeightReference"),
@@ -142,7 +142,7 @@ Object.defineProperties(RectangleGraphics.prototype, {
/**
* Gets or sets the numeric property specifying the rotation of the rectangle clockwise from north.
* @memberof RectangleGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 0
*/
rotation: createPropertyDescriptor("rotation"),
@@ -150,7 +150,7 @@ Object.defineProperties(RectangleGraphics.prototype, {
/**
* Gets or sets the numeric property specifying the rotation of the rectangle texture counter-clockwise from north.
* @memberof RectangleGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 0
*/
stRotation: createPropertyDescriptor("stRotation"),
@@ -158,7 +158,7 @@ Object.defineProperties(RectangleGraphics.prototype, {
/**
* Gets or sets the numeric Property specifying the angular distance between points on the rectangle.
* @memberof RectangleGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default {CesiumMath.RADIANS_PER_DEGREE}
*/
granularity: createPropertyDescriptor("granularity"),
@@ -166,7 +166,7 @@ Object.defineProperties(RectangleGraphics.prototype, {
/**
* Gets or sets the boolean Property specifying whether the rectangle is filled with the provided material.
* @memberof RectangleGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default true
*/
fill: createPropertyDescriptor("fill"),
@@ -182,7 +182,7 @@ Object.defineProperties(RectangleGraphics.prototype, {
/**
* Gets or sets the Property specifying whether the rectangle is outlined.
* @memberof RectangleGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default false
*/
outline: createPropertyDescriptor("outline"),
@@ -190,7 +190,7 @@ Object.defineProperties(RectangleGraphics.prototype, {
/**
* Gets or sets the Property specifying the {@link Color} of the outline.
* @memberof RectangleGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default Color.BLACK
*/
outlineColor: createPropertyDescriptor("outlineColor"),
@@ -198,7 +198,7 @@ Object.defineProperties(RectangleGraphics.prototype, {
/**
* Gets or sets the numeric Property specifying the width of the outline.
* @memberof RectangleGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 1.0
*/
outlineWidth: createPropertyDescriptor("outlineWidth"),
@@ -207,7 +207,7 @@ Object.defineProperties(RectangleGraphics.prototype, {
* Get or sets the enum Property specifying whether the rectangle
* casts or receives shadows from light sources.
* @memberof RectangleGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default ShadowMode.DISABLED
*/
shadows: createPropertyDescriptor("shadows"),
@@ -215,7 +215,7 @@ Object.defineProperties(RectangleGraphics.prototype, {
/**
* Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this rectangle will be displayed.
* @memberof RectangleGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
distanceDisplayCondition: createPropertyDescriptor(
"distanceDisplayCondition"
@@ -224,7 +224,7 @@ Object.defineProperties(RectangleGraphics.prototype, {
/**
* Gets or sets the {@link ClassificationType} Property specifying whether this rectangle will classify terrain, 3D Tiles, or both when on the ground.
* @memberof RectangleGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default ClassificationType.BOTH
*/
classificationType: createPropertyDescriptor("classificationType"),
@@ -232,7 +232,7 @@ Object.defineProperties(RectangleGraphics.prototype, {
/**
* Gets or sets the zIndex Property specifying the ordering of the rectangle. Only has an effect if the rectangle is constant and neither height or extrudedHeight are specified.
* @memberof RectangleGraphics.prototype
- * @type {ConstantProperty}
+ * @type {ConstantProperty|undefined}
* @default 0
*/
zIndex: createPropertyDescriptor("zIndex"),
diff --git a/Source/DataSources/WallGraphics.js b/Source/DataSources/WallGraphics.js
index d0ce102b0a16..8ddb921b59b2 100644
--- a/Source/DataSources/WallGraphics.js
+++ b/Source/DataSources/WallGraphics.js
@@ -76,7 +76,7 @@ Object.defineProperties(WallGraphics.prototype, {
/**
* Gets or sets the boolean Property specifying the visibility of the wall.
* @memberof WallGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default true
*/
show: createPropertyDescriptor("show"),
@@ -84,7 +84,7 @@ Object.defineProperties(WallGraphics.prototype, {
/**
* Gets or sets the Property specifying the array of {@link Cartesian3} positions which define the top of the wall.
* @memberof WallGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
positions: createPropertyDescriptor("positions"),
@@ -92,7 +92,7 @@ Object.defineProperties(WallGraphics.prototype, {
* Gets or sets the Property specifying an array of heights to be used for the bottom of the wall instead of the surface of the globe.
* If defined, the array must be the same length as {@link Wall#positions}.
* @memberof WallGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
minimumHeights: createPropertyDescriptor("minimumHeights"),
@@ -100,14 +100,14 @@ Object.defineProperties(WallGraphics.prototype, {
* Gets or sets the Property specifying an array of heights to be used for the top of the wall instead of the height of each position.
* If defined, the array must be the same length as {@link Wall#positions}.
* @memberof WallGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
maximumHeights: createPropertyDescriptor("maximumHeights"),
/**
* Gets or sets the numeric Property specifying the angular distance between points on the wall.
* @memberof WallGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default {CesiumMath.RADIANS_PER_DEGREE}
*/
granularity: createPropertyDescriptor("granularity"),
@@ -115,7 +115,7 @@ Object.defineProperties(WallGraphics.prototype, {
/**
* Gets or sets the boolean Property specifying whether the wall is filled with the provided material.
* @memberof WallGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default true
*/
fill: createPropertyDescriptor("fill"),
@@ -131,7 +131,7 @@ Object.defineProperties(WallGraphics.prototype, {
/**
* Gets or sets the Property specifying whether the wall is outlined.
* @memberof WallGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default false
*/
outline: createPropertyDescriptor("outline"),
@@ -139,7 +139,7 @@ Object.defineProperties(WallGraphics.prototype, {
/**
* Gets or sets the Property specifying the {@link Color} of the outline.
* @memberof WallGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default Color.BLACK
*/
outlineColor: createPropertyDescriptor("outlineColor"),
@@ -147,7 +147,7 @@ Object.defineProperties(WallGraphics.prototype, {
/**
* Gets or sets the numeric Property specifying the width of the outline.
* @memberof WallGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default 1.0
*/
outlineWidth: createPropertyDescriptor("outlineWidth"),
@@ -156,7 +156,7 @@ Object.defineProperties(WallGraphics.prototype, {
* Get or sets the enum Property specifying whether the wall
* casts or receives shadows from light sources.
* @memberof WallGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
* @default ShadowMode.DISABLED
*/
shadows: createPropertyDescriptor("shadows"),
@@ -164,7 +164,7 @@ Object.defineProperties(WallGraphics.prototype, {
/**
* Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this wall will be displayed.
* @memberof WallGraphics.prototype
- * @type {Property}
+ * @type {Property|undefined}
*/
distanceDisplayCondition: createPropertyDescriptor(
"distanceDisplayCondition"
diff --git a/Source/Scene/Axis.js b/Source/Scene/Axis.js
index fb38e6e98332..1baeb4b8fcba 100644
--- a/Source/Scene/Axis.js
+++ b/Source/Scene/Axis.js
@@ -7,7 +7,6 @@ import Matrix4 from "../Core/Matrix4.js";
* An enum describing the x, y, and z axes and helper conversion functions.
*
* @enum {Number}
- * @private
*/
var Axis = {
/**
@@ -33,79 +32,80 @@ var Axis = {
* @constant
*/
Z: 2,
+};
- /**
- * Matrix used to convert from y-up to z-up
- *
- * @type {Matrix4}
- * @constant
- */
- Y_UP_TO_Z_UP: Matrix4.fromRotationTranslation(
- Matrix3.fromRotationX(CesiumMath.PI_OVER_TWO)
- ),
+/**
+ * Matrix used to convert from y-up to z-up
+ *
+ * @type {Matrix4}
+ * @constant
+ */
+Axis.Y_UP_TO_Z_UP = Matrix4.fromRotationTranslation(
+ Matrix3.fromRotationX(CesiumMath.PI_OVER_TWO)
+);
- /**
- * Matrix used to convert from z-up to y-up
- *
- * @type {Matrix4}
- * @constant
- */
- Z_UP_TO_Y_UP: Matrix4.fromRotationTranslation(
- Matrix3.fromRotationX(-CesiumMath.PI_OVER_TWO)
- ),
+/**
+ * Matrix used to convert from z-up to y-up
+ *
+ * @type {Matrix4}
+ * @constant
+ */
+Axis.Z_UP_TO_Y_UP = Matrix4.fromRotationTranslation(
+ Matrix3.fromRotationX(-CesiumMath.PI_OVER_TWO)
+);
- /**
- * Matrix used to convert from x-up to z-up
- *
- * @type {Matrix4}
- * @constant
- */
- X_UP_TO_Z_UP: Matrix4.fromRotationTranslation(
- Matrix3.fromRotationY(-CesiumMath.PI_OVER_TWO)
- ),
+/**
+ * Matrix used to convert from x-up to z-up
+ *
+ * @type {Matrix4}
+ * @constant
+ */
+Axis.X_UP_TO_Z_UP = Matrix4.fromRotationTranslation(
+ Matrix3.fromRotationY(-CesiumMath.PI_OVER_TWO)
+);
- /**
- * Matrix used to convert from z-up to x-up
- *
- * @type {Matrix4}
- * @constant
- */
- Z_UP_TO_X_UP: Matrix4.fromRotationTranslation(
- Matrix3.fromRotationY(CesiumMath.PI_OVER_TWO)
- ),
+/**
+ * Matrix used to convert from z-up to x-up
+ *
+ * @type {Matrix4}
+ * @constant
+ */
+Axis.Z_UP_TO_X_UP = Matrix4.fromRotationTranslation(
+ Matrix3.fromRotationY(CesiumMath.PI_OVER_TWO)
+);
- /**
- * Matrix used to convert from x-up to y-up
- *
- * @type {Matrix4}
- * @constant
- */
- X_UP_TO_Y_UP: Matrix4.fromRotationTranslation(
- Matrix3.fromRotationZ(CesiumMath.PI_OVER_TWO)
- ),
+/**
+ * Matrix used to convert from x-up to y-up
+ *
+ * @type {Matrix4}
+ * @constant
+ */
+Axis.X_UP_TO_Y_UP = Matrix4.fromRotationTranslation(
+ Matrix3.fromRotationZ(CesiumMath.PI_OVER_TWO)
+);
- /**
- * Matrix used to convert from y-up to x-up
- *
- * @type {Matrix4}
- * @constant
- */
- Y_UP_TO_X_UP: Matrix4.fromRotationTranslation(
- Matrix3.fromRotationZ(-CesiumMath.PI_OVER_TWO)
- ),
+/**
+ * Matrix used to convert from y-up to x-up
+ *
+ * @type {Matrix4}
+ * @constant
+ */
+Axis.Y_UP_TO_X_UP = Matrix4.fromRotationTranslation(
+ Matrix3.fromRotationZ(-CesiumMath.PI_OVER_TWO)
+);
- /**
- * Gets the axis by name
- *
- * @param {String} name The name of the axis.
- * @returns {Number} The axis enum.
- */
- fromName: function (name) {
- //>>includeStart('debug', pragmas.debug);
- Check.typeOf.string("name", name);
- //>>includeEnd('debug');
+/**
+ * Gets the axis by name
+ *
+ * @param {String} name The name of the axis.
+ * @returns {Number} The axis enum.
+ */
+Axis.fromName = function (name) {
+ //>>includeStart('debug', pragmas.debug);
+ Check.typeOf.string("name", name);
+ //>>includeEnd('debug');
- return Axis[name];
- },
+ return Axis[name];
};
+
export default Object.freeze(Axis);
diff --git a/Source/Scene/Cesium3DTileFeature.js b/Source/Scene/Cesium3DTileFeature.js
index 2700ea5d3f82..a9d3436b2490 100644
--- a/Source/Scene/Cesium3DTileFeature.js
+++ b/Source/Scene/Cesium3DTileFeature.js
@@ -161,7 +161,7 @@ Cesium3DTileFeature.prototype.hasProperty = function (name) {
*
* @see {@link https://github.com/CesiumGS/3d-tiles/tree/master/extensions/3DTILES_batch_table_hierarchy}
*
- * @param {String[]} results An array into which to store the results.
+ * @param {String[]} [results] An array into which to store the results.
* @returns {String[]} The names of the feature's properties.
*/
Cesium3DTileFeature.prototype.getPropertyNames = function (results) {
diff --git a/Source/Scene/Cesium3DTilePointFeature.js b/Source/Scene/Cesium3DTilePointFeature.js
index 5c8cb77300f1..79ee6de46456 100644
--- a/Source/Scene/Cesium3DTilePointFeature.js
+++ b/Source/Scene/Cesium3DTilePointFeature.js
@@ -731,7 +731,7 @@ Cesium3DTilePointFeature.prototype.hasProperty = function (name) {
*
* @see {@link https://github.com/CesiumGS/3d-tiles/tree/master/extensions/3DTILES_batch_table_hierarchy}
*
- * @param {String[]} results An array into which to store the results.
+ * @param {String[]} [results] An array into which to store the results.
* @returns {String[]} The names of the feature's properties.
*/
Cesium3DTilePointFeature.prototype.getPropertyNames = function (results) {
diff --git a/Source/Scene/Cesium3DTileset.js b/Source/Scene/Cesium3DTileset.js
index 305679733d89..45bfd2c01da9 100644
--- a/Source/Scene/Cesium3DTileset.js
+++ b/Source/Scene/Cesium3DTileset.js
@@ -1203,7 +1203,7 @@ Object.defineProperties(Cesium3DTileset.prototype, {
*
* @memberof Cesium3DTileset.prototype
*
- * @type {Cesium3DTileStyle}
+ * @type {Cesium3DTileStyle|undefined}
*
* @default undefined
*
diff --git a/Source/Scene/ImageryLayerFeatureInfo.js b/Source/Scene/ImageryLayerFeatureInfo.js
index 90f89d3a485e..6536bcebd9ab 100644
--- a/Source/Scene/ImageryLayerFeatureInfo.js
+++ b/Source/Scene/ImageryLayerFeatureInfo.js
@@ -9,34 +9,34 @@ import defined from "../Core/defined.js";
function ImageryLayerFeatureInfo() {
/**
* Gets or sets the name of the feature.
- * @type {String}
+ * @type {String|undefined}
*/
this.name = undefined;
/**
* Gets or sets an HTML description of the feature. The HTML is not trusted and should
* be sanitized before display to the user.
- * @type {String}
+ * @type {String|undefined}
*/
this.description = undefined;
/**
* Gets or sets the position of the feature, or undefined if the position is not known.
*
- * @type {Cartographic}
+ * @type {Cartographic|undefined}
*/
this.position = undefined;
/**
* Gets or sets the raw data describing the feature. The raw data may be in any
* number of formats, such as GeoJSON, KML, etc.
- * @type {Object}
+ * @type {Object|undefined}
*/
this.data = undefined;
/**
* Gets or sets the image layer of the feature.
- * @type {Object}
+ * @type {Object|undefined}
*/
this.imageryLayer = undefined;
}
diff --git a/Source/Scene/Scene.js b/Source/Scene/Scene.js
index e6f39dba5ac0..904029140495 100644
--- a/Source/Scene/Scene.js
+++ b/Source/Scene/Scene.js
@@ -3897,10 +3897,9 @@ function updateMostDetailedRayPicks(scene) {
}
/**
- * Update and render the scene.
+ * Update and render the scene. It is usually not necessary to call this function
+ * directly because {@link CesiumWidget} or {@link Viewer} do it automatically.
* @param {JulianDate} [time] The simulation time at which to render.
- *
- * @private
*/
Scene.prototype.render = function (time) {
/**
@@ -4112,7 +4111,7 @@ Scene.prototype.pickPosition = function (windowPosition, result) {
* @param {Number} [limit] If supplied, stop drilling after collecting this many picks.
* @param {Number} [width=3] Width of the pick rectangle.
* @param {Number} [height=3] Height of the pick rectangle.
- * @returns {Object[]} Array of objects, each containing 1 picked primitives.
+ * @returns {Array.<*>} Array of objects, each containing 1 picked primitives.
*
* @exception {DeveloperError} windowPosition is undefined.
*
diff --git a/gulpfile.cjs b/gulpfile.cjs
index 8192733597a3..74c75f3153fd 100644
--- a/gulpfile.cjs
+++ b/gulpfile.cjs
@@ -1559,6 +1559,9 @@ function createTypeScriptDefinitions() {
.replace(/^declare /gm, "export ")
.replace(/CesiumMath/gm, "Math")
.replace(/Number\[]/gm, "number[]") // Workaround https://github.com/englercj/tsd-jsdoc/issues/117
+ .replace(/String\[]/gm, "string[]")
+ .replace(/Boolean\[]/gm, "boolean[]")
+ .replace(/Object\[]/gm, "object[]")
.replace(
/= "WebGLConstants\.(.+)"/gm,
(match, p1) => `= WebGLConstants.${p1}`
From 3172bc4615e881895bdbd54c2984ff4f396c5b84 Mon Sep 17 00:00:00 2001
From: James Bromwell <943160+thw0rted@users.noreply.github.com>
Date: Thu, 28 May 2020 14:19:38 +0200
Subject: [PATCH 19/36] Give up on trying JSDoc tags for PropertyBag
---
Source/DataSources/PropertyBag.js | 7 +------
gulpfile.cjs | 27 ++++++++++++++++++---------
2 files changed, 19 insertions(+), 15 deletions(-)
diff --git a/Source/DataSources/PropertyBag.js b/Source/DataSources/PropertyBag.js
index 688053f4c7ae..24f95598a6be 100644
--- a/Source/DataSources/PropertyBag.js
+++ b/Source/DataSources/PropertyBag.js
@@ -9,12 +9,7 @@ import Property from "./Property.js";
/**
* A {@link Property} whose value is a key-value mapping of property names to the computed value of other properties.
*
- * @alias PropertyBag
- * @constructor
- * @implements {DictionaryLike}
- *
- * @param {Object} [value] An object, containing key-value mapping of property names to properties.
- * @param {Function} [createPropertyCallback] A function that will be called when the value of any of the properties in value are not a Property.
+ * @typedef {PropertyBagType}
*/
function PropertyBag(value, createPropertyCallback) {
this._propertyNames = [];
diff --git a/gulpfile.cjs b/gulpfile.cjs
index 74c75f3153fd..b0c8debaa3ec 100644
--- a/gulpfile.cjs
+++ b/gulpfile.cjs
@@ -1481,10 +1481,9 @@ function createCesiumJs() {
function createTypeScriptDefinitions() {
// Run jsdoc with tsd-jsdoc to generate an initial Cesium.d.ts file.
- child_process.execSync(
- "node_modules/.bin/jsdoc --configure Tools/jsdoc/ts-conf.json",
- { stdio: "inherit" }
- );
+ child_process.execSync("npx jsdoc --configure Tools/jsdoc/ts-conf.json", {
+ stdio: "inherit",
+ });
var source = fs.readFileSync("Source/Cesium.d.ts").toString();
@@ -1568,15 +1567,25 @@ function createTypeScriptDefinitions() {
);
// Wrap the source to actually be inside of a declared cesium module
- // and any any workaround and private utility types.
+ // and add any workaround and private utility types.
source = `declare module "cesium" {
/**
- * Private interface to support PropertyBag being a dictionary-like object.
+ * Private interfaces to support PropertyBag being a dictionary-like object.
*/
-interface DictionaryLike {
- [index: string]: any;
+interface PropertyDictionary {
+ [key: string]: Property | undefined;
+}
+class PropertyBagBase {
+ readonly propertyNames: string[];
+ constructor(value?: object, createPropertyCallback?: Function);
+ addProperty(propertyName: string, value?: any, createPropertyCallback?: Function): void;
+ hasProperty(propertyName: string): boolean;
+ merge(source: Object, createPropertyCallback?: Function): void;
+ removeProperty(propertyName: string): void;
}
+/** This has to be in the workaround section because JSDoc doesn't support Intersection Types */
+type PropertyBagType = PropertyDictionary & Property & PropertyBagBase;
${source}
}
@@ -1602,7 +1611,7 @@ ${source}
fs.writeFileSync("Source/Cesium.d.ts", source);
// Use tsc to compile it and make sure it is valid
- child_process.execSync("node_modules/.bin/tsc -p Tools/jsdoc/tsconfig.json", {
+ child_process.execSync("npx tsc -p Tools/jsdoc/tsconfig.json", {
stdio: "inherit",
});
From f30a9b023d7412935fc9bd5b30d0bae82bf478f7 Mon Sep 17 00:00:00 2001
From: James Bromwell <943160+thw0rted@users.noreply.github.com>
Date: Thu, 28 May 2020 14:20:21 +0200
Subject: [PATCH 20/36] Example of exporting ConstructorOptions interface
---
Source/DataSources/BoxGraphics.js | 27 ++++++++++++++++-----------
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/Source/DataSources/BoxGraphics.js b/Source/DataSources/BoxGraphics.js
index db4c4dc2a6d1..2d5d73f6729c 100644
--- a/Source/DataSources/BoxGraphics.js
+++ b/Source/DataSources/BoxGraphics.js
@@ -5,23 +5,28 @@ import Event from "../Core/Event.js";
import createMaterialPropertyDescriptor from "./createMaterialPropertyDescriptor.js";
import createPropertyDescriptor from "./createPropertyDescriptor.js";
+/**
+ * @typedef {Object} BoxGraphics.ConstructorOptions
+ * @property {Property|boolean} [show=true] A boolean Property specifying the visibility of the box.
+ * @property {Property|Cartesian3} [dimensions] A {@link Cartesian3} Property specifying the length, width, and height of the box.
+ * @property {Property|HeightReference} [heightReference=HeightReference.NONE] A Property specifying what the height from the entity position is relative to.
+ * @property {Property|boolean} [fill=true] A boolean Property specifying whether the box is filled with the provided material.
+ * @property {MaterialProperty|Color} [material=Color.WHITE] A Property specifying the material used to fill the box.
+ * @property {Property|boolean} [outline=false] A boolean Property specifying whether the box is outlined.
+ * @property {Property|Color} [outlineColor=Color.BLACK] A Property specifying the {@link Color} of the outline.
+ * @property {Property|number} [outlineWidth=1.0] A numeric Property specifying the width of the outline.
+ * @property {Property|ShadowMode} [shadows=ShadowMode.DISABLED] An enum Property specifying whether the box casts or receives shadows from light sources.
+ * @property {Property|DistanceDisplayCondition} [distanceDisplayCondition] A Property specifying at what distance from the camera that this box will be displayed.
+ *
+ */
+
/**
* Describes a box. The center position and orientation are determined by the containing {@link Entity}.
*
* @alias BoxGraphics
* @constructor
*
- * @param {Object} [options] Object with the following properties:
- * @param {Property} [options.show=true] A boolean Property specifying the visibility of the box.
- * @param {Property} [options.dimensions] A {@link Cartesian3} Property specifying the length, width, and height of the box.
- * @param {Property} [options.heightReference=HeightReference.NONE] A Property specifying what the height from the entity position is relative to.
- * @param {Property} [options.fill=true] A boolean Property specifying whether the box is filled with the provided material.
- * @param {MaterialProperty} [options.material=Color.WHITE] A Property specifying the material used to fill the box.
- * @param {Property} [options.outline=false] A boolean Property specifying whether the box is outlined.
- * @param {Property} [options.outlineColor=Color.BLACK] A Property specifying the {@link Color} of the outline.
- * @param {Property} [options.outlineWidth=1.0] A numeric Property specifying the width of the outline.
- * @param {Property} [options.shadows=ShadowMode.DISABLED] An enum Property specifying whether the box casts or receives shadows from light sources.
- * @param {Property} [options.distanceDisplayCondition] A Property specifying at what distance from the camera that this box will be displayed.
+ * @param {BoxGraphics.ConstructorOptions} [options] Object with the following properties:
*
* @demo {@link https://sandcastle.cesium.com/index.html?src=Box.html|Cesium Sandcastle Box Demo}
*/
From 6dd9e0cd4f4faf14627cd0a2ef118e968a2dc635 Mon Sep 17 00:00:00 2001
From: James Bromwell <943160+thw0rted@users.noreply.github.com>
Date: Thu, 28 May 2020 16:12:25 +0200
Subject: [PATCH 21/36] Break out constructor options: Entity and Graphics
---
.vscode/tasks.json | 32 ---------
Source/DataSources/BillboardGraphics.js | 49 ++++++++------
Source/DataSources/BoxGraphics.js | 25 +++----
Source/DataSources/Cesium3DTilesetGraphics.js | 15 +++--
Source/DataSources/CorridorGraphics.js | 45 +++++++------
Source/DataSources/CylinderGraphics.js | 37 ++++++-----
Source/DataSources/EllipseGraphics.js | 49 ++++++++------
Source/DataSources/EllipsoidGraphics.js | 45 +++++++------
Source/DataSources/Entity.js | 65 +++++++++++--------
Source/DataSources/EntityCollection.js | 2 +-
Source/DataSources/LabelGraphics.js | 51 ++++++++-------
Source/DataSources/ModelGraphics.js | 51 ++++++++-------
Source/DataSources/PathGraphics.js | 23 ++++---
Source/DataSources/PlaneGraphics.js | 29 +++++----
Source/DataSources/PointGraphics.js | 29 +++++----
Source/DataSources/PolygonGraphics.js | 51 ++++++++-------
Source/DataSources/PolylineGraphics.js | 36 ++++++----
Source/DataSources/PolylineVolumeGraphics.js | 33 ++++++----
Source/DataSources/RectangleGraphics.js | 45 +++++++------
Source/DataSources/WallGraphics.js | 33 ++++++----
20 files changed, 420 insertions(+), 325 deletions(-)
delete mode 100644 .vscode/tasks.json
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
deleted file mode 100644
index 4befb021f0ca..000000000000
--- a/.vscode/tasks.json
+++ /dev/null
@@ -1,32 +0,0 @@
-{
- // See https://go.microsoft.com/fwlink/?LinkId=733558
- // for the documentation about the tasks.json format
- "version": "0.1.0",
- "command": "gulp",
- "isShellCommand": true,
- "args": [
- "--no-color"
- ],
- "tasks": [
- {
- "taskName": "build",
- "args": [],
- "isBuildCommand": true,
- "isBackground": false,
- "problemMatcher": [
- "$lessCompile",
- "$tsc",
- "$jshint"
- ]
- },
- {
- "taskName": "test",
- "args": [],
- "isTestCommand": true
- },
- {
- "taskName": "build-watch",
- "isBackground": true
- }
- ]
-}
diff --git a/Source/DataSources/BillboardGraphics.js b/Source/DataSources/BillboardGraphics.js
index e96da59d0f90..fe5144eb4944 100644
--- a/Source/DataSources/BillboardGraphics.js
+++ b/Source/DataSources/BillboardGraphics.js
@@ -4,6 +4,33 @@ import DeveloperError from "../Core/DeveloperError.js";
import Event from "../Core/Event.js";
import createPropertyDescriptor from "./createPropertyDescriptor.js";
+/**
+ * @typedef {Object} BillboardGraphics.ConstructorOptions
+ *
+ * Initialization options for the BillboardGraphics constructor
+ *
+ * @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the billboard.
+ * @property {Property | string | HTMLCanvasElement} [image] A Property specifying the Image, URI, or Canvas to use for the billboard.
+ * @property {Property | number} [scale=1.0] A numeric Property specifying the scale to apply to the image size.
+ * @property {Property | Cartesian2} [pixelOffset=Cartesian2.ZERO] A {@link Cartesian2} Property specifying the pixel offset.
+ * @property {Property | Cartesian3} [eyeOffset=Cartesian3.ZERO] A {@link Cartesian3} Property specifying the eye offset.
+ * @property {Property | HorizontalOrigin} [horizontalOrigin=HorizontalOrigin.CENTER] A Property specifying the {@link HorizontalOrigin}.
+ * @property {Property | VerticalOrigin} [verticalOrigin=VerticalOrigin.CENTER] A Property specifying the {@link VerticalOrigin}.
+ * @property {Property | HeightReference} [heightReference=HeightReference.NONE] A Property specifying what the height is relative to.
+ * @property {Property | Color} [color=Color.WHITE] A Property specifying the tint {@link Color} of the image.
+ * @property {Property | number} [rotation=0] A numeric Property specifying the rotation about the alignedAxis.
+ * @property {Property | Cartesian3} [alignedAxis=Cartesian3.ZERO] A {@link Cartesian3} Property specifying the unit vector axis of rotation.
+ * @property {Property | boolean} [sizeInMeters] A boolean Property specifying whether this billboard's size should be measured in meters.
+ * @property {Property | number} [width] A numeric Property specifying the width of the billboard in pixels, overriding the native size.
+ * @property {Property | number} [height] A numeric Property specifying the height of the billboard in pixels, overriding the native size.
+ * @property {Property | NearFarScalar} [scaleByDistance] A {@link NearFarScalar} Property used to scale the point based on distance from the camera.
+ * @property {Property | NearFarScalar} [translucencyByDistance] A {@link NearFarScalar} Property used to set translucency based on distance from the camera.
+ * @property {Property | NearFarScalar} [pixelOffsetScaleByDistance] A {@link NearFarScalar} Property used to set pixelOffset based on distance from the camera.
+ * @property {Property | BoundingRectangle} [imageSubRegion] A Property specifying a {@link BoundingRectangle} that defines a sub-region of the image to use for the billboard, rather than the entire image, measured in pixels from the bottom-left.
+ * @property {Property | DistanceDisplayCondition} [distanceDisplayCondition] A Property specifying at what distance from the camera that this billboard will be displayed.
+ * @property {Property | number} [disableDepthTestDistance] A Property specifying the distance from the camera at which to disable the depth test to.
+ */
+
/**
* Describes a two dimensional icon located at the position of the containing {@link Entity}.
*
@@ -16,27 +43,7 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* @alias BillboardGraphics
* @constructor
*
- * @param {Object} [options] Object with the following properties:
- * @param {Property} [options.show=true] A boolean Property specifying the visibility of the billboard.
- * @param {Property} [options.image] A Property specifying the Image, URI, or Canvas to use for the billboard.
- * @param {Property} [options.scale=1.0] A numeric Property specifying the scale to apply to the image size.
- * @param {Property} [options.pixelOffset=Cartesian2.ZERO] A {@link Cartesian2} Property specifying the pixel offset.
- * @param {Property} [options.eyeOffset=Cartesian3.ZERO] A {@link Cartesian3} Property specifying the eye offset.
- * @param {Property} [options.horizontalOrigin=HorizontalOrigin.CENTER] A Property specifying the {@link HorizontalOrigin}.
- * @param {Property} [options.verticalOrigin=VerticalOrigin.CENTER] A Property specifying the {@link VerticalOrigin}.
- * @param {Property} [options.heightReference=HeightReference.NONE] A Property specifying what the height is relative to.
- * @param {Property} [options.color=Color.WHITE] A Property specifying the tint {@link Color} of the image.
- * @param {Property} [options.rotation=0] A numeric Property specifying the rotation about the alignedAxis.
- * @param {Property} [options.alignedAxis=Cartesian3.ZERO] A {@link Cartesian3} Property specifying the unit vector axis of rotation.
- * @param {Property} [options.sizeInMeters] A boolean Property specifying whether this billboard's size should be measured in meters.
- * @param {Property} [options.width] A numeric Property specifying the width of the billboard in pixels, overriding the native size.
- * @param {Property} [options.height] A numeric Property specifying the height of the billboard in pixels, overriding the native size.
- * @param {Property} [options.scaleByDistance] A {@link NearFarScalar} Property used to scale the point based on distance from the camera.
- * @param {Property} [options.translucencyByDistance] A {@link NearFarScalar} Property used to set translucency based on distance from the camera.
- * @param {Property} [options.pixelOffsetScaleByDistance] A {@link NearFarScalar} Property used to set pixelOffset based on distance from the camera.
- * @param {Property} [options.imageSubRegion] A Property specifying a {@link BoundingRectangle} that defines a sub-region of the image to use for the billboard, rather than the entire image, measured in pixels from the bottom-left.
- * @param {Property} [options.distanceDisplayCondition] A Property specifying at what distance from the camera that this billboard will be displayed.
- * @param {Property} [options.disableDepthTestDistance] A Property specifying the distance from the camera at which to disable the depth test to.
+ * @param {BillboardGraphics.ConstructorOptions} [options] Object describing initialization options
*
* @demo {@link https://sandcastle.cesium.com/index.html?src=Billboards.html|Cesium Sandcastle Billboard Demo}
*/
diff --git a/Source/DataSources/BoxGraphics.js b/Source/DataSources/BoxGraphics.js
index 2d5d73f6729c..789ef0032113 100644
--- a/Source/DataSources/BoxGraphics.js
+++ b/Source/DataSources/BoxGraphics.js
@@ -7,16 +7,19 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
/**
* @typedef {Object} BoxGraphics.ConstructorOptions
- * @property {Property|boolean} [show=true] A boolean Property specifying the visibility of the box.
- * @property {Property|Cartesian3} [dimensions] A {@link Cartesian3} Property specifying the length, width, and height of the box.
- * @property {Property|HeightReference} [heightReference=HeightReference.NONE] A Property specifying what the height from the entity position is relative to.
- * @property {Property|boolean} [fill=true] A boolean Property specifying whether the box is filled with the provided material.
- * @property {MaterialProperty|Color} [material=Color.WHITE] A Property specifying the material used to fill the box.
- * @property {Property|boolean} [outline=false] A boolean Property specifying whether the box is outlined.
- * @property {Property|Color} [outlineColor=Color.BLACK] A Property specifying the {@link Color} of the outline.
- * @property {Property|number} [outlineWidth=1.0] A numeric Property specifying the width of the outline.
- * @property {Property|ShadowMode} [shadows=ShadowMode.DISABLED] An enum Property specifying whether the box casts or receives shadows from light sources.
- * @property {Property|DistanceDisplayCondition} [distanceDisplayCondition] A Property specifying at what distance from the camera that this box will be displayed.
+ *
+ * Initialization options for the BoxGraphics constructor
+ *
+ * @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the box.
+ * @property {Property | Cartesian3} [dimensions] A {@link Cartesian3} Property specifying the length, width, and height of the box.
+ * @property {Property | HeightReference} [heightReference=HeightReference.NONE] A Property specifying what the height from the entity position is relative to.
+ * @property {Property | boolean} [fill=true] A boolean Property specifying whether the box is filled with the provided material.
+ * @property {MaterialProperty | Color} [material=Color.WHITE] A Property specifying the material used to fill the box.
+ * @property {Property | boolean} [outline=false] A boolean Property specifying whether the box is outlined.
+ * @property {Property | Color} [outlineColor=Color.BLACK] A Property specifying the {@link Color} of the outline.
+ * @property {Property | number} [outlineWidth=1.0] A numeric Property specifying the width of the outline.
+ * @property {Property | ShadowMode} [shadows=ShadowMode.DISABLED] An enum Property specifying whether the box casts or receives shadows from light sources.
+ * @property {Property | DistanceDisplayCondition} [distanceDisplayCondition] A Property specifying at what distance from the camera that this box will be displayed.
*
*/
@@ -26,7 +29,7 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* @alias BoxGraphics
* @constructor
*
- * @param {BoxGraphics.ConstructorOptions} [options] Object with the following properties:
+ * @param {BoxGraphics.ConstructorOptions} [options] Object describing initialization options
*
* @demo {@link https://sandcastle.cesium.com/index.html?src=Box.html|Cesium Sandcastle Box Demo}
*/
diff --git a/Source/DataSources/Cesium3DTilesetGraphics.js b/Source/DataSources/Cesium3DTilesetGraphics.js
index c826ea25757e..3caf31975b3f 100644
--- a/Source/DataSources/Cesium3DTilesetGraphics.js
+++ b/Source/DataSources/Cesium3DTilesetGraphics.js
@@ -4,6 +4,16 @@ import DeveloperError from "../Core/DeveloperError.js";
import Event from "../Core/Event.js";
import createPropertyDescriptor from "./createPropertyDescriptor.js";
+/**
+ * @typedef {Object} Cesium3DTilesetGraphics.ConstructorOptions
+ *
+ * Initialization options for the Cesium3DTilesetGraphics constructor
+ *
+ * @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the tileset.
+ * @property {Property | string | Resource} [uri] A string or Resource Property specifying the URI of the tileset.
+ * @property {Property | number} [maximumScreenSpaceError] A number or Property specifying the maximum screen space error used to drive level of detail refinement.
+ */
+
/**
* A 3D Tiles tileset represented by an {@link Entity}.
* The tileset modelMatrix is determined by the containing Entity position and orientation
@@ -12,10 +22,7 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* @alias Cesium3DTilesetGraphics
* @constructor
*
- * @param {Object} [options] Object with the following properties:
- * @param {Property} [options.show=true] A boolean Property specifying the visibility of the tileset.
- * @param {Property} [options.uri] A string or Resource Property specifying the URI of the tileset.
- * @param {Property} [options.maximumScreenSpaceError] A number or Property specifying the maximum screen space error used to drive level of detail refinement.
+ * @param {Cesium3DTilesetGraphics.ConstructorOptions} [options] Object describing initialization options
*/
function Cesium3DTilesetGraphics(options) {
this._definitionChanged = new Event();
diff --git a/Source/DataSources/CorridorGraphics.js b/Source/DataSources/CorridorGraphics.js
index b19f77448e28..eff199e367c2 100644
--- a/Source/DataSources/CorridorGraphics.js
+++ b/Source/DataSources/CorridorGraphics.js
@@ -5,6 +5,31 @@ import Event from "../Core/Event.js";
import createMaterialPropertyDescriptor from "./createMaterialPropertyDescriptor.js";
import createPropertyDescriptor from "./createPropertyDescriptor.js";
+/**
+ * @typedef {Object} CorridorGraphics.ConstructorOptions
+ *
+ * Initialization options for the CorridorGraphics constructor
+ *
+ * @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the corridor.
+ * @property {Property | Cartesian3} [positions] A Property specifying the array of {@link Cartesian3} positions that define the centerline of the corridor.
+ * @property {Property | number} [width] A numeric Property specifying the distance between the edges of the corridor.
+ * @property {Property | number} [height=0] A numeric Property specifying the altitude of the corridor relative to the ellipsoid surface.
+ * @property {Property | HeightReference} [heightReference=HeightReference.NONE] A Property specifying what the height is relative to.
+ * @property {Property | number} [extrudedHeight] A numeric Property specifying the altitude of the corridor's extruded face relative to the ellipsoid surface.
+ * @property {Property | HeightReference} [extrudedHeightReference=HeightReference.NONE] A Property specifying what the extrudedHeight is relative to.
+ * @property {Property | CornerType} [cornerType=CornerType.ROUNDED] A {@link CornerType} Property specifying the style of the corners.
+ * @property {Property | number} [granularity=Cesium.Math.RADIANS_PER_DEGREE] A numeric Property specifying the distance between each latitude and longitude.
+ * @property {Property | boolean} [fill=true] A boolean Property specifying whether the corridor is filled with the provided material.
+ * @property {MaterialProperty | Color} [material=Color.WHITE] A Property specifying the material used to fill the corridor.
+ * @property {Property | boolean} [outline=false] A boolean Property specifying whether the corridor is outlined.
+ * @property {Property | Color} [outlineColor=Color.BLACK] A Property specifying the {@link Color} of the outline.
+ * @property {Property | number} [outlineWidth=1.0] A numeric Property specifying the width of the outline.
+ * @property {Property | ShadowMode} [shadows=ShadowMode.DISABLED] An enum Property specifying whether the corridor casts or receives shadows from light sources.
+ * @property {Property | DistanceDisplayCondition} [distanceDisplayCondition] A Property specifying at what distance from the camera that this corridor will be displayed.
+ * @property {Property | ClassificationType} [classificationType=ClassificationType.BOTH] An enum Property specifying whether this corridor will classify terrain, 3D Tiles, or both when on the ground.
+ * @property {ConstantProperty | number} [zIndex] A Property specifying the zIndex of the corridor, used for ordering. Only has an effect if height and extrudedHeight are undefined, and if the corridor is static.
+ */
+
/**
* Describes a corridor, which is a shape defined by a centerline and width that
* conforms to the curvature of the globe. It can be placed on the surface or at altitude
@@ -13,25 +38,7 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* @alias CorridorGraphics
* @constructor
*
- * @param {Object} [options] Object with the following properties:
- * @param {Property} [options.show=true] A boolean Property specifying the visibility of the corridor.
- * @param {Property} [options.positions] A Property specifying the array of {@link Cartesian3} positions that define the centerline of the corridor.
- * @param {Property} [options.width] A numeric Property specifying the distance between the edges of the corridor.
- * @param {Property} [options.height=0] A numeric Property specifying the altitude of the corridor relative to the ellipsoid surface.
- * @param {Property} [options.heightReference=HeightReference.NONE] A Property specifying what the height is relative to.
- * @param {Property} [options.extrudedHeight] A numeric Property specifying the altitude of the corridor's extruded face relative to the ellipsoid surface.
- * @param {Property} [options.extrudedHeightReference=HeightReference.NONE] A Property specifying what the extrudedHeight is relative to.
- * @param {Property} [options.cornerType=CornerType.ROUNDED] A {@link CornerType} Property specifying the style of the corners.
- * @param {Property} [options.granularity=Cesium.Math.RADIANS_PER_DEGREE] A numeric Property specifying the distance between each latitude and longitude.
- * @param {Property} [options.fill=true] A boolean Property specifying whether the corridor is filled with the provided material.
- * @param {MaterialProperty} [options.material=Color.WHITE] A Property specifying the material used to fill the corridor.
- * @param {Property} [options.outline=false] A boolean Property specifying whether the corridor is outlined.
- * @param {Property} [options.outlineColor=Color.BLACK] A Property specifying the {@link Color} of the outline.
- * @param {Property} [options.outlineWidth=1.0] A numeric Property specifying the width of the outline.
- * @param {Property} [options.shadows=ShadowMode.DISABLED] An enum Property specifying whether the corridor casts or receives shadows from light sources.
- * @param {Property} [options.distanceDisplayCondition] A Property specifying at what distance from the camera that this corridor will be displayed.
- * @param {Property} [options.classificationType=ClassificationType.BOTH] An enum Property specifying whether this corridor will classify terrain, 3D Tiles, or both when on the ground.
- * @param {ConstantProperty} [options.zIndex] A Property specifying the zIndex of the corridor, used for ordering. Only has an effect if height and extrudedHeight are undefined, and if the corridor is static.
+ * @param {CorridorGraphics.ConstructorOptions} [options] Object describing initialization options
*
* @see Entity
* @demo {@link https://sandcastle.cesium.com/index.html?src=Corridor.html|Cesium Sandcastle Corridor Demo}
diff --git a/Source/DataSources/CylinderGraphics.js b/Source/DataSources/CylinderGraphics.js
index 2972fb4221ca..1f03e2a9931a 100644
--- a/Source/DataSources/CylinderGraphics.js
+++ b/Source/DataSources/CylinderGraphics.js
@@ -5,6 +5,27 @@ import Event from "../Core/Event.js";
import createMaterialPropertyDescriptor from "./createMaterialPropertyDescriptor.js";
import createPropertyDescriptor from "./createPropertyDescriptor.js";
+/**
+ * @typedef {Object} CylinderGraphics.ConstructorOptions
+ *
+ * Initialization options for the CylinderGraphics constructor
+ *
+ * @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the cylinder.
+ * @property {Property | number} [length] A numeric Property specifying the length of the cylinder.
+ * @property {Property | number} [topRadius] A numeric Property specifying the radius of the top of the cylinder.
+ * @property {Property | number} [bottomRadius] A numeric Property specifying the radius of the bottom of the cylinder.
+ * @property {Property | HeightReference} [heightReference=HeightReference.NONE] A Property specifying what the height from the entity position is relative to.
+ * @property {Property | boolean} [fill=true] A boolean Property specifying whether the cylinder is filled with the provided material.
+ * @property {MaterialProperty | Color} [material=Color.WHITE] A Property specifying the material used to fill the cylinder.
+ * @property {Property | boolean} [outline=false] A boolean Property specifying whether the cylinder is outlined.
+ * @property {Property | Color} [outlineColor=Color.BLACK] A Property specifying the {@link Color} of the outline.
+ * @property {Property | number} [outlineWidth=1.0] A numeric Property specifying the width of the outline.
+ * @property {Property | number} [numberOfVerticalLines=16] A numeric Property specifying the number of vertical lines to draw along the perimeter for the outline.
+ * @property {Property | number} [slices=128] The number of edges around the perimeter of the cylinder.
+ * @property {Property | ShadowMode} [shadows=ShadowMode.DISABLED] An enum Property specifying whether the cylinder casts or receives shadows from light sources.
+ * @property {Property | DistanceDisplayCondition} [distanceDisplayCondition] A Property specifying at what distance from the camera that this cylinder will be displayed.
+ */
+
/**
* Describes a cylinder, truncated cone, or cone defined by a length, top radius, and bottom radius.
* The center position and orientation are determined by the containing {@link Entity}.
@@ -12,21 +33,7 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* @alias CylinderGraphics
* @constructor
*
- * @param {Object} [options] Object with the following properties:
- * @param {Property} [options.show=true] A boolean Property specifying the visibility of the cylinder.
- * @param {Property} [options.length] A numeric Property specifying the length of the cylinder.
- * @param {Property} [options.topRadius] A numeric Property specifying the radius of the top of the cylinder.
- * @param {Property} [options.bottomRadius] A numeric Property specifying the radius of the bottom of the cylinder.
- * @param {Property} [options.heightReference=HeightReference.NONE] A Property specifying what the height from the entity position is relative to.
- * @param {Property} [options.fill=true] A boolean Property specifying whether the cylinder is filled with the provided material.
- * @param {MaterialProperty} [options.material=Color.WHITE] A Property specifying the material used to fill the cylinder.
- * @param {Property} [options.outline=false] A boolean Property specifying whether the cylinder is outlined.
- * @param {Property} [options.outlineColor=Color.BLACK] A Property specifying the {@link Color} of the outline.
- * @param {Property} [options.outlineWidth=1.0] A numeric Property specifying the width of the outline.
- * @param {Property} [options.numberOfVerticalLines=16] A numeric Property specifying the number of vertical lines to draw along the perimeter for the outline.
- * @param {Property} [options.slices=128] The number of edges around the perimeter of the cylinder.
- * @param {Property} [options.shadows=ShadowMode.DISABLED] An enum Property specifying whether the cylinder casts or receives shadows from light sources.
- * @param {Property} [options.distanceDisplayCondition] A Property specifying at what distance from the camera that this cylinder will be displayed.
+ * @param {CylinderGraphics.ConstructorOptions} [options] Object describing initialization options
*/
function CylinderGraphics(options) {
this._definitionChanged = new Event();
diff --git a/Source/DataSources/EllipseGraphics.js b/Source/DataSources/EllipseGraphics.js
index bb4ccaa45ed8..fe34d15cce85 100644
--- a/Source/DataSources/EllipseGraphics.js
+++ b/Source/DataSources/EllipseGraphics.js
@@ -5,6 +5,33 @@ import Event from "../Core/Event.js";
import createMaterialPropertyDescriptor from "./createMaterialPropertyDescriptor.js";
import createPropertyDescriptor from "./createPropertyDescriptor.js";
+/**
+ * @typedef {Object} EllipseGraphics.ConstructorOptions
+ *
+ * Initialization options for the EllipseGraphics constructor
+ *
+ * @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the ellipse.
+ * @property {Property | number} [semiMajorAxis] The numeric Property specifying the semi-major axis.
+ * @property {Property | number} [semiMinorAxis] The numeric Property specifying the semi-minor axis.
+ * @property {Property | number} [height=0] A numeric Property specifying the altitude of the ellipse relative to the ellipsoid surface.
+ * @property {Property | HeightReference} [heightReference=HeightReference.NONE] A Property specifying what the height is relative to.
+ * @property {Property | number} [extrudedHeight] A numeric Property specifying the altitude of the ellipse's extruded face relative to the ellipsoid surface.
+ * @property {Property | HeightReference} [extrudedHeightReference=HeightReference.NONE] A Property specifying what the extrudedHeight is relative to.
+ * @property {Property | number} [rotation=0.0] A numeric property specifying the rotation of the ellipse counter-clockwise from north.
+ * @property {Property | number} [stRotation=0.0] A numeric property specifying the rotation of the ellipse texture counter-clockwise from north.
+ * @property {Property | number} [granularity=Cesium.Math.RADIANS_PER_DEGREE] A numeric Property specifying the angular distance between points on the ellipse.
+ * @property {Property | boolean} [fill=true] A boolean Property specifying whether the ellipse is filled with the provided material.
+ * @property {MaterialProperty | Color} [material=Color.WHITE] A Property specifying the material used to fill the ellipse.
+ * @property {Property | boolean} [outline=false] A boolean Property specifying whether the ellipse is outlined.
+ * @property {Property | Color} [outlineColor=Color.BLACK] A Property specifying the {@link Color} of the outline.
+ * @property {Property | number} [outlineWidth=1.0] A numeric Property specifying the width of the outline.
+ * @property {Property | number} [numberOfVerticalLines=16] A numeric Property specifying the number of vertical lines to draw along the perimeter for the outline.
+ * @property {Property | ShadowMode} [shadows=ShadowMode.DISABLED] An enum Property specifying whether the ellipse casts or receives shadows from light sources.
+ * @property {Property | DistanceDisplayCondition} [distanceDisplayCondition] A Property specifying at what distance from the camera that this ellipse will be displayed.
+ * @property {Property | ClassificationType} [classificationType=ClassificationType.BOTH] An enum Property specifying whether this ellipse will classify terrain, 3D Tiles, or both when on the ground.
+ * @property {ConstantProperty | number} [zIndex=0] A property specifying the zIndex of the Ellipse. Used for ordering ground geometry. Only has an effect if the ellipse is constant and neither height or exturdedHeight are specified.
+ */
+
/**
* Describes an ellipse defined by a center point and semi-major and semi-minor axes.
* The ellipse conforms to the curvature of the globe and can be placed on the surface or
@@ -14,27 +41,7 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* @alias EllipseGraphics
* @constructor
*
- * @param {Object} [options] Object with the following properties:
- * @param {Property} [options.show=true] A boolean Property specifying the visibility of the ellipse.
- * @param {Property} [options.semiMajorAxis] The numeric Property specifying the semi-major axis.
- * @param {Property} [options.semiMinorAxis] The numeric Property specifying the semi-minor axis.
- * @param {Property} [options.height=0] A numeric Property specifying the altitude of the ellipse relative to the ellipsoid surface.
- * @param {Property} [options.heightReference=HeightReference.NONE] A Property specifying what the height is relative to.
- * @param {Property} [options.extrudedHeight] A numeric Property specifying the altitude of the ellipse's extruded face relative to the ellipsoid surface.
- * @param {Property} [options.extrudedHeightReference=HeightReference.NONE] A Property specifying what the extrudedHeight is relative to.
- * @param {Property} [options.rotation=0.0] A numeric property specifying the rotation of the ellipse counter-clockwise from north.
- * @param {Property} [options.stRotation=0.0] A numeric property specifying the rotation of the ellipse texture counter-clockwise from north.
- * @param {Property} [options.granularity=Cesium.Math.RADIANS_PER_DEGREE] A numeric Property specifying the angular distance between points on the ellipse.
- * @param {Property} [options.fill=true] A boolean Property specifying whether the ellipse is filled with the provided material.
- * @param {MaterialProperty} [options.material=Color.WHITE] A Property specifying the material used to fill the ellipse.
- * @param {Property} [options.outline=false] A boolean Property specifying whether the ellipse is outlined.
- * @param {Property} [options.outlineColor=Color.BLACK] A Property specifying the {@link Color} of the outline.
- * @param {Property} [options.outlineWidth=1.0] A numeric Property specifying the width of the outline.
- * @param {Property} [options.numberOfVerticalLines=16] A numeric Property specifying the number of vertical lines to draw along the perimeter for the outline.
- * @param {Property} [options.shadows=ShadowMode.DISABLED] An enum Property specifying whether the ellipse casts or receives shadows from light sources.
- * @param {Property} [options.distanceDisplayCondition] A Property specifying at what distance from the camera that this ellipse will be displayed.
- * @param {Property} [options.classificationType=ClassificationType.BOTH] An enum Property specifying whether this ellipse will classify terrain, 3D Tiles, or both when on the ground.
- * @param {ConstantProperty} [options.zIndex=0] A property specifying the zIndex of the Ellipse. Used for ordering ground geometry. Only has an effect if the ellipse is constant and neither height or exturdedHeight are specified.
+ * @param {EllipseGraphics.ConstructorOptions} [options] Object describing initialization options
*
* @demo {@link https://sandcastle.cesium.com/index.html?src=Circles and Ellipses.html|Cesium Sandcastle Circles and Ellipses Demo}
*/
diff --git a/Source/DataSources/EllipsoidGraphics.js b/Source/DataSources/EllipsoidGraphics.js
index ef2ad391be52..3c999eafda81 100644
--- a/Source/DataSources/EllipsoidGraphics.js
+++ b/Source/DataSources/EllipsoidGraphics.js
@@ -5,31 +5,38 @@ import Event from "../Core/Event.js";
import createMaterialPropertyDescriptor from "./createMaterialPropertyDescriptor.js";
import createPropertyDescriptor from "./createPropertyDescriptor.js";
+/**
+ * @typedef {Object} EllipsoidGraphics.ConstructorOptions
+ *
+ * Initialization options for the EllipsoidGraphics constructor
+ *
+ * @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the ellipsoid.
+ * @property {Property | Cartesian3} [radii] A {@link Cartesian3} Property specifying the radii of the ellipsoid.
+ * @property {Property | Cartesian3} [innerRadii] A {@link Cartesian3} Property specifying the inner radii of the ellipsoid.
+ * @property {Property | number} [minimumClock=0.0] A Property specifying the minimum clock angle of the ellipsoid.
+ * @property {Property | number} [maximumClock=2*PI] A Property specifying the maximum clock angle of the ellipsoid.
+ * @property {Property | number} [minimumCone=0.0] A Property specifying the minimum cone angle of the ellipsoid.
+ * @property {Property | number} [maximumCone=PI] A Property specifying the maximum cone angle of the ellipsoid.
+ * @property {Property | HeightReference} [heightReference=HeightReference.NONE] A Property specifying what the height from the entity position is relative to.
+ * @property {Property | boolean} [fill=true] A boolean Property specifying whether the ellipsoid is filled with the provided material.
+ * @property {MaterialProperty | Color} [material=Color.WHITE] A Property specifying the material used to fill the ellipsoid.
+ * @property {Property | boolean} [outline=false] A boolean Property specifying whether the ellipsoid is outlined.
+ * @property {Property | Color} [outlineColor=Color.BLACK] A Property specifying the {@link Color} of the outline.
+ * @property {Property | number} [outlineWidth=1.0] A numeric Property specifying the width of the outline.
+ * @property {Property | number} [stackPartitions=64] A Property specifying the number of stacks.
+ * @property {Property | number} [slicePartitions=64] A Property specifying the number of radial slices.
+ * @property {Property | number} [subdivisions=128] A Property specifying the number of samples per outline ring, determining the granularity of the curvature.
+ * @property {Property | ShadowMode} [shadows=ShadowMode.DISABLED] An enum Property specifying whether the ellipsoid casts or receives shadows from light sources.
+ * @property {Property | DistanceDisplayCondition} [distanceDisplayCondition] A Property specifying at what distance from the camera that this ellipsoid will be displayed.
+ */
+
/**
* Describe an ellipsoid or sphere. The center position and orientation are determined by the containing {@link Entity}.
*
* @alias EllipsoidGraphics
* @constructor
*
- * @param {Object} [options] Object with the following properties:
- * @param {Property} [options.show=true] A boolean Property specifying the visibility of the ellipsoid.
- * @param {Property} [options.radii] A {@link Cartesian3} Property specifying the radii of the ellipsoid.
- * @param {Property} [options.innerRadii] A {@link Cartesian3} Property specifying the inner radii of the ellipsoid.
- * @param {Property} [options.minimumClock=0.0] A Property specifying the minimum clock angle of the ellipsoid.
- * @param {Property} [options.maximumClock=2*PI] A Property specifying the maximum clock angle of the ellipsoid.
- * @param {Property} [options.minimumCone=0.0] A Property specifying the minimum cone angle of the ellipsoid.
- * @param {Property} [options.maximumCone=PI] A Property specifying the maximum cone angle of the ellipsoid.
- * @param {Property} [options.heightReference=HeightReference.NONE] A Property specifying what the height from the entity position is relative to.
- * @param {Property} [options.fill=true] A boolean Property specifying whether the ellipsoid is filled with the provided material.
- * @param {MaterialProperty} [options.material=Color.WHITE] A Property specifying the material used to fill the ellipsoid.
- * @param {Property} [options.outline=false] A boolean Property specifying whether the ellipsoid is outlined.
- * @param {Property} [options.outlineColor=Color.BLACK] A Property specifying the {@link Color} of the outline.
- * @param {Property} [options.outlineWidth=1.0] A numeric Property specifying the width of the outline.
- * @param {Property} [options.stackPartitions=64] A Property specifying the number of stacks.
- * @param {Property} [options.slicePartitions=64] A Property specifying the number of radial slices.
- * @param {Property} [options.subdivisions=128] A Property specifying the number of samples per outline ring, determining the granularity of the curvature.
- * @param {Property} [options.shadows=ShadowMode.DISABLED] An enum Property specifying whether the ellipsoid casts or receives shadows from light sources.
- * @param {Property} [options.distanceDisplayCondition] A Property specifying at what distance from the camera that this ellipsoid will be displayed.
+ * @param {EllipsoidGraphics.ConstructorOptions} [options] Object describing initialization options
*
* @demo {@link https://sandcastle.cesium.com/index.html?src=Spheres%20and%20Ellipsoids.html|Cesium Sandcastle Spheres and Ellipsoids Demo}
*/
diff --git a/Source/DataSources/Entity.js b/Source/DataSources/Entity.js
index c0a8097b1ea0..e57a5161fa5f 100644
--- a/Source/DataSources/Entity.js
+++ b/Source/DataSources/Entity.js
@@ -60,6 +60,42 @@ function createPropertyTypeDescriptor(name, Type) {
});
}
+/**
+ * @typedef {Object} Entity.ConstructorOptions
+ *
+ * Initialization options for the Entity constructor
+ *
+ * @property {String} [id] A unique identifier for this object. If none is provided, a GUID is generated.
+ * @property {String} [name] A human readable name to display to users. It does not have to be unique.
+ * @property {TimeIntervalCollection} [availability] The availability, if any, associated with this object.
+ * @property {Boolean} [show] A boolean value indicating if the entity and its children are displayed.
+ * @property {Property | string} [description] A string Property specifying an HTML description for this entity.
+ * @property {PositionProperty | Cartesian3} [position] A Property specifying the entity position.
+ * **** TODO ****
+ * @property {Property} [orientation] A Property specifying the entity orientation.
+ * **** TODO ****
+ * @property {Property} [viewFrom] A suggested initial offset for viewing this object.
+ * @property {Entity} [parent] A parent entity to associate with this entity.
+ * @property {BillboardGraphics | BillboardGraphics.ConstructorOptions} [billboard] A billboard to associate with this entity.
+ * @property {BoxGraphics | BoxGraphics.ConstructorOptions} [box] A box to associate with this entity.
+ * @property {CorridorGraphics | CorridorGraphics.ConstructorOptions} [corridor] A corridor to associate with this entity.
+ * @property {CylinderGraphics | CylinderGraphics.ConstructorOptions} [cylinder] A cylinder to associate with this entity.
+ * @property {EllipseGraphics | EllipseGraphics.ConstructorOptions} [ellipse] A ellipse to associate with this entity.
+ * @property {EllipsoidGraphics | EllipsoidGraphics.ConstructorOptions} [ellipsoid] A ellipsoid to associate with this entity.
+ * @property {LabelGraphics | LabelGraphics.ConstructorOptions} [label] A options.label to associate with this entity.
+ * @property {ModelGraphics | ModelGraphics.ConstructorOptions} [model] A model to associate with this entity.
+ * @property {Cesium3DTilesetGraphics | Cesium3DTilesetGraphics.ConstructorOptions} [tileset] A 3D Tiles tileset to associate with this entity.
+ * @property {PathGraphics | PathGraphics.ConstructorOptions} [path] A path to associate with this entity.
+ * @property {PlaneGraphics | PlaneGraphics.ConstructorOptions} [plane] A plane to associate with this entity.
+ * @property {PointGraphics | PointGraphics.ConstructorOptions} [point] A point to associate with this entity.
+ * @property {PolygonGraphics | PolygonGraphics.ConstructorOptions} [polygon] A polygon to associate with this entity.
+ * @property {PolylineGraphics | PolylineGraphics.ConstructorOptions} [polyline] A polyline to associate with this entity.
+ * @property {PropertyBag | Object.} [properties] Arbitrary properties to associate with this entity.
+ * @property {PolylineVolumeGraphics | PolylineVolumeGraphics.ConstructorOptions} [polylineVolume] A polylineVolume to associate with this entity.
+ * @property {RectangleGraphics | RectangleGraphics.ConstructorOptions} [rectangle] A rectangle to associate with this entity.
+ * @property {WallGraphics | WallGraphics.ConstructorOptions} [wall] A wall to associate with this entity.
+ */
+
/**
* Entity instances aggregate multiple forms of visualization into a single high-level object.
* They can be created manually and added to {@link Viewer#entities} or be produced by
@@ -67,34 +103,7 @@ function createPropertyTypeDescriptor(name, Type) {
* @alias Entity
* @constructor
*
- * @param {Object} [options] Object with the following properties:
- * @param {String} [options.id] A unique identifier for this object. If none is provided, a GUID is generated.
- * @param {String} [options.name] A human readable name to display to users. It does not have to be unique.
- * @param {TimeIntervalCollection} [options.availability] The availability, if any, associated with this object.
- * @param {Boolean} [options.show] A boolean value indicating if the entity and its children are displayed.
- * @param {Property} [options.description] A string Property specifying an HTML description for this entity.
- * @param {PositionProperty} [options.position] A Property specifying the entity position.
- * @param {Property} [options.orientation] A Property specifying the entity orientation.
- * @param {Property} [options.viewFrom] A suggested initial offset for viewing this object.
- * @param {Entity} [options.parent] A parent entity to associate with this entity.
- * @param {BillboardGraphics} [options.billboard] A billboard to associate with this entity.
- * @param {BoxGraphics} [options.box] A box to associate with this entity.
- * @param {CorridorGraphics} [options.corridor] A corridor to associate with this entity.
- * @param {CylinderGraphics} [options.cylinder] A cylinder to associate with this entity.
- * @param {EllipseGraphics} [options.ellipse] A ellipse to associate with this entity.
- * @param {EllipsoidGraphics} [options.ellipsoid] A ellipsoid to associate with this entity.
- * @param {LabelGraphics} [options.label] A options.label to associate with this entity.
- * @param {ModelGraphics} [options.model] A model to associate with this entity.
- * @param {Cesium3DTilesetGraphics} [options.tileset] A 3D Tiles tileset to associate with this entity.
- * @param {PathGraphics} [options.path] A path to associate with this entity.
- * @param {PlaneGraphics} [options.plane] A plane to associate with this entity.
- * @param {PointGraphics} [options.point] A point to associate with this entity.
- * @param {PolygonGraphics} [options.polygon] A polygon to associate with this entity.
- * @param {PolylineGraphics} [options.polyline] A polyline to associate with this entity.
- * @param {PropertyBag} [options.properties] Arbitrary properties to associate with this entity.
- * @param {PolylineVolumeGraphics} [options.polylineVolume] A polylineVolume to associate with this entity.
- * @param {RectangleGraphics} [options.rectangle] A rectangle to associate with this entity.
- * @param {WallGraphics} [options.wall] A wall to associate with this entity.
+ * @param {Entity.ConstructorOptions} [options] Object describing initialization options
*
* @see {@link https://cesium.com/docs/tutorials/creating-entities/|Creating Entities}
*/
diff --git a/Source/DataSources/EntityCollection.js b/Source/DataSources/EntityCollection.js
index c28ce12c4f6a..9bd630ab63ec 100644
--- a/Source/DataSources/EntityCollection.js
+++ b/Source/DataSources/EntityCollection.js
@@ -264,7 +264,7 @@ EntityCollection.prototype.computeAvailability = function () {
/**
* Add an entity to the collection.
*
- * @param {Entity} entity The entity to be added.
+ * @param {Entity | Entity.ConstructorOptions} entity The entity to be added.
* @returns {Entity} The entity that was added.
* @exception {DeveloperError} An entity with already exists in this collection.
*/
diff --git a/Source/DataSources/LabelGraphics.js b/Source/DataSources/LabelGraphics.js
index 18502e83b813..3495a7e88e08 100644
--- a/Source/DataSources/LabelGraphics.js
+++ b/Source/DataSources/LabelGraphics.js
@@ -4,6 +4,34 @@ import DeveloperError from "../Core/DeveloperError.js";
import Event from "../Core/Event.js";
import createPropertyDescriptor from "./createPropertyDescriptor.js";
+/**
+ * @typedef {Object} LabelGraphics.ConstructorOptions
+ *
+ * Initialization options for the LabelGraphics constructor
+ *
+ * @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the label.
+ * @property {Property | string} [text] A Property specifying the text. Explicit newlines '\n' are supported.
+ * @property {Property | string} [font='30px sans-serif'] A Property specifying the CSS font.
+ * @property {Property | LabelStyle} [style=LabelStyle.FILL] A Property specifying the {@link LabelStyle}.
+ * @property {Property | number} [scale=1.0] A numeric Property specifying the scale to apply to the text.
+ * @property {Property | boolean} [showBackground=false] A boolean Property specifying the visibility of the background behind the label.
+ * @property {Property | Color} [backgroundColor=new Color(0.165, 0.165, 0.165, 0.8)] A Property specifying the background {@link Color}.
+ * @property {Property | Cartesian2} [backgroundPadding=new Cartesian2(7, 5)] A {@link Cartesian2} Property specifying the horizontal and vertical background padding in pixels.
+ * @property {Property | Cartesian2} [pixelOffset=Cartesian2.ZERO] A {@link Cartesian2} Property specifying the pixel offset.
+ * @property {Property | Cartesian3} [eyeOffset=Cartesian3.ZERO] A {@link Cartesian3} Property specifying the eye offset.
+ * @property {Property | HorizontalOrigin} [horizontalOrigin=HorizontalOrigin.CENTER] A Property specifying the {@link HorizontalOrigin}.
+ * @property {Property | VerticalOrigin} [verticalOrigin=VerticalOrigin.CENTER] A Property specifying the {@link VerticalOrigin}.
+ * @property {Property | HeightReference} [heightReference=HeightReference.NONE] A Property specifying what the height is relative to.
+ * @property {Property | Color} [fillColor=Color.WHITE] A Property specifying the fill {@link Color}.
+ * @property {Property | Color} [outlineColor=Color.BLACK] A Property specifying the outline {@link Color}.
+ * @property {Property | number} [outlineWidth=1.0] A numeric Property specifying the outline width.
+ * @property {Property | NearFarScalar} [translucencyByDistance] A {@link NearFarScalar} Property used to set translucency based on distance from the camera.
+ * @property {Property | NearFarScalar} [pixelOffsetScaleByDistance] A {@link NearFarScalar} Property used to set pixelOffset based on distance from the camera.
+ * @property {Property | NearFarScalar} [scaleByDistance] A {@link NearFarScalar} Property used to set scale based on distance from the camera.
+ * @property {Property | DistanceDisplayCondition} [distanceDisplayCondition] A Property specifying at what distance from the camera that this label will be displayed.
+ * @property {Property | number} [disableDepthTestDistance] A Property specifying the distance from the camera at which to disable the depth test to.
+ */
+
/**
* Describes a two dimensional label located at the position of the containing {@link Entity}.
*
@@ -16,28 +44,7 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* @alias LabelGraphics
* @constructor
*
- * @param {Object} [options] Object with the following properties:
- * @param {Property} [options.show=true] A boolean Property specifying the visibility of the label.
- * @param {Property} [options.text] A Property specifying the text. Explicit newlines '\n' are supported.
- * @param {Property} [options.font='30px sans-serif'] A Property specifying the CSS font.
- * @param {Property} [options.style=LabelStyle.FILL] A Property specifying the {@link LabelStyle}.
- * @param {Property} [options.scale=1.0] A numeric Property specifying the scale to apply to the text.
- * @param {Property} [options.showBackground=false] A boolean Property specifying the visibility of the background behind the label.
- * @param {Property} [options.backgroundColor=new Color(0.165, 0.165, 0.165, 0.8)] A Property specifying the background {@link Color}.
- * @param {Property} [options.backgroundPadding=new Cartesian2(7, 5)] A {@link Cartesian2} Property specifying the horizontal and vertical background padding in pixels.
- * @param {Property} [options.pixelOffset=Cartesian2.ZERO] A {@link Cartesian2} Property specifying the pixel offset.
- * @param {Property} [options.eyeOffset=Cartesian3.ZERO] A {@link Cartesian3} Property specifying the eye offset.
- * @param {Property} [options.horizontalOrigin=HorizontalOrigin.CENTER] A Property specifying the {@link HorizontalOrigin}.
- * @param {Property} [options.verticalOrigin=VerticalOrigin.CENTER] A Property specifying the {@link VerticalOrigin}.
- * @param {Property} [options.heightReference=HeightReference.NONE] A Property specifying what the height is relative to.
- * @param {Property} [options.fillColor=Color.WHITE] A Property specifying the fill {@link Color}.
- * @param {Property} [options.outlineColor=Color.BLACK] A Property specifying the outline {@link Color}.
- * @param {Property} [options.outlineWidth=1.0] A numeric Property specifying the outline width.
- * @param {Property} [options.translucencyByDistance] A {@link NearFarScalar} Property used to set translucency based on distance from the camera.
- * @param {Property} [options.pixelOffsetScaleByDistance] A {@link NearFarScalar} Property used to set pixelOffset based on distance from the camera.
- * @param {Property} [options.scaleByDistance] A {@link NearFarScalar} Property used to set scale based on distance from the camera.
- * @param {Property} [options.distanceDisplayCondition] A Property specifying at what distance from the camera that this label will be displayed.
- * @param {Property} [options.disableDepthTestDistance] A Property specifying the distance from the camera at which to disable the depth test to.
+ * @param {LabelGraphics.ConstructorOptions} [options] Object describing initialization options
*
* @demo {@link https://sandcastle.cesium.com/index.html?src=Labels.html|Cesium Sandcastle Labels Demo}
*/
diff --git a/Source/DataSources/ModelGraphics.js b/Source/DataSources/ModelGraphics.js
index feb714d52cbb..a30b00954c88 100644
--- a/Source/DataSources/ModelGraphics.js
+++ b/Source/DataSources/ModelGraphics.js
@@ -18,6 +18,34 @@ function createArticulationStagePropertyBag(value) {
return new PropertyBag(value);
}
+/**
+ * @typedef {Object} ModelGraphics.ConstructorOptions
+ *
+ * Initialization options for the ModelGraphics constructor
+ *
+ * @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the model.
+ * @property {Property | string | Resource} [uri] A string or Resource Property specifying the URI of the glTF asset.
+ * @property {Property | number} [scale=1.0] A numeric Property specifying a uniform linear scale.
+ * @property {Property | number} [minimumPixelSize=0.0] A numeric Property specifying the approximate minimum pixel size of the model regardless of zoom.
+ * @property {Property | number} [maximumScale] The maximum scale size of a model. An upper limit for minimumPixelSize.
+ * @property {Property | boolean} [incrementallyLoadTextures=true] Determine if textures may continue to stream in after the model is loaded.
+ * @property {Property | boolean} [runAnimations=true] A boolean Property specifying if glTF animations specified in the model should be started.
+ * @property {Property | boolean} [clampAnimations=true] A boolean Property specifying if glTF animations should hold the last pose for time durations with no keyframes.
+ * @property {Property | ShadowMode} [shadows=ShadowMode.ENABLED] An enum Property specifying whether the model casts or receives shadows from light sources.
+ * @property {Property | HeightReference} [heightReference=HeightReference.NONE] A Property specifying what the height is relative to.
+ * @property {Property | Color} [silhouetteColor=Color.RED] A Property specifying the {@link Color} of the silhouette.
+ * @property {Property | number} [silhouetteSize=0.0] A numeric Property specifying the size of the silhouette in pixels.
+ * @property {Property | Color} [color=Color.WHITE] A Property specifying the {@link Color} that blends with the model's rendered color.
+ * @property {Property | ColorBlendMode} [colorBlendMode=ColorBlendMode.HIGHLIGHT] An enum Property specifying how the color blends with the model.
+ * @property {Property | number} [colorBlendAmount=0.5] A numeric Property specifying the color strength when the colorBlendMode
is MIX
. A value of 0.0 results in the model's rendered color while a value of 1.0 results in a solid color, with any value in-between resulting in a mix of the two.
+ * @property {Property | Cartesian2} [imageBasedLightingFactor=new Cartesian2(1.0, 1.0)] A property specifying the contribution from diffuse and specular image-based lighting.
+ * @property {Property | Color} [lightColor] A property specifying the light color when shading the model. When undefined
the scene's light color is used instead.
+ * @property {Property | DistanceDisplayCondition} [distanceDisplayCondition] A Property specifying at what distance from the camera that this model will be displayed.
+ * @property {PropertyBag | Object.} [nodeTransformations] An object, where keys are names of nodes, and values are {@link TranslationRotationScale} Properties describing the transformation to apply to that node. The transformation is applied after the node's existing transformation as specified in the glTF, and does not replace the node's existing transformation.
+ * @property {PropertyBag | Object.} [articulations] An object, where keys are composed of an articulation name, a single space, and a stage name, and the values are numeric properties.
+ * @property {Property | ClippingPlaneCollection} [clippingPlanes] A property specifying the {@link ClippingPlaneCollection} used to selectively disable rendering the model.
+ */
+
/**
* A 3D model based on {@link https://github.com/KhronosGroup/glTF|glTF}, the runtime asset format for WebGL, OpenGL ES, and OpenGL.
* The position and orientation of the model is determined by the containing {@link Entity}.
@@ -29,28 +57,7 @@ function createArticulationStagePropertyBag(value) {
* @alias ModelGraphics
* @constructor
*
- * @param {Object} [options] Object with the following properties:
- * @param {Property} [options.show=true] A boolean Property specifying the visibility of the model.
- * @param {Property} [options.uri] A string or Resource Property specifying the URI of the glTF asset.
- * @param {Property} [options.scale=1.0] A numeric Property specifying a uniform linear scale.
- * @param {Property} [options.minimumPixelSize=0.0] A numeric Property specifying the approximate minimum pixel size of the model regardless of zoom.
- * @param {Property} [options.maximumScale] The maximum scale size of a model. An upper limit for minimumPixelSize.
- * @param {Property} [options.incrementallyLoadTextures=true] Determine if textures may continue to stream in after the model is loaded.
- * @param {Property} [options.runAnimations=true] A boolean Property specifying if glTF animations specified in the model should be started.
- * @param {Property} [options.clampAnimations=true] A boolean Property specifying if glTF animations should hold the last pose for time durations with no keyframes.
- * @param {Property} [options.shadows=ShadowMode.ENABLED] An enum Property specifying whether the model casts or receives shadows from light sources.
- * @param {Property} [options.heightReference=HeightReference.NONE] A Property specifying what the height is relative to.
- * @param {Property} [options.silhouetteColor=Color.RED] A Property specifying the {@link Color} of the silhouette.
- * @param {Property} [options.silhouetteSize=0.0] A numeric Property specifying the size of the silhouette in pixels.
- * @param {Property} [options.color=Color.WHITE] A Property specifying the {@link Color} that blends with the model's rendered color.
- * @param {Property} [options.colorBlendMode=ColorBlendMode.HIGHLIGHT] An enum Property specifying how the color blends with the model.
- * @param {Property} [options.colorBlendAmount=0.5] A numeric Property specifying the color strength when the colorBlendMode
is MIX
. A value of 0.0 results in the model's rendered color while a value of 1.0 results in a solid color, with any value in-between resulting in a mix of the two.
- * @param {Property} [options.imageBasedLightingFactor=new Cartesian2(1.0, 1.0)] A property specifying the contribution from diffuse and specular image-based lighting.
- * @param {Property} [options.lightColor] A property specifying the light color when shading the model. When undefined
the scene's light color is used instead.
- * @param {Property} [options.distanceDisplayCondition] A Property specifying at what distance from the camera that this model will be displayed.
- * @param {PropertyBag} [options.nodeTransformations] An object, where keys are names of nodes, and values are {@link TranslationRotationScale} Properties describing the transformation to apply to that node. The transformation is applied after the node's existing transformation as specified in the glTF, and does not replace the node's existing transformation.
- * @param {PropertyBag} [options.articulations] An object, where keys are composed of an articulation name, a single space, and a stage name, and the values are numeric properties.
- * @param {Property} [options.clippingPlanes] A property specifying the {@link ClippingPlaneCollection} used to selectively disable rendering the model.
+ * @param {ModelGraphics.ConstructorOptions} [options] Object describing initialization options
*
* @see {@link https://cesium.com/docs/tutorials/3d-models/|3D Models Tutorial}
* @demo {@link https://sandcastle.cesium.com/index.html?src=3D%20Models.html|Cesium Sandcastle 3D Models Demo}
diff --git a/Source/DataSources/PathGraphics.js b/Source/DataSources/PathGraphics.js
index ba377b917498..4e95e18792de 100644
--- a/Source/DataSources/PathGraphics.js
+++ b/Source/DataSources/PathGraphics.js
@@ -5,20 +5,27 @@ import Event from "../Core/Event.js";
import createMaterialPropertyDescriptor from "./createMaterialPropertyDescriptor.js";
import createPropertyDescriptor from "./createPropertyDescriptor.js";
+/**
+ * @typedef {Object} PathGraphics.ConstructorOptions
+ *
+ * Initialization options for the PathGraphics constructor
+ *
+ * @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the path.
+ * @property {Property | number} [leadTime] A Property specifying the number of seconds in front the object to show.
+ * @property {Property | number} [trailTime] A Property specifying the number of seconds behind of the object to show.
+ * @property {Property | number} [width=1.0] A numeric Property specifying the width in pixels.
+ * @property {Property | number} [resolution=60] A numeric Property specifying the maximum number of seconds to step when sampling the position.
+ * @property {MaterialProperty | Color} [material=Color.WHITE] A Property specifying the material used to draw the path.
+ * @property {Property | DistanceDisplayCondition} [distanceDisplayCondition] A Property specifying at what distance from the camera that this path will be displayed.
+ */
+
/**
* Describes a polyline defined as the path made by an {@link Entity} as it moves over time.
*
* @alias PathGraphics
* @constructor
*
- * @param {Object} [options] Object with the following properties:
- * @param {Property} [options.show=true] A boolean Property specifying the visibility of the path.
- * @param {Property} [options.leadTime] A Property specifying the number of seconds in front the object to show.
- * @param {Property} [options.trailTime] A Property specifying the number of seconds behind of the object to show.
- * @param {Property} [options.width=1.0] A numeric Property specifying the width in pixels.
- * @param {Property} [options.resolution=60] A numeric Property specifying the maximum number of seconds to step when sampling the position.
- * @param {MaterialProperty} [options.material=Color.WHITE] A Property specifying the material used to draw the path.
- * @param {Property} [options.distanceDisplayCondition] A Property specifying at what distance from the camera that this path will be displayed.
+ * @param {PathGraphics.ConstructorOptions} [options] Object describing initialization options
*/
function PathGraphics(options) {
this._definitionChanged = new Event();
diff --git a/Source/DataSources/PlaneGraphics.js b/Source/DataSources/PlaneGraphics.js
index 610733a723b6..2745da6a6661 100644
--- a/Source/DataSources/PlaneGraphics.js
+++ b/Source/DataSources/PlaneGraphics.js
@@ -5,23 +5,30 @@ import Event from "../Core/Event.js";
import createMaterialPropertyDescriptor from "./createMaterialPropertyDescriptor.js";
import createPropertyDescriptor from "./createPropertyDescriptor.js";
+/**
+ * @typedef {Object} PlaneGraphics.ConstructorOptions
+ *
+ * Initialization options for the PlaneGraphics constructor
+ *
+ * @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the plane.
+ * @property {Property | Plane} [plane] A {@link Plane} Property specifying the normal and distance for the plane.
+ * @property {Property | Cartesian2} [dimensions] A {@link Cartesian2} Property specifying the width and height of the plane.
+ * @property {Property | boolean} [fill=true] A boolean Property specifying whether the plane is filled with the provided material.
+ * @property {MaterialProperty | Color} [material=Color.WHITE] A Property specifying the material used to fill the plane.
+ * @property {Property | boolean} [outline=false] A boolean Property specifying whether the plane is outlined.
+ * @property {Property | Color} [outlineColor=Color.BLACK] A Property specifying the {@link Color} of the outline.
+ * @property {Property | number} [outlineWidth=1.0] A numeric Property specifying the width of the outline.
+ * @property {Property | ShadowMode} [shadows=ShadowMode.DISABLED] An enum Property specifying whether the plane casts or receives shadows from light sources.
+ * @property {Property | DistanceDisplayCondition} [distanceDisplayCondition] A Property specifying at what distance from the camera that this plane will be displayed.
+ */
+
/**
* Describes a plane. The center position and orientation are determined by the containing {@link Entity}.
*
* @alias PlaneGraphics
* @constructor
*
- * @param {Object} [options] Object with the following properties:
- * @param {Property} [options.show=true] A boolean Property specifying the visibility of the plane.
- * @param {Property} [options.plane] A {@link Plane} Property specifying the normal and distance for the plane.
- * @param {Property} [options.dimensions] A {@link Cartesian2} Property specifying the width and height of the plane.
- * @param {Property} [options.fill=true] A boolean Property specifying whether the plane is filled with the provided material.
- * @param {MaterialProperty} [options.material=Color.WHITE] A Property specifying the material used to fill the plane.
- * @param {Property} [options.outline=false] A boolean Property specifying whether the plane is outlined.
- * @param {Property} [options.outlineColor=Color.BLACK] A Property specifying the {@link Color} of the outline.
- * @param {Property} [options.outlineWidth=1.0] A numeric Property specifying the width of the outline.
- * @param {Property} [options.shadows=ShadowMode.DISABLED] An enum Property specifying whether the plane casts or receives shadows from light sources.
- * @param {Property} [options.distanceDisplayCondition] A Property specifying at what distance from the camera that this plane will be displayed.
+ * @param {PlaneGraphics.ConstructorOptions} [options] Object describing initialization options
*
* @demo {@link https://sandcastle.cesium.com/index.html?src=Plane.html|Cesium Sandcastle Plane Demo}
*/
diff --git a/Source/DataSources/PointGraphics.js b/Source/DataSources/PointGraphics.js
index eff6d916eeec..982d86906ff8 100644
--- a/Source/DataSources/PointGraphics.js
+++ b/Source/DataSources/PointGraphics.js
@@ -4,23 +4,30 @@ import DeveloperError from "../Core/DeveloperError.js";
import Event from "../Core/Event.js";
import createPropertyDescriptor from "./createPropertyDescriptor.js";
+/**
+ * @typedef {Object} PointGraphics.ConstructorOptions
+ *
+ * Initialization options for the PointGraphics constructor
+ *
+ * @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the point.
+ * @property {Property | number} [pixelSize=1] A numeric Property specifying the size in pixels.
+ * @property {Property | HeightReference} [heightReference=HeightReference.NONE] A Property specifying what the height is relative to.
+ * @property {Property | Color} [color=Color.WHITE] A Property specifying the {@link Color} of the point.
+ * @property {Property | Color} [outlineColor=Color.BLACK] A Property specifying the {@link Color} of the outline.
+ * @property {Property | number} [outlineWidth=0] A numeric Property specifying the the outline width in pixels.
+ * @property {Property | NearFarScalar} [scaleByDistance] A {@link NearFarScalar} Property used to scale the point based on distance.
+ * @property {Property | NearFarScalar} [translucencyByDistance] A {@link NearFarScalar} Property used to set translucency based on distance from the camera.
+ * @property {Property | DistanceDisplayCondition} [distanceDisplayCondition] A Property specifying at what distance from the camera that this point will be displayed.
+ * @property {Property | number} [disableDepthTestDistance] A Property specifying the distance from the camera at which to disable the depth test to.
+ */
+
/**
* Describes a graphical point located at the position of the containing {@link Entity}.
*
* @alias PointGraphics
* @constructor
*
- * @param {Object} [options] Object with the following properties:
- * @param {Property} [options.show=true] A boolean Property specifying the visibility of the point.
- * @param {Property} [options.pixelSize=1] A numeric Property specifying the size in pixels.
- * @param {Property} [options.heightReference=HeightReference.NONE] A Property specifying what the height is relative to.
- * @param {Property} [options.color=Color.WHITE] A Property specifying the {@link Color} of the point.
- * @param {Property} [options.outlineColor=Color.BLACK] A Property specifying the {@link Color} of the outline.
- * @param {Property} [options.outlineWidth=0] A numeric Property specifying the the outline width in pixels.
- * @param {Property} [options.scaleByDistance] A {@link NearFarScalar} Property used to scale the point based on distance.
- * @param {Property} [options.translucencyByDistance] A {@link NearFarScalar} Property used to set translucency based on distance from the camera.
- * @param {Property} [options.distanceDisplayCondition] A Property specifying at what distance from the camera that this point will be displayed.
- * @param {Property} [options.disableDepthTestDistance] A Property specifying the distance from the camera at which to disable the depth test to.
+ * @param {PointGraphics.ConstructorOptions} [options] Object describing initialization options
*/
function PointGraphics(options) {
this._definitionChanged = new Event();
diff --git a/Source/DataSources/PolygonGraphics.js b/Source/DataSources/PolygonGraphics.js
index c3fb0b10d854..fb813e568dca 100644
--- a/Source/DataSources/PolygonGraphics.js
+++ b/Source/DataSources/PolygonGraphics.js
@@ -15,6 +15,34 @@ function createPolygonHierarchyProperty(value) {
return new ConstantProperty(value);
}
+/**
+ * @typedef {Object} PolygonGraphics.ConstructorOptions
+ *
+ * Initialization options for the PolygonGraphics constructor
+ *
+ * @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the polygon.
+ * @property {Property | PolygonHierarchy} [hierarchy] A Property specifying the {@link PolygonHierarchy}.
+ * @property {Property | number} [height=0] A numeric Property specifying the altitude of the polygon relative to the ellipsoid surface.
+ * @property {Property | HeightReference} [heightReference=HeightReference.NONE] A Property specifying what the height is relative to.
+ * @property {Property | number} [extrudedHeight] A numeric Property specifying the altitude of the polygon's extruded face relative to the ellipsoid surface.
+ * @property {Property | HeightReference} [extrudedHeightReference=HeightReference.NONE] A Property specifying what the extrudedHeight is relative to.
+ * @property {Property | number} [stRotation=0.0] A numeric property specifying the rotation of the polygon texture counter-clockwise from north.
+ * @property {Property | number} [granularity=Cesium.Math.RADIANS_PER_DEGREE] A numeric Property specifying the angular distance between each latitude and longitude point.
+ * @property {Property | boolean} [fill=true] A boolean Property specifying whether the polygon is filled with the provided material.
+ * @property {MaterialProperty | Color} [material=Color.WHITE] A Property specifying the material used to fill the polygon.
+ * @property {Property | boolean} [outline=false] A boolean Property specifying whether the polygon is outlined.
+ * @property {Property | Color} [outlineColor=Color.BLACK] A Property specifying the {@link Color} of the outline.
+ * @property {Property | number} [outlineWidth=1.0] A numeric Property specifying the width of the outline.
+ * @property {Property | boolean} [perPositionHeight=false] A boolean specifying whether or not the height of each position is used.
+ * @property {Boolean | boolean} [closeTop=true] When false, leaves off the top of an extruded polygon open.
+ * @property {Boolean | boolean} [closeBottom=true] When false, leaves off the bottom of an extruded polygon open.
+ * @property {Property | ArcType} [arcType=ArcType.GEODESIC] The type of line the polygon edges must follow.
+ * @property {Property | ShadowMode} [shadows=ShadowMode.DISABLED] An enum Property specifying whether the polygon casts or receives shadows from light sources.
+ * @property {Property | DistanceDisplayCondition} [distanceDisplayCondition] A Property specifying at what distance from the camera that this polygon will be displayed.
+ * @property {Property | ClassificationType} [classificationType=ClassificationType.BOTH] An enum Property specifying whether this polygon will classify terrain, 3D Tiles, or both when on the ground.
+ * @property {ConstantProperty | number} [zIndex=0] A property specifying the zIndex used for ordering ground geometry. Only has an effect if the polygon is constant and neither height or extrudedHeight are specified.
+ */
+
/**
* Describes a polygon defined by an hierarchy of linear rings which make up the outer shape and any nested holes.
* The polygon conforms to the curvature of the globe and can be placed on the surface or
@@ -23,28 +51,7 @@ function createPolygonHierarchyProperty(value) {
* @alias PolygonGraphics
* @constructor
*
- * @param {Object} [options] Object with the following properties:
- * @param {Property} [options.show=true] A boolean Property specifying the visibility of the polygon.
- * @param {Property} [options.hierarchy] A Property specifying the {@link PolygonHierarchy}.
- * @param {Property} [options.height=0] A numeric Property specifying the altitude of the polygon relative to the ellipsoid surface.
- * @param {Property} [options.heightReference=HeightReference.NONE] A Property specifying what the height is relative to.
- * @param {Property} [options.extrudedHeight] A numeric Property specifying the altitude of the polygon's extruded face relative to the ellipsoid surface.
- * @param {Property} [options.extrudedHeightReference=HeightReference.NONE] A Property specifying what the extrudedHeight is relative to.
- * @param {Property} [options.stRotation=0.0] A numeric property specifying the rotation of the polygon texture counter-clockwise from north.
- * @param {Property} [options.granularity=Cesium.Math.RADIANS_PER_DEGREE] A numeric Property specifying the angular distance between each latitude and longitude point.
- * @param {Property} [options.fill=true] A boolean Property specifying whether the polygon is filled with the provided material.
- * @param {MaterialProperty} [options.material=Color.WHITE] A Property specifying the material used to fill the polygon.
- * @param {Property} [options.outline=false] A boolean Property specifying whether the polygon is outlined.
- * @param {Property} [options.outlineColor=Color.BLACK] A Property specifying the {@link Color} of the outline.
- * @param {Property} [options.outlineWidth=1.0] A numeric Property specifying the width of the outline.
- * @param {Property} [options.perPositionHeight=false] A boolean specifying whether or not the height of each position is used.
- * @param {Boolean} [options.closeTop=true] When false, leaves off the top of an extruded polygon open.
- * @param {Boolean} [options.closeBottom=true] When false, leaves off the bottom of an extruded polygon open.
- * @param {Property} [options.arcType=ArcType.GEODESIC] The type of line the polygon edges must follow.
- * @param {Property} [options.shadows=ShadowMode.DISABLED] An enum Property specifying whether the polygon casts or receives shadows from light sources.
- * @param {Property} [options.distanceDisplayCondition] A Property specifying at what distance from the camera that this polygon will be displayed.
- * @param {Property} [options.classificationType=ClassificationType.BOTH] An enum Property specifying whether this polygon will classify terrain, 3D Tiles, or both when on the ground.
- * @param {ConstantProperty} [options.zIndex=0] A property specifying the zIndex used for ordering ground geometry. Only has an effect if the polygon is constant and neither height or extrudedHeight are specified.
+ * @param {PolygonGraphics.ConstructorOptions} [options] Object describing initialization options
*
* @see Entity
* @demo {@link https://sandcastle.cesium.com/index.html?src=Polygon.html|Cesium Sandcastle Polygon Demo}
diff --git a/Source/DataSources/PolylineGraphics.js b/Source/DataSources/PolylineGraphics.js
index 2096a57ec31b..1230a1565490 100644
--- a/Source/DataSources/PolylineGraphics.js
+++ b/Source/DataSources/PolylineGraphics.js
@@ -5,6 +5,28 @@ import Event from "../Core/Event.js";
import createMaterialPropertyDescriptor from "./createMaterialPropertyDescriptor.js";
import createPropertyDescriptor from "./createPropertyDescriptor.js";
+/**
+ * @typedef {Object} PolylineGraphics.ConstructorOptions
+ *
+ * Initialization options for the PolylineGraphics constructor
+ *
+ * @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the polyline.
+ * @property {Property | Array} [positions] A Property specifying the array of {@link Cartesian3} positions that define the line strip.
+ * @property {Property | number} [width=1.0] A numeric Property specifying the width in pixels.
+ * @property {Property | number} [granularity=Cesium.Math.RADIANS_PER_DEGREE] A numeric Property specifying the angular distance between each latitude and longitude if arcType is not ArcType.NONE.
+ * @property {MaterialProperty | Color} [material=Color.WHITE] A Property specifying the material used to draw the polyline.
+ * @property {MaterialProperty | Color} [depthFailMaterial] A property specifying the material used to draw the polyline when it is below the terrain.
+ *
+ * **** TODO **** this was originally only ArcType, not a Property (!) -- pretty sure that was wrong?
+ *
+ * @property {Property | ArcType} [arcType=ArcType.GEODESIC] The type of line the polyline segments must follow.
+ * @property {Property | boolean} [clampToGround=false] A boolean Property specifying whether the Polyline should be clamped to the ground.
+ * @property {Property | ShadowMode} [shadows=ShadowMode.DISABLED] An enum Property specifying whether the polyline casts or receives shadows from light sources.
+ * @property {Property | DistanceDisplayCondition} [distanceDisplayCondition] A Property specifying at what distance from the camera that this polyline will be displayed.
+ * @property {Property | ClassificationType} [classificationType=ClassificationType.BOTH] An enum Property specifying whether this polyline will classify terrain, 3D Tiles, or both when on the ground.
+ * @property {Property | number} [zIndex=0] A Property specifying the zIndex used for ordering ground geometry. Only has an effect if `clampToGround` is true and polylines on terrain is supported.
+ */
+
/**
* Describes a polyline. The first two positions define a line segment,
* and each additional position defines a line segment from the previous position. The segments
@@ -13,19 +35,7 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* @alias PolylineGraphics
* @constructor
*
- * @param {Object} [options] Object with the following properties:
- * @param {Property} [options.show=true] A boolean Property specifying the visibility of the polyline.
- * @param {Property} [options.positions] A Property specifying the array of {@link Cartesian3} positions that define the line strip.
- * @param {Property} [options.width=1.0] A numeric Property specifying the width in pixels.
- * @param {Property} [options.granularity=Cesium.Math.RADIANS_PER_DEGREE] A numeric Property specifying the angular distance between each latitude and longitude if arcType is not ArcType.NONE.
- * @param {MaterialProperty} [options.material=Color.WHITE] A Property specifying the material used to draw the polyline.
- * @param {MaterialProperty} [options.depthFailMaterial] A property specifying the material used to draw the polyline when it is below the terrain.
- * @param {ArcType} [options.arcType=ArcType.GEODESIC] The type of line the polyline segments must follow.
- * @param {Property} [options.clampToGround=false] A boolean Property specifying whether the Polyline should be clamped to the ground.
- * @param {Property} [options.shadows=ShadowMode.DISABLED] An enum Property specifying whether the polyline casts or receives shadows from light sources.
- * @param {Property} [options.distanceDisplayCondition] A Property specifying at what distance from the camera that this polyline will be displayed.
- * @param {Property} [options.classificationType=ClassificationType.BOTH] An enum Property specifying whether this polyline will classify terrain, 3D Tiles, or both when on the ground.
- * @param {Property} [options.zIndex=0] A Property specifying the zIndex used for ordering ground geometry. Only has an effect if `clampToGround` is true and polylines on terrain is supported.
+ * @param {PolylineGraphics.ConstructorOptions} [options] Object describing initialization options
*
* @see Entity
* @demo {@link https://sandcastle.cesium.com/index.html?src=Polyline.html|Cesium Sandcastle Polyline Demo}
diff --git a/Source/DataSources/PolylineVolumeGraphics.js b/Source/DataSources/PolylineVolumeGraphics.js
index bbc4dda8fdbd..103da05c7dad 100644
--- a/Source/DataSources/PolylineVolumeGraphics.js
+++ b/Source/DataSources/PolylineVolumeGraphics.js
@@ -5,6 +5,25 @@ import Event from "../Core/Event.js";
import createMaterialPropertyDescriptor from "./createMaterialPropertyDescriptor.js";
import createPropertyDescriptor from "./createPropertyDescriptor.js";
+/**
+ * @typedef {Object} PolylineVolumeGraphics.ConstructorOptions
+ *
+ * Initialization options for the PolylineVolumeGraphics constructor
+ *
+ * @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the volume.
+ * @property {Property | Array} [positions] A Property specifying the array of {@link Cartesian3} positions which define the line strip.
+ * @property {Property | Array} [shape] A Property specifying the array of {@link Cartesian2} positions which define the shape to be extruded.
+ * @property {Property | CornerType} [cornerType=CornerType.ROUNDED] A {@link CornerType} Property specifying the style of the corners.
+ * @property {Property | number} [granularity=Cesium.Math.RADIANS_PER_DEGREE] A numeric Property specifying the angular distance between each latitude and longitude point.
+ * @property {Property | boolean} [fill=true] A boolean Property specifying whether the volume is filled with the provided material.
+ * @property {MaterialProperty | Color} [material=Color.WHITE] A Property specifying the material used to fill the volume.
+ * @property {Property | boolean} [outline=false] A boolean Property specifying whether the volume is outlined.
+ * @property {Property | Color} [outlineColor=Color.BLACK] A Property specifying the {@link Color} of the outline.
+ * @property {Property | number} [outlineWidth=1.0] A numeric Property specifying the width of the outline.
+ * @property {Property | ShadowMode} [shadows=ShadowMode.DISABLED] An enum Property specifying whether the volume casts or receives shadows from light sources.
+ * @property {Property | DistanceDisplayCondition} [distanceDisplayCondition] A Property specifying at what distance from the camera that this volume will be displayed.
+ */
+
/**
* Describes a polyline volume defined as a line strip and corresponding two dimensional shape which is extruded along it.
* The resulting volume conforms to the curvature of the globe.
@@ -12,19 +31,7 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* @alias PolylineVolumeGraphics
* @constructor
*
- * @param {Object} [options] Object with the following properties:
- * @param {Property} [options.show=true] A boolean Property specifying the visibility of the volume.
- * @param {Property} [options.positions] A Property specifying the array of {@link Cartesian3} positions which define the line strip.
- * @param {Property} [options.shape] A Property specifying the array of {@link Cartesian2} positions which define the shape to be extruded.
- * @param {Property} [options.cornerType=CornerType.ROUNDED] A {@link CornerType} Property specifying the style of the corners.
- * @param {Property} [options.granularity=Cesium.Math.RADIANS_PER_DEGREE] A numeric Property specifying the angular distance between each latitude and longitude point.
- * @param {Property} [options.fill=true] A boolean Property specifying whether the volume is filled with the provided material.
- * @param {MaterialProperty} [options.material=Color.WHITE] A Property specifying the material used to fill the volume.
- * @param {Property} [options.outline=false] A boolean Property specifying whether the volume is outlined.
- * @param {Property} [options.outlineColor=Color.BLACK] A Property specifying the {@link Color} of the outline.
- * @param {Property} [options.outlineWidth=1.0] A numeric Property specifying the width of the outline.
- * @param {Property} [options.shadows=ShadowMode.DISABLED] An enum Property specifying whether the volume casts or receives shadows from light sources.
- * @param {Property} [options.distanceDisplayCondition] A Property specifying at what distance from the camera that this volume will be displayed.
+ * @param {PolylineVolumeGraphics.ConstructorOptions} [options] Object describing initialization options
*
* @see Entity
* @demo {@link https://sandcastle.cesium.com/index.html?src=Polyline%20Volume.html|Cesium Sandcastle Polyline Volume Demo}
diff --git a/Source/DataSources/RectangleGraphics.js b/Source/DataSources/RectangleGraphics.js
index 1c36248a7635..d5423e713b87 100644
--- a/Source/DataSources/RectangleGraphics.js
+++ b/Source/DataSources/RectangleGraphics.js
@@ -5,6 +5,31 @@ import Event from "../Core/Event.js";
import createMaterialPropertyDescriptor from "./createMaterialPropertyDescriptor.js";
import createPropertyDescriptor from "./createPropertyDescriptor.js";
+/**
+ * @typedef {Object} RectangleGraphics.ConstructorOptions
+ *
+ * Initialization options for the RectangleGraphics constructor
+ *
+ * @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the rectangle.
+ * @property {Property | Rectangle} [coordinates] The Property specifying the {@link Rectangle}.
+ * @property {Property | number} [height=0] A numeric Property specifying the altitude of the rectangle relative to the ellipsoid surface.
+ * @property {Property | HeightReference} [heightReference=HeightReference.NONE] A Property specifying what the height is relative to.
+ * @property {Property | number} [extrudedHeight] A numeric Property specifying the altitude of the rectangle's extruded face relative to the ellipsoid surface.
+ * @property {Property | HeightReference} [extrudedHeightReference=HeightReference.NONE] A Property specifying what the extrudedHeight is relative to.
+ * @property {Property | number} [rotation=0.0] A numeric property specifying the rotation of the rectangle clockwise from north.
+ * @property {Property | number} [stRotation=0.0] A numeric property specifying the rotation of the rectangle texture counter-clockwise from north.
+ * @property {Property | number} [granularity=Cesium.Math.RADIANS_PER_DEGREE] A numeric Property specifying the angular distance between points on the rectangle.
+ * @property {Property | boolean} [fill=true] A boolean Property specifying whether the rectangle is filled with the provided material.
+ * @property {MaterialProperty | Color} [material=Color.WHITE] A Property specifying the material used to fill the rectangle.
+ * @property {Property | boolean} [outline=false] A boolean Property specifying whether the rectangle is outlined.
+ * @property {Property | Color} [outlineColor=Color.BLACK] A Property specifying the {@link Color} of the outline.
+ * @property {Property | number} [outlineWidth=1.0] A numeric Property specifying the width of the outline.
+ * @property {Property | ShadowMode} [shadows=ShadowMode.DISABLED] An enum Property specifying whether the rectangle casts or receives shadows from light sources.
+ * @property {Property | DistanceDisplayCondition} [distanceDisplayCondition] A Property specifying at what distance from the camera that this rectangle will be displayed.
+ * @property {Property | ClassificationType} [classificationType=ClassificationType.BOTH] An enum Property specifying whether this rectangle will classify terrain, 3D Tiles, or both when on the ground.
+ * @property {Property | number} [zIndex=0] A Property specifying the zIndex used for ordering ground geometry. Only has an effect if the rectangle is constant and neither height or extrudedHeight are specified.
+ */
+
/**
* Describes graphics for a {@link Rectangle}.
* The rectangle conforms to the curvature of the globe and can be placed on the surface or
@@ -13,25 +38,7 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* @alias RectangleGraphics
* @constructor
*
- * @param {Object} [options] Object with the following properties:
- * @param {Property} [options.show=true] A boolean Property specifying the visibility of the rectangle.
- * @param {Property} [options.coordinates] The Property specifying the {@link Rectangle}.
- * @param {Property} [options.height=0] A numeric Property specifying the altitude of the rectangle relative to the ellipsoid surface.
- * @param {Property} [options.heightReference=HeightReference.NONE] A Property specifying what the height is relative to.
- * @param {Property} [options.extrudedHeight] A numeric Property specifying the altitude of the rectangle's extruded face relative to the ellipsoid surface.
- * @param {Property} [options.extrudedHeightReference=HeightReference.NONE] A Property specifying what the extrudedHeight is relative to.
- * @param {Property} [options.rotation=0.0] A numeric property specifying the rotation of the rectangle clockwise from north.
- * @param {Property} [options.stRotation=0.0] A numeric property specifying the rotation of the rectangle texture counter-clockwise from north.
- * @param {Property} [options.granularity=Cesium.Math.RADIANS_PER_DEGREE] A numeric Property specifying the angular distance between points on the rectangle.
- * @param {Property} [options.fill=true] A boolean Property specifying whether the rectangle is filled with the provided material.
- * @param {MaterialProperty} [options.material=Color.WHITE] A Property specifying the material used to fill the rectangle.
- * @param {Property} [options.outline=false] A boolean Property specifying whether the rectangle is outlined.
- * @param {Property} [options.outlineColor=Color.BLACK] A Property specifying the {@link Color} of the outline.
- * @param {Property} [options.outlineWidth=1.0] A numeric Property specifying the width of the outline.
- * @param {Property} [options.shadows=ShadowMode.DISABLED] An enum Property specifying whether the rectangle casts or receives shadows from light sources.
- * @param {Property} [options.distanceDisplayCondition] A Property specifying at what distance from the camera that this rectangle will be displayed.
- * @param {Property} [options.classificationType=ClassificationType.BOTH] An enum Property specifying whether this rectangle will classify terrain, 3D Tiles, or both when on the ground.
- * @param {Property} [options.zIndex=0] A Property specifying the zIndex used for ordering ground geometry. Only has an effect if the rectangle is constant and neither height or extrudedHeight are specified.
+ * @param {RectangleGraphics.ConstructorOptions} [options] Object describing initialization options
*
* @see Entity
* @demo {@link https://sandcastle.cesium.com/index.html?src=Rectangle.html|Cesium Sandcastle Rectangle Demo}
diff --git a/Source/DataSources/WallGraphics.js b/Source/DataSources/WallGraphics.js
index 8ddb921b59b2..8ad9f13bcf8b 100644
--- a/Source/DataSources/WallGraphics.js
+++ b/Source/DataSources/WallGraphics.js
@@ -5,6 +5,25 @@ import Event from "../Core/Event.js";
import createMaterialPropertyDescriptor from "./createMaterialPropertyDescriptor.js";
import createPropertyDescriptor from "./createPropertyDescriptor.js";
+/**
+ * @typedef {Object} WallGraphics.ConstructorOptions
+ *
+ * Initialization options for the WallGraphics constructor
+ *
+ * @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the wall.
+ * @property {Property | Array} [positions] A Property specifying the array of {@link Cartesian3} positions which define the top of the wall.
+ * @property {Property | Array} [minimumHeights] A Property specifying an array of heights to be used for the bottom of the wall instead of the globe surface.
+ * @property {Property | Array} [maximumHeights] A Property specifying an array of heights to be used for the top of the wall instead of the height of each position.
+ * @property {Property | number} [granularity=Cesium.Math.RADIANS_PER_DEGREE] A numeric Property specifying the angular distance between each latitude and longitude point.
+ * @property {Property | boolean} [fill=true] A boolean Property specifying whether the wall is filled with the provided material.
+ * @property {MaterialProperty | Color} [material=Color.WHITE] A Property specifying the material used to fill the wall.
+ * @property {Property | boolean} [outline=false] A boolean Property specifying whether the wall is outlined.
+ * @property {Property | Color} [outlineColor=Color.BLACK] A Property specifying the {@link Color} of the outline.
+ * @property {Property | number} [outlineWidth=1.0] A numeric Property specifying the width of the outline.
+ * @property {Property | ShadowMode} [shadows=ShadowMode.DISABLED] An enum Property specifying whether the wall casts or receives shadows from light sources.
+ * @property {Property | DistanceDisplayCondition} [distanceDisplayCondition] A Property specifying at what distance from the camera that this wall will be displayed.
+ */
+
/**
* Describes a two dimensional wall defined as a line strip and optional maximum and minimum heights.
* The wall conforms to the curvature of the globe and can be placed along the surface or at altitude.
@@ -12,19 +31,7 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* @alias WallGraphics
* @constructor
*
- * @param {Object} [options] Object with the following properties:
- * @param {Property} [options.show=true] A boolean Property specifying the visibility of the wall.
- * @param {Property} [options.positions] A Property specifying the array of {@link Cartesian3} positions which define the top of the wall.
- * @param {Property} [options.minimumHeights] A Property specifying an array of heights to be used for the bottom of the wall instead of the globe surface.
- * @param {Property} [options.maximumHeights] A Property specifying an array of heights to be used for the top of the wall instead of the height of each position.
- * @param {Property} [options.granularity=Cesium.Math.RADIANS_PER_DEGREE] A numeric Property specifying the angular distance between each latitude and longitude point.
- * @param {Property} [options.fill=true] A boolean Property specifying whether the wall is filled with the provided material.
- * @param {MaterialProperty} [options.material=Color.WHITE] A Property specifying the material used to fill the wall.
- * @param {Property} [options.outline=false] A boolean Property specifying whether the wall is outlined.
- * @param {Property} [options.outlineColor=Color.BLACK] A Property specifying the {@link Color} of the outline.
- * @param {Property} [options.outlineWidth=1.0] A numeric Property specifying the width of the outline.
- * @param {Property} [options.shadows=ShadowMode.DISABLED] An enum Property specifying whether the wall casts or receives shadows from light sources.
- * @param {Property} [options.distanceDisplayCondition] A Property specifying at what distance from the camera that this wall will be displayed.
+ * @param {WallGraphics.ConstructorOptions} [options] Object describing initialization options
*
* @see Entity
* @demo {@link https://sandcastle.cesium.com/index.html?src=Wall.html|Cesium Sandcastle Wall Demo}
From ca986af4afa972f33a0f75b146a4c003a3d1889c Mon Sep 17 00:00:00 2001
From: James Bromwell <943160+thw0rted@users.noreply.github.com>
Date: Thu, 28 May 2020 16:32:23 +0200
Subject: [PATCH 22/36] Various small type fixes
---
Source/Core/Math.js | 3 ---
Source/DataSources/Entity.js | 2 +-
Source/Scene/Camera.js | 5 +++--
Source/Widgets/CesiumWidget/CesiumWidget.js | 4 ++--
Source/Widgets/Viewer/Viewer.js | 2 +-
5 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/Source/Core/Math.js b/Source/Core/Math.js
index 83fa3d985703..7e94e525ccc3 100644
--- a/Source/Core/Math.js
+++ b/Source/Core/Math.js
@@ -411,7 +411,6 @@ CesiumMath.ONE_OVER_TWO_PI = 1.0 / (2.0 * Math.PI);
*
* @type {Number}
* @constant
- * @default Math.PI / 180.0
*/
CesiumMath.RADIANS_PER_DEGREE = Math.PI / 180.0;
@@ -420,7 +419,6 @@ CesiumMath.RADIANS_PER_DEGREE = Math.PI / 180.0;
*
* @type {Number}
* @constant
- * @default 180.0 / Math.PI
*/
CesiumMath.DEGREES_PER_RADIAN = 180.0 / Math.PI;
@@ -429,7 +427,6 @@ CesiumMath.DEGREES_PER_RADIAN = 180.0 / Math.PI;
*
* @type {Number}
* @constant
- * @default {@link CesiumMath.RADIANS_PER_DEGREE} / 3600.0
*/
CesiumMath.RADIANS_PER_ARCSECOND = CesiumMath.RADIANS_PER_DEGREE / 3600.0;
diff --git a/Source/DataSources/Entity.js b/Source/DataSources/Entity.js
index e57a5161fa5f..80493ed55ab4 100644
--- a/Source/DataSources/Entity.js
+++ b/Source/DataSources/Entity.js
@@ -70,7 +70,7 @@ function createPropertyTypeDescriptor(name, Type) {
* @property {TimeIntervalCollection} [availability] The availability, if any, associated with this object.
* @property {Boolean} [show] A boolean value indicating if the entity and its children are displayed.
* @property {Property | string} [description] A string Property specifying an HTML description for this entity.
- * @property {PositionProperty | Cartesian3} [position] A Property specifying the entity position.
+ * @property {PositionProperty | CallbackProperty | Cartesian3} [position] A Property specifying the entity position.
* **** TODO ****
* @property {Property} [orientation] A Property specifying the entity orientation.
* **** TODO ****
diff --git a/Source/Scene/Camera.js b/Source/Scene/Camera.js
index 167e2631b10e..fc964c53d5a0 100644
--- a/Source/Scene/Camera.js
+++ b/Source/Scene/Camera.js
@@ -2804,8 +2804,9 @@ function pickMapColumbusView(camera, windowPosition, projection, result) {
* @param {Cartesian2} windowPosition The x and y coordinates of a pixel.
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid to pick.
* @param {Cartesian3} [result] The object onto which to store the result.
- * @returns {Cartesian3} If the ellipsoid or map was picked, returns the point on the surface of the ellipsoid or map
- * in world coordinates. If the ellipsoid or map was not picked, returns undefined.
+ * @returns {Cartesian3 | undefined} If the ellipsoid or map was picked,
+ * returns the point on the surface of the ellipsoid or map in world
+ * coordinates. If the ellipsoid or map was not picked, returns undefined.
*
* @example
* var canvas = viewer.scene.canvas;
diff --git a/Source/Widgets/CesiumWidget/CesiumWidget.js b/Source/Widgets/CesiumWidget/CesiumWidget.js
index b008161b2030..fdc1c2559d1b 100644
--- a/Source/Widgets/CesiumWidget/CesiumWidget.js
+++ b/Source/Widgets/CesiumWidget/CesiumWidget.js
@@ -128,8 +128,8 @@ function configureCameraFrustum(widget) {
* @param {Clock} [options.clock=new Clock()] The clock to use to control current time.
* @param {ImageryProvider} [options.imageryProvider=createWorldImagery()] The imagery provider to serve as the base layer. If set to false
, no imagery provider will be added.
* @param {TerrainProvider} [options.terrainProvider=new EllipsoidTerrainProvider] The terrain provider.
- * @param {SkyBox} [options.skyBox] The skybox used to render the stars. When undefined
, the default stars are used. If set to false
, no skyBox, Sun, or Moon will be added.
- * @param {SkyAtmosphere} [options.skyAtmosphere] Blue sky, and the glow around the Earth's limb. Set to false
to turn it off.
+ * @param {SkyBox| false} [options.skyBox] The skybox used to render the stars. When undefined
, the default stars are used. If set to false
, no skyBox, Sun, or Moon will be added.
+ * @param {SkyAtmosphere | false} [options.skyAtmosphere] Blue sky, and the glow around the Earth's limb. Set to false
to turn it off.
* @param {SceneMode} [options.sceneMode=SceneMode.SCENE3D] The initial scene mode.
* @param {Boolean} [options.scene3DOnly=false] When true
, each geometry instance will only be rendered in 3D to save GPU memory.
* @param {Boolean} [options.orderIndependentTranslucency=true] If true and the configuration supports it, use order independent translucency.
diff --git a/Source/Widgets/Viewer/Viewer.js b/Source/Widgets/Viewer/Viewer.js
index 6e27585a1813..9cc153afabc0 100644
--- a/Source/Widgets/Viewer/Viewer.js
+++ b/Source/Widgets/Viewer/Viewer.js
@@ -1967,7 +1967,7 @@ Viewer.prototype.zoomTo = function (target, offset) {
* @param {Number} [options.duration=3.0] The duration of the flight in seconds.
* @param {Number} [options.maximumHeight] The maximum height at the peak of the flight.
* @param {HeadingPitchRange} [options.offset] The offset from the target in the local east-north-up reference frame centered at the target.
- * @returns {Promise.} A Promise that resolves to true if the flight was successful or false if the target is not currently visualized in the scene or the flight was cancelled. //TODO: Cleanup entity mentions
+ * @returns {Promise.} A Promise that resolves to true if the flight was successful or false if the target is not currently visualized in the scene or the flight was cancelled. //TODO: Cleanup entity mentions
*/
Viewer.prototype.flyTo = function (target, options) {
return zoomToOrFly(this, target, options, true);
From 9678a43b58f15961a729ffbcbade1019780b5188 Mon Sep 17 00:00:00 2001
From: James Bromwell <943160+thw0rted@users.noreply.github.com>
Date: Thu, 28 May 2020 17:14:47 +0200
Subject: [PATCH 23/36] Selected/tracked entity can be undefined
---
Source/Widgets/Viewer/Viewer.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Source/Widgets/Viewer/Viewer.js b/Source/Widgets/Viewer/Viewer.js
index 9cc153afabc0..ef35e2c61d3d 100644
--- a/Source/Widgets/Viewer/Viewer.js
+++ b/Source/Widgets/Viewer/Viewer.js
@@ -1321,7 +1321,7 @@ Object.defineProperties(Viewer.prototype, {
/**
* Gets or sets the Entity instance currently being tracked by the camera.
* @memberof Viewer.prototype
- * @type {Entity}
+ * @type {Entity | undefined}
*/
trackedEntity: {
get: function () {
@@ -1370,7 +1370,7 @@ Object.defineProperties(Viewer.prototype, {
/**
* Gets or sets the object instance for which to display a selection indicator.
* @memberof Viewer.prototype
- * @type {Entity}
+ * @type {Entity | undefined}
*/
selectedEntity: {
get: function () {
From 14c5ec14e80b42c64b54a6750f89e199a3570bbe Mon Sep 17 00:00:00 2001
From: James Bromwell <943160+thw0rted@users.noreply.github.com>
Date: Thu, 28 May 2020 17:40:58 +0200
Subject: [PATCH 24/36] First pass at generic Events
---
Source/Core/Event.js | 5 +++--
Source/DataSources/DataSource.js | 4 ++--
Source/DataSources/EntityCluster.js | 5 +++--
gulpfile.cjs | 5 +++++
4 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/Source/Core/Event.js b/Source/Core/Event.js
index 99001dc5fce5..8becdbdbb9eb 100644
--- a/Source/Core/Event.js
+++ b/Source/Core/Event.js
@@ -7,6 +7,7 @@ import defined from "./defined.js";
* exposed as a property for others to subscribe to.
*
* @alias Event
+ * @template Listener the function call signature for this event's listeners
* @constructor
* @example
* MyObject.prototype.myListener = function(arg1, arg2) {
@@ -46,7 +47,7 @@ Object.defineProperties(Event.prototype, {
* An optional scope can be provided to serve as the this
pointer
* in which the function will execute.
*
- * @param {Function} listener The function to be executed when the event is raised.
+ * @param {Listener} listener The function to be executed when the event is raised.
* @param {Object} [scope] An optional object scope to serve as the this
* pointer in which the listener function will execute.
* @returns {Event.RemoveCallback} A function that will remove this event listener when invoked.
@@ -71,7 +72,7 @@ Event.prototype.addEventListener = function (listener, scope) {
/**
* Unregisters a previously registered callback.
*
- * @param {Function} listener The function to be unregistered.
+ * @param {Listener} listener The function to be unregistered.
* @param {Object} [scope] The scope that was originally passed to addEventListener.
* @returns {Boolean} true
if the listener was removed; false
if the listener and scope are not registered with the event.
*
diff --git a/Source/DataSources/DataSource.js b/Source/DataSources/DataSource.js
index 182dac7602bf..4ac760371721 100644
--- a/Source/DataSources/DataSource.js
+++ b/Source/DataSources/DataSource.js
@@ -58,7 +58,7 @@ Object.defineProperties(DataSource.prototype, {
/**
* Gets an event that will be raised if an error is encountered during processing.
* @memberof DataSource.prototype
- * @type {Event}
+ * @type {Event}
*/
errorEvent: {
get: DeveloperError.throwInstantiationError,
@@ -66,7 +66,7 @@ Object.defineProperties(DataSource.prototype, {
/**
* Gets an event that will be raised when the value of isLoading changes.
* @memberof DataSource.prototype
- * @type {Event}
+ * @type {Event}
*/
loadingEvent: {
get: DeveloperError.throwInstantiationError,
diff --git a/Source/DataSources/EntityCluster.js b/Source/DataSources/EntityCluster.js
index 2779deb12142..cee9319edec1 100644
--- a/Source/DataSources/EntityCluster.js
+++ b/Source/DataSources/EntityCluster.js
@@ -549,7 +549,7 @@ Object.defineProperties(EntityCluster.prototype, {
/**
* Gets the event that will be raised when a new cluster will be displayed. The signature of the event listener is {@link EntityCluster.newClusterCallback}.
* @memberof EntityCluster.prototype
- * @type {Event}
+ * @type {Event}
*/
clusterEvent: {
get: function () {
@@ -963,7 +963,8 @@ EntityCluster.prototype.destroy = function () {
* @callback EntityCluster.newClusterCallback
*
* @param {Entity[]} clusteredEntities An array of the entities contained in the cluster.
- * @param {Object} cluster An object containing billboard, label, and point properties. The values are the same as
+ * @param {{billboard: Billboard, label: Label, point: PointPrimitive}} cluster An object
+ * containing billboard, label, and point properties. The values are the same as
* billboard, label and point entities, but must be the values of the ConstantProperty.
*
* @example
diff --git a/gulpfile.cjs b/gulpfile.cjs
index b0c8debaa3ec..691253302c9a 100644
--- a/gulpfile.cjs
+++ b/gulpfile.cjs
@@ -1561,6 +1561,11 @@ function createTypeScriptDefinitions() {
.replace(/String\[]/gm, "string[]")
.replace(/Boolean\[]/gm, "boolean[]")
.replace(/Object\[]/gm, "object[]")
+ // This is an ugly hack but @template doesn't actually seem to work
+ .replace(
+ /export class Event {/gm,
+ "export class Event {"
+ )
.replace(
/= "WebGLConstants\.(.+)"/gm,
(match, p1) => `= WebGLConstants.${p1}`
From 2b91930281002c6a4e9d00751ba6feb914eb7a8d Mon Sep 17 00:00:00 2001
From: James Bromwell <943160+thw0rted@users.noreply.github.com>
Date: Thu, 28 May 2020 17:56:17 +0200
Subject: [PATCH 25/36] Constructor interfaces for ImageryProviders
---
.../Scene/ArcGisMapServerImageryProvider.js | 43 ++++++++-------
.../GoogleEarthEnterpriseImageryProvider.js | 23 +++++---
.../GoogleEarthEnterpriseMapsProvider.js | 51 ++++++++++--------
Source/Scene/WebMapServiceImageryProvider.js | 53 +++++++++++--------
.../Scene/WebMapTileServiceImageryProvider.js | 49 +++++++++--------
5 files changed, 127 insertions(+), 92 deletions(-)
diff --git a/Source/Scene/ArcGisMapServerImageryProvider.js b/Source/Scene/ArcGisMapServerImageryProvider.js
index 9ee092a137e2..0f7c34c6049c 100644
--- a/Source/Scene/ArcGisMapServerImageryProvider.js
+++ b/Source/Scene/ArcGisMapServerImageryProvider.js
@@ -21,16 +21,13 @@ import ImageryLayerFeatureInfo from "./ImageryLayerFeatureInfo.js";
import ImageryProvider from "./ImageryProvider.js";
/**
- * Provides tiled imagery hosted by an ArcGIS MapServer. By default, the server's pre-cached tiles are
- * used, if available.
+ * @typedef {Object} ArcGisMapServerImageryProvider.ConstructorOptions
*
- * @alias ArcGisMapServerImageryProvider
- * @constructor
+ * Initialization options for the ArcGisMapServerImageryProvider constructor
*
- * @param {Object} options Object with the following properties:
- * @param {Resource|String} options.url The URL of the ArcGIS MapServer service.
- * @param {String} [options.token] The ArcGIS token used to authenticate with the ArcGIS MapServer service.
- * @param {TileDiscardPolicy} [options.tileDiscardPolicy] The policy that determines if a tile
+ * @property {Resource|String} url The URL of the ArcGIS MapServer service.
+ * @property {String} [token] The ArcGIS token used to authenticate with the ArcGIS MapServer service.
+ * @property {TileDiscardPolicy} [tileDiscardPolicy] The policy that determines if a tile
* is invalid and should be discarded. If this value is not specified, a default
* {@link DiscardMissingTileImagePolicy} is used for tiled map servers, and a
* {@link NeverTileDiscardPolicy} is used for non-tiled map servers. In the former case,
@@ -41,27 +38,37 @@ import ImageryProvider from "./ImageryProvider.js";
* these defaults should be correct tile discarding for a standard ArcGIS Server. To ensure
* that no tiles are discarded, construct and pass a {@link NeverTileDiscardPolicy} for this
* parameter.
- * @param {Boolean} [options.usePreCachedTilesIfAvailable=true] If true, the server's pre-cached
+ * @property {Boolean} [usePreCachedTilesIfAvailable=true] If true, the server's pre-cached
* tiles are used if they are available. If false, any pre-cached tiles are ignored and the
* 'export' service is used.
- * @param {String} [options.layers] A comma-separated list of the layers to show, or undefined if all layers should be shown.
- * @param {Boolean} [options.enablePickFeatures=true] If true, {@link ArcGisMapServerImageryProvider#pickFeatures} will invoke
+ * @property {String} [layers] A comma-separated list of the layers to show, or undefined if all layers should be shown.
+ * @property {Boolean} [enablePickFeatures=true] If true, {@link ArcGisMapServerImageryProvider#pickFeatures} will invoke
* the Identify service on the MapServer and return the features included in the response. If false,
* {@link ArcGisMapServerImageryProvider#pickFeatures} will immediately return undefined (indicating no pickable features)
* without communicating with the server. Set this property to false if you don't want this provider's features to
* be pickable. Can be overridden by setting the {@link ArcGisMapServerImageryProvider#enablePickFeatures} property on the object.
- * @param {Rectangle} [options.rectangle=Rectangle.MAX_VALUE] The rectangle of the layer. This parameter is ignored when accessing
+ * @property {Rectangle} [rectangle=Rectangle.MAX_VALUE] The rectangle of the layer. This parameter is ignored when accessing
* a tiled layer.
- * @param {TilingScheme} [options.tilingScheme=new GeographicTilingScheme()] The tiling scheme to use to divide the world into tiles.
+ * @property {TilingScheme} [tilingScheme=new GeographicTilingScheme()] The tiling scheme to use to divide the world into tiles.
* This parameter is ignored when accessing a tiled server.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid. If the tilingScheme is specified and used,
+ * @property {Ellipsoid} [ellipsoid] The ellipsoid. If the tilingScheme is specified and used,
* this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither
* parameter is specified, the WGS84 ellipsoid is used.
- * @param {Credit|String} [options.credit] A credit for the data source, which is displayed on the canvas. This parameter is ignored when accessing a tiled server.
- * @param {Number} [options.tileWidth=256] The width of each tile in pixels. This parameter is ignored when accessing a tiled server.
- * @param {Number} [options.tileHeight=256] The height of each tile in pixels. This parameter is ignored when accessing a tiled server.
- * @param {Number} [options.maximumLevel] The maximum tile level to request, or undefined if there is no maximum. This parameter is ignored when accessing
+ * @property {Credit|String} credit] A credit for the data source, which is displayed on the canvas. This parameter is ignored when accessing a tiled server.
+ * @property {Number} [tileWidth=256] The width of each tile in pixels. This parameter is ignored when accessing a tiled server.
+ * @property {Number} [tileHeight=256] The height of each tile in pixels. This parameter is ignored when accessing a tiled server.
+ * @property {Number} [maximumLevel] The maximum tile level to request, or undefined if there is no maximum. This parameter is ignored when accessing
* a tiled server.
+ */
+
+/**
+ * Provides tiled imagery hosted by an ArcGIS MapServer. By default, the server's pre-cached tiles are
+ * used, if available.
+ *
+ * @alias ArcGisMapServerImageryProvider
+ * @constructor
+ *
+ * @param {ArcGisMapServerImageryProvider.ConstructorOptions} options Object describing initialization options
*
* @see BingMapsImageryProvider
* @see GoogleEarthEnterpriseMapsProvider
diff --git a/Source/Scene/GoogleEarthEnterpriseImageryProvider.js b/Source/Scene/GoogleEarthEnterpriseImageryProvider.js
index a179b0b5a136..ed6054161d42 100644
--- a/Source/Scene/GoogleEarthEnterpriseImageryProvider.js
+++ b/Source/Scene/GoogleEarthEnterpriseImageryProvider.js
@@ -43,6 +43,20 @@ GoogleEarthEnterpriseDiscardPolicy.prototype.shouldDiscardImage = function (
return image === this._image;
};
+/**
+ * @typedef {Object} GoogleEarthEnterpriseImageryProvider.ConstructorOptions
+ *
+ * Initialization options for the GoogleEarthEnterpriseImageryProvider constructor
+ *
+ * @property {Resource|String} url The url of the Google Earth Enterprise server hosting the imagery.
+ * @property {GoogleEarthEnterpriseMetadata} metadata A metadata object that can be used to share metadata requests with a GoogleEarthEnterpriseTerrainProvider.
+ * @property {Ellipsoid} [ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
+ * @property {TileDiscardPolicy} [tileDiscardPolicy] The policy that determines if a tile
+ * is invalid and should be discarded. If this value is not specified, a default
+ * is to discard tiles that fail to download.
+ * @property {Credit|String} [credit] A credit for the data source, which is displayed on the canvas.
+ */
+
/**
* Provides tiled imagery using the Google Earth Enterprise REST API.
*
@@ -52,14 +66,7 @@ GoogleEarthEnterpriseDiscardPolicy.prototype.shouldDiscardImage = function (
* @alias GoogleEarthEnterpriseImageryProvider
* @constructor
*
- * @param {Object} options Object with the following properties:
- * @param {Resource|String} options.url The url of the Google Earth Enterprise server hosting the imagery.
- * @param {GoogleEarthEnterpriseMetadata} options.metadata A metadata object that can be used to share metadata requests with a GoogleEarthEnterpriseTerrainProvider.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
- * @param {TileDiscardPolicy} [options.tileDiscardPolicy] The policy that determines if a tile
- * is invalid and should be discarded. If this value is not specified, a default
- * is to discard tiles that fail to download.
- * @param {Credit|String} [options.credit] A credit for the data source, which is displayed on the canvas.
+ * @param {GoogleEarthEnterpriseImageryProvider.ConstructorOptions} options Object describing initialization options
*
* @see GoogleEarthEnterpriseTerrainProvider
* @see ArcGisMapServerImageryProvider
diff --git a/Source/Scene/GoogleEarthEnterpriseMapsProvider.js b/Source/Scene/GoogleEarthEnterpriseMapsProvider.js
index f32f24ca16ab..4f3150017bc4 100644
--- a/Source/Scene/GoogleEarthEnterpriseMapsProvider.js
+++ b/Source/Scene/GoogleEarthEnterpriseMapsProvider.js
@@ -15,26 +15,12 @@ import when from "../ThirdParty/when.js";
import ImageryProvider from "./ImageryProvider.js";
/**
- * Provides tiled imagery using the Google Earth Imagery API.
- *
- * Notes: This imagery provider does not work with the public Google Earth servers. It works with the
- * Google Earth Enterprise Server.
- *
- * By default the Google Earth Enterprise server does not set the
- * {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing} headers. You can either
- * use a proxy server which adds these headers, or in the /opt/google/gehttpd/conf/gehttpd.conf
- * and add the 'Header set Access-Control-Allow-Origin "*"' option to the '<Directory />' and
- * '<Directory "/opt/google/gehttpd/htdocs">' directives.
+ * @typedef {Object} GoogleEarthEnterpriseMapsProvider.ConstructorOptions
*
- * This provider is for use with 2D Maps API as part of Google Earth Enterprise. For 3D Earth API uses, it
- * is necessary to use {@link GoogleEarthEnterpriseImageryProvider}
+ * Initialization options for the GoogleEarthEnterpriseMapsProvider constructor
*
- * @alias GoogleEarthEnterpriseMapsProvider
- * @constructor
- *
- * @param {Object} options Object with the following properties:
- * @param {Resource|String} options.url The url of the Google Earth server hosting the imagery.
- * @param {Number} options.channel The channel (id) to be used when requesting data from the server.
+ * @property {Resource|String} url The url of the Google Earth server hosting the imagery.
+ * @property {Number} channel The channel (id) to be used when requesting data from the server.
* The channel number can be found by looking at the json file located at:
* earth.localdomain/default_map/query?request=Json&vars=geeServerDefs The /default_map path may
* differ depending on your Google Earth Enterprise server configuration. Look for the "id" that
@@ -52,13 +38,34 @@ import ImageryProvider from "./ImageryProvider.js";
* }
* ]
* }
- * @param {String} [options.path="/default_map"] The path of the Google Earth server hosting the imagery.
- * @param {Number} [options.maximumLevel] The maximum level-of-detail supported by the Google Earth
+ * @property {String} [path="/default_map"] The path of the Google Earth server hosting the imagery.
+ * @property {Number} [maximumLevel] The maximum level-of-detail supported by the Google Earth
* Enterprise server, or undefined if there is no limit.
- * @param {TileDiscardPolicy} [options.tileDiscardPolicy] The policy that determines if a tile
+ * @property {TileDiscardPolicy} [tileDiscardPolicy] The policy that determines if a tile
* is invalid and should be discarded. To ensure that no tiles are discarded, construct and pass
* a {@link NeverTileDiscardPolicy} for this parameter.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
+ * @property {Ellipsoid} [ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
+ */
+
+/**
+ * Provides tiled imagery using the Google Earth Imagery API.
+ *
+ * Notes: This imagery provider does not work with the public Google Earth servers. It works with the
+ * Google Earth Enterprise Server.
+ *
+ * By default the Google Earth Enterprise server does not set the
+ * {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing} headers. You can either
+ * use a proxy server which adds these headers, or in the /opt/google/gehttpd/conf/gehttpd.conf
+ * and add the 'Header set Access-Control-Allow-Origin "*"' option to the '<Directory />' and
+ * '<Directory "/opt/google/gehttpd/htdocs">' directives.
+ *
+ * This provider is for use with 2D Maps API as part of Google Earth Enterprise. For 3D Earth API uses, it
+ * is necessary to use {@link GoogleEarthEnterpriseImageryProvider}
+ *
+ * @alias GoogleEarthEnterpriseMapsProvider
+ * @constructor
+ *
+ * @param {GoogleEarthEnterpriseMapsProvider.ConstructorOptions} options Object describing initialization options
*
* @exception {RuntimeError} Could not find layer with channel (id) of options.channel
.
* @exception {RuntimeError} Could not find a version in channel (id) options.channel
.
diff --git a/Source/Scene/WebMapServiceImageryProvider.js b/Source/Scene/WebMapServiceImageryProvider.js
index 53c4a280dcab..617aa081fcd8 100644
--- a/Source/Scene/WebMapServiceImageryProvider.js
+++ b/Source/Scene/WebMapServiceImageryProvider.js
@@ -9,44 +9,51 @@ import TimeDynamicImagery from "./TimeDynamicImagery.js";
import UrlTemplateImageryProvider from "./UrlTemplateImageryProvider.js";
/**
- * Provides tiled imagery hosted by a Web Map Service (WMS) server.
+ * @typedef {Object} WebMapServiceImageryProvider.ConstructorOptions
*
- * @alias WebMapServiceImageryProvider
- * @constructor
+ * Initialization options for the WebMapServiceImageryProvider constructor
*
- * @param {Object} options Object with the following properties:
- * @param {Resource|String} options.url The URL of the WMS service. The URL supports the same keywords as the {@link UrlTemplateImageryProvider}.
- * @param {String} options.layers The layers to include, separated by commas.
- * @param {Object} [options.parameters=WebMapServiceImageryProvider.DefaultParameters] Additional parameters to pass to the WMS server in the GetMap URL.
- * @param {Object} [options.getFeatureInfoParameters=WebMapServiceImageryProvider.GetFeatureInfoDefaultParameters] Additional parameters to pass to the WMS server in the GetFeatureInfo URL.
- * @param {Boolean} [options.enablePickFeatures=true] If true, {@link WebMapServiceImageryProvider#pickFeatures} will invoke
+ * @property {Resource|String} url The URL of the WMS service. The URL supports the same keywords as the {@link UrlTemplateImageryProvider}.
+ * @property {String} layers The layers to include, separated by commas.
+ * @property {Object} [parameters=WebMapServiceImageryProvider.DefaultParameters] Additional parameters to pass to the WMS server in the GetMap URL.
+ * @property {Object} [getFeatureInfoParameters=WebMapServiceImageryProvider.GetFeatureInfoDefaultParameters] Additional parameters to pass to the WMS server in the GetFeatureInfo URL.
+ * @property {Boolean} [enablePickFeatures=true] If true, {@link WebMapServiceImageryProvider#pickFeatures} will invoke
* the GetFeatureInfo operation on the WMS server and return the features included in the response. If false,
* {@link WebMapServiceImageryProvider#pickFeatures} will immediately return undefined (indicating no pickable features)
* without communicating with the server. Set this property to false if you know your WMS server does not support
* GetFeatureInfo or if you don't want this provider's features to be pickable. Note that this can be dynamically
* overridden by modifying the WebMapServiceImageryProvider#enablePickFeatures property.
- * @param {GetFeatureInfoFormat[]} [options.getFeatureInfoFormats=WebMapServiceImageryProvider.DefaultGetFeatureInfoFormats] The formats
+ * @property {GetFeatureInfoFormat[]} [getFeatureInfoFormats=WebMapServiceImageryProvider.DefaultGetFeatureInfoFormats] The formats
* in which to try WMS GetFeatureInfo requests.
- * @param {Rectangle} [options.rectangle=Rectangle.MAX_VALUE] The rectangle of the layer.
- * @param {TilingScheme} [options.tilingScheme=new GeographicTilingScheme()] The tiling scheme to use to divide the world into tiles.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid. If the tilingScheme is specified,
+ * @property {Rectangle} [rectangle=Rectangle.MAX_VALUE] The rectangle of the layer.
+ * @property {TilingScheme} [tilingScheme=new GeographicTilingScheme()] The tiling scheme to use to divide the world into tiles.
+ * @property {Ellipsoid} [ellipsoid] The ellipsoid. If the tilingScheme is specified,
* this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither
* parameter is specified, the WGS84 ellipsoid is used.
- * @param {Number} [options.tileWidth=256] The width of each tile in pixels.
- * @param {Number} [options.tileHeight=256] The height of each tile in pixels.
- * @param {Number} [options.minimumLevel=0] The minimum level-of-detail supported by the imagery provider. Take care when
+ * @property {Number} [tileWidth=256] The width of each tile in pixels.
+ * @property {Number} [tileHeight=256] The height of each tile in pixels.
+ * @property {Number} [minimumLevel=0] The minimum level-of-detail supported by the imagery provider. Take care when
* specifying this that the number of tiles at the minimum level is small, such as four or less. A larger number is
* likely to result in rendering problems.
- * @param {Number} [options.maximumLevel] The maximum level-of-detail supported by the imagery provider, or undefined if there is no limit.
+ * @property {Number} [maximumLevel] The maximum level-of-detail supported by the imagery provider, or undefined if there is no limit.
* If not specified, there is no limit.
- * @param {String} [options.crs] CRS specification, for use with WMS specification >= 1.3.0.
- * @param {String} [options.srs] SRS specification, for use with WMS specification 1.1.0 or 1.1.1
- * @param {Credit|String} [options.credit] A credit for the data source, which is displayed on the canvas.
- * @param {String|String[]} [options.subdomains='abc'] The subdomains to use for the {s}
placeholder in the URL template.
+ * @property {String} [crs] CRS specification, for use with WMS specification >= 1.3.0.
+ * @property {String} [srs] SRS specification, for use with WMS specification 1.1.0 or 1.1.1
+ * @property {Credit|String} [credit] A credit for the data source, which is displayed on the canvas.
+ * @property {String|String[]} [subdomains='abc'] The subdomains to use for the {s}
placeholder in the URL template.
* If this parameter is a single string, each character in the string is a subdomain. If it is
* an array, each element in the array is a subdomain.
- * @param {Clock} [options.clock] A Clock instance that is used when determining the value for the time dimension. Required when options.times is specified.
- * @param {TimeIntervalCollection} [options.times] TimeIntervalCollection with its data property being an object containing time dynamic dimension and their values.
+ * @property {Clock} [clock] A Clock instance that is used when determining the value for the time dimension. Required when `times` is specified.
+ * @property {TimeIntervalCollection} [times] TimeIntervalCollection with its data property being an object containing time dynamic dimension and their values.
+ */
+
+/**
+ * Provides tiled imagery hosted by a Web Map Service (WMS) server.
+ *
+ * @alias WebMapServiceImageryProvider
+ * @constructor
+ *
+ * @param {WebMapServiceImageryProvider.ConstructorOptions} options Object describing initialization options
*
* @see ArcGisMapServerImageryProvider
* @see BingMapsImageryProvider
diff --git a/Source/Scene/WebMapTileServiceImageryProvider.js b/Source/Scene/WebMapTileServiceImageryProvider.js
index 401c5ba56012..3f95803b98cb 100644
--- a/Source/Scene/WebMapTileServiceImageryProvider.js
+++ b/Source/Scene/WebMapTileServiceImageryProvider.js
@@ -17,6 +17,33 @@ var defaultParameters = Object.freeze({
request: "GetTile",
});
+/**
+ * @typedef {Object} WebMapTileServiceImageryProvider.ConstructorOptions
+ *
+ * Initialization options for the WebMapTileServiceImageryProvider constructor
+ *
+ * @property {Resource|String} url The base URL for the WMTS GetTile operation (for KVP-encoded requests) or the tile-URL template (for RESTful requests). The tile-URL template should contain the following variables: {style}, {TileMatrixSet}, {TileMatrix}, {TileRow}, {TileCol}. The first two are optional if actual values are hardcoded or not required by the server. The {s} keyword may be used to specify subdomains.
+ * @property {String} [format='image/jpeg'] The MIME type for images to retrieve from the server.
+ * @property {String} layer The layer name for WMTS requests.
+ * @property {String} style The style name for WMTS requests.
+ * @property {String} tileMatrixSetID The identifier of the TileMatrixSet to use for WMTS requests.
+ * @property {Array} [tileMatrixLabels] A list of identifiers in the TileMatrix to use for WMTS requests, one per TileMatrix level.
+ * @property {Clock} [clock] A Clock instance that is used when determining the value for the time dimension. Required when `times` is specified.
+ * @property {TimeIntervalCollection} [times] TimeIntervalCollection with its data
property being an object containing time dynamic dimension and their values.
+ * @property {Object} [dimensions] A object containing static dimensions and their values.
+ * @property {Number} [tileWidth=256] The tile width in pixels.
+ * @property {Number} [tileHeight=256] The tile height in pixels.
+ * @property {TilingScheme} [tilingScheme] The tiling scheme corresponding to the organization of the tiles in the TileMatrixSet.
+ * @property {Rectangle} [rectangle=Rectangle.MAX_VALUE] The rectangle covered by the layer.
+ * @property {Number} [minimumLevel=0] The minimum level-of-detail supported by the imagery provider.
+ * @property {Number} [maximumLevel] The maximum level-of-detail supported by the imagery provider, or undefined if there is no limit.
+ * @property {Ellipsoid} [ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
+ * @property {Credit|String} [credit] A credit for the data source, which is displayed on the canvas.
+ * @property {String|String[]} [subdomains='abc'] The subdomains to use for the {s}
placeholder in the URL template.
+ * If this parameter is a single string, each character in the string is a subdomain. If it is
+ * an array, each element in the array is a subdomain.
+ */
+
/**
* Provides tiled imagery served by {@link http://www.opengeospatial.org/standards/wmts|WMTS 1.0.0} compliant servers.
* This provider supports HTTP KVP-encoded and RESTful GetTile requests, but does not yet support the SOAP encoding.
@@ -24,27 +51,7 @@ var defaultParameters = Object.freeze({
* @alias WebMapTileServiceImageryProvider
* @constructor
*
- * @param {Object} options Object with the following properties:
- * @param {Resource|String} options.url The base URL for the WMTS GetTile operation (for KVP-encoded requests) or the tile-URL template (for RESTful requests). The tile-URL template should contain the following variables: {style}, {TileMatrixSet}, {TileMatrix}, {TileRow}, {TileCol}. The first two are optional if actual values are hardcoded or not required by the server. The {s} keyword may be used to specify subdomains.
- * @param {String} [options.format='image/jpeg'] The MIME type for images to retrieve from the server.
- * @param {String} options.layer The layer name for WMTS requests.
- * @param {String} options.style The style name for WMTS requests.
- * @param {String} options.tileMatrixSetID The identifier of the TileMatrixSet to use for WMTS requests.
- * @param {Array} [options.tileMatrixLabels] A list of identifiers in the TileMatrix to use for WMTS requests, one per TileMatrix level.
- * @param {Clock} [options.clock] A Clock instance that is used when determining the value for the time dimension. Required when options.times is specified.
- * @param {TimeIntervalCollection} [options.times] TimeIntervalCollection with its data
property being an object containing time dynamic dimension and their values.
- * @param {Object} [options.dimensions] A object containing static dimensions and their values.
- * @param {Number} [options.tileWidth=256] The tile width in pixels.
- * @param {Number} [options.tileHeight=256] The tile height in pixels.
- * @param {TilingScheme} [options.tilingScheme] The tiling scheme corresponding to the organization of the tiles in the TileMatrixSet.
- * @param {Rectangle} [options.rectangle=Rectangle.MAX_VALUE] The rectangle covered by the layer.
- * @param {Number} [options.minimumLevel=0] The minimum level-of-detail supported by the imagery provider.
- * @param {Number} [options.maximumLevel] The maximum level-of-detail supported by the imagery provider, or undefined if there is no limit.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
- * @param {Credit|String} [options.credit] A credit for the data source, which is displayed on the canvas.
- * @param {String|String[]} [options.subdomains='abc'] The subdomains to use for the {s}
placeholder in the URL template.
- * If this parameter is a single string, each character in the string is a subdomain. If it is
- * an array, each element in the array is a subdomain.
+ * @param {WebMapTileServiceImageryProvider.ConstructorOptions} options Object describing initialization options
*
* @demo {@link https://sandcastle.cesium.com/index.html?src=Web%20Map%20Tile%20Service%20with%20Time.html|Cesium Sandcastle Web Map Tile Service with Time Demo}
*
From 1b16c9a92c875cd5edcd673c9a4636ea6dd86644 Mon Sep 17 00:00:00 2001
From: James Bromwell <943160+thw0rted@users.noreply.github.com>
Date: Thu, 28 May 2020 18:16:23 +0200
Subject: [PATCH 26/36] Load-method option interfaces for some DataSources
---
Source/DataSources/CzmlDataSource.js | 19 +++++++++++------
Source/DataSources/GeoJsonDataSource.js | 27 ++++++++++++++++---------
Source/DataSources/KmlDataSource.js | 21 ++++++++++++-------
3 files changed, 44 insertions(+), 23 deletions(-)
diff --git a/Source/DataSources/CzmlDataSource.js b/Source/DataSources/CzmlDataSource.js
index dd14ca4c8a5d..b3517530ab20 100644
--- a/Source/DataSources/CzmlDataSource.js
+++ b/Source/DataSources/CzmlDataSource.js
@@ -4648,6 +4648,15 @@ function DocumentPacket() {
this.clock = undefined;
}
+/**
+ * @typedef {Object} CzmlDataSource.LoadOptions
+ *
+ * Initialization options for the `load` method.
+ *
+ * @property {Resource|string} [sourceUri] Overrides the url to use for resolving relative links.
+ * @property {Credit|string} [credit] A credit for the data source, which is displayed on the canvas.
+ */
+
/**
* A {@link DataSource} which processes {@link https://github.com/AnalyticalGraphicsInc/czml-writer/wiki/CZML-Guide|CZML}.
* @alias CzmlDataSource
@@ -4676,9 +4685,8 @@ function CzmlDataSource(name) {
* Creates a Promise to a new instance loaded with the provided CZML data.
*
* @param {Resource|String|Object} czml A url or CZML object to be processed.
- * @param {Object} [options] An object with the following properties:
- * @param {Resource|String} [options.sourceUri] Overrides the url to use for resolving relative links.
- * @param {Credit|String} [options.credit] A credit for the data source, which is displayed on the canvas.
+ * @param {CzmlDataSource.LoadOptions} [options] An object specifying configuration options
+ *
* @returns {Promise.} A promise that resolves to the new instance once the data is processed.
*/
CzmlDataSource.load = function (czml, options) {
@@ -4849,9 +4857,8 @@ CzmlDataSource.prototype.process = function (czml, options) {
* Loads the provided url or CZML object, replacing any existing data.
*
* @param {Resource|String|Object} czml A url or CZML object to be processed.
- * @param {Object} [options] An object with the following properties:
- * @param {String} [options.sourceUri] Overrides the url to use for resolving relative links.
- * @param {Credit|String} [options.credit] A credit for the data source, which is displayed on the canvas.
+ * @param {CzmlDataSource.LoadOptions} [options] An object specifying configuration options
+
* @returns {Promise.} A promise that resolves to this instances once the data is processed.
*/
CzmlDataSource.prototype.load = function (czml, options) {
diff --git a/Source/DataSources/GeoJsonDataSource.js b/Source/DataSources/GeoJsonDataSource.js
index c194705cb096..56fda5ed7da0 100644
--- a/Source/DataSources/GeoJsonDataSource.js
+++ b/Source/DataSources/GeoJsonDataSource.js
@@ -557,6 +557,22 @@ function processTopology(dataSource, geoJson, geometry, crsFunction, options) {
}
}
+/**
+ * @typedef {Object} GeoJsonDataSource.LoadOptions
+ *
+ * Initialization options for the `load` method.
+ *
+ * @property {String} [sourceUri] Overrides the url to use for resolving relative links.
+ * @property {Number} [markerSize=GeoJsonDataSource.markerSize] The default size of the map pin created for each point, in pixels.
+ * @property {String} [markerSymbol=GeoJsonDataSource.markerSymbol] The default symbol of the map pin created for each point.
+ * @property {Color} [markerColor=GeoJsonDataSource.markerColor] The default color of the map pin created for each point.
+ * @property {Color} [stroke=GeoJsonDataSource.stroke] The default color of polylines and polygon outlines.
+ * @property {Number} [strokeWidth=GeoJsonDataSource.strokeWidth] The default width of polylines and polygon outlines.
+ * @property {Color} [fill=GeoJsonDataSource.fill] The default color for polygon interiors.
+ * @property {Boolean} [clampToGround=GeoJsonDataSource.clampToGround] true if we want the geometry features (polygons or linestrings) clamped to the ground.
+ * @property {Credit|String} [credit] A credit for the data source, which is displayed on the canvas.
+ */
+
/**
* A {@link DataSource} which processes both
* {@link http://www.geojson.org/|GeoJSON} and {@link https://github.com/mbostock/topojson|TopoJSON} data.
@@ -599,16 +615,7 @@ function GeoJsonDataSource(name) {
* Creates a Promise to a new instance loaded with the provided GeoJSON or TopoJSON data.
*
* @param {Resource|String|Object} data A url, GeoJSON object, or TopoJSON object to be loaded.
- * @param {Object} [options] An object with the following properties:
- * @param {String} [options.sourceUri] Overrides the url to use for resolving relative links.
- * @param {Number} [options.markerSize=GeoJsonDataSource.markerSize] The default size of the map pin created for each point, in pixels.
- * @param {String} [options.markerSymbol=GeoJsonDataSource.markerSymbol] The default symbol of the map pin created for each point.
- * @param {Color} [options.markerColor=GeoJsonDataSource.markerColor] The default color of the map pin created for each point.
- * @param {Color} [options.stroke=GeoJsonDataSource.stroke] The default color of polylines and polygon outlines.
- * @param {Number} [options.strokeWidth=GeoJsonDataSource.strokeWidth] The default width of polylines and polygon outlines.
- * @param {Color} [options.fill=GeoJsonDataSource.fill] The default color for polygon interiors.
- * @param {Boolean} [options.clampToGround=GeoJsonDataSource.clampToGround] true if we want the geometry features (polygons or linestrings) clamped to the ground.
- * @param {Credit|String} [options.credit] A credit for the data source, which is displayed on the canvas.
+ * @param {GeoJsonDataSource.LoadOptions} [options] An object specifying configuration options
*
* @returns {Promise.} A promise that will resolve when the data is loaded.
*/
diff --git a/Source/DataSources/KmlDataSource.js b/Source/DataSources/KmlDataSource.js
index 7cecb01405b4..592e951fa0f7 100644
--- a/Source/DataSources/KmlDataSource.js
+++ b/Source/DataSources/KmlDataSource.js
@@ -3338,6 +3338,19 @@ function load(dataSource, entityCollection, data, options) {
});
}
+/**
+ * @typedef {Object} KmlDataSource.LoadOptions
+ *
+ * Initialization options for the `load` method.
+ *
+ * @property {Camera} camera The camera that is used for viewRefreshModes and sending camera properties to network links.
+ * @property {HTMLCanvasElement} canvas The canvas that is used for sending viewer properties to network links.
+ * @property {String} [sourceUri] Overrides the url to use for resolving relative links and other KML network features.
+ * @property {Boolean} [clampToGround=false] true if we want the geometry features (Polygons, LineStrings and LinearRings) clamped to the ground.
+ * @property {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The global ellipsoid used for geographical calculations.
+ * @property {Credit|String} [credit] A credit for the data source, which is displayed on the canvas.
+ */
+
/**
* A {@link DataSource} which processes Keyhole Markup Language 2.2 (KML).
*
@@ -3434,13 +3447,7 @@ function KmlDataSource(options) {
* Creates a Promise to a new instance loaded with the provided KML data.
*
* @param {Resource|String|Document|Blob} data A url, parsed KML document, or Blob containing binary KMZ data or a parsed KML document.
- * @param {Object} [options] An object with the following properties:
- * @param {Camera} options.camera The camera that is used for viewRefreshModes and sending camera properties to network links.
- * @param {HTMLCanvasElement} options.canvas The canvas that is used for sending viewer properties to network links.
- * @param {String} [options.sourceUri] Overrides the url to use for resolving relative links and other KML network features.
- * @param {Boolean} [options.clampToGround=false] true if we want the geometry features (Polygons, LineStrings and LinearRings) clamped to the ground.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The global ellipsoid used for geographical calculations.
- * @param {Credit|String} [options.credit] A credit for the data source, which is displayed on the canvas.
+ * @param {KmlDataSource.LoadOptions} [options] An object specifying configuration options
*
* @returns {Promise.} A promise that will resolve to a new KmlDataSource instance once the KML is loaded.
*/
From a89f7c9d4aedefe6e1d17184e4df0b134dfaf930 Mon Sep 17 00:00:00 2001
From: James Bromwell <943160+thw0rted@users.noreply.github.com>
Date: Thu, 28 May 2020 18:29:56 +0200
Subject: [PATCH 27/36] Options interfaces for Viewer, Resource
---
Source/Core/Resource.js | 31 +++++++----
Source/Widgets/Viewer/Viewer.js | 99 ++++++++++++++++++---------------
2 files changed, 74 insertions(+), 56 deletions(-)
diff --git a/Source/Core/Resource.js b/Source/Core/Resource.js
index c3fea4c508a6..c45cd1fc8ed1 100644
--- a/Source/Core/Resource.js
+++ b/Source/Core/Resource.js
@@ -212,21 +212,32 @@ function combineQueryParameters(q1, q2, preserveQueryParameters) {
return result;
}
+// QueryParameters must be a one-deep object whose values are a primtive or array thereof
+/** @typedef {string | number | boolean} QueryValue */
+/** @typedef {Object.} Resource.QueryParameters */
+
+/**
+ * @typedef {Object} Resource.ConstructorOptions
+ *
+ * Initialization options for the Resource constructor
+ *
+ * @property {String} url The url of the resource.
+ * @property {Resource.QueryParameters} [queryParameters] An object containing query parameters that will be sent when retrieving the resource.
+ * @property {Object} [templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
+ * @property {Object} [headers={}] Additional HTTP headers that will be sent.
+ * @property {Proxy} [proxy] A proxy to be used when loading the resource.
+ * @property {Resource.RetryCallback} [retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.
+ * @property {Number} [retryAttempts=0] The number of times the retryCallback should be called before giving up.
+ * @property {Request} [request] A Request object that will be used. Intended for internal use only.
+ */
+
/**
* A resource that includes the location and any other parameters we need to retrieve it or create derived resources. It also provides the ability to retry requests.
*
* @alias Resource
* @constructor
*
- * @param {String|Object} options A url or an object with the following properties
- * @param {String} options.url The url of the resource.
- * @param {Object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.
- * @param {Object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
- * @param {Object} [options.headers={}] Additional HTTP headers that will be sent.
- * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.
- * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.
- * @param {Number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.
- * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.
+ * @param {String|Resource.ConstructorOptions} options A url or an object describing initialization options
*
* @example
* function refreshTokenRetryCallback(resource, error) {
@@ -564,7 +575,7 @@ Resource.prototype.getUrlComponent = function (query, proxy) {
* Combines the specified object and the existing query parameters. This allows you to add many parameters at once,
* as opposed to adding them one at a time to the queryParameters property. If a value is already set, it will be replaced with the new value.
*
- * @param {Object} params The query parameters
+ * @param {Resource.QueryParameters} params The query parameters
* @param {Boolean} [useAsDefault=false] If true the params will be used as the default values, so they will only be set if they are undefined.
*/
Resource.prototype.setQueryParameters = function (params, useAsDefault) {
diff --git a/Source/Widgets/Viewer/Viewer.js b/Source/Widgets/Viewer/Viewer.js
index ef35e2c61d3d..9decdb30f3e4 100644
--- a/Source/Widgets/Viewer/Viewer.js
+++ b/Source/Widgets/Viewer/Viewer.js
@@ -209,6 +209,58 @@ function enableVRUI(viewer, enabled) {
}
}
+/**
+ * @typedef {Object} Viewer.ConstructorOptions
+ *
+ * Initialization options for the Viewer constructor
+ *
+ * @property {Boolean} [animation=true] If set to false, the Animation widget will not be created.
+ * @property {Boolean} [baseLayerPicker=true] If set to false, the BaseLayerPicker widget will not be created.
+ * @property {Boolean} [fullscreenButton=true] If set to false, the FullscreenButton widget will not be created.
+ * @property {Boolean} [vrButton=false] If set to true, the VRButton widget will be created.
+ * @property {Boolean|GeocoderService[]} [geocoder=true] If set to false, the Geocoder widget will not be created.
+ * @property {Boolean} [homeButton=true] If set to false, the HomeButton widget will not be created.
+ * @property {Boolean} [infoBox=true] If set to false, the InfoBox widget will not be created.
+ * @property {Boolean} [sceneModePicker=true] If set to false, the SceneModePicker widget will not be created.
+ * @property {Boolean} [selectionIndicator=true] If set to false, the SelectionIndicator widget will not be created.
+ * @property {Boolean} [timeline=true] If set to false, the Timeline widget will not be created.
+ * @property {Boolean} [navigationHelpButton=true] If set to false, the navigation help button will not be created.
+ * @property {Boolean} [navigationInstructionsInitiallyVisible=true] True if the navigation instructions should initially be visible, or false if the should not be shown until the user explicitly clicks the button.
+ * @property {Boolean} [scene3DOnly=false] When true
, each geometry instance will only be rendered in 3D to save GPU memory.
+ * @property {Boolean} [shouldAnimate=false] true
if the clock should attempt to advance simulation time by default, false
otherwise. This option takes precedence over setting {@link Viewer#clockViewModel}.
+ * @property {ClockViewModel} [clockViewModel=new ClockViewModel(clock)] The clock view model to use to control current time.
+ * @property {ProviderViewModel} [selectedImageryProviderViewModel] The view model for the current base imagery layer, if not supplied the first available base layer is used. This value is only valid if `baseLayerPicker` is set to true.
+ * @property {ProviderViewModel[]} [imageryProviderViewModels=createDefaultImageryProviderViewModels()] The array of ProviderViewModels to be selectable from the BaseLayerPicker. This value is only valid if `baseLayerPicker` is set to true.
+ * @property {ProviderViewModel} [selectedTerrainProviderViewModel] The view model for the current base terrain layer, if not supplied the first available base layer is used. This value is only valid if `baseLayerPicker` is set to true.
+ * @property {ProviderViewModel[]} [terrainProviderViewModels=createDefaultTerrainProviderViewModels()] The array of ProviderViewModels to be selectable from the BaseLayerPicker. This value is only valid if `baseLayerPicker` is set to true.
+ * @property {ImageryProvider} [imageryProvider=createWorldImagery()] The imagery provider to use. This value is only valid if `baseLayerPicker` is set to false.
+ * @property {TerrainProvider} [terrainProvider=new EllipsoidTerrainProvider()] The terrain provider to use
+ * @property {SkyBox} [skyBox] The skybox used to render the stars. When undefined
, the default stars are used.
+ * @property {SkyAtmosphere} [skyAtmosphere] Blue sky, and the glow around the Earth's limb. Set to false
to turn it off.
+ * @property {Element|String} [fullscreenElement=document.body] The element or id to be placed into fullscreen mode when the full screen button is pressed.
+ * @property {Boolean} [useDefaultRenderLoop=true] True if this widget should control the render loop, false otherwise.
+ * @property {Number} [targetFrameRate] The target frame rate when using the default render loop.
+ * @property {Boolean} [showRenderLoopErrors=true] If true, this widget will automatically display an HTML panel to the user containing the error, if a render loop error occurs.
+ * @property {Boolean} [useBrowserRecommendedResolution=true] If true, render at the browser's recommended resolution and ignore window.devicePixelRatio
.
+ * @property {Boolean} [automaticallyTrackDataSourceClocks=true] If true, this widget will automatically track the clock settings of newly added DataSources, updating if the DataSource's clock changes. Set this to false if you want to configure the clock independently.
+ * @property {Object} [contextOptions] Context and WebGL creation properties corresponding to options
passed to {@link Scene}.
+ * @property {SceneMode} [sceneMode=SceneMode.SCENE3D] The initial scene mode.
+ * @property {MapProjection} [mapProjection=new GeographicProjection()] The map projection to use in 2D and Columbus View modes.
+ * @property {Globe} [globe=new Globe(mapProjection.ellipsoid)] The globe to use in the scene. If set to false
, no globe will be added.
+ * @property {Boolean} [orderIndependentTranslucency=true] If true and the configuration supports it, use order independent translucency.
+ * @property {Element|String} [creditContainer] The DOM element or ID that will contain the {@link CreditDisplay}. If not specified, the credits are added to the bottom of the widget itself.
+ * @property {Element|String} [creditViewport] The DOM element or ID that will contain the credit pop up created by the {@link CreditDisplay}. If not specified, it will appear over the widget itself.
+ * @property {DataSourceCollection} [dataSources=new DataSourceCollection()] The collection of data sources visualized by the widget. If this parameter is provided,
+ * the instance is assumed to be owned by the caller and will not be destroyed when the viewer is destroyed.
+ * @property {Number} [terrainExaggeration=1.0] A scalar used to exaggerate the terrain. Note that terrain exaggeration will not modify any other primitive as they are positioned relative to the ellipsoid.
+ * @property {Boolean} [shadows=false] Determines if shadows are cast by light sources.
+ * @property {ShadowMode} [terrainShadows=ShadowMode.RECEIVE_ONLY] Determines if the terrain casts or receives shadows from light sources.
+ * @property {MapMode2D} [mapMode2D=MapMode2D.INFINITE_SCROLL] Determines if the 2D map is rotatable or can be scrolled infinitely in the horizontal direction.
+ * @property {Boolean} [projectionPicker=false] If set to true, the ProjectionPicker widget will be created.
+ * @property {Boolean} [requestRenderMode=false] If true, rendering a frame will only occur when needed as determined by changes within the scene. Enabling reduces the CPU/GPU usage of your application and uses less battery on mobile, but requires using {@link Scene#requestRender} to render a new frame explicitly in this mode. This will be necessary in many cases after making changes to the scene in other parts of the API. See {@link https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance/|Improving Performance with Explicit Rendering}.
+ * @property {Number} [maximumRenderTimeChange=0.0] If requestRenderMode is true, this value defines the maximum change in simulation time allowed before a render is requested. See {@link https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance/|Improving Performance with Explicit Rendering}.
+ */
+
/**
* A base widget for building applications. It composites all of the standard Cesium widgets into one reusable package.
* The widget can always be extended by using mixins, which add functionality useful for a variety of applications.
@@ -217,52 +269,7 @@ function enableVRUI(viewer, enabled) {
* @constructor
*
* @param {Element|String} container The DOM element or ID that will contain the widget.
- * @param {Object} [options] Object with the following properties:
- * @param {Boolean} [options.animation=true] If set to false, the Animation widget will not be created.
- * @param {Boolean} [options.baseLayerPicker=true] If set to false, the BaseLayerPicker widget will not be created.
- * @param {Boolean} [options.fullscreenButton=true] If set to false, the FullscreenButton widget will not be created.
- * @param {Boolean} [options.vrButton=false] If set to true, the VRButton widget will be created.
- * @param {Boolean|GeocoderService[]} [options.geocoder=true] If set to false, the Geocoder widget will not be created.
- * @param {Boolean} [options.homeButton=true] If set to false, the HomeButton widget will not be created.
- * @param {Boolean} [options.infoBox=true] If set to false, the InfoBox widget will not be created.
- * @param {Boolean} [options.sceneModePicker=true] If set to false, the SceneModePicker widget will not be created.
- * @param {Boolean} [options.selectionIndicator=true] If set to false, the SelectionIndicator widget will not be created.
- * @param {Boolean} [options.timeline=true] If set to false, the Timeline widget will not be created.
- * @param {Boolean} [options.navigationHelpButton=true] If set to false, the navigation help button will not be created.
- * @param {Boolean} [options.navigationInstructionsInitiallyVisible=true] True if the navigation instructions should initially be visible, or false if the should not be shown until the user explicitly clicks the button.
- * @param {Boolean} [options.scene3DOnly=false] When true
, each geometry instance will only be rendered in 3D to save GPU memory.
- * @param {Boolean} [options.shouldAnimate=false] true
if the clock should attempt to advance simulation time by default, false
otherwise. This option takes precedence over setting {@link Viewer#clockViewModel}.
- * @param {ClockViewModel} [options.clockViewModel=new ClockViewModel(options.clock)] The clock view model to use to control current time.
- * @param {ProviderViewModel} [options.selectedImageryProviderViewModel] The view model for the current base imagery layer, if not supplied the first available base layer is used. This value is only valid if options.baseLayerPicker is set to true.
- * @param {ProviderViewModel[]} [options.imageryProviderViewModels=createDefaultImageryProviderViewModels()] The array of ProviderViewModels to be selectable from the BaseLayerPicker. This value is only valid if options.baseLayerPicker is set to true.
- * @param {ProviderViewModel} [options.selectedTerrainProviderViewModel] The view model for the current base terrain layer, if not supplied the first available base layer is used. This value is only valid if options.baseLayerPicker is set to true.
- * @param {ProviderViewModel[]} [options.terrainProviderViewModels=createDefaultTerrainProviderViewModels()] The array of ProviderViewModels to be selectable from the BaseLayerPicker. This value is only valid if options.baseLayerPicker is set to true.
- * @param {ImageryProvider} [options.imageryProvider=createWorldImagery()] The imagery provider to use. This value is only valid if options.baseLayerPicker is set to false.
- * @param {TerrainProvider} [options.terrainProvider=new EllipsoidTerrainProvider()] The terrain provider to use
- * @param {SkyBox} [options.skyBox] The skybox used to render the stars. When undefined
, the default stars are used.
- * @param {SkyAtmosphere} [options.skyAtmosphere] Blue sky, and the glow around the Earth's limb. Set to false
to turn it off.
- * @param {Element|String} [options.fullscreenElement=document.body] The element or id to be placed into fullscreen mode when the full screen button is pressed.
- * @param {Boolean} [options.useDefaultRenderLoop=true] True if this widget should control the render loop, false otherwise.
- * @param {Number} [options.targetFrameRate] The target frame rate when using the default render loop.
- * @param {Boolean} [options.showRenderLoopErrors=true] If true, this widget will automatically display an HTML panel to the user containing the error, if a render loop error occurs.
- * @param {Boolean} [options.useBrowserRecommendedResolution=true] If true, render at the browser's recommended resolution and ignore window.devicePixelRatio
.
- * @param {Boolean} [options.automaticallyTrackDataSourceClocks=true] If true, this widget will automatically track the clock settings of newly added DataSources, updating if the DataSource's clock changes. Set this to false if you want to configure the clock independently.
- * @param {Object} [options.contextOptions] Context and WebGL creation properties corresponding to options
passed to {@link Scene}.
- * @param {SceneMode} [options.sceneMode=SceneMode.SCENE3D] The initial scene mode.
- * @param {MapProjection} [options.mapProjection=new GeographicProjection()] The map projection to use in 2D and Columbus View modes.
- * @param {Globe} [options.globe=new Globe(mapProjection.ellipsoid)] The globe to use in the scene. If set to false
, no globe will be added.
- * @param {Boolean} [options.orderIndependentTranslucency=true] If true and the configuration supports it, use order independent translucency.
- * @param {Element|String} [options.creditContainer] The DOM element or ID that will contain the {@link CreditDisplay}. If not specified, the credits are added to the bottom of the widget itself.
- * @param {Element|String} [options.creditViewport] The DOM element or ID that will contain the credit pop up created by the {@link CreditDisplay}. If not specified, it will appear over the widget itself.
- * @param {DataSourceCollection} [options.dataSources=new DataSourceCollection()] The collection of data sources visualized by the widget. If this parameter is provided,
- * the instance is assumed to be owned by the caller and will not be destroyed when the viewer is destroyed.
- * @param {Number} [options.terrainExaggeration=1.0] A scalar used to exaggerate the terrain. Note that terrain exaggeration will not modify any other primitive as they are positioned relative to the ellipsoid.
- * @param {Boolean} [options.shadows=false] Determines if shadows are cast by light sources.
- * @param {ShadowMode} [options.terrainShadows=ShadowMode.RECEIVE_ONLY] Determines if the terrain casts or receives shadows from light sources.
- * @param {MapMode2D} [options.mapMode2D=MapMode2D.INFINITE_SCROLL] Determines if the 2D map is rotatable or can be scrolled infinitely in the horizontal direction.
- * @param {Boolean} [options.projectionPicker=false] If set to true, the ProjectionPicker widget will be created.
- * @param {Boolean} [options.requestRenderMode=false] If true, rendering a frame will only occur when needed as determined by changes within the scene. Enabling reduces the CPU/GPU usage of your application and uses less battery on mobile, but requires using {@link Scene#requestRender} to render a new frame explicitly in this mode. This will be necessary in many cases after making changes to the scene in other parts of the API. See {@link https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance/|Improving Performance with Explicit Rendering}.
- * @param {Number} [options.maximumRenderTimeChange=0.0] If requestRenderMode is true, this value defines the maximum change in simulation time allowed before a render is requested. See {@link https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance/|Improving Performance with Explicit Rendering}.
+ * @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.
From e18535fefb9b861e82e25f5a11c987536b8c5039 Mon Sep 17 00:00:00 2001
From: James Bromwell <943160+thw0rted@users.noreply.github.com>
Date: Fri, 29 May 2020 10:40:43 +0200
Subject: [PATCH 28/36] Add CONTRIBUTORS entry
---
CONTRIBUTORS.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 56a2e370dffe..7aac9d733c78 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -256,3 +256,4 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu
- [SungHo Lim](https://github.com/SambaLim)
- [Michael Fink](https://github.com/vividos)
- [Jakub Vrana](https://github.com/vrana)
+- [James Bromwell](https://github.com/thw0rted)
From d3cf0ac00a2e7c6892b257a00f85f963a32da06e Mon Sep 17 00:00:00 2001
From: James Bromwell <943160+thw0rted@users.noreply.github.com>
Date: Fri, 29 May 2020 11:58:02 +0200
Subject: [PATCH 29/36] Use function overloading for exportKml
---
Source/DataSources/exportKml.js | 76 ++++++++++++++++++++++-----------
1 file changed, 51 insertions(+), 25 deletions(-)
diff --git a/Source/DataSources/exportKml.js b/Source/DataSources/exportKml.js
index 46c1fa16de9e..0d8a17d4b3c2 100644
--- a/Source/DataSources/exportKml.js
+++ b/Source/DataSources/exportKml.js
@@ -221,6 +221,33 @@ IdManager.prototype.get = function (id) {
return id.toString() + "-" + ++ids[id];
};
+/**
+ * @variation 2 KML return
+ * @param {Object} options An object with the following properties:
+ * @param {EntityCollection} options.entities The EntityCollection to export as KML.
+ * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid for the output file.
+ * @param {exportKmlModelCallback} [options.modelCallback] A callback that will be called with a {@link ModelGraphics} instance and should return the URI to use in the KML. Required if a model exists in the entity collection.
+ * @param {JulianDate} [options.time=entities.computeAvailability().start] The time value to use to get properties that are not time varying in KML.
+ * @param {TimeInterval} [options.defaultAvailability=entities.computeAvailability()] The interval that will be sampled if an entity doesn't have an availability.
+ * @param {Number} [options.sampleDuration=60] The number of seconds to sample properties that are varying in KML.
+ * @param {false} [options.kmz=false] If false or unset, returns the KML file and referenced resources individually
+ *
+ * @returns {Promise} A promise that resolved to an object containing the KML string and a dictionary of external file Blobs
+ *
+ * @example
+ * Cesium.exportKml({
+ * entities: entityCollection
+ * })
+ * .then(function(result) {
+ * // The XML string is in result.kml
+ *
+ * var externalFiles = result.externalFiles
+ * for(var file in externalFiles) {
+ * // file is the name of the file used in the KML document as the href
+ * // externalFiles[file] is a Blob with the contents of the file
+ * }
+ * });
+ */
/**
* @typedef exportKmlResultKml
@@ -236,17 +263,22 @@ IdManager.prototype.get = function (id) {
*/
/**
- * Exports an EntityCollection as a KML document. Only Point, Billboard, Model, Path, Polygon, Polyline geometries
- * will be exported. Note that there is not a 1 to 1 mapping of Entity properties to KML Feature properties. For
- * example, entity properties that are time dynamic but cannot be dynamic in KML are exported with their values at
- * options.time or the beginning of the EntityCollection's time interval if not specified. For time-dynamic properties
- * that are supported in KML, we use the samples if it is a {@link SampledProperty} otherwise we sample the value using
- * the options.sampleDuration. Point, Billboard, Model and Path geometries with time-dynamic positions will be exported
- * as gx:Track Features. Not all Materials are representable in KML, so for more advanced Materials just the primary
- * color is used. Canvas objects are exported as PNG images.
+ * Exports an EntityCollection as a KML document or KMZ archive.
+ *
+ * Only Point, Billboard, Model, Path, Polygon, Polyline geometries will be exported.
+ * Note that there is not a 1 to 1 mapping of Entity properties to KML Feature
+ * properties. For example, entity properties that are time dynamic but cannot
+ * be dynamic in KML are exported with their values at `options.time` or the
+ * beginning of the EntityCollection's time interval if not specified. For
+ * time-dynamic properties that are supported in KML, we use the samples if it
+ * is a {@link SampledProperty}, otherwise we sample the value using the
+ * `options.sampleDuration`. Point, Billboard, Model and Path geometries with
+ * time-dynamic positions will be exported as gx:Track Features.
*
- * @function exportKml
+ * Not all Materials are representable in KML, so for more advanced Materials
+ * just the primary color is used. Canvas objects are exported as PNG images.
*
+ * @variation 1 KMZ return
* @param {Object} options An object with the following properties:
* @param {EntityCollection} options.entities The EntityCollection to export as KML.
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid for the output file.
@@ -254,26 +286,20 @@ IdManager.prototype.get = function (id) {
* @param {JulianDate} [options.time=entities.computeAvailability().start] The time value to use to get properties that are not time varying in KML.
* @param {TimeInterval} [options.defaultAvailability=entities.computeAvailability()] The interval that will be sampled if an entity doesn't have an availability.
* @param {Number} [options.sampleDuration=60] The number of seconds to sample properties that are varying in KML.
- * @param {Boolean} [options.kmz=false] If true KML and external files will be compressed into a kmz file.
+ * @param {true} options.kmz If true, KML and external files will be compressed into a single KMZ file.
+ *
+ * @returns {Promise} A promise that resolves to a KMZ file as a Blob.
*
- * @returns {Promise} A promise that resolved to an object containing the KML string and a dictionary of external file blobs, or a kmz file as a blob if options.kmz is true.
* @demo {@link https://sandcastle.cesium.com/index.html?src=Export%20KML.html|Cesium Sandcastle KML Export Demo}
* @example
* Cesium.exportKml({
- * entities: entityCollection
- * })
- * .then(function(result) {
- * // The XML string is in result.kml
- *
- * var externalFiles = result.externalFiles
- * for(var file in externalFiles) {
- * // file is the name of the file used in the KML document as the href
- * // externalFiles[file] is a blob with the contents of the file
- * }
- * });
- *
- */
-function exportKml(options) {
+ * entities: entityCollection,
+ * options: { kmz: true }
+ * })
+ * .then(function(result) {
+ * downloadFile(result.kmz);
+ * });
+ */ function exportKml(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
var entities = options.entities;
var kmz = defaultValue(options.kmz, false);
From d734c832a3aa004a565ca254bfb8630c1c413420 Mon Sep 17 00:00:00 2001
From: James Bromwell <943160+thw0rted@users.noreply.github.com>
Date: Fri, 29 May 2020 17:32:16 +0200
Subject: [PATCH 30/36] Spell out docs for Resource.QueryParameter
---
Source/Core/Resource.js | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/Source/Core/Resource.js b/Source/Core/Resource.js
index c45cd1fc8ed1..1afe7f7ab6b4 100644
--- a/Source/Core/Resource.js
+++ b/Source/Core/Resource.js
@@ -212,9 +212,12 @@ function combineQueryParameters(q1, q2, preserveQueryParameters) {
return result;
}
-// QueryParameters must be a one-deep object whose values are a primtive or array thereof
/** @typedef {string | number | boolean} QueryValue */
-/** @typedef {Object.} Resource.QueryParameters */
+/**
+ * @typedef {Object.} Resource.QueryParameters
+ * QueryParameters must be an object whose keys are parameter names and whose
+ * values are a primitive (string, number, boolean) or an array thereof.
+ * */
/**
* @typedef {Object} Resource.ConstructorOptions
From a38104e1910594eb05ab341f6d6f53cee10644fa Mon Sep 17 00:00:00 2001
From: Matthew Amato
Date: Fri, 29 May 2020 17:13:31 -0400
Subject: [PATCH 31/36] Undo some changes
---
Source/Core/Event.js | 5 +-
Source/Core/Resource.js | 34 ++++--------
Source/DataSources/DataSource.js | 4 +-
Source/DataSources/Entity.js | 4 +-
Source/DataSources/EntityCluster.js | 5 +-
Source/DataSources/PolylineGraphics.js | 3 -
Source/DataSources/PropertyBag.js | 7 ++-
Source/DataSources/exportKml.js | 76 +++++++++-----------------
Source/Widgets/Viewer/Viewer.js | 2 +-
gulpfile.cjs | 32 ++++-------
10 files changed, 60 insertions(+), 112 deletions(-)
diff --git a/Source/Core/Event.js b/Source/Core/Event.js
index 8becdbdbb9eb..99001dc5fce5 100644
--- a/Source/Core/Event.js
+++ b/Source/Core/Event.js
@@ -7,7 +7,6 @@ import defined from "./defined.js";
* exposed as a property for others to subscribe to.
*
* @alias Event
- * @template Listener the function call signature for this event's listeners
* @constructor
* @example
* MyObject.prototype.myListener = function(arg1, arg2) {
@@ -47,7 +46,7 @@ Object.defineProperties(Event.prototype, {
* An optional scope can be provided to serve as the this
pointer
* in which the function will execute.
*
- * @param {Listener} listener The function to be executed when the event is raised.
+ * @param {Function} listener The function to be executed when the event is raised.
* @param {Object} [scope] An optional object scope to serve as the this
* pointer in which the listener function will execute.
* @returns {Event.RemoveCallback} A function that will remove this event listener when invoked.
@@ -72,7 +71,7 @@ Event.prototype.addEventListener = function (listener, scope) {
/**
* Unregisters a previously registered callback.
*
- * @param {Listener} listener The function to be unregistered.
+ * @param {Function} listener The function to be unregistered.
* @param {Object} [scope] The scope that was originally passed to addEventListener.
* @returns {Boolean} true
if the listener was removed; false
if the listener and scope are not registered with the event.
*
diff --git a/Source/Core/Resource.js b/Source/Core/Resource.js
index 1afe7f7ab6b4..c3fea4c508a6 100644
--- a/Source/Core/Resource.js
+++ b/Source/Core/Resource.js
@@ -212,35 +212,21 @@ function combineQueryParameters(q1, q2, preserveQueryParameters) {
return result;
}
-/** @typedef {string | number | boolean} QueryValue */
-/**
- * @typedef {Object.} Resource.QueryParameters
- * QueryParameters must be an object whose keys are parameter names and whose
- * values are a primitive (string, number, boolean) or an array thereof.
- * */
-
-/**
- * @typedef {Object} Resource.ConstructorOptions
- *
- * Initialization options for the Resource constructor
- *
- * @property {String} url The url of the resource.
- * @property {Resource.QueryParameters} [queryParameters] An object containing query parameters that will be sent when retrieving the resource.
- * @property {Object} [templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
- * @property {Object} [headers={}] Additional HTTP headers that will be sent.
- * @property {Proxy} [proxy] A proxy to be used when loading the resource.
- * @property {Resource.RetryCallback} [retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.
- * @property {Number} [retryAttempts=0] The number of times the retryCallback should be called before giving up.
- * @property {Request} [request] A Request object that will be used. Intended for internal use only.
- */
-
/**
* A resource that includes the location and any other parameters we need to retrieve it or create derived resources. It also provides the ability to retry requests.
*
* @alias Resource
* @constructor
*
- * @param {String|Resource.ConstructorOptions} options A url or an object describing initialization options
+ * @param {String|Object} options A url or an object with the following properties
+ * @param {String} options.url The url of the resource.
+ * @param {Object} [options.queryParameters] An object containing query parameters that will be sent when retrieving the resource.
+ * @param {Object} [options.templateValues] Key/Value pairs that are used to replace template values (eg. {x}).
+ * @param {Object} [options.headers={}] Additional HTTP headers that will be sent.
+ * @param {Proxy} [options.proxy] A proxy to be used when loading the resource.
+ * @param {Resource.RetryCallback} [options.retryCallback] The Function to call when a request for this resource fails. If it returns true, the request will be retried.
+ * @param {Number} [options.retryAttempts=0] The number of times the retryCallback should be called before giving up.
+ * @param {Request} [options.request] A Request object that will be used. Intended for internal use only.
*
* @example
* function refreshTokenRetryCallback(resource, error) {
@@ -578,7 +564,7 @@ Resource.prototype.getUrlComponent = function (query, proxy) {
* Combines the specified object and the existing query parameters. This allows you to add many parameters at once,
* as opposed to adding them one at a time to the queryParameters property. If a value is already set, it will be replaced with the new value.
*
- * @param {Resource.QueryParameters} params The query parameters
+ * @param {Object} params The query parameters
* @param {Boolean} [useAsDefault=false] If true the params will be used as the default values, so they will only be set if they are undefined.
*/
Resource.prototype.setQueryParameters = function (params, useAsDefault) {
diff --git a/Source/DataSources/DataSource.js b/Source/DataSources/DataSource.js
index 4ac760371721..182dac7602bf 100644
--- a/Source/DataSources/DataSource.js
+++ b/Source/DataSources/DataSource.js
@@ -58,7 +58,7 @@ Object.defineProperties(DataSource.prototype, {
/**
* Gets an event that will be raised if an error is encountered during processing.
* @memberof DataSource.prototype
- * @type {Event}
+ * @type {Event}
*/
errorEvent: {
get: DeveloperError.throwInstantiationError,
@@ -66,7 +66,7 @@ Object.defineProperties(DataSource.prototype, {
/**
* Gets an event that will be raised when the value of isLoading changes.
* @memberof DataSource.prototype
- * @type {Event}
+ * @type {Event}
*/
loadingEvent: {
get: DeveloperError.throwInstantiationError,
diff --git a/Source/DataSources/Entity.js b/Source/DataSources/Entity.js
index 80493ed55ab4..091ca47492df 100644
--- a/Source/DataSources/Entity.js
+++ b/Source/DataSources/Entity.js
@@ -70,10 +70,8 @@ function createPropertyTypeDescriptor(name, Type) {
* @property {TimeIntervalCollection} [availability] The availability, if any, associated with this object.
* @property {Boolean} [show] A boolean value indicating if the entity and its children are displayed.
* @property {Property | string} [description] A string Property specifying an HTML description for this entity.
- * @property {PositionProperty | CallbackProperty | Cartesian3} [position] A Property specifying the entity position.
- * **** TODO ****
+ * @property {PositionProperty | Cartesian3} [position] A Property specifying the entity position.
* @property {Property} [orientation] A Property specifying the entity orientation.
- * **** TODO ****
* @property {Property} [viewFrom] A suggested initial offset for viewing this object.
* @property {Entity} [parent] A parent entity to associate with this entity.
* @property {BillboardGraphics | BillboardGraphics.ConstructorOptions} [billboard] A billboard to associate with this entity.
diff --git a/Source/DataSources/EntityCluster.js b/Source/DataSources/EntityCluster.js
index cee9319edec1..2779deb12142 100644
--- a/Source/DataSources/EntityCluster.js
+++ b/Source/DataSources/EntityCluster.js
@@ -549,7 +549,7 @@ Object.defineProperties(EntityCluster.prototype, {
/**
* Gets the event that will be raised when a new cluster will be displayed. The signature of the event listener is {@link EntityCluster.newClusterCallback}.
* @memberof EntityCluster.prototype
- * @type {Event}
+ * @type {Event}
*/
clusterEvent: {
get: function () {
@@ -963,8 +963,7 @@ EntityCluster.prototype.destroy = function () {
* @callback EntityCluster.newClusterCallback
*
* @param {Entity[]} clusteredEntities An array of the entities contained in the cluster.
- * @param {{billboard: Billboard, label: Label, point: PointPrimitive}} cluster An object
- * containing billboard, label, and point properties. The values are the same as
+ * @param {Object} cluster An object containing billboard, label, and point properties. The values are the same as
* billboard, label and point entities, but must be the values of the ConstantProperty.
*
* @example
diff --git a/Source/DataSources/PolylineGraphics.js b/Source/DataSources/PolylineGraphics.js
index 1230a1565490..90566a523341 100644
--- a/Source/DataSources/PolylineGraphics.js
+++ b/Source/DataSources/PolylineGraphics.js
@@ -16,9 +16,6 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
* @property {Property | number} [granularity=Cesium.Math.RADIANS_PER_DEGREE] A numeric Property specifying the angular distance between each latitude and longitude if arcType is not ArcType.NONE.
* @property {MaterialProperty | Color} [material=Color.WHITE] A Property specifying the material used to draw the polyline.
* @property {MaterialProperty | Color} [depthFailMaterial] A property specifying the material used to draw the polyline when it is below the terrain.
- *
- * **** TODO **** this was originally only ArcType, not a Property (!) -- pretty sure that was wrong?
- *
* @property {Property | ArcType} [arcType=ArcType.GEODESIC] The type of line the polyline segments must follow.
* @property {Property | boolean} [clampToGround=false] A boolean Property specifying whether the Polyline should be clamped to the ground.
* @property {Property | ShadowMode} [shadows=ShadowMode.DISABLED] An enum Property specifying whether the polyline casts or receives shadows from light sources.
diff --git a/Source/DataSources/PropertyBag.js b/Source/DataSources/PropertyBag.js
index 24f95598a6be..688053f4c7ae 100644
--- a/Source/DataSources/PropertyBag.js
+++ b/Source/DataSources/PropertyBag.js
@@ -9,7 +9,12 @@ import Property from "./Property.js";
/**
* A {@link Property} whose value is a key-value mapping of property names to the computed value of other properties.
*
- * @typedef {PropertyBagType}
+ * @alias PropertyBag
+ * @constructor
+ * @implements {DictionaryLike}
+ *
+ * @param {Object} [value] An object, containing key-value mapping of property names to properties.
+ * @param {Function} [createPropertyCallback] A function that will be called when the value of any of the properties in value are not a Property.
*/
function PropertyBag(value, createPropertyCallback) {
this._propertyNames = [];
diff --git a/Source/DataSources/exportKml.js b/Source/DataSources/exportKml.js
index 0d8a17d4b3c2..46c1fa16de9e 100644
--- a/Source/DataSources/exportKml.js
+++ b/Source/DataSources/exportKml.js
@@ -221,33 +221,6 @@ IdManager.prototype.get = function (id) {
return id.toString() + "-" + ++ids[id];
};
-/**
- * @variation 2 KML return
- * @param {Object} options An object with the following properties:
- * @param {EntityCollection} options.entities The EntityCollection to export as KML.
- * @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid for the output file.
- * @param {exportKmlModelCallback} [options.modelCallback] A callback that will be called with a {@link ModelGraphics} instance and should return the URI to use in the KML. Required if a model exists in the entity collection.
- * @param {JulianDate} [options.time=entities.computeAvailability().start] The time value to use to get properties that are not time varying in KML.
- * @param {TimeInterval} [options.defaultAvailability=entities.computeAvailability()] The interval that will be sampled if an entity doesn't have an availability.
- * @param {Number} [options.sampleDuration=60] The number of seconds to sample properties that are varying in KML.
- * @param {false} [options.kmz=false] If false or unset, returns the KML file and referenced resources individually
- *
- * @returns {Promise} A promise that resolved to an object containing the KML string and a dictionary of external file Blobs
- *
- * @example
- * Cesium.exportKml({
- * entities: entityCollection
- * })
- * .then(function(result) {
- * // The XML string is in result.kml
- *
- * var externalFiles = result.externalFiles
- * for(var file in externalFiles) {
- * // file is the name of the file used in the KML document as the href
- * // externalFiles[file] is a Blob with the contents of the file
- * }
- * });
- */
/**
* @typedef exportKmlResultKml
@@ -263,22 +236,17 @@ IdManager.prototype.get = function (id) {
*/
/**
- * Exports an EntityCollection as a KML document or KMZ archive.
- *
- * Only Point, Billboard, Model, Path, Polygon, Polyline geometries will be exported.
- * Note that there is not a 1 to 1 mapping of Entity properties to KML Feature
- * properties. For example, entity properties that are time dynamic but cannot
- * be dynamic in KML are exported with their values at `options.time` or the
- * beginning of the EntityCollection's time interval if not specified. For
- * time-dynamic properties that are supported in KML, we use the samples if it
- * is a {@link SampledProperty}, otherwise we sample the value using the
- * `options.sampleDuration`. Point, Billboard, Model and Path geometries with
- * time-dynamic positions will be exported as gx:Track Features.
+ * Exports an EntityCollection as a KML document. Only Point, Billboard, Model, Path, Polygon, Polyline geometries
+ * will be exported. Note that there is not a 1 to 1 mapping of Entity properties to KML Feature properties. For
+ * example, entity properties that are time dynamic but cannot be dynamic in KML are exported with their values at
+ * options.time or the beginning of the EntityCollection's time interval if not specified. For time-dynamic properties
+ * that are supported in KML, we use the samples if it is a {@link SampledProperty} otherwise we sample the value using
+ * the options.sampleDuration. Point, Billboard, Model and Path geometries with time-dynamic positions will be exported
+ * as gx:Track Features. Not all Materials are representable in KML, so for more advanced Materials just the primary
+ * color is used. Canvas objects are exported as PNG images.
*
- * Not all Materials are representable in KML, so for more advanced Materials
- * just the primary color is used. Canvas objects are exported as PNG images.
+ * @function exportKml
*
- * @variation 1 KMZ return
* @param {Object} options An object with the following properties:
* @param {EntityCollection} options.entities The EntityCollection to export as KML.
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid for the output file.
@@ -286,20 +254,26 @@ IdManager.prototype.get = function (id) {
* @param {JulianDate} [options.time=entities.computeAvailability().start] The time value to use to get properties that are not time varying in KML.
* @param {TimeInterval} [options.defaultAvailability=entities.computeAvailability()] The interval that will be sampled if an entity doesn't have an availability.
* @param {Number} [options.sampleDuration=60] The number of seconds to sample properties that are varying in KML.
- * @param {true} options.kmz If true, KML and external files will be compressed into a single KMZ file.
- *
- * @returns {Promise} A promise that resolves to a KMZ file as a Blob.
+ * @param {Boolean} [options.kmz=false] If true KML and external files will be compressed into a kmz file.
*
+ * @returns {Promise} A promise that resolved to an object containing the KML string and a dictionary of external file blobs, or a kmz file as a blob if options.kmz is true.
* @demo {@link https://sandcastle.cesium.com/index.html?src=Export%20KML.html|Cesium Sandcastle KML Export Demo}
* @example
* Cesium.exportKml({
- * entities: entityCollection,
- * options: { kmz: true }
- * })
- * .then(function(result) {
- * downloadFile(result.kmz);
- * });
- */ function exportKml(options) {
+ * entities: entityCollection
+ * })
+ * .then(function(result) {
+ * // The XML string is in result.kml
+ *
+ * var externalFiles = result.externalFiles
+ * for(var file in externalFiles) {
+ * // file is the name of the file used in the KML document as the href
+ * // externalFiles[file] is a blob with the contents of the file
+ * }
+ * });
+ *
+ */
+function exportKml(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
var entities = options.entities;
var kmz = defaultValue(options.kmz, false);
diff --git a/Source/Widgets/Viewer/Viewer.js b/Source/Widgets/Viewer/Viewer.js
index 9decdb30f3e4..c9d7b4e3c4af 100644
--- a/Source/Widgets/Viewer/Viewer.js
+++ b/Source/Widgets/Viewer/Viewer.js
@@ -1974,7 +1974,7 @@ Viewer.prototype.zoomTo = function (target, offset) {
* @param {Number} [options.duration=3.0] The duration of the flight in seconds.
* @param {Number} [options.maximumHeight] The maximum height at the peak of the flight.
* @param {HeadingPitchRange} [options.offset] The offset from the target in the local east-north-up reference frame centered at the target.
- * @returns {Promise.} A Promise that resolves to true if the flight was successful or false if the target is not currently visualized in the scene or the flight was cancelled. //TODO: Cleanup entity mentions
+ * @returns {Promise.} A Promise that resolves to true if the flight was successful or false if the target is not currently visualized in the scene or the flight was cancelled. //TODO: Cleanup entity mentions
*/
Viewer.prototype.flyTo = function (target, options) {
return zoomToOrFly(this, target, options, true);
diff --git a/gulpfile.cjs b/gulpfile.cjs
index 691253302c9a..ab3b4e7254ae 100644
--- a/gulpfile.cjs
+++ b/gulpfile.cjs
@@ -1481,9 +1481,10 @@ function createCesiumJs() {
function createTypeScriptDefinitions() {
// Run jsdoc with tsd-jsdoc to generate an initial Cesium.d.ts file.
- child_process.execSync("npx jsdoc --configure Tools/jsdoc/ts-conf.json", {
- stdio: "inherit",
- });
+ child_process.execSync(
+ "node_modules/.bin/jsdoc --configure Tools/jsdoc/ts-conf.json",
+ { stdio: "inherit" }
+ );
var source = fs.readFileSync("Source/Cesium.d.ts").toString();
@@ -1561,11 +1562,10 @@ function createTypeScriptDefinitions() {
.replace(/String\[]/gm, "string[]")
.replace(/Boolean\[]/gm, "boolean[]")
.replace(/Object\[]/gm, "object[]")
- // This is an ugly hack but @template doesn't actually seem to work
- .replace(
- /export class Event {/gm,
- "export class Event {"
- )
+ .replace(//gm, "")
+ .replace(//gm, "")
+ .replace(//gm, "")
+ .replace(//gm, "")
.replace(
/= "WebGLConstants\.(.+)"/gm,
(match, p1) => `= WebGLConstants.${p1}`
@@ -1578,19 +1578,9 @@ function createTypeScriptDefinitions() {
/**
* Private interfaces to support PropertyBag being a dictionary-like object.
*/
-interface PropertyDictionary {
- [key: string]: Property | undefined;
-}
-class PropertyBagBase {
- readonly propertyNames: string[];
- constructor(value?: object, createPropertyCallback?: Function);
- addProperty(propertyName: string, value?: any, createPropertyCallback?: Function): void;
- hasProperty(propertyName: string): boolean;
- merge(source: Object, createPropertyCallback?: Function): void;
- removeProperty(propertyName: string): void;
+interface DictionaryLike {
+ [index: string]: any;
}
-/** This has to be in the workaround section because JSDoc doesn't support Intersection Types */
-type PropertyBagType = PropertyDictionary & Property & PropertyBagBase;
${source}
}
@@ -1616,7 +1606,7 @@ ${source}
fs.writeFileSync("Source/Cesium.d.ts", source);
// Use tsc to compile it and make sure it is valid
- child_process.execSync("npx tsc -p Tools/jsdoc/tsconfig.json", {
+ child_process.execSync("node_modules/.bin/tsc -p Tools/jsdoc/tsconfig.json", {
stdio: "inherit",
});
From dca5c5847c0526eda7df3026b4d2043c3c643271 Mon Sep 17 00:00:00 2001
From: Matthew Amato
Date: Sat, 30 May 2020 00:38:07 -0400
Subject: [PATCH 32/36] Add ConstructorOptions to the rest of the
ImageryProviders
---
Source/Scene/BingMapsImageryProvider.js | 29 +++++++-----
Source/Scene/GridImageryProvider.js | 33 ++++++++-----
Source/Scene/IonImageryProvider.js | 15 ++++--
Source/Scene/MapboxImageryProvider.js | 32 ++++++++-----
Source/Scene/MapboxStyleImageryProvider.js | 36 ++++++++------
Source/Scene/OpenStreetMapImageryProvider.js | 26 +++++-----
Source/Scene/SingleTileImageryProvider.js | 17 +++++--
.../Scene/TileCoordinatesImageryProvider.js | 23 +++++----
Source/Scene/TileMapServiceImageryProvider.js | 42 ++++++++++-------
Source/Scene/UrlTemplateImageryProvider.js | 47 +++++++++++--------
Source/Widgets/CesiumWidget/CesiumWidget.js | 4 +-
11 files changed, 184 insertions(+), 120 deletions(-)
diff --git a/Source/Scene/BingMapsImageryProvider.js b/Source/Scene/BingMapsImageryProvider.js
index 059f45d18510..2e458a5f2e3c 100644
--- a/Source/Scene/BingMapsImageryProvider.js
+++ b/Source/Scene/BingMapsImageryProvider.js
@@ -18,27 +18,34 @@ import DiscardEmptyTilePolicy from "./DiscardEmptyTileImagePolicy.js";
import ImageryProvider from "./ImageryProvider.js";
/**
- * Provides tiled imagery using the Bing Maps Imagery REST API.
+ * @typedef {Object} BingMapsImageryProvider.ConstructorOptions
*
- * @alias BingMapsImageryProvider
- * @constructor
+ * Initialization options for the BingMapsImageryProvider constructor
*
- * @param {Object} options Object with the following properties:
- * @param {Resource|String} options.url The url of the Bing Maps server hosting the imagery.
- * @param {String} [options.key] The Bing Maps key for your application, which can be
+ * @property {Resource|String} url The url of the Bing Maps server hosting the imagery.
+ * @property {String} [key] The Bing Maps key for your application, which can be
* created at {@link https://www.bingmapsportal.com/}.
* If this parameter is not provided, {@link BingMapsApi.defaultKey} is used, which is undefined by default.
- * @param {String} [options.tileProtocol] The protocol to use when loading tiles, e.g. 'http' or 'https'.
+ * @property {String} [tileProtocol] The protocol to use when loading tiles, e.g. 'http' or 'https'.
* By default, tiles are loaded using the same protocol as the page.
- * @param {BingMapsStyle} [options.mapStyle=BingMapsStyle.AERIAL] The type of Bing Maps imagery to load.
- * @param {String} [options.culture=''] The culture to use when requesting Bing Maps imagery. Not
+ * @property {BingMapsStyle} [mapStyle=BingMapsStyle.AERIAL] The type of Bing Maps imagery to load.
+ * @property {String} [culture=''] The culture to use when requesting Bing Maps imagery. Not
* all cultures are supported. See {@link http://msdn.microsoft.com/en-us/library/hh441729.aspx}
* for information on the supported cultures.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
- * @param {TileDiscardPolicy} [options.tileDiscardPolicy] The policy that determines if a tile
+ * @property {Ellipsoid} [ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
+ * @property {TileDiscardPolicy} [tileDiscardPolicy] The policy that determines if a tile
* is invalid and should be discarded. By default, a {@link DiscardEmptyTileImagePolicy}
* will be used, with the expectation that the Bing Maps server will send a zero-length response for missing tiles.
* To ensure that no tiles are discarded, construct and pass a {@link NeverTileDiscardPolicy} for this parameter.
+ */
+
+/**
+ * Provides tiled imagery using the Bing Maps Imagery REST API.
+ *
+ * @alias BingMapsImageryProvider
+ * @constructor
+ *
+ * @param {BingMapsImageryProvider.ConstructorOptions} options Object describing initialization options
*
* @see ArcGisMapServerImageryProvider
* @see GoogleEarthEnterpriseMapsProvider
diff --git a/Source/Scene/GridImageryProvider.js b/Source/Scene/GridImageryProvider.js
index bd6210a13d88..875bc143f678 100644
--- a/Source/Scene/GridImageryProvider.js
+++ b/Source/Scene/GridImageryProvider.js
@@ -9,26 +9,33 @@ var defaultColor = new Color(1.0, 1.0, 1.0, 0.4);
var defaultGlowColor = new Color(0.0, 1.0, 0.0, 0.05);
var defaultBackgroundColor = new Color(0.0, 0.5, 0.0, 0.2);
+/**
+ * @typedef {Object} GridImageryProvider.ConstructorOptions
+ *
+ * Initialization options for the GridImageryProvider constructor
+ *
+ * @param {TilingScheme} [tilingScheme=new GeographicTilingScheme()] The tiling scheme for which to draw tiles.
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid. If the tilingScheme is specified,
+ * this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither
+ * parameter is specified, the WGS84 ellipsoid is used.
+ * @param {Number} [cells=8] The number of grids cells.
+ * @param {Color} [color=Color(1.0, 1.0, 1.0, 0.4)] The color to draw grid lines.
+ * @param {Color} [glowColor=Color(0.0, 1.0, 0.0, 0.05)] The color to draw glow for grid lines.
+ * @param {Number} [glowWidth=6] The width of lines used for rendering the line glow effect.
+ * @param {Color} [backgroundColor=Color(0.0, 0.5, 0.0, 0.2)] Background fill color.
+ * @param {Number} [tileWidth=256] The width of the tile for level-of-detail selection purposes.
+ * @param {Number} [tileHeight=256] The height of the tile for level-of-detail selection purposes.
+ * @param {Number} [canvasSize=256] The size of the canvas used for rendering.
+ */
+
/**
* An {@link ImageryProvider} that draws a wireframe grid on every tile with controllable background and glow.
* May be useful for custom rendering effects or debugging terrain.
*
* @alias GridImageryProvider
* @constructor
+ * @param {GridImageryProvider.ConstructorOptions} options Object describing initialization options
*
- * @param {Object} [options] Object with the following properties:
- * @param {TilingScheme} [options.tilingScheme=new GeographicTilingScheme()] The tiling scheme for which to draw tiles.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid. If the tilingScheme is specified,
- * this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither
- * parameter is specified, the WGS84 ellipsoid is used.
- * @param {Number} [options.cells=8] The number of grids cells.
- * @param {Color} [options.color=Color(1.0, 1.0, 1.0, 0.4)] The color to draw grid lines.
- * @param {Color} [options.glowColor=Color(0.0, 1.0, 0.0, 0.05)] The color to draw glow for grid lines.
- * @param {Number} [options.glowWidth=6] The width of lines used for rendering the line glow effect.
- * @param {Color} [options.backgroundColor=Color(0.0, 0.5, 0.0, 0.2)] Background fill color.
- * @param {Number} [options.tileWidth=256] The width of the tile for level-of-detail selection purposes.
- * @param {Number} [options.tileHeight=256] The height of the tile for level-of-detail selection purposes.
- * @param {Number} [options.canvasSize=256] The size of the canvas used for rendering.
*/
function GridImageryProvider(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
diff --git a/Source/Scene/IonImageryProvider.js b/Source/Scene/IonImageryProvider.js
index 45da7ec8cab7..bea2963e3e50 100644
--- a/Source/Scene/IonImageryProvider.js
+++ b/Source/Scene/IonImageryProvider.js
@@ -36,16 +36,23 @@ var ImageryProviderMapping = {
WMTS: createFactory(WebMapTileServiceImageryProvider),
};
+/**
+ * @typedef {Object} IonImageryProvider.ConstructorOptions
+ *
+ * Initialization options for the TileMapServiceImageryProvider constructor
+ *
+ * @property {Number} assetId An ion imagery asset ID
+ * @property {String} [accessToken=Ion.defaultAccessToken] The access token to use.
+ * @property {String|Resource} [server=Ion.defaultServer] The resource to the Cesium ion API server.
+ */
+
/**
* Provides tiled imagery using the Cesium ion REST API.
*
* @alias IonImageryProvider
* @constructor
*
- * @param {Object} options Object with the following properties:
- * @param {Number} options.assetId An ion imagery asset ID;
- * @param {String} [options.accessToken=Ion.defaultAccessToken] The access token to use.
- * @param {String|Resource} [options.server=Ion.defaultServer] The resource to the Cesium ion API server.
+ * @param {IonImageryProvider.ConstructorOptions} options Object describing initialization options
*
* @example
* viewer.imageryLayers.addImageryProvider(new Cesium.IonImageryProvider({ assetId : 23489024 }));
diff --git a/Source/Scene/MapboxImageryProvider.js b/Source/Scene/MapboxImageryProvider.js
index d090fa4919d1..0ffa60334167 100644
--- a/Source/Scene/MapboxImageryProvider.js
+++ b/Source/Scene/MapboxImageryProvider.js
@@ -12,24 +12,30 @@ var defaultCredit = new Credit(
);
/**
- * Provides tiled imagery hosted by Mapbox.
+ * @typedef {Object} MapboxImageryProvider.ConstructorOptions
*
- * @alias MapboxImageryProvider
- * @constructor
+ * Initialization options for the MapboxImageryProvider constructor
*
- * @param {Object} [options] Object with the following properties:
- * @param {String} [options.url='https://api.mapbox.com/v4/'] The Mapbox server url.
- * @param {String} options.mapId The Mapbox Map ID.
- * @param {String} [options.accessToken] The public access token for the imagery.
- * @param {String} [options.format='png'] The format of the image request.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
- * @param {Number} [options.minimumLevel=0] The minimum level-of-detail supported by the imagery provider. Take care when specifying
+ * @property {String} [url='https://api.mapbox.com/v4/'] The Mapbox server url.
+ * @property {String} mapId The Mapbox Map ID.
+ * @property {String} [accessToken] The public access token for the imagery.
+ * @property {String} [format='png'] The format of the image request.
+ * @property {Ellipsoid} [ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
+ * @property {Number} [minimumLevel=0] The minimum level-of-detail supported by the imagery provider. Take care when specifying
* this that the number of tiles at the minimum level is small, such as four or less. A larger number is likely
* to result in rendering problems.
- * @param {Number} [options.maximumLevel] The maximum level-of-detail supported by the imagery provider, or undefined if there is no limit.
- * @param {Rectangle} [options.rectangle=Rectangle.MAX_VALUE] The rectangle, in radians, covered by the image.
- * @param {Credit|String} [options.credit] A credit for the data source, which is displayed on the canvas.
+ * @property {Number} [maximumLevel] The maximum level-of-detail supported by the imagery provider, or undefined if there is no limit.
+ * @property {Rectangle} [rectangle=Rectangle.MAX_VALUE] The rectangle, in radians, covered by the image.
+ * @property {Credit|String} [credit] A credit for the data source, which is displayed on the canvas.
+ */
+
+/**
+ * Provides tiled imagery hosted by Mapbox.
+ *
+ * @alias MapboxImageryProvider
+ * @constructor
*
+ * @param {MapboxImageryProvider.ConstructorOptions} options Object describing initialization options
*
* @example
* // Mapbox tile provider
diff --git a/Source/Scene/MapboxStyleImageryProvider.js b/Source/Scene/MapboxStyleImageryProvider.js
index 6881d92e8b74..c1a063fe7c19 100644
--- a/Source/Scene/MapboxStyleImageryProvider.js
+++ b/Source/Scene/MapboxStyleImageryProvider.js
@@ -12,26 +12,32 @@ var defaultCredit = new Credit(
);
/**
- * Provides tiled imagery hosted by Mapbox.
+ * @typedef {Object} MapboxStyleImageryProvider.ConstructorOptions
*
- * @alias MapboxStyleImageryProvider
- * @constructor
+ * Initialization options for the MapboxStyleImageryProvider constructor
*
- * @param {Object} [options] Object with the following properties:
- * @param {Resource|String} [options.url='https://api.mapbox.com/styles/v1/'] The Mapbox server url.
- * @param {String} [options.username='mapbox'] The username of the map account.
- * @param {String} options.styleId The Mapbox Style ID.
- * @param {String} [options.accessToken] The public access token for the imagery.
- * @param {Number} [options.tilesize=512] The size of the image tiles.
- * @param {Boolean} [options.scaleFactor] Determines if tiles are rendered at a @2x scale factor.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
- * @param {Number} [options.minimumLevel=0] The minimum level-of-detail supported by the imagery provider. Take care when specifying
+ * @property {Resource|String} [url='https://api.mapbox.com/styles/v1/'] The Mapbox server url.
+ * @property {String} [username='mapbox'] The username of the map account.
+ * @property {String} styleId The Mapbox Style ID.
+ * @property {String} [accessToken] The public access token for the imagery.
+ * @property {Number} [tilesize=512] The size of the image tiles.
+ * @property {Boolean} [scaleFactor] Determines if tiles are rendered at a @2x scale factor.
+ * @property {Ellipsoid} [ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
+ * @property {Number} [minimumLevel=0] The minimum level-of-detail supported by the imagery provider. Take care when specifying
* this that the number of tiles at the minimum level is small, such as four or less. A larger number is likely
* to result in rendering problems.
- * @param {Number} [options.maximumLevel] The maximum level-of-detail supported by the imagery provider, or undefined if there is no limit.
- * @param {Rectangle} [options.rectangle=Rectangle.MAX_VALUE] The rectangle, in radians, covered by the image.
- * @param {Credit|String} [options.credit] A credit for the data source, which is displayed on the canvas.
+ * @property {Number} [maximumLevel] The maximum level-of-detail supported by the imagery provider, or undefined if there is no limit.
+ * @property {Rectangle} [rectangle=Rectangle.MAX_VALUE] The rectangle, in radians, covered by the image.
+ * @property {Credit|String} [credit] A credit for the data source, which is displayed on the canvas.
+ */
+
+/**
+ * Provides tiled imagery hosted by Mapbox.
+ *
+ * @alias MapboxStyleImageryProvider
+ * @constructor
*
+ * @param {MapboxStyleImageryProvider.ConstructorOptions} options Object describing initialization options
*
* @example
* // Mapbox style provider
diff --git a/Source/Scene/OpenStreetMapImageryProvider.js b/Source/Scene/OpenStreetMapImageryProvider.js
index 27e2dca57804..f5ca4bbdbf5a 100644
--- a/Source/Scene/OpenStreetMapImageryProvider.js
+++ b/Source/Scene/OpenStreetMapImageryProvider.js
@@ -11,6 +11,20 @@ var defaultCredit = new Credit(
"MapQuest, Open Street Map and contributors, CC-BY-SA"
);
+/**
+ * @typedef {Object} OpenStreetMapImageryProvider.ConstructorOptions
+ *
+ * Initialization options for the OpenStreetMapImageryProvider constructor
+ *
+ * @property {String} [url='https://a.tile.openstreetmap.org'] The OpenStreetMap server url.
+ * @property {String} [fileExtension='png'] The file extension for images on the server.
+ * @property {Rectangle} [rectangle=Rectangle.MAX_VALUE] The rectangle of the layer.
+ * @property {Number} [minimumLevel=0] The minimum level-of-detail supported by the imagery provider.
+ * @property {Number} [maximumLevel] The maximum level-of-detail supported by the imagery provider, or undefined if there is no limit.
+ * @property {Ellipsoid} [ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
+ * @property {Credit|String} [credit='MapQuest, Open Street Map and contributors, CC-BY-SA'] A credit for the data source, which is displayed on the canvas.
+ */
+
/**
* An imagery provider that provides tiled imagery hosted by OpenStreetMap
* or another provider of Slippy tiles. The default url connects to OpenStreetMap's volunteer-run
@@ -21,16 +35,7 @@ var defaultCredit = new Credit(
* @constructor
* @extends UrlTemplateImageryProvider
*
- * @param {Object} [options] Object with the following properties:
- * @param {String} [options.url='https://a.tile.openstreetmap.org'] The OpenStreetMap server url.
- * @param {String} [options.fileExtension='png'] The file extension for images on the server.
- * @param {Rectangle} [options.rectangle=Rectangle.MAX_VALUE] The rectangle of the layer.
- * @param {Number} [options.minimumLevel=0] The minimum level-of-detail supported by the imagery provider.
- * @param {Number} [options.maximumLevel] The maximum level-of-detail supported by the imagery provider, or undefined if there is no limit.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
- * @param {Credit|String} [options.credit='MapQuest, Open Street Map and contributors, CC-BY-SA'] A credit for the data source, which is displayed on the canvas.
- * @returns {UrlTemplateImageryProvider} The imagery provider.
- *
+ * @param {OpenStreetMapImageryProvider.ConstructorOptions} options Object describing initialization options
* @exception {DeveloperError} The rectangle and minimumLevel indicate that there are more than four tiles at the minimum level. Imagery providers with more than four tiles at the minimum level are not supported.
*
* @see ArcGisMapServerImageryProvider
@@ -42,7 +47,6 @@ var defaultCredit = new Credit(
* @see WebMapTileServiceImageryProvider
* @see UrlTemplateImageryProvider
*
- *
* @example
* var osm = new Cesium.OpenStreetMapImageryProvider({
* url : 'https://a.tile.openstreetmap.org/'
diff --git a/Source/Scene/SingleTileImageryProvider.js b/Source/Scene/SingleTileImageryProvider.js
index 1eb7cd9a3bff..070344f0452e 100644
--- a/Source/Scene/SingleTileImageryProvider.js
+++ b/Source/Scene/SingleTileImageryProvider.js
@@ -11,6 +11,17 @@ import TileProviderError from "../Core/TileProviderError.js";
import when from "../ThirdParty/when.js";
import ImageryProvider from "./ImageryProvider.js";
+/**
+ * @typedef {Object} SingleTileImageryProvider.ConstructorOptions
+ *
+ * Initialization options for the SingleTileImageryProvider constructor
+ *
+ * @property {Resource|String} url The url for the tile.
+ * @property {Rectangle} [rectangle=Rectangle.MAX_VALUE] The rectangle, in radians, covered by the image.
+ * @property {Credit|String} [credit] A credit for the data source, which is displayed on the canvas.
+ * @property {Ellipsoid} [ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
+ */
+
/**
* Provides a single, top-level imagery tile. The single image is assumed to use a
* {@link GeographicTilingScheme}.
@@ -18,11 +29,7 @@ import ImageryProvider from "./ImageryProvider.js";
* @alias SingleTileImageryProvider
* @constructor
*
- * @param {Object} options Object with the following properties:
- * @param {Resource|String} options.url The url for the tile.
- * @param {Rectangle} [options.rectangle=Rectangle.MAX_VALUE] The rectangle, in radians, covered by the image.
- * @param {Credit|String} [options.credit] A credit for the data source, which is displayed on the canvas.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid. If not specified, the WGS84 ellipsoid is used.
+ * @param {SingleTileImageryProvider.ConstructorOptions} options Object describing initialization options
*
* @see ArcGisMapServerImageryProvider
* @see BingMapsImageryProvider
diff --git a/Source/Scene/TileCoordinatesImageryProvider.js b/Source/Scene/TileCoordinatesImageryProvider.js
index 796d1bcb3872..01e3ce7c231f 100644
--- a/Source/Scene/TileCoordinatesImageryProvider.js
+++ b/Source/Scene/TileCoordinatesImageryProvider.js
@@ -5,6 +5,20 @@ import Event from "../Core/Event.js";
import GeographicTilingScheme from "../Core/GeographicTilingScheme.js";
import when from "../ThirdParty/when.js";
+/**
+ * @typedef {Object} TileCoordinatesImageryProvider.ConstructorOptions
+ *
+ * Initialization options for the TileCoordinatesImageryProvider constructor
+ *
+ * @param {TilingScheme} [tilingScheme=new GeographicTilingScheme()] The tiling scheme for which to draw tiles.
+ * @param {Ellipsoid} [ellipsoid] The ellipsoid. If the tilingScheme is specified,
+ * this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither
+ * parameter is specified, the WGS84 ellipsoid is used.
+ * @param {Color} [color=Color.YELLOW] The color to draw the tile box and label.
+ * @param {Number} [tileWidth=256] The width of the tile for level-of-detail selection purposes.
+ * @param {Number} [tileHeight=256] The height of the tile for level-of-detail selection purposes.
+ */
+
/**
* An {@link ImageryProvider} that draws a box around every rendered tile in the tiling scheme, and draws
* a label inside it indicating the X, Y, Level coordinates of the tile. This is mostly useful for
@@ -13,14 +27,7 @@ import when from "../ThirdParty/when.js";
* @alias TileCoordinatesImageryProvider
* @constructor
*
- * @param {Object} [options] Object with the following properties:
- * @param {TilingScheme} [options.tilingScheme=new GeographicTilingScheme()] The tiling scheme for which to draw tiles.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid. If the tilingScheme is specified,
- * this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither
- * parameter is specified, the WGS84 ellipsoid is used.
- * @param {Color} [options.color=Color.YELLOW] The color to draw the tile box and label.
- * @param {Number} [options.tileWidth=256] The width of the tile for level-of-detail selection purposes.
- * @param {Number} [options.tileHeight=256] The height of the tile for level-of-detail selection purposes.
+ * @param {TileCoordinatesImageryProvider.ConstructorOptions} options Object describing initialization options
*/
function TileCoordinatesImageryProvider(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
diff --git a/Source/Scene/TileMapServiceImageryProvider.js b/Source/Scene/TileMapServiceImageryProvider.js
index 9e2aaa9ce9ff..2f27b2c8d964 100644
--- a/Source/Scene/TileMapServiceImageryProvider.js
+++ b/Source/Scene/TileMapServiceImageryProvider.js
@@ -14,33 +14,39 @@ import when from "../ThirdParty/when.js";
import UrlTemplateImageryProvider from "./UrlTemplateImageryProvider.js";
/**
- * An imagery provider that provides tiled imagery as generated by
- * {@link http://www.maptiler.org/|MapTiler}, {@link http://www.klokan.cz/projects/gdal2tiles/|GDAL2Tiles}, etc.
+ * @typedef {Object} TileMapServiceImageryProvider.ConstructorOptions
*
- * @alias TileMapServiceImageryProvider
- * @constructor
- * @extends UrlTemplateImageryProvider
+ * Initialization options for the TileMapServiceImageryProvider constructor
*
- * @param {Object} [options] Object with the following properties:
- * @param {Resource|String|Promise|Promise} [options.url='.'] Path to image tiles on server.
- * @param {String} [options.fileExtension='png'] The file extension for images on the server.
- * @param {Credit|String} [options.credit=''] A credit for the data source, which is displayed on the canvas.
- * @param {Number} [options.minimumLevel=0] The minimum level-of-detail supported by the imagery provider. Take care when specifying
+ * @property {Resource|String|Promise|Promise} [url='.'] Path to image tiles on server.
+ * @property {String} [fileExtension='png'] The file extension for images on the server.
+ * @property {Credit|String} [credit=''] A credit for the data source, which is displayed on the canvas.
+ * @property {Number} [minimumLevel=0] The minimum level-of-detail supported by the imagery provider. Take care when specifying
* this that the number of tiles at the minimum level is small, such as four or less. A larger number is likely
* to result in rendering problems.
- * @param {Number} [options.maximumLevel] The maximum level-of-detail supported by the imagery provider, or undefined if there is no limit.
- * @param {Rectangle} [options.rectangle=Rectangle.MAX_VALUE] The rectangle, in radians, covered by the image.
- * @param {TilingScheme} [options.tilingScheme] The tiling scheme specifying how the ellipsoidal
+ * @property {Number} [maximumLevel] The maximum level-of-detail supported by the imagery provider, or undefined if there is no limit.
+ * @property {Rectangle} [rectangle=Rectangle.MAX_VALUE] The rectangle, in radians, covered by the image.
+ * @property {TilingScheme} [tilingScheme] The tiling scheme specifying how the ellipsoidal
* surface is broken into tiles. If this parameter is not provided, a {@link WebMercatorTilingScheme}
* is used.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid. If the tilingScheme is specified,
+ * @property {Ellipsoid} [ellipsoid] The ellipsoid. If the tilingScheme is specified,
* this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither
* parameter is specified, the WGS84 ellipsoid is used.
- * @param {Number} [options.tileWidth=256] Pixel width of image tiles.
- * @param {Number} [options.tileHeight=256] Pixel height of image tiles.
- * @param {Boolean} [options.flipXY] Older versions of gdal2tiles.py flipped X and Y values in tilemapresource.xml.
+ * @property {Number} [tileWidth=256] Pixel width of image tiles.
+ * @property {Number} [tileHeight=256] Pixel height of image tiles.
+ * @property {Boolean} [flipXY] Older versions of gdal2tiles.py flipped X and Y values in tilemapresource.xml.
* Specifying this option will do the same, allowing for loading of these incorrect tilesets.
- * @returns {UrlTemplateImageryProvider} The imagery provider.
+ */
+
+/**
+ * An imagery provider that provides tiled imagery as generated by
+ * {@link http://www.maptiler.org/|MapTiler}, {@link http://www.klokan.cz/projects/gdal2tiles/|GDAL2Tiles}, etc.
+ *
+ * @alias TileMapServiceImageryProvider
+ * @constructor
+ * @extends UrlTemplateImageryProvider
+ *
+ * @param {TileMapServiceImageryProvider.ConstructorOptions} options Object describing initialization options
*
* @see ArcGisMapServerImageryProvider
* @see BingMapsImageryProvider
diff --git a/Source/Scene/UrlTemplateImageryProvider.js b/Source/Scene/UrlTemplateImageryProvider.js
index ae164767d243..b37e9799064e 100644
--- a/Source/Scene/UrlTemplateImageryProvider.js
+++ b/Source/Scene/UrlTemplateImageryProvider.js
@@ -50,13 +50,12 @@ var pickFeaturesTags = combine(tags, {
});
/**
- * Provides imagery by requesting tiles using a specified URL template.
+ * @typedef {Object} UrlTemplateImageryProvider.ConstructorOptions
*
- * @alias UrlTemplateImageryProvider
- * @constructor
+ * Initialization options for the UrlTemplateImageryProvider constructor
*
- * @param {Promise.|Object} [options] Object with the following properties:
- * @param {Resource|String} options.url The URL template to use to request tiles. It has the following keywords:
+ * @property {Promise.|Object} [options] Object with the following properties:
+ * @property {Resource|String} options.url The URL template to use to request tiles. It has the following keywords:
*
* {z}
: The level of the tile in the tiling scheme. Level zero is the root of the quadtree pyramid.
* {x}
: The tile X coordinate in the tiling scheme, where 0 is the Westernmost tile.
@@ -76,7 +75,7 @@ var pickFeaturesTags = combine(tags, {
* {width}
: The width of each tile in pixels.
* {height}
: The height of each tile in pixels.
*
- * @param {Resource|String} [options.pickFeaturesUrl] The URL template to use to pick features. If this property is not specified,
+ * @property {Resource|String} [options.pickFeaturesUrl] The URL template to use to pick features. If this property is not specified,
* {@link UrlTemplateImageryProvider#pickFeatures} will immediately returned undefined, indicating no
* features picked. The URL template supports all of the keywords supported by the url
* parameter, plus the following:
@@ -91,7 +90,7 @@ var pickFeaturesTags = combine(tags, {
* {latitudeProjected}
: The latitude of the picked position in the projected coordinates of the tiling scheme.
* {format}
: The format in which to get feature information, as specified in the {@link GetFeatureInfoFormat}.
*
- * @param {Object} [options.urlSchemeZeroPadding] Gets the URL scheme zero padding for each tile coordinate. The format is '000' where
+ * @property {Object} [options.urlSchemeZeroPadding] Gets the URL scheme zero padding for each tile coordinate. The format is '000' where
* each coordinate will be padded on the left with zeros to match the width of the passed string of zeros. e.g. Setting:
* urlSchemeZeroPadding : { '{x}' : '0000'}
* will cause an 'x' value of 12 to return the string '0012' for {x} in the generated URL.
@@ -104,40 +103,48 @@ var pickFeaturesTags = combine(tags, {
* {reverseY}
: The zero padding for the tile reverseY coordinate in the tiling scheme.
* {reverseZ}
: The zero padding for the reverseZ coordinate of the tile in the tiling scheme.
*
- * @param {String|String[]} [options.subdomains='abc'] The subdomains to use for the {s}
placeholder in the URL template.
+ * @property {String|String[]} [options.subdomains='abc'] The subdomains to use for the {s}
placeholder in the URL template.
* If this parameter is a single string, each character in the string is a subdomain. If it is
* an array, each element in the array is a subdomain.
- * @param {Credit|String} [options.credit=''] A credit for the data source, which is displayed on the canvas.
- * @param {Number} [options.minimumLevel=0] The minimum level-of-detail supported by the imagery provider. Take care when specifying
+ * @property {Credit|String} [options.credit=''] A credit for the data source, which is displayed on the canvas.
+ * @property {Number} [options.minimumLevel=0] The minimum level-of-detail supported by the imagery provider. Take care when specifying
* this that the number of tiles at the minimum level is small, such as four or less. A larger number is likely
* to result in rendering problems.
- * @param {Number} [options.maximumLevel] The maximum level-of-detail supported by the imagery provider, or undefined if there is no limit.
- * @param {Rectangle} [options.rectangle=Rectangle.MAX_VALUE] The rectangle, in radians, covered by the image.
- * @param {TilingScheme} [options.tilingScheme=WebMercatorTilingScheme] The tiling scheme specifying how the ellipsoidal
+ * @property {Number} [options.maximumLevel] The maximum level-of-detail supported by the imagery provider, or undefined if there is no limit.
+ * @property {Rectangle} [options.rectangle=Rectangle.MAX_VALUE] The rectangle, in radians, covered by the image.
+ * @property {TilingScheme} [options.tilingScheme=WebMercatorTilingScheme] The tiling scheme specifying how the ellipsoidal
* surface is broken into tiles. If this parameter is not provided, a {@link WebMercatorTilingScheme}
* is used.
- * @param {Ellipsoid} [options.ellipsoid] The ellipsoid. If the tilingScheme is specified,
+ * @property {Ellipsoid} [options.ellipsoid] The ellipsoid. If the tilingScheme is specified,
* this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither
* parameter is specified, the WGS84 ellipsoid is used.
- * @param {Number} [options.tileWidth=256] Pixel width of image tiles.
- * @param {Number} [options.tileHeight=256] Pixel height of image tiles.
- * @param {Boolean} [options.hasAlphaChannel=true] true if the images provided by this imagery provider
+ * @property {Number} [options.tileWidth=256] Pixel width of image tiles.
+ * @property {Number} [options.tileHeight=256] Pixel height of image tiles.
+ * @property {Boolean} [options.hasAlphaChannel=true] true if the images provided by this imagery provider
* include an alpha channel; otherwise, false. If this property is false, an alpha channel, if
* present, will be ignored. If this property is true, any images without an alpha channel will
* be treated as if their alpha is 1.0 everywhere. When this property is false, memory usage
* and texture upload time are potentially reduced.
- * @param {GetFeatureInfoFormat[]} [options.getFeatureInfoFormats] The formats in which to get feature information at a
+ * @property {GetFeatureInfoFormat[]} [options.getFeatureInfoFormats] The formats in which to get feature information at a
* specific location when {@link UrlTemplateImageryProvider#pickFeatures} is invoked. If this
* parameter is not specified, feature picking is disabled.
- * @param {Boolean} [options.enablePickFeatures=true] If true, {@link UrlTemplateImageryProvider#pickFeatures} will
+ * @property {Boolean} [options.enablePickFeatures=true] If true, {@link UrlTemplateImageryProvider#pickFeatures} will
* request the options.pickFeaturesUrl
and attempt to interpret the features included in the response. If false,
* {@link UrlTemplateImageryProvider#pickFeatures} will immediately return undefined (indicating no pickable
* features) without communicating with the server. Set this property to false if you know your data
* source does not support picking features or if you don't want this provider's features to be pickable. Note
* that this can be dynamically overridden by modifying the {@link UriTemplateImageryProvider#enablePickFeatures}
* property.
- * @param {Object} [options.customTags] Allow to replace custom keywords in the URL template. The object must have strings as keys and functions as values.
+ * @property {Object} [options.customTags] Allow to replace custom keywords in the URL template. The object must have strings as keys and functions as values.
+ */
+
+/**
+ * Provides imagery by requesting tiles using a specified URL template.
+ *
+ * @alias UrlTemplateImageryProvider
+ * @constructor
*
+ * @param {UrlTemplateImageryProvider.ConstructorOptions} options Object describing initialization options
*
* @example
* // Access Natural Earth II imagery, which uses a TMS tiling scheme and Geographic (EPSG:4326) project
diff --git a/Source/Widgets/CesiumWidget/CesiumWidget.js b/Source/Widgets/CesiumWidget/CesiumWidget.js
index fdc1c2559d1b..338f80440b2b 100644
--- a/Source/Widgets/CesiumWidget/CesiumWidget.js
+++ b/Source/Widgets/CesiumWidget/CesiumWidget.js
@@ -126,7 +126,7 @@ function configureCameraFrustum(widget) {
* @param {Element|String} container The DOM element or ID that will contain the widget.
* @param {Object} [options] Object with the following properties:
* @param {Clock} [options.clock=new Clock()] The clock to use to control current time.
- * @param {ImageryProvider} [options.imageryProvider=createWorldImagery()] The imagery provider to serve as the base layer. If set to false
, no imagery provider will be added.
+ * @param {ImageryProvider | false} [options.imageryProvider=createWorldImagery()] The imagery provider to serve as the base layer. If set to false
, no imagery provider will be added.
* @param {TerrainProvider} [options.terrainProvider=new EllipsoidTerrainProvider] The terrain provider.
* @param {SkyBox| false} [options.skyBox] The skybox used to render the stars. When undefined
, the default stars are used. If set to false
, no skyBox, Sun, or Moon will be added.
* @param {SkyAtmosphere | false} [options.skyAtmosphere] Blue sky, and the glow around the Earth's limb. Set to false
to turn it off.
@@ -134,7 +134,7 @@ function configureCameraFrustum(widget) {
* @param {Boolean} [options.scene3DOnly=false] When true
, each geometry instance will only be rendered in 3D to save GPU memory.
* @param {Boolean} [options.orderIndependentTranslucency=true] If true and the configuration supports it, use order independent translucency.
* @param {MapProjection} [options.mapProjection=new GeographicProjection()] The map projection to use in 2D and Columbus View modes.
- * @param {Globe} [options.globe=new Globe(mapProjection.ellipsoid)] The globe to use in the scene. If set to false
, no globe will be added.
+ * @param {Globe | false} [options.globe=new Globe(mapProjection.ellipsoid)] The globe to use in the scene. If set to false
, no globe will be added.
* @param {Boolean} [options.useDefaultRenderLoop=true] True if this widget should control the render loop, false otherwise.
* @param {Boolean} [options.useBrowserRecommendedResolution=true] If true, render at the browser's recommended resolution and ignore window.devicePixelRatio
.
* @param {Number} [options.targetFrameRate] The target frame rate when using the default render loop.
From e7af041eee4711ca56767fc6c3cf63b75298beb7 Mon Sep 17 00:00:00 2001
From: Matthew Amato
Date: Sat, 30 May 2020 01:45:28 -0400
Subject: [PATCH 33/36] Workaround CesiumMath -> Math documentation issue
---
Source/Core/Math.js | 2 +-
gulpfile.cjs | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/Source/Core/Math.js b/Source/Core/Math.js
index 7e94e525ccc3..cf8bc84ef8c7 100644
--- a/Source/Core/Math.js
+++ b/Source/Core/Math.js
@@ -7,7 +7,7 @@ import DeveloperError from "./DeveloperError.js";
/**
* Math functions.
*
- * @namespace CesiumMath
+ * @exports CesiumMath
* @alias Math
*/
var CesiumMath = {};
diff --git a/gulpfile.cjs b/gulpfile.cjs
index ab3b4e7254ae..0f57cf468bab 100644
--- a/gulpfile.cjs
+++ b/gulpfile.cjs
@@ -1557,6 +1557,7 @@ function createTypeScriptDefinitions() {
// Fix up the WebGLConstants aliasing we mentioned above by simply unquoting the strings.
source = source
.replace(/^declare /gm, "export ")
+ .replace(/module "Math"/gm, "namespace Math")
.replace(/CesiumMath/gm, "Math")
.replace(/Number\[]/gm, "number[]") // Workaround https://github.com/englercj/tsd-jsdoc/issues/117
.replace(/String\[]/gm, "string[]")
From d95eea02bef452016fe78de883e5c2019a583dee Mon Sep 17 00:00:00 2001
From: Matthew Amato
Date: Sat, 30 May 2020 02:01:38 -0400
Subject: [PATCH 34/36] Fix doc links that include a hash.
---
Tools/jsdoc/cesium_template/static/javascript/cesiumDoc.js | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Tools/jsdoc/cesium_template/static/javascript/cesiumDoc.js b/Tools/jsdoc/cesium_template/static/javascript/cesiumDoc.js
index b6ba444a5a9c..ecff98ccacbf 100644
--- a/Tools/jsdoc/cesium_template/static/javascript/cesiumDoc.js
+++ b/Tools/jsdoc/cesium_template/static/javascript/cesiumDoc.js
@@ -47,8 +47,11 @@
for (var i = 0; i < links.length; i++) {
var link = links[i];
var prefix = link.href.split("?")[0];
+ var parts = prefix.split("#");
link.href =
- prefix + (searchTerm === "" ? "" : "?classFilter=" + searchTerm);
+ parts[0] +
+ (searchTerm === "" ? "" : "?classFilter=" + searchTerm) +
+ (parts[1] ? "#" + parts[1] : "");
}
}
From 31571eb22ef4caa98c839f3199a268c432f33bef Mon Sep 17 00:00:00 2001
From: Matthew Amato
Date: Sun, 31 May 2020 15:43:24 -0400
Subject: [PATCH 35/36] Fix UrlTemplateImageryProvider
Also opt-in tsd-jsdoc so we can use @template in the future.
---
Source/Scene/UrlTemplateImageryProvider.js | 34 +++++++++++-----------
Tools/jsdoc/ts-conf.json | 3 +-
2 files changed, 19 insertions(+), 18 deletions(-)
diff --git a/Source/Scene/UrlTemplateImageryProvider.js b/Source/Scene/UrlTemplateImageryProvider.js
index b37e9799064e..11ad3d14f5f6 100644
--- a/Source/Scene/UrlTemplateImageryProvider.js
+++ b/Source/Scene/UrlTemplateImageryProvider.js
@@ -55,7 +55,7 @@ var pickFeaturesTags = combine(tags, {
* Initialization options for the UrlTemplateImageryProvider constructor
*
* @property {Promise.|Object} [options] Object with the following properties:
- * @property {Resource|String} options.url The URL template to use to request tiles. It has the following keywords:
+ * @property {Resource|String} url The URL template to use to request tiles. It has the following keywords:
*
* {z}
: The level of the tile in the tiling scheme. Level zero is the root of the quadtree pyramid.
* {x}
: The tile X coordinate in the tiling scheme, where 0 is the Westernmost tile.
@@ -75,7 +75,7 @@ var pickFeaturesTags = combine(tags, {
* {width}
: The width of each tile in pixels.
* {height}
: The height of each tile in pixels.
*
- * @property {Resource|String} [options.pickFeaturesUrl] The URL template to use to pick features. If this property is not specified,
+ * @property {Resource|String} [pickFeaturesUrl] The URL template to use to pick features. If this property is not specified,
* {@link UrlTemplateImageryProvider#pickFeatures} will immediately returned undefined, indicating no
* features picked. The URL template supports all of the keywords supported by the url
* parameter, plus the following:
@@ -90,7 +90,7 @@ var pickFeaturesTags = combine(tags, {
* {latitudeProjected}
: The latitude of the picked position in the projected coordinates of the tiling scheme.
* {format}
: The format in which to get feature information, as specified in the {@link GetFeatureInfoFormat}.
*
- * @property {Object} [options.urlSchemeZeroPadding] Gets the URL scheme zero padding for each tile coordinate. The format is '000' where
+ * @property {Object} [urlSchemeZeroPadding] Gets the URL scheme zero padding for each tile coordinate. The format is '000' where
* each coordinate will be padded on the left with zeros to match the width of the passed string of zeros. e.g. Setting:
* urlSchemeZeroPadding : { '{x}' : '0000'}
* will cause an 'x' value of 12 to return the string '0012' for {x} in the generated URL.
@@ -103,39 +103,39 @@ var pickFeaturesTags = combine(tags, {
* {reverseY}
: The zero padding for the tile reverseY coordinate in the tiling scheme.
* {reverseZ}
: The zero padding for the reverseZ coordinate of the tile in the tiling scheme.
*
- * @property {String|String[]} [options.subdomains='abc'] The subdomains to use for the {s}
placeholder in the URL template.
+ * @property {String|String[]} [subdomains='abc'] The subdomains to use for the {s}
placeholder in the URL template.
* If this parameter is a single string, each character in the string is a subdomain. If it is
* an array, each element in the array is a subdomain.
- * @property {Credit|String} [options.credit=''] A credit for the data source, which is displayed on the canvas.
- * @property {Number} [options.minimumLevel=0] The minimum level-of-detail supported by the imagery provider. Take care when specifying
+ * @property {Credit|String} [credit=''] A credit for the data source, which is displayed on the canvas.
+ * @property {Number} [minimumLevel=0] The minimum level-of-detail supported by the imagery provider. Take care when specifying
* this that the number of tiles at the minimum level is small, such as four or less. A larger number is likely
* to result in rendering problems.
- * @property {Number} [options.maximumLevel] The maximum level-of-detail supported by the imagery provider, or undefined if there is no limit.
- * @property {Rectangle} [options.rectangle=Rectangle.MAX_VALUE] The rectangle, in radians, covered by the image.
- * @property {TilingScheme} [options.tilingScheme=WebMercatorTilingScheme] The tiling scheme specifying how the ellipsoidal
+ * @property {Number} [maximumLevel] The maximum level-of-detail supported by the imagery provider, or undefined if there is no limit.
+ * @property {Rectangle} [rectangle=Rectangle.MAX_VALUE] The rectangle, in radians, covered by the image.
+ * @property {TilingScheme} [tilingScheme=WebMercatorTilingScheme] The tiling scheme specifying how the ellipsoidal
* surface is broken into tiles. If this parameter is not provided, a {@link WebMercatorTilingScheme}
* is used.
- * @property {Ellipsoid} [options.ellipsoid] The ellipsoid. If the tilingScheme is specified,
+ * @property {Ellipsoid} [ellipsoid] The ellipsoid. If the tilingScheme is specified,
* this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither
* parameter is specified, the WGS84 ellipsoid is used.
- * @property {Number} [options.tileWidth=256] Pixel width of image tiles.
- * @property {Number} [options.tileHeight=256] Pixel height of image tiles.
- * @property {Boolean} [options.hasAlphaChannel=true] true if the images provided by this imagery provider
+ * @property {Number} [tileWidth=256] Pixel width of image tiles.
+ * @property {Number} [tileHeight=256] Pixel height of image tiles.
+ * @property {Boolean} [hasAlphaChannel=true] true if the images provided by this imagery provider
* include an alpha channel; otherwise, false. If this property is false, an alpha channel, if
* present, will be ignored. If this property is true, any images without an alpha channel will
* be treated as if their alpha is 1.0 everywhere. When this property is false, memory usage
* and texture upload time are potentially reduced.
- * @property {GetFeatureInfoFormat[]} [options.getFeatureInfoFormats] The formats in which to get feature information at a
+ * @property {GetFeatureInfoFormat[]} [getFeatureInfoFormats] The formats in which to get feature information at a
* specific location when {@link UrlTemplateImageryProvider#pickFeatures} is invoked. If this
* parameter is not specified, feature picking is disabled.
- * @property {Boolean} [options.enablePickFeatures=true] If true, {@link UrlTemplateImageryProvider#pickFeatures} will
- * request the options.pickFeaturesUrl
and attempt to interpret the features included in the response. If false,
+ * @property {Boolean} [enablePickFeatures=true] If true, {@link UrlTemplateImageryProvider#pickFeatures} will
+ * request the pickFeaturesUrl
and attempt to interpret the features included in the response. If false,
* {@link UrlTemplateImageryProvider#pickFeatures} will immediately return undefined (indicating no pickable
* features) without communicating with the server. Set this property to false if you know your data
* source does not support picking features or if you don't want this provider's features to be pickable. Note
* that this can be dynamically overridden by modifying the {@link UriTemplateImageryProvider#enablePickFeatures}
* property.
- * @property {Object} [options.customTags] Allow to replace custom keywords in the URL template. The object must have strings as keys and functions as values.
+ * @property {Object} [customTags] Allow to replace custom keywords in the URL template. The object must have strings as keys and functions as values.
*/
/**
diff --git a/Tools/jsdoc/ts-conf.json b/Tools/jsdoc/ts-conf.json
index e231b1adb8f6..6813e219ec52 100644
--- a/Tools/jsdoc/ts-conf.json
+++ b/Tools/jsdoc/ts-conf.json
@@ -14,7 +14,8 @@
"excludePattern": "(^|\\/|\\\\)_"
},
"plugins": [
- "./Tools/jsdoc/cesiumTags"
+ "./Tools/jsdoc/cesiumTags",
+ "./node_modules/tsd-jsdoc/dist/plugin"
],
"templates": {
"cleverLinks": true,
From 4b6a4d104cb13973766ed7eb2311659364733a19 Mon Sep 17 00:00:00 2001
From: Matthew Amato
Date: Sun, 31 May 2020 20:41:44 -0400
Subject: [PATCH 36/36] More fixes found by Kevin.
---
Source/Scene/ArcGisMapServerImageryProvider.js | 2 +-
Source/Scene/TileCoordinatesImageryProvider.js | 10 +++++-----
Tools/jsdoc/ts-conf.json | 2 +-
gulpfile.cjs | 7 ++++---
4 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/Source/Scene/ArcGisMapServerImageryProvider.js b/Source/Scene/ArcGisMapServerImageryProvider.js
index 0f7c34c6049c..b982130e43b2 100644
--- a/Source/Scene/ArcGisMapServerImageryProvider.js
+++ b/Source/Scene/ArcGisMapServerImageryProvider.js
@@ -54,7 +54,7 @@ import ImageryProvider from "./ImageryProvider.js";
* @property {Ellipsoid} [ellipsoid] The ellipsoid. If the tilingScheme is specified and used,
* this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither
* parameter is specified, the WGS84 ellipsoid is used.
- * @property {Credit|String} credit] A credit for the data source, which is displayed on the canvas. This parameter is ignored when accessing a tiled server.
+ * @property {Credit|String} [credit] A credit for the data source, which is displayed on the canvas. This parameter is ignored when accessing a tiled server.
* @property {Number} [tileWidth=256] The width of each tile in pixels. This parameter is ignored when accessing a tiled server.
* @property {Number} [tileHeight=256] The height of each tile in pixels. This parameter is ignored when accessing a tiled server.
* @property {Number} [maximumLevel] The maximum tile level to request, or undefined if there is no maximum. This parameter is ignored when accessing
diff --git a/Source/Scene/TileCoordinatesImageryProvider.js b/Source/Scene/TileCoordinatesImageryProvider.js
index 01e3ce7c231f..6f5c6f66c320 100644
--- a/Source/Scene/TileCoordinatesImageryProvider.js
+++ b/Source/Scene/TileCoordinatesImageryProvider.js
@@ -10,13 +10,13 @@ import when from "../ThirdParty/when.js";
*
* Initialization options for the TileCoordinatesImageryProvider constructor
*
- * @param {TilingScheme} [tilingScheme=new GeographicTilingScheme()] The tiling scheme for which to draw tiles.
- * @param {Ellipsoid} [ellipsoid] The ellipsoid. If the tilingScheme is specified,
+ * @property {TilingScheme} [tilingScheme=new GeographicTilingScheme()] The tiling scheme for which to draw tiles.
+ * @property {Ellipsoid} [ellipsoid] The ellipsoid. If the tilingScheme is specified,
* this parameter is ignored and the tiling scheme's ellipsoid is used instead. If neither
* parameter is specified, the WGS84 ellipsoid is used.
- * @param {Color} [color=Color.YELLOW] The color to draw the tile box and label.
- * @param {Number} [tileWidth=256] The width of the tile for level-of-detail selection purposes.
- * @param {Number} [tileHeight=256] The height of the tile for level-of-detail selection purposes.
+ * @property {Color} [color=Color.YELLOW] The color to draw the tile box and label.
+ * @property {Number} [tileWidth=256] The width of the tile for level-of-detail selection purposes.
+ * @property {Number} [tileHeight=256] The height of the tile for level-of-detail selection purposes.
*/
/**
diff --git a/Tools/jsdoc/ts-conf.json b/Tools/jsdoc/ts-conf.json
index 6813e219ec52..22c743f44ba5 100644
--- a/Tools/jsdoc/ts-conf.json
+++ b/Tools/jsdoc/ts-conf.json
@@ -15,7 +15,7 @@
},
"plugins": [
"./Tools/jsdoc/cesiumTags",
- "./node_modules/tsd-jsdoc/dist/plugin"
+ "tsd-jsdoc/dist/plugin"
],
"templates": {
"cleverLinks": true,
diff --git a/gulpfile.cjs b/gulpfile.cjs
index 0f57cf468bab..680f91e245aa 100644
--- a/gulpfile.cjs
+++ b/gulpfile.cjs
@@ -1545,12 +1545,13 @@ function createTypeScriptDefinitions() {
//eslint-disable-next-line no-cond-assign
while ((matches = regex.exec(source))) {
const moduleName = matches[2].match(/([^\s|\(]+)/);
- if (moduleName[1] === "CesiumMath") {
- moduleName[1] = "Math";
- }
publicModules.add(moduleName[1]);
}
+ // Math shows up as "Math" because of it's aliasing from CesiumMath and namespace collision with actual Math
+ // It fails the above regex so just add it directly here.
+ publicModules.add("Math");
+
// Fix up the output to match what we need
// declare => export since we are wrapping everything in a namespace
// CesiumMath => Math (because no CesiumJS build step would be complete without special logic for the Math class)