diff --git a/Apps/Sandcastle/gallery/Custom DataSource.html b/Apps/Sandcastle/gallery/Custom DataSource.html
index 1b24d40d6411..41b07bb8cab5 100644
--- a/Apps/Sandcastle/gallery/Custom DataSource.html
+++ b/Apps/Sandcastle/gallery/Custom DataSource.html
@@ -39,11 +39,9 @@
* This class is an example of a custom DataSource. It loads JSON data as
* defined by Google's WebGL Globe, https://github.com/dataarts/webgl-globe.
* @alias WebGLGlobeDataSource
- * @constructor
- *
+ * @class
* @param {string} [name] The name of this data source. If undefined, a name
* will be derived from the url.
- *
* @example
* const dataSource = new Cesium.WebGLGlobeDataSource();
* dataSource.loadUrl('sample.json');
@@ -70,7 +68,7 @@
/**
* Gets a human-readable name for this instance.
* @memberof WebGLGlobeDataSource.prototype
- * @type {String}
+ * @type {string}
*/
name: {
get: function () {
@@ -99,7 +97,7 @@
/**
* Gets a value indicating if the data source is currently loading data.
* @memberof WebGLGlobeDataSource.prototype
- * @type {Boolean}
+ * @type {boolean}
*/
isLoading: {
get: function () {
@@ -156,7 +154,7 @@
* so that only one series is viewed at a time. Valid values are defined
* in the seriesNames property.
* @memberof WebGLGlobeDataSource.prototype
- * @type {String}
+ * @type {string}
*/
seriesToDisplay: {
get: function () {
@@ -180,7 +178,7 @@
/**
* Gets or sets the scale factor applied to the height of each line.
* @memberof WebGLGlobeDataSource.prototype
- * @type {Number}
+ * @type {number}
*/
heightScale: {
get: function () {
@@ -196,7 +194,7 @@
/**
* Gets whether or not this data source should be displayed.
* @memberof WebGLGlobeDataSource.prototype
- * @type {Boolean}
+ * @type {boolean}
*/
show: {
get: function () {
diff --git a/Apps/Sandcastle/gallery/Custom Geocoder.html b/Apps/Sandcastle/gallery/Custom Geocoder.html
index 41b486948117..50ea8b934102 100644
--- a/Apps/Sandcastle/gallery/Custom Geocoder.html
+++ b/Apps/Sandcastle/gallery/Custom Geocoder.html
@@ -48,13 +48,12 @@
/**
* This class is an example of a custom geocoder. It provides geocoding through the OpenStreetMap Nominatim service.
* @alias OpenStreetMapNominatimGeocoder
- * @constructor
+ * @class
*/
function OpenStreetMapNominatimGeocoder() {}
/**
* The function called to geocode using this geocoder service.
- *
* @param {string} input The query to be sent to the geocoder service
* @returns {Promise}
*/
diff --git a/Apps/Sandcastle/gallery/development/Custom Primitive.html b/Apps/Sandcastle/gallery/development/Custom Primitive.html
index 7218987c7e94..ee89236af420 100644
--- a/Apps/Sandcastle/gallery/development/Custom Primitive.html
+++ b/Apps/Sandcastle/gallery/development/Custom Primitive.html
@@ -47,6 +47,7 @@
* Simple example of writing a Primitive from scratch. This
* primitive displays a procedurally-generated surface at a given
* position on the globe.
+ * @param cartographicPosition
*/
function CustomPrimitive(cartographicPosition) {
this.show = true;
@@ -84,6 +85,8 @@
/**
* generate a quad that's subdivided into faceResolution x faceResolution quads.
* The vertices will be adjusted in the vertex shader.
+ * @param faceResolution
+ * @param halfWidthMeters
*/
function generateVertices(faceResolution, halfWidthMeters) {
const vertexResolution = faceResolution + 1;
@@ -109,6 +112,7 @@
/**
* Tessellate a big square region into faceResolution x faceResolution quads
+ * @param faceResolution
*/
function generateIndices(faceResolution) {
const indicesPerQuad = 6;
@@ -141,6 +145,7 @@
const scratchColor = new Cesium.Color();
/**
* Generate a 1D texture for the color palette
+ * @param context
*/
function generateTexture(context) {
const width = 256;
diff --git a/Documentation/Contributors/DocumentationGuide/README.md b/Documentation/Contributors/DocumentationGuide/README.md
index caac7aa57d4d..ca206fd23dfc 100644
--- a/Documentation/Contributors/DocumentationGuide/README.md
+++ b/Documentation/Contributors/DocumentationGuide/README.md
@@ -240,7 +240,7 @@ CesiumMath.EPSILON1 = 0.1;
* interface and is not intended to be instantiated directly.
*
* @alias TerrainProvider
- * @constructor
+ * @class
*
* @see EllipsoidTerrainProvider
* @see CesiumTerrainProvider
@@ -264,14 +264,14 @@ function TerrainProvider() {
## Classes
-Define a class with `@alias` and `@constructor` tags on the constructor function, e.g.,
+Define a class with `@alias` and `@class` tags on the constructor function, e.g.,
```javascript
/**
* A 3D Cartesian point.
*
* @alias Cartesian3
- * @constructor
+ * @class
*
* ...
*/
@@ -423,7 +423,7 @@ If a member or function doesn't start with `_`, but is intended to be private, u
* one using {@link Scene#tweens} and {@link TweenCollection#add} and related add functions.
*
* @alias Tween
- * @constructor
+ * @class
*
* @private
*/
@@ -459,7 +459,7 @@ There's a general flow to each documentation block that makes it easy to read. T
DESCRIPTION.
@alias NAME
-@constructor
+@class
@param {TYPE} NAME DESCRIPTION.
@param {TYPE|OTHER_TYPE} NAME DESCRIPTION WITH LONG
diff --git a/Specs/ImplicitTilingTester.js b/Specs/ImplicitTilingTester.js
index 7513a4b497de..226c533cbc8e 100644
--- a/Specs/ImplicitTilingTester.js
+++ b/Specs/ImplicitTilingTester.js
@@ -45,15 +45,13 @@ function ImplicitTilingTester() {}
* @property {Uint8Array} [subtreeJson] The JSON portion of the subtree file. Mutually exclusive with subtreeBuffer.
* @property {Uint8Array} [subtreeBuffer] A typed array storing the contents of the subtree file (including the internal buffer). Mutually exclusive with subtreeJson.
* @property {Uint8Array} externalBuffer A typed array representing an external .bin file. This is always returned, but it may be an empty typed array.
-
*/
/**
* Generate a subtree buffer
* @param {SubtreeDescription} subtreeDescription A JSON description of the subtree's structure and values
* @param {boolean} constantOnly true if all the bitstreams are constant, i.e. no buffers/bufferViews are needed.
- * @return {GeneratedSubtree} The procedurally generated subtree and an external buffer.
- *
+ * @returns {GeneratedSubtree} The procedurally generated subtree and an external buffer.
* @example
* const subtreeDescription = {
* tileAvailability: {
@@ -80,7 +78,6 @@ function ImplicitTilingTester() {}
* const results = ImplicitTilingTester.generateSubtreeBuffers(
* subtreeDescription
* );
- *
* @private
*/
ImplicitTilingTester.generateSubtreeBuffers = function (
diff --git a/Specs/getArguments.js b/Specs/getArguments.js
index f33f457ea2f1..c4dc23cb028c 100644
--- a/Specs/getArguments.js
+++ b/Specs/getArguments.js
@@ -11,7 +11,7 @@
* constructor, so it never compares Jasmine-equal to an array. This function lets
* us create an arguments array.
* @alias getArguments
- * @return {Array} The arguments passed to the function.
+ * @returns {Array} The arguments passed to the function.
*/
function getArguments() {
return arguments;
diff --git a/eslint.config.js b/eslint.config.js
index c8ec3d9bd70c..7dea932e64da 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -1,6 +1,7 @@
import globals from "globals";
import html from "eslint-plugin-html";
import configCesium from "eslint-config-cesium";
+import jsdoc from "eslint-plugin-jsdoc";
export default [
{
@@ -42,13 +43,41 @@ export default [
{
files: ["packages/**/*.js", "Apps/**/*.js", "Specs/**/*.js", "**/*.html"],
...configCesium.configs.browser,
- plugins: { html },
+ plugins: { html, jsdoc },
+ settings: {
+ jsdoc: {
+ tagNamePreference: {
+ demo: "demo",
+ experimental: "experimental",
+ internalConstructor: "internalConstructor",
+ performance: "performance",
+ privateparam: "privateparam",
+ privateParam: "privateParam",
+ },
+ },
+ },
rules: {
...configCesium.configs.browser.rules,
+ ...jsdoc.configs["flat/recommended-error"].rules,
"no-unused-vars": [
"error",
{ vars: "all", args: "none", caughtErrors: "none" },
],
+ "jsdoc/require-jsdoc": "off", // Only lint existing jsdoc
+ "jsdoc/no-undefined-types": "off", // Ignore types for now
+ "jsdoc/valid-types": "off", // Our link tags are structured differently
+ "jsdoc/no-defaults": "off", // We use default parameters instead of enforcing with ES6 for now
+ "jsdoc/require-returns": "off",
+ "jsdoc/require-returns-description": "off",
+ "jsdoc/require-returns-type": "off",
+ "jsdoc/require-returns-check": "off",
+ "jsdoc/require-param-type": "off",
+ "jsdoc/require-param-description": "off",
+ "jsdoc/require-property-description": "off",
+ "jsdoc/require-description": "off",
+ "jsdoc/check-param-names": "off",
+ "jsdoc/check-property-names": "off",
+ "jsdoc/check-types": "off",
},
},
{
diff --git a/package.json b/package.json
index 3df63d5c8689..eea07b01b8a7 100644
--- a/package.json
+++ b/package.json
@@ -62,6 +62,7 @@
"eslint": "^9.1.1",
"eslint-config-cesium": "^11.0.1",
"eslint-plugin-html": "^8.1.1",
+ "eslint-plugin-jsdoc": "^48.2.7",
"express": "^4.17.1",
"globals": "^15.1.0",
"globby": "^14.0.0",
diff --git a/packages/engine/Source/Core/ApproximateTerrainHeights.js b/packages/engine/Source/Core/ApproximateTerrainHeights.js
index 6b1891ddc827..c10eb062482a 100644
--- a/packages/engine/Source/Core/ApproximateTerrainHeights.js
+++ b/packages/engine/Source/Core/ApproximateTerrainHeights.js
@@ -36,7 +36,7 @@ const ApproximateTerrainHeights = {};
/**
* Initializes the minimum and maximum terrain heights
- * @return {Promise}
+ * @returns {Promise}
*/
ApproximateTerrainHeights.initialize = function () {
let initPromise = ApproximateTerrainHeights._initPromise;
@@ -57,7 +57,7 @@ ApproximateTerrainHeights.initialize = function () {
* Computes the minimum and maximum terrain heights for a given rectangle
* @param {Rectangle} rectangle The bounding rectangle
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid
- * @return {{minimumTerrainHeight: number, maximumTerrainHeight: number}}
+ * @returns {{minimumTerrainHeight: number, maximumTerrainHeight: number}}
*/
ApproximateTerrainHeights.getMinimumMaximumHeights = function (
rectangle,
@@ -131,7 +131,7 @@ ApproximateTerrainHeights.getMinimumMaximumHeights = function (
* Computes the bounding sphere based on the tile heights in the rectangle
* @param {Rectangle} rectangle The bounding rectangle
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid
- * @return {BoundingSphere} The result bounding sphere
+ * @returns {BoundingSphere} The result bounding sphere
*/
ApproximateTerrainHeights.getBoundingSphere = function (rectangle, ellipsoid) {
//>>includeStart('debug', pragmas.debug);
diff --git a/packages/engine/Source/Core/ArcGISTiledElevationTerrainProvider.js b/packages/engine/Source/Core/ArcGISTiledElevationTerrainProvider.js
index 3c5fa226f157..fb0a1ae58037 100644
--- a/packages/engine/Source/Core/ArcGISTiledElevationTerrainProvider.js
+++ b/packages/engine/Source/Core/ArcGISTiledElevationTerrainProvider.js
@@ -25,7 +25,6 @@ const ALL_CHILDREN = 15;
* @typedef {Object} ArcGISTiledElevationTerrainProvider.ConstructorOptions
*
* Initialization options for the ArcGISTiledElevationTerrainProvider constructor
- *
* @property {string} [token] The authorization token to use to connect to the service.
* @property {Ellipsoid} [ellipsoid] The ellipsoid. If the tilingScheme is specified,
* this parameter is ignored and the tiling scheme's ellipsoid is used instead.
@@ -34,10 +33,8 @@ const ALL_CHILDREN = 15;
/**
* Used to track creation details while fetching initial metadata
- *
- * @constructor
+ * @class
* @private
- *
* @param {ArcGISTiledElevationTerrainProvider.ConstructorOptions} [options] An object describing initialization options.
*/
function TerrainProviderBuilder(options) {
@@ -58,9 +55,7 @@ function TerrainProviderBuilder(options) {
/**
* Complete ArcGISTiledElevationTerrainProvider creation based on builder values.
- *
* @private
- *
* @param {ArcGISTiledElevationTerrainProvider} provider
*/
TerrainProviderBuilder.prototype.build = function (provider) {
@@ -217,18 +212,14 @@ async function requestMetadata(
*
* A {@link TerrainProvider} that produces terrain geometry by tessellating height maps
* retrieved from Elevation Tiles of an an ArcGIS ImageService.
- *
* @alias ArcGISTiledElevationTerrainProvider
- * @constructor
- *
+ * @class
* @param {CesiumTerrainProvider.ConstructorOptions} [options] A url or an object describing initialization options
- *
* @example
* const terrainProvider = await Cesium.ArcGISTiledElevationTerrainProvider.fromUrl("https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer", {
* token: "KED1aF_I4UzXOHy3BnhwyBHU4l5oY6rO6walkmHoYqGp4XyIWUd5YZUC1ZrLAzvV40pR6gBXQayh0eFA8m6vPg.."
* });
* viewer.terrainProvider = terrainProvider;
- *
* @see TerrainProvider
*/
function ArcGISTiledElevationTerrainProvider(options) {
@@ -336,19 +327,16 @@ Object.defineProperties(ArcGISTiledElevationTerrainProvider.prototype, {
/**
* Creates a {@link TerrainProvider} that produces terrain geometry by tessellating height maps
* retrieved from Elevation Tiles of an an ArcGIS ImageService.
- *
* @param {Resource|String|Promise|Promise} url The URL of the ArcGIS ImageServer service.
* @param {ArcGISTiledElevationTerrainProvider.ConstructorOptions} [options] A url or an object describing initialization options.
* @returns {Promise}
- *
* @example
* const terrainProvider = await Cesium.ArcGISTiledElevationTerrainProvider.fromUrl("https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer", {
* token: "KED1aF_I4UzXOHy3BnhwyBHU4l5oY6rO6walkmHoYqGp4XyIWUd5YZUC1ZrLAzvV40pR6gBXQayh0eFA8m6vPg.."
* });
* viewer.terrainProvider = terrainProvider;
- *
- * @exception {RuntimeError} metadata specifies invalid spatial reference
- * @exception {RuntimeError} metadata does not specify tileInfo
+ * @throws {RuntimeError} metadata specifies invalid spatial reference
+ * @throws {RuntimeError} metadata does not specify tileInfo
*/
ArcGISTiledElevationTerrainProvider.fromUrl = async function (url, options) {
//>>includeStart('debug', pragmas.debug);
@@ -387,7 +375,6 @@ ArcGISTiledElevationTerrainProvider.fromUrl = async function (url, options) {
/**
* Requests the geometry for a given tile. The result includes terrain
* data and indicates that all child tiles are available.
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
@@ -491,7 +478,6 @@ function isTileAvailable(that, level, x, y) {
/**
* Gets the maximum geometric error allowed in a tile at a given level.
- *
* @param {number} level The tile level for which to get the maximum geometric error.
* @returns {number} The maximum geometric error.
*/
@@ -503,7 +489,6 @@ ArcGISTiledElevationTerrainProvider.prototype.getLevelMaximumGeometricError = fu
/**
* Determines whether data for a tile is available to be loaded.
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
@@ -530,7 +515,6 @@ ArcGISTiledElevationTerrainProvider.prototype.getTileDataAvailable = function (
/**
* Makes sure we load availability data for a tile
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
diff --git a/packages/engine/Source/Core/ArcType.js b/packages/engine/Source/Core/ArcType.js
index a1b9f80a8038..248c8c863031 100644
--- a/packages/engine/Source/Core/ArcType.js
+++ b/packages/engine/Source/Core/ArcType.js
@@ -1,12 +1,10 @@
/**
* ArcType defines the path that should be taken connecting vertices.
- *
* @enum {number}
*/
const ArcType = {
/**
* Straight line that does not conform to the surface of the ellipsoid.
- *
* @type {number}
* @constant
*/
@@ -14,7 +12,6 @@ const ArcType = {
/**
* Follow geodesic path.
- *
* @type {number}
* @constant
*/
@@ -22,7 +19,6 @@ const ArcType = {
/**
* Follow rhumb or loxodrome path.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/ArticulationStageType.js b/packages/engine/Source/Core/ArticulationStageType.js
index 7c4c64c303e9..6235937593f4 100644
--- a/packages/engine/Source/Core/ArticulationStageType.js
+++ b/packages/engine/Source/Core/ArticulationStageType.js
@@ -1,10 +1,8 @@
/**
* An enum describing the type of motion that is defined by an articulation stage
* in the AGI_articulations extension.
- *
* @alias {ArticulationStageType}
* @enum {string}
- *
* @private
*/
const ArticulationStageType = {
diff --git a/packages/engine/Source/Core/AssociativeArray.js b/packages/engine/Source/Core/AssociativeArray.js
index 1012807e8c09..bfb991359061 100644
--- a/packages/engine/Source/Core/AssociativeArray.js
+++ b/packages/engine/Source/Core/AssociativeArray.js
@@ -5,7 +5,7 @@ import DeveloperError from "./DeveloperError.js";
* A collection of key-value pairs that is stored as a hash for easy
* lookup but also provides an array for fast iteration.
* @alias AssociativeArray
- * @constructor
+ * @class
*/
function AssociativeArray() {
this._array = [];
@@ -16,7 +16,6 @@ Object.defineProperties(AssociativeArray.prototype, {
/**
* Gets the number of items in the collection.
* @memberof AssociativeArray.prototype
- *
* @type {number}
*/
length: {
@@ -29,7 +28,6 @@ Object.defineProperties(AssociativeArray.prototype, {
* This is a live array that will automatically reflect the values in the collection,
* it should not be modified directly.
* @memberof AssociativeArray.prototype
- *
* @type {Array}
*/
values: {
@@ -41,7 +39,6 @@ Object.defineProperties(AssociativeArray.prototype, {
/**
* Determines if the provided key is in the array.
- *
* @param {string|number} key The key to check.
* @returns {boolean} true if the key is in the array, false otherwise.
*/
@@ -57,7 +54,6 @@ AssociativeArray.prototype.contains = function (key) {
/**
* Associates the provided key with the provided value. If the key already
* exists, it is overwritten with the new value.
- *
* @param {string|number} key A unique identifier.
* @param {*} value The value to associate with the provided key.
*/
@@ -78,7 +74,6 @@ AssociativeArray.prototype.set = function (key, value) {
/**
* Retrieves the value associated with the provided key.
- *
* @param {string|number} key The key whose value is to be retrieved.
* @returns {*} The associated value, or undefined if the key does not exist in the collection.
*/
@@ -93,7 +88,6 @@ AssociativeArray.prototype.get = function (key) {
/**
* Removes a key-value pair from the collection.
- *
* @param {string|number} key The key to be removed.
* @returns {boolean} True if it was removed, false if the key was not in the collection.
*/
diff --git a/packages/engine/Source/Core/AttributeCompression.js b/packages/engine/Source/Core/AttributeCompression.js
index b6b521cc0097..2b3e111ad1d4 100644
--- a/packages/engine/Source/Core/AttributeCompression.js
+++ b/packages/engine/Source/Core/AttributeCompression.js
@@ -12,9 +12,7 @@ const LEFT_SHIFT = 256.0;
/**
* Attribute compression and decompression functions.
- *
* @namespace AttributeCompression
- *
* @private
*/
const AttributeCompression = {};
@@ -25,14 +23,11 @@ const AttributeCompression = {};
* Oct encoding is a compact representation of unit length vectors.
* The 'oct' encoding is described in "A Survey of Efficient Representations of Independent Unit Vectors",
* Cigolle et al 2014: {@link http://jcgt.org/published/0003/02/01/}
- *
* @param {Cartesian3} vector The normalized vector to be compressed into 2 component 'oct' encoding.
* @param {Cartesian2} result The 2 component oct-encoded unit length vector.
* @param {number} rangeMax The maximum value of the SNORM range. The encoded vector is stored in log2(rangeMax+1) bits.
* @returns {Cartesian2} The 2 component oct-encoded unit length vector.
- *
- * @exception {DeveloperError} vector must be normalized.
- *
+ * @throws {DeveloperError} vector must be normalized.
* @see AttributeCompression.octDecodeInRange
*/
AttributeCompression.octEncodeInRange = function (vector, rangeMax, result) {
@@ -64,13 +59,10 @@ AttributeCompression.octEncodeInRange = function (vector, rangeMax, result) {
/**
* Encodes a normalized vector into 2 SNORM values in the range of [0-255] following the 'oct' encoding.
- *
* @param {Cartesian3} vector The normalized vector to be compressed into 2 byte 'oct' encoding.
* @param {Cartesian2} result The 2 byte oct-encoded unit length vector.
* @returns {Cartesian2} The 2 byte oct-encoded unit length vector.
- *
- * @exception {DeveloperError} vector must be normalized.
- *
+ * @throws {DeveloperError} vector must be normalized.
* @see AttributeCompression.octEncodeInRange
* @see AttributeCompression.octDecode
*/
@@ -88,9 +80,7 @@ function forceUint8(value) {
* @param {Cartesian3} vector The normalized vector to be compressed into 4 byte 'oct' encoding.
* @param {Cartesian4} result The 4 byte oct-encoded unit length vector.
* @returns {Cartesian4} The 4 byte oct-encoded unit length vector.
- *
- * @exception {DeveloperError} vector must be normalized.
- *
+ * @throws {DeveloperError} vector must be normalized.
* @see AttributeCompression.octEncodeInRange
* @see AttributeCompression.octDecodeFromCartesian4
*/
@@ -105,15 +95,12 @@ AttributeCompression.octEncodeToCartesian4 = function (vector, result) {
/**
* Decodes a unit-length vector in 'oct' encoding to a normalized 3-component vector.
- *
* @param {number} x The x component of the oct-encoded unit length vector.
* @param {number} y The y component of the oct-encoded unit length vector.
* @param {number} rangeMax The maximum value of the SNORM range. The encoded vector is stored in log2(rangeMax+1) bits.
* @param {Cartesian3} result The decoded and normalized vector
* @returns {Cartesian3} The decoded and normalized vector.
- *
- * @exception {DeveloperError} x and y must be unsigned normalized integers between 0 and rangeMax.
- *
+ * @throws {DeveloperError} x and y must be unsigned normalized integers between 0 and rangeMax.
* @see AttributeCompression.octEncodeInRange
*/
AttributeCompression.octDecodeInRange = function (x, y, rangeMax, result) {
@@ -141,14 +128,11 @@ AttributeCompression.octDecodeInRange = function (x, y, rangeMax, result) {
/**
* Decodes a unit-length vector in 2 byte 'oct' encoding to a normalized 3-component vector.
- *
* @param {number} x The x component of the oct-encoded unit length vector.
* @param {number} y The y component of the oct-encoded unit length vector.
* @param {Cartesian3} result The decoded and normalized vector.
* @returns {Cartesian3} The decoded and normalized vector.
- *
- * @exception {DeveloperError} x and y must be an unsigned normalized integer between 0 and 255.
- *
+ * @throws {DeveloperError} x and y must be an unsigned normalized integer between 0 and 255.
* @see AttributeCompression.octDecodeInRange
*/
AttributeCompression.octDecode = function (x, y, result) {
@@ -157,13 +141,10 @@ AttributeCompression.octDecode = function (x, y, result) {
/**
* Decodes a unit-length vector in 4 byte 'oct' encoding to a normalized 3-component vector.
- *
* @param {Cartesian4} encoded The oct-encoded unit length vector.
* @param {Cartesian3} result The decoded and normalized vector.
* @returns {Cartesian3} The decoded and normalized vector.
- *
- * @exception {DeveloperError} x, y, z, and w must be unsigned normalized integers between 0 and 255.
- *
+ * @throws {DeveloperError} x, y, z, and w must be unsigned normalized integers between 0 and 255.
* @see AttributeCompression.octDecodeInRange
* @see AttributeCompression.octEncodeToCartesian4
*/
@@ -200,10 +181,8 @@ AttributeCompression.octDecodeFromCartesian4 = function (encoded, result) {
/**
* Packs an oct encoded vector into a single floating-point number.
- *
* @param {Cartesian2} encoded The oct encoded vector.
* @returns {number} The oct encoded vector packed into a single float.
- *
*/
AttributeCompression.octPackFloat = function (encoded) {
//>>includeStart('debug', pragmas.debug);
@@ -217,11 +196,9 @@ const scratchEncodeCart2 = new Cartesian2();
/**
* Encodes a normalized vector into 2 SNORM values in the range of [0-255] following the 'oct' encoding and
* stores those values in a single float-point number.
- *
* @param {Cartesian3} vector The normalized vector to be compressed into 2 byte 'oct' encoding.
* @returns {number} The 2 byte oct-encoded unit length vector.
- *
- * @exception {DeveloperError} vector must be normalized.
+ * @throws {DeveloperError} vector must be normalized.
*/
AttributeCompression.octEncodeFloat = function (vector) {
AttributeCompression.octEncode(vector, scratchEncodeCart2);
@@ -230,11 +207,9 @@ AttributeCompression.octEncodeFloat = function (vector) {
/**
* Decodes a unit-length vector in 'oct' encoding packed in a floating-point number to a normalized 3-component vector.
- *
* @param {number} value The oct-encoded unit length vector stored as a single floating-point number.
* @param {Cartesian3} result The decoded and normalized vector
* @returns {Cartesian3} The decoded and normalized vector.
- *
*/
AttributeCompression.octDecodeFloat = function (value, result) {
//>>includeStart('debug', pragmas.debug);
@@ -251,13 +226,11 @@ AttributeCompression.octDecodeFloat = function (value, result) {
/**
* Encodes three normalized vectors into 6 SNORM values in the range of [0-255] following the 'oct' encoding and
* packs those into two floating-point numbers.
- *
* @param {Cartesian3} v1 A normalized vector to be compressed.
* @param {Cartesian3} v2 A normalized vector to be compressed.
* @param {Cartesian3} v3 A normalized vector to be compressed.
* @param {Cartesian2} result The 'oct' encoded vectors packed into two floating-point numbers.
* @returns {Cartesian2} The 'oct' encoded vectors packed into two floating-point numbers.
- *
*/
AttributeCompression.octPack = function (v1, v2, v3, result) {
//>>includeStart('debug', pragmas.debug);
@@ -278,7 +251,6 @@ AttributeCompression.octPack = function (v1, v2, v3, result) {
/**
* Decodes three unit-length vectors in 'oct' encoding packed into a floating-point number to a normalized 3-component vector.
- *
* @param {Cartesian2} packed The three oct-encoded unit length vectors stored as two floating-point number.
* @param {Cartesian3} v1 One decoded and normalized vector.
* @param {Cartesian3} v2 One decoded and normalized vector.
@@ -307,10 +279,8 @@ AttributeCompression.octUnpack = function (packed, v1, v2, v3) {
/**
* Pack texture coordinates into a single float. The texture coordinates will only preserve 12 bits of precision.
- *
* @param {Cartesian2} textureCoordinates The texture coordinates to compress. Both coordinates must be in the range 0.0-1.0.
* @returns {number} The packed texture coordinates.
- *
*/
AttributeCompression.compressTextureCoordinates = function (
textureCoordinates
@@ -327,11 +297,9 @@ AttributeCompression.compressTextureCoordinates = function (
/**
* Decompresses texture coordinates that were packed into a single float.
- *
* @param {number} compressed The compressed texture coordinates.
* @param {Cartesian2} result The decompressed texture coordinates.
* @returns {Cartesian2} The modified result parameter.
- *
*/
AttributeCompression.decompressTextureCoordinates = function (
compressed,
@@ -355,11 +323,9 @@ function zigZagDecode(value) {
/**
* Decodes delta and ZigZag encoded vertices. This modifies the buffers in place.
- *
* @param {Uint16Array} uBuffer The buffer view of u values.
* @param {Uint16Array} vBuffer The buffer view of v values.
* @param {Uint16Array} [heightBuffer] The buffer view of height values.
- *
* @see {@link https://github.com/CesiumGS/quantized-mesh|quantized-mesh-1.0 terrain format}
*/
AttributeCompression.zigZagDeltaDecode = function (
@@ -408,14 +374,11 @@ AttributeCompression.zigZagDeltaDecode = function (
/**
* Dequantizes a quantized typed array into a floating point typed array.
- *
* @see {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_mesh_quantization#encoding-quantized-data}
- *
* @param {Int8Array|Uint8Array|Int16Array|Uint16Array|Int32Array|Uint32Array} typedArray The typed array for the quantized data.
* @param {ComponentDatatype} componentDatatype The component datatype of the quantized data.
* @param {AttributeType} type The attribute type of the quantized data.
* @param {number} count The number of attributes referenced in the dequantized array.
- *
* @returns {Float32Array} The dequantized array.
*/
AttributeCompression.dequantize = function (
@@ -481,7 +444,6 @@ AttributeCompression.dequantize = function (
/**
* Decode RGB565-encoded colors into a floating point typed array containing
* normalized RGB values.
- *
* @param {Uint16Array} typedArray Array of RGB565 values
* @param {Float32Array} [result] Array to store the normalized VEC3 result
*/
diff --git a/packages/engine/Source/Core/AxisAlignedBoundingBox.js b/packages/engine/Source/Core/AxisAlignedBoundingBox.js
index 41af002cd3c8..a2356a9bac82 100644
--- a/packages/engine/Source/Core/AxisAlignedBoundingBox.js
+++ b/packages/engine/Source/Core/AxisAlignedBoundingBox.js
@@ -7,12 +7,10 @@ import Intersect from "./Intersect.js";
/**
* Creates an instance of an AxisAlignedBoundingBox from the minimum and maximum points along the x, y, and z axes.
* @alias AxisAlignedBoundingBox
- * @constructor
- *
+ * @class
* @param {Cartesian3} [minimum=Cartesian3.ZERO] The minimum point along the x, y, and z axes.
* @param {Cartesian3} [maximum=Cartesian3.ZERO] The maximum point along the x, y, and z axes.
* @param {Cartesian3} [center] The center of the box; automatically computed if not supplied.
- *
* @see BoundingSphere
* @see BoundingRectangle
*/
@@ -47,12 +45,10 @@ function AxisAlignedBoundingBox(minimum, maximum, center) {
/**
* Creates an instance of an AxisAlignedBoundingBox from its corners.
- *
* @param {Cartesian3} minimum The minimum point along the x, y, and z axes.
* @param {Cartesian3} maximum The maximum point along the x, y, and z axes.
* @param {AxisAlignedBoundingBox} [result] The object onto which to store the result.
* @returns {AxisAlignedBoundingBox} The modified result parameter or a new AxisAlignedBoundingBox instance if one was not provided.
- *
* @example
* // Compute an axis aligned bounding box from the two corners.
* const box = Cesium.AxisAlignedBoundingBox.fromCorners(new Cesium.Cartesian3(-1, -1, -1), new Cesium.Cartesian3(1, 1, 1));
@@ -77,11 +73,9 @@ AxisAlignedBoundingBox.fromCorners = function (minimum, maximum, result) {
/**
* Computes an instance of an AxisAlignedBoundingBox. The box is determined by
* finding the points spaced the farthest apart on the x, y, and z axes.
- *
* @param {Cartesian3[]} positions List of points that the bounding box will enclose. Each point must have a x, y, and z properties.
* @param {AxisAlignedBoundingBox} [result] The object onto which to store the result.
* @returns {AxisAlignedBoundingBox} The modified result parameter or a new AxisAlignedBoundingBox instance if one was not provided.
- *
* @example
* // Compute an axis aligned bounding box enclosing two points.
* const box = Cesium.AxisAlignedBoundingBox.fromPoints([new Cesium.Cartesian3(2, 0, 0), new Cesium.Cartesian3(-2, 0, 0)]);
@@ -138,7 +132,6 @@ AxisAlignedBoundingBox.fromPoints = function (positions, result) {
/**
* Duplicates a AxisAlignedBoundingBox instance.
- *
* @param {AxisAlignedBoundingBox} box The bounding box to duplicate.
* @param {AxisAlignedBoundingBox} [result] The object onto which to store the result.
* @returns {AxisAlignedBoundingBox} The modified result parameter or a new AxisAlignedBoundingBox instance if none was provided. (Returns undefined if box is undefined)
@@ -161,7 +154,6 @@ AxisAlignedBoundingBox.clone = function (box, result) {
/**
* Compares the provided AxisAlignedBoundingBox componentwise and returns
* true if they are equal, false otherwise.
- *
* @param {AxisAlignedBoundingBox} [left] The first AxisAlignedBoundingBox.
* @param {AxisAlignedBoundingBox} [right] The second AxisAlignedBoundingBox.
* @returns {boolean} true if left and right are equal, false otherwise.
@@ -180,7 +172,6 @@ AxisAlignedBoundingBox.equals = function (left, right) {
let intersectScratch = new Cartesian3();
/**
* Determines which side of a plane a box is located.
- *
* @param {AxisAlignedBoundingBox} box The bounding box to test.
* @param {Plane} plane The plane to test against.
* @returns {Intersect} {@link Intersect.INSIDE} if the entire box is on the side of the plane
@@ -225,7 +216,6 @@ AxisAlignedBoundingBox.intersectPlane = function (box, plane) {
/**
* Duplicates this AxisAlignedBoundingBox instance.
- *
* @param {AxisAlignedBoundingBox} [result] The object onto which to store the result.
* @returns {AxisAlignedBoundingBox} The modified result parameter or a new AxisAlignedBoundingBox instance if one was not provided.
*/
@@ -235,7 +225,6 @@ AxisAlignedBoundingBox.prototype.clone = function (result) {
/**
* Determines which side of a plane this box is located.
- *
* @param {Plane} plane The plane to test against.
* @returns {Intersect} {@link Intersect.INSIDE} if the entire box is on the side of the plane
* the normal is pointing, {@link Intersect.OUTSIDE} if the entire box is
@@ -249,7 +238,6 @@ AxisAlignedBoundingBox.prototype.intersectPlane = function (plane) {
/**
* Compares this AxisAlignedBoundingBox against the provided AxisAlignedBoundingBox componentwise and returns
* true if they are equal, false otherwise.
- *
* @param {AxisAlignedBoundingBox} [right] The right hand side AxisAlignedBoundingBox.
* @returns {boolean} true if they are equal, false otherwise.
*/
diff --git a/packages/engine/Source/Core/BingMapsGeocoderService.js b/packages/engine/Source/Core/BingMapsGeocoderService.js
index a9292e57015d..4b2c4141360f 100644
--- a/packages/engine/Source/Core/BingMapsGeocoderService.js
+++ b/packages/engine/Source/Core/BingMapsGeocoderService.js
@@ -11,8 +11,7 @@ const url = "https://dev.virtualearth.net/REST/v1/Locations";
/**
* Provides geocoding through Bing Maps.
* @alias BingMapsGeocoderService
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {string} options.key A key to use with the Bing Maps geocoding service
* @param {string} [options.culture] A Bing Maps {@link https://docs.microsoft.com/en-us/bingmaps/rest-services/common-parameters-and-types/supported-culture-codes|Culture Code} to return results in a specific culture and language.
@@ -87,7 +86,6 @@ Object.defineProperties(BingMapsGeocoderService.prototype, {
/**
* @function
- *
* @param {string} query The query to be sent to the geocoder service
* @returns {Promise}
*/
diff --git a/packages/engine/Source/Core/BoundingRectangle.js b/packages/engine/Source/Core/BoundingRectangle.js
index f0a1881613ef..0a209306b165 100644
--- a/packages/engine/Source/Core/BoundingRectangle.js
+++ b/packages/engine/Source/Core/BoundingRectangle.js
@@ -10,13 +10,11 @@ import Rectangle from "./Rectangle.js";
/**
* A bounding rectangle given by a corner, width and height.
* @alias BoundingRectangle
- * @constructor
- *
+ * @class
* @param {number} [x=0.0] The x coordinate of the rectangle.
* @param {number} [y=0.0] The y coordinate of the rectangle.
* @param {number} [width=0.0] The width of the rectangle.
* @param {number} [height=0.0] The height of the rectangle.
- *
* @see BoundingSphere
* @see Packable
*/
@@ -58,11 +56,9 @@ BoundingRectangle.packedLength = 4;
/**
* Stores the provided instance into the provided array.
- *
* @param {BoundingRectangle} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
BoundingRectangle.pack = function (value, array, startingIndex) {
@@ -83,7 +79,6 @@ BoundingRectangle.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {BoundingRectangle} [result] The object into which to store the result.
@@ -109,7 +104,6 @@ BoundingRectangle.unpack = function (array, startingIndex, result) {
/**
* Computes a bounding rectangle enclosing the list of 2D points.
* The rectangle is oriented with the corner at the bottom left.
- *
* @param {Cartesian2[]} positions List of points that the bounding rectangle will enclose. Each point must have x and y properties.
* @param {BoundingRectangle} [result] The object onto which to store the result.
* @returns {BoundingRectangle} The modified result parameter or a new BoundingRectangle instance if one was not provided.
@@ -158,7 +152,6 @@ const fromRectangleLowerLeft = new Cartographic();
const fromRectangleUpperRight = new Cartographic();
/**
* Computes a bounding rectangle from a rectangle.
- *
* @param {Rectangle} rectangle The valid rectangle used to create a bounding rectangle.
* @param {object} [projection=GeographicProjection] The projection used to project the rectangle into 2D.
* @param {BoundingRectangle} [result] The object onto which to store the result.
@@ -197,7 +190,6 @@ BoundingRectangle.fromRectangle = function (rectangle, projection, result) {
/**
* Duplicates a BoundingRectangle instance.
- *
* @param {BoundingRectangle} rectangle The bounding rectangle to duplicate.
* @param {BoundingRectangle} [result] The object onto which to store the result.
* @returns {BoundingRectangle} The modified result parameter or a new BoundingRectangle instance if one was not provided. (Returns undefined if rectangle is undefined)
@@ -225,7 +217,6 @@ BoundingRectangle.clone = function (rectangle, result) {
/**
* Computes a bounding rectangle that is the union of the left and right bounding rectangles.
- *
* @param {BoundingRectangle} left A rectangle to enclose in bounding rectangle.
* @param {BoundingRectangle} right A rectangle to enclose in a bounding rectangle.
* @param {BoundingRectangle} [result] The object onto which to store the result.
@@ -255,7 +246,6 @@ BoundingRectangle.union = function (left, right, result) {
/**
* Computes a bounding rectangle by enlarging the provided rectangle until it contains the provided point.
- *
* @param {BoundingRectangle} rectangle A rectangle to expand.
* @param {Cartesian2} point A point to enclose in a bounding rectangle.
* @param {BoundingRectangle} [result] The object onto which to store the result.
@@ -291,7 +281,6 @@ BoundingRectangle.expand = function (rectangle, point, result) {
/**
* Determines if two rectangles intersect.
- *
* @param {BoundingRectangle} left A rectangle to check for intersection.
* @param {BoundingRectangle} right The other rectangle to check for intersection.
* @returns {Intersect} Intersect.INTERSECTING if the rectangles intersect, Intersect.OUTSIDE otherwise.
@@ -323,7 +312,6 @@ BoundingRectangle.intersect = function (left, right) {
/**
* Compares the provided BoundingRectangles componentwise and returns
* true if they are equal, false otherwise.
- *
* @param {BoundingRectangle} [left] The first BoundingRectangle.
* @param {BoundingRectangle} [right] The second BoundingRectangle.
* @returns {boolean} true if left and right are equal, false otherwise.
@@ -342,7 +330,6 @@ BoundingRectangle.equals = function (left, right) {
/**
* Duplicates this BoundingRectangle instance.
- *
* @param {BoundingRectangle} [result] The object onto which to store the result.
* @returns {BoundingRectangle} The modified result parameter or a new BoundingRectangle instance if one was not provided.
*/
@@ -352,7 +339,6 @@ BoundingRectangle.prototype.clone = function (result) {
/**
* Determines if this rectangle intersects with another.
- *
* @param {BoundingRectangle} right A rectangle to check for intersection.
* @returns {Intersect} Intersect.INTERSECTING if the rectangles intersect, Intersect.OUTSIDE otherwise.
*/
@@ -363,7 +349,6 @@ BoundingRectangle.prototype.intersect = function (right) {
/**
* Compares this BoundingRectangle against the provided BoundingRectangle componentwise and returns
* true if they are equal, false otherwise.
- *
* @param {BoundingRectangle} [right] The right hand side BoundingRectangle.
* @returns {boolean} true if they are equal, false otherwise.
*/
diff --git a/packages/engine/Source/Core/BoundingSphere.js b/packages/engine/Source/Core/BoundingSphere.js
index 3da2d739f67f..93be11d3b34f 100644
--- a/packages/engine/Source/Core/BoundingSphere.js
+++ b/packages/engine/Source/Core/BoundingSphere.js
@@ -15,11 +15,9 @@ import Rectangle from "./Rectangle.js";
/**
* A bounding sphere with a center and a radius.
* @alias BoundingSphere
- * @constructor
- *
+ * @class
* @param {Cartesian3} [center=Cartesian3.ZERO] The center of the bounding sphere.
* @param {number} [radius=0.0] The radius of the bounding sphere.
- *
* @see AxisAlignedBoundingBox
* @see BoundingRectangle
* @see Packable
@@ -58,11 +56,9 @@ const volumeConstant = (4.0 / 3.0) * CesiumMath.PI;
* Computes a tight-fitting bounding sphere enclosing a list of 3D Cartesian points.
* The bounding sphere is computed by running two algorithms, a naive algorithm and
* Ritter's algorithm. The smaller of the two spheres is used to ensure a tight fit.
- *
* @param {Cartesian3[]} [positions] An array of points that the bounding sphere will enclose. Each point must have x, y, and z properties.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if one was not provided.
- *
* @see {@link http://help.agi.com/AGIComponents/html/BlogBoundingSphere.htm|Bounding Sphere computation article}
*/
BoundingSphere.fromPoints = function (positions, result) {
@@ -231,7 +227,6 @@ const fromRectangle2DNortheast = new Cartographic();
/**
* Computes a bounding sphere from a rectangle projected in 2D.
- *
* @param {Rectangle} [rectangle] The rectangle around which to create a bounding sphere.
* @param {object} [projection=GeographicProjection] The projection used to project the rectangle into 2D.
* @param {BoundingSphere} [result] The object onto which to store the result.
@@ -250,7 +245,6 @@ BoundingSphere.fromRectangle2D = function (rectangle, projection, result) {
/**
* Computes a bounding sphere from a rectangle projected in 2D. The bounding sphere accounts for the
* object's minimum and maximum heights over the rectangle.
- *
* @param {Rectangle} [rectangle] The rectangle around which to create a bounding sphere.
* @param {object} [projection=GeographicProjection] The projection used to project the rectangle into 2D.
* @param {number} [minimumHeight=0.0] The minimum height over the rectangle.
@@ -309,7 +303,6 @@ const fromRectangle3DScratch = [];
/**
* Computes a bounding sphere from a rectangle in 3D. The bounding sphere is created using a subsample of points
* on the ellipsoid and contained in the rectangle. It may not be accurate for all rectangles on all types of ellipsoids.
- *
* @param {Rectangle} [rectangle] The valid rectangle used to create a bounding sphere.
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid used to determine positions of the rectangle.
* @param {number} [surfaceHeight=0.0] The height above the surface of the ellipsoid.
@@ -349,7 +342,6 @@ BoundingSphere.fromRectangle3D = function (
* stored in a flat array in X, Y, Z, order. The bounding sphere is computed by running two
* algorithms, a naive algorithm and Ritter's algorithm. The smaller of the two spheres is used to
* ensure a tight fit.
- *
* @param {number[]} [positions] An array of points that the bounding sphere will enclose. Each point
* is formed from three elements in the array in the order X, Y, Z.
* @param {Cartesian3} [center=Cartesian3.ZERO] The position to which the positions are relative, which need not be the
@@ -363,7 +355,6 @@ BoundingSphere.fromRectangle3D = function (
* index 5.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if one was not provided.
- *
* @example
* // Compute the bounding sphere from 3 positions, each specified relative to a center.
* // In addition to the X, Y, and Z coordinates, the points array contains two additional
@@ -373,7 +364,6 @@ BoundingSphere.fromRectangle3D = function (
* 4.0, 5.0, 6.0, 0.1, 0.2,
* 7.0, 8.0, 9.0, 0.1, 0.2];
* const sphere = Cesium.BoundingSphere.fromVertices(points, center, 5);
- *
* @see {@link http://blogs.agi.com/insight3d/index.php/2008/02/04/a-bounding/|Bounding Sphere computation article}
*/
BoundingSphere.fromVertices = function (positions, center, stride, result) {
@@ -554,14 +544,12 @@ BoundingSphere.fromVertices = function (positions, center, stride, result) {
* stored in parallel flat arrays in X, Y, Z, order. The bounding sphere is computed by running two
* algorithms, a naive algorithm and Ritter's algorithm. The smaller of the two spheres is used to
* ensure a tight fit.
- *
* @param {number[]} [positionsHigh] An array of high bits of the encoded cartesians that the bounding sphere will enclose. Each point
* is formed from three elements in the array in the order X, Y, Z.
* @param {number[]} [positionsLow] An array of low bits of the encoded cartesians that the bounding sphere will enclose. Each point
* is formed from three elements in the array in the order X, Y, Z.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if one was not provided.
- *
* @see {@link http://blogs.agi.com/insight3d/index.php/2008/02/04/a-bounding/|Bounding Sphere computation article}
*/
BoundingSphere.fromEncodedCartesianVertices = function (
@@ -741,12 +729,10 @@ BoundingSphere.fromEncodedCartesianVertices = function (
/**
* Computes a bounding sphere from the corner points of an axis-aligned bounding box. The sphere
* tightly and fully encompasses the box.
- *
* @param {Cartesian3} [corner] The minimum height over the rectangle.
* @param {Cartesian3} [oppositeCorner] The maximum height over the rectangle.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
- *
* @example
* // Create a bounding sphere around the unit cube
* const sphere = Cesium.BoundingSphere.fromCornerPoints(new Cesium.Cartesian3(-0.5, -0.5, -0.5), new Cesium.Cartesian3(0.5, 0.5, 0.5));
@@ -768,11 +754,9 @@ BoundingSphere.fromCornerPoints = function (corner, oppositeCorner, result) {
/**
* Creates a bounding sphere encompassing an ellipsoid.
- *
* @param {Ellipsoid} ellipsoid The ellipsoid around which to create a bounding sphere.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
- *
* @example
* const boundingSphere = Cesium.BoundingSphere.fromEllipsoid(ellipsoid);
*/
@@ -794,7 +778,6 @@ const fromBoundingSpheresScratch = new Cartesian3();
/**
* Computes a tight-fitting bounding sphere enclosing the provided array of bounding spheres.
- *
* @param {BoundingSphere[]} [boundingSpheres] The array of bounding spheres.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
@@ -848,7 +831,6 @@ const fromOrientedBoundingBoxScratchW = new Cartesian3();
/**
* Computes a tight-fitting bounding sphere enclosing the provided oriented bounding box.
- *
* @param {OrientedBoundingBox} orientedBoundingBox The oriented bounding box.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
@@ -884,7 +866,6 @@ const scratchFromTransformationScale = new Cartesian3();
/**
* Computes a tight-fitting bounding sphere enclosing the provided affine transformation.
- *
* @param {Matrix4} transformation The affine transformation.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
@@ -915,7 +896,6 @@ BoundingSphere.fromTransformation = function (transformation, result) {
/**
* Duplicates a BoundingSphere instance.
- *
* @param {BoundingSphere} sphere The bounding sphere to duplicate.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided. (Returns undefined if sphere is undefined)
@@ -942,11 +922,9 @@ BoundingSphere.packedLength = 4;
/**
* Stores the provided instance into the provided array.
- *
* @param {BoundingSphere} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
BoundingSphere.pack = function (value, array, startingIndex) {
@@ -968,7 +946,6 @@ BoundingSphere.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {BoundingSphere} [result] The object into which to store the result.
@@ -997,7 +974,6 @@ const unionScratch = new Cartesian3();
const unionScratchCenter = new Cartesian3();
/**
* Computes a bounding sphere that contains both the left and right bounding spheres.
- *
* @param {BoundingSphere} left A sphere to enclose in a bounding sphere.
* @param {BoundingSphere} right A sphere to enclose in a bounding sphere.
* @param {BoundingSphere} [result] The object onto which to store the result.
@@ -1057,7 +1033,6 @@ BoundingSphere.union = function (left, right, result) {
const expandScratch = new Cartesian3();
/**
* Computes a bounding sphere by enlarging the provided sphere to contain the provided point.
- *
* @param {BoundingSphere} sphere A sphere to expand.
* @param {Cartesian3} point A point to enclose in a bounding sphere.
* @param {BoundingSphere} [result] The object onto which to store the result.
@@ -1083,7 +1058,6 @@ BoundingSphere.expand = function (sphere, point, result) {
/**
* Determines which side of a plane a sphere is located.
- *
* @param {BoundingSphere} sphere The bounding sphere to test.
* @param {Plane} plane The plane to test against.
* @returns {Intersect} {@link Intersect.INSIDE} if the entire sphere is on the side of the plane
@@ -1114,7 +1088,6 @@ BoundingSphere.intersectPlane = function (sphere, plane) {
/**
* Applies a 4x4 affine transformation matrix to a bounding sphere.
- *
* @param {BoundingSphere} sphere The bounding sphere to apply the transformation to.
* @param {Matrix4} transform The transformation matrix to apply to the bounding sphere.
* @param {BoundingSphere} [result] The object onto which to store the result.
@@ -1144,11 +1117,9 @@ const distanceSquaredToScratch = new Cartesian3();
/**
* Computes the estimated distance squared from the closest point on a bounding sphere to a point.
- *
* @param {BoundingSphere} sphere The sphere.
* @param {Cartesian3} cartesian The point
* @returns {number} The distance squared from the bounding sphere to the point. Returns 0 if the point is inside the sphere.
- *
* @example
* // Sort bounding spheres from back to front
* spheres.sort(function(a, b) {
@@ -1179,12 +1150,10 @@ BoundingSphere.distanceSquaredTo = function (sphere, cartesian) {
* Applies a 4x4 affine transformation matrix to a bounding sphere where there is no scale
* The transformation matrix is not verified to have a uniform scale of 1.
* This method is faster than computing the general bounding sphere transform using {@link BoundingSphere.transform}.
- *
* @param {BoundingSphere} sphere The bounding sphere to apply the transformation to.
* @param {Matrix4} transform The transformation matrix to apply to the bounding sphere.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
- *
* @example
* const modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(positionOnEllipsoid);
* const boundingSphere = new Cesium.BoundingSphere();
@@ -1217,7 +1186,6 @@ const scratchCartesian3 = new Cartesian3();
*
* If you imagine the infinite number of planes with normal direction, this computes the smallest distance to the
* closest and farthest planes from position that intersect the bounding sphere.
- *
* @param {BoundingSphere} sphere The bounding sphere to calculate the distance to.
* @param {Cartesian3} position The position to calculate the distance from.
* @param {Cartesian3} direction The direction from position.
@@ -1266,7 +1234,6 @@ for (let n = 0; n < 8; ++n) {
const projectTo2DProjection = new GeographicProjection();
/**
* Creates a bounding sphere in 2D from a bounding sphere in 3D world coordinates.
- *
* @param {BoundingSphere} sphere The bounding sphere to transform to 2D.
* @param {object} [projection=GeographicProjection] The projection to 2D.
* @param {BoundingSphere} [result] The object onto which to store the result.
@@ -1378,7 +1345,6 @@ BoundingSphere.projectTo2D = function (sphere, projection, result) {
/**
* Determines whether or not a sphere is hidden from view by the occluder.
- *
* @param {BoundingSphere} sphere The bounding sphere surrounding the occludee object.
* @param {Occluder} occluder The occluder.
* @returns {boolean} true if the sphere is not visible; otherwise false.
@@ -1394,7 +1360,6 @@ BoundingSphere.isOccluded = function (sphere, occluder) {
/**
* Compares the provided BoundingSphere componentwise and returns
* true if they are equal, false otherwise.
- *
* @param {BoundingSphere} [left] The first BoundingSphere.
* @param {BoundingSphere} [right] The second BoundingSphere.
* @returns {boolean} true if left and right are equal, false otherwise.
@@ -1411,7 +1376,6 @@ BoundingSphere.equals = function (left, right) {
/**
* Determines which side of a plane the sphere is located.
- *
* @param {Plane} plane The plane to test against.
* @returns {Intersect} {@link Intersect.INSIDE} if the entire sphere is on the side of the plane
* the normal is pointing, {@link Intersect.OUTSIDE} if the entire sphere is
@@ -1424,10 +1388,8 @@ BoundingSphere.prototype.intersectPlane = function (plane) {
/**
* Computes the estimated distance squared from the closest point on a bounding sphere to a point.
- *
* @param {Cartesian3} cartesian The point
* @returns {number} The estimated distance squared from the bounding sphere to the point.
- *
* @example
* // Sort bounding spheres from back to front
* spheres.sort(function(a, b) {
@@ -1444,7 +1406,6 @@ BoundingSphere.prototype.distanceSquaredTo = function (cartesian) {
*
* If you imagine the infinite number of planes with normal direction, this computes the smallest distance to the
* closest and farthest planes from position that intersect the bounding sphere.
- *
* @param {Cartesian3} position The position to calculate the distance from.
* @param {Cartesian3} direction The direction from position.
* @param {Interval} [result] A Interval to store the nearest and farthest distances.
@@ -1465,7 +1426,6 @@ BoundingSphere.prototype.computePlaneDistances = function (
/**
* Determines whether or not a sphere is hidden from view by the occluder.
- *
* @param {Occluder} occluder The occluder.
* @returns {boolean} true if the sphere is not visible; otherwise false.
*/
@@ -1476,7 +1436,6 @@ BoundingSphere.prototype.isOccluded = function (occluder) {
/**
* Compares this BoundingSphere against the provided BoundingSphere componentwise and returns
* true if they are equal, false otherwise.
- *
* @param {BoundingSphere} [right] The right hand side BoundingSphere.
* @returns {boolean} true if they are equal, false otherwise.
*/
@@ -1486,7 +1445,6 @@ BoundingSphere.prototype.equals = function (right) {
/**
* Duplicates this BoundingSphere instance.
- *
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
*/
diff --git a/packages/engine/Source/Core/BoxGeometry.js b/packages/engine/Source/Core/BoxGeometry.js
index 405107e0afd5..b964fc5c6a52 100644
--- a/packages/engine/Source/Core/BoxGeometry.js
+++ b/packages/engine/Source/Core/BoxGeometry.js
@@ -16,21 +16,16 @@ const diffScratch = new Cartesian3();
/**
* Describes a cube centered at the origin.
- *
* @alias BoxGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Cartesian3} options.minimum The minimum x, y, and z coordinates of the box.
* @param {Cartesian3} options.maximum The maximum x, y, and z coordinates of the box.
* @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
- *
* @see BoxGeometry.fromDimensions
* @see BoxGeometry.createGeometry
* @see Packable
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Box.html|Cesium Sandcastle Box Demo}
- *
* @example
* const box = new Cesium.BoxGeometry({
* vertexFormat : Cesium.VertexFormat.POSITION_ONLY,
@@ -69,22 +64,17 @@ function BoxGeometry(options) {
/**
* Creates a cube centered at the origin given its dimensions.
- *
* @param {object} options Object with the following properties:
* @param {Cartesian3} options.dimensions The width, depth, and height of the box stored in the x, y, and z coordinates of the Cartesian3, respectively.
* @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
* @returns {BoxGeometry}
- *
- * @exception {DeveloperError} All dimensions components must be greater than or equal to zero.
- *
- *
+ * @throws {DeveloperError} All dimensions components must be greater than or equal to zero.
* @example
* const box = Cesium.BoxGeometry.fromDimensions({
* vertexFormat : Cesium.VertexFormat.POSITION_ONLY,
* dimensions : new Cesium.Cartesian3(500000.0, 500000.0, 500000.0)
* });
* const geometry = Cesium.BoxGeometry.createGeometry(box);
- *
* @see BoxGeometry.createGeometry
*/
BoxGeometry.fromDimensions = function (options) {
@@ -110,12 +100,8 @@ BoxGeometry.fromDimensions = function (options) {
/**
* Creates a cube from the dimensions of an AxisAlignedBoundingBox.
- *
* @param {AxisAlignedBoundingBox} boundingBox A description of the AxisAlignedBoundingBox.
* @returns {BoxGeometry}
- *
- *
- *
* @example
* const aabb = Cesium.AxisAlignedBoundingBox.fromPoints(Cesium.Cartesian3.fromDegreesArray([
* -72.0, 40.0,
@@ -125,7 +111,6 @@ BoxGeometry.fromDimensions = function (options) {
* -68.0, 40.0
* ]));
* const box = Cesium.BoxGeometry.fromAxisAlignedBoundingBox(aabb);
- *
* @see BoxGeometry.createGeometry
*/
BoxGeometry.fromAxisAlignedBoundingBox = function (boundingBox) {
@@ -148,11 +133,9 @@ BoxGeometry.packedLength =
/**
* Stores the provided instance into the provided array.
- *
* @param {BoxGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
BoxGeometry.pack = function (value, array, startingIndex) {
@@ -193,7 +176,6 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {BoxGeometry} [result] The object into which to store the result.
@@ -239,7 +221,6 @@ BoxGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of a box, including its vertices, indices, and a bounding sphere.
- *
* @param {BoxGeometry} boxGeometry A description of the box.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
@@ -876,7 +857,6 @@ let unitBoxGeometry;
/**
* Returns the geometric representation of a unit box, including its vertices, indices, and a bounding sphere.
* @returns {Geometry} The computed vertices and indices.
- *
* @private
*/
BoxGeometry.getUnitBox = function () {
diff --git a/packages/engine/Source/Core/BoxOutlineGeometry.js b/packages/engine/Source/Core/BoxOutlineGeometry.js
index 5e18ee05e9b1..1d64d95c0486 100644
--- a/packages/engine/Source/Core/BoxOutlineGeometry.js
+++ b/packages/engine/Source/Core/BoxOutlineGeometry.js
@@ -15,18 +15,14 @@ const diffScratch = new Cartesian3();
/**
* A description of the outline of a cube centered at the origin.
- *
* @alias BoxOutlineGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Cartesian3} options.minimum The minimum x, y, and z coordinates of the box.
* @param {Cartesian3} options.maximum The maximum x, y, and z coordinates of the box.
- *
* @see BoxOutlineGeometry.fromDimensions
* @see BoxOutlineGeometry.createGeometry
* @see Packable
- *
* @example
* const box = new Cesium.BoxOutlineGeometry({
* maximum : new Cesium.Cartesian3(250000.0, 250000.0, 250000.0),
@@ -61,20 +57,15 @@ function BoxOutlineGeometry(options) {
/**
* Creates an outline of a cube centered at the origin given its dimensions.
- *
* @param {object} options Object with the following properties:
* @param {Cartesian3} options.dimensions The width, depth, and height of the box stored in the x, y, and z coordinates of the Cartesian3, respectively.
* @returns {BoxOutlineGeometry}
- *
- * @exception {DeveloperError} All dimensions components must be greater than or equal to zero.
- *
- *
+ * @throws {DeveloperError} All dimensions components must be greater than or equal to zero.
* @example
* const box = Cesium.BoxOutlineGeometry.fromDimensions({
* dimensions : new Cesium.Cartesian3(500000.0, 500000.0, 500000.0)
* });
* const geometry = Cesium.BoxOutlineGeometry.createGeometry(box);
- *
* @see BoxOutlineGeometry.createGeometry
*/
BoxOutlineGeometry.fromDimensions = function (options) {
@@ -99,12 +90,8 @@ BoxOutlineGeometry.fromDimensions = function (options) {
/**
* Creates an outline of a cube from the dimensions of an AxisAlignedBoundingBox.
- *
* @param {AxisAlignedBoundingBox} boundingBox A description of the AxisAlignedBoundingBox.
* @returns {BoxOutlineGeometry}
- *
- *
- *
* @example
* const aabb = Cesium.AxisAlignedBoundingBox.fromPoints(Cesium.Cartesian3.fromDegreesArray([
* -72.0, 40.0,
@@ -114,7 +101,6 @@ BoxOutlineGeometry.fromDimensions = function (options) {
* -68.0, 40.0
* ]));
* const box = Cesium.BoxOutlineGeometry.fromAxisAlignedBoundingBox(aabb);
- *
* @see BoxOutlineGeometry.createGeometry
*/
BoxOutlineGeometry.fromAxisAlignedBoundingBox = function (boundingBox) {
@@ -136,11 +122,9 @@ BoxOutlineGeometry.packedLength = 2 * Cartesian3.packedLength + 1;
/**
* Stores the provided instance into the provided array.
- *
* @param {BoxOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
BoxOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -171,7 +155,6 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {BoxOutlineGeometry} [result] The object into which to store the result.
@@ -208,7 +191,6 @@ BoxOutlineGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of an outline of a box, including its vertices, indices, and a bounding sphere.
- *
* @param {BoxOutlineGeometry} boxGeometry A description of the box outline.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/Cartesian2.js b/packages/engine/Source/Core/Cartesian2.js
index 9d7d8137359c..35d7c2e58b27 100644
--- a/packages/engine/Source/Core/Cartesian2.js
+++ b/packages/engine/Source/Core/Cartesian2.js
@@ -7,11 +7,9 @@ import CesiumMath from "./Math.js";
/**
* A 2D Cartesian point.
* @alias Cartesian2
- * @constructor
- *
+ * @class
* @param {number} [x=0.0] The X component.
* @param {number} [y=0.0] The Y component.
- *
* @see Cartesian3
* @see Cartesian4
* @see Packable
@@ -34,7 +32,6 @@ function Cartesian2(x, y) {
/**
* Creates a Cartesian2 instance from x and y coordinates.
- *
* @param {number} x The x coordinate.
* @param {number} y The y coordinate.
* @param {Cartesian2} [result] The object onto which to store the result.
@@ -52,7 +49,6 @@ Cartesian2.fromElements = function (x, y, result) {
/**
* Duplicates a Cartesian2 instance.
- *
* @param {Cartesian2} cartesian The Cartesian to duplicate.
* @param {Cartesian2} [result] The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new Cartesian2 instance if one was not provided. (Returns undefined if cartesian is undefined)
@@ -74,7 +70,6 @@ Cartesian2.clone = function (cartesian, result) {
* Creates a Cartesian2 instance from an existing Cartesian3. This simply takes the
* x and y properties of the Cartesian3 and drops z.
* @function
- *
* @param {Cartesian3} cartesian The Cartesian3 instance to create a Cartesian2 instance from.
* @param {Cartesian2} [result] The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new Cartesian2 instance if one was not provided.
@@ -85,7 +80,6 @@ Cartesian2.fromCartesian3 = Cartesian2.clone;
* Creates a Cartesian2 instance from an existing Cartesian4. This simply takes the
* x and y properties of the Cartesian4 and drops z and w.
* @function
- *
* @param {Cartesian4} cartesian The Cartesian4 instance to create a Cartesian2 instance from.
* @param {Cartesian2} [result] The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new Cartesian2 instance if one was not provided.
@@ -100,11 +94,9 @@ Cartesian2.packedLength = 2;
/**
* Stores the provided instance into the provided array.
- *
* @param {Cartesian2} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
Cartesian2.pack = function (value, array, startingIndex) {
@@ -123,7 +115,6 @@ Cartesian2.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {Cartesian2} [result] The object into which to store the result.
@@ -146,7 +137,6 @@ Cartesian2.unpack = function (array, startingIndex, result) {
/**
* Flattens an array of Cartesian2s into an array of components.
- *
* @param {Cartesian2[]} array The array of cartesians to pack.
* @param {number[]} [result] The array onto which to store the result. If this is a typed array, it must have array.length * 2 components, else a {@link DeveloperError} will be thrown. If it is a regular array, it will be resized to have (array.length * 2) elements.
* @returns {number[]} The packed array.
@@ -178,7 +168,6 @@ Cartesian2.packArray = function (array, result) {
/**
* Unpacks an array of cartesian components into an array of Cartesian2s.
- *
* @param {number[]} array The array of components to unpack.
* @param {Cartesian2[]} [result] The array onto which to store the result.
* @returns {Cartesian2[]} The unpacked array.
@@ -209,12 +198,10 @@ Cartesian2.unpackArray = function (array, result) {
/**
* Creates a Cartesian2 from two consecutive elements in an array.
* @function
- *
* @param {number[]} array The array whose two consecutive elements correspond to the x and y components, respectively.
* @param {number} [startingIndex=0] The offset into the array of the first element, which corresponds to the x component.
* @param {Cartesian2} [result] The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new Cartesian2 instance if one was not provided.
- *
* @example
* // Create a Cartesian2 with (1.0, 2.0)
* const v = [1.0, 2.0];
@@ -228,7 +215,6 @@ Cartesian2.fromArray = Cartesian2.unpack;
/**
* Computes the value of the maximum component for the supplied Cartesian.
- *
* @param {Cartesian2} cartesian The cartesian to use.
* @returns {number} The value of the maximum component.
*/
@@ -242,7 +228,6 @@ Cartesian2.maximumComponent = function (cartesian) {
/**
* Computes the value of the minimum component for the supplied Cartesian.
- *
* @param {Cartesian2} cartesian The cartesian to use.
* @returns {number} The value of the minimum component.
*/
@@ -256,7 +241,6 @@ Cartesian2.minimumComponent = function (cartesian) {
/**
* Compares two Cartesians and computes a Cartesian which contains the minimum components of the supplied Cartesians.
- *
* @param {Cartesian2} first A cartesian to compare.
* @param {Cartesian2} second A cartesian to compare.
* @param {Cartesian2} result The object into which to store the result.
@@ -277,7 +261,6 @@ Cartesian2.minimumByComponent = function (first, second, result) {
/**
* Compares two Cartesians and computes a Cartesian which contains the maximum components of the supplied Cartesians.
- *
* @param {Cartesian2} first A cartesian to compare.
* @param {Cartesian2} second A cartesian to compare.
* @param {Cartesian2} result The object into which to store the result.
@@ -297,7 +280,6 @@ Cartesian2.maximumByComponent = function (first, second, result) {
/**
* Constrain a value to lie between two values.
- *
* @param {Cartesian2} value The value to clamp.
* @param {Cartesian2} min The minimum bound.
* @param {Cartesian2} max The maximum bound.
@@ -323,7 +305,6 @@ Cartesian2.clamp = function (value, min, max, result) {
/**
* Computes the provided Cartesian's squared magnitude.
- *
* @param {Cartesian2} cartesian The Cartesian instance whose squared magnitude is to be computed.
* @returns {number} The squared magnitude.
*/
@@ -337,7 +318,6 @@ Cartesian2.magnitudeSquared = function (cartesian) {
/**
* Computes the Cartesian's magnitude (length).
- *
* @param {Cartesian2} cartesian The Cartesian instance whose magnitude is to be computed.
* @returns {number} The magnitude.
*/
@@ -349,11 +329,9 @@ const distanceScratch = new Cartesian2();
/**
* Computes the distance between two points.
- *
* @param {Cartesian2} left The first point to compute the distance from.
* @param {Cartesian2} right The second point to compute the distance to.
* @returns {number} The distance between two points.
- *
* @example
* // Returns 1.0
* const d = Cesium.Cartesian2.distance(new Cesium.Cartesian2(1.0, 0.0), new Cesium.Cartesian2(2.0, 0.0));
@@ -371,11 +349,9 @@ Cartesian2.distance = function (left, right) {
/**
* Computes the squared distance between two points. Comparing squared distances
* using this function is more efficient than comparing distances using {@link Cartesian2#distance}.
- *
* @param {Cartesian2} left The first point to compute the distance from.
* @param {Cartesian2} right The second point to compute the distance to.
* @returns {number} The distance between two points.
- *
* @example
* // Returns 4.0, not 2.0
* const d = Cesium.Cartesian2.distance(new Cesium.Cartesian2(1.0, 0.0), new Cesium.Cartesian2(3.0, 0.0));
@@ -392,7 +368,6 @@ Cartesian2.distanceSquared = function (left, right) {
/**
* Computes the normalized form of the supplied Cartesian.
- *
* @param {Cartesian2} cartesian The Cartesian to be normalized.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter.
@@ -419,7 +394,6 @@ Cartesian2.normalize = function (cartesian, result) {
/**
* Computes the dot (scalar) product of two Cartesians.
- *
* @param {Cartesian2} left The first Cartesian.
* @param {Cartesian2} right The second Cartesian.
* @returns {number} The dot product.
@@ -435,7 +409,6 @@ Cartesian2.dot = function (left, right) {
/**
* Computes the magnitude of the cross product that would result from implicitly setting the Z coordinate of the input vectors to 0
- *
* @param {Cartesian2} left The first Cartesian.
* @param {Cartesian2} right The second Cartesian.
* @returns {number} The cross product.
@@ -451,7 +424,6 @@ Cartesian2.cross = function (left, right) {
/**
* Computes the componentwise product of two Cartesians.
- *
* @param {Cartesian2} left The first Cartesian.
* @param {Cartesian2} right The second Cartesian.
* @param {Cartesian2} result The object onto which to store the result.
@@ -471,7 +443,6 @@ Cartesian2.multiplyComponents = function (left, right, result) {
/**
* Computes the componentwise quotient of two Cartesians.
- *
* @param {Cartesian2} left The first Cartesian.
* @param {Cartesian2} right The second Cartesian.
* @param {Cartesian2} result The object onto which to store the result.
@@ -491,7 +462,6 @@ Cartesian2.divideComponents = function (left, right, result) {
/**
* Computes the componentwise sum of two Cartesians.
- *
* @param {Cartesian2} left The first Cartesian.
* @param {Cartesian2} right The second Cartesian.
* @param {Cartesian2} result The object onto which to store the result.
@@ -511,7 +481,6 @@ Cartesian2.add = function (left, right, result) {
/**
* Computes the componentwise difference of two Cartesians.
- *
* @param {Cartesian2} left The first Cartesian.
* @param {Cartesian2} right The second Cartesian.
* @param {Cartesian2} result The object onto which to store the result.
@@ -531,7 +500,6 @@ Cartesian2.subtract = function (left, right, result) {
/**
* Multiplies the provided Cartesian componentwise by the provided scalar.
- *
* @param {Cartesian2} cartesian The Cartesian to be scaled.
* @param {number} scalar The scalar to multiply with.
* @param {Cartesian2} result The object onto which to store the result.
@@ -551,7 +519,6 @@ Cartesian2.multiplyByScalar = function (cartesian, scalar, result) {
/**
* Divides the provided Cartesian componentwise by the provided scalar.
- *
* @param {Cartesian2} cartesian The Cartesian to be divided.
* @param {number} scalar The scalar to divide by.
* @param {Cartesian2} result The object onto which to store the result.
@@ -571,7 +538,6 @@ Cartesian2.divideByScalar = function (cartesian, scalar, result) {
/**
* Negates the provided Cartesian.
- *
* @param {Cartesian2} cartesian The Cartesian to be negated.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter.
@@ -589,7 +555,6 @@ Cartesian2.negate = function (cartesian, result) {
/**
* Computes the absolute value of the provided Cartesian.
- *
* @param {Cartesian2} cartesian The Cartesian whose absolute value is to be computed.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter.
@@ -608,7 +573,6 @@ Cartesian2.abs = function (cartesian, result) {
const lerpScratch = new Cartesian2();
/**
* Computes the linear interpolation or extrapolation at t using the provided cartesians.
- *
* @param {Cartesian2} start The value corresponding to t at 0.0.
* @param {Cartesian2} end The value corresponding to t at 1.0.
* @param {number} t The point along t at which to interpolate.
@@ -632,7 +596,6 @@ const angleBetweenScratch = new Cartesian2();
const angleBetweenScratch2 = new Cartesian2();
/**
* Returns the angle, in radians, between the provided Cartesians.
- *
* @param {Cartesian2} left The first Cartesian.
* @param {Cartesian2} right The second Cartesian.
* @returns {number} The angle between the Cartesians.
@@ -653,7 +616,6 @@ Cartesian2.angleBetween = function (left, right) {
const mostOrthogonalAxisScratch = new Cartesian2();
/**
* Returns the axis that is most orthogonal to the provided Cartesian.
- *
* @param {Cartesian2} cartesian The Cartesian on which to find the most orthogonal axis.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The most orthogonal axis.
@@ -679,7 +641,6 @@ Cartesian2.mostOrthogonalAxis = function (cartesian, result) {
/**
* Compares the provided Cartesians componentwise and returns
* true if they are equal, false otherwise.
- *
* @param {Cartesian2} [left] The first Cartesian.
* @param {Cartesian2} [right] The second Cartesian.
* @returns {boolean} true if left and right are equal, false otherwise.
@@ -695,6 +656,9 @@ Cartesian2.equals = function (left, right) {
};
/**
+ * @param cartesian
+ * @param array
+ * @param offset
* @private
*/
Cartesian2.equalsArray = function (cartesian, array, offset) {
@@ -705,7 +669,6 @@ Cartesian2.equalsArray = function (cartesian, array, offset) {
* Compares the provided Cartesians componentwise and returns
* true if they pass an absolute or relative tolerance test,
* false otherwise.
- *
* @param {Cartesian2} [left] The first Cartesian.
* @param {Cartesian2} [right] The second Cartesian.
* @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.
@@ -739,7 +702,6 @@ Cartesian2.equalsEpsilon = function (
/**
* An immutable Cartesian2 instance initialized to (0.0, 0.0).
- *
* @type {Cartesian2}
* @constant
*/
@@ -747,7 +709,6 @@ Cartesian2.ZERO = Object.freeze(new Cartesian2(0.0, 0.0));
/**
* An immutable Cartesian2 instance initialized to (1.0, 1.0).
- *
* @type {Cartesian2}
* @constant
*/
@@ -755,7 +716,6 @@ Cartesian2.ONE = Object.freeze(new Cartesian2(1.0, 1.0));
/**
* An immutable Cartesian2 instance initialized to (1.0, 0.0).
- *
* @type {Cartesian2}
* @constant
*/
@@ -763,7 +723,6 @@ Cartesian2.UNIT_X = Object.freeze(new Cartesian2(1.0, 0.0));
/**
* An immutable Cartesian2 instance initialized to (0.0, 1.0).
- *
* @type {Cartesian2}
* @constant
*/
@@ -771,7 +730,6 @@ Cartesian2.UNIT_Y = Object.freeze(new Cartesian2(0.0, 1.0));
/**
* Duplicates this Cartesian2 instance.
- *
* @param {Cartesian2} [result] The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new Cartesian2 instance if one was not provided.
*/
@@ -782,7 +740,6 @@ Cartesian2.prototype.clone = function (result) {
/**
* Compares this Cartesian against the provided Cartesian componentwise and returns
* true if they are equal, false otherwise.
- *
* @param {Cartesian2} [right] The right hand side Cartesian.
* @returns {boolean} true if they are equal, false otherwise.
*/
@@ -794,7 +751,6 @@ Cartesian2.prototype.equals = function (right) {
* Compares this Cartesian against the provided Cartesian componentwise and returns
* true if they pass an absolute or relative tolerance test,
* false otherwise.
- *
* @param {Cartesian2} [right] The right hand side Cartesian.
* @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.
* @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
@@ -815,7 +771,6 @@ Cartesian2.prototype.equalsEpsilon = function (
/**
* Creates a string representing this Cartesian in the format '(x, y)'.
- *
* @returns {string} A string representing the provided Cartesian in the format '(x, y)'.
*/
Cartesian2.prototype.toString = function () {
diff --git a/packages/engine/Source/Core/Cartesian3.js b/packages/engine/Source/Core/Cartesian3.js
index 934917052da6..04c727494e84 100644
--- a/packages/engine/Source/Core/Cartesian3.js
+++ b/packages/engine/Source/Core/Cartesian3.js
@@ -7,12 +7,10 @@ import CesiumMath from "./Math.js";
/**
* A 3D Cartesian point.
* @alias Cartesian3
- * @constructor
- *
+ * @class
* @param {number} [x=0.0] The X component.
* @param {number} [y=0.0] The Y component.
* @param {number} [z=0.0] The Z component.
- *
* @see Cartesian2
* @see Cartesian4
* @see Packable
@@ -42,7 +40,6 @@ function Cartesian3(x, y, z) {
/**
* Converts the provided Spherical into Cartesian3 coordinates.
- *
* @param {Spherical} spherical The Spherical to be converted to Cartesian3.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if one was not provided.
@@ -68,7 +65,6 @@ Cartesian3.fromSpherical = function (spherical, result) {
/**
* Creates a Cartesian3 instance from x, y and z coordinates.
- *
* @param {number} x The x coordinate.
* @param {number} y The y coordinate.
* @param {number} z The z coordinate.
@@ -88,7 +84,6 @@ Cartesian3.fromElements = function (x, y, z, result) {
/**
* Duplicates a Cartesian3 instance.
- *
* @param {Cartesian3} cartesian The Cartesian to duplicate.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if one was not provided. (Returns undefined if cartesian is undefined)
@@ -111,7 +106,6 @@ Cartesian3.clone = function (cartesian, result) {
* Creates a Cartesian3 instance from an existing Cartesian4. This simply takes the
* x, y, and z properties of the Cartesian4 and drops w.
* @function
- *
* @param {Cartesian4} cartesian The Cartesian4 instance to create a Cartesian3 instance from.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if one was not provided.
@@ -126,11 +120,9 @@ Cartesian3.packedLength = 3;
/**
* Stores the provided instance into the provided array.
- *
* @param {Cartesian3} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
Cartesian3.pack = function (value, array, startingIndex) {
@@ -150,7 +142,6 @@ Cartesian3.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {Cartesian3} [result] The object into which to store the result.
@@ -174,7 +165,6 @@ Cartesian3.unpack = function (array, startingIndex, result) {
/**
* Flattens an array of Cartesian3s into an array of components.
- *
* @param {Cartesian3[]} array The array of cartesians to pack.
* @param {number[]} [result] The array onto which to store the result. If this is a typed array, it must have array.length * 3 components, else a {@link DeveloperError} will be thrown. If it is a regular array, it will be resized to have (array.length * 3) elements.
* @returns {number[]} The packed array.
@@ -206,7 +196,6 @@ Cartesian3.packArray = function (array, result) {
/**
* Unpacks an array of cartesian components into an array of Cartesian3s.
- *
* @param {number[]} array The array of components to unpack.
* @param {Cartesian3[]} [result] The array onto which to store the result.
* @returns {Cartesian3[]} The unpacked array.
@@ -237,12 +226,10 @@ Cartesian3.unpackArray = function (array, result) {
/**
* Creates a Cartesian3 from three consecutive elements in an array.
* @function
- *
* @param {number[]} array The array whose three consecutive elements correspond to the x, y, and z components, respectively.
* @param {number} [startingIndex=0] The offset into the array of the first element, which corresponds to the x component.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if one was not provided.
- *
* @example
* // Create a Cartesian3 with (1.0, 2.0, 3.0)
* const v = [1.0, 2.0, 3.0];
@@ -256,7 +243,6 @@ Cartesian3.fromArray = Cartesian3.unpack;
/**
* Computes the value of the maximum component for the supplied Cartesian.
- *
* @param {Cartesian3} cartesian The cartesian to use.
* @returns {number} The value of the maximum component.
*/
@@ -270,7 +256,6 @@ Cartesian3.maximumComponent = function (cartesian) {
/**
* Computes the value of the minimum component for the supplied Cartesian.
- *
* @param {Cartesian3} cartesian The cartesian to use.
* @returns {number} The value of the minimum component.
*/
@@ -284,7 +269,6 @@ Cartesian3.minimumComponent = function (cartesian) {
/**
* Compares two Cartesians and computes a Cartesian which contains the minimum components of the supplied Cartesians.
- *
* @param {Cartesian3} first A cartesian to compare.
* @param {Cartesian3} second A cartesian to compare.
* @param {Cartesian3} result The object into which to store the result.
@@ -306,7 +290,6 @@ Cartesian3.minimumByComponent = function (first, second, result) {
/**
* Compares two Cartesians and computes a Cartesian which contains the maximum components of the supplied Cartesians.
- *
* @param {Cartesian3} first A cartesian to compare.
* @param {Cartesian3} second A cartesian to compare.
* @param {Cartesian3} result The object into which to store the result.
@@ -327,8 +310,8 @@ Cartesian3.maximumByComponent = function (first, second, result) {
/**
* Constrain a value to lie between two values.
- *
* @param {Cartesian3} cartesian The value to clamp.
+ * @param value
* @param {Cartesian3} min The minimum bound.
* @param {Cartesian3} max The maximum bound.
* @param {Cartesian3} result The object into which to store the result.
@@ -355,7 +338,6 @@ Cartesian3.clamp = function (value, min, max, result) {
/**
* Computes the provided Cartesian's squared magnitude.
- *
* @param {Cartesian3} cartesian The Cartesian instance whose squared magnitude is to be computed.
* @returns {number} The squared magnitude.
*/
@@ -373,7 +355,6 @@ Cartesian3.magnitudeSquared = function (cartesian) {
/**
* Computes the Cartesian's magnitude (length).
- *
* @param {Cartesian3} cartesian The Cartesian instance whose magnitude is to be computed.
* @returns {number} The magnitude.
*/
@@ -385,11 +366,9 @@ const distanceScratch = new Cartesian3();
/**
* Computes the distance between two points.
- *
* @param {Cartesian3} left The first point to compute the distance from.
* @param {Cartesian3} right The second point to compute the distance to.
* @returns {number} The distance between two points.
- *
* @example
* // Returns 1.0
* const d = Cesium.Cartesian3.distance(new Cesium.Cartesian3(1.0, 0.0, 0.0), new Cesium.Cartesian3(2.0, 0.0, 0.0));
@@ -407,11 +386,9 @@ Cartesian3.distance = function (left, right) {
/**
* Computes the squared distance between two points. Comparing squared distances
* using this function is more efficient than comparing distances using {@link Cartesian3#distance}.
- *
* @param {Cartesian3} left The first point to compute the distance from.
* @param {Cartesian3} right The second point to compute the distance to.
* @returns {number} The distance between two points.
- *
* @example
* // Returns 4.0, not 2.0
* const d = Cesium.Cartesian3.distanceSquared(new Cesium.Cartesian3(1.0, 0.0, 0.0), new Cesium.Cartesian3(3.0, 0.0, 0.0));
@@ -428,7 +405,6 @@ Cartesian3.distanceSquared = function (left, right) {
/**
* Computes the normalized form of the supplied Cartesian.
- *
* @param {Cartesian3} cartesian The Cartesian to be normalized.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
@@ -456,7 +432,6 @@ Cartesian3.normalize = function (cartesian, result) {
/**
* Computes the dot (scalar) product of two Cartesians.
- *
* @param {Cartesian3} left The first Cartesian.
* @param {Cartesian3} right The second Cartesian.
* @returns {number} The dot product.
@@ -472,7 +447,6 @@ Cartesian3.dot = function (left, right) {
/**
* Computes the componentwise product of two Cartesians.
- *
* @param {Cartesian3} left The first Cartesian.
* @param {Cartesian3} right The second Cartesian.
* @param {Cartesian3} result The object onto which to store the result.
@@ -493,7 +467,6 @@ Cartesian3.multiplyComponents = function (left, right, result) {
/**
* Computes the componentwise quotient of two Cartesians.
- *
* @param {Cartesian3} left The first Cartesian.
* @param {Cartesian3} right The second Cartesian.
* @param {Cartesian3} result The object onto which to store the result.
@@ -514,7 +487,6 @@ Cartesian3.divideComponents = function (left, right, result) {
/**
* Computes the componentwise sum of two Cartesians.
- *
* @param {Cartesian3} left The first Cartesian.
* @param {Cartesian3} right The second Cartesian.
* @param {Cartesian3} result The object onto which to store the result.
@@ -535,7 +507,6 @@ Cartesian3.add = function (left, right, result) {
/**
* Computes the componentwise difference of two Cartesians.
- *
* @param {Cartesian3} left The first Cartesian.
* @param {Cartesian3} right The second Cartesian.
* @param {Cartesian3} result The object onto which to store the result.
@@ -556,7 +527,6 @@ Cartesian3.subtract = function (left, right, result) {
/**
* Multiplies the provided Cartesian componentwise by the provided scalar.
- *
* @param {Cartesian3} cartesian The Cartesian to be scaled.
* @param {number} scalar The scalar to multiply with.
* @param {Cartesian3} result The object onto which to store the result.
@@ -577,7 +547,6 @@ Cartesian3.multiplyByScalar = function (cartesian, scalar, result) {
/**
* Divides the provided Cartesian componentwise by the provided scalar.
- *
* @param {Cartesian3} cartesian The Cartesian to be divided.
* @param {number} scalar The scalar to divide by.
* @param {Cartesian3} result The object onto which to store the result.
@@ -598,7 +567,6 @@ Cartesian3.divideByScalar = function (cartesian, scalar, result) {
/**
* Negates the provided Cartesian.
- *
* @param {Cartesian3} cartesian The Cartesian to be negated.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
@@ -617,7 +585,6 @@ Cartesian3.negate = function (cartesian, result) {
/**
* Computes the absolute value of the provided Cartesian.
- *
* @param {Cartesian3} cartesian The Cartesian whose absolute value is to be computed.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
@@ -637,7 +604,6 @@ Cartesian3.abs = function (cartesian, result) {
const lerpScratch = new Cartesian3();
/**
* Computes the linear interpolation or extrapolation at t using the provided cartesians.
- *
* @param {Cartesian3} start The value corresponding to t at 0.0.
* @param {Cartesian3} end The value corresponding to t at 1.0.
* @param {number} t The point along t at which to interpolate.
@@ -661,7 +627,6 @@ const angleBetweenScratch = new Cartesian3();
const angleBetweenScratch2 = new Cartesian3();
/**
* Returns the angle, in radians, between the provided Cartesians.
- *
* @param {Cartesian3} left The first Cartesian.
* @param {Cartesian3} right The second Cartesian.
* @returns {number} The angle between the Cartesians.
@@ -688,7 +653,6 @@ Cartesian3.angleBetween = function (left, right) {
const mostOrthogonalAxisScratch = new Cartesian3();
/**
* Returns the axis that is most orthogonal to the provided Cartesian.
- *
* @param {Cartesian3} cartesian The Cartesian on which to find the most orthogonal axis.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The most orthogonal axis.
@@ -738,7 +702,6 @@ Cartesian3.projectVector = function (a, b, result) {
/**
* Compares the provided Cartesians componentwise and returns
* true if they are equal, false otherwise.
- *
* @param {Cartesian3} [left] The first Cartesian.
* @param {Cartesian3} [right] The second Cartesian.
* @returns {boolean} true if left and right are equal, false otherwise.
@@ -755,6 +718,9 @@ Cartesian3.equals = function (left, right) {
};
/**
+ * @param cartesian
+ * @param array
+ * @param offset
* @private
*/
Cartesian3.equalsArray = function (cartesian, array, offset) {
@@ -769,7 +735,6 @@ Cartesian3.equalsArray = function (cartesian, array, offset) {
* Compares the provided Cartesians componentwise and returns
* true if they pass an absolute or relative tolerance test,
* false otherwise.
- *
* @param {Cartesian3} [left] The first Cartesian.
* @param {Cartesian3} [right] The second Cartesian.
* @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.
@@ -809,7 +774,6 @@ Cartesian3.equalsEpsilon = function (
/**
* Computes the cross (outer) product of two Cartesians.
- *
* @param {Cartesian3} left The first Cartesian.
* @param {Cartesian3} right The second Cartesian.
* @param {Cartesian3} result The object onto which to store the result.
@@ -862,14 +826,12 @@ Cartesian3.midpoint = function (left, right, result) {
/**
* Returns a Cartesian3 position from longitude and latitude values given in degrees.
- *
* @param {number} longitude The longitude, in degrees
* @param {number} latitude The latitude, in degrees
* @param {number} [height=0.0] The height, in meters, above the ellipsoid.
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the position lies.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The position
- *
* @example
* const position = Cesium.Cartesian3.fromDegrees(-115.0, 37.0);
*/
@@ -900,14 +862,12 @@ const wgs84RadiiSquared = new Cartesian3(
/**
* Returns a Cartesian3 position from longitude and latitude values given in radians.
- *
* @param {number} longitude The longitude, in radians
* @param {number} latitude The latitude, in radians
* @param {number} [height=0.0] The height, in meters, above the ellipsoid.
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the position lies.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The position
- *
* @example
* const position = Cesium.Cartesian3.fromRadians(-2.007, 0.645);
*/
@@ -947,12 +907,10 @@ Cartesian3.fromRadians = function (
/**
* Returns an array of Cartesian3 positions given an array of longitude and latitude values given in degrees.
- *
* @param {number[]} coordinates A list of longitude and latitude values. Values alternate [longitude, latitude, longitude, latitude...].
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the coordinates lie.
* @param {Cartesian3[]} [result] An array of Cartesian3 objects to store the result.
* @returns {Cartesian3[]} The array of positions.
- *
* @example
* const positions = Cesium.Cartesian3.fromDegreesArray([-115.0, 37.0, -107.0, 33.0]);
*/
@@ -991,12 +949,10 @@ Cartesian3.fromDegreesArray = function (coordinates, ellipsoid, result) {
/**
* Returns an array of Cartesian3 positions given an array of longitude and latitude values given in radians.
- *
* @param {number[]} coordinates A list of longitude and latitude values. Values alternate [longitude, latitude, longitude, latitude...].
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the coordinates lie.
* @param {Cartesian3[]} [result] An array of Cartesian3 objects to store the result.
* @returns {Cartesian3[]} The array of positions.
- *
* @example
* const positions = Cesium.Cartesian3.fromRadiansArray([-2.007, 0.645, -1.867, .575]);
*/
@@ -1035,12 +991,10 @@ Cartesian3.fromRadiansArray = function (coordinates, ellipsoid, result) {
/**
* Returns an array of Cartesian3 positions given an array of longitude, latitude and height values where longitude and latitude are given in degrees.
- *
* @param {number[]} coordinates A list of longitude, latitude and height values. Values alternate [longitude, latitude, height, longitude, latitude, height...].
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the position lies.
* @param {Cartesian3[]} [result] An array of Cartesian3 objects to store the result.
* @returns {Cartesian3[]} The array of positions.
- *
* @example
* const positions = Cesium.Cartesian3.fromDegreesArrayHeights([-115.0, 37.0, 100000.0, -107.0, 33.0, 150000.0]);
*/
@@ -1080,12 +1034,10 @@ Cartesian3.fromDegreesArrayHeights = function (coordinates, ellipsoid, result) {
/**
* Returns an array of Cartesian3 positions given an array of longitude, latitude and height values where longitude and latitude are given in radians.
- *
* @param {number[]} coordinates A list of longitude, latitude and height values. Values alternate [longitude, latitude, height, longitude, latitude, height...].
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the position lies.
* @param {Cartesian3[]} [result] An array of Cartesian3 objects to store the result.
* @returns {Cartesian3[]} The array of positions.
- *
* @example
* const positions = Cesium.Cartesian3.fromRadiansArrayHeights([-2.007, 0.645, 100000.0, -1.867, .575, 150000.0]);
*/
@@ -1125,7 +1077,6 @@ Cartesian3.fromRadiansArrayHeights = function (coordinates, ellipsoid, result) {
/**
* An immutable Cartesian3 instance initialized to (0.0, 0.0, 0.0).
- *
* @type {Cartesian3}
* @constant
*/
@@ -1133,7 +1084,6 @@ Cartesian3.ZERO = Object.freeze(new Cartesian3(0.0, 0.0, 0.0));
/**
* An immutable Cartesian3 instance initialized to (1.0, 1.0, 1.0).
- *
* @type {Cartesian3}
* @constant
*/
@@ -1141,7 +1091,6 @@ Cartesian3.ONE = Object.freeze(new Cartesian3(1.0, 1.0, 1.0));
/**
* An immutable Cartesian3 instance initialized to (1.0, 0.0, 0.0).
- *
* @type {Cartesian3}
* @constant
*/
@@ -1149,7 +1098,6 @@ Cartesian3.UNIT_X = Object.freeze(new Cartesian3(1.0, 0.0, 0.0));
/**
* An immutable Cartesian3 instance initialized to (0.0, 1.0, 0.0).
- *
* @type {Cartesian3}
* @constant
*/
@@ -1157,7 +1105,6 @@ Cartesian3.UNIT_Y = Object.freeze(new Cartesian3(0.0, 1.0, 0.0));
/**
* An immutable Cartesian3 instance initialized to (0.0, 0.0, 1.0).
- *
* @type {Cartesian3}
* @constant
*/
@@ -1165,7 +1112,6 @@ Cartesian3.UNIT_Z = Object.freeze(new Cartesian3(0.0, 0.0, 1.0));
/**
* Duplicates this Cartesian3 instance.
- *
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if one was not provided.
*/
@@ -1176,7 +1122,6 @@ Cartesian3.prototype.clone = function (result) {
/**
* Compares this Cartesian against the provided Cartesian componentwise and returns
* true if they are equal, false otherwise.
- *
* @param {Cartesian3} [right] The right hand side Cartesian.
* @returns {boolean} true if they are equal, false otherwise.
*/
@@ -1188,7 +1133,6 @@ Cartesian3.prototype.equals = function (right) {
* Compares this Cartesian against the provided Cartesian componentwise and returns
* true if they pass an absolute or relative tolerance test,
* false otherwise.
- *
* @param {Cartesian3} [right] The right hand side Cartesian.
* @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.
* @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
@@ -1209,7 +1153,6 @@ Cartesian3.prototype.equalsEpsilon = function (
/**
* Creates a string representing this Cartesian in the format '(x, y, z)'.
- *
* @returns {string} A string representing this Cartesian in the format '(x, y, z)'.
*/
Cartesian3.prototype.toString = function () {
diff --git a/packages/engine/Source/Core/Cartesian4.js b/packages/engine/Source/Core/Cartesian4.js
index fa841cc9b2aa..8e59aaca83f9 100644
--- a/packages/engine/Source/Core/Cartesian4.js
+++ b/packages/engine/Source/Core/Cartesian4.js
@@ -7,13 +7,11 @@ import CesiumMath from "./Math.js";
/**
* A 4D Cartesian point.
* @alias Cartesian4
- * @constructor
- *
+ * @class
* @param {number} [x=0.0] The X component.
* @param {number} [y=0.0] The Y component.
* @param {number} [z=0.0] The Z component.
* @param {number} [w=0.0] The W component.
- *
* @see Cartesian2
* @see Cartesian3
* @see Packable
@@ -50,7 +48,6 @@ function Cartesian4(x, y, z, w) {
/**
* Creates a Cartesian4 instance from x, y, z and w coordinates.
- *
* @param {number} x The x coordinate.
* @param {number} y The y coordinate.
* @param {number} z The z coordinate.
@@ -73,7 +70,6 @@ Cartesian4.fromElements = function (x, y, z, w, result) {
/**
* Creates a Cartesian4 instance from a {@link Color}. red, green, blue,
* and alpha map to x, y, z, and w, respectively.
- *
* @param {Color} color The source color.
* @param {Cartesian4} [result] The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided.
@@ -95,7 +91,6 @@ Cartesian4.fromColor = function (color, result) {
/**
* Duplicates a Cartesian4 instance.
- *
* @param {Cartesian4} cartesian The Cartesian to duplicate.
* @param {Cartesian4} [result] The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided. (Returns undefined if cartesian is undefined)
@@ -124,11 +119,9 @@ Cartesian4.packedLength = 4;
/**
* Stores the provided instance into the provided array.
- *
* @param {Cartesian4} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
Cartesian4.pack = function (value, array, startingIndex) {
@@ -149,7 +142,6 @@ Cartesian4.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {Cartesian4} [result] The object into which to store the result.
@@ -174,7 +166,6 @@ Cartesian4.unpack = function (array, startingIndex, result) {
/**
* Flattens an array of Cartesian4s into an array of components.
- *
* @param {Cartesian4[]} array The array of cartesians to pack.
* @param {number[]} [result] The array onto which to store the result. If this is a typed array, it must have array.length * 4 components, else a {@link DeveloperError} will be thrown. If it is a regular array, it will be resized to have (array.length * 4) elements.
* @returns {number[]} The packed array.
@@ -206,7 +197,6 @@ Cartesian4.packArray = function (array, result) {
/**
* Unpacks an array of cartesian components into an array of Cartesian4s.
- *
* @param {number[]} array The array of components to unpack.
* @param {Cartesian4[]} [result] The array onto which to store the result.
* @returns {Cartesian4[]} The unpacked array.
@@ -237,12 +227,10 @@ Cartesian4.unpackArray = function (array, result) {
/**
* Creates a Cartesian4 from four consecutive elements in an array.
* @function
- *
* @param {number[]} array The array whose four consecutive elements correspond to the x, y, z, and w components, respectively.
* @param {number} [startingIndex=0] The offset into the array of the first element, which corresponds to the x component.
* @param {Cartesian4} [result] The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided.
- *
* @example
* // Create a Cartesian4 with (1.0, 2.0, 3.0, 4.0)
* const v = [1.0, 2.0, 3.0, 4.0];
@@ -256,7 +244,6 @@ Cartesian4.fromArray = Cartesian4.unpack;
/**
* Computes the value of the maximum component for the supplied Cartesian.
- *
* @param {Cartesian4} cartesian The cartesian to use.
* @returns {number} The value of the maximum component.
*/
@@ -270,7 +257,6 @@ Cartesian4.maximumComponent = function (cartesian) {
/**
* Computes the value of the minimum component for the supplied Cartesian.
- *
* @param {Cartesian4} cartesian The cartesian to use.
* @returns {number} The value of the minimum component.
*/
@@ -284,7 +270,6 @@ Cartesian4.minimumComponent = function (cartesian) {
/**
* Compares two Cartesians and computes a Cartesian which contains the minimum components of the supplied Cartesians.
- *
* @param {Cartesian4} first A cartesian to compare.
* @param {Cartesian4} second A cartesian to compare.
* @param {Cartesian4} result The object into which to store the result.
@@ -307,7 +292,6 @@ Cartesian4.minimumByComponent = function (first, second, result) {
/**
* Compares two Cartesians and computes a Cartesian which contains the maximum components of the supplied Cartesians.
- *
* @param {Cartesian4} first A cartesian to compare.
* @param {Cartesian4} second A cartesian to compare.
* @param {Cartesian4} result The object into which to store the result.
@@ -330,7 +314,6 @@ Cartesian4.maximumByComponent = function (first, second, result) {
/**
* Constrain a value to lie between two values.
- *
* @param {Cartesian4} value The value to clamp.
* @param {Cartesian4} min The minimum bound.
* @param {Cartesian4} max The maximum bound.
@@ -360,7 +343,6 @@ Cartesian4.clamp = function (value, min, max, result) {
/**
* Computes the provided Cartesian's squared magnitude.
- *
* @param {Cartesian4} cartesian The Cartesian instance whose squared magnitude is to be computed.
* @returns {number} The squared magnitude.
*/
@@ -379,7 +361,6 @@ Cartesian4.magnitudeSquared = function (cartesian) {
/**
* Computes the Cartesian's magnitude (length).
- *
* @param {Cartesian4} cartesian The Cartesian instance whose magnitude is to be computed.
* @returns {number} The magnitude.
*/
@@ -391,11 +372,9 @@ const distanceScratch = new Cartesian4();
/**
* Computes the 4-space distance between two points.
- *
* @param {Cartesian4} left The first point to compute the distance from.
* @param {Cartesian4} right The second point to compute the distance to.
* @returns {number} The distance between two points.
- *
* @example
* // Returns 1.0
* const d = Cesium.Cartesian4.distance(
@@ -415,11 +394,9 @@ Cartesian4.distance = function (left, right) {
/**
* Computes the squared distance between two points. Comparing squared distances
* using this function is more efficient than comparing distances using {@link Cartesian4#distance}.
- *
* @param {Cartesian4} left The first point to compute the distance from.
* @param {Cartesian4} right The second point to compute the distance to.
* @returns {number} The distance between two points.
- *
* @example
* // Returns 4.0, not 2.0
* const d = Cesium.Cartesian4.distance(
@@ -438,7 +415,6 @@ Cartesian4.distanceSquared = function (left, right) {
/**
* Computes the normalized form of the supplied Cartesian.
- *
* @param {Cartesian4} cartesian The Cartesian to be normalized.
* @param {Cartesian4} result The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter.
@@ -472,7 +448,6 @@ Cartesian4.normalize = function (cartesian, result) {
/**
* Computes the dot (scalar) product of two Cartesians.
- *
* @param {Cartesian4} left The first Cartesian.
* @param {Cartesian4} right The second Cartesian.
* @returns {number} The dot product.
@@ -490,7 +465,6 @@ Cartesian4.dot = function (left, right) {
/**
* Computes the componentwise product of two Cartesians.
- *
* @param {Cartesian4} left The first Cartesian.
* @param {Cartesian4} right The second Cartesian.
* @param {Cartesian4} result The object onto which to store the result.
@@ -512,7 +486,6 @@ Cartesian4.multiplyComponents = function (left, right, result) {
/**
* Computes the componentwise quotient of two Cartesians.
- *
* @param {Cartesian4} left The first Cartesian.
* @param {Cartesian4} right The second Cartesian.
* @param {Cartesian4} result The object onto which to store the result.
@@ -534,7 +507,6 @@ Cartesian4.divideComponents = function (left, right, result) {
/**
* Computes the componentwise sum of two Cartesians.
- *
* @param {Cartesian4} left The first Cartesian.
* @param {Cartesian4} right The second Cartesian.
* @param {Cartesian4} result The object onto which to store the result.
@@ -556,7 +528,6 @@ Cartesian4.add = function (left, right, result) {
/**
* Computes the componentwise difference of two Cartesians.
- *
* @param {Cartesian4} left The first Cartesian.
* @param {Cartesian4} right The second Cartesian.
* @param {Cartesian4} result The object onto which to store the result.
@@ -578,7 +549,6 @@ Cartesian4.subtract = function (left, right, result) {
/**
* Multiplies the provided Cartesian componentwise by the provided scalar.
- *
* @param {Cartesian4} cartesian The Cartesian to be scaled.
* @param {number} scalar The scalar to multiply with.
* @param {Cartesian4} result The object onto which to store the result.
@@ -600,7 +570,6 @@ Cartesian4.multiplyByScalar = function (cartesian, scalar, result) {
/**
* Divides the provided Cartesian componentwise by the provided scalar.
- *
* @param {Cartesian4} cartesian The Cartesian to be divided.
* @param {number} scalar The scalar to divide by.
* @param {Cartesian4} result The object onto which to store the result.
@@ -622,7 +591,6 @@ Cartesian4.divideByScalar = function (cartesian, scalar, result) {
/**
* Negates the provided Cartesian.
- *
* @param {Cartesian4} cartesian The Cartesian to be negated.
* @param {Cartesian4} result The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter.
@@ -642,7 +610,6 @@ Cartesian4.negate = function (cartesian, result) {
/**
* Computes the absolute value of the provided Cartesian.
- *
* @param {Cartesian4} cartesian The Cartesian whose absolute value is to be computed.
* @param {Cartesian4} result The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter.
@@ -663,7 +630,6 @@ Cartesian4.abs = function (cartesian, result) {
const lerpScratch = new Cartesian4();
/**
* Computes the linear interpolation or extrapolation at t using the provided cartesians.
- *
* @param {Cartesian4} start The value corresponding to t at 0.0.
* @param {Cartesian4}end The value corresponding to t at 1.0.
* @param {number} t The point along t at which to interpolate.
@@ -686,7 +652,6 @@ Cartesian4.lerp = function (start, end, t, result) {
const mostOrthogonalAxisScratch = new Cartesian4();
/**
* Returns the axis that is most orthogonal to the provided Cartesian.
- *
* @param {Cartesian4} cartesian The Cartesian on which to find the most orthogonal axis.
* @param {Cartesian4} result The object onto which to store the result.
* @returns {Cartesian4} The most orthogonal axis.
@@ -730,7 +695,6 @@ Cartesian4.mostOrthogonalAxis = function (cartesian, result) {
/**
* Compares the provided Cartesians componentwise and returns
* true if they are equal, false otherwise.
- *
* @param {Cartesian4} [left] The first Cartesian.
* @param {Cartesian4} [right] The second Cartesian.
* @returns {boolean} true if left and right are equal, false otherwise.
@@ -748,6 +712,9 @@ Cartesian4.equals = function (left, right) {
};
/**
+ * @param cartesian
+ * @param array
+ * @param offset
* @private
*/
Cartesian4.equalsArray = function (cartesian, array, offset) {
@@ -763,7 +730,6 @@ Cartesian4.equalsArray = function (cartesian, array, offset) {
* Compares the provided Cartesians componentwise and returns
* true if they pass an absolute or relative tolerance test,
* false otherwise.
- *
* @param {Cartesian4} [left] The first Cartesian.
* @param {Cartesian4} [right] The second Cartesian.
* @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.
@@ -809,7 +775,6 @@ Cartesian4.equalsEpsilon = function (
/**
* An immutable Cartesian4 instance initialized to (0.0, 0.0, 0.0, 0.0).
- *
* @type {Cartesian4}
* @constant
*/
@@ -817,7 +782,6 @@ Cartesian4.ZERO = Object.freeze(new Cartesian4(0.0, 0.0, 0.0, 0.0));
/**
* An immutable Cartesian4 instance initialized to (1.0, 1.0, 1.0, 1.0).
- *
* @type {Cartesian4}
* @constant
*/
@@ -825,7 +789,6 @@ Cartesian4.ONE = Object.freeze(new Cartesian4(1.0, 1.0, 1.0, 1.0));
/**
* An immutable Cartesian4 instance initialized to (1.0, 0.0, 0.0, 0.0).
- *
* @type {Cartesian4}
* @constant
*/
@@ -833,7 +796,6 @@ Cartesian4.UNIT_X = Object.freeze(new Cartesian4(1.0, 0.0, 0.0, 0.0));
/**
* An immutable Cartesian4 instance initialized to (0.0, 1.0, 0.0, 0.0).
- *
* @type {Cartesian4}
* @constant
*/
@@ -841,7 +803,6 @@ Cartesian4.UNIT_Y = Object.freeze(new Cartesian4(0.0, 1.0, 0.0, 0.0));
/**
* An immutable Cartesian4 instance initialized to (0.0, 0.0, 1.0, 0.0).
- *
* @type {Cartesian4}
* @constant
*/
@@ -849,7 +810,6 @@ Cartesian4.UNIT_Z = Object.freeze(new Cartesian4(0.0, 0.0, 1.0, 0.0));
/**
* An immutable Cartesian4 instance initialized to (0.0, 0.0, 0.0, 1.0).
- *
* @type {Cartesian4}
* @constant
*/
@@ -857,7 +817,6 @@ Cartesian4.UNIT_W = Object.freeze(new Cartesian4(0.0, 0.0, 0.0, 1.0));
/**
* Duplicates this Cartesian4 instance.
- *
* @param {Cartesian4} [result] The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided.
*/
@@ -868,7 +827,6 @@ Cartesian4.prototype.clone = function (result) {
/**
* Compares this Cartesian against the provided Cartesian componentwise and returns
* true if they are equal, false otherwise.
- *
* @param {Cartesian4} [right] The right hand side Cartesian.
* @returns {boolean} true if they are equal, false otherwise.
*/
@@ -880,7 +838,6 @@ Cartesian4.prototype.equals = function (right) {
* Compares this Cartesian against the provided Cartesian componentwise and returns
* true if they pass an absolute or relative tolerance test,
* false otherwise.
- *
* @param {Cartesian4} [right] The right hand side Cartesian.
* @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.
* @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
@@ -901,7 +858,6 @@ Cartesian4.prototype.equalsEpsilon = function (
/**
* Creates a string representing this Cartesian in the format '(x, y, z, w)'.
- *
* @returns {string} A string representing the provided Cartesian in the format '(x, y, z, w)'.
*/
Cartesian4.prototype.toString = function () {
@@ -918,7 +874,6 @@ const littleEndian = testU8[0] === 0x44;
/**
* Packs an arbitrary floating point value to 4 values representable using uint8.
- *
* @param {number} value A floating point number.
* @param {Cartesian4} [result] The Cartesian4 that will contain the packed float.
* @returns {Cartesian4} A Cartesian4 representing the float packed to values in x, y, z, and w.
@@ -952,7 +907,6 @@ Cartesian4.packFloat = function (value, result) {
/**
* Unpacks a float packed using Cartesian4.packFloat.
- *
* @param {Cartesian4} packedFloat A Cartesian4 containing a float packed to 4 values representable using uint8.
* @returns {number} The unpacked float.
* @private
diff --git a/packages/engine/Source/Core/Cartographic.js b/packages/engine/Source/Core/Cartographic.js
index 87957c75bdce..5e4ff5add0dc 100644
--- a/packages/engine/Source/Core/Cartographic.js
+++ b/packages/engine/Source/Core/Cartographic.js
@@ -8,12 +8,10 @@ import scaleToGeodeticSurface from "./scaleToGeodeticSurface.js";
/**
* A position defined by longitude, latitude, and height.
* @alias Cartographic
- * @constructor
- *
+ * @class
* @param {number} [longitude=0.0] The longitude, in radians.
* @param {number} [latitude=0.0] The latitude, in radians.
* @param {number} [height=0.0] The height, in meters, above the ellipsoid.
- *
* @see Ellipsoid
*/
function Cartographic(longitude, latitude, height) {
@@ -42,7 +40,6 @@ function Cartographic(longitude, latitude, height) {
/**
* Creates a new Cartographic instance from longitude and latitude
* specified in radians.
- *
* @param {number} longitude The longitude, in radians.
* @param {number} latitude The latitude, in radians.
* @param {number} [height=0.0] The height, in meters, above the ellipsoid.
@@ -71,7 +68,6 @@ Cartographic.fromRadians = function (longitude, latitude, height, result) {
* Creates a new Cartographic instance from longitude and latitude
* specified in degrees. The values in the resulting object will
* be in radians.
- *
* @param {number} longitude The longitude, in degrees.
* @param {number} latitude The latitude, in degrees.
* @param {number} [height=0.0] The height, in meters, above the ellipsoid.
@@ -107,7 +103,6 @@ const wgs84CenterToleranceSquared = CesiumMath.EPSILON1;
/**
* Creates a new Cartographic instance from a Cartesian position. The values in the
* resulting object will be in radians.
- *
* @param {Cartesian3} cartesian The Cartesian position to convert to cartographic representation.
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the position lies.
* @param {Cartographic} [result] The object onto which to store the result.
@@ -163,7 +158,6 @@ Cartographic.fromCartesian = function (cartesian, ellipsoid, result) {
/**
* Creates a new Cartesian3 instance from a Cartographic input. The values in the inputted
* object should be in radians.
- *
* @param {Cartographic} cartographic Input to be converted into a Cartesian3 output.
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the position lies.
* @param {Cartesian3} [result] The object onto which to store the result.
@@ -185,7 +179,6 @@ Cartographic.toCartesian = function (cartographic, ellipsoid, result) {
/**
* Duplicates a Cartographic instance.
- *
* @param {Cartographic} cartographic The cartographic to duplicate.
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if one was not provided. (Returns undefined if cartographic is undefined)
@@ -210,7 +203,6 @@ Cartographic.clone = function (cartographic, result) {
/**
* Compares the provided cartographics componentwise and returns
* true if they are equal, false otherwise.
- *
* @param {Cartographic} [left] The first cartographic.
* @param {Cartographic} [right] The second cartographic.
* @returns {boolean} true if left and right are equal, false otherwise.
@@ -230,7 +222,6 @@ Cartographic.equals = function (left, right) {
* Compares the provided cartographics componentwise and returns
* true if they are within the provided epsilon,
* false otherwise.
- *
* @param {Cartographic} [left] The first cartographic.
* @param {Cartographic} [right] The second cartographic.
* @param {number} [epsilon=0] The epsilon to use for equality testing.
@@ -251,7 +242,6 @@ Cartographic.equalsEpsilon = function (left, right, epsilon) {
/**
* An immutable Cartographic instance initialized to (0.0, 0.0, 0.0).
- *
* @type {Cartographic}
* @constant
*/
@@ -259,7 +249,6 @@ Cartographic.ZERO = Object.freeze(new Cartographic(0.0, 0.0, 0.0));
/**
* Duplicates this instance.
- *
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if one was not provided.
*/
@@ -270,7 +259,6 @@ Cartographic.prototype.clone = function (result) {
/**
* Compares the provided against this cartographic componentwise and returns
* true if they are equal, false otherwise.
- *
* @param {Cartographic} [right] The second cartographic.
* @returns {boolean} true if left and right are equal, false otherwise.
*/
@@ -282,7 +270,6 @@ Cartographic.prototype.equals = function (right) {
* Compares the provided against this cartographic componentwise and returns
* true if they are within the provided epsilon,
* false otherwise.
- *
* @param {Cartographic} [right] The second cartographic.
* @param {number} [epsilon=0] The epsilon to use for equality testing.
* @returns {boolean} true if left and right are within the provided epsilon, false otherwise.
@@ -293,7 +280,6 @@ Cartographic.prototype.equalsEpsilon = function (right, epsilon) {
/**
* Creates a string representing this cartographic in the format '(longitude, latitude, height)'.
- *
* @returns {string} A string representing the provided cartographic in the format '(longitude, latitude, height)'.
*/
Cartographic.prototype.toString = function () {
diff --git a/packages/engine/Source/Core/CartographicGeocoderService.js b/packages/engine/Source/Core/CartographicGeocoderService.js
index 149edc6270c7..a146d9541227 100644
--- a/packages/engine/Source/Core/CartographicGeocoderService.js
+++ b/packages/engine/Source/Core/CartographicGeocoderService.js
@@ -4,9 +4,8 @@ import Check from "./Check.js";
/**
* Geocodes queries containing longitude and latitude coordinates and an optional height.
* Query format: `longitude latitude (height)` with longitude/latitude in degrees and height in meters.
- *
* @alias CartographicGeocoderService
- * @constructor
+ * @class
*/
function CartographicGeocoderService() {}
@@ -27,7 +26,6 @@ Object.defineProperties(CartographicGeocoderService.prototype, {
/**
* @function
- *
* @param {string} query The query to be sent to the geocoder service
* @returns {Promise}
*/
diff --git a/packages/engine/Source/Core/CatmullRomSpline.js b/packages/engine/Source/Core/CatmullRomSpline.js
index 8f7c4ea6d9f2..017d44880006 100644
--- a/packages/engine/Source/Core/CatmullRomSpline.js
+++ b/packages/engine/Source/Core/CatmullRomSpline.js
@@ -107,10 +107,8 @@ const lastTangentScratch = new Cartesian3();
* A Catmull-Rom spline is a cubic spline where the tangent at control points,
* except the first and last, are computed using the previous and next control points.
* Catmull-Rom splines are in the class C1.
- *
* @alias CatmullRomSpline
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {number[]} options.times An array of strictly increasing, unit-less, floating-point times at each point.
* The values are in no way connected to the clock time. They are the parameterization for the curve.
@@ -119,11 +117,8 @@ const lastTangentScratch = new Cartesian3();
* If the tangent is not given, it will be estimated.
* @param {Cartesian3} [options.lastTangent] The tangent of the curve at the last control point.
* If the tangent is not given, it will be estimated.
- *
- * @exception {DeveloperError} points.length must be greater than or equal to 2.
- * @exception {DeveloperError} times.length must be equal to points.length.
- *
- *
+ * @throws {DeveloperError} points.length must be greater than or equal to 2.
+ * @throws {DeveloperError} times.length must be equal to points.length.
* @example
* // spline above the earth from Philadelphia to Los Angeles
* const spline = new Cesium.CatmullRomSpline({
@@ -139,7 +134,6 @@ const lastTangentScratch = new Cartesian3();
*
* const p0 = spline.evaluate(times[i]); // equal to positions[i]
* const p1 = spline.evaluate(times[i] + delta); // interpolated value when delta < times[i + 1] - times[i]
- *
* @see ConstantSpline
* @see SteppedSpline
* @see HermiteSpline
@@ -198,9 +192,7 @@ function CatmullRomSpline(options) {
Object.defineProperties(CatmullRomSpline.prototype, {
/**
* An array of times for the control points.
- *
* @memberof CatmullRomSpline.prototype
- *
* @type {number[]}
* @readonly
*/
@@ -212,9 +204,7 @@ Object.defineProperties(CatmullRomSpline.prototype, {
/**
* An array of {@link Cartesian3} control points.
- *
* @memberof CatmullRomSpline.prototype
- *
* @type {Cartesian3[]}
* @readonly
*/
@@ -226,9 +216,7 @@ Object.defineProperties(CatmullRomSpline.prototype, {
/**
* The tangent at the first control point.
- *
* @memberof CatmullRomSpline.prototype
- *
* @type {Cartesian3}
* @readonly
*/
@@ -240,9 +228,7 @@ Object.defineProperties(CatmullRomSpline.prototype, {
/**
* The tangent at the last control point.
- *
* @memberof CatmullRomSpline.prototype
- *
* @type {Cartesian3}
* @readonly
*/
@@ -279,11 +265,9 @@ CatmullRomSpline.catmullRomCoefficientMatrix = new Matrix4(
* Finds an index i in times such that the parameter
* time is in the interval [times[i], times[i + 1]].
* @function
- *
* @param {number} time The time.
* @returns {number} The index for the element at the start of the interval.
- *
- * @exception {DeveloperError} time must be in the range [t0, tn], where t0
+ * @throws {DeveloperError} time must be in the range [t0, tn], where t0
* is the first element in the array times and tn is the last element
* in the array times.
*/
@@ -292,29 +276,25 @@ CatmullRomSpline.prototype.findTimeInterval = Spline.prototype.findTimeInterval;
/**
* Wraps the given time to the period covered by the spline.
* @function
- *
* @param {number} time The time.
- * @return {number} The time, wrapped around to the updated animation.
+ * @returns {number} The time, wrapped around to the updated animation.
*/
CatmullRomSpline.prototype.wrapTime = Spline.prototype.wrapTime;
/**
* Clamps the given time to the period covered by the spline.
* @function
- *
* @param {number} time The time.
- * @return {number} The time, clamped to the animation period.
+ * @returns {number} The time, clamped to the animation period.
*/
CatmullRomSpline.prototype.clampTime = Spline.prototype.clampTime;
/**
* Evaluates the curve at a given time.
- *
* @param {number} time The time at which to evaluate the curve.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new instance of the point on the curve at the given time.
- *
- * @exception {DeveloperError} time must be in the range [t0, tn], where t0
+ * @throws {DeveloperError} time must be in the range [t0, tn], where t0
* is the first element in the array times and tn is the last element
* in the array times.
*/
diff --git a/packages/engine/Source/Core/CesiumTerrainProvider.js b/packages/engine/Source/Core/CesiumTerrainProvider.js
index c70769c02fcf..123cfb8ab2c5 100644
--- a/packages/engine/Source/Core/CesiumTerrainProvider.js
+++ b/packages/engine/Source/Core/CesiumTerrainProvider.js
@@ -41,7 +41,6 @@ function LayerInformation(layer) {
* @typedef {Object} CesiumTerrainProvider.ConstructorOptions
*
* Initialization options for the CesiumTerrainProvider constructor
- *
* @property {boolean} [requestVertexNormals=false] Flag that indicates if the client should request additional lighting information from the server, in the form of per vertex normals if available.
* @property {boolean} [requestWaterMask=false] Flag that indicates if the client should request per tile water masks from the server, if available.
* @property {boolean} [requestMetadata=true] Flag that indicates if the client should request per tile metadata from the server, if available.
@@ -51,10 +50,8 @@ function LayerInformation(layer) {
/**
* Used to track creation details while fetching initial metadata
- *
- * @constructor
+ * @class
* @private
- *
* @param {CesiumTerrainProvider.ConstructorOptions} options An object describing initialization options
*/
function TerrainProviderBuilder(options) {
@@ -86,9 +83,7 @@ function TerrainProviderBuilder(options) {
/**
* Complete CesiumTerrainProvider creation based on builder values.
- *
* @private
- *
* @param {CesiumTerrainProvider} provider
*/
TerrainProviderBuilder.prototype.build = function (provider) {
@@ -450,12 +445,9 @@ async function requestLayerJson(terrainProviderBuilder, provider) {
*
*
- *
* @alias CesiumTerrainProvider
- * @constructor
- *
+ * @class
* @param {CesiumTerrainProvider.ConstructorOptions} [options] An object describing initialization options
- *
* @example
* // Create Arctic DEM terrain with normals.
* try {
@@ -467,7 +459,6 @@ async function requestLayerJson(terrainProviderBuilder, provider) {
* } catch (error) {
* console.log(error);
* }
- *
* @see createWorldTerrain
* @see CesiumTerrainProvider.fromUrl
* @see CesiumTerrainProvider.fromIonAssetId
@@ -529,7 +520,6 @@ function CesiumTerrainProvider(options) {
/**
* When using the Quantized-Mesh format, a tile may be returned that includes additional extensions, such as PerVertexNormals, watermask, etc.
* This enumeration defines the unique identifiers for each type of extension data that has been appended to the standard mesh data.
- *
* @namespace QuantizedMeshExtensionIds
* @see CesiumTerrainProvider
* @private
@@ -537,7 +527,6 @@ function CesiumTerrainProvider(options) {
const QuantizedMeshExtensionIds = {
/**
* Oct-Encoded Per-Vertex Normals are included as an extension to the tile mesh
- *
* @type {number}
* @constant
* @default 1
@@ -545,7 +534,6 @@ const QuantizedMeshExtensionIds = {
OCT_VERTEX_NORMALS: 1,
/**
* A watermask is included as an extension to the tile mesh
- *
* @type {number}
* @constant
* @default 2
@@ -553,7 +541,6 @@ const QuantizedMeshExtensionIds = {
WATER_MASK: 2,
/**
* A json object contain metadata about the tile
- *
* @type {number}
* @constant
* @default 4
@@ -840,16 +827,13 @@ function createQuantizedMeshTerrainData(provider, buffer, level, x, y, layer) {
/**
* Requests the geometry for a given tile. The result must include terrain data and
* may optionally include a water mask and an indication of which child tiles are available.
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
* @param {Request} [request] The request object. Intended for internal use only.
- *
* @returns {Promise|undefined} A promise for the requested geometry. If this method
* returns undefined instead of a promise, it is an indication that too many requests are already
* pending and the request will be retried later.
- *
*/
CesiumTerrainProvider.prototype.requestTileGeometry = function (
x,
@@ -1144,7 +1128,6 @@ Object.defineProperties(CesiumTerrainProvider.prototype, {
/**
* Gets the maximum geometric error allowed in a tile at a given level.
- *
* @param {number} level The tile level for which to get the maximum geometric error.
* @returns {number} The maximum geometric error.
*/
@@ -1161,11 +1144,9 @@ CesiumTerrainProvider.prototype.getLevelMaximumGeometricError = function (
*
*
- *
* @param {number} assetId The Cesium ion asset id.
* @param {CesiumTerrainProvider.ConstructorOptions} [options] An object describing initialization options.
* @returns {Promise}
- *
* @example
* // Create Arctic DEM terrain with normals.
* try {
@@ -1177,12 +1158,11 @@ CesiumTerrainProvider.prototype.getLevelMaximumGeometricError = function (
* } catch (error) {
* console.log(error);
* }
- *
- * @exception {RuntimeError} layer.json does not specify a format
- * @exception {RuntimeError} layer.json specifies an unknown format
- * @exception {RuntimeError} layer.json specifies an unsupported quantized-mesh version
- * @exception {RuntimeError} layer.json does not specify a tiles property, or specifies an empty array
- * @exception {RuntimeError} layer.json does not specify any tile URL templates
+ * @throws {RuntimeError} layer.json does not specify a format
+ * @throws {RuntimeError} layer.json specifies an unknown format
+ * @throws {RuntimeError} layer.json specifies an unsupported quantized-mesh version
+ * @throws {RuntimeError} layer.json does not specify a tiles property, or specifies an empty array
+ * @throws {RuntimeError} layer.json does not specify any tile URL templates
*/
CesiumTerrainProvider.fromIonAssetId = async function (assetId, options) {
//>>includeStart('debug', pragmas.debug);
@@ -1200,11 +1180,9 @@ CesiumTerrainProvider.fromIonAssetId = async function (assetId, options) {
*
*
- *
* @param {Resource|String|Promise|Promise} url The URL of the Cesium terrain server.
* @param {CesiumTerrainProvider.ConstructorOptions} [options] An object describing initialization options.
* @returns {Promise}
- *
* @example
* // Create Arctic DEM terrain with normals.
* try {
@@ -1217,12 +1195,11 @@ CesiumTerrainProvider.fromIonAssetId = async function (assetId, options) {
* } catch (error) {
* console.log(error);
* }
- *
- * @exception {RuntimeError} layer.json does not specify a format
- * @exception {RuntimeError} layer.json specifies an unknown format
- * @exception {RuntimeError} layer.json specifies an unsupported quantized-mesh version
- * @exception {RuntimeError} layer.json does not specify a tiles property, or specifies an empty array
- * @exception {RuntimeError} layer.json does not specify any tile URL templates
+ * @throws {RuntimeError} layer.json does not specify a format
+ * @throws {RuntimeError} layer.json specifies an unknown format
+ * @throws {RuntimeError} layer.json specifies an unsupported quantized-mesh version
+ * @throws {RuntimeError} layer.json does not specify a tiles property, or specifies an empty array
+ * @throws {RuntimeError} layer.json does not specify any tile URL templates
*/
CesiumTerrainProvider.fromUrl = async function (url, options) {
//>>includeStart('debug', pragmas.debug);
@@ -1253,7 +1230,6 @@ CesiumTerrainProvider.fromUrl = async function (url, options) {
/**
* Determines whether data for a tile is available to be loaded.
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
@@ -1291,7 +1267,6 @@ CesiumTerrainProvider.prototype.getTileDataAvailable = function (x, y, level) {
/**
* Makes sure we load availability data for a tile
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
diff --git a/packages/engine/Source/Core/Check.js b/packages/engine/Source/Core/Check.js
index 83f0c9ab0b11..72b46774841b 100644
--- a/packages/engine/Source/Core/Check.js
+++ b/packages/engine/Source/Core/Check.js
@@ -22,10 +22,9 @@ function getFailedTypeErrorMessage(actual, expected, name) {
/**
* Throws if test is not defined
- *
* @param {string} name The name of the variable being tested
* @param {*} test The value that is to be checked
- * @exception {DeveloperError} test must be defined
+ * @throws {DeveloperError} test must be defined
*/
Check.defined = function (name, test) {
if (!defined(test)) {
@@ -35,10 +34,9 @@ Check.defined = function (name, test) {
/**
* Throws if test is not typeof 'function'
- *
* @param {string} name The name of the variable being tested
* @param {*} test The value to test
- * @exception {DeveloperError} test must be typeof 'function'
+ * @throws {DeveloperError} test must be typeof 'function'
*/
Check.typeOf.func = function (name, test) {
if (typeof test !== "function") {
@@ -50,10 +48,9 @@ Check.typeOf.func = function (name, test) {
/**
* Throws if test is not typeof 'string'
- *
* @param {string} name The name of the variable being tested
* @param {*} test The value to test
- * @exception {DeveloperError} test must be typeof 'string'
+ * @throws {DeveloperError} test must be typeof 'string'
*/
Check.typeOf.string = function (name, test) {
if (typeof test !== "string") {
@@ -65,10 +62,9 @@ Check.typeOf.string = function (name, test) {
/**
* Throws if test is not typeof 'number'
- *
* @param {string} name The name of the variable being tested
* @param {*} test The value to test
- * @exception {DeveloperError} test must be typeof 'number'
+ * @throws {DeveloperError} test must be typeof 'number'
*/
Check.typeOf.number = function (name, test) {
if (typeof test !== "number") {
@@ -80,11 +76,10 @@ Check.typeOf.number = function (name, test) {
/**
* Throws if test is not typeof 'number' and less than limit
- *
* @param {string} name The name of the variable being tested
* @param {*} test The value to test
* @param {number} limit The limit value to compare against
- * @exception {DeveloperError} test must be typeof 'number' and less than limit
+ * @throws {DeveloperError} test must be typeof 'number' and less than limit
*/
Check.typeOf.number.lessThan = function (name, test, limit) {
Check.typeOf.number(name, test);
@@ -97,11 +92,10 @@ Check.typeOf.number.lessThan = function (name, test, limit) {
/**
* Throws if test is not typeof 'number' and less than or equal to limit
- *
* @param {string} name The name of the variable being tested
* @param {*} test The value to test
* @param {number} limit The limit value to compare against
- * @exception {DeveloperError} test must be typeof 'number' and less than or equal to limit
+ * @throws {DeveloperError} test must be typeof 'number' and less than or equal to limit
*/
Check.typeOf.number.lessThanOrEquals = function (name, test, limit) {
Check.typeOf.number(name, test);
@@ -114,11 +108,10 @@ Check.typeOf.number.lessThanOrEquals = function (name, test, limit) {
/**
* Throws if test is not typeof 'number' and greater than limit
- *
* @param {string} name The name of the variable being tested
* @param {*} test The value to test
* @param {number} limit The limit value to compare against
- * @exception {DeveloperError} test must be typeof 'number' and greater than limit
+ * @throws {DeveloperError} test must be typeof 'number' and greater than limit
*/
Check.typeOf.number.greaterThan = function (name, test, limit) {
Check.typeOf.number(name, test);
@@ -131,11 +124,10 @@ Check.typeOf.number.greaterThan = function (name, test, limit) {
/**
* Throws if test is not typeof 'number' and greater than or equal to limit
- *
* @param {string} name The name of the variable being tested
* @param {*} test The value to test
* @param {number} limit The limit value to compare against
- * @exception {DeveloperError} test must be typeof 'number' and greater than or equal to limit
+ * @throws {DeveloperError} test must be typeof 'number' and greater than or equal to limit
*/
Check.typeOf.number.greaterThanOrEquals = function (name, test, limit) {
Check.typeOf.number(name, test);
@@ -148,10 +140,9 @@ Check.typeOf.number.greaterThanOrEquals = function (name, test, limit) {
/**
* Throws if test is not typeof 'object'
- *
* @param {string} name The name of the variable being tested
* @param {*} test The value to test
- * @exception {DeveloperError} test must be typeof 'object'
+ * @throws {DeveloperError} test must be typeof 'object'
*/
Check.typeOf.object = function (name, test) {
if (typeof test !== "object") {
@@ -163,10 +154,9 @@ Check.typeOf.object = function (name, test) {
/**
* Throws if test is not typeof 'boolean'
- *
* @param {string} name The name of the variable being tested
* @param {*} test The value to test
- * @exception {DeveloperError} test must be typeof 'boolean'
+ * @throws {DeveloperError} test must be typeof 'boolean'
*/
Check.typeOf.bool = function (name, test) {
if (typeof test !== "boolean") {
@@ -178,10 +168,9 @@ Check.typeOf.bool = function (name, test) {
/**
* Throws if test is not typeof 'bigint'
- *
* @param {string} name The name of the variable being tested
* @param {*} test The value to test
- * @exception {DeveloperError} test must be typeof 'bigint'
+ * @throws {DeveloperError} test must be typeof 'bigint'
*/
Check.typeOf.bigint = function (name, test) {
if (typeof test !== "bigint") {
@@ -193,12 +182,11 @@ Check.typeOf.bigint = function (name, test) {
/**
* Throws if test1 and test2 is not typeof 'number' and not equal in value
- *
* @param {string} name1 The name of the first variable being tested
* @param {string} name2 The name of the second variable being tested against
* @param {*} test1 The value to test
* @param {*} test2 The value to test against
- * @exception {DeveloperError} test1 and test2 should be type of 'number' and be equal in value
+ * @throws {DeveloperError} test1 and test2 should be type of 'number' and be equal in value
*/
Check.typeOf.number.equals = function (name1, name2, test1, test2) {
Check.typeOf.number(name1, test1);
diff --git a/packages/engine/Source/Core/CircleGeometry.js b/packages/engine/Source/Core/CircleGeometry.js
index 78e6387c15a0..93190fa1c56d 100644
--- a/packages/engine/Source/Core/CircleGeometry.js
+++ b/packages/engine/Source/Core/CircleGeometry.js
@@ -8,10 +8,8 @@ import VertexFormat from "./VertexFormat.js";
/**
* A description of a circle on the ellipsoid. Circle geometry can be rendered with both {@link Primitive} and {@link GroundPrimitive}.
- *
* @alias CircleGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Cartesian3} options.center The circle's center point in the fixed frame.
* @param {number} options.radius The radius in meters.
@@ -21,13 +19,10 @@ import VertexFormat from "./VertexFormat.js";
* @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
* @param {number} [options.extrudedHeight=0.0] The distance in meters between the circle's extruded face and the ellipsoid surface.
* @param {number} [options.stRotation=0.0] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
- *
- * @exception {DeveloperError} radius must be greater than zero.
- * @exception {DeveloperError} granularity must be greater than zero.
- *
+ * @throws {DeveloperError} radius must be greater than zero.
+ * @throws {DeveloperError} granularity must be greater than zero.
* @see CircleGeometry.createGeometry
* @see Packable
- *
* @example
* // Create a circle.
* const circle = new Cesium.CircleGeometry({
@@ -68,11 +63,9 @@ CircleGeometry.packedLength = EllipseGeometry.packedLength;
/**
* Stores the provided instance into the provided array.
- *
* @param {CircleGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
CircleGeometry.pack = function (value, array, startingIndex) {
@@ -103,7 +96,6 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {CircleGeometry} [result] The object into which to store the result.
@@ -146,7 +138,6 @@ CircleGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of a circle on an ellipsoid, including its vertices, indices, and a bounding sphere.
- *
* @param {CircleGeometry} circleGeometry A description of the circle.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
@@ -155,6 +146,9 @@ CircleGeometry.createGeometry = function (circleGeometry) {
};
/**
+ * @param circleGeometry
+ * @param minHeightFunc
+ * @param maxHeightFunc
* @private
*/
CircleGeometry.createShadowVolume = function (
diff --git a/packages/engine/Source/Core/CircleOutlineGeometry.js b/packages/engine/Source/Core/CircleOutlineGeometry.js
index 80e40987de19..ad35963f2ad8 100644
--- a/packages/engine/Source/Core/CircleOutlineGeometry.js
+++ b/packages/engine/Source/Core/CircleOutlineGeometry.js
@@ -7,10 +7,8 @@ import Ellipsoid from "./Ellipsoid.js";
/**
* A description of the outline of a circle on the ellipsoid.
- *
* @alias CircleOutlineGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Cartesian3} options.center The circle's center point in the fixed frame.
* @param {number} options.radius The radius in meters.
@@ -19,13 +17,10 @@ import Ellipsoid from "./Ellipsoid.js";
* @param {number} [options.granularity=0.02] The angular distance between points on the circle in radians.
* @param {number} [options.extrudedHeight=0.0] The distance in meters between the circle's extruded face and the ellipsoid surface.
* @param {number} [options.numberOfVerticalLines=16] Number of lines to draw between the top and bottom of an extruded circle.
- *
- * @exception {DeveloperError} radius must be greater than zero.
- * @exception {DeveloperError} granularity must be greater than zero.
- *
+ * @throws {DeveloperError} radius must be greater than zero.
+ * @throws {DeveloperError} granularity must be greater than zero.
* @see CircleOutlineGeometry.createGeometry
* @see Packable
- *
* @example
* // Create a circle.
* const circle = new Cesium.CircleOutlineGeometry({
@@ -64,11 +59,9 @@ CircleOutlineGeometry.packedLength = EllipseOutlineGeometry.packedLength;
/**
* Stores the provided instance into the provided array.
- *
* @param {CircleOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
CircleOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -101,7 +94,6 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {CircleOutlineGeometry} [result] The object into which to store the result.
@@ -139,7 +131,6 @@ CircleOutlineGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of an outline of a circle on an ellipsoid, including its vertices, indices, and a bounding sphere.
- *
* @param {CircleOutlineGeometry} circleGeometry A description of the circle.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/Clock.js b/packages/engine/Source/Core/Clock.js
index 8bdea4fbf34c..4322ff33b37c 100644
--- a/packages/engine/Source/Core/Clock.js
+++ b/packages/engine/Source/Core/Clock.js
@@ -9,10 +9,8 @@ import JulianDate from "./JulianDate.js";
/**
* A simple clock for keeping track of simulated time.
- *
* @alias Clock
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
* @param {JulianDate} [options.startTime] The start time of the clock.
* @param {JulianDate} [options.stopTime] The stop time of the clock.
@@ -22,10 +20,7 @@ import JulianDate from "./JulianDate.js";
* @param {ClockRange} [options.clockRange=ClockRange.UNBOUNDED] Determines how the clock should behave when {@link Clock#startTime} or {@link Clock#stopTime} is reached.
* @param {boolean} [options.canAnimate=true] Indicates whether {@link Clock#tick} can advance time. This could be false if data is being buffered, for example. The clock will only tick when both {@link Clock#canAnimate} and {@link Clock#shouldAnimate} are true.
* @param {boolean} [options.shouldAnimate=false] Indicates whether {@link Clock#tick} should attempt to advance time. The clock will only tick when both {@link Clock#canAnimate} and {@link Clock#shouldAnimate} are true.
- *
- * @exception {DeveloperError} startTime must come before stopTime.
- *
- *
+ * @throws {DeveloperError} startTime must come before stopTime.
* @example
* // Create a clock that loops on Christmas day 2013 and runs in real-time.
* const clock = new Cesium.Clock({
@@ -35,7 +30,6 @@ import JulianDate from "./JulianDate.js";
* clockRange : Cesium.ClockRange.LOOP_STOP,
* clockStep : Cesium.ClockStep.SYSTEM_CLOCK_MULTIPLIER
* });
- *
* @see ClockStep
* @see ClockRange
* @see JulianDate
@@ -255,7 +249,6 @@ Object.defineProperties(Clock.prototype, {
* Advances the clock from the current time based on the current configuration options.
* tick should be called every frame, regardless of whether animation is taking place
* or not. To control animation, use the {@link Clock#shouldAnimate} property.
- *
* @returns {JulianDate} The new value of the {@link Clock#currentTime} property.
*/
Clock.prototype.tick = function () {
diff --git a/packages/engine/Source/Core/ClockRange.js b/packages/engine/Source/Core/ClockRange.js
index 8a8e83f76572..9b02a4b67e2f 100644
--- a/packages/engine/Source/Core/ClockRange.js
+++ b/packages/engine/Source/Core/ClockRange.js
@@ -1,16 +1,13 @@
/**
* Constants used by {@link Clock#tick} to determine behavior
* when {@link Clock#startTime} or {@link Clock#stopTime} is reached.
- *
* @enum {number}
- *
* @see Clock
* @see ClockStep
*/
const ClockRange = {
/**
* {@link Clock#tick} will always advances the clock in its current direction.
- *
* @type {number}
* @constant
*/
@@ -19,7 +16,6 @@ const ClockRange = {
/**
* When {@link Clock#startTime} or {@link Clock#stopTime} is reached,
* {@link Clock#tick} will not advance {@link Clock#currentTime} any further.
- *
* @type {number}
* @constant
*/
@@ -30,7 +26,6 @@ const ClockRange = {
* {@link Clock#currentTime} to the opposite end of the interval. When
* time is moving backwards, {@link Clock#tick} will not advance past
* {@link Clock#startTime}
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/ClockStep.js b/packages/engine/Source/Core/ClockStep.js
index 0494677f9d09..bc814af1fa4f 100644
--- a/packages/engine/Source/Core/ClockStep.js
+++ b/packages/engine/Source/Core/ClockStep.js
@@ -1,9 +1,7 @@
/**
* Constants to determine how much time advances with each call
* to {@link Clock#tick}.
- *
* @enum {number}
- *
* @see Clock
* @see ClockRange
*/
@@ -11,7 +9,6 @@ const ClockStep = {
/**
* {@link Clock#tick} advances the current time by a fixed step,
* which is the number of seconds specified by {@link Clock#multiplier}.
- *
* @type {number}
* @constant
*/
@@ -20,7 +17,6 @@ const ClockStep = {
/**
* {@link Clock#tick} advances the current time by the amount of system
* time elapsed since the previous call multiplied by {@link Clock#multiplier}.
- *
* @type {number}
* @constant
*/
@@ -29,7 +25,6 @@ const ClockStep = {
/**
* {@link Clock#tick} sets the clock to the current system time;
* ignoring all other settings.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/Color.js b/packages/engine/Source/Core/Color.js
index 23683732133b..e4b42088dd4b 100644
--- a/packages/engine/Source/Core/Color.js
+++ b/packages/engine/Source/Core/Color.js
@@ -30,10 +30,8 @@ function hue2rgb(m1, m2, h) {
* @param {number} [green=1.0] The green component.
* @param {number} [blue=1.0] The blue component.
* @param {number} [alpha=1.0] The alpha component.
- *
- * @constructor
+ * @class
* @alias Color
- *
* @see Packable
*/
function Color(red, green, blue, alpha) {
@@ -66,7 +64,6 @@ function Color(red, green, blue, alpha) {
/**
* Creates a Color instance from a {@link Cartesian4}. x, y, z,
* and w map to red, green, blue, and alpha, respectively.
- *
* @param {Cartesian4} cartesian The source cartesian.
* @param {Color} [result] The object onto which to store the result.
* @returns {Color} The modified result parameter or a new Color instance if one was not provided.
@@ -90,7 +87,6 @@ Color.fromCartesian4 = function (cartesian, result) {
/**
* Creates a new Color specified using red, green, blue, and alpha values
* that are in the range of 0 to 255, converting them internally to a range of 0.0 to 1.0.
- *
* @param {number} [red=255] The red component.
* @param {number} [green=255] The green component.
* @param {number} [blue=255] The blue component.
@@ -118,12 +114,10 @@ Color.fromBytes = function (red, green, blue, alpha, result) {
/**
* Creates a new Color that has the same red, green, and blue components
* of the specified color, but with the specified alpha value.
- *
* @param {Color} color The base color
* @param {number} alpha The new alpha component.
* @param {Color} [result] The object onto which to store the result.
* @returns {Color} The modified result parameter or a new Color instance if one was not provided.
- *
* @example const translucentRed = Cesium.Color.fromAlpha(Cesium.Color.RED, 0.9);
*/
Color.fromAlpha = function (color, alpha, result) {
@@ -155,14 +149,11 @@ if (FeatureDetection.supportsTypedArrays()) {
/**
* Creates a new Color from a single numeric unsigned 32-bit RGBA value, using the endianness
* of the system.
- *
* @param {number} rgba A single numeric unsigned 32-bit RGBA value.
* @param {Color} [result] The object to store the result in, if undefined a new instance will be created.
* @returns {Color} The color object.
- *
* @example
* const color = Cesium.Color.fromRgba(0x67ADDFFF);
- *
* @see Color#toRgba
*/
Color.fromRgba = function (rgba, result) {
@@ -179,14 +170,12 @@ Color.fromRgba = function (rgba, result) {
/**
* Creates a Color instance from hue, saturation, and lightness.
- *
* @param {number} [hue=0] The hue angle 0...1
* @param {number} [saturation=0] The saturation value 0...1
* @param {number} [lightness=0] The lightness value 0...1
* @param {number} [alpha=1.0] The alpha component 0...1
* @param {Color} [result] The object to store the result in, if undefined a new instance will be created.
* @returns {Color} The color object.
- *
* @see {@link http://www.w3.org/TR/css3-color/#hsl-color|CSS color values}
*/
Color.fromHsl = function (hue, saturation, lightness, alpha, result) {
@@ -227,7 +216,6 @@ Color.fromHsl = function (hue, saturation, lightness, alpha, result) {
/**
* Creates a random color using the provided options. For reproducible random colors, you should
* call {@link CesiumMath#setRandomNumberSeed} once at the beginning of your application.
- *
* @param {object} [options] Object with the following properties:
* @param {number} [options.red] If specified, the red component to use instead of a randomized value.
* @param {number} [options.minimumRed=0.0] The maximum red value to generate if none was specified.
@@ -243,12 +231,10 @@ Color.fromHsl = function (hue, saturation, lightness, alpha, result) {
* @param {number} [options.maximumAlpha=1.0] The minimum alpha value to generate if none was specified.
* @param {Color} [result] The object to store the result in, if undefined a new instance will be created.
* @returns {Color} The modified result parameter or a new instance if result was undefined.
- *
- * @exception {DeveloperError} minimumRed must be less than or equal to maximumRed.
- * @exception {DeveloperError} minimumGreen must be less than or equal to maximumGreen.
- * @exception {DeveloperError} minimumBlue must be less than or equal to maximumBlue.
- * @exception {DeveloperError} minimumAlpha must be less than or equal to maximumAlpha.
- *
+ * @throws {DeveloperError} minimumRed must be less than or equal to maximumRed.
+ * @throws {DeveloperError} minimumGreen must be less than or equal to maximumGreen.
+ * @throws {DeveloperError} minimumBlue must be less than or equal to maximumBlue.
+ * @throws {DeveloperError} minimumAlpha must be less than or equal to maximumAlpha.
* @example
* //Create a completely random color
* const color = Cesium.Color.fromRandom();
@@ -358,16 +344,12 @@ const hslParenthesesMatcher = /^hsla?\s*\(\s*([0-9.]+)\s*[,\s]+\s*([0-9.]+%)\s*[
/**
* Creates a Color instance from a CSS color value.
- *
* @param {string} color The CSS color value in #rgb, #rgba, #rrggbb, #rrggbbaa, rgb(), rgba(), hsl(), or hsla() format.
* @param {Color} [result] The object to store the result in, if undefined a new instance will be created.
* @returns {Color} The color object, or undefined if the string was not a valid CSS color.
- *
- *
* @example
* const cesiumBlue = Cesium.Color.fromCssColorString('#67ADDF');
* const green = Cesium.Color.fromCssColorString('green');
- *
* @see {@link http://www.w3.org/TR/css3-color|CSS color values}
*/
Color.fromCssColorString = function (color, result) {
@@ -441,11 +423,9 @@ Color.packedLength = 4;
/**
* Stores the provided instance into the provided array.
- *
* @param {Color} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
Color.pack = function (value, array, startingIndex) {
@@ -465,7 +445,6 @@ Color.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {Color} [result] The object into which to store the result.
@@ -490,7 +469,6 @@ Color.unpack = function (array, startingIndex, result) {
/**
* Converts a 'byte' color component in the range of 0 to 255 into
* a 'float' color component in the range of 0 to 1.0.
- *
* @param {number} number The number to be converted.
* @returns {number} The converted number.
*/
@@ -501,7 +479,6 @@ Color.byteToFloat = function (number) {
/**
* Converts a 'float' color component in the range of 0 to 1.0 into
* a 'byte' color component in the range of 0 to 255.
- *
* @param {number} number The number to be converted.
* @returns {number} The converted number.
*/
@@ -511,7 +488,6 @@ Color.floatToByte = function (number) {
/**
* Duplicates a Color.
- *
* @param {Color} color The Color to duplicate.
* @param {Color} [result] The object to store the result in, if undefined a new instance will be created.
* @returns {Color} The modified result parameter or a new instance if result was undefined. (Returns undefined if color is undefined)
@@ -532,7 +508,6 @@ Color.clone = function (color, result) {
/**
* Returns true if the first Color equals the second color.
- *
* @param {Color} left The first Color to compare for equality.
* @param {Color} right The second Color to compare for equality.
* @returns {boolean} true if the Colors are equal; otherwise, false.
@@ -550,6 +525,9 @@ Color.equals = function (left, right) {
};
/**
+ * @param color
+ * @param array
+ * @param offset
* @private
*/
Color.equalsArray = function (color, array, offset) {
@@ -563,7 +541,6 @@ Color.equalsArray = function (color, array, offset) {
/**
* Returns a duplicate of a Color instance.
- *
* @param {Color} [result] The object to store the result in, if undefined a new instance will be created.
* @returns {Color} The modified result parameter or a new instance if result was undefined.
*/
@@ -573,7 +550,6 @@ Color.prototype.clone = function (result) {
/**
* Returns true if this Color equals other.
- *
* @param {Color} other The Color to compare for equality.
* @returns {boolean} true if the Colors are equal; otherwise, false.
*/
@@ -583,7 +559,6 @@ Color.prototype.equals = function (other) {
/**
* Returns true if this Color equals other componentwise within the specified epsilon.
- *
* @param {Color} other The Color to compare for equality.
* @param {number} [epsilon=0.0] The epsilon to use for equality testing.
* @returns {boolean} true if the Colors are equal within the specified epsilon; otherwise, false.
@@ -601,7 +576,6 @@ Color.prototype.equalsEpsilon = function (other, epsilon) {
/**
* Creates a string representing this Color in the format '(red, green, blue, alpha)'.
- *
* @returns {string} A string representing this Color in the format '(red, green, blue, alpha)'.
*/
Color.prototype.toString = function () {
@@ -610,9 +584,7 @@ Color.prototype.toString = function () {
/**
* Creates a string containing the CSS color value for this color.
- *
* @returns {string} The CSS equivalent of this color.
- *
* @see {@link http://www.w3.org/TR/css3-color/#rgba-color|CSS RGB or RGBA color values}
*/
Color.prototype.toCssColorString = function () {
@@ -627,7 +599,6 @@ Color.prototype.toCssColorString = function () {
/**
* Creates a string containing CSS hex string color value for this color.
- *
* @returns {string} The CSS hex string equivalent of this color.
*/
Color.prototype.toCssHexString = function () {
@@ -656,7 +627,6 @@ Color.prototype.toCssHexString = function () {
/**
* Converts this color to an array of red, green, blue, and alpha values
* that are in the range of 0 to 255.
- *
* @param {number[]} [result] The array to store the result in, if undefined a new instance will be created.
* @returns {number[]} The modified result parameter or a new instance if result was undefined.
*/
@@ -679,13 +649,9 @@ Color.prototype.toBytes = function (result) {
/**
* Converts this color to a single numeric unsigned 32-bit RGBA value, using the endianness
* of the system.
- *
* @returns {number} A single numeric unsigned 32-bit RGBA value.
- *
- *
* @example
* const rgba = Cesium.Color.BLUE.toRgba();
- *
* @see Color.fromRgba
*/
Color.prototype.toRgba = function () {
@@ -699,11 +665,9 @@ Color.prototype.toRgba = function () {
/**
* Brightens this color by the provided magnitude.
- *
* @param {number} magnitude A positive number indicating the amount to brighten.
* @param {Color} result The object onto which to store the result.
* @returns {Color} The modified result parameter.
- *
* @example
* const brightBlue = Cesium.Color.BLUE.brighten(0.5, new Cesium.Color());
*/
@@ -724,11 +688,9 @@ Color.prototype.brighten = function (magnitude, result) {
/**
* Darkens this color by the provided magnitude.
- *
* @param {number} magnitude A positive number indicating the amount to darken.
* @param {Color} result The object onto which to store the result.
* @returns {Color} The modified result parameter.
- *
* @example
* const darkBlue = Cesium.Color.BLUE.darken(0.5, new Cesium.Color());
*/
@@ -750,11 +712,9 @@ Color.prototype.darken = function (magnitude, result) {
/**
* Creates a new Color that has the same red, green, and blue components
* as this Color, but with the specified alpha value.
- *
* @param {number} alpha The new alpha component.
* @param {Color} [result] The object onto which to store the result.
* @returns {Color} The modified result parameter or a new Color instance if one was not provided.
- *
* @example const translucentRed = Cesium.Color.RED.withAlpha(0.9);
*/
Color.prototype.withAlpha = function (alpha, result) {
@@ -763,7 +723,6 @@ Color.prototype.withAlpha = function (alpha, result) {
/**
* Computes the componentwise sum of two Colors.
- *
* @param {Color} left The first Color.
* @param {Color} right The second Color.
* @param {Color} result The object onto which to store the result.
@@ -785,7 +744,6 @@ Color.add = function (left, right, result) {
/**
* Computes the componentwise difference of two Colors.
- *
* @param {Color} left The first Color.
* @param {Color} right The second Color.
* @param {Color} result The object onto which to store the result.
@@ -807,7 +765,6 @@ Color.subtract = function (left, right, result) {
/**
* Computes the componentwise product of two Colors.
- *
* @param {Color} left The first Color.
* @param {Color} right The second Color.
* @param {Color} result The object onto which to store the result.
@@ -829,7 +786,6 @@ Color.multiply = function (left, right, result) {
/**
* Computes the componentwise quotient of two Colors.
- *
* @param {Color} left The first Color.
* @param {Color} right The second Color.
* @param {Color} result The object onto which to store the result.
@@ -851,7 +807,6 @@ Color.divide = function (left, right, result) {
/**
* Computes the componentwise modulus of two Colors.
- *
* @param {Color} left The first Color.
* @param {Color} right The second Color.
* @param {Color} result The object onto which to store the result.
@@ -873,7 +828,6 @@ Color.mod = function (left, right, result) {
/**
* Computes the linear interpolation or extrapolation at t between the provided colors.
- *
* @param {Color} start The color corresponding to t at 0.0.
* @param {Color} end The color corresponding to t at 1.0.
* @param {number} t The point along t at which to interpolate.
@@ -897,7 +851,6 @@ Color.lerp = function (start, end, t, result) {
/**
* Multiplies the provided Color componentwise by the provided scalar.
- *
* @param {Color} color The Color to be scaled.
* @param {number} scalar The scalar to multiply with.
* @param {Color} result The object onto which to store the result.
@@ -919,7 +872,6 @@ Color.multiplyByScalar = function (color, scalar, result) {
/**
* Divides the provided Color componentwise by the provided scalar.
- *
* @param {Color} color The Color to be divided.
* @param {number} scalar The scalar to divide with.
* @param {Color} result The object onto which to store the result.
@@ -942,7 +894,6 @@ Color.divideByScalar = function (color, scalar, result) {
/**
* An immutable Color instance initialized to CSS color #F0F8FF
*
- *
* @constant
* @type {Color}
*/
@@ -951,7 +902,6 @@ Color.ALICEBLUE = Object.freeze(Color.fromCssColorString("#F0F8FF"));
/**
* An immutable Color instance initialized to CSS color #FAEBD7
*
- *
* @constant
* @type {Color}
*/
@@ -960,7 +910,6 @@ Color.ANTIQUEWHITE = Object.freeze(Color.fromCssColorString("#FAEBD7"));
/**
* An immutable Color instance initialized to CSS color #00FFFF
*
- *
* @constant
* @type {Color}
*/
@@ -969,7 +918,6 @@ Color.AQUA = Object.freeze(Color.fromCssColorString("#00FFFF"));
/**
* An immutable Color instance initialized to CSS color #7FFFD4
*
- *
* @constant
* @type {Color}
*/
@@ -978,7 +926,6 @@ Color.AQUAMARINE = Object.freeze(Color.fromCssColorString("#7FFFD4"));
/**
* An immutable Color instance initialized to CSS color #F0FFFF
*
- *
* @constant
* @type {Color}
*/
@@ -987,7 +934,6 @@ Color.AZURE = Object.freeze(Color.fromCssColorString("#F0FFFF"));
/**
* An immutable Color instance initialized to CSS color #F5F5DC
*
- *
* @constant
* @type {Color}
*/
@@ -996,7 +942,6 @@ Color.BEIGE = Object.freeze(Color.fromCssColorString("#F5F5DC"));
/**
* An immutable Color instance initialized to CSS color #FFE4C4
*
- *
* @constant
* @type {Color}
*/
@@ -1005,7 +950,6 @@ Color.BISQUE = Object.freeze(Color.fromCssColorString("#FFE4C4"));
/**
* An immutable Color instance initialized to CSS color #000000
*
- *
* @constant
* @type {Color}
*/
@@ -1014,7 +958,6 @@ Color.BLACK = Object.freeze(Color.fromCssColorString("#000000"));
/**
* An immutable Color instance initialized to CSS color #FFEBCD
*
- *
* @constant
* @type {Color}
*/
@@ -1023,7 +966,6 @@ Color.BLANCHEDALMOND = Object.freeze(Color.fromCssColorString("#FFEBCD"));
/**
* An immutable Color instance initialized to CSS color #0000FF
*
- *
* @constant
* @type {Color}
*/
@@ -1032,7 +974,6 @@ Color.BLUE = Object.freeze(Color.fromCssColorString("#0000FF"));
/**
* An immutable Color instance initialized to CSS color #8A2BE2
*
- *
* @constant
* @type {Color}
*/
@@ -1041,7 +982,6 @@ Color.BLUEVIOLET = Object.freeze(Color.fromCssColorString("#8A2BE2"));
/**
* An immutable Color instance initialized to CSS color #A52A2A
*
- *
* @constant
* @type {Color}
*/
@@ -1050,7 +990,6 @@ Color.BROWN = Object.freeze(Color.fromCssColorString("#A52A2A"));
/**
* An immutable Color instance initialized to CSS color #DEB887
*
- *
* @constant
* @type {Color}
*/
@@ -1059,7 +998,6 @@ Color.BURLYWOOD = Object.freeze(Color.fromCssColorString("#DEB887"));
/**
* An immutable Color instance initialized to CSS color #5F9EA0
*
- *
* @constant
* @type {Color}
*/
@@ -1067,7 +1005,6 @@ Color.CADETBLUE = Object.freeze(Color.fromCssColorString("#5F9EA0"));
/**
* An immutable Color instance initialized to CSS color #7FFF00
*
- *
* @constant
* @type {Color}
*/
@@ -1076,7 +1013,6 @@ Color.CHARTREUSE = Object.freeze(Color.fromCssColorString("#7FFF00"));
/**
* An immutable Color instance initialized to CSS color #D2691E
*
- *
* @constant
* @type {Color}
*/
@@ -1085,7 +1021,6 @@ Color.CHOCOLATE = Object.freeze(Color.fromCssColorString("#D2691E"));
/**
* An immutable Color instance initialized to CSS color #FF7F50
*
- *
* @constant
* @type {Color}
*/
@@ -1094,7 +1029,6 @@ Color.CORAL = Object.freeze(Color.fromCssColorString("#FF7F50"));
/**
* An immutable Color instance initialized to CSS color #6495ED
*
- *
* @constant
* @type {Color}
*/
@@ -1103,7 +1037,6 @@ Color.CORNFLOWERBLUE = Object.freeze(Color.fromCssColorString("#6495ED"));
/**
* An immutable Color instance initialized to CSS color #FFF8DC
*
- *
* @constant
* @type {Color}
*/
@@ -1112,7 +1045,6 @@ Color.CORNSILK = Object.freeze(Color.fromCssColorString("#FFF8DC"));
/**
* An immutable Color instance initialized to CSS color #DC143C
*
- *
* @constant
* @type {Color}
*/
@@ -1121,7 +1053,6 @@ Color.CRIMSON = Object.freeze(Color.fromCssColorString("#DC143C"));
/**
* An immutable Color instance initialized to CSS color #00FFFF
*
- *
* @constant
* @type {Color}
*/
@@ -1130,7 +1061,6 @@ Color.CYAN = Object.freeze(Color.fromCssColorString("#00FFFF"));
/**
* An immutable Color instance initialized to CSS color #00008B
*
- *
* @constant
* @type {Color}
*/
@@ -1139,7 +1069,6 @@ Color.DARKBLUE = Object.freeze(Color.fromCssColorString("#00008B"));
/**
* An immutable Color instance initialized to CSS color #008B8B
*
- *
* @constant
* @type {Color}
*/
@@ -1148,7 +1077,6 @@ Color.DARKCYAN = Object.freeze(Color.fromCssColorString("#008B8B"));
/**
* An immutable Color instance initialized to CSS color #B8860B
*
- *
* @constant
* @type {Color}
*/
@@ -1157,7 +1085,6 @@ Color.DARKGOLDENROD = Object.freeze(Color.fromCssColorString("#B8860B"));
/**
* An immutable Color instance initialized to CSS color #A9A9A9
*
- *
* @constant
* @type {Color}
*/
@@ -1166,7 +1093,6 @@ Color.DARKGRAY = Object.freeze(Color.fromCssColorString("#A9A9A9"));
/**
* An immutable Color instance initialized to CSS color #006400
*
- *
* @constant
* @type {Color}
*/
@@ -1175,7 +1101,6 @@ Color.DARKGREEN = Object.freeze(Color.fromCssColorString("#006400"));
/**
* An immutable Color instance initialized to CSS color #A9A9A9
*
- *
* @constant
* @type {Color}
*/
@@ -1184,7 +1109,6 @@ Color.DARKGREY = Color.DARKGRAY;
/**
* An immutable Color instance initialized to CSS color #BDB76B
*
- *
* @constant
* @type {Color}
*/
@@ -1193,7 +1117,6 @@ Color.DARKKHAKI = Object.freeze(Color.fromCssColorString("#BDB76B"));
/**
* An immutable Color instance initialized to CSS color #8B008B
*
- *
* @constant
* @type {Color}
*/
@@ -1202,7 +1125,6 @@ Color.DARKMAGENTA = Object.freeze(Color.fromCssColorString("#8B008B"));
/**
* An immutable Color instance initialized to CSS color #556B2F
*
- *
* @constant
* @type {Color}
*/
@@ -1211,7 +1133,6 @@ Color.DARKOLIVEGREEN = Object.freeze(Color.fromCssColorString("#556B2F"));
/**
* An immutable Color instance initialized to CSS color #FF8C00
*
- *
* @constant
* @type {Color}
*/
@@ -1220,7 +1141,6 @@ Color.DARKORANGE = Object.freeze(Color.fromCssColorString("#FF8C00"));
/**
* An immutable Color instance initialized to CSS color #9932CC
*
- *
* @constant
* @type {Color}
*/
@@ -1229,7 +1149,6 @@ Color.DARKORCHID = Object.freeze(Color.fromCssColorString("#9932CC"));
/**
* An immutable Color instance initialized to CSS color #8B0000
*
- *
* @constant
* @type {Color}
*/
@@ -1238,7 +1157,6 @@ Color.DARKRED = Object.freeze(Color.fromCssColorString("#8B0000"));
/**
* An immutable Color instance initialized to CSS color #E9967A
*
- *
* @constant
* @type {Color}
*/
@@ -1247,7 +1165,6 @@ Color.DARKSALMON = Object.freeze(Color.fromCssColorString("#E9967A"));
/**
* An immutable Color instance initialized to CSS color #8FBC8F
*
- *
* @constant
* @type {Color}
*/
@@ -1256,7 +1173,6 @@ Color.DARKSEAGREEN = Object.freeze(Color.fromCssColorString("#8FBC8F"));
/**
* An immutable Color instance initialized to CSS color #483D8B
*
- *
* @constant
* @type {Color}
*/
@@ -1265,7 +1181,6 @@ Color.DARKSLATEBLUE = Object.freeze(Color.fromCssColorString("#483D8B"));
/**
* An immutable Color instance initialized to CSS color #2F4F4F
*
- *
* @constant
* @type {Color}
*/
@@ -1274,7 +1189,6 @@ Color.DARKSLATEGRAY = Object.freeze(Color.fromCssColorString("#2F4F4F"));
/**
* An immutable Color instance initialized to CSS color #2F4F4F
*
- *
* @constant
* @type {Color}
*/
@@ -1283,7 +1197,6 @@ Color.DARKSLATEGREY = Color.DARKSLATEGRAY;
/**
* An immutable Color instance initialized to CSS color #00CED1
*
- *
* @constant
* @type {Color}
*/
@@ -1292,7 +1205,6 @@ Color.DARKTURQUOISE = Object.freeze(Color.fromCssColorString("#00CED1"));
/**
* An immutable Color instance initialized to CSS color #9400D3
*
- *
* @constant
* @type {Color}
*/
@@ -1301,7 +1213,6 @@ Color.DARKVIOLET = Object.freeze(Color.fromCssColorString("#9400D3"));
/**
* An immutable Color instance initialized to CSS color #FF1493
*
- *
* @constant
* @type {Color}
*/
@@ -1310,7 +1221,6 @@ Color.DEEPPINK = Object.freeze(Color.fromCssColorString("#FF1493"));
/**
* An immutable Color instance initialized to CSS color #00BFFF
*
- *
* @constant
* @type {Color}
*/
@@ -1319,7 +1229,6 @@ Color.DEEPSKYBLUE = Object.freeze(Color.fromCssColorString("#00BFFF"));
/**
* An immutable Color instance initialized to CSS color #696969
*
- *
* @constant
* @type {Color}
*/
@@ -1328,7 +1237,6 @@ Color.DIMGRAY = Object.freeze(Color.fromCssColorString("#696969"));
/**
* An immutable Color instance initialized to CSS color #696969
*
- *
* @constant
* @type {Color}
*/
@@ -1337,7 +1245,6 @@ Color.DIMGREY = Color.DIMGRAY;
/**
* An immutable Color instance initialized to CSS color #1E90FF
*
- *
* @constant
* @type {Color}
*/
@@ -1346,7 +1253,6 @@ Color.DODGERBLUE = Object.freeze(Color.fromCssColorString("#1E90FF"));
/**
* An immutable Color instance initialized to CSS color #B22222
*
- *
* @constant
* @type {Color}
*/
@@ -1355,7 +1261,6 @@ Color.FIREBRICK = Object.freeze(Color.fromCssColorString("#B22222"));
/**
* An immutable Color instance initialized to CSS color #FFFAF0
*
- *
* @constant
* @type {Color}
*/
@@ -1364,7 +1269,6 @@ Color.FLORALWHITE = Object.freeze(Color.fromCssColorString("#FFFAF0"));
/**
* An immutable Color instance initialized to CSS color #228B22
*
- *
* @constant
* @type {Color}
*/
@@ -1373,7 +1277,6 @@ Color.FORESTGREEN = Object.freeze(Color.fromCssColorString("#228B22"));
/**
* An immutable Color instance initialized to CSS color #FF00FF
*
- *
* @constant
* @type {Color}
*/
@@ -1382,7 +1285,6 @@ Color.FUCHSIA = Object.freeze(Color.fromCssColorString("#FF00FF"));
/**
* An immutable Color instance initialized to CSS color #DCDCDC
*
- *
* @constant
* @type {Color}
*/
@@ -1391,7 +1293,6 @@ Color.GAINSBORO = Object.freeze(Color.fromCssColorString("#DCDCDC"));
/**
* An immutable Color instance initialized to CSS color #F8F8FF
*
- *
* @constant
* @type {Color}
*/
@@ -1400,7 +1301,6 @@ Color.GHOSTWHITE = Object.freeze(Color.fromCssColorString("#F8F8FF"));
/**
* An immutable Color instance initialized to CSS color #FFD700
*
- *
* @constant
* @type {Color}
*/
@@ -1409,7 +1309,6 @@ Color.GOLD = Object.freeze(Color.fromCssColorString("#FFD700"));
/**
* An immutable Color instance initialized to CSS color #DAA520
*
- *
* @constant
* @type {Color}
*/
@@ -1418,7 +1317,6 @@ Color.GOLDENROD = Object.freeze(Color.fromCssColorString("#DAA520"));
/**
* An immutable Color instance initialized to CSS color #808080
*
- *
* @constant
* @type {Color}
*/
@@ -1427,7 +1325,6 @@ Color.GRAY = Object.freeze(Color.fromCssColorString("#808080"));
/**
* An immutable Color instance initialized to CSS color #008000
*
- *
* @constant
* @type {Color}
*/
@@ -1436,7 +1333,6 @@ Color.GREEN = Object.freeze(Color.fromCssColorString("#008000"));
/**
* An immutable Color instance initialized to CSS color #ADFF2F
*
- *
* @constant
* @type {Color}
*/
@@ -1445,7 +1341,6 @@ Color.GREENYELLOW = Object.freeze(Color.fromCssColorString("#ADFF2F"));
/**
* An immutable Color instance initialized to CSS color #808080
*
- *
* @constant
* @type {Color}
*/
@@ -1454,7 +1349,6 @@ Color.GREY = Color.GRAY;
/**
* An immutable Color instance initialized to CSS color #F0FFF0
*
- *
* @constant
* @type {Color}
*/
@@ -1463,7 +1357,6 @@ Color.HONEYDEW = Object.freeze(Color.fromCssColorString("#F0FFF0"));
/**
* An immutable Color instance initialized to CSS color #FF69B4
*
- *
* @constant
* @type {Color}
*/
@@ -1472,7 +1365,6 @@ Color.HOTPINK = Object.freeze(Color.fromCssColorString("#FF69B4"));
/**
* An immutable Color instance initialized to CSS color #CD5C5C
*
- *
* @constant
* @type {Color}
*/
@@ -1481,7 +1373,6 @@ Color.INDIANRED = Object.freeze(Color.fromCssColorString("#CD5C5C"));
/**
* An immutable Color instance initialized to CSS color #4B0082
*
- *
* @constant
* @type {Color}
*/
@@ -1490,7 +1381,6 @@ Color.INDIGO = Object.freeze(Color.fromCssColorString("#4B0082"));
/**
* An immutable Color instance initialized to CSS color #FFFFF0
*
- *
* @constant
* @type {Color}
*/
@@ -1499,7 +1389,6 @@ Color.IVORY = Object.freeze(Color.fromCssColorString("#FFFFF0"));
/**
* An immutable Color instance initialized to CSS color #F0E68C
*
- *
* @constant
* @type {Color}
*/
@@ -1508,7 +1397,6 @@ Color.KHAKI = Object.freeze(Color.fromCssColorString("#F0E68C"));
/**
* An immutable Color instance initialized to CSS color #E6E6FA
*
- *
* @constant
* @type {Color}
*/
@@ -1517,7 +1405,6 @@ Color.LAVENDER = Object.freeze(Color.fromCssColorString("#E6E6FA"));
/**
* An immutable Color instance initialized to CSS color #FFF0F5
*
- *
* @constant
* @type {Color}
*/
@@ -1526,7 +1413,6 @@ Color.LAVENDAR_BLUSH = Object.freeze(Color.fromCssColorString("#FFF0F5"));
/**
* An immutable Color instance initialized to CSS color #7CFC00
*
- *
* @constant
* @type {Color}
*/
@@ -1535,7 +1421,6 @@ Color.LAWNGREEN = Object.freeze(Color.fromCssColorString("#7CFC00"));
/**
* An immutable Color instance initialized to CSS color #FFFACD
*
- *
* @constant
* @type {Color}
*/
@@ -1544,7 +1429,6 @@ Color.LEMONCHIFFON = Object.freeze(Color.fromCssColorString("#FFFACD"));
/**
* An immutable Color instance initialized to CSS color #ADD8E6
*
- *
* @constant
* @type {Color}
*/
@@ -1553,7 +1437,6 @@ Color.LIGHTBLUE = Object.freeze(Color.fromCssColorString("#ADD8E6"));
/**
* An immutable Color instance initialized to CSS color #F08080
*
- *
* @constant
* @type {Color}
*/
@@ -1562,7 +1445,6 @@ Color.LIGHTCORAL = Object.freeze(Color.fromCssColorString("#F08080"));
/**
* An immutable Color instance initialized to CSS color #E0FFFF
*
- *
* @constant
* @type {Color}
*/
@@ -1571,7 +1453,6 @@ Color.LIGHTCYAN = Object.freeze(Color.fromCssColorString("#E0FFFF"));
/**
* An immutable Color instance initialized to CSS color #FAFAD2
*
- *
* @constant
* @type {Color}
*/
@@ -1580,7 +1461,6 @@ Color.LIGHTGOLDENRODYELLOW = Object.freeze(Color.fromCssColorString("#FAFAD2"));
/**
* An immutable Color instance initialized to CSS color #D3D3D3
*
- *
* @constant
* @type {Color}
*/
@@ -1589,7 +1469,6 @@ Color.LIGHTGRAY = Object.freeze(Color.fromCssColorString("#D3D3D3"));
/**
* An immutable Color instance initialized to CSS color #90EE90
*
- *
* @constant
* @type {Color}
*/
@@ -1598,7 +1477,6 @@ Color.LIGHTGREEN = Object.freeze(Color.fromCssColorString("#90EE90"));
/**
* An immutable Color instance initialized to CSS color #D3D3D3
*
- *
* @constant
* @type {Color}
*/
@@ -1607,7 +1485,6 @@ Color.LIGHTGREY = Color.LIGHTGRAY;
/**
* An immutable Color instance initialized to CSS color #FFB6C1
*
- *
* @constant
* @type {Color}
*/
@@ -1616,7 +1493,6 @@ Color.LIGHTPINK = Object.freeze(Color.fromCssColorString("#FFB6C1"));
/**
* An immutable Color instance initialized to CSS color #20B2AA
*
- *
* @constant
* @type {Color}
*/
@@ -1625,7 +1501,6 @@ Color.LIGHTSEAGREEN = Object.freeze(Color.fromCssColorString("#20B2AA"));
/**
* An immutable Color instance initialized to CSS color #87CEFA
*
- *
* @constant
* @type {Color}
*/
@@ -1634,7 +1509,6 @@ Color.LIGHTSKYBLUE = Object.freeze(Color.fromCssColorString("#87CEFA"));
/**
* An immutable Color instance initialized to CSS color #778899
*
- *
* @constant
* @type {Color}
*/
@@ -1643,7 +1517,6 @@ Color.LIGHTSLATEGRAY = Object.freeze(Color.fromCssColorString("#778899"));
/**
* An immutable Color instance initialized to CSS color #778899
*
- *
* @constant
* @type {Color}
*/
@@ -1652,7 +1525,6 @@ Color.LIGHTSLATEGREY = Color.LIGHTSLATEGRAY;
/**
* An immutable Color instance initialized to CSS color #B0C4DE
*
- *
* @constant
* @type {Color}
*/
@@ -1661,7 +1533,6 @@ Color.LIGHTSTEELBLUE = Object.freeze(Color.fromCssColorString("#B0C4DE"));
/**
* An immutable Color instance initialized to CSS color #FFFFE0
*
- *
* @constant
* @type {Color}
*/
@@ -1670,7 +1541,6 @@ Color.LIGHTYELLOW = Object.freeze(Color.fromCssColorString("#FFFFE0"));
/**
* An immutable Color instance initialized to CSS color #00FF00
*
- *
* @constant
* @type {Color}
*/
@@ -1679,7 +1549,6 @@ Color.LIME = Object.freeze(Color.fromCssColorString("#00FF00"));
/**
* An immutable Color instance initialized to CSS color #32CD32
*
- *
* @constant
* @type {Color}
*/
@@ -1688,7 +1557,6 @@ Color.LIMEGREEN = Object.freeze(Color.fromCssColorString("#32CD32"));
/**
* An immutable Color instance initialized to CSS color #FAF0E6
*
- *
* @constant
* @type {Color}
*/
@@ -1697,7 +1565,6 @@ Color.LINEN = Object.freeze(Color.fromCssColorString("#FAF0E6"));
/**
* An immutable Color instance initialized to CSS color #FF00FF
*
- *
* @constant
* @type {Color}
*/
@@ -1706,7 +1573,6 @@ Color.MAGENTA = Object.freeze(Color.fromCssColorString("#FF00FF"));
/**
* An immutable Color instance initialized to CSS color #800000
*
- *
* @constant
* @type {Color}
*/
@@ -1715,7 +1581,6 @@ Color.MAROON = Object.freeze(Color.fromCssColorString("#800000"));
/**
* An immutable Color instance initialized to CSS color #66CDAA
*
- *
* @constant
* @type {Color}
*/
@@ -1724,7 +1589,6 @@ Color.MEDIUMAQUAMARINE = Object.freeze(Color.fromCssColorString("#66CDAA"));
/**
* An immutable Color instance initialized to CSS color #0000CD
*
- *
* @constant
* @type {Color}
*/
@@ -1733,7 +1597,6 @@ Color.MEDIUMBLUE = Object.freeze(Color.fromCssColorString("#0000CD"));
/**
* An immutable Color instance initialized to CSS color #BA55D3
*
- *
* @constant
* @type {Color}
*/
@@ -1742,7 +1605,6 @@ Color.MEDIUMORCHID = Object.freeze(Color.fromCssColorString("#BA55D3"));
/**
* An immutable Color instance initialized to CSS color #9370DB
*
- *
* @constant
* @type {Color}
*/
@@ -1751,7 +1613,6 @@ Color.MEDIUMPURPLE = Object.freeze(Color.fromCssColorString("#9370DB"));
/**
* An immutable Color instance initialized to CSS color #3CB371
*
- *
* @constant
* @type {Color}
*/
@@ -1760,7 +1621,6 @@ Color.MEDIUMSEAGREEN = Object.freeze(Color.fromCssColorString("#3CB371"));
/**
* An immutable Color instance initialized to CSS color #7B68EE
*
- *
* @constant
* @type {Color}
*/
@@ -1769,7 +1629,6 @@ Color.MEDIUMSLATEBLUE = Object.freeze(Color.fromCssColorString("#7B68EE"));
/**
* An immutable Color instance initialized to CSS color #00FA9A
*
- *
* @constant
* @type {Color}
*/
@@ -1778,7 +1637,6 @@ Color.MEDIUMSPRINGGREEN = Object.freeze(Color.fromCssColorString("#00FA9A"));
/**
* An immutable Color instance initialized to CSS color #48D1CC
*
- *
* @constant
* @type {Color}
*/
@@ -1787,7 +1645,6 @@ Color.MEDIUMTURQUOISE = Object.freeze(Color.fromCssColorString("#48D1CC"));
/**
* An immutable Color instance initialized to CSS color #C71585
*
- *
* @constant
* @type {Color}
*/
@@ -1796,7 +1653,6 @@ Color.MEDIUMVIOLETRED = Object.freeze(Color.fromCssColorString("#C71585"));
/**
* An immutable Color instance initialized to CSS color #191970
*
- *
* @constant
* @type {Color}
*/
@@ -1805,7 +1661,6 @@ Color.MIDNIGHTBLUE = Object.freeze(Color.fromCssColorString("#191970"));
/**
* An immutable Color instance initialized to CSS color #F5FFFA
*
- *
* @constant
* @type {Color}
*/
@@ -1814,7 +1669,6 @@ Color.MINTCREAM = Object.freeze(Color.fromCssColorString("#F5FFFA"));
/**
* An immutable Color instance initialized to CSS color #FFE4E1
*
- *
* @constant
* @type {Color}
*/
@@ -1823,7 +1677,6 @@ Color.MISTYROSE = Object.freeze(Color.fromCssColorString("#FFE4E1"));
/**
* An immutable Color instance initialized to CSS color #FFE4B5
*
- *
* @constant
* @type {Color}
*/
@@ -1832,7 +1685,6 @@ Color.MOCCASIN = Object.freeze(Color.fromCssColorString("#FFE4B5"));
/**
* An immutable Color instance initialized to CSS color #FFDEAD
*
- *
* @constant
* @type {Color}
*/
@@ -1841,7 +1693,6 @@ Color.NAVAJOWHITE = Object.freeze(Color.fromCssColorString("#FFDEAD"));
/**
* An immutable Color instance initialized to CSS color #000080
*
- *
* @constant
* @type {Color}
*/
@@ -1850,7 +1701,6 @@ Color.NAVY = Object.freeze(Color.fromCssColorString("#000080"));
/**
* An immutable Color instance initialized to CSS color #FDF5E6
*
- *
* @constant
* @type {Color}
*/
@@ -1859,7 +1709,6 @@ Color.OLDLACE = Object.freeze(Color.fromCssColorString("#FDF5E6"));
/**
* An immutable Color instance initialized to CSS color #808000
*
- *
* @constant
* @type {Color}
*/
@@ -1868,7 +1717,6 @@ Color.OLIVE = Object.freeze(Color.fromCssColorString("#808000"));
/**
* An immutable Color instance initialized to CSS color #6B8E23
*
- *
* @constant
* @type {Color}
*/
@@ -1877,7 +1725,6 @@ Color.OLIVEDRAB = Object.freeze(Color.fromCssColorString("#6B8E23"));
/**
* An immutable Color instance initialized to CSS color #FFA500
*
- *
* @constant
* @type {Color}
*/
@@ -1886,7 +1733,6 @@ Color.ORANGE = Object.freeze(Color.fromCssColorString("#FFA500"));
/**
* An immutable Color instance initialized to CSS color #FF4500
*
- *
* @constant
* @type {Color}
*/
@@ -1895,7 +1741,6 @@ Color.ORANGERED = Object.freeze(Color.fromCssColorString("#FF4500"));
/**
* An immutable Color instance initialized to CSS color #DA70D6
*
- *
* @constant
* @type {Color}
*/
@@ -1904,7 +1749,6 @@ Color.ORCHID = Object.freeze(Color.fromCssColorString("#DA70D6"));
/**
* An immutable Color instance initialized to CSS color #EEE8AA
*
- *
* @constant
* @type {Color}
*/
@@ -1913,7 +1757,6 @@ Color.PALEGOLDENROD = Object.freeze(Color.fromCssColorString("#EEE8AA"));
/**
* An immutable Color instance initialized to CSS color #98FB98
*
- *
* @constant
* @type {Color}
*/
@@ -1922,7 +1765,6 @@ Color.PALEGREEN = Object.freeze(Color.fromCssColorString("#98FB98"));
/**
* An immutable Color instance initialized to CSS color #AFEEEE
*
- *
* @constant
* @type {Color}
*/
@@ -1931,7 +1773,6 @@ Color.PALETURQUOISE = Object.freeze(Color.fromCssColorString("#AFEEEE"));
/**
* An immutable Color instance initialized to CSS color #DB7093
*
- *
* @constant
* @type {Color}
*/
@@ -1940,7 +1781,6 @@ Color.PALEVIOLETRED = Object.freeze(Color.fromCssColorString("#DB7093"));
/**
* An immutable Color instance initialized to CSS color #FFEFD5
*
- *
* @constant
* @type {Color}
*/
@@ -1949,7 +1789,6 @@ Color.PAPAYAWHIP = Object.freeze(Color.fromCssColorString("#FFEFD5"));
/**
* An immutable Color instance initialized to CSS color #FFDAB9
*
- *
* @constant
* @type {Color}
*/
@@ -1958,7 +1797,6 @@ Color.PEACHPUFF = Object.freeze(Color.fromCssColorString("#FFDAB9"));
/**
* An immutable Color instance initialized to CSS color #CD853F
*
- *
* @constant
* @type {Color}
*/
@@ -1967,7 +1805,6 @@ Color.PERU = Object.freeze(Color.fromCssColorString("#CD853F"));
/**
* An immutable Color instance initialized to CSS color #FFC0CB
*
- *
* @constant
* @type {Color}
*/
@@ -1976,7 +1813,6 @@ Color.PINK = Object.freeze(Color.fromCssColorString("#FFC0CB"));
/**
* An immutable Color instance initialized to CSS color #DDA0DD
*
- *
* @constant
* @type {Color}
*/
@@ -1985,7 +1821,6 @@ Color.PLUM = Object.freeze(Color.fromCssColorString("#DDA0DD"));
/**
* An immutable Color instance initialized to CSS color #B0E0E6
*
- *
* @constant
* @type {Color}
*/
@@ -1994,7 +1829,6 @@ Color.POWDERBLUE = Object.freeze(Color.fromCssColorString("#B0E0E6"));
/**
* An immutable Color instance initialized to CSS color #800080
*
- *
* @constant
* @type {Color}
*/
@@ -2003,7 +1837,6 @@ Color.PURPLE = Object.freeze(Color.fromCssColorString("#800080"));
/**
* An immutable Color instance initialized to CSS color #FF0000
*
- *
* @constant
* @type {Color}
*/
@@ -2012,7 +1845,6 @@ Color.RED = Object.freeze(Color.fromCssColorString("#FF0000"));
/**
* An immutable Color instance initialized to CSS color #BC8F8F
*
- *
* @constant
* @type {Color}
*/
@@ -2021,7 +1853,6 @@ Color.ROSYBROWN = Object.freeze(Color.fromCssColorString("#BC8F8F"));
/**
* An immutable Color instance initialized to CSS color #4169E1
*
- *
* @constant
* @type {Color}
*/
@@ -2030,7 +1861,6 @@ Color.ROYALBLUE = Object.freeze(Color.fromCssColorString("#4169E1"));
/**
* An immutable Color instance initialized to CSS color #8B4513
*
- *
* @constant
* @type {Color}
*/
@@ -2039,7 +1869,6 @@ Color.SADDLEBROWN = Object.freeze(Color.fromCssColorString("#8B4513"));
/**
* An immutable Color instance initialized to CSS color #FA8072
*
- *
* @constant
* @type {Color}
*/
@@ -2048,7 +1877,6 @@ Color.SALMON = Object.freeze(Color.fromCssColorString("#FA8072"));
/**
* An immutable Color instance initialized to CSS color #F4A460
*
- *
* @constant
* @type {Color}
*/
@@ -2057,7 +1885,6 @@ Color.SANDYBROWN = Object.freeze(Color.fromCssColorString("#F4A460"));
/**
* An immutable Color instance initialized to CSS color #2E8B57
*
- *
* @constant
* @type {Color}
*/
@@ -2066,7 +1893,6 @@ Color.SEAGREEN = Object.freeze(Color.fromCssColorString("#2E8B57"));
/**
* An immutable Color instance initialized to CSS color #FFF5EE
*
- *
* @constant
* @type {Color}
*/
@@ -2075,7 +1901,6 @@ Color.SEASHELL = Object.freeze(Color.fromCssColorString("#FFF5EE"));
/**
* An immutable Color instance initialized to CSS color #A0522D
*
- *
* @constant
* @type {Color}
*/
@@ -2084,7 +1909,6 @@ Color.SIENNA = Object.freeze(Color.fromCssColorString("#A0522D"));
/**
* An immutable Color instance initialized to CSS color #C0C0C0
*
- *
* @constant
* @type {Color}
*/
@@ -2093,7 +1917,6 @@ Color.SILVER = Object.freeze(Color.fromCssColorString("#C0C0C0"));
/**
* An immutable Color instance initialized to CSS color #87CEEB
*
- *
* @constant
* @type {Color}
*/
@@ -2102,7 +1925,6 @@ Color.SKYBLUE = Object.freeze(Color.fromCssColorString("#87CEEB"));
/**
* An immutable Color instance initialized to CSS color #6A5ACD
*
- *
* @constant
* @type {Color}
*/
@@ -2111,7 +1933,6 @@ Color.SLATEBLUE = Object.freeze(Color.fromCssColorString("#6A5ACD"));
/**
* An immutable Color instance initialized to CSS color #708090
*
- *
* @constant
* @type {Color}
*/
@@ -2120,7 +1941,6 @@ Color.SLATEGRAY = Object.freeze(Color.fromCssColorString("#708090"));
/**
* An immutable Color instance initialized to CSS color #708090
*
- *
* @constant
* @type {Color}
*/
@@ -2129,7 +1949,6 @@ Color.SLATEGREY = Color.SLATEGRAY;
/**
* An immutable Color instance initialized to CSS color #FFFAFA
*
- *
* @constant
* @type {Color}
*/
@@ -2138,7 +1957,6 @@ Color.SNOW = Object.freeze(Color.fromCssColorString("#FFFAFA"));
/**
* An immutable Color instance initialized to CSS color #00FF7F
*
- *
* @constant
* @type {Color}
*/
@@ -2147,7 +1965,6 @@ Color.SPRINGGREEN = Object.freeze(Color.fromCssColorString("#00FF7F"));
/**
* An immutable Color instance initialized to CSS color #4682B4
*
- *
* @constant
* @type {Color}
*/
@@ -2156,7 +1973,6 @@ Color.STEELBLUE = Object.freeze(Color.fromCssColorString("#4682B4"));
/**
* An immutable Color instance initialized to CSS color #D2B48C
*
- *
* @constant
* @type {Color}
*/
@@ -2165,7 +1981,6 @@ Color.TAN = Object.freeze(Color.fromCssColorString("#D2B48C"));
/**
* An immutable Color instance initialized to CSS color #008080
*
- *
* @constant
* @type {Color}
*/
@@ -2174,7 +1989,6 @@ Color.TEAL = Object.freeze(Color.fromCssColorString("#008080"));
/**
* An immutable Color instance initialized to CSS color #D8BFD8
*
- *
* @constant
* @type {Color}
*/
@@ -2183,7 +1997,6 @@ Color.THISTLE = Object.freeze(Color.fromCssColorString("#D8BFD8"));
/**
* An immutable Color instance initialized to CSS color #FF6347
*
- *
* @constant
* @type {Color}
*/
@@ -2192,7 +2005,6 @@ Color.TOMATO = Object.freeze(Color.fromCssColorString("#FF6347"));
/**
* An immutable Color instance initialized to CSS color #40E0D0
*
- *
* @constant
* @type {Color}
*/
@@ -2201,7 +2013,6 @@ Color.TURQUOISE = Object.freeze(Color.fromCssColorString("#40E0D0"));
/**
* An immutable Color instance initialized to CSS color #EE82EE
*
- *
* @constant
* @type {Color}
*/
@@ -2210,7 +2021,6 @@ Color.VIOLET = Object.freeze(Color.fromCssColorString("#EE82EE"));
/**
* An immutable Color instance initialized to CSS color #F5DEB3
*
- *
* @constant
* @type {Color}
*/
@@ -2219,7 +2029,6 @@ Color.WHEAT = Object.freeze(Color.fromCssColorString("#F5DEB3"));
/**
* An immutable Color instance initialized to CSS color #FFFFFF
*
- *
* @constant
* @type {Color}
*/
@@ -2228,7 +2037,6 @@ Color.WHITE = Object.freeze(Color.fromCssColorString("#FFFFFF"));
/**
* An immutable Color instance initialized to CSS color #F5F5F5
*
- *
* @constant
* @type {Color}
*/
@@ -2237,7 +2045,6 @@ Color.WHITESMOKE = Object.freeze(Color.fromCssColorString("#F5F5F5"));
/**
* An immutable Color instance initialized to CSS color #FFFF00
*
- *
* @constant
* @type {Color}
*/
@@ -2246,7 +2053,6 @@ Color.YELLOW = Object.freeze(Color.fromCssColorString("#FFFF00"));
/**
* An immutable Color instance initialized to CSS color #9ACD32
*
- *
* @constant
* @type {Color}
*/
@@ -2255,7 +2061,6 @@ Color.YELLOWGREEN = Object.freeze(Color.fromCssColorString("#9ACD32"));
/**
* An immutable Color instance initialized to CSS transparent.
*
- *
* @constant
* @type {Color}
*/
diff --git a/packages/engine/Source/Core/ColorGeometryInstanceAttribute.js b/packages/engine/Source/Core/ColorGeometryInstanceAttribute.js
index 1b409b4255b3..652247319d7a 100644
--- a/packages/engine/Source/Core/ColorGeometryInstanceAttribute.js
+++ b/packages/engine/Source/Core/ColorGeometryInstanceAttribute.js
@@ -6,16 +6,12 @@ import DeveloperError from "./DeveloperError.js";
/**
* Value and type information for per-instance geometry color.
- *
* @alias ColorGeometryInstanceAttribute
- * @constructor
- *
+ * @class
* @param {number} [red=1.0] The red component.
* @param {number} [green=1.0] The green component.
* @param {number} [blue=1.0] The blue component.
* @param {number} [alpha=1.0] The alpha component.
- *
- *
* @example
* const instance = new Cesium.GeometryInstance({
* geometry : Cesium.BoxGeometry.fromDimensions({
@@ -28,7 +24,6 @@ import DeveloperError from "./DeveloperError.js";
* color : new Cesium.ColorGeometryInstanceAttribute(red, green, blue, alpha)
* }
* });
- *
* @see GeometryInstance
* @see GeometryInstanceAttribute
*/
@@ -40,9 +35,7 @@ function ColorGeometryInstanceAttribute(red, green, blue, alpha) {
/**
* The values for the attributes stored in a typed array.
- *
* @type Uint8Array
- *
* @default [255, 255, 255, 255]
*/
this.value = new Uint8Array([
@@ -57,12 +50,9 @@ Object.defineProperties(ColorGeometryInstanceAttribute.prototype, {
/**
* The datatype of each component in the attribute, e.g., individual elements in
* {@link ColorGeometryInstanceAttribute#value}.
- *
* @memberof ColorGeometryInstanceAttribute.prototype
- *
* @type {ComponentDatatype}
* @readonly
- *
* @default {@link ComponentDatatype.UNSIGNED_BYTE}
*/
componentDatatype: {
@@ -73,12 +63,9 @@ Object.defineProperties(ColorGeometryInstanceAttribute.prototype, {
/**
* The number of components in the attributes, i.e., {@link ColorGeometryInstanceAttribute#value}.
- *
* @memberof ColorGeometryInstanceAttribute.prototype
- *
* @type {number}
* @readonly
- *
* @default 4
*/
componentsPerAttribute: {
@@ -91,12 +78,9 @@ Object.defineProperties(ColorGeometryInstanceAttribute.prototype, {
* When true and componentDatatype is an integer format,
* indicate that the components should be mapped to the range [0, 1] (unsigned)
* or [-1, 1] (signed) when they are accessed as floating-point for rendering.
- *
* @memberof ColorGeometryInstanceAttribute.prototype
- *
* @type {boolean}
* @readonly
- *
* @default true
*/
normalize: {
@@ -108,10 +92,8 @@ Object.defineProperties(ColorGeometryInstanceAttribute.prototype, {
/**
* Creates a new {@link ColorGeometryInstanceAttribute} instance given the provided {@link Color}.
- *
* @param {Color} color The color.
* @returns {ColorGeometryInstanceAttribute} The new {@link ColorGeometryInstanceAttribute} instance.
- *
* @example
* const instance = new Cesium.GeometryInstance({
* geometry : geometry,
@@ -137,12 +119,9 @@ ColorGeometryInstanceAttribute.fromColor = function (color) {
/**
* Converts a color to a typed array that can be used to assign a color attribute.
- *
* @param {Color} color The color.
* @param {Uint8Array} [result] The array to store the result in, if undefined a new instance will be created.
- *
* @returns {Uint8Array} The modified result parameter or a new instance if result was undefined.
- *
* @example
* const attributes = primitive.getGeometryInstanceAttributes('an id');
* attributes.color = Cesium.ColorGeometryInstanceAttribute.toValue(Cesium.Color.AQUA, attributes.color);
@@ -163,7 +142,6 @@ ColorGeometryInstanceAttribute.toValue = function (color, result) {
/**
* Compares the provided ColorGeometryInstanceAttributes and returns
* true if they are equal, false otherwise.
- *
* @param {ColorGeometryInstanceAttribute} [left] The first ColorGeometryInstanceAttribute.
* @param {ColorGeometryInstanceAttribute} [right] The second ColorGeometryInstanceAttribute.
* @returns {boolean} true if left and right are equal, false otherwise.
diff --git a/packages/engine/Source/Core/ComponentDatatype.js b/packages/engine/Source/Core/ComponentDatatype.js
index 9e92afe2696b..b1fd596d6e84 100644
--- a/packages/engine/Source/Core/ComponentDatatype.js
+++ b/packages/engine/Source/Core/ComponentDatatype.js
@@ -6,14 +6,12 @@ import WebGLConstants from "./WebGLConstants.js";
/**
* WebGL component datatypes. Components are intrinsics,
* which form attributes, which form vertices.
- *
* @enum {number}
*/
const ComponentDatatype = {
/**
* 8-bit signed byte corresponding to gl.BYTE and the type
* of an element in Int8Array.
- *
* @type {number}
* @constant
*/
@@ -22,7 +20,6 @@ const ComponentDatatype = {
/**
* 8-bit unsigned byte corresponding to UNSIGNED_BYTE and the type
* of an element in Uint8Array.
- *
* @type {number}
* @constant
*/
@@ -31,7 +28,6 @@ const ComponentDatatype = {
/**
* 16-bit signed short corresponding to SHORT and the type
* of an element in Int16Array.
- *
* @type {number}
* @constant
*/
@@ -40,7 +36,6 @@ const ComponentDatatype = {
/**
* 16-bit unsigned short corresponding to UNSIGNED_SHORT and the type
* of an element in Uint16Array.
- *
* @type {number}
* @constant
*/
@@ -49,9 +44,7 @@ const ComponentDatatype = {
/**
* 32-bit signed int corresponding to INT and the type
* of an element in Int32Array.
- *
- * @memberOf ComponentDatatype
- *
+ * @memberof ComponentDatatype
* @type {number}
* @constant
*/
@@ -60,9 +53,7 @@ const ComponentDatatype = {
/**
* 32-bit unsigned int corresponding to UNSIGNED_INT and the type
* of an element in Uint32Array.
- *
- * @memberOf ComponentDatatype
- *
+ * @memberof ComponentDatatype
* @type {number}
* @constant
*/
@@ -71,7 +62,6 @@ const ComponentDatatype = {
/**
* 32-bit floating-point corresponding to FLOAT and the type
* of an element in Float32Array.
- *
* @type {number}
* @constant
*/
@@ -81,9 +71,7 @@ const ComponentDatatype = {
* 64-bit floating-point corresponding to gl.DOUBLE (in Desktop OpenGL;
* this is not supported in WebGL, and is emulated in Cesium via {@link GeometryPipeline.encodeAttribute})
* and the type of an element in Float64Array.
- *
- * @memberOf ComponentDatatype
- *
+ * @memberof ComponentDatatype
* @type {number}
* @constant
* @default 0x140A
@@ -93,12 +81,9 @@ const ComponentDatatype = {
/**
* Returns the size, in bytes, of the corresponding datatype.
- *
* @param {ComponentDatatype} componentDatatype The component datatype to get the size of.
* @returns {number} The size in bytes.
- *
- * @exception {DeveloperError} componentDatatype is not a valid value.
- *
+ * @throws {DeveloperError} componentDatatype is not a valid value.
* @example
* // Returns Int8Array.BYTES_PER_ELEMENT
* const size = Cesium.ComponentDatatype.getSizeInBytes(Cesium.ComponentDatatype.BYTE);
@@ -136,7 +121,6 @@ ComponentDatatype.getSizeInBytes = function (componentDatatype) {
/**
* Gets the {@link ComponentDatatype} for the provided TypedArray instance.
- *
* @param {Int8Array|Uint8Array|Int16Array|Uint16Array|Int32Array|Uint32Array|Float32Array|Float64Array} array The typed array.
* @returns {ComponentDatatype} The ComponentDatatype for the provided array, or undefined if the array is not a TypedArray.
*/
@@ -175,10 +159,8 @@ ComponentDatatype.fromTypedArray = function (array) {
/**
* Validates that the provided component datatype is a valid {@link ComponentDatatype}
- *
* @param {ComponentDatatype} componentDatatype The component datatype to validate.
* @returns {boolean} true if the provided component datatype is a valid value; otherwise, false.
- *
* @example
* if (!Cesium.ComponentDatatype.validate(componentDatatype)) {
* throw new Cesium.DeveloperError('componentDatatype must be a valid value.');
@@ -200,13 +182,10 @@ ComponentDatatype.validate = function (componentDatatype) {
/**
* Creates a typed array corresponding to component data type.
- *
* @param {ComponentDatatype} componentDatatype The component data type.
* @param {number|Array} valuesOrLength The length of the array to create or an array.
* @returns {Int8Array|Uint8Array|Int16Array|Uint16Array|Int32Array|Uint32Array|Float32Array|Float64Array} A typed array.
- *
- * @exception {DeveloperError} componentDatatype is not a valid value.
- *
+ * @throws {DeveloperError} componentDatatype is not a valid value.
* @example
* // creates a Float32Array with length of 100
* const typedArray = Cesium.ComponentDatatype.createTypedArray(Cesium.ComponentDatatype.FLOAT, 100);
@@ -250,14 +229,12 @@ ComponentDatatype.createTypedArray = function (
/**
* Creates a typed view of an array of bytes.
- *
* @param {ComponentDatatype} componentDatatype The type of the view to create.
* @param {ArrayBuffer} buffer The buffer storage to use for the view.
* @param {number} [byteOffset] The offset, in bytes, to the first element in the view.
* @param {number} [length] The number of elements in the view.
* @returns {Int8Array|Uint8Array|Int16Array|Uint16Array|Int32Array|Uint32Array|Float32Array|Float64Array} A typed array view of the buffer.
- *
- * @exception {DeveloperError} componentDatatype is not a valid value.
+ * @throws {DeveloperError} componentDatatype is not a valid value.
*/
ComponentDatatype.createArrayBufferView = function (
componentDatatype,
@@ -307,11 +284,9 @@ ComponentDatatype.createArrayBufferView = function (
/**
* Get the ComponentDatatype from its name.
- *
* @param {string} name The name of the ComponentDatatype.
* @returns {ComponentDatatype} The ComponentDatatype.
- *
- * @exception {DeveloperError} name is not a valid value.
+ * @throws {DeveloperError} name is not a valid value.
*/
ComponentDatatype.fromName = function (name) {
switch (name) {
diff --git a/packages/engine/Source/Core/CompressedTextureBuffer.js b/packages/engine/Source/Core/CompressedTextureBuffer.js
index 632c4b9a757f..e313b89fccb8 100644
--- a/packages/engine/Source/Core/CompressedTextureBuffer.js
+++ b/packages/engine/Source/Core/CompressedTextureBuffer.js
@@ -3,8 +3,7 @@ import defined from "./defined.js";
/**
* Describes a compressed texture and contains a compressed texture buffer.
* @alias CompressedTextureBuffer
- * @constructor
- *
+ * @class
* @param {PixelFormat} internalFormat The pixel format of the compressed texture.
* @param {PixelDatatype} pixelDatatype The pixel datatype of the compressed texture.
* @param {number} width The width of the texture.
@@ -85,9 +84,8 @@ Object.defineProperties(CompressedTextureBuffer.prototype, {
/**
* Creates a shallow clone of a compressed texture buffer.
- *
* @param {CompressedTextureBuffer} object The compressed texture buffer to be cloned.
- * @return {CompressedTextureBuffer} A shallow clone of the compressed texture buffer.
+ * @returns {CompressedTextureBuffer} A shallow clone of the compressed texture buffer.
*/
CompressedTextureBuffer.clone = function (object) {
if (!defined(object)) {
@@ -105,8 +103,7 @@ CompressedTextureBuffer.clone = function (object) {
/**
* Creates a shallow clone of this compressed texture buffer.
- *
- * @return {CompressedTextureBuffer} A shallow clone of the compressed texture buffer.
+ * @returns {CompressedTextureBuffer} A shallow clone of the compressed texture buffer.
*/
CompressedTextureBuffer.prototype.clone = function () {
return CompressedTextureBuffer.clone(this);
diff --git a/packages/engine/Source/Core/ConstantSpline.js b/packages/engine/Source/Core/ConstantSpline.js
index 032003de3a3f..745104c71a82 100644
--- a/packages/engine/Source/Core/ConstantSpline.js
+++ b/packages/engine/Source/Core/ConstantSpline.js
@@ -5,18 +5,14 @@ import Spline from "./Spline.js";
/**
* A spline that evaluates to a constant value. Although this follows the {@link Spline} interface,
* it does not maintain an internal array of times since its value never changes.
- *
* @alias ConstantSpline
- * @constructor
- *
+ * @class
* @param {number|Cartesian3|Quaternion} value The constant value that the spline evaluates to.
- *
* @example
* const position = new Cesium.Cartesian3(1.0, 2.0, 3.0);
* const spline = new Cesium.ConstantSpline(position);
*
* const p0 = spline.evaluate(0.0);
- *
* @see LinearSpline
* @see HermiteSpline
* @see CatmullRomSpline
@@ -31,9 +27,7 @@ function ConstantSpline(value) {
Object.defineProperties(ConstantSpline.prototype, {
/**
* The constant value that the spline evaluates to.
- *
* @memberof ConstantSpline.prototype
- *
* @type {number|Cartesian3|Quaternion}
* @readonly
*/
@@ -50,10 +44,8 @@ Object.defineProperties(ConstantSpline.prototype, {
*
* Since a constant spline has no internal times array, this will throw an error.
* @function
- *
* @param {number} time The time.
- *
- * @exception {DeveloperError} findTimeInterval cannot be called on a ConstantSpline.
+ * @throws {DeveloperError} findTimeInterval cannot be called on a ConstantSpline.
*/
ConstantSpline.prototype.findTimeInterval = function (time) {
//>>includeStart('debug', pragmas.debug);
@@ -66,9 +58,8 @@ ConstantSpline.prototype.findTimeInterval = function (time) {
/**
* Wraps the given time to the period covered by the spline.
* @function
- *
* @param {number} time The time.
- * @return {number} The time, wrapped around to the updated animation.
+ * @returns {number} The time, wrapped around to the updated animation.
*/
ConstantSpline.prototype.wrapTime = function (time) {
//>>includeStart('debug', pragmas.debug);
@@ -81,9 +72,8 @@ ConstantSpline.prototype.wrapTime = function (time) {
/**
* Clamps the given time to the period covered by the spline.
* @function
- *
* @param {number} time The time.
- * @return {number} The time, clamped to the animation period.
+ * @returns {number} The time, clamped to the animation period.
*/
ConstantSpline.prototype.clampTime = function (time) {
//>>includeStart('debug', pragmas.debug);
@@ -96,7 +86,6 @@ ConstantSpline.prototype.clampTime = function (time) {
/**
* Evaluates the curve at a given time.
* @function
- *
* @param {number} time The time at which to evaluate the curve.
* @param {Cartesian3|Quaternion} [result] The object onto which to store the result.
* @returns {number|Cartesian3|Quaternion} The modified result parameter or the value that the constant spline represents.
diff --git a/packages/engine/Source/Core/CoplanarPolygonGeometry.js b/packages/engine/Source/Core/CoplanarPolygonGeometry.js
index 208a1059e051..a6ca17582027 100644
--- a/packages/engine/Source/Core/CoplanarPolygonGeometry.js
+++ b/packages/engine/Source/Core/CoplanarPolygonGeometry.js
@@ -223,17 +223,14 @@ function createGeometryFromPolygon(
/**
* A description of a polygon composed of arbitrary coplanar positions.
- *
* @alias CoplanarPolygonGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {PolygonHierarchy} options.polygonHierarchy A polygon hierarchy that can include holes.
* @param {number} [options.stRotation=0.0] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
* @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
* @param {PolygonHierarchy} [options.textureCoordinates] Texture coordinates as a {@link PolygonHierarchy} of {@link Cartesian2} points.
- *
* @example
* const polygonGeometry = new Cesium.CoplanarPolygonGeometry({
* polygonHierarchy: new Cesium.PolygonHierarchy(
@@ -244,7 +241,6 @@ function createGeometryFromPolygon(
* -80.0, 30.0, 0.0
* ]))
* });
- *
*/
function CoplanarPolygonGeometry(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
@@ -286,7 +282,6 @@ function CoplanarPolygonGeometry(options) {
/**
* A description of a coplanar polygon from an array of positions.
- *
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of positions that defined the corner points of the polygon.
* @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
@@ -294,7 +289,6 @@ function CoplanarPolygonGeometry(options) {
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
* @param {PolygonHierarchy} [options.textureCoordinates] Texture coordinates as a {@link PolygonHierarchy} of {@link Cartesian2} points.
* @returns {CoplanarPolygonGeometry}
- *
* @example
* // create a polygon from points
* const polygon = Cesium.CoplanarPolygonGeometry.fromPositions({
@@ -307,7 +301,6 @@ function CoplanarPolygonGeometry(options) {
* ])
* });
* const geometry = Cesium.PolygonGeometry.createGeometry(polygon);
- *
* @see PolygonGeometry#createGeometry
*/
CoplanarPolygonGeometry.fromPositions = function (options) {
@@ -331,11 +324,9 @@ CoplanarPolygonGeometry.fromPositions = function (options) {
/**
* Stores the provided instance into the provided array.
- *
* @param {CoplanarPolygonGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
CoplanarPolygonGeometry.pack = function (value, array, startingIndex) {
@@ -382,7 +373,6 @@ const scratchOptions = {
};
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {CoplanarPolygonGeometry} [result] The object into which to store the result.
@@ -446,7 +436,6 @@ CoplanarPolygonGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of an arbitrary coplanar polygon, including its vertices, indices, and a bounding sphere.
- *
* @param {CoplanarPolygonGeometry} polygonGeometry A description of the polygon.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/CoplanarPolygonOutlineGeometry.js b/packages/engine/Source/Core/CoplanarPolygonOutlineGeometry.js
index 0f9009676708..2e032cdd8df5 100644
--- a/packages/engine/Source/Core/CoplanarPolygonOutlineGeometry.js
+++ b/packages/engine/Source/Core/CoplanarPolygonOutlineGeometry.js
@@ -50,15 +50,11 @@ function createGeometryFromPositions(positions) {
/**
* A description of the outline of a polygon composed of arbitrary coplanar positions.
- *
* @alias CoplanarPolygonOutlineGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {PolygonHierarchy} options.polygonHierarchy A polygon hierarchy that can include holes.
- *
* @see CoplanarPolygonOutlineGeometry.createGeometry
- *
* @example
* const polygonOutline = new Cesium.CoplanarPolygonOutlineGeometry({
* positions : Cesium.Cartesian3.fromDegreesArrayHeights([
@@ -93,7 +89,6 @@ function CoplanarPolygonOutlineGeometry(options) {
/**
* A description of a coplanar polygon outline from an array of positions.
- *
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of positions that defined the corner points of the polygon.
* @returns {CoplanarPolygonOutlineGeometry}
@@ -115,11 +110,9 @@ CoplanarPolygonOutlineGeometry.fromPositions = function (options) {
/**
* Stores the provided instance into the provided array.
- *
* @param {CoplanarPolygonOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
CoplanarPolygonOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -147,7 +140,6 @@ const scratchOptions = {
};
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {CoplanarPolygonOutlineGeometry} [result] The object into which to store the result.
@@ -185,7 +177,6 @@ CoplanarPolygonOutlineGeometry.unpack = function (
/**
* Computes the geometric representation of an arbitrary coplanar polygon, including its vertices, indices, and a bounding sphere.
- *
* @param {CoplanarPolygonOutlineGeometry} polygonGeometry A description of the polygon.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/CornerType.js b/packages/engine/Source/Core/CornerType.js
index c2c4ed23e41f..cd3939763eb6 100644
--- a/packages/engine/Source/Core/CornerType.js
+++ b/packages/engine/Source/Core/CornerType.js
@@ -1,9 +1,7 @@
/**
* Style options for corners.
- *
* @demo The {@link https://sandcastle.cesium.com/index.html?src=Corridor.html&label=Geometries|Corridor Demo}
* demonstrates the three corner types, as used by {@link CorridorGraphics}.
- *
* @enum {number}
*/
const CornerType = {
diff --git a/packages/engine/Source/Core/CorridorGeometry.js b/packages/engine/Source/Core/CorridorGeometry.js
index e5dd6af5ab53..b9dd6fb84649 100644
--- a/packages/engine/Source/Core/CorridorGeometry.js
+++ b/packages/engine/Source/Core/CorridorGeometry.js
@@ -1043,10 +1043,8 @@ function computeRectangle(positions, ellipsoid, width, cornerType, result) {
/**
* A description of a corridor. Corridor geometry can be rendered with both {@link Primitive} and {@link GroundPrimitive}.
- *
* @alias CorridorGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of positions that define the center of the corridor.
* @param {number} options.width The distance between the edges of the corridor in meters.
@@ -1056,12 +1054,9 @@ function computeRectangle(positions, ellipsoid, width, cornerType, result) {
* @param {number} [options.extrudedHeight] The distance in meters between the ellipsoid surface and the extruded face.
* @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
* @param {CornerType} [options.cornerType=CornerType.ROUNDED] Determines the style of the corners.
- *
* @see CorridorGeometry.createGeometry
* @see Packable
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Corridor.html|Cesium Sandcastle Corridor Demo}
- *
* @example
* const corridor = new Cesium.CorridorGeometry({
* vertexFormat : Cesium.VertexFormat.POSITION_ONLY,
@@ -1116,11 +1111,9 @@ function CorridorGeometry(options) {
/**
* Stores the provided instance into the provided array.
- *
* @param {CorridorGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
CorridorGeometry.pack = function (value, array, startingIndex) {
@@ -1173,7 +1166,6 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {CorridorGeometry} [result] The object into which to store the result.
@@ -1242,14 +1234,12 @@ CorridorGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the bounding rectangle given the provided options
- *
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of positions that define the center of the corridor.
* @param {number} options.width The distance between the edges of the corridor in meters.
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
* @param {CornerType} [options.cornerType=CornerType.ROUNDED] Determines the style of the corners.
* @param {Rectangle} [result] An object in which to store the result.
- *
* @returns {Rectangle} The result rectangle.
*/
CorridorGeometry.computeRectangle = function (options, result) {
@@ -1270,7 +1260,6 @@ CorridorGeometry.computeRectangle = function (options, result) {
/**
* Computes the geometric representation of a corridor, including its vertices, indices, and a bounding sphere.
- *
* @param {CorridorGeometry} corridorGeometry A description of the corridor.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
@@ -1357,6 +1346,9 @@ CorridorGeometry.createGeometry = function (corridorGeometry) {
};
/**
+ * @param corridorGeometry
+ * @param minHeightFunc
+ * @param maxHeightFunc
* @private
*/
CorridorGeometry.createShadowVolume = function (
diff --git a/packages/engine/Source/Core/CorridorGeometryLibrary.js b/packages/engine/Source/Core/CorridorGeometryLibrary.js
index f564f6b85513..fb6fa0da93c4 100644
--- a/packages/engine/Source/Core/CorridorGeometryLibrary.js
+++ b/packages/engine/Source/Core/CorridorGeometryLibrary.js
@@ -178,6 +178,10 @@ function addShiftedPositions(positions, left, scalar, calculatedPositions) {
}
/**
+ * @param attribute
+ * @param value
+ * @param front
+ * @param back
* @private
*/
CorridorGeometryLibrary.addAttribute = function (
@@ -205,6 +209,7 @@ const scratchForwardProjection = new Cartesian3();
const scratchBackwardProjection = new Cartesian3();
/**
+ * @param params
* @private
*/
CorridorGeometryLibrary.computePositions = function (params) {
diff --git a/packages/engine/Source/Core/CorridorOutlineGeometry.js b/packages/engine/Source/Core/CorridorOutlineGeometry.js
index 66a39d04bd3b..8d0497f739fa 100644
--- a/packages/engine/Source/Core/CorridorOutlineGeometry.js
+++ b/packages/engine/Source/Core/CorridorOutlineGeometry.js
@@ -354,10 +354,8 @@ function computePositionsExtruded(params) {
/**
* A description of a corridor outline.
- *
* @alias CorridorOutlineGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of positions that define the center of the corridor outline.
* @param {number} options.width The distance between the edges of the corridor outline.
@@ -366,9 +364,7 @@ function computePositionsExtruded(params) {
* @param {number} [options.height=0] The distance in meters between the positions and the ellipsoid surface.
* @param {number} [options.extrudedHeight] The distance in meters between the extruded face and the ellipsoid surface.
* @param {CornerType} [options.cornerType=CornerType.ROUNDED] Determines the style of the corners.
- *
* @see CorridorOutlineGeometry.createGeometry
- *
* @example
* const corridor = new Cesium.CorridorOutlineGeometry({
* positions : Cesium.Cartesian3.fromDegreesArray([-72.0, 40.0, -70.0, 35.0]),
@@ -413,11 +409,9 @@ function CorridorOutlineGeometry(options) {
/**
* Stores the provided instance into the provided array.
- *
* @param {CorridorOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
CorridorOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -463,7 +457,6 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {CorridorOutlineGeometry} [result] The object into which to store the result.
@@ -520,7 +513,6 @@ CorridorOutlineGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of a corridor, including its vertices, indices, and a bounding sphere.
- *
* @param {CorridorOutlineGeometry} corridorOutlineGeometry A description of the corridor.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/Credit.js b/packages/engine/Source/Core/Credit.js
index 8a00b3fc993f..5759c68c9afe 100644
--- a/packages/engine/Source/Core/Credit.js
+++ b/packages/engine/Source/Core/Credit.js
@@ -10,12 +10,9 @@ const creditToId = {};
* A credit contains data pertaining to how to display attributions/credits for certain content on the screen.
* @param {string} html An string representing an html code snippet
* @param {boolean} [showOnScreen=false] If true, the credit will be visible in the main credit container. Otherwise, it will appear in a popover
- *
* @alias Credit
- * @constructor
- *
- * @exception {DeveloperError} html is required.
- *
+ * @class
+ * @throws {DeveloperError} html is required.
* @example
* // Create a credit with a tooltip, image and link
* const credit = new Cesium.Credit('');
@@ -60,7 +57,6 @@ Object.defineProperties(Credit.prototype, {
* @memberof Credit.prototype
* @type {number}
* @readonly
- *
* @private
*/
id: {
@@ -113,7 +109,6 @@ Object.defineProperties(Credit.prototype, {
/**
* Returns true if the credits are equal
- *
* @param {Credit} left The first credit
* @param {Credit} right The second credit
* @returns {boolean} true if left and right are equal, false otherwise.
@@ -130,7 +125,6 @@ Credit.equals = function (left, right) {
/**
* Returns true if the credits are equal
- *
* @param {Credit} credit The credit to compare to.
* @returns {boolean} true if left and right are equal, false otherwise.
*/
@@ -148,7 +142,7 @@ Credit.prototype.isIon = function () {
/**
* @private
* @param attribution
- * @return {Credit}
+ * @returns {Credit}
*/
Credit.getIonCredit = function (attribution) {
const showOnScreen =
@@ -160,7 +154,6 @@ Credit.getIonCredit = function (attribution) {
/**
* Duplicates a Credit instance.
- *
* @param {Credit} [credit] The Credit to duplicate.
* @returns {Credit} A new Credit instance that is a duplicate of the one provided. (Returns undefined if the credit is undefined)
*/
diff --git a/packages/engine/Source/Core/CubicRealPolynomial.js b/packages/engine/Source/Core/CubicRealPolynomial.js
index b199a322dcb4..04bf04ff5cbf 100644
--- a/packages/engine/Source/Core/CubicRealPolynomial.js
+++ b/packages/engine/Source/Core/CubicRealPolynomial.js
@@ -3,14 +3,12 @@ import QuadraticRealPolynomial from "./QuadraticRealPolynomial.js";
/**
* Defines functions for 3rd order polynomial functions of one variable with only real coefficients.
- *
* @namespace CubicRealPolynomial
*/
const CubicRealPolynomial = {};
/**
* Provides the discriminant of the cubic equation from the supplied coefficients.
- *
* @param {number} a The coefficient of the 3rd order monomial.
* @param {number} b The coefficient of the 2nd order monomial.
* @param {number} c The coefficient of the 1st order monomial.
@@ -154,7 +152,6 @@ function computeRealRoots(a, b, c, d) {
/**
* Provides the real valued roots of the cubic polynomial with the provided coefficients.
- *
* @param {number} a The coefficient of the 3rd order monomial.
* @param {number} b The coefficient of the 2nd order monomial.
* @param {number} c The coefficient of the 1st order monomial.
diff --git a/packages/engine/Source/Core/CullingVolume.js b/packages/engine/Source/Core/CullingVolume.js
index 080d4a0a7688..301b9b9885d1 100644
--- a/packages/engine/Source/Core/CullingVolume.js
+++ b/packages/engine/Source/Core/CullingVolume.js
@@ -8,10 +8,8 @@ import Plane from "./Plane.js";
/**
* The culling volume defined by planes.
- *
* @alias CullingVolume
- * @constructor
- *
+ * @class
* @param {Cartesian4[]} [planes] An array of clipping planes.
*/
function CullingVolume(planes) {
@@ -37,7 +35,6 @@ const scratchPlane = new Plane(new Cartesian3(1.0, 0.0, 0.0), 0.0);
/**
* Constructs a culling volume from a bounding sphere. Creates six planes that create a box containing the sphere.
* The planes are aligned to the x, y, and z axes in world coordinates.
- *
* @param {BoundingSphere} boundingSphere The bounding sphere used to create the culling volume.
* @param {CullingVolume} [result] The object onto which to store the result.
* @returns {CullingVolume} The culling volume created from the bounding sphere.
@@ -102,7 +99,6 @@ CullingVolume.fromBoundingSphere = function (boundingSphere, result) {
/**
* Determines whether a bounding volume intersects the culling volume.
- *
* @param {object} boundingVolume The bounding volume whose intersection with the culling volume is to be tested.
* @returns {Intersect} Intersect.OUTSIDE, Intersect.INTERSECTING, or Intersect.INSIDE.
*/
@@ -131,14 +127,12 @@ CullingVolume.prototype.computeVisibility = function (boundingVolume) {
/**
* Determines whether a bounding volume intersects the culling volume.
- *
* @param {object} boundingVolume The bounding volume whose intersection with the culling volume is to be tested.
* @param {number} parentPlaneMask A bit mask from the boundingVolume's parent's check against the same culling
* volume, such that if (planeMask & (1 << planeIndex) === 0), for k < 31, then
* the parent (and therefore this) volume is completely inside plane[planeIndex]
* and that plane check can be skipped.
* @returns {number} A plane mask as described above (which can be applied to this boundingVolume's children).
- *
* @private
*/
CullingVolume.prototype.computeVisibilityWithPlaneMask = function (
@@ -191,7 +185,6 @@ CullingVolume.prototype.computeVisibilityWithPlaneMask = function (
/**
* For plane masks (as used in {@link CullingVolume#computeVisibilityWithPlaneMask}), this special value
* represents the case where the object bounding volume is entirely outside the culling volume.
- *
* @type {number}
* @private
*/
@@ -200,7 +193,6 @@ CullingVolume.MASK_OUTSIDE = 0xffffffff;
/**
* For plane masks (as used in {@link CullingVolume.prototype.computeVisibilityWithPlaneMask}), this value
* represents the case where the object bounding volume is entirely inside the culling volume.
- *
* @type {number}
* @private
*/
@@ -209,7 +201,6 @@ CullingVolume.MASK_INSIDE = 0x00000000;
/**
* For plane masks (as used in {@link CullingVolume.prototype.computeVisibilityWithPlaneMask}), this value
* represents the case where the object bounding volume (may) intersect all planes of the culling volume.
- *
* @type {number}
* @private
*/
diff --git a/packages/engine/Source/Core/CustomHeightmapTerrainProvider.js b/packages/engine/Source/Core/CustomHeightmapTerrainProvider.js
index 75400c584831..e8ddb1a3f280 100644
--- a/packages/engine/Source/Core/CustomHeightmapTerrainProvider.js
+++ b/packages/engine/Source/Core/CustomHeightmapTerrainProvider.js
@@ -24,10 +24,8 @@ import TerrainProvider from "./TerrainProvider.js";
* There are some limitations such as no water mask, no vertex normals, and no
* availability, so a full-fledged {@link TerrainProvider} subclass is better suited
* for these more sophisticated use cases.
- *
* @alias CustomHeightmapTerrainProvider
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {CustomHeightmapTerrainProvider.GeometryCallback} options.callback The callback function for requesting tile geometry.
* @param {number} options.width The number of columns per heightmap tile.
@@ -39,7 +37,6 @@ import TerrainProvider from "./TerrainProvider.js";
* 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.
- *
* @example
* const viewer = new Cesium.Viewer("cesiumContainer", {
* terrainProvider: new Cesium.CustomHeightmapTerrainProvider({
@@ -50,7 +47,6 @@ import TerrainProvider from "./TerrainProvider.js";
* },
* }),
* });
- *
* @see TerrainProvider
*/
function CustomHeightmapTerrainProvider(options) {
@@ -188,12 +184,10 @@ Object.defineProperties(CustomHeightmapTerrainProvider.prototype, {
/**
* Requests the geometry for a given tile. The result includes terrain
* data and indicates that all child tiles are available.
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
* @param {Request} [request] The request object. Intended for internal use only.
- *
* @returns {Promise|undefined} A promise for the requested geometry. If this method
* returns undefined instead of a promise, it is an indication that too many requests are already
* pending and the request will be retried later.
@@ -229,7 +223,6 @@ CustomHeightmapTerrainProvider.prototype.requestTileGeometry = function (
/**
* Gets the maximum geometric error allowed in a tile at a given level.
- *
* @param {number} level The tile level for which to get the maximum geometric error.
* @returns {number} The maximum geometric error.
*/
@@ -241,7 +234,6 @@ CustomHeightmapTerrainProvider.prototype.getLevelMaximumGeometricError = functio
/**
* Determines whether data for a tile is available to be loaded.
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
@@ -257,7 +249,6 @@ CustomHeightmapTerrainProvider.prototype.getTileDataAvailable = function (
/**
* Makes sure we load availability data for a tile
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
diff --git a/packages/engine/Source/Core/CylinderGeometry.js b/packages/engine/Source/Core/CylinderGeometry.js
index a2b620c57a72..bb7ea20d24b8 100644
--- a/packages/engine/Source/Core/CylinderGeometry.js
+++ b/packages/engine/Source/Core/CylinderGeometry.js
@@ -23,21 +23,16 @@ const positionScratch = new Cartesian3();
/**
* A description of a cylinder.
- *
* @alias CylinderGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {number} options.length The length of the cylinder.
* @param {number} options.topRadius The radius of the top of the cylinder.
* @param {number} options.bottomRadius The radius of the bottom of the cylinder.
* @param {number} [options.slices=128] The number of edges around the perimeter of the cylinder.
* @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
- *
- * @exception {DeveloperError} options.slices must be greater than or equal to 3.
- *
+ * @throws {DeveloperError} options.slices must be greater than or equal to 3.
* @see CylinderGeometry.createGeometry
- *
* @example
* // create cylinder geometry
* const cylinder = new Cesium.CylinderGeometry({
@@ -98,11 +93,9 @@ CylinderGeometry.packedLength = VertexFormat.packedLength + 5;
/**
* Stores the provided instance into the provided array.
- *
* @param {CylinderGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
CylinderGeometry.pack = function (value, array, startingIndex) {
@@ -141,7 +134,6 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {CylinderGeometry} [result] The object into which to store the result.
@@ -192,7 +184,6 @@ CylinderGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of a cylinder, including its vertices, indices, and a bounding sphere.
- *
* @param {CylinderGeometry} cylinderGeometry A description of the cylinder.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
@@ -460,7 +451,6 @@ let unitCylinderGeometry;
/**
* Returns the geometric representation of a unit cylinder, including its vertices, indices, and a bounding sphere.
* @returns {Geometry} The computed vertices and indices.
- *
* @private
*/
CylinderGeometry.getUnitCylinder = function () {
diff --git a/packages/engine/Source/Core/CylinderGeometryLibrary.js b/packages/engine/Source/Core/CylinderGeometryLibrary.js
index c6784a518572..2684aa44f582 100644
--- a/packages/engine/Source/Core/CylinderGeometryLibrary.js
+++ b/packages/engine/Source/Core/CylinderGeometryLibrary.js
@@ -6,6 +6,11 @@ import CesiumMath from "./Math.js";
const CylinderGeometryLibrary = {};
/**
+ * @param length
+ * @param topRadius
+ * @param bottomRadius
+ * @param slices
+ * @param fill
* @private
*/
CylinderGeometryLibrary.computePositions = function (
diff --git a/packages/engine/Source/Core/CylinderOutlineGeometry.js b/packages/engine/Source/Core/CylinderOutlineGeometry.js
index bd587dcb4084..363acac50e1e 100644
--- a/packages/engine/Source/Core/CylinderOutlineGeometry.js
+++ b/packages/engine/Source/Core/CylinderOutlineGeometry.js
@@ -18,25 +18,20 @@ const radiusScratch = new Cartesian2();
/**
* A description of the outline of a cylinder.
- *
* @alias CylinderOutlineGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {number} options.length The length of the cylinder.
* @param {number} options.topRadius The radius of the top of the cylinder.
* @param {number} options.bottomRadius The radius of the bottom of the cylinder.
* @param {number} [options.slices=128] The number of edges around the perimeter of the cylinder.
* @param {number} [options.numberOfVerticalLines=16] Number of lines to draw between the top and bottom surfaces of the cylinder.
- *
- * @exception {DeveloperError} options.length must be greater than 0.
- * @exception {DeveloperError} options.topRadius must be greater than 0.
- * @exception {DeveloperError} options.bottomRadius must be greater than 0.
- * @exception {DeveloperError} bottomRadius and topRadius cannot both equal 0.
- * @exception {DeveloperError} options.slices must be greater than or equal to 3.
- *
+ * @throws {DeveloperError} options.length must be greater than 0.
+ * @throws {DeveloperError} options.topRadius must be greater than 0.
+ * @throws {DeveloperError} options.bottomRadius must be greater than 0.
+ * @throws {DeveloperError} bottomRadius and topRadius cannot both equal 0.
+ * @throws {DeveloperError} options.slices must be greater than or equal to 3.
* @see CylinderOutlineGeometry.createGeometry
- *
* @example
* // create cylinder geometry
* const cylinder = new Cesium.CylinderOutlineGeometry({
@@ -90,11 +85,9 @@ CylinderOutlineGeometry.packedLength = 6;
/**
* Stores the provided instance into the provided array.
- *
* @param {CylinderOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
CylinderOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -126,7 +119,6 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {CylinderOutlineGeometry} [result] The object into which to store the result.
@@ -170,7 +162,6 @@ CylinderOutlineGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of an outline of a cylinder, including its vertices, indices, and a bounding sphere.
- *
* @param {CylinderOutlineGeometry} cylinderGeometry A description of the cylinder outline.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/DefaultProxy.js b/packages/engine/Source/Core/DefaultProxy.js
index 8000b305da2a..3fc521247bb7 100644
--- a/packages/engine/Source/Core/DefaultProxy.js
+++ b/packages/engine/Source/Core/DefaultProxy.js
@@ -1,11 +1,9 @@
/**
* A simple proxy that appends the desired resource as the sole query parameter
* to the given proxy URL.
- *
* @alias DefaultProxy
- * @constructor
- * @extends {Proxy}
- *
+ * @class
+ * @augments {Proxy}
* @param {string} proxy The proxy URL that will be used to requests all resources.
*/
function DefaultProxy(proxy) {
@@ -14,7 +12,6 @@ function DefaultProxy(proxy) {
/**
* Get the final URL to use to request a given resource.
- *
* @param {string} resource The resource to request.
* @returns {string} proxied resource
*/
diff --git a/packages/engine/Source/Core/DeveloperError.js b/packages/engine/Source/Core/DeveloperError.js
index a330471eef23..c6978a64bb7c 100644
--- a/packages/engine/Source/Core/DeveloperError.js
+++ b/packages/engine/Source/Core/DeveloperError.js
@@ -9,13 +9,10 @@ import defined from "./defined.js";
* On the other hand, a {@link RuntimeError} indicates an exception that may
* be thrown at runtime, e.g., out of memory, that the calling code should be prepared
* to catch.
- *
* @alias DeveloperError
- * @constructor
- * @extends Error
- *
+ * @class
+ * @augments Error
* @param {string} [message] The error message for this exception.
- *
* @see RuntimeError
*/
function DeveloperError(message) {
diff --git a/packages/engine/Source/Core/DistanceDisplayCondition.js b/packages/engine/Source/Core/DistanceDisplayCondition.js
index e00e08aec341..992ee76935af 100644
--- a/packages/engine/Source/Core/DistanceDisplayCondition.js
+++ b/packages/engine/Source/Core/DistanceDisplayCondition.js
@@ -4,13 +4,10 @@ import DeveloperError from "./DeveloperError.js";
/**
* Determines visibility based on the distance to the camera.
- *
* @alias DistanceDisplayCondition
- * @constructor
- *
+ * @class
* @param {number} [near=0.0] The smallest distance in the interval where the object is visible.
* @param {number} [far=Number.MAX_VALUE] The largest distance in the interval where the object is visible.
- *
* @example
* // Make a billboard that is only visible when the distance to the camera is between 10 and 20 meters.
* billboard.distanceDisplayCondition = new Cesium.DistanceDisplayCondition(10.0, 20.0);
@@ -62,11 +59,9 @@ DistanceDisplayCondition.packedLength = 2;
/**
* Stores the provided instance into the provided array.
- *
* @param {DistanceDisplayCondition} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
DistanceDisplayCondition.pack = function (value, array, startingIndex) {
@@ -89,7 +84,6 @@ DistanceDisplayCondition.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {DistanceDisplayCondition} [result] The object into which to store the result.
@@ -114,10 +108,9 @@ DistanceDisplayCondition.unpack = function (array, startingIndex, result) {
/**
* Determines if two distance display conditions are equal.
- *
* @param {DistanceDisplayCondition} left A distance display condition.
* @param {DistanceDisplayCondition} right Another distance display condition.
- * @return {boolean} Whether the two distance display conditions are equal.
+ * @returns {boolean} Whether the two distance display conditions are equal.
*/
DistanceDisplayCondition.equals = function (left, right) {
return (
@@ -131,10 +124,9 @@ DistanceDisplayCondition.equals = function (left, right) {
/**
* Duplicates a distance display condition instance.
- *
* @param {DistanceDisplayCondition} [value] The distance display condition to duplicate.
* @param {DistanceDisplayCondition} [result] The result onto which to store the result.
- * @return {DistanceDisplayCondition} The duplicated instance.
+ * @returns {DistanceDisplayCondition} The duplicated instance.
*/
DistanceDisplayCondition.clone = function (value, result) {
if (!defined(value)) {
@@ -152,9 +144,8 @@ DistanceDisplayCondition.clone = function (value, result) {
/**
* Duplicates this instance.
- *
* @param {DistanceDisplayCondition} [result] The result onto which to store the result.
- * @return {DistanceDisplayCondition} The duplicated instance.
+ * @returns {DistanceDisplayCondition} The duplicated instance.
*/
DistanceDisplayCondition.prototype.clone = function (result) {
return DistanceDisplayCondition.clone(this, result);
@@ -162,9 +153,8 @@ DistanceDisplayCondition.prototype.clone = function (result) {
/**
* Determines if this distance display condition is equal to another.
- *
* @param {DistanceDisplayCondition} other Another distance display condition.
- * @return {boolean} Whether this distance display condition is equal to the other.
+ * @returns {boolean} Whether this distance display condition is equal to the other.
*/
DistanceDisplayCondition.prototype.equals = function (other) {
return DistanceDisplayCondition.equals(this, other);
diff --git a/packages/engine/Source/Core/DistanceDisplayConditionGeometryInstanceAttribute.js b/packages/engine/Source/Core/DistanceDisplayConditionGeometryInstanceAttribute.js
index 6bf81bd70db0..6c88cb0576c2 100644
--- a/packages/engine/Source/Core/DistanceDisplayConditionGeometryInstanceAttribute.js
+++ b/packages/engine/Source/Core/DistanceDisplayConditionGeometryInstanceAttribute.js
@@ -5,15 +5,11 @@ import DeveloperError from "./DeveloperError.js";
/**
* Value and type information for per-instance geometry attribute that determines if the geometry instance has a distance display condition.
- *
* @alias DistanceDisplayConditionGeometryInstanceAttribute
- * @constructor
- *
+ * @class
* @param {number} [near=0.0] The near distance.
* @param {number} [far=Number.MAX_VALUE] The far distance.
- *
- * @exception {DeveloperError} far must be greater than near.
- *
+ * @throws {DeveloperError} far must be greater than near.
* @example
* const instance = new Cesium.GeometryInstance({
* geometry : new Cesium.BoxGeometry({
@@ -28,7 +24,6 @@ import DeveloperError from "./DeveloperError.js";
* distanceDisplayCondition : new Cesium.DistanceDisplayConditionGeometryInstanceAttribute(100.0, 10000.0)
* }
* });
- *
* @see GeometryInstance
* @see GeometryInstanceAttribute
*/
@@ -46,9 +41,7 @@ function DistanceDisplayConditionGeometryInstanceAttribute(near, far) {
/**
* The values for the attributes stored in a typed array.
- *
* @type {Float32Array}
- *
* @default [0.0, 0.0, Number.MAX_VALUE]
*/
this.value = new Float32Array([near, far]);
@@ -60,12 +53,9 @@ Object.defineProperties(
/**
* The datatype of each component in the attribute, e.g., individual elements in
* {@link DistanceDisplayConditionGeometryInstanceAttribute#value}.
- *
* @memberof DistanceDisplayConditionGeometryInstanceAttribute.prototype
- *
* @type {ComponentDatatype}
* @readonly
- *
* @default {@link ComponentDatatype.FLOAT}
*/
componentDatatype: {
@@ -76,12 +66,9 @@ Object.defineProperties(
/**
* The number of components in the attributes, i.e., {@link DistanceDisplayConditionGeometryInstanceAttribute#value}.
- *
* @memberof DistanceDisplayConditionGeometryInstanceAttribute.prototype
- *
* @type {number}
* @readonly
- *
* @default 3
*/
componentsPerAttribute: {
@@ -94,12 +81,9 @@ Object.defineProperties(
* When true and componentDatatype is an integer format,
* indicate that the components should be mapped to the range [0, 1] (unsigned)
* or [-1, 1] (signed) when they are accessed as floating-point for rendering.
- *
* @memberof DistanceDisplayConditionGeometryInstanceAttribute.prototype
- *
* @type {boolean}
* @readonly
- *
* @default false
*/
normalize: {
@@ -112,12 +96,9 @@ Object.defineProperties(
/**
* Creates a new {@link DistanceDisplayConditionGeometryInstanceAttribute} instance given the provided an enabled flag and {@link DistanceDisplayCondition}.
- *
* @param {DistanceDisplayCondition} distanceDisplayCondition The distance display condition.
* @returns {DistanceDisplayConditionGeometryInstanceAttribute} The new {@link DistanceDisplayConditionGeometryInstanceAttribute} instance.
- *
- * @exception {DeveloperError} distanceDisplayCondition.far must be greater than distanceDisplayCondition.near
- *
+ * @throws {DeveloperError} distanceDisplayCondition.far must be greater than distanceDisplayCondition.near
* @example
* const distanceDisplayCondition = new Cesium.DistanceDisplayCondition(100.0, 10000.0);
* const instance = new Cesium.GeometryInstance({
@@ -149,11 +130,9 @@ DistanceDisplayConditionGeometryInstanceAttribute.fromDistanceDisplayCondition =
/**
* Converts a distance display condition to a typed array that can be used to assign a distance display condition attribute.
- *
* @param {DistanceDisplayCondition} distanceDisplayCondition The distance display condition value.
* @param {Float32Array} [result] The array to store the result in, if undefined a new instance will be created.
* @returns {Float32Array} The modified result parameter or a new instance if result was undefined.
- *
* @example
* const attributes = primitive.getGeometryInstanceAttributes('an id');
* attributes.distanceDisplayCondition = Cesium.DistanceDisplayConditionGeometryInstanceAttribute.toValue(distanceDisplayCondition, attributes.distanceDisplayCondition);
diff --git a/packages/engine/Source/Core/DoubleEndedPriorityQueue.js b/packages/engine/Source/Core/DoubleEndedPriorityQueue.js
index e0abcf5f6e0f..adcaee3713e2 100644
--- a/packages/engine/Source/Core/DoubleEndedPriorityQueue.js
+++ b/packages/engine/Source/Core/DoubleEndedPriorityQueue.js
@@ -5,11 +5,9 @@ import defined from "./defined.js";
/**
* Array-backed min-max heap implementation of a double-ended priority queue.
* This data structure allows for efficient removal of minimum and maximum elements.
- *
* @alias DoubleEndedPriorityQueue
- * @constructor
+ * @class
* @private
- *
* @param {object} options Object with the following properties:
* @param {DoubleEndedPriorityQueue.ComparatorCallback} options.comparator The comparator to use for the queue. If comparator(a, b) is less than 0, a is lower priority than b.
* @param {number} [options.maximumLength] The maximum length of the queue. If an element is inserted when the queue is at full capacity, the minimum element is removed. By default, the size of the queue is unlimited.
@@ -38,9 +36,7 @@ function DoubleEndedPriorityQueue(options) {
Object.defineProperties(DoubleEndedPriorityQueue.prototype, {
/**
* Gets the number of elements in the queue.
- *
* @memberof DoubleEndedPriorityQueue.prototype
- *
* @type {number}
* @readonly
*/
@@ -55,9 +51,7 @@ Object.defineProperties(DoubleEndedPriorityQueue.prototype, {
* If set to a smaller value than the current length of the queue, the lowest priority elements are removed.
* If an element is inserted when the queue is at full capacity, the minimum element is removed.
* If set to undefined, the size of the queue is unlimited.
- *
* @memberof DoubleEndedPriorityQueue.prototype
- *
* @type {number}
* @readonly
*/
@@ -85,9 +79,7 @@ Object.defineProperties(DoubleEndedPriorityQueue.prototype, {
/**
* Gets the internal array.
- *
* @memberof DoubleEndedPriorityQueue.prototype
- *
* @type {Array}
* @readonly
*/
@@ -100,9 +92,7 @@ Object.defineProperties(DoubleEndedPriorityQueue.prototype, {
/**
* The comparator used by the queue.
* If comparator(a, b) is less than 0, a is lower priority than b.
- *
* @memberof DoubleEndedPriorityQueue.prototype
- *
* @type {DoubleEndedPriorityQueue.ComparatorCallback}
* @readonly
*/
@@ -115,7 +105,6 @@ Object.defineProperties(DoubleEndedPriorityQueue.prototype, {
/**
* Clones the double ended priority queue.
- *
* @returns {DoubleEndedPriorityQueue} The cloned double ended priority queue.
*/
DoubleEndedPriorityQueue.prototype.clone = function () {
@@ -172,7 +161,6 @@ DoubleEndedPriorityQueue.prototype.resort = function () {
* Inserts an element into the queue.
* If the queue is at full capacity, the minimum element is removed.
* The new element is returned (and not added) if it is less than or equal priority to the minimum element.
- *
* @param {*} element
* @returns {*|undefined} The minimum element if the queue is at full capacity. Returns undefined if there is no maximum length.
*/
@@ -207,7 +195,6 @@ DoubleEndedPriorityQueue.prototype.insert = function (element) {
/**
* Removes the minimum element from the queue and returns it.
* If the queue is empty, the return value is undefined.
- *
* @returns {*|undefined} The minimum element, or undefined if the queue is empty.
*/
DoubleEndedPriorityQueue.prototype.removeMinimum = function () {
@@ -235,7 +222,6 @@ DoubleEndedPriorityQueue.prototype.removeMinimum = function () {
/**
* Removes the maximum element from the queue and returns it.
* If the queue is empty, the return value is undefined.
- *
* @returns {*|undefined} The maximum element, or undefined if the queue is empty.
*/
DoubleEndedPriorityQueue.prototype.removeMaximum = function () {
@@ -272,7 +258,6 @@ DoubleEndedPriorityQueue.prototype.removeMaximum = function () {
/**
* Gets the minimum element in the queue.
* If the queue is empty, the result is undefined.
- *
* @returns {*|undefined} element
*/
@@ -289,7 +274,6 @@ DoubleEndedPriorityQueue.prototype.getMinimum = function () {
/**
* Gets the maximum element in the queue.
* If the queue is empty, the result is undefined.
- *
* @returns {*|undefined} element
*/
DoubleEndedPriorityQueue.prototype.getMaximum = function () {
diff --git a/packages/engine/Source/Core/DoublyLinkedList.js b/packages/engine/Source/Core/DoublyLinkedList.js
index a8f17a7b0e93..af7ebfc093bb 100644
--- a/packages/engine/Source/Core/DoublyLinkedList.js
+++ b/packages/engine/Source/Core/DoublyLinkedList.js
@@ -18,6 +18,9 @@ Object.defineProperties(DoublyLinkedList.prototype, {
});
/**
+ * @param item
+ * @param previous
+ * @param next
* @private
*/
function DoublyLinkedListNode(item, previous, next) {
@@ -29,7 +32,7 @@ function DoublyLinkedListNode(item, previous, next) {
/**
* Adds the item to the end of the list
* @param {*} [item]
- * @return {DoublyLinkedListNode}
+ * @returns {DoublyLinkedListNode}
*/
DoublyLinkedList.prototype.add = function (item) {
const node = new DoublyLinkedListNode(item, this.tail, undefined);
diff --git a/packages/engine/Source/Core/EarthOrientationParameters.js b/packages/engine/Source/Core/EarthOrientationParameters.js
index 514d9284a584..e87fd96a03d3 100644
--- a/packages/engine/Source/Core/EarthOrientationParameters.js
+++ b/packages/engine/Source/Core/EarthOrientationParameters.js
@@ -16,10 +16,8 @@ import TimeStandard from "./TimeStandard.js";
* the International Celestial Reference Frame (ICRF) to the International Terrestrial
* Reference Frame (ITRF).
* This object is normally not instantiated directly, use {@link EarthOrientationParameters.fromUrl}.
- *
* @alias EarthOrientationParameters
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
* @param {object} [options.data] The actual EOP data. If neither this
* parameter nor options.data is specified, all EOP values are assumed
@@ -29,7 +27,6 @@ import TimeStandard from "./TimeStandard.js";
* should be added to {@link JulianDate.leapSeconds}. False if
* new leap seconds should be handled correctly in the context
* of the EOP data but otherwise ignored.
- *
* @private
*/
function EarthOrientationParameters(options) {
@@ -85,7 +82,6 @@ function EarthOrientationParameters(options) {
* should be added to {@link JulianDate.leapSeconds}. False if
* new leap seconds should be handled correctly in the context
* of the EOP data but otherwise ignored.
- *
* @example
* // An example EOP data file, EOP.json:
* {
@@ -96,7 +92,6 @@ function EarthOrientationParameters(options) {
* "2011-07-03T00:00:00Z",55745.0,2.262286080161428e-7,2.1191157519929706e-6,-0.2905572,1.9e-6,-3.490658503988659e-10,6.981317007977318e-10,34.0
* ]
* }
- *
* @example
* // Loading the EOP data
* const eop = await Cesium.EarthOrientationParameters.fromUrl('Data/EOP.json');
@@ -148,16 +143,13 @@ EarthOrientationParameters.NONE = Object.freeze({
/**
* Computes the Earth Orientation Parameters (EOP) for a given date by interpolating.
* If the EOP data has not yet been download, this method returns undefined.
- *
* @param {JulianDate} date The date for each to evaluate the EOP.
* @param {EarthOrientationParametersSample} [result] The instance to which to copy the result.
* If this parameter is undefined, a new instance is created and returned.
* @returns {EarthOrientationParametersSample} The EOP evaluated at the given date, or
* undefined if the data necessary to evaluate EOP at the date has not yet been
* downloaded.
- *
- * @exception {RuntimeError} The loaded EOP data has an error and cannot be used.
- *
+ * @throws {RuntimeError} The loaded EOP data has an error and cannot be used.
* @see EarthOrientationParameters#fromUrl
*/
EarthOrientationParameters.prototype.compute = function (date, result) {
diff --git a/packages/engine/Source/Core/EarthOrientationParametersSample.js b/packages/engine/Source/Core/EarthOrientationParametersSample.js
index 336e564da4b8..37c41a992617 100644
--- a/packages/engine/Source/Core/EarthOrientationParametersSample.js
+++ b/packages/engine/Source/Core/EarthOrientationParametersSample.js
@@ -1,15 +1,12 @@
/**
* A set of Earth Orientation Parameters (EOP) sampled at a time.
- *
* @alias EarthOrientationParametersSample
- * @constructor
- *
+ * @class
* @param {number} xPoleWander The pole wander about the X axis, in radians.
* @param {number} yPoleWander The pole wander about the Y axis, in radians.
* @param {number} xPoleOffset The offset to the Celestial Intermediate Pole (CIP) about the X axis, in radians.
* @param {number} yPoleOffset The offset to the Celestial Intermediate Pole (CIP) about the Y axis, in radians.
* @param {number} ut1MinusUtc The difference in time standards, UT1 - UTC, in seconds.
- *
* @private
*/
function EarthOrientationParametersSample(
diff --git a/packages/engine/Source/Core/EasingFunction.js b/packages/engine/Source/Core/EasingFunction.js
index 0b8cc00c2e86..cf93b832ce27 100644
--- a/packages/engine/Source/Core/EasingFunction.js
+++ b/packages/engine/Source/Core/EasingFunction.js
@@ -4,13 +4,11 @@ import { Easing } from "@tweenjs/tween.js";
* Easing functions for use with TweenCollection. These function are from
* {@link https://github.com/sole/tween.js/|Tween.js} and Robert Penner. See the
* {@link http://sole.github.io/tween.js/examples/03_graphs.html|Tween.js graphs for each function}.
- *
* @namespace
*/
const EasingFunction = {
/**
* Linear easing.
- *
* @type {EasingFunction.Callback}
* @constant
*/
@@ -18,21 +16,18 @@ const EasingFunction = {
/**
* Quadratic in.
- *
* @type {EasingFunction.Callback}
* @constant
*/
QUADRATIC_IN: Easing.Quadratic.In,
/**
* Quadratic out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
QUADRATIC_OUT: Easing.Quadratic.Out,
/**
* Quadratic in then out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
@@ -40,21 +35,18 @@ const EasingFunction = {
/**
* Cubic in.
- *
* @type {EasingFunction.Callback}
* @constant
*/
CUBIC_IN: Easing.Cubic.In,
/**
* Cubic out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
CUBIC_OUT: Easing.Cubic.Out,
/**
* Cubic in then out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
@@ -62,21 +54,18 @@ const EasingFunction = {
/**
* Quartic in.
- *
* @type {EasingFunction.Callback}
* @constant
*/
QUARTIC_IN: Easing.Quartic.In,
/**
* Quartic out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
QUARTIC_OUT: Easing.Quartic.Out,
/**
* Quartic in then out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
@@ -84,21 +73,18 @@ const EasingFunction = {
/**
* Quintic in.
- *
* @type {EasingFunction.Callback}
* @constant
*/
QUINTIC_IN: Easing.Quintic.In,
/**
* Quintic out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
QUINTIC_OUT: Easing.Quintic.Out,
/**
* Quintic in then out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
@@ -106,21 +92,18 @@ const EasingFunction = {
/**
* Sinusoidal in.
- *
* @type {EasingFunction.Callback}
* @constant
*/
SINUSOIDAL_IN: Easing.Sinusoidal.In,
/**
* Sinusoidal out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
SINUSOIDAL_OUT: Easing.Sinusoidal.Out,
/**
* Sinusoidal in then out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
@@ -128,21 +111,18 @@ const EasingFunction = {
/**
* Exponential in.
- *
* @type {EasingFunction.Callback}
* @constant
*/
EXPONENTIAL_IN: Easing.Exponential.In,
/**
* Exponential out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
EXPONENTIAL_OUT: Easing.Exponential.Out,
/**
* Exponential in then out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
@@ -150,21 +130,18 @@ const EasingFunction = {
/**
* Circular in.
- *
* @type {EasingFunction.Callback}
* @constant
*/
CIRCULAR_IN: Easing.Circular.In,
/**
* Circular out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
CIRCULAR_OUT: Easing.Circular.Out,
/**
* Circular in then out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
@@ -172,21 +149,18 @@ const EasingFunction = {
/**
* Elastic in.
- *
* @type {EasingFunction.Callback}
* @constant
*/
ELASTIC_IN: Easing.Elastic.In,
/**
* Elastic out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
ELASTIC_OUT: Easing.Elastic.Out,
/**
* Elastic in then out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
@@ -194,21 +168,18 @@ const EasingFunction = {
/**
* Back in.
- *
* @type {EasingFunction.Callback}
* @constant
*/
BACK_IN: Easing.Back.In,
/**
* Back out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
BACK_OUT: Easing.Back.Out,
/**
* Back in then out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
@@ -216,21 +187,18 @@ const EasingFunction = {
/**
* Bounce in.
- *
* @type {EasingFunction.Callback}
* @constant
*/
BOUNCE_IN: Easing.Bounce.In,
/**
* Bounce out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
BOUNCE_OUT: Easing.Bounce.Out,
/**
* Bounce in then out.
- *
* @type {EasingFunction.Callback}
* @constant
*/
@@ -242,12 +210,10 @@ const EasingFunction = {
* @callback EasingFunction.Callback
* @param {number} time The time in the range [0, 1].
* @returns {number} The value of the function at the given time.
- *
* @example
* function quadraticIn(time) {
* return time * time;
* }
- *
* @example
* function quadraticOut(time) {
* return time * (2.0 - time);
diff --git a/packages/engine/Source/Core/EllipseGeometry.js b/packages/engine/Source/Core/EllipseGeometry.js
index 483ec135780b..26d3e5c6277b 100644
--- a/packages/engine/Source/Core/EllipseGeometry.js
+++ b/packages/engine/Source/Core/EllipseGeometry.js
@@ -884,10 +884,8 @@ function computeRectangle(
/**
* A description of an ellipse on an ellipsoid. Ellipse geometry can be rendered with both {@link Primitive} and {@link GroundPrimitive}.
- *
* @alias EllipseGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Cartesian3} options.center The ellipse's center point in the fixed frame.
* @param {number} options.semiMajorAxis The length of the ellipse's semi-major axis in meters.
@@ -899,12 +897,9 @@ function computeRectangle(
* @param {number} [options.stRotation=0.0] The rotation of the texture coordinates counter-clockwise from north.
* @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The angular distance between points on the ellipse in radians.
* @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
- *
- * @exception {DeveloperError} semiMajorAxis and semiMinorAxis must be greater than zero.
- * @exception {DeveloperError} semiMajorAxis must be greater than or equal to the semiMinorAxis.
- * @exception {DeveloperError} granularity must be greater than zero.
- *
- *
+ * @throws {DeveloperError} semiMajorAxis and semiMinorAxis must be greater than zero.
+ * @throws {DeveloperError} semiMajorAxis must be greater than or equal to the semiMinorAxis.
+ * @throws {DeveloperError} granularity must be greater than zero.
* @example
* // Create an ellipse.
* const ellipse = new Cesium.EllipseGeometry({
@@ -914,7 +909,6 @@ function computeRectangle(
* rotation : Cesium.Math.toRadians(60.0)
* });
* const geometry = Cesium.EllipseGeometry.createGeometry(ellipse);
- *
* @see EllipseGeometry.createGeometry
*/
function EllipseGeometry(options) {
@@ -977,11 +971,9 @@ EllipseGeometry.packedLength =
/**
* Stores the provided instance into the provided array.
- *
* @param {EllipseGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
EllipseGeometry.pack = function (value, array, startingIndex) {
@@ -1034,7 +1026,6 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {EllipseGeometry} [result] The object into which to store the result.
@@ -1104,7 +1095,6 @@ EllipseGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the bounding rectangle based on the provided options
- *
* @param {object} options Object with the following properties:
* @param {Cartesian3} options.center The ellipse's center point in the fixed frame.
* @param {number} options.semiMajorAxis The length of the ellipse's semi-major axis in meters.
@@ -1113,7 +1103,6 @@ EllipseGeometry.unpack = function (array, startingIndex, result) {
* @param {number} [options.rotation=0.0] The angle of rotation counter-clockwise from north.
* @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The angular distance between points on the ellipse in radians.
* @param {Rectangle} [result] An object in which to store the result
- *
* @returns {Rectangle} The result rectangle
*/
EllipseGeometry.computeRectangle = function (options, result) {
@@ -1156,7 +1145,6 @@ EllipseGeometry.computeRectangle = function (options, result) {
/**
* Computes the geometric representation of a ellipse on an ellipsoid, including its vertices, indices, and a bounding sphere.
- *
* @param {EllipseGeometry} ellipseGeometry A description of the ellipse.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
@@ -1226,6 +1214,9 @@ EllipseGeometry.createGeometry = function (ellipseGeometry) {
};
/**
+ * @param ellipseGeometry
+ * @param minHeightFunc
+ * @param maxHeightFunc
* @private
*/
EllipseGeometry.createShadowVolume = function (
diff --git a/packages/engine/Source/Core/EllipseGeometryLibrary.js b/packages/engine/Source/Core/EllipseGeometryLibrary.js
index acf09c2a2f33..b0ea2b26247d 100644
--- a/packages/engine/Source/Core/EllipseGeometryLibrary.js
+++ b/packages/engine/Source/Core/EllipseGeometryLibrary.js
@@ -54,6 +54,9 @@ const scratchCartesian3 = new Cartesian3();
const scratchNormal = new Cartesian3();
/**
* Returns the positions raised to the given heights
+ * @param positions
+ * @param options
+ * @param extrude
* @private
*/
EllipseGeometryLibrary.raisePositionsToHeight = function (
@@ -108,6 +111,9 @@ const eastVecScratch = new Cartesian3();
const northVecScratch = new Cartesian3();
/**
* Returns an array of positions that make up the ellipse.
+ * @param options
+ * @param addFillPositions
+ * @param addEdgePositions
* @private
*/
EllipseGeometryLibrary.computeEllipsePositions = function (
diff --git a/packages/engine/Source/Core/EllipseOutlineGeometry.js b/packages/engine/Source/Core/EllipseOutlineGeometry.js
index 3593c2db0b9c..ace86976b384 100644
--- a/packages/engine/Source/Core/EllipseOutlineGeometry.js
+++ b/packages/engine/Source/Core/EllipseOutlineGeometry.js
@@ -180,10 +180,8 @@ function computeExtrudedEllipse(options) {
/**
* A description of the outline of an ellipse on an ellipsoid.
- *
* @alias EllipseOutlineGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Cartesian3} options.center The ellipse's center point in the fixed frame.
* @param {number} options.semiMajorAxis The length of the ellipse's semi-major axis in meters.
@@ -194,13 +192,10 @@ function computeExtrudedEllipse(options) {
* @param {number} [options.rotation=0.0] The angle from north (counter-clockwise) in radians.
* @param {number} [options.granularity=0.02] The angular distance between points on the ellipse in radians.
* @param {number} [options.numberOfVerticalLines=16] Number of lines to draw between the top and bottom surface of an extruded ellipse.
- *
- * @exception {DeveloperError} semiMajorAxis and semiMinorAxis must be greater than zero.
- * @exception {DeveloperError} semiMajorAxis must be greater than or equal to the semiMinorAxis.
- * @exception {DeveloperError} granularity must be greater than zero.
- *
+ * @throws {DeveloperError} semiMajorAxis and semiMinorAxis must be greater than zero.
+ * @throws {DeveloperError} semiMajorAxis must be greater than or equal to the semiMinorAxis.
+ * @throws {DeveloperError} granularity must be greater than zero.
* @see EllipseOutlineGeometry.createGeometry
- *
* @example
* const ellipse = new Cesium.EllipseOutlineGeometry({
* center : Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883),
@@ -270,11 +265,9 @@ EllipseOutlineGeometry.packedLength =
/**
* Stores the provided instance into the provided array.
- *
* @param {EllipseOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
EllipseOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -324,7 +317,6 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {EllipseOutlineGeometry} [result] The object into which to store the result.
@@ -385,7 +377,6 @@ EllipseOutlineGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of an outline of an ellipse on an ellipsoid, including its vertices, indices, and a bounding sphere.
- *
* @param {EllipseOutlineGeometry} ellipseGeometry A description of the ellipse.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/Ellipsoid.js b/packages/engine/Source/Core/Ellipsoid.js
index 22cdecd06d79..13b50eed538d 100644
--- a/packages/engine/Source/Core/Ellipsoid.js
+++ b/packages/engine/Source/Core/Ellipsoid.js
@@ -61,14 +61,11 @@ function initialize(ellipsoid, x, y, z) {
* Rather than constructing this object directly, one of the provided
* constants is normally used.
* @alias Ellipsoid
- * @constructor
- *
+ * @class
* @param {number} [x=0] The radius in the x direction.
* @param {number} [y=0] The radius in the y direction.
* @param {number} [z=0] The radius in the z direction.
- *
- * @exception {DeveloperError} All radii components must be greater than or equal to zero.
- *
+ * @throws {DeveloperError} All radii components must be greater than or equal to zero.
* @see Ellipsoid.fromCartesian3
* @see Ellipsoid.WGS84
* @see Ellipsoid.UNIT_SPHERE
@@ -169,7 +166,6 @@ Object.defineProperties(Ellipsoid.prototype, {
/**
* Duplicates an Ellipsoid instance.
- *
* @param {Ellipsoid} ellipsoid The ellipsoid to duplicate.
* @param {Ellipsoid} [result] The object onto which to store the result, or undefined if a new
* instance should be created.
@@ -199,14 +195,11 @@ Ellipsoid.clone = function (ellipsoid, result) {
/**
* Computes an Ellipsoid from a Cartesian specifying the radii in x, y, and z directions.
- *
* @param {Cartesian3} [cartesian=Cartesian3.ZERO] The ellipsoid's radius in the x, y, and z directions.
* @param {Ellipsoid} [result] The object onto which to store the result, or undefined if a new
* instance should be created.
* @returns {Ellipsoid} A new Ellipsoid instance.
- *
- * @exception {DeveloperError} All radii components must be greater than or equal to zero.
- *
+ * @throws {DeveloperError} All radii components must be greater than or equal to zero.
* @see Ellipsoid.WGS84
* @see Ellipsoid.UNIT_SPHERE
*/
@@ -225,7 +218,6 @@ Ellipsoid.fromCartesian3 = function (cartesian, result) {
/**
* An Ellipsoid instance initialized to the WGS84 standard.
- *
* @type {Ellipsoid}
* @constant
*/
@@ -235,7 +227,6 @@ Ellipsoid.WGS84 = Object.freeze(
/**
* An Ellipsoid instance initialized to radii of (1.0, 1.0, 1.0).
- *
* @type {Ellipsoid}
* @constant
*/
@@ -243,7 +234,6 @@ Ellipsoid.UNIT_SPHERE = Object.freeze(new Ellipsoid(1.0, 1.0, 1.0));
/**
* An Ellipsoid instance initialized to a sphere with the lunar radius.
- *
* @type {Ellipsoid}
* @constant
*/
@@ -257,7 +247,6 @@ Ellipsoid.MOON = Object.freeze(
/**
* Duplicates an Ellipsoid instance.
- *
* @param {Ellipsoid} [result] The object onto which to store the result, or undefined if a new
* instance should be created.
* @returns {Ellipsoid} The cloned Ellipsoid.
@@ -274,11 +263,9 @@ Ellipsoid.packedLength = Cartesian3.packedLength;
/**
* Stores the provided instance into the provided array.
- *
* @param {Ellipsoid} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
Ellipsoid.pack = function (value, array, startingIndex) {
@@ -296,7 +283,6 @@ Ellipsoid.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {Ellipsoid} [result] The object into which to store the result.
@@ -316,7 +302,6 @@ Ellipsoid.unpack = function (array, startingIndex, result) {
/**
* Computes the unit vector directed from the center of this ellipsoid toward the provided Cartesian position.
* @function
- *
* @param {Cartesian3} cartesian The Cartesian for which to to determine the geocentric normal.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided.
@@ -325,7 +310,6 @@ Ellipsoid.prototype.geocentricSurfaceNormal = Cartesian3.normalize;
/**
* Computes the normal of the plane tangent to the surface of the ellipsoid at the provided position.
- *
* @param {Cartographic} cartographic The cartographic position for which to to determine the geodetic normal.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided.
@@ -357,7 +341,6 @@ Ellipsoid.prototype.geodeticSurfaceNormalCartographic = function (
/**
* Computes the normal of the plane tangent to the surface of the ellipsoid at the provided position.
- *
* @param {Cartesian3} cartesian The Cartesian position for which to to determine the surface normal.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided, or undefined if a normal cannot be found.
@@ -390,11 +373,9 @@ const cartographicToCartesianK = new Cartesian3();
/**
* Converts the provided cartographic to Cartesian representation.
- *
* @param {Cartographic} cartographic The cartographic position.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided.
- *
* @example
* //Create a Cartographic and determine it's Cartesian representation on a WGS84 ellipsoid.
* const position = new Cesium.Cartographic(Cesium.Math.toRadians(21), Cesium.Math.toRadians(78), 5000);
@@ -418,11 +399,9 @@ Ellipsoid.prototype.cartographicToCartesian = function (cartographic, result) {
/**
* Converts the provided array of cartographics to an array of Cartesians.
- *
* @param {Cartographic[]} cartographics An array of cartographic positions.
* @param {Cartesian3[]} [result] The object onto which to store the result.
* @returns {Cartesian3[]} The modified result parameter or a new Array instance if none was provided.
- *
* @example
* //Convert an array of Cartographics and determine their Cartesian representation on a WGS84 ellipsoid.
* const positions = [new Cesium.Cartographic(Cesium.Math.toRadians(21), Cesium.Math.toRadians(78), 0),
@@ -457,11 +436,9 @@ const cartesianToCartographicH = new Cartesian3();
/**
* Converts the provided cartesian to cartographic representation.
* The cartesian is undefined at the center of the ellipsoid.
- *
* @param {Cartesian3} cartesian The Cartesian position to convert to cartographic representation.
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter, new Cartographic instance if none was provided, or undefined if the cartesian is at the center of the ellipsoid.
- *
* @example
* //Create a Cartesian and determine it's Cartographic representation on a WGS84 ellipsoid.
* const position = new Cesium.Cartesian3(17832.12, 83234.52, 952313.73);
@@ -494,11 +471,9 @@ Ellipsoid.prototype.cartesianToCartographic = function (cartesian, result) {
/**
* Converts the provided array of cartesians to an array of cartographics.
- *
* @param {Cartesian3[]} cartesians An array of Cartesian positions.
* @param {Cartographic[]} [result] The object onto which to store the result.
* @returns {Cartographic[]} The modified result parameter or a new Array instance if none was provided.
- *
* @example
* //Create an array of Cartesians and determine their Cartographic representation on a WGS84 ellipsoid.
* const positions = [new Cesium.Cartesian3(17832.12, 83234.52, 952313.73),
@@ -530,7 +505,6 @@ Ellipsoid.prototype.cartesianArrayToCartographicArray = function (
* Scales the provided Cartesian position along the geodetic surface normal
* so that it is on the surface of this ellipsoid. If the position is
* at the center of the ellipsoid, this function returns undefined.
- *
* @param {Cartesian3} cartesian The Cartesian position to scale.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter, a new Cartesian3 instance if none was provided, or undefined if the position is at the center.
@@ -548,7 +522,6 @@ Ellipsoid.prototype.scaleToGeodeticSurface = function (cartesian, result) {
/**
* Scales the provided Cartesian position along the geocentric surface normal
* so that it is on the surface of this ellipsoid.
- *
* @param {Cartesian3} cartesian The Cartesian position to scale.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided.
@@ -581,7 +554,6 @@ Ellipsoid.prototype.scaleToGeocentricSurface = function (cartesian, result) {
/**
* Transforms a Cartesian X, Y, Z position to the ellipsoid-scaled space by multiplying
* its components by the result of {@link Ellipsoid#oneOverRadii}.
- *
* @param {Cartesian3} position The position to transform.
* @param {Cartesian3} [result] The position to which to copy the result, or undefined to create and
* return a new instance.
@@ -602,7 +574,6 @@ Ellipsoid.prototype.transformPositionToScaledSpace = function (
/**
* Transforms a Cartesian X, Y, Z position from the ellipsoid-scaled space by multiplying
* its components by the result of {@link Ellipsoid#radii}.
- *
* @param {Cartesian3} position The position to transform.
* @param {Cartesian3} [result] The position to which to copy the result, or undefined to create and
* return a new instance.
@@ -623,7 +594,6 @@ Ellipsoid.prototype.transformPositionFromScaledSpace = function (
/**
* Compares this Ellipsoid against the provided Ellipsoid componentwise and returns
* true if they are equal, false otherwise.
- *
* @param {Ellipsoid} [right] The other Ellipsoid.
* @returns {boolean} true if they are equal, false otherwise.
*/
@@ -636,7 +606,6 @@ Ellipsoid.prototype.equals = function (right) {
/**
* Creates a string representing this Ellipsoid in the format '(radii.x, radii.y, radii.z)'.
- *
* @returns {string} A string representing this ellipsoid in the format '(radii.x, radii.y, radii.z)'.
*/
Ellipsoid.prototype.toString = function () {
@@ -645,7 +614,6 @@ Ellipsoid.prototype.toString = function () {
/**
* Computes a point which is the intersection of the surface normal with the z-axis.
- *
* @param {Cartesian3} position the position. must be on the surface of the ellipsoid.
* @param {number} [buffer = 0.0] A buffer to subtract from the ellipsoid size when checking if the point is inside the ellipsoid.
* In earth case, with common earth datums, there is no need for this buffer since the intersection point is always (relatively) very close to the center.
@@ -654,10 +622,9 @@ Ellipsoid.prototype.toString = function () {
* @param {Cartesian3} [result] The cartesian to which to copy the result, or undefined to create and
* return a new instance.
* @returns {Cartesian3 | undefined} the intersection point if it's inside the ellipsoid, undefined otherwise
- *
- * @exception {DeveloperError} position is required.
- * @exception {DeveloperError} Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y).
- * @exception {DeveloperError} Ellipsoid.radii.z must be greater than 0.
+ * @throws {DeveloperError} position is required.
+ * @throws {DeveloperError} Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y).
+ * @throws {DeveloperError} Ellipsoid.radii.z must be greater than 0.
*/
Ellipsoid.prototype.getSurfaceNormalIntersectionWithZAxis = function (
position,
@@ -705,12 +672,10 @@ const scratchEndpoint = new Cartesian3();
/**
* Computes the ellipsoid curvatures at a given position on the surface.
- *
* @param {Cartesian3} surfacePosition The position on the ellipsoid surface where curvatures will be calculated.
* @param {Cartesian2} [result] The cartesian to which to copy the result, or undefined to create and return a new instance.
* @returns {Cartesian2} The local curvature of the ellipsoid surface at the provided position, in east and north directions.
- *
- * @exception {DeveloperError} position is required.
+ * @throws {DeveloperError} position is required.
*/
Ellipsoid.prototype.getLocalCurvature = function (surfacePosition, result) {
//>>includeStart('debug', pragmas.debug);
@@ -764,12 +729,10 @@ const weights = [
/**
* Compute the 10th order Gauss-Legendre Quadrature of the given definite integral.
- *
* @param {number} a The lower bound for the integration.
* @param {number} b The upper bound for the integration.
* @param {Ellipsoid~RealValuedScalarFunction} func The function to integrate.
* @returns {number} The value of the integral of the given function over the given domain.
- *
* @private
*/
function gaussLegendreQuadrature(a, b, func) {
@@ -798,17 +761,14 @@ function gaussLegendreQuadrature(a, b, func) {
/**
* A real valued scalar function.
* @callback Ellipsoid~RealValuedScalarFunction
- *
* @param {number} x The value used to evaluate the function.
* @returns {number} The value of the function at x.
- *
* @private
*/
/**
* Computes an approximation of the surface area of a rectangle on the surface of an ellipsoid using
* Gauss-Legendre 10th order quadrature.
- *
* @param {Rectangle} rectangle The rectangle used for computing the surface area.
* @returns {number} The approximate area of the rectangle on the surface of this ellipsoid.
*/
diff --git a/packages/engine/Source/Core/EllipsoidGeodesic.js b/packages/engine/Source/Core/EllipsoidGeodesic.js
index 6416b8241149..5e5146c6e6e4 100644
--- a/packages/engine/Source/Core/EllipsoidGeodesic.js
+++ b/packages/engine/Source/Core/EllipsoidGeodesic.js
@@ -274,10 +274,8 @@ function computeProperties(ellipsoidGeodesic, start, end, ellipsoid) {
/**
* Initializes a geodesic on the ellipsoid connecting the two provided planetodetic points.
- *
* @alias EllipsoidGeodesic
- * @constructor
- *
+ * @class
* @param {Cartographic} [start] The initial planetodetic point on the path.
* @param {Cartographic} [end] The final planetodetic point on the path.
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the geodesic lies.
@@ -387,7 +385,6 @@ Object.defineProperties(EllipsoidGeodesic.prototype, {
/**
* Sets the start and end points of the geodesic
- *
* @param {Cartographic} start The initial planetodetic point on the path.
* @param {Cartographic} end The final planetodetic point on the path.
*/
@@ -402,7 +399,6 @@ EllipsoidGeodesic.prototype.setEndPoints = function (start, end) {
/**
* Provides the location of a point at the indicated portion along the geodesic.
- *
* @param {number} fraction The portion of the distance between the initial and final points.
* @param {Cartographic} [result] The object in which to store the result.
* @returns {Cartographic} The location of the point along the geodesic.
@@ -419,12 +415,10 @@ EllipsoidGeodesic.prototype.interpolateUsingFraction = function (
/**
* Provides the location of a point at the indicated distance along the geodesic.
- *
* @param {number} distance The distance from the inital point to the point of interest along the geodesic
* @param {Cartographic} [result] The object in which to store the result.
* @returns {Cartographic} The location of the point along the geodesic.
- *
- * @exception {DeveloperError} start and end must be set before calling function interpolateUsingSurfaceDistance
+ * @throws {DeveloperError} start and end must be set before calling function interpolateUsingSurfaceDistance
*/
EllipsoidGeodesic.prototype.interpolateUsingSurfaceDistance = function (
distance,
diff --git a/packages/engine/Source/Core/EllipsoidGeometry.js b/packages/engine/Source/Core/EllipsoidGeometry.js
index e6a8409dc78b..e3591fffa67b 100644
--- a/packages/engine/Source/Core/EllipsoidGeometry.js
+++ b/packages/engine/Source/Core/EllipsoidGeometry.js
@@ -27,10 +27,8 @@ const sin = Math.sin;
/**
* A description of an ellipsoid centered at the origin.
- *
* @alias EllipsoidGeometry
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
* @param {Cartesian3} [options.radii=Cartesian3(1.0, 1.0, 1.0)] The radii of the ellipsoid in the x, y, and z directions.
* @param {Cartesian3} [options.innerRadii=options.radii] The inner radii of the ellipsoid in the x, y, and z directions.
@@ -41,12 +39,9 @@ const sin = Math.sin;
* @param {number} [options.stackPartitions=64] The number of times to partition the ellipsoid into stacks.
* @param {number} [options.slicePartitions=64] The number of times to partition the ellipsoid into radial slices.
* @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
- *
- * @exception {DeveloperError} options.slicePartitions cannot be less than three.
- * @exception {DeveloperError} options.stackPartitions cannot be less than three.
- *
+ * @throws {DeveloperError} options.slicePartitions cannot be less than three.
+ * @throws {DeveloperError} options.stackPartitions cannot be less than three.
* @see EllipsoidGeometry#createGeometry
- *
* @example
* const ellipsoid = new Cesium.EllipsoidGeometry({
* vertexFormat : Cesium.VertexFormat.POSITION_ONLY,
@@ -102,11 +97,9 @@ EllipsoidGeometry.packedLength =
/**
* Stores the provided instance into the provided array.
- *
* @param {EllipsoidGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
EllipsoidGeometry.pack = function (value, array, startingIndex) {
@@ -159,7 +152,6 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {EllipsoidGeometry} [result] The object into which to store the result.
@@ -224,7 +216,6 @@ EllipsoidGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of an ellipsoid, including its vertices, indices, and a bounding sphere.
- *
* @param {EllipsoidGeometry} ellipsoidGeometry A description of the ellipsoid.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
@@ -632,7 +623,6 @@ let unitEllipsoidGeometry;
/**
* Returns the geometric representation of a unit ellipsoid, including its vertices, indices, and a bounding sphere.
* @returns {Geometry} The computed vertices and indices.
- *
* @private
*/
EllipsoidGeometry.getUnitEllipsoid = function () {
diff --git a/packages/engine/Source/Core/EllipsoidOutlineGeometry.js b/packages/engine/Source/Core/EllipsoidOutlineGeometry.js
index 53b1fd403a97..546b97032e1d 100644
--- a/packages/engine/Source/Core/EllipsoidOutlineGeometry.js
+++ b/packages/engine/Source/Core/EllipsoidOutlineGeometry.js
@@ -19,10 +19,8 @@ const sin = Math.sin;
/**
* A description of the outline of an ellipsoid centered at the origin.
- *
* @alias EllipsoidOutlineGeometry
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
* @param {Cartesian3} [options.radii=Cartesian3(1.0, 1.0, 1.0)] The radii of the ellipsoid in the x, y, and z directions.
* @param {Cartesian3} [options.innerRadii=options.radii] The inner radii of the ellipsoid in the x, y, and z directions.
@@ -33,11 +31,9 @@ const sin = Math.sin;
* @param {number} [options.stackPartitions=10] The count of stacks for the ellipsoid (1 greater than the number of parallel lines).
* @param {number} [options.slicePartitions=8] The count of slices for the ellipsoid (Equal to the number of radial lines).
* @param {number} [options.subdivisions=128] The number of points per line, determining the granularity of the curvature.
- *
- * @exception {DeveloperError} options.stackPartitions must be greater than or equal to one.
- * @exception {DeveloperError} options.slicePartitions must be greater than or equal to zero.
- * @exception {DeveloperError} options.subdivisions must be greater than or equal to zero.
- *
+ * @throws {DeveloperError} options.stackPartitions must be greater than or equal to one.
+ * @throws {DeveloperError} options.slicePartitions must be greater than or equal to zero.
+ * @throws {DeveloperError} options.subdivisions must be greater than or equal to zero.
* @example
* const ellipsoid = new Cesium.EllipsoidOutlineGeometry({
* radii : new Cesium.Cartesian3(1000000.0, 500000.0, 500000.0),
@@ -102,11 +98,9 @@ EllipsoidOutlineGeometry.packedLength = 2 * Cartesian3.packedLength + 8;
/**
* Stores the provided instance into the provided array.
- *
* @param {EllipsoidOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
EllipsoidOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -156,7 +150,6 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {EllipsoidOutlineGeometry} [result] The object into which to store the result.
@@ -216,7 +209,6 @@ EllipsoidOutlineGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of an outline of an ellipsoid, including its vertices, indices, and a bounding sphere.
- *
* @param {EllipsoidOutlineGeometry} ellipsoidGeometry A description of the ellipsoid outline.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/EllipsoidRhumbLine.js b/packages/engine/Source/Core/EllipsoidRhumbLine.js
index 51b410622677..260264bd3fc5 100644
--- a/packages/engine/Source/Core/EllipsoidRhumbLine.js
+++ b/packages/engine/Source/Core/EllipsoidRhumbLine.js
@@ -379,15 +379,12 @@ function interpolateUsingSurfaceDistance(
/**
* Initializes a rhumb line on the ellipsoid connecting the two provided planetodetic points.
- *
* @alias EllipsoidRhumbLine
- * @constructor
- *
+ * @class
* @param {Cartographic} [start] The initial planetodetic point on the path.
* @param {Cartographic} [end] The final planetodetic point on the path.
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the rhumb line lies.
- *
- * @exception {DeveloperError} angle between start and end must be at least 0.0125 radians.
+ * @throws {DeveloperError} angle between start and end must be at least 0.0125 radians.
*/
function EllipsoidRhumbLine(start, end, ellipsoid) {
const e = defaultValue(ellipsoid, Ellipsoid.WGS84);
@@ -477,7 +474,6 @@ Object.defineProperties(EllipsoidRhumbLine.prototype, {
/**
* Create a rhumb line using an initial position with a heading and distance.
- *
* @param {Cartographic} start The initial planetodetic point on the path.
* @param {number} heading The heading in radians.
* @param {number} distance The rhumb line distance between the start and end point.
@@ -528,7 +524,6 @@ EllipsoidRhumbLine.fromStartHeadingDistance = function (
/**
* Sets the start and end points of the rhumb line.
- *
* @param {Cartographic} start The initial planetodetic point on the path.
* @param {Cartographic} end The final planetodetic point on the path.
*/
@@ -543,7 +538,6 @@ EllipsoidRhumbLine.prototype.setEndPoints = function (start, end) {
/**
* Provides the location of a point at the indicated portion along the rhumb line.
- *
* @param {number} fraction The portion of the distance between the initial and final points.
* @param {Cartographic} [result] The object in which to store the result.
* @returns {Cartographic} The location of the point along the rhumb line.
@@ -560,12 +554,10 @@ EllipsoidRhumbLine.prototype.interpolateUsingFraction = function (
/**
* Provides the location of a point at the indicated distance along the rhumb line.
- *
* @param {number} distance The distance from the inital point to the point of interest along the rhumbLine.
* @param {Cartographic} [result] The object in which to store the result.
* @returns {Cartographic} The location of the point along the rhumb line.
- *
- * @exception {DeveloperError} start and end must be set before calling function interpolateUsingSurfaceDistance
+ * @throws {DeveloperError} start and end must be set before calling function interpolateUsingSurfaceDistance
*/
EllipsoidRhumbLine.prototype.interpolateUsingSurfaceDistance = function (
distance,
@@ -593,12 +585,10 @@ EllipsoidRhumbLine.prototype.interpolateUsingSurfaceDistance = function (
/**
* Provides the location of a point at the indicated longitude along the rhumb line.
* If the longitude is outside the range of start and end points, the first intersection with the longitude from the start point in the direction of the heading is returned. This follows the spiral property of a rhumb line.
- *
* @param {number} intersectionLongitude The longitude, in radians, at which to find the intersection point from the starting point using the heading.
* @param {Cartographic} [result] The object in which to store the result.
* @returns {Cartographic} The location of the intersection point along the rhumb line, undefined if there is no intersection or infinite intersections.
- *
- * @exception {DeveloperError} start and end must be set before calling function findIntersectionWithLongitude.
+ * @throws {DeveloperError} start and end must be set before calling function findIntersectionWithLongitude.
*/
EllipsoidRhumbLine.prototype.findIntersectionWithLongitude = function (
intersectionLongitude,
@@ -697,12 +687,10 @@ EllipsoidRhumbLine.prototype.findIntersectionWithLongitude = function (
/**
* Provides the location of a point at the indicated latitude along the rhumb line.
* If the latitude is outside the range of start and end points, the first intersection with the latitude from that start point in the direction of the heading is returned. This follows the spiral property of a rhumb line.
- *
* @param {number} intersectionLatitude The latitude, in radians, at which to find the intersection point from the starting point using the heading.
* @param {Cartographic} [result] The object in which to store the result.
* @returns {Cartographic} The location of the intersection point along the rhumb line, undefined if there is no intersection or infinite intersections.
- *
- * @exception {DeveloperError} start and end must be set before calling function findIntersectionWithLongitude.
+ * @throws {DeveloperError} start and end must be set before calling function findIntersectionWithLongitude.
*/
EllipsoidRhumbLine.prototype.findIntersectionWithLatitude = function (
intersectionLatitude,
diff --git a/packages/engine/Source/Core/EllipsoidTangentPlane.js b/packages/engine/Source/Core/EllipsoidTangentPlane.js
index 47157fe0f4b5..97afdba46b55 100644
--- a/packages/engine/Source/Core/EllipsoidTangentPlane.js
+++ b/packages/engine/Source/Core/EllipsoidTangentPlane.js
@@ -19,12 +19,10 @@ const scratchCart4 = new Cartesian4();
* If origin is not on the surface of the ellipsoid, it's surface projection will be used.
* If origin is at the center of the ellipsoid, an exception will be thrown.
* @alias EllipsoidTangentPlane
- * @constructor
- *
+ * @class
* @param {Cartesian3} origin The point on the surface of the ellipsoid where the tangent plane touches.
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid to use.
- *
- * @exception {DeveloperError} origin must not be at the center of the ellipsoid.
+ * @throws {DeveloperError} origin must not be at the center of the ellipsoid.
*/
function EllipsoidTangentPlane(origin, ellipsoid) {
//>>includeStart('debug', pragmas.debug);
@@ -134,7 +132,6 @@ const tmp = new AxisAlignedBoundingBox();
/**
* Creates a new instance from the provided ellipsoid and the center
* point of the provided Cartesians.
- *
* @param {Cartesian3[]} cartesians The list of positions surrounding the center point.
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid to use.
* @returns {EllipsoidTangentPlane} The new instance of EllipsoidTangentPlane.
@@ -153,7 +150,6 @@ const scratchProjectPointOntoPlaneCartesian3 = new Cartesian3();
/**
* Computes the projection of the provided 3D position onto the 2D plane, radially outward from the {@link EllipsoidTangentPlane.ellipsoid} coordinate system origin.
- *
* @param {Cartesian3} cartesian The point to project.
* @param {Cartesian2} [result] The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new Cartesian2 instance if none was provided. Undefined if there is no intersection point
@@ -206,9 +202,7 @@ EllipsoidTangentPlane.prototype.projectPointOntoPlane = function (
/**
* Computes the projection of the provided 3D positions onto the 2D plane (where possible), radially outward from the global origin.
* The resulting array may be shorter than the input array - if a single projection is impossible it will not be included.
- *
* @see EllipsoidTangentPlane.projectPointOntoPlane
- *
* @param {Cartesian3[]} cartesians The array of points to project.
* @param {Cartesian2[]} [result] The array of Cartesian2 instances onto which to store results.
* @returns {Cartesian2[]} The modified result parameter or a new array of Cartesian2 instances if none was provided.
@@ -240,7 +234,6 @@ EllipsoidTangentPlane.prototype.projectPointsOntoPlane = function (
/**
* Computes the projection of the provided 3D position onto the 2D plane, along the plane normal.
- *
* @param {Cartesian3} cartesian The point to project.
* @param {Cartesian2} [result] The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new Cartesian2 instance if none was provided.
@@ -290,9 +283,7 @@ EllipsoidTangentPlane.prototype.projectPointToNearestOnPlane = function (
/**
* Computes the projection of the provided 3D positions onto the 2D plane, along the plane normal.
- *
* @see EllipsoidTangentPlane.projectPointToNearestOnPlane
- *
* @param {Cartesian3[]} cartesians The array of points to project.
* @param {Cartesian2[]} [result] The array of Cartesian2 instances onto which to store results.
* @returns {Cartesian2[]} The modified result parameter or a new array of Cartesian2 instances if none was provided. This will have the same length as cartesians.
@@ -320,7 +311,6 @@ EllipsoidTangentPlane.prototype.projectPointsToNearestOnPlane = function (
const projectPointsOntoEllipsoidScratch = new Cartesian3();
/**
* Computes the projection of the provided 2D position onto the 3D ellipsoid.
- *
* @param {Cartesian2} cartesian The points to project.
* @param {Cartesian3} [result] The Cartesian3 instance to store result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided.
@@ -354,7 +344,6 @@ EllipsoidTangentPlane.prototype.projectPointOntoEllipsoid = function (
/**
* Computes the projection of the provided 2D positions onto the 3D ellipsoid.
- *
* @param {Cartesian2[]} cartesians The array of points to project.
* @param {Cartesian3[]} [result] The array of Cartesian3 instances onto which to store results.
* @returns {Cartesian3[]} The modified result parameter or a new array of Cartesian3 instances if none was provided.
diff --git a/packages/engine/Source/Core/EllipsoidTerrainProvider.js b/packages/engine/Source/Core/EllipsoidTerrainProvider.js
index 659918c58221..7cbf46d3847c 100644
--- a/packages/engine/Source/Core/EllipsoidTerrainProvider.js
+++ b/packages/engine/Source/Core/EllipsoidTerrainProvider.js
@@ -9,10 +9,8 @@ import TerrainProvider from "./TerrainProvider.js";
/**
* A very simple {@link TerrainProvider} that produces geometry by tessellating an ellipsoidal
* surface.
- *
* @alias EllipsoidTerrainProvider
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
* @param {TilingScheme} [options.tilingScheme] The tiling scheme specifying how the ellipsoidal
* surface is broken into tiles. If this parameter is not provided, a {@link GeographicTilingScheme}
@@ -20,7 +18,6 @@ import TerrainProvider from "./TerrainProvider.js";
* @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.
- *
* @see TerrainProvider
*/
function EllipsoidTerrainProvider(options) {
@@ -127,12 +124,10 @@ Object.defineProperties(EllipsoidTerrainProvider.prototype, {
/**
* Requests the geometry for a given tile. The result includes terrain
* data and indicates that all child tiles are available.
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
* @param {Request} [request] The request object. Intended for internal use only.
- *
* @returns {Promise|undefined} A promise for the requested geometry. If this method
* returns undefined instead of a promise, it is an indication that too many requests are already
* pending and the request will be retried later.
@@ -156,7 +151,6 @@ EllipsoidTerrainProvider.prototype.requestTileGeometry = function (
/**
* Gets the maximum geometric error allowed in a tile at a given level.
- *
* @param {number} level The tile level for which to get the maximum geometric error.
* @returns {number} The maximum geometric error.
*/
@@ -168,7 +162,6 @@ EllipsoidTerrainProvider.prototype.getLevelMaximumGeometricError = function (
/**
* Determines whether data for a tile is available to be loaded.
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
@@ -184,7 +177,6 @@ EllipsoidTerrainProvider.prototype.getTileDataAvailable = function (
/**
* Makes sure we load availability data for a tile
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
diff --git a/packages/engine/Source/Core/EllipsoidalOccluder.js b/packages/engine/Source/Core/EllipsoidalOccluder.js
index e94d8bbcbf3d..aa97716f09fd 100644
--- a/packages/engine/Source/Core/EllipsoidalOccluder.js
+++ b/packages/engine/Source/Core/EllipsoidalOccluder.js
@@ -11,22 +11,17 @@ import Rectangle from "./Rectangle.js";
* an {@link Ellipsoid} and a camera position. The ellipsoid is assumed to be located at the
* origin of the coordinate system. This class uses the algorithm described in the
* {@link https://cesium.com/blog/2013/04/25/Horizon-culling/|Horizon Culling} blog post.
- *
* @alias EllipsoidalOccluder
- *
* @param {Ellipsoid} ellipsoid The ellipsoid to use as an occluder.
* @param {Cartesian3} [cameraPosition] The coordinate of the viewer/camera. If this parameter is not
* specified, {@link EllipsoidalOccluder#cameraPosition} must be called before
* testing visibility.
- *
- * @constructor
- *
+ * @class
* @example
* // Construct an ellipsoidal occluder with radii 1.0, 1.1, and 0.9.
* const cameraPosition = new Cesium.Cartesian3(5.0, 6.0, 7.0);
* const occluderEllipsoid = new Cesium.Ellipsoid(1.0, 1.1, 0.9);
* const occluder = new Cesium.EllipsoidalOccluder(occluderEllipsoid, cameraPosition);
- *
* @private
*/
function EllipsoidalOccluder(ellipsoid, cameraPosition) {
@@ -85,10 +80,8 @@ const scratchCartesian = new Cartesian3();
/**
* Determines whether or not a point, the occludee, is hidden from view by the occluder.
- *
* @param {Cartesian3} occludee The point to test for visibility.
* @returns {boolean} true if the occludee is visible; otherwise false.
- *
* @example
* const cameraPosition = new Cesium.Cartesian3(0, 0, 2.5);
* const ellipsoid = new Cesium.Ellipsoid(1.0, 1.1, 0.9);
@@ -113,10 +106,8 @@ EllipsoidalOccluder.prototype.isPointVisible = function (occludee) {
* Determines whether or not a point expressed in the ellipsoid scaled space, is hidden from view by the
* occluder. To transform a Cartesian X, Y, Z position in the coordinate system aligned with the ellipsoid
* into the scaled space, call {@link Ellipsoid#transformPositionToScaledSpace}.
- *
* @param {Cartesian3} occludeeScaledSpacePosition The point to test for visibility, represented in the scaled space.
* @returns {boolean} true if the occludee is visible; otherwise false.
- *
* @example
* const cameraPosition = new Cesium.Cartesian3(0, 0, 2.5);
* const ellipsoid = new Cesium.Ellipsoid(1.0, 1.1, 0.9);
@@ -143,8 +134,8 @@ const scratchCameraPositionInScaledSpaceShrunk = new Cartesian3();
* the ellipsoid. This is intended to be used with points generated by
* {@link EllipsoidalOccluder#computeHorizonCullingPointPossiblyUnderEllipsoid} or
* {@link EllipsoidalOccluder#computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid}.
- *
* @param {Cartesian3} occludeeScaledSpacePosition The point to test for visibility, represented in the scaled space of the possibly-shrunk ellipsoid.
+ * @param minimumHeight
* @returns {boolean} true if the occludee is visible; otherwise false.
*/
EllipsoidalOccluder.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid = function (
@@ -183,7 +174,6 @@ EllipsoidalOccluder.prototype.isScaledSpacePointVisiblePossiblyUnderEllipsoid =
* the horizon, all of the positions are guaranteed to be below the horizon as well. The returned point
* is expressed in the ellipsoid-scaled space and is suitable for use with
* {@link EllipsoidalOccluder#isScaledSpacePointVisible}.
- *
* @param {Cartesian3} directionToPoint The direction that the computed point will lie along.
* A reasonable direction to use is the direction from the center of the ellipsoid to
* the center of the bounding sphere computed from the positions. The direction need not
@@ -214,7 +204,6 @@ const scratchEllipsoidShrunk = Ellipsoid.clone(Ellipsoid.UNIT_SPHERE);
* point relative to an ellipsoid that has been shrunk by the minimum height when the minimum height is below
* the ellipsoid. The returned point is expressed in the possibly-shrunk ellipsoid-scaled space and is suitable
* for use with {@link EllipsoidalOccluder#isScaledSpacePointVisiblePossiblyUnderEllipsoid}.
- *
* @param {Cartesian3} directionToPoint The direction that the computed point will lie along.
* A reasonable direction to use is the direction from the center of the ellipsoid to
* the center of the bounding sphere computed from the positions. The direction need not
@@ -249,7 +238,6 @@ EllipsoidalOccluder.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid =
* the horizon, all of the positions are guaranteed to be below the horizon as well. The returned point
* is expressed in the ellipsoid-scaled space and is suitable for use with
* {@link EllipsoidalOccluder#isScaledSpacePointVisible}.
- *
* @param {Cartesian3} directionToPoint The direction that the computed point will lie along.
* A reasonable direction to use is the direction from the center of the ellipsoid to
* the center of the bounding sphere computed from the positions. The direction need not
@@ -284,7 +272,6 @@ EllipsoidalOccluder.prototype.computeHorizonCullingPointFromVertices = function
* point relative to an ellipsoid that has been shrunk by the minimum height when the minimum height is below
* the ellipsoid. The returned point is expressed in the possibly-shrunk ellipsoid-scaled space and is suitable
* for use with {@link EllipsoidalOccluder#isScaledSpacePointVisiblePossiblyUnderEllipsoid}.
- *
* @param {Cartesian3} directionToPoint The direction that the computed point will lie along.
* A reasonable direction to use is the direction from the center of the ellipsoid to
* the center of the bounding sphere computed from the positions. The direction need not
@@ -328,7 +315,6 @@ const subsampleScratch = [];
* the horizon, the ellipsoid-conforming rectangle is guaranteed to be below the horizon as well.
* The returned point is expressed in the ellipsoid-scaled space and is suitable for use with
* {@link EllipsoidalOccluder#isScaledSpacePointVisible}.
- *
* @param {Rectangle} rectangle The rectangle for which to compute the horizon culling point.
* @param {Ellipsoid} ellipsoid The ellipsoid on which the rectangle is defined. This may be different from
* the ellipsoid used by this instance for occlusion testing.
diff --git a/packages/engine/Source/Core/EncodedCartesian3.js b/packages/engine/Source/Core/EncodedCartesian3.js
index b6df42a5ffd4..b623102ee6ec 100644
--- a/packages/engine/Source/Core/EncodedCartesian3.js
+++ b/packages/engine/Source/Core/EncodedCartesian3.js
@@ -9,16 +9,13 @@ import defined from "./defined.js";
* This is used to encode positions in vertex buffers for rendering without jittering artifacts
* as described in {@link http://help.agi.com/AGIComponents/html/BlogPrecisionsPrecisions.htm|Precisions, Precisions}.
*
- *
* @alias EncodedCartesian3
- * @constructor
- *
+ * @class
* @private
*/
function EncodedCartesian3() {
/**
* The high bits for each component. Bits 0 to 22 store the whole value. Bits 23 to 31 are not used.
- *
* @type {Cartesian3}
* @default {@link Cartesian3.ZERO}
*/
@@ -26,7 +23,6 @@ function EncodedCartesian3() {
/**
* The low bits for each component. Bits 7 to 22 store the whole value, and bits 0 to 6 store the fraction. Bits 23 to 31 are not used.
- *
* @type {Cartesian3}
* @default {@link Cartesian3.ZERO}
*/
@@ -40,11 +36,9 @@ function EncodedCartesian3() {
*
* The fixed-point encoding follows {@link http://help.agi.com/AGIComponents/html/BlogPrecisionsPrecisions.htm|Precisions, Precisions}.
*
- *
* @param {number} value The floating-point value to encode.
* @param {object} [result] The object onto which to store the result.
* @returns {object} The modified result parameter or a new instance if one was not provided.
- *
* @example
* const value = 1234567.1234567;
* const splitValue = Cesium.EncodedCartesian3.encode(value);
@@ -86,11 +80,9 @@ const scratchEncode = {
*
* The fixed-point encoding follows {@link https://help.agi.com/AGIComponents/html/BlogPrecisionsPrecisions.htm|Precisions, Precisions}.
*
- *
* @param {Cartesian3} cartesian The cartesian to encode.
* @param {EncodedCartesian3} [result] The object onto which to store the result.
* @returns {EncodedCartesian3} The modified result parameter or a new EncodedCartesian3 instance if one was not provided.
- *
* @example
* const cart = new Cesium.Cartesian3(-10000000.0, 0.0, 10000000.0);
* const encoded = Cesium.EncodedCartesian3.fromCartesian(cart);
@@ -130,13 +122,10 @@ const encodedP = new EncodedCartesian3();
*
* This is used to create interleaved high-precision position vertex attributes.
*
- *
* @param {Cartesian3} cartesian The cartesian to encode.
* @param {number[]} cartesianArray The array to write to.
* @param {number} index The index into the array to start writing. Six elements will be written.
- *
- * @exception {DeveloperError} index must be a number greater than or equal to 0.
- *
+ * @throws {DeveloperError} index must be a number greater than or equal to 0.
* @example
* const positions = [
* new Cesium.Cartesian3(),
diff --git a/packages/engine/Source/Core/Event.js b/packages/engine/Source/Core/Event.js
index cf53ef966052..307ffdd84efd 100644
--- a/packages/engine/Source/Core/Event.js
+++ b/packages/engine/Source/Core/Event.js
@@ -5,10 +5,9 @@ import defined from "./defined.js";
* A generic utility class for managing subscribers for a particular event.
* This class is usually instantiated inside of a container class and
* exposed as a property for others to subscribe to.
- *
* @alias Event
* @template Listener extends (...args: any[]) => void = (...args: any[]) => void
- * @constructor
+ * @class
* @example
* MyObject.prototype.myListener = function(arg1, arg2) {
* this.myArg1Copy = arg1;
@@ -46,12 +45,10 @@ Object.defineProperties(Event.prototype, {
* Registers a callback function to be executed whenever the event is raised.
* 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 {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.
- *
* @see Event#raiseEvent
* @see Event#removeEventListener
*/
@@ -71,11 +68,9 @@ Event.prototype.addEventListener = function (listener, scope) {
/**
* Unregisters a previously registered callback.
- *
* @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.
- *
* @see Event#addEventListener
* @see Event#raiseEvent
*/
@@ -119,9 +114,7 @@ function compareNumber(a, b) {
/**
* Raises the event by calling each registered listener with all supplied arguments.
- *
* @param {...Parameters} arguments This method takes any number of parameters and passes them through to the listener functions.
- *
* @see Event#addEventListener
* @see Event#removeEventListener
*/
diff --git a/packages/engine/Source/Core/EventHelper.js b/packages/engine/Source/Core/EventHelper.js
index e9a024c64597..4065ebcfc17a 100644
--- a/packages/engine/Source/Core/EventHelper.js
+++ b/packages/engine/Source/Core/EventHelper.js
@@ -5,11 +5,8 @@ import DeveloperError from "./DeveloperError.js";
* A convenience object that simplifies the common pattern of attaching event listeners
* to several events, then removing all those listeners at once later, for example, in
* a destroy method.
- *
* @alias EventHelper
- * @constructor
- *
- *
+ * @class
* @example
* const helper = new Cesium.EventHelper();
*
@@ -18,7 +15,6 @@ import DeveloperError from "./DeveloperError.js";
*
* // later...
* helper.removeAll();
- *
* @see Event
*/
function EventHelper() {
@@ -27,13 +23,11 @@ function EventHelper() {
/**
* Adds a listener to an event, and records the registration to be cleaned up later.
- *
* @param {Event} event The event to attach to.
* @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 {EventHelper.RemoveCallback} A function that will remove this event listener when invoked.
- *
* @see Event#addEventListener
*/
EventHelper.prototype.add = function (event, listener, scope) {
@@ -56,7 +50,6 @@ EventHelper.prototype.add = function (event, listener, scope) {
/**
* Unregisters all previously added listeners.
- *
* @see Event#removeEventListener
*/
EventHelper.prototype.removeAll = function () {
diff --git a/packages/engine/Source/Core/ExtrapolationType.js b/packages/engine/Source/Core/ExtrapolationType.js
index a62b453818a4..cf47de17cac1 100644
--- a/packages/engine/Source/Core/ExtrapolationType.js
+++ b/packages/engine/Source/Core/ExtrapolationType.js
@@ -1,15 +1,12 @@
/**
* Constants to determine how an interpolated value is extrapolated
* when querying outside the bounds of available data.
- *
* @enum {number}
- *
* @see SampledProperty
*/
const ExtrapolationType = {
/**
* No extrapolation occurs.
- *
* @type {number}
* @constant
*/
@@ -17,7 +14,6 @@ const ExtrapolationType = {
/**
* The first or last value is used when outside the range of sample data.
- *
* @type {number}
* @constant
*/
@@ -25,7 +21,6 @@ const ExtrapolationType = {
/**
* The value is extrapolated.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/FeatureDetection.js b/packages/engine/Source/Core/FeatureDetection.js
index 795f79e34e4b..53adf83059d1 100644
--- a/packages/engine/Source/Core/FeatureDetection.js
+++ b/packages/engine/Source/Core/FeatureDetection.js
@@ -296,7 +296,6 @@ if (typeof ArrayBuffer !== "undefined") {
/**
* A set of functions to detect whether the current browser supports
* various features.
- *
* @namespace FeatureDetection
*/
const FeatureDetection = {
@@ -324,7 +323,6 @@ const FeatureDetection = {
/**
* Detects whether the current browser supports Basis Universal textures and the web assembly modules needed to transcode them.
- *
* @param {Scene} scene
* @returns {boolean} true if the browser supports web assembly modules and the scene supports Basis Universal textures, false if not.
*/
@@ -334,9 +332,7 @@ FeatureDetection.supportsBasis = function (scene) {
/**
* Detects whether the current browser supports the full screen standard.
- *
* @returns {boolean} true if the browser supports the full screen standard, false if not.
- *
* @see Fullscreen
* @see {@link http://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html|W3C Fullscreen Living Specification}
*/
@@ -346,9 +342,7 @@ FeatureDetection.supportsFullscreen = function () {
/**
* Detects whether the current browser supports typed arrays.
- *
* @returns {boolean} true if the browser supports typed arrays, false if not.
- *
* @see {@link https://tc39.es/ecma262/#sec-typedarray-objects|Typed Array Specification}
*/
FeatureDetection.supportsTypedArrays = function () {
@@ -357,9 +351,7 @@ FeatureDetection.supportsTypedArrays = function () {
/**
* Detects whether the current browser supports BigInt64Array typed arrays.
- *
* @returns {boolean} true if the browser supports BigInt64Array typed arrays, false if not.
- *
* @see {@link https://tc39.es/ecma262/#sec-typedarray-objects|Typed Array Specification}
*/
FeatureDetection.supportsBigInt64Array = function () {
@@ -368,9 +360,7 @@ FeatureDetection.supportsBigInt64Array = function () {
/**
* Detects whether the current browser supports BigUint64Array typed arrays.
- *
* @returns {boolean} true if the browser supports BigUint64Array typed arrays, false if not.
- *
* @see {@link https://tc39.es/ecma262/#sec-typedarray-objects|Typed Array Specification}
*/
FeatureDetection.supportsBigUint64Array = function () {
@@ -379,9 +369,7 @@ FeatureDetection.supportsBigUint64Array = function () {
/**
* Detects whether the current browser supports BigInt.
- *
* @returns {boolean} true if the browser supports BigInt, false if not.
- *
* @see {@link https://tc39.es/ecma262/#sec-bigint-objects|BigInt Specification}
*/
FeatureDetection.supportsBigInt = function () {
@@ -390,9 +378,7 @@ FeatureDetection.supportsBigInt = function () {
/**
* Detects whether the current browser supports Web Workers.
- *
* @returns {boolean} true if the browsers supports Web Workers, false if not.
- *
* @see {@link http://www.w3.org/TR/workers/}
*/
FeatureDetection.supportsWebWorkers = function () {
@@ -401,9 +387,7 @@ FeatureDetection.supportsWebWorkers = function () {
/**
* Detects whether the current browser supports Web Assembly.
- *
* @returns {boolean} true if the browsers supports Web Assembly, false if not.
- *
* @see {@link https://developer.mozilla.org/en-US/docs/WebAssembly}
*/
FeatureDetection.supportsWebAssembly = function () {
@@ -412,10 +396,8 @@ FeatureDetection.supportsWebAssembly = function () {
/**
* Detects whether the current browser supports a WebGL2 rendering context for the specified scene.
- *
* @param {Scene} scene the Cesium scene specifying the rendering context
* @returns {boolean} true if the browser supports a WebGL2 rendering context, false if not.
- *
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext|WebGL2RenderingContext}
*/
FeatureDetection.supportsWebgl2 = function (scene) {
diff --git a/packages/engine/Source/Core/FrustumGeometry.js b/packages/engine/Source/Core/FrustumGeometry.js
index 46fcb8cfb785..2d1b62654a16 100644
--- a/packages/engine/Source/Core/FrustumGeometry.js
+++ b/packages/engine/Source/Core/FrustumGeometry.js
@@ -21,10 +21,8 @@ const ORTHOGRAPHIC = 1;
/**
* Describes a frustum at the given the origin and orientation.
- *
* @alias FrustumGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {PerspectiveFrustum|OrthographicFrustum} options.frustum The frustum.
* @param {Cartesian3} options.origin The origin of the frustum.
@@ -81,11 +79,9 @@ function FrustumGeometry(options) {
/**
* Stores the provided instance into the provided array.
- *
* @param {FrustumGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
FrustumGeometry.pack = function (value, array, startingIndex) {
@@ -128,7 +124,6 @@ const scratchVertexFormat = new VertexFormat();
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {FrustumGeometry} [result] The object into which to store the result.
@@ -377,7 +372,6 @@ FrustumGeometry._computeNearFarPlanes = function (
/**
* Computes the geometric representation of a frustum, including its vertices, indices, and a bounding sphere.
- *
* @param {FrustumGeometry} frustumGeometry A description of the frustum.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/FrustumOutlineGeometry.js b/packages/engine/Source/Core/FrustumOutlineGeometry.js
index e49aea1bd141..c78cafe68e5b 100644
--- a/packages/engine/Source/Core/FrustumOutlineGeometry.js
+++ b/packages/engine/Source/Core/FrustumOutlineGeometry.js
@@ -18,10 +18,8 @@ const ORTHOGRAPHIC = 1;
/**
* A description of the outline of a frustum with the given the origin and orientation.
- *
* @alias FrustumOutlineGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {PerspectiveFrustum|OrthographicFrustum} options.frustum The frustum.
* @param {Cartesian3} options.origin The origin of the frustum.
@@ -71,11 +69,9 @@ function FrustumOutlineGeometry(options) {
/**
* Stores the provided instance into the provided array.
- *
* @param {FrustumOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
FrustumOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -115,7 +111,6 @@ const scratchPackorigin = new Cartesian3();
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {FrustumOutlineGeometry} [result] The object into which to store the result.
@@ -179,7 +174,6 @@ FrustumOutlineGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of a frustum outline, including its vertices, indices, and a bounding sphere.
- *
* @param {FrustumOutlineGeometry} frustumGeometry A description of the frustum.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/Fullscreen.js b/packages/engine/Source/Core/Fullscreen.js
index 3b18de25a213..c94a16eb7a8f 100644
--- a/packages/engine/Source/Core/Fullscreen.js
+++ b/packages/engine/Source/Core/Fullscreen.js
@@ -12,9 +12,7 @@ const _names = {
/**
* Browser-independent functions for working with the standard fullscreen API.
- *
* @namespace Fullscreen
- *
* @see {@link http://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html|W3C Fullscreen Living Specification}
*/
const Fullscreen = {};
@@ -110,7 +108,6 @@ Object.defineProperties(Fullscreen, {
/**
* Detects whether the browser supports the standard fullscreen API.
- *
* @returns {boolean} true if the browser supports the standard fullscreen API,
* false otherwise.
*/
@@ -213,10 +210,8 @@ Fullscreen.supportsFullscreen = function () {
/**
* Asynchronously requests the browser to enter fullscreen mode on the given element.
* If fullscreen mode is not supported by the browser, does nothing.
- *
* @param {object} element The HTML element which will be placed into fullscreen mode.
* @param {object} [vrDevice] The HMDVRDevice device.
- *
* @example
* // Put the entire page into fullscreen.
* Cesium.Fullscreen.requestFullscreen(document.body)
diff --git a/packages/engine/Source/Core/GeocodeType.js b/packages/engine/Source/Core/GeocodeType.js
index 3348b6d5ffbf..b27bf22cb149 100644
--- a/packages/engine/Source/Core/GeocodeType.js
+++ b/packages/engine/Source/Core/GeocodeType.js
@@ -6,7 +6,6 @@
const GeocodeType = {
/**
* Perform a search where the input is considered complete.
- *
* @type {number}
* @constant
*/
@@ -15,7 +14,6 @@ const GeocodeType = {
/**
* Perform an auto-complete using partial input, typically
* reserved for providing possible results as a user is typing.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/GeocoderService.js b/packages/engine/Source/Core/GeocoderService.js
index 5c02ec2bdff8..a5b93a6599c3 100644
--- a/packages/engine/Source/Core/GeocoderService.js
+++ b/packages/engine/Source/Core/GeocoderService.js
@@ -13,8 +13,7 @@ import DeveloperError from "./DeveloperError.js";
* Provides geocoding through an external service. This type describes an interface and
* is not intended to be used.
* @alias GeocoderService
- * @constructor
- *
+ * @class
* @see BingMapsGeocoderService
* @see PeliasGeocoderService
* @see OpenCageGeocoderService
@@ -51,7 +50,6 @@ GeocoderService.getCreditsFromResult = function (geocoderResult) {
/**
* @function
- *
* @param {string} query The query to be sent to the geocoder service
* @param {GeocodeType} [type=GeocodeType.SEARCH] The type of geocode to perform.
* @returns {Promise}
diff --git a/packages/engine/Source/Core/GeographicProjection.js b/packages/engine/Source/Core/GeographicProjection.js
index f6ac972c6272..2d0540b19576 100644
--- a/packages/engine/Source/Core/GeographicProjection.js
+++ b/packages/engine/Source/Core/GeographicProjection.js
@@ -10,12 +10,9 @@ import Ellipsoid from "./Ellipsoid.js";
* them by the {@link Ellipsoid#maximumRadius}. This projection
* is commonly known as geographic, equirectangular, equidistant cylindrical, or plate carrée. It
* is also known as EPSG:4326.
- *
* @alias GeographicProjection
- * @constructor
- *
+ * @class
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid.
- *
* @see WebMercatorProjection
*/
function GeographicProjection(ellipsoid) {
@@ -27,9 +24,7 @@ function GeographicProjection(ellipsoid) {
Object.defineProperties(GeographicProjection.prototype, {
/**
* Gets the {@link Ellipsoid}.
- *
* @memberof GeographicProjection.prototype
- *
* @type {Ellipsoid}
* @readonly
*/
@@ -44,7 +39,6 @@ Object.defineProperties(GeographicProjection.prototype, {
* Projects a set of {@link Cartographic} coordinates, in radians, to map coordinates, in meters.
* X and Y are the longitude and latitude, respectively, multiplied by the maximum radius of the
* ellipsoid. Z is the unmodified height.
- *
* @param {Cartographic} cartographic The coordinates to project.
* @param {Cartesian3} [result] An instance into which to copy the result. If this parameter is
* undefined, a new instance is created and returned.
@@ -73,7 +67,6 @@ GeographicProjection.prototype.project = function (cartographic, result) {
* Unprojects a set of projected {@link Cartesian3} coordinates, in meters, to {@link Cartographic}
* coordinates, in radians. Longitude and Latitude are the X and Y coordinates, respectively,
* divided by the maximum radius of the ellipsoid. Height is the unmodified Z coordinate.
- *
* @param {Cartesian3} cartesian The Cartesian position to unproject with height (z) in meters.
* @param {Cartographic} [result] An instance into which to copy the result. If this parameter is
* undefined, a new instance is created and returned.
diff --git a/packages/engine/Source/Core/GeographicTilingScheme.js b/packages/engine/Source/Core/GeographicTilingScheme.js
index 0b2ce78a3576..2897715ae78a 100644
--- a/packages/engine/Source/Core/GeographicTilingScheme.js
+++ b/packages/engine/Source/Core/GeographicTilingScheme.js
@@ -11,10 +11,8 @@ import Rectangle from "./Rectangle.js";
* A tiling scheme for geometry referenced to a simple {@link GeographicProjection} where
* longitude and latitude are directly mapped to X and Y. This projection is commonly
* known as geographic, equirectangular, equidistant cylindrical, or plate carrée.
- *
* @alias GeographicTilingScheme
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid whose surface is being tiled. Defaults to
* the WGS84 ellipsoid.
@@ -77,7 +75,6 @@ Object.defineProperties(GeographicTilingScheme.prototype, {
/**
* Gets the total number of tiles in the X direction at a specified level-of-detail.
- *
* @param {number} level The level-of-detail.
* @returns {number} The number of tiles in the X direction at the given level.
*/
@@ -87,7 +84,6 @@ GeographicTilingScheme.prototype.getNumberOfXTilesAtLevel = function (level) {
/**
* Gets the total number of tiles in the Y direction at a specified level-of-detail.
- *
* @param {number} level The level-of-detail.
* @returns {number} The number of tiles in the Y direction at the given level.
*/
@@ -98,7 +94,6 @@ GeographicTilingScheme.prototype.getNumberOfYTilesAtLevel = function (level) {
/**
* Transforms a rectangle specified in geodetic radians to the native coordinate system
* of this tiling scheme.
- *
* @param {Rectangle} rectangle The rectangle to transform.
* @param {Rectangle} [result] The instance to which to copy the result, or undefined if a new instance
* should be created.
@@ -132,7 +127,6 @@ GeographicTilingScheme.prototype.rectangleToNativeRectangle = function (
/**
* Converts tile x, y coordinates and level to a rectangle expressed in the native coordinates
* of the tiling scheme.
- *
* @param {number} x The integer x coordinate of the tile.
* @param {number} y The integer y coordinate of the tile.
* @param {number} level The tile level-of-detail. Zero is the least detailed.
@@ -157,7 +151,6 @@ GeographicTilingScheme.prototype.tileXYToNativeRectangle = function (
/**
* Converts tile x, y coordinates and level to a cartographic rectangle in radians.
- *
* @param {number} x The integer x coordinate of the tile.
* @param {number} y The integer y coordinate of the tile.
* @param {number} level The tile level-of-detail. Zero is the least detailed.
@@ -199,7 +192,6 @@ GeographicTilingScheme.prototype.tileXYToRectangle = function (
/**
* Calculates the tile x, y coordinates of the tile containing
* a given cartographic position.
- *
* @param {Cartographic} position The position.
* @param {number} level The tile level-of-detail. Zero is the least detailed.
* @param {Cartesian2} [result] The instance to which to copy the result, or undefined if a new instance
diff --git a/packages/engine/Source/Core/Geometry.js b/packages/engine/Source/Core/Geometry.js
index d9e6873a919a..b52be1c67990 100644
--- a/packages/engine/Source/Core/Geometry.js
+++ b/packages/engine/Source/Core/Geometry.js
@@ -22,16 +22,13 @@ import Transforms from "./Transforms.js";
*
* Geometries can be transformed and optimized using functions in {@link GeometryPipeline}.
*
- *
* @alias Geometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {GeometryAttributes} options.attributes Attributes, which make up the geometry's vertices.
* @param {PrimitiveType} [options.primitiveType=PrimitiveType.TRIANGLES] The type of primitives in the geometry.
* @param {Uint16Array|Uint32Array} [options.indices] Optional index data that determines the primitives in the geometry.
* @param {BoundingSphere} [options.boundingSphere] An optional bounding sphere that fully enclosed the geometry.
- *
* @see PolygonGeometry
* @see RectangleGeometry
* @see EllipseGeometry
@@ -40,9 +37,7 @@ import Transforms from "./Transforms.js";
* @see SimplePolylineGeometry
* @see BoxGeometry
* @see EllipsoidGeometry
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Geometry%20and%20Appearances.html|Geometry and Appearances Demo}
- *
* @example
* // Create geometry with a position attribute and indexed lines.
* const positions = new Float64Array([
@@ -81,11 +76,11 @@ function Geometry(options) {
* There are reserved attribute names with well-known semantics. The following attributes
* are created by a Geometry (depending on the provided {@link VertexFormat}.
*
- *
position - 3D vertex position. 64-bit floating-point (for precision). 3 components per attribute. See {@link VertexFormat#position}.
- *
normal - Normal (normalized), commonly used for lighting. 32-bit floating-point. 3 components per attribute. See {@link VertexFormat#normal}.
- *
st - 2D texture coordinate. 32-bit floating-point. 2 components per attribute. See {@link VertexFormat#st}.
- *
bitangent - Bitangent (normalized), used for tangent-space effects like bump mapping. 32-bit floating-point. 3 components per attribute. See {@link VertexFormat#bitangent}.
- *
tangent - Tangent (normalized), used for tangent-space effects like bump mapping. 32-bit floating-point. 3 components per attribute. See {@link VertexFormat#tangent}.
+ *
position - 3D vertex position. 64-bit floating-point (for precision). 3 components per attribute. See {@link VertexFormat#position}.
+ *
normal - Normal (normalized), commonly used for lighting. 32-bit floating-point. 3 components per attribute. See {@link VertexFormat#normal}.
+ *
st - 2D texture coordinate. 32-bit floating-point. 2 components per attribute. See {@link VertexFormat#st}.
+ *
bitangent - Bitangent (normalized), used for tangent-space effects like bump mapping. 32-bit floating-point. 3 components per attribute. See {@link VertexFormat#bitangent}.
+ *
tangent - Tangent (normalized), used for tangent-space effects like bump mapping. 32-bit floating-point. 3 components per attribute. See {@link VertexFormat#tangent}.
*
*
*
@@ -93,27 +88,22 @@ function Geometry(options) {
* to a Geometry by a {@link Primitive} or {@link GeometryPipeline} functions to prepare
* the geometry for rendering.
*
- *
position3DHigh - High 32 bits for encoded 64-bit position computed with {@link GeometryPipeline.encodeAttribute}. 32-bit floating-point. 4 components per attribute.
- *
position3DLow - Low 32 bits for encoded 64-bit position computed with {@link GeometryPipeline.encodeAttribute}. 32-bit floating-point. 4 components per attribute.
- *
position2DHigh - High 32 bits for encoded 64-bit 2D (Columbus view) position computed with {@link GeometryPipeline.encodeAttribute}. 32-bit floating-point. 4 components per attribute.
- *
position2DLow - Low 32 bits for encoded 64-bit 2D (Columbus view) position computed with {@link GeometryPipeline.encodeAttribute}. 32-bit floating-point. 4 components per attribute.
- *
color - RGBA color (normalized) usually from {@link GeometryInstance#color}. 32-bit floating-point. 4 components per attribute.
- *
pickColor - RGBA color used for picking. 32-bit floating-point. 4 components per attribute.
+ *
position3DHigh - High 32 bits for encoded 64-bit position computed with {@link GeometryPipeline.encodeAttribute}. 32-bit floating-point. 4 components per attribute.
+ *
position3DLow - Low 32 bits for encoded 64-bit position computed with {@link GeometryPipeline.encodeAttribute}. 32-bit floating-point. 4 components per attribute.
+ *
position2DHigh - High 32 bits for encoded 64-bit 2D (Columbus view) position computed with {@link GeometryPipeline.encodeAttribute}. 32-bit floating-point. 4 components per attribute.
+ *
position2DLow - Low 32 bits for encoded 64-bit 2D (Columbus view) position computed with {@link GeometryPipeline.encodeAttribute}. 32-bit floating-point. 4 components per attribute.
+ *
color - RGBA color (normalized) usually from {@link GeometryInstance#color}. 32-bit floating-point. 4 components per attribute.
+ *
pickColor - RGBA color used for picking. 32-bit floating-point. 4 components per attribute.
*
*
- *
* @type GeometryAttributes
- *
* @default undefined
- *
- *
* @example
* geometry.attributes.position = new Cesium.GeometryAttribute({
* componentDatatype : Cesium.ComponentDatatype.FLOAT,
* componentsPerAttribute : 3,
* values : new Float32Array(0)
* });
- *
* @see GeometryAttribute
* @see VertexFormat
*/
@@ -122,9 +112,7 @@ function Geometry(options) {
/**
* Optional index data that - along with {@link Geometry#primitiveType} -
* determines the primitives in the geometry.
- *
* @type {Array}
- *
* @default undefined
*/
this.indices = options.indices;
@@ -132,9 +120,7 @@ function Geometry(options) {
/**
* The type of primitives in the geometry. This is most often {@link PrimitiveType.TRIANGLES},
* but can varying based on the specific geometry.
- *
* @type PrimitiveType
- *
* @default undefined
*/
this.primitiveType = defaultValue(
@@ -145,9 +131,7 @@ function Geometry(options) {
/**
* An optional bounding sphere that fully encloses the geometry. This is
* commonly used for culling.
- *
* @type BoundingSphere
- *
* @default undefined
*/
this.boundingSphere = options.boundingSphere;
@@ -172,10 +156,8 @@ function Geometry(options) {
/**
* Computes the number of vertices in a geometry. The runtime is linear with
* respect to the number of attributes in a vertex, not the number of vertices.
- *
* @param {Geometry} geometry The geometry.
* @returns {number} The number of vertices in the geometry.
- *
* @example
* const numVertices = Cesium.Geometry.computeNumberOfVertices(geometry);
*/
@@ -242,7 +224,6 @@ const rotation2DScratch = new Matrix2();
*
* RectangleGeometry has its own version of this method that computes remapping coordinates using cartographic space
* as an intermediary instead of local ENU, which is more accurate for large-area rectangles.
- *
* @param {Cartesian3[]} positions Array of positions outlining the geometry
* @param {number} stRotation Texture coordinate rotation.
* @param {Ellipsoid} ellipsoid Ellipsoid for projecting and generating local vectors.
diff --git a/packages/engine/Source/Core/GeometryAttribute.js b/packages/engine/Source/Core/GeometryAttribute.js
index 18c27af5d07e..64511d51bf4b 100644
--- a/packages/engine/Source/Core/GeometryAttribute.js
+++ b/packages/engine/Source/Core/GeometryAttribute.js
@@ -6,19 +6,14 @@ import DeveloperError from "./DeveloperError.js";
* Values and type information for geometry attributes. A {@link Geometry}
* generally contains one or more attributes. All attributes together form
* the geometry's vertices.
- *
* @alias GeometryAttribute
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
* @param {ComponentDatatype} [options.componentDatatype] The datatype of each component in the attribute, e.g., individual elements in values.
* @param {number} [options.componentsPerAttribute] A number between 1 and 4 that defines the number of components in an attributes.
* @param {boolean} [options.normalize=false] When true and componentDatatype is an integer format, indicate that the components should be mapped to the range [0, 1] (unsigned) or [-1, 1] (signed) when they are accessed as floating-point for rendering.
* @param {number[]|Int8Array|Uint8Array|Int16Array|Uint16Array|Int32Array|Uint32Array|Float32Array|Float64Array} [options.values] The values for the attributes stored in a typed array.
- *
- * @exception {DeveloperError} options.componentsPerAttribute must be between 1 and 4.
- *
- *
+ * @throws {DeveloperError} options.componentsPerAttribute must be between 1 and 4.
* @example
* const geometry = new Cesium.Geometry({
* attributes : {
@@ -34,7 +29,6 @@ import DeveloperError from "./DeveloperError.js";
* },
* primitiveType : Cesium.PrimitiveType.LINE_LOOP
* });
- *
* @see Geometry
*/
function GeometryAttribute(options) {
@@ -63,9 +57,7 @@ function GeometryAttribute(options) {
/**
* The datatype of each component in the attribute, e.g., individual elements in
* {@link GeometryAttribute#values}.
- *
* @type {ComponentDatatype}
- *
* @default undefined
*/
this.componentDatatype = options.componentDatatype;
@@ -74,11 +66,8 @@ function GeometryAttribute(options) {
* A number between 1 and 4 that defines the number of components in an attributes.
* For example, a position attribute with x, y, and z components would have 3 as
* shown in the code example.
- *
* @type {number}
- *
* @default undefined
- *
* @example
* attribute.componentDatatype = Cesium.ComponentDatatype.FLOAT;
* attribute.componentsPerAttribute = 3;
@@ -97,11 +86,8 @@ function GeometryAttribute(options) {
*
* This is commonly used when storing colors using {@link ComponentDatatype.UNSIGNED_BYTE}.
*
- *
* @type {boolean}
- *
* @default false
- *
* @example
* attribute.componentDatatype = Cesium.ComponentDatatype.UNSIGNED_BYTE;
* attribute.componentsPerAttribute = 4;
@@ -119,11 +105,8 @@ function GeometryAttribute(options) {
* The values for the attributes stored in a typed array. In the code example,
* every three elements in values defines one attributes since
* componentsPerAttribute is 3.
- *
* @type {number[]|Int8Array|Uint8Array|Int16Array|Uint16Array|Int32Array|Uint32Array|Float32Array|Float64Array}
- *
* @default undefined
- *
* @example
* attribute.componentDatatype = Cesium.ComponentDatatype.FLOAT;
* attribute.componentsPerAttribute = 3;
diff --git a/packages/engine/Source/Core/GeometryAttributes.js b/packages/engine/Source/Core/GeometryAttributes.js
index a681ded710bd..81e5d633e893 100644
--- a/packages/engine/Source/Core/GeometryAttributes.js
+++ b/packages/engine/Source/Core/GeometryAttributes.js
@@ -6,9 +6,9 @@ import defaultValue from "./defaultValue.js";
*
* Attributes are always stored non-interleaved in a Geometry.
*
* 8-bit unsigned integer. 4 components per attribute.
*
- *
* @type GeometryAttribute
- *
* @default undefined
*/
this.color = options.color;
diff --git a/packages/engine/Source/Core/GeometryFactory.js b/packages/engine/Source/Core/GeometryFactory.js
index 10ee22d3cf1e..0658e4e758f9 100644
--- a/packages/engine/Source/Core/GeometryFactory.js
+++ b/packages/engine/Source/Core/GeometryFactory.js
@@ -3,8 +3,7 @@ import DeveloperError from "../Core/DeveloperError.js";
/**
* Base class for all geometry creation utility classes that can be passed to {@link GeometryInstance}
* for asynchronous geometry creation.
- *
- * @constructor
+ * @class
* @class
* @abstract
*/
@@ -14,7 +13,6 @@ function GeometryFactory() {
/**
* Returns a geometry.
- *
* @param {GeometryFactory} geometryFactory A description of the circle.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/GeometryInstance.js b/packages/engine/Source/Core/GeometryInstance.js
index 572d9b81ef68..85cbec38e619 100644
--- a/packages/engine/Source/Core/GeometryInstance.js
+++ b/packages/engine/Source/Core/GeometryInstance.js
@@ -8,17 +8,13 @@ import Matrix4 from "./Matrix4.js";
* different locations and colored uniquely. For example, one {@link BoxGeometry} can
* be instanced several times, each with a different modelMatrix to change
* its position, rotation, and scale.
- *
* @alias GeometryInstance
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Geometry|GeometryFactory} options.geometry The geometry to instance.
* @param {Matrix4} [options.modelMatrix=Matrix4.IDENTITY] The model matrix that transforms to transform the geometry from model to world coordinates.
* @param {object} [options.id] A user-defined object to return when the instance is picked with {@link Scene#pick} or get/set per-instance attributes with {@link Primitive#getGeometryInstanceAttributes}.
* @param {object} [options.attributes] Per-instance attributes like a show or color attribute shown in the example below.
- *
- *
* @example
* // Create geometry for a box, and two instances that refer to it.
* // One instance positions the box on the bottom and colored aqua.
@@ -45,7 +41,6 @@ import Matrix4 from "./Matrix4.js";
* },
* id : 'top'
* });
- *
* @see Geometry
*/
function GeometryInstance(options) {
@@ -59,9 +54,7 @@ function GeometryInstance(options) {
/**
* The geometry being instanced.
- *
* @type Geometry
- *
* @default undefined
*/
this.geometry = options.geometry;
@@ -71,9 +64,7 @@ function GeometryInstance(options) {
* When this is the identity matrix, the geometry is drawn in world coordinates, i.e., Earth's WGS84 coordinates.
* Local reference frames can be used by providing a different transformation matrix, like that returned
* by {@link Transforms.eastNorthUpToFixedFrame}.
- *
* @type Matrix4
- *
* @default Matrix4.IDENTITY
*/
this.modelMatrix = Matrix4.clone(
@@ -82,11 +73,8 @@ function GeometryInstance(options) {
/**
* User-defined object returned when the instance is picked or used to get/set per-instance attributes.
- *
* @type {object}
- *
* @default undefined
- *
* @see Scene#pick
* @see Primitive#getGeometryInstanceAttributes
*/
@@ -94,7 +82,6 @@ function GeometryInstance(options) {
/**
* Used for picking primitives that wrap geometry instances.
- *
* @private
*/
this.pickPrimitive = options.pickPrimitive;
@@ -102,9 +89,7 @@ function GeometryInstance(options) {
/**
* Per-instance attributes like {@link ColorGeometryInstanceAttribute} or {@link ShowGeometryInstanceAttribute}.
* {@link Geometry} attributes varying per vertex; these attributes are constant for the entire instance.
- *
* @type {object}
- *
* @default undefined
*/
this.attributes = defaultValue(options.attributes, {});
diff --git a/packages/engine/Source/Core/GeometryInstanceAttribute.js b/packages/engine/Source/Core/GeometryInstanceAttribute.js
index f857326cf747..c08e40b96acc 100644
--- a/packages/engine/Source/Core/GeometryInstanceAttribute.js
+++ b/packages/engine/Source/Core/GeometryInstanceAttribute.js
@@ -4,19 +4,14 @@ import DeveloperError from "./DeveloperError.js";
/**
* Values and type information for per-instance geometry attributes.
- *
* @alias GeometryInstanceAttribute
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {ComponentDatatype} options.componentDatatype The datatype of each component in the attribute, e.g., individual elements in values.
* @param {number} options.componentsPerAttribute A number between 1 and 4 that defines the number of components in an attributes.
* @param {boolean} [options.normalize=false] When true and componentDatatype is an integer format, indicate that the components should be mapped to the range [0, 1] (unsigned) or [-1, 1] (signed) when they are accessed as floating-point for rendering.
* @param {number[]} options.value The value for the attribute.
- *
- * @exception {DeveloperError} options.componentsPerAttribute must be between 1 and 4.
- *
- *
+ * @throws {DeveloperError} options.componentsPerAttribute must be between 1 and 4.
* @example
* const instance = new Cesium.GeometryInstance({
* geometry : Cesium.BoxGeometry.fromDimensions({
@@ -34,7 +29,6 @@ import DeveloperError from "./DeveloperError.js";
* })
* }
* });
- *
* @see ColorGeometryInstanceAttribute
* @see ShowGeometryInstanceAttribute
* @see DistanceDisplayConditionGeometryInstanceAttribute
@@ -65,9 +59,7 @@ function GeometryInstanceAttribute(options) {
/**
* The datatype of each component in the attribute, e.g., individual elements in
* {@link GeometryInstanceAttribute#value}.
- *
* @type ComponentDatatype
- *
* @default undefined
*/
this.componentDatatype = options.componentDatatype;
@@ -76,11 +68,8 @@ function GeometryInstanceAttribute(options) {
* A number between 1 and 4 that defines the number of components in an attributes.
* For example, a position attribute with x, y, and z components would have 3 as
* shown in the code example.
- *
* @type {number}
- *
* @default undefined
- *
* @example
* show : new Cesium.GeometryInstanceAttribute({
* componentDatatype : Cesium.ComponentDatatype.UNSIGNED_BYTE,
@@ -98,11 +87,8 @@ function GeometryInstanceAttribute(options) {
*
* This is commonly used when storing colors using {@link ComponentDatatype.UNSIGNED_BYTE}.
*
- *
* @type {boolean}
- *
* @default false
- *
* @example
* attribute.componentDatatype = Cesium.ComponentDatatype.UNSIGNED_BYTE;
* attribute.componentsPerAttribute = 4;
@@ -120,11 +106,8 @@ function GeometryInstanceAttribute(options) {
* The values for the attributes stored in a typed array. In the code example,
* every three elements in values defines one attributes since
* componentsPerAttribute is 3.
- *
* @type {number[]}
- *
* @default undefined
- *
* @example
* show : new Cesium.GeometryInstanceAttribute({
* componentDatatype : Cesium.ComponentDatatype.UNSIGNED_BYTE,
diff --git a/packages/engine/Source/Core/GeometryPipeline.js b/packages/engine/Source/Core/GeometryPipeline.js
index 37e56ec2a16b..8e2428310a11 100644
--- a/packages/engine/Source/Core/GeometryPipeline.js
+++ b/packages/engine/Source/Core/GeometryPipeline.js
@@ -26,9 +26,7 @@ import Tipsify from "./Tipsify.js";
/**
* Content pipeline functions for geometries.
- *
* @namespace GeometryPipeline
- *
* @see Geometry
*/
const GeometryPipeline = {};
@@ -107,12 +105,9 @@ function triangleFanToLines(triangles) {
*
* This is commonly used to create a wireframe geometry for visual debugging.
*
- *
* @param {Geometry} geometry The geometry to modify.
* @returns {Geometry} The modified geometry argument, with its triangle indices converted to lines.
- *
- * @exception {DeveloperError} geometry.primitiveType must be TRIANGLES, TRIANGLE_STRIP, or TRIANGLE_FAN.
- *
+ * @throws {DeveloperError} geometry.primitiveType must be TRIANGLES, TRIANGLE_STRIP, or TRIANGLE_FAN.
* @example
* geometry = Cesium.GeometryPipeline.toWireframe(geometry);
*/
@@ -153,14 +148,11 @@ GeometryPipeline.toWireframe = function (geometry) {
* Creates a new {@link Geometry} with LINES representing the provided
* attribute (attributeName) for the provided geometry. This is used to
* visualize vector attributes like normals, tangents, and bitangents.
- *
* @param {Geometry} geometry The Geometry instance with the attribute.
* @param {string} [attributeName='normal'] The name of the attribute.
* @param {number} [length=10000.0] The length of each line segment in meters. This can be negative to point the vector in the opposite direction.
* @returns {Geometry} A new Geometry instance with line segments for the vector.
- *
- * @exception {DeveloperError} geometry.attributes must have an attribute with the same name as the attributeName parameter.
- *
+ * @throws {DeveloperError} geometry.attributes must have an attribute with the same name as the attributeName parameter.
* @example
* const geometry = Cesium.GeometryPipeline.createLineSegmentsForVectors(instance.geometry, 'bitangent', 100000.0);
*/
@@ -226,10 +218,8 @@ GeometryPipeline.createLineSegmentsForVectors = function (
/**
* Creates an object that maps attribute names to unique locations (indices)
* for matching vertex attributes and shader programs.
- *
* @param {Geometry} geometry The geometry, which is not modified, to create the object for.
* @returns {object} An object with attribute name / index pairs.
- *
* @example
* const attributeLocations = Cesium.GeometryPipeline.createAttributeLocations(geometry);
* // Example output
@@ -301,16 +291,11 @@ GeometryPipeline.createAttributeLocations = function (geometry) {
/**
* Reorders a geometry's attributes and indices to achieve better performance from the GPU's pre-vertex-shader cache.
- *
* @param {Geometry} geometry The geometry to modify.
* @returns {Geometry} The modified geometry argument, with its attributes and indices reordered for the GPU's pre-vertex-shader cache.
- *
- * @exception {DeveloperError} Each attribute array in geometry.attributes must have the same number of attributes.
- *
- *
+ * @throws {DeveloperError} Each attribute array in geometry.attributes must have the same number of attributes.
* @example
* geometry = Cesium.GeometryPipeline.reorderForPreVertexCache(geometry);
- *
* @see GeometryPipeline.reorderForPostVertexCache
*/
GeometryPipeline.reorderForPreVertexCache = function (geometry) {
@@ -392,17 +377,12 @@ GeometryPipeline.reorderForPreVertexCache = function (geometry) {
* Reorders a geometry's indices to achieve better performance from the GPU's
* post vertex-shader cache by using the Tipsify algorithm. If the geometry primitiveType
* is not TRIANGLES or the geometry does not have an indices, this function has no effect.
- *
* @param {Geometry} geometry The geometry to modify.
* @param {number} [cacheCapacity=24] The number of vertices that can be held in the GPU's vertex cache.
* @returns {Geometry} The modified geometry argument, with its indices reordered for the post-vertex-shader cache.
- *
- * @exception {DeveloperError} cacheCapacity must be greater than two.
- *
- *
+ * @throws {DeveloperError} cacheCapacity must be greater than two.
* @example
* geometry = Cesium.GeometryPipeline.reorderForPostVertexCache(geometry);
- *
* @see GeometryPipeline.reorderForPreVertexCache
* @see {@link http://gfx.cs.princ0eton.edu/pubs/Sander_2007_%3ETR/tipsy.pdf|Fast Triangle Reordering for Vertex Locality and Reduced Overdraw}
* by Sander, Nehab, and Barczak
@@ -483,13 +463,10 @@ function copyVertex(destinationAttributes, sourceAttributes, index) {
*
* If the geometry does not have any indices, this function has no effect.
*
- *
* @param {Geometry} geometry The geometry to be split into multiple geometries.
* @returns {Geometry[]} An array of geometries, each with indices that fit into unsigned shorts.
- *
- * @exception {DeveloperError} geometry.primitiveType must equal to PrimitiveType.TRIANGLES, PrimitiveType.LINES, or PrimitiveType.POINTS
- * @exception {DeveloperError} All geometry attribute lists must have the same number of attributes.
- *
+ * @throws {DeveloperError} geometry.primitiveType must equal to PrimitiveType.TRIANGLES, PrimitiveType.LINES, or PrimitiveType.POINTS
+ * @throws {DeveloperError} All geometry attribute lists must have the same number of attributes.
* @example
* const geometries = Cesium.GeometryPipeline.fitToUnsignedShortIndices(geometry);
*/
@@ -599,18 +576,15 @@ const scratchProjectTo2DCartographic = new Cartographic();
*
* If the geometry does not have a position, this function has no effect.
*
- *
* @param {Geometry} geometry The geometry to modify.
* @param {string} attributeName The name of the attribute.
* @param {string} attributeName3D The name of the attribute in 3D.
* @param {string} attributeName2D The name of the attribute in 2D.
* @param {object} [projection=new GeographicProjection()] The projection to use.
* @returns {Geometry} The modified geometry argument with position3D and position2D attributes.
- *
- * @exception {DeveloperError} geometry must have attribute matching the attributeName argument.
- * @exception {DeveloperError} The attribute componentDatatype must be ComponentDatatype.DOUBLE.
- * @exception {DeveloperError} Could not project a point to 2D.
- *
+ * @throws {DeveloperError} geometry must have attribute matching the attributeName argument.
+ * @throws {DeveloperError} The attribute componentDatatype must be ComponentDatatype.DOUBLE.
+ * @throws {DeveloperError} Could not project a point to 2D.
* @example
* geometry = Cesium.GeometryPipeline.projectTo2D(geometry, 'position', 'position3D', 'position2D');
*/
@@ -712,16 +686,13 @@ const encodedResult = {
*
* This is commonly used to create high-precision position vertex attributes.
*
- *
* @param {Geometry} geometry The geometry to modify.
* @param {string} attributeName The name of the attribute.
* @param {string} attributeHighName The name of the attribute for the encoded high bits.
* @param {string} attributeLowName The name of the attribute for the encoded low bits.
* @returns {Geometry} The modified geometry argument, with its encoded attribute.
- *
- * @exception {DeveloperError} geometry must have attribute matching the attributeName argument.
- * @exception {DeveloperError} The attribute componentDatatype must be ComponentDatatype.DOUBLE.
- *
+ * @throws {DeveloperError} geometry must have attribute matching the attributeName argument.
+ * @throws {DeveloperError} The attribute componentDatatype must be ComponentDatatype.DOUBLE.
* @example
* geometry = Cesium.GeometryPipeline.encodeAttribute(geometry, 'position3D', 'position3DHigh', 'position3DLow');
*/
@@ -826,10 +797,8 @@ const normalMatrix = new Matrix3();
* the instance's modelMatrix to {@link Matrix4.IDENTITY} and transforms the
* following attributes if they are present: position, normal,
* tangent, and bitangent.
- *
* @param {GeometryInstance} instance The geometry instance to modify.
* @returns {GeometryInstance} The modified instance argument, with its attributes transforms to world coordinates.
- *
* @example
* Cesium.GeometryPipeline.transformToWorldCoordinates(instance);
*/
@@ -1080,23 +1049,17 @@ function combineGeometries(instances, propertyName) {
*
* This is used by {@link Primitive} to efficiently render a large amount of static data.
*
- *
* @private
- *
* @param {GeometryInstance[]} [instances] The array of {@link GeometryInstance} objects whose geometry will be combined.
* @returns {Geometry} A single geometry created from the provided geometry instances.
- *
- * @exception {DeveloperError} All instances must have the same modelMatrix.
- * @exception {DeveloperError} All instance geometries must have an indices or not have one.
- * @exception {DeveloperError} All instance geometries must have the same primitiveType.
- *
- *
+ * @throws {DeveloperError} All instances must have the same modelMatrix.
+ * @throws {DeveloperError} All instance geometries must have an indices or not have one.
+ * @throws {DeveloperError} All instance geometries must have the same primitiveType.
* @example
* for (let i = 0; i < instances.length; ++i) {
* Cesium.GeometryPipeline.transformToWorldCoordinates(instances[i]);
* }
* const geometries = Cesium.GeometryPipeline.combineInstances(instances);
- *
* @see GeometryPipeline.transformToWorldCoordinates
*/
GeometryPipeline.combineInstances = function (instances) {
@@ -1150,13 +1113,10 @@ const v2 = new Cartesian3();
* Computes per-vertex normals for a geometry containing TRIANGLES by averaging the normals of
* all triangles incident to the vertex. The result is a new normal attribute added to the geometry.
* This assumes a counter-clockwise winding order.
- *
* @param {Geometry} geometry The geometry to modify.
* @returns {Geometry} The modified geometry argument with the computed normal attribute.
- *
- * @exception {DeveloperError} geometry.indices length must be greater than 0 and be a multiple of 3.
- * @exception {DeveloperError} geometry.primitiveType must be {@link PrimitiveType.TRIANGLES}.
- *
+ * @throws {DeveloperError} geometry.indices length must be greater than 0 and be a multiple of 3.
+ * @throws {DeveloperError} geometry.primitiveType must be {@link PrimitiveType.TRIANGLES}.
* @example
* Cesium.GeometryPipeline.computeNormal(geometry);
*/
@@ -1321,13 +1281,10 @@ const tScratch = new Cartesian3();
* Based on Computing Tangent Space Basis Vectors
* for an Arbitrary Mesh by Eric Lengyel.
*
- *
* @param {Geometry} geometry The geometry to modify.
* @returns {Geometry} The modified geometry argument with the computed tangent and bitangent attributes.
- *
- * @exception {DeveloperError} geometry.indices length must be greater than 0 and be a multiple of 3.
- * @exception {DeveloperError} geometry.primitiveType must be {@link PrimitiveType.TRIANGLES}.
- *
+ * @throws {DeveloperError} geometry.indices length must be greater than 0 and be a multiple of 3.
+ * @throws {DeveloperError} geometry.primitiveType must be {@link PrimitiveType.TRIANGLES}.
* @example
* Cesium.GeometryPipeline.computeTangentAndBiTangent(geometry);
*/
@@ -1471,10 +1428,8 @@ const toEncode3 = new Cartesian3();
let encodeResult2 = new Cartesian2();
/**
* Compresses and packs geometry normal attribute values to save memory.
- *
* @param {Geometry} geometry The geometry to modify.
* @returns {Geometry} The modified geometry argument, with its normals compressed and packed.
- *
* @example
* geometry = Cesium.GeometryPipeline.compressVertices(geometry);
*/
@@ -3241,12 +3196,9 @@ function splitLongitudePolyline(instance) {
* intersect the International Date Line and Prime Meridian so that no primitives cross longitude
* -180/180 degrees. This is not required for 3D drawing, but is required for
* correcting drawing in 2D and Columbus view.
- *
* @private
- *
* @param {GeometryInstance} instance The instance to modify.
* @returns {GeometryInstance} The modified instance argument, with it's geometry split at the International Date Line.
- *
* @example
* instance = Cesium.GeometryPipeline.splitLongitude(instance);
*/
diff --git a/packages/engine/Source/Core/GoogleEarthEnterpriseMetadata.js b/packages/engine/Source/Core/GoogleEarthEnterpriseMetadata.js
index 4cbb8c58a9fa..ca97f20e8bce 100644
--- a/packages/engine/Source/Core/GoogleEarthEnterpriseMetadata.js
+++ b/packages/engine/Source/Core/GoogleEarthEnterpriseMetadata.js
@@ -35,14 +35,12 @@ const defaultKey = stringToBuffer(
*
*
* Provides metadata using the Google Earth Enterprise REST API. This is used by the GoogleEarthEnterpriseImageryProvider
- * and GoogleEarthEnterpriseTerrainProvider to share metadata requests.
- *
+ * and GoogleEarthEnterpriseTerrainProvider to share metadata requests.
+ * @param resourceOrUrl
* @alias GoogleEarthEnterpriseMetadata
- * @constructor
- *
+ * @class
* @see GoogleEarthEnterpriseImageryProvider
* @see GoogleEarthEnterpriseTerrainProvider
- *
*/
function GoogleEarthEnterpriseMetadata(resourceOrUrl) {
/**
@@ -140,9 +138,7 @@ Object.defineProperties(GoogleEarthEnterpriseMetadata.prototype, {
/**
* Creates a metadata object using the Google Earth Enterprise REST API. This is used by the GoogleEarthEnterpriseImageryProvider
* and GoogleEarthEnterpriseTerrainProvider to share metadata requests.
- *
* @param {Resource|String} resourceOrUrl The url of the Google Earth Enterprise server hosting the imagery.
- *
* @returns {Promise} A promise which resolves to the created GoogleEarthEnterpriseMetadata instance/
*/
GoogleEarthEnterpriseMetadata.fromUrl = async function (resourceOrUrl) {
@@ -182,11 +178,9 @@ GoogleEarthEnterpriseMetadata.fromUrl = async function (resourceOrUrl) {
/**
* Converts a tiles (x, y, level) position into a quadkey used to request an image
* from a Google Earth Enterprise server.
- *
* @param {number} x The tile's x coordinate.
* @param {number} y The tile's y coordinate.
* @param {number} level The tile's zoom level.
- *
* @see GoogleEarthEnterpriseMetadata#quadKeyToTileXY
*/
GoogleEarthEnterpriseMetadata.tileXYToQuadKey = function (x, y, level) {
@@ -224,9 +218,7 @@ GoogleEarthEnterpriseMetadata.tileXYToQuadKey = function (x, y, level) {
/**
* Converts a tile's quadkey used to request an image from a Google Earth Enterprise server into the
* (x, y, level) position.
- *
* @param {string} quadkey The tile's quad key
- *
* @see GoogleEarthEnterpriseMetadata#tileXYToQuadKey
*/
GoogleEarthEnterpriseMetadata.quadKeyToTileXY = function (quadkey) {
@@ -292,11 +284,9 @@ const taskProcessor = new TaskProcessor("decodeGoogleEarthEnterprisePacket");
/**
* Retrieves a Google Earth Enterprise quadtree packet.
- *
* @param {string} [quadKey=''] The quadkey to retrieve the packet for.
* @param {number} [version=1] The cnode version to be used in the request.
* @param {Request} [request] The request object. Intended for internal use only.
- *
* @private
*/
GoogleEarthEnterpriseMetadata.prototype.getQuadTreePacket = function (
@@ -371,14 +361,11 @@ GoogleEarthEnterpriseMetadata.prototype.getQuadTreePacket = function (
/**
* Populates the metadata subtree down to the specified tile.
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level.
* @param {Request} [request] The request object. Intended for internal use only.
- *
* @returns {Promise} A promise that resolves to the tile info for the requested quad key
- *
* @private
*/
GoogleEarthEnterpriseMetadata.prototype.populateSubtree = function (
@@ -458,12 +445,10 @@ function populateSubtree(that, quadKey, request) {
/**
* Gets information about a tile
- *
* @param {number} x The tile X coordinate.
* @param {number} y The tile Y coordinate.
* @param {number} level The tile level.
* @returns {GoogleEarthEnterpriseTileInformation|undefined} Information about the tile or undefined if it isn't loaded.
- *
* @private
*/
GoogleEarthEnterpriseMetadata.prototype.getTileInformation = function (
@@ -477,10 +462,8 @@ GoogleEarthEnterpriseMetadata.prototype.getTileInformation = function (
/**
* Gets information about a tile from a quadKey
- *
* @param {string} quadkey The quadkey for the tile
* @returns {GoogleEarthEnterpriseTileInformation|undefined} Information about the tile or undefined if it isn't loaded.
- *
* @private
*/
GoogleEarthEnterpriseMetadata.prototype.getTileInformationFromQuadKey = function (
diff --git a/packages/engine/Source/Core/GoogleEarthEnterpriseTerrainData.js b/packages/engine/Source/Core/GoogleEarthEnterpriseTerrainData.js
index f343aff99575..99c08c795ad9 100644
--- a/packages/engine/Source/Core/GoogleEarthEnterpriseTerrainData.js
+++ b/packages/engine/Source/Core/GoogleEarthEnterpriseTerrainData.js
@@ -18,10 +18,8 @@ import TerrainMesh from "./TerrainMesh.js";
/**
* Terrain data for a single tile from a Google Earth Enterprise server.
- *
* @alias GoogleEarthEnterpriseTerrainData
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {ArrayBuffer} options.buffer The buffer containing terrain data.
* @param {number} options.negativeAltitudeExponentBias Multiplier for negative terrain heights that are encoded as very small positive values.
@@ -40,8 +38,6 @@ import TerrainMesh from "./TerrainMesh.js";
* @param {boolean} [options.createdByUpsampling=false] True if this instance was created by upsampling another instance;
* otherwise, false.
* @param {Credit[]} [options.credits] Array of credits for this tile.
- *
- *
* @example
* const buffer = ...
* const childTileMask = ...
@@ -49,7 +45,6 @@ import TerrainMesh from "./TerrainMesh.js";
* buffer : heightBuffer,
* childTileMask : childTileMask
* });
- *
* @see TerrainData
* @see HeightmapTerrainData
* @see QuantizedMeshTerrainData
@@ -129,9 +124,7 @@ const rectangleScratch = new Rectangle();
/**
* Creates a {@link TerrainMesh} from this terrain data.
- *
* @private
- *
* @param {object} options Object with the following properties:
* @param {TilingScheme} options.tilingScheme The tiling scheme to which this tile belongs.
* @param {number} options.x The X coordinate of the tile for which to create the terrain data.
@@ -235,7 +228,6 @@ GoogleEarthEnterpriseTerrainData.prototype.createMesh = function (options) {
/**
* Computes the terrain height at a specified longitude and latitude.
- *
* @param {Rectangle} rectangle The rectangle covered by this terrain data.
* @param {number} longitude The longitude in radians.
* @param {number} latitude The latitude in radians.
@@ -274,7 +266,6 @@ const upsampleTaskProcessor = new TaskProcessor(
/**
* Upsamples this terrain data for use by a descendant tile. The resulting instance will contain a subset of the
* height samples in this instance, interpolated if necessary.
- *
* @param {TilingScheme} tilingScheme The tiling scheme of this terrain data.
* @param {number} thisX The X coordinate of this tile in the tiling scheme.
* @param {number} thisY The Y coordinate of this tile in the tiling scheme.
@@ -386,7 +377,6 @@ GoogleEarthEnterpriseTerrainData.prototype.upsample = function (
* {@link HeightmapTerrainData.childTileMask}. The given child tile coordinates are assumed
* to be one of the four children of this tile. If non-child tile coordinates are
* given, the availability of the southeast child tile is returned.
- *
* @param {number} thisX The tile X coordinate of this (the parent) tile.
* @param {number} thisY The tile Y coordinate of this (the parent) tile.
* @param {number} childX The tile X coordinate of the child tile to check for availability.
@@ -422,7 +412,6 @@ GoogleEarthEnterpriseTerrainData.prototype.isChildAvailable = function (
* terrain data. If this value is false, the data was obtained from some other source, such
* as by downloading it from a remote server. This method should return true for instances
* returned from a call to {@link HeightmapTerrainData#upsample}.
- *
* @returns {boolean} True if this instance was created by upsampling; otherwise, false.
*/
GoogleEarthEnterpriseTerrainData.prototype.wasCreatedByUpsampling = function () {
diff --git a/packages/engine/Source/Core/GoogleEarthEnterpriseTerrainProvider.js b/packages/engine/Source/Core/GoogleEarthEnterpriseTerrainProvider.js
index acfb9349ad40..458b489e10b3 100644
--- a/packages/engine/Source/Core/GoogleEarthEnterpriseTerrainProvider.js
+++ b/packages/engine/Source/Core/GoogleEarthEnterpriseTerrainProvider.js
@@ -68,7 +68,6 @@ TerrainCache.prototype.tidy = function () {
* @typedef {Object} GoogleEarthEnterpriseTerrainProvider.ConstructorOptions
*
* Initialization options for GoogleEarthEnterpriseTerrainProvider constructor
- *
* @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.
*/
@@ -79,21 +78,16 @@ TerrainCache.prototype.tidy = function () {
*
*
* Provides tiled terrain using the Google Earth Enterprise REST API.
- *
* @alias GoogleEarthEnterpriseTerrainProvider
- * @constructor
- *
+ * @class
* @param {GoogleEarthEnterpriseTerrainProvider.ConstructorOptions} [options] An object describing initialization options
- *
* @see GoogleEarthEnterpriseTerrainProvider.fromMetadata
* @see GoogleEarthEnterpriseMetadata.fromUrl
* @see GoogleEarthEnterpriseImageryProvider
* @see CesiumTerrainProvider
- *
* @example
* const geeMetadata = await GoogleEarthEnterpriseMetadata.fromUrl("http://www.example.com");
* const gee = Cesium.GoogleEarthEnterpriseTerrainProvider.fromMetadata(geeMetadata);
- *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
*/
function GoogleEarthEnterpriseTerrainProvider(options) {
@@ -234,15 +228,11 @@ Object.defineProperties(GoogleEarthEnterpriseTerrainProvider.prototype, {
/**
* Creates a GoogleEarthTerrainProvider from GoogleEarthEnterpriseMetadata
- *
* @param {GoogleEarthEnterpriseMetadata} metadata A metadata object that can be used to share metadata requests with a GoogleEarthEnterpriseImageryProvider.
* @param {GoogleEarthEnterpriseTerrainProvider.ConstructorOptions} options An object describing initialization options
* @returns {GoogleEarthEnterpriseTerrainProvider}
- *
* @see GoogleEarthEnterpriseMetadata.fromUrl
- *
- * @exception {RuntimeError} metadata does not specify terrain
- *
+ * @throws {RuntimeError} metadata does not specify terrain
* @example
* const geeMetadata = await GoogleEarthEnterpriseMetadata.fromUrl("http://www.example.com");
* const gee = Cesium.GoogleEarthEnterpriseTerrainProvider.fromMetadata(geeMetadata);
@@ -289,7 +279,6 @@ function computeChildMask(quadKey, info, metadata) {
/**
* Requests the geometry for a given tile. The result must include terrain data and
* may optionally include a water mask and an indication of which child tiles are available.
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
@@ -482,7 +471,6 @@ GoogleEarthEnterpriseTerrainProvider.prototype.requestTileGeometry = function (
/**
* Gets the maximum geometric error allowed in a tile at a given level.
- *
* @param {number} level The tile level for which to get the maximum geometric error.
* @returns {number} The maximum geometric error.
*/
@@ -494,7 +482,6 @@ GoogleEarthEnterpriseTerrainProvider.prototype.getLevelMaximumGeometricError = f
/**
* Determines whether data for a tile is available to be loaded.
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
@@ -551,7 +538,6 @@ GoogleEarthEnterpriseTerrainProvider.prototype.getTileDataAvailable = function (
/**
* Makes sure we load availability data for a tile
- *
* @param {number} x The X coordinate of the tile for which to request geometry.
* @param {number} y The Y coordinate of the tile for which to request geometry.
* @param {number} level The level of the tile for which to request geometry.
diff --git a/packages/engine/Source/Core/GoogleEarthEnterpriseTileInformation.js b/packages/engine/Source/Core/GoogleEarthEnterpriseTileInformation.js
index e1caecb56ae5..8172c7462a08 100644
--- a/packages/engine/Source/Core/GoogleEarthEnterpriseTileInformation.js
+++ b/packages/engine/Source/Core/GoogleEarthEnterpriseTileInformation.js
@@ -10,14 +10,12 @@ const terrainBitmask = 0x80;
/**
* Contains information about each tile from a Google Earth Enterprise server
- *
* @param {number} bits Bitmask that contains the type of data and available children for each tile.
* @param {number} cnodeVersion Version of the request for subtree metadata.
* @param {number} imageryVersion Version of the request for imagery tile.
* @param {number} terrainVersion Version of the request for terrain tile.
* @param {number} imageryProvider Id of imagery provider.
* @param {number} terrainProvider Id of terrain provider.
- *
* @private
*/
function GoogleEarthEnterpriseTileInformation(
@@ -40,7 +38,6 @@ function GoogleEarthEnterpriseTileInformation(
/**
* Creates GoogleEarthEnterpriseTileInformation from an object
- *
* @param {object} info Object to be cloned
* @param {GoogleEarthEnterpriseTileInformation} [result] The object onto which to store the result.
* @returns {GoogleEarthEnterpriseTileInformation} The modified result parameter or a new GoogleEarthEnterpriseTileInformation instance if none was provided.
@@ -71,7 +68,6 @@ GoogleEarthEnterpriseTileInformation.clone = function (info, result) {
/**
* Sets the parent for the tile
- *
* @param {GoogleEarthEnterpriseTileInformation} parent Parent tile
*/
GoogleEarthEnterpriseTileInformation.prototype.setParent = function (parent) {
@@ -80,7 +76,6 @@ GoogleEarthEnterpriseTileInformation.prototype.setParent = function (parent) {
/**
* Gets whether a subtree is available
- *
* @returns {boolean} true if subtree is available, false otherwise.
*/
GoogleEarthEnterpriseTileInformation.prototype.hasSubtree = function () {
@@ -89,7 +84,6 @@ GoogleEarthEnterpriseTileInformation.prototype.hasSubtree = function () {
/**
* Gets whether imagery is available
- *
* @returns {boolean} true if imagery is available, false otherwise.
*/
GoogleEarthEnterpriseTileInformation.prototype.hasImagery = function () {
@@ -98,7 +92,6 @@ GoogleEarthEnterpriseTileInformation.prototype.hasImagery = function () {
/**
* Gets whether terrain is available
- *
* @returns {boolean} true if terrain is available, false otherwise.
*/
GoogleEarthEnterpriseTileInformation.prototype.hasTerrain = function () {
@@ -107,7 +100,6 @@ GoogleEarthEnterpriseTileInformation.prototype.hasTerrain = function () {
/**
* Gets whether any children are present
- *
* @returns {boolean} true if any children are available, false otherwise.
*/
GoogleEarthEnterpriseTileInformation.prototype.hasChildren = function () {
@@ -116,9 +108,7 @@ GoogleEarthEnterpriseTileInformation.prototype.hasChildren = function () {
/**
* Gets whether a specified child is available
- *
* @param {number} index Index of child tile
- *
* @returns {boolean} true if child is available, false otherwise
*/
GoogleEarthEnterpriseTileInformation.prototype.hasChild = function (index) {
@@ -127,7 +117,6 @@ GoogleEarthEnterpriseTileInformation.prototype.hasChild = function (index) {
/**
* Gets bitmask containing children
- *
* @returns {number} Children bitmask
*/
GoogleEarthEnterpriseTileInformation.prototype.getChildBitmask = function () {
diff --git a/packages/engine/Source/Core/GoogleMaps.js b/packages/engine/Source/Core/GoogleMaps.js
index 6a15e5d0d509..0bce7a3c79d9 100644
--- a/packages/engine/Source/Core/GoogleMaps.js
+++ b/packages/engine/Source/Core/GoogleMaps.js
@@ -6,24 +6,20 @@ import Resource from "./Resource.js";
*
* An API key is only required if you are directly using any Google Maps APIs, such as through {@link createGooglePhotorealistic3DTileset}.
* Follow instructions for managing API keys for the Google Maps Platform at {@link https://developers.google.com/maps/documentation/embed/get-api-key}
- *
* @see createGooglePhotorealistic3DTileset
* @see https://developers.google.com/maps/documentation/embed/get-api-key
- *
* @namespace GoogleMaps
*/
const GoogleMaps = {};
/**
* Gets or sets the default Google Maps API key.
- *
* @type {undefined|string}
*/
GoogleMaps.defaultApiKey = undefined;
/**
* Gets or sets the default Google Map Tiles API endpoint.
- *
* @type {string|Resource}
* @default https://tile.googleapis.com/v1/
*/
diff --git a/packages/engine/Source/Core/GregorianDate.js b/packages/engine/Source/Core/GregorianDate.js
index 4fb7446d61db..d49132df5e3c 100644
--- a/packages/engine/Source/Core/GregorianDate.js
+++ b/packages/engine/Source/Core/GregorianDate.js
@@ -9,8 +9,7 @@ const daysInYear = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
* Represents a Gregorian date in a more precise format than the JavaScript Date object.
* In addition to submillisecond precision, this object can also represent leap seconds.
* @alias GregorianDate
- * @constructor
- *
+ * @class
* @param {number} [year] The year as a whole number.
* @param {number} [month] The month as a whole number with range [1, 12].
* @param {number} [day] The day of the month as a whole number starting at 1.
@@ -19,7 +18,6 @@ const daysInYear = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
* @param {number} [second] The second of the minute as a whole number with range [0, 60], with 60 representing a leap second.
* @param {number} [millisecond] The millisecond of the second as a floating point number with range [0.0, 1000.0).
* @param {boolean} [isLeapSecond] Whether this time is during a leap second.
- *
* @see JulianDate#toGregorianDate
*/
function GregorianDate(
diff --git a/packages/engine/Source/Core/GroundPolylineGeometry.js b/packages/engine/Source/Core/GroundPolylineGeometry.js
index 6e05f930f4bb..99f2cc5ef991 100644
--- a/packages/engine/Source/Core/GroundPolylineGeometry.js
+++ b/packages/engine/Source/Core/GroundPolylineGeometry.js
@@ -45,21 +45,16 @@ const WALL_INITIAL_MAX_HEIGHT = 1000.0;
/**
* A description of a polyline on terrain or 3D Tiles. Only to be used with {@link GroundPolylinePrimitive}.
- *
* @alias GroundPolylineGeometry
- * @constructor
- *
+ * @class
* @param {object} options Options with the following properties:
* @param {Cartesian3[]} options.positions An array of {@link Cartesian3} defining the polyline's points. Heights above the ellipsoid will be ignored.
* @param {number} [options.width=1.0] The screen space width in pixels.
* @param {number} [options.granularity=9999.0] The distance interval in meters used for interpolating options.points. Defaults to 9999.0 meters. Zero indicates no interpolation.
* @param {boolean} [options.loop=false] Whether during geometry creation a line segment will be added between the last and first line positions to make this Polyline a loop.
* @param {ArcType} [options.arcType=ArcType.GEODESIC] The type of line the polyline segments must follow. Valid options are {@link ArcType.GEODESIC} and {@link ArcType.RHUMB}.
- *
- * @exception {DeveloperError} At least two positions are required.
- *
+ * @throws {DeveloperError} At least two positions are required.
* @see GroundPolylinePrimitive
- *
* @example
* const positions = Cesium.Cartesian3.fromDegreesArray([
* -112.1340164450331, 36.05494287836128,
@@ -158,7 +153,6 @@ Object.defineProperties(GroundPolylineGeometry.prototype, {
/**
* Set the GroundPolylineGeometry's projection and ellipsoid.
* Used by GroundPolylinePrimitive to signal scene information to the geometry for generating 2D attributes.
- *
* @param {GroundPolylineGeometry} groundPolylineGeometry GroundPolylinGeometry describing a polyline on terrain or 3D Tiles.
* @param {Projection} mapProjection A MapProjection used for projecting cartographic coordinates to 2D.
* @private
@@ -283,11 +277,9 @@ function getPosition(ellipsoid, cartographic, height, result) {
/**
* Stores the provided instance into the provided array.
- *
* @param {PolygonGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
GroundPolylineGeometry.pack = function (value, array, startingIndex) {
@@ -324,7 +316,6 @@ GroundPolylineGeometry.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {PolygonGeometry} [result] The object into which to store the result.
@@ -451,7 +442,6 @@ const cartographicIntersectionScratch = new Cartographic();
* Computes shadow volumes for the ground polyline, consisting of its vertices, indices, and a bounding sphere.
* Vertices are "fat," packing all the data needed in each volume to describe a line on terrain or 3D Tiles.
* Should not be called independent of {@link GroundPolylinePrimitive}.
- *
* @param {GroundPolylineGeometry} groundPolylineGeometry
* @private
*/
@@ -1384,7 +1374,7 @@ function generateGeometryAttributes(
texcoordNormalization2DX = segmentLength2D / length2D;
texcoordNormalization2DY = lengthSoFar2D / length2D;
}
- /** Pack **/
+ /** Pack */
for (j = 0; j < 8; j++) {
const vec4Index = vec4sWriteIndex + j * 4;
const vec2Index = vec2sWriteIndex + j * 2;
@@ -1646,7 +1636,6 @@ function getVec4GeometryAttribute(typedArray) {
/**
* Approximates an ellipsoid-tangent vector in 2D by projecting the end point into 2D.
* Exposed for testing.
- *
* @param {MapProjection} projection Map Projection for projecting coordinates to 2D.
* @param {Cartographic} cartographic The cartographic origin point of the normal.
* Used to check if the normal crosses the IDL during projection.
diff --git a/packages/engine/Source/Core/HeadingPitchRange.js b/packages/engine/Source/Core/HeadingPitchRange.js
index 6d9ae0e71ee7..fe50bc278a87 100644
--- a/packages/engine/Source/Core/HeadingPitchRange.js
+++ b/packages/engine/Source/Core/HeadingPitchRange.js
@@ -7,8 +7,7 @@ import defined from "./defined.js";
* Pitch is the rotation from the local xy-plane. Positive pitch angles are above the plane. Negative pitch
* angles are below the plane. Range is the distance from the center of the frame.
* @alias HeadingPitchRange
- * @constructor
- *
+ * @class
* @param {number} [heading=0.0] The heading angle in radians.
* @param {number} [pitch=0.0] The pitch angle in radians.
* @param {number} [range=0.0] The distance from the center in meters.
@@ -39,7 +38,6 @@ function HeadingPitchRange(heading, pitch, range) {
/**
* Duplicates a HeadingPitchRange instance.
- *
* @param {HeadingPitchRange} hpr The HeadingPitchRange to duplicate.
* @param {HeadingPitchRange} [result] The object onto which to store the result.
* @returns {HeadingPitchRange} The modified result parameter or a new HeadingPitchRange instance if one was not provided. (Returns undefined if hpr is undefined)
diff --git a/packages/engine/Source/Core/HeadingPitchRoll.js b/packages/engine/Source/Core/HeadingPitchRoll.js
index 92a3dadfefc2..ce256ac505d9 100644
--- a/packages/engine/Source/Core/HeadingPitchRoll.js
+++ b/packages/engine/Source/Core/HeadingPitchRoll.js
@@ -8,8 +8,7 @@ import CesiumMath from "./Math.js";
* negative z axis. Pitch is the rotation about the negative y axis. Roll is the rotation about
* the positive x axis.
* @alias HeadingPitchRoll
- * @constructor
- *
+ * @class
* @param {number} [heading=0.0] The heading component in radians.
* @param {number} [pitch=0.0] The pitch component in radians.
* @param {number} [roll=0.0] The roll component in radians.
@@ -37,7 +36,6 @@ function HeadingPitchRoll(heading, pitch, roll) {
/**
* Computes the heading, pitch and roll from a quaternion (see http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles )
- *
* @param {Quaternion} quaternion The quaternion from which to retrieve heading, pitch, and roll, all expressed in radians.
* @param {HeadingPitchRoll} [result] The object in which to store the result. If not provided, a new instance is created and returned.
* @returns {HeadingPitchRoll} The modified result parameter or a new HeadingPitchRoll instance if one was not provided.
@@ -68,7 +66,6 @@ HeadingPitchRoll.fromQuaternion = function (quaternion, result) {
/**
* Returns a new HeadingPitchRoll instance from angles given in degrees.
- *
* @param {number} heading the heading in degrees
* @param {number} pitch the pitch in degrees
* @param {number} roll the heading in degrees
@@ -98,7 +95,6 @@ HeadingPitchRoll.fromDegrees = function (heading, pitch, roll, result) {
/**
* Duplicates a HeadingPitchRoll instance.
- *
* @param {HeadingPitchRoll} headingPitchRoll The HeadingPitchRoll to duplicate.
* @param {HeadingPitchRoll} [result] The object onto which to store the result.
* @returns {HeadingPitchRoll} The modified result parameter or a new HeadingPitchRoll instance if one was not provided. (Returns undefined if headingPitchRoll is undefined)
@@ -123,7 +119,6 @@ HeadingPitchRoll.clone = function (headingPitchRoll, result) {
/**
* Compares the provided HeadingPitchRolls componentwise and returns
* true if they are equal, false otherwise.
- *
* @param {HeadingPitchRoll} [left] The first HeadingPitchRoll.
* @param {HeadingPitchRoll} [right] The second HeadingPitchRoll.
* @returns {boolean} true if left and right are equal, false otherwise.
@@ -143,7 +138,6 @@ HeadingPitchRoll.equals = function (left, right) {
* Compares the provided HeadingPitchRolls componentwise and returns
* true if they pass an absolute or relative tolerance test,
* false otherwise.
- *
* @param {HeadingPitchRoll} [left] The first HeadingPitchRoll.
* @param {HeadingPitchRoll} [right] The second HeadingPitchRoll.
* @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.
@@ -183,7 +177,6 @@ HeadingPitchRoll.equalsEpsilon = function (
/**
* Duplicates this HeadingPitchRoll instance.
- *
* @param {HeadingPitchRoll} [result] The object onto which to store the result.
* @returns {HeadingPitchRoll} The modified result parameter or a new HeadingPitchRoll instance if one was not provided.
*/
@@ -194,7 +187,6 @@ HeadingPitchRoll.prototype.clone = function (result) {
/**
* Compares this HeadingPitchRoll against the provided HeadingPitchRoll componentwise and returns
* true if they are equal, false otherwise.
- *
* @param {HeadingPitchRoll} [right] The right hand side HeadingPitchRoll.
* @returns {boolean} true if they are equal, false otherwise.
*/
@@ -206,7 +198,6 @@ HeadingPitchRoll.prototype.equals = function (right) {
* Compares this HeadingPitchRoll against the provided HeadingPitchRoll componentwise and returns
* true if they pass an absolute or relative tolerance test,
* false otherwise.
- *
* @param {HeadingPitchRoll} [right] The right hand side HeadingPitchRoll.
* @param {number} [relativeEpsilon=0] The relative epsilon tolerance to use for equality testing.
* @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
@@ -227,7 +218,6 @@ HeadingPitchRoll.prototype.equalsEpsilon = function (
/**
* Creates a string representing this HeadingPitchRoll in the format '(heading, pitch, roll)' in radians.
- *
* @returns {string} A string representing the provided HeadingPitchRoll in the format '(heading, pitch, roll)'.
*/
HeadingPitchRoll.prototype.toString = function () {
diff --git a/packages/engine/Source/Core/Heap.js b/packages/engine/Source/Core/Heap.js
index 700475cedc55..95e913d0e97c 100644
--- a/packages/engine/Source/Core/Heap.js
+++ b/packages/engine/Source/Core/Heap.js
@@ -4,11 +4,9 @@ import defined from "./defined.js";
/**
* Array implementation of a heap.
- *
* @alias Heap
- * @constructor
+ * @class
* @private
- *
* @param {object} options Object with the following properties:
* @param {Heap.ComparatorCallback} options.comparator The comparator to use for the heap. If comparator(a, b) is less than 0, sort a to a lower index than b, otherwise sort to a higher index.
*/
@@ -27,9 +25,7 @@ function Heap(options) {
Object.defineProperties(Heap.prototype, {
/**
* Gets the length of the heap.
- *
* @memberof Heap.prototype
- *
* @type {number}
* @readonly
*/
@@ -41,9 +37,7 @@ Object.defineProperties(Heap.prototype, {
/**
* Gets the internal array.
- *
* @memberof Heap.prototype
- *
* @type {Array}
* @readonly
*/
@@ -55,9 +49,7 @@ Object.defineProperties(Heap.prototype, {
/**
* Gets and sets the maximum length of the heap.
- *
* @memberof Heap.prototype
- *
* @type {number}
*/
maximumLength: {
@@ -84,9 +76,7 @@ Object.defineProperties(Heap.prototype, {
/**
* The comparator to use for the heap. If comparator(a, b) is less than 0, sort a to a lower index than b, otherwise sort to a higher index.
- *
* @memberof Heap.prototype
- *
* @type {Heap.ComparatorCallback}
*/
comparator: {
@@ -104,7 +94,6 @@ function swap(array, a, b) {
/**
* Resizes the internal array of the heap.
- *
* @param {number} [length] The length to resize internal array to. Defaults to the current length of the heap.
*/
Heap.prototype.reserve = function (length) {
@@ -114,7 +103,6 @@ Heap.prototype.reserve = function (length) {
/**
* Update the heap so that index and all descendants satisfy the heap property.
- *
* @param {number} [index=0] The starting index to heapify from.
*/
Heap.prototype.heapify = function (index) {
@@ -160,10 +148,8 @@ Heap.prototype.resort = function () {
/**
* Insert an element into the heap. If the length would grow greater than maximumLength
* of the heap, extra elements are removed.
- *
* @param {*} element The element to insert
- *
- * @return {*} The element that was removed from the heap if the heap is at full capacity.
+ * @returns {*} The element that was removed from the heap if the heap is at full capacity.
*/
Heap.prototype.insert = function (element) {
//>>includeStart('debug', pragmas.debug);
@@ -203,7 +189,6 @@ Heap.prototype.insert = function (element) {
/**
* Remove the element specified by index from the heap and return it.
- *
* @param {number} [index=0] The index to remove.
* @returns {*} The specified element of the heap.
*/
diff --git a/packages/engine/Source/Core/HeightmapEncoding.js b/packages/engine/Source/Core/HeightmapEncoding.js
index ba66c785b839..433f6251da22 100644
--- a/packages/engine/Source/Core/HeightmapEncoding.js
+++ b/packages/engine/Source/Core/HeightmapEncoding.js
@@ -1,12 +1,10 @@
/**
* The encoding that is used for a heightmap
- *
* @enum {number}
*/
const HeightmapEncoding = {
/**
* No encoding
- *
* @type {number}
* @constant
*/
@@ -14,10 +12,8 @@ const HeightmapEncoding = {
/**
* LERC encoding
- *
* @type {number}
* @constant
- *
* @see {@link https://github.com/Esri/lerc|The LERC specification}
*/
LERC: 1,
diff --git a/packages/engine/Source/Core/HeightmapTerrainData.js b/packages/engine/Source/Core/HeightmapTerrainData.js
index fab32e682b89..72154556c981 100644
--- a/packages/engine/Source/Core/HeightmapTerrainData.js
+++ b/packages/engine/Source/Core/HeightmapTerrainData.js
@@ -19,10 +19,8 @@ import TerrainProvider from "./TerrainProvider.js";
/**
* Terrain data for a single tile where the terrain data is represented as a heightmap. A heightmap
* is a rectangular array of heights in row-major order from north to south and west to east.
- *
* @alias HeightmapTerrainData
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Int8Array|Uint8Array|Int16Array|Uint16Array|Int32Array|Uint32Array|Float32Array|Float64Array} options.buffer The buffer containing height data.
* @param {number} options.width The width (longitude direction) of the heightmap, in samples.
@@ -74,8 +72,6 @@ import TerrainProvider from "./TerrainProvider.js";
* @param {HeightmapEncoding} [options.encoding=HeightmapEncoding.NONE] The encoding that is used on the buffer.
* @param {boolean} [options.createdByUpsampling=false] True if this instance was created by upsampling another instance;
* otherwise, false.
- *
- *
* @example
* const buffer = ...
* const heightBuffer = new Uint16Array(buffer, 0, that._heightmapWidth * that._heightmapWidth);
@@ -88,7 +84,6 @@ import TerrainProvider from "./TerrainProvider.js";
* childTileMask : childTileMask,
* waterMask : waterMask
* });
- *
* @see TerrainData
* @see QuantizedMeshTerrainData
* @see GoogleEarthEnterpriseTerrainData
@@ -192,9 +187,7 @@ const createMeshTaskProcessorThrottle = new TaskProcessor(
/**
* Creates a {@link TerrainMesh} from this terrain data.
- *
* @private
- *
* @param {object} options Object with the following properties:
* @param {TilingScheme} options.tilingScheme The tiling scheme to which this tile belongs.
* @param {number} options.x The X coordinate of the tile for which to create the terrain data.
@@ -323,7 +316,6 @@ HeightmapTerrainData.prototype.createMesh = function (options) {
* @param {number} options.level The level of the tile for which to create the terrain data.
* @param {number} [options.exaggeration=1.0] The scale used to exaggerate the terrain.
* @param {number} [options.exaggerationRelativeHeight=0.0] The height relative to which terrain is exaggerated.
- *
* @private
*/
HeightmapTerrainData.prototype._createMeshSync = function (options) {
@@ -421,7 +413,6 @@ HeightmapTerrainData.prototype._createMeshSync = function (options) {
/**
* Computes the terrain height at a specified longitude and latitude.
- *
* @param {Rectangle} rectangle The rectangle covered by this terrain data.
* @param {number} longitude The longitude in radians.
* @param {number} latitude The latitude in radians.
@@ -492,7 +483,6 @@ HeightmapTerrainData.prototype.interpolateHeight = function (
/**
* Upsamples this terrain data for use by a descendant tile. The resulting instance will contain a subset of the
* height samples in this instance, interpolated if necessary.
- *
* @param {TilingScheme} tilingScheme The tiling scheme of this terrain data.
* @param {number} thisX The X coordinate of this tile in the tiling scheme.
* @param {number} thisY The Y coordinate of this tile in the tiling scheme.
@@ -643,7 +633,6 @@ HeightmapTerrainData.prototype.upsample = function (
* {@link HeightmapTerrainData.childTileMask}. The given child tile coordinates are assumed
* to be one of the four children of this tile. If non-child tile coordinates are
* given, the availability of the southeast child tile is returned.
- *
* @param {number} thisX The tile X coordinate of this (the parent) tile.
* @param {number} thisY The tile Y coordinate of this (the parent) tile.
* @param {number} childX The tile X coordinate of the child tile to check for availability.
@@ -687,7 +676,6 @@ HeightmapTerrainData.prototype.isChildAvailable = function (
* terrain data. If this value is false, the data was obtained from some other source, such
* as by downloading it from a remote server. This method should return true for instances
* returned from a call to {@link HeightmapTerrainData#upsample}.
- *
* @returns {boolean} True if this instance was created by upsampling; otherwise, false.
*/
HeightmapTerrainData.prototype.wasCreatedByUpsampling = function () {
diff --git a/packages/engine/Source/Core/HeightmapTessellator.js b/packages/engine/Source/Core/HeightmapTessellator.js
index be566f845e34..a0e8316661f4 100644
--- a/packages/engine/Source/Core/HeightmapTessellator.js
+++ b/packages/engine/Source/Core/HeightmapTessellator.js
@@ -17,16 +17,13 @@ import WebMercatorProjection from "./WebMercatorProjection.js";
/**
* Contains functions to create a mesh from a heightmap image.
- *
* @namespace HeightmapTessellator
- *
* @private
*/
const HeightmapTessellator = {};
/**
* The default structure of a heightmap, as given to {@link HeightmapTessellator.computeVertices}.
- *
* @constant
*/
HeightmapTessellator.DEFAULT_STRUCTURE = Object.freeze({
@@ -45,7 +42,6 @@ const maximumScratch = new Cartesian3();
/**
* Fills an array of vertices from a heightmap image.
- *
* @param {object} options Object with the following properties:
* @param {Int8Array|Uint8Array|Int16Array|Uint16Array|Int32Array|Uint32Array|Float32Array|Float64Array} options.heightmap The heightmap to tessellate.
* @param {number} options.width The width of the heightmap, in height samples.
@@ -93,7 +89,6 @@ const maximumScratch = new Cartesian3();
* @param {boolean} [options.structure.isBigEndian=false] Indicates endianness of the elements in the buffer when the
* stride property is greater than 1. If this property is false, the first element is the
* low-order element. If it is true, the first element is the high-order element.
- *
* @example
* const width = 5;
* const height = 5;
diff --git a/packages/engine/Source/Core/HermitePolynomialApproximation.js b/packages/engine/Source/Core/HermitePolynomialApproximation.js
index c2737cd26d28..fdae30af52a8 100644
--- a/packages/engine/Source/Core/HermitePolynomialApproximation.js
+++ b/packages/engine/Source/Core/HermitePolynomialApproximation.js
@@ -63,7 +63,6 @@ function calculateCoefficientTerm(
/**
* An {@link InterpolationAlgorithm} for performing Hermite interpolation.
- *
* @namespace HermitePolynomialApproximation
*/
const HermitePolynomialApproximation = {
@@ -72,12 +71,11 @@ const HermitePolynomialApproximation = {
/**
* Given the desired degree, returns the number of data points required for interpolation.
- *
* @param {number} degree The desired degree of interpolation.
* @param {number} [inputOrder=0] The order of the inputs (0 means just the data, 1 means the data and its derivative, etc).
* @returns {number} The number of required data points needed for the desired degree of interpolation.
- * @exception {DeveloperError} degree must be 0 or greater.
- * @exception {DeveloperError} inputOrder must be 0 or greater.
+ * @throws {DeveloperError} degree must be 0 or greater.
+ * @throws {DeveloperError} inputOrder must be 0 or greater.
*/
HermitePolynomialApproximation.getRequiredDataPoints = function (
degree,
@@ -102,7 +100,6 @@ HermitePolynomialApproximation.getRequiredDataPoints = function (
/**
* Interpolates values using Hermite Polynomial Approximation.
- *
* @param {number} x The independent variable for which the dependent variables will be interpolated.
* @param {number[]} xTable The array of independent variables to use to interpolate. The values
* in this array must be in increasing order and the same value must not occur twice in the array.
@@ -198,7 +195,6 @@ const arrayScratch = [];
/**
* Interpolates values using Hermite Polynomial Approximation.
- *
* @param {number} x The independent variable for which the dependent variables will be interpolated.
* @param {number[]} xTable The array of independent variables to use to interpolate. The values
* in this array must be in increasing order and the same value must not occur twice in the array.
@@ -209,7 +205,6 @@ const arrayScratch = [];
* @param {number} inputOrder The number of derivatives supplied for input.
* @param {number} outputOrder The number of derivatives desired for output.
* @param {number[]} [result] An existing array into which to store the result.
- *
* @returns {number[]} The array of interpolated values, or the result parameter if one was provided.
*/
HermitePolynomialApproximation.interpolate = function (
diff --git a/packages/engine/Source/Core/HermiteSpline.js b/packages/engine/Source/Core/HermiteSpline.js
index 629e81e7687a..6c01aad24e96 100644
--- a/packages/engine/Source/Core/HermiteSpline.js
+++ b/packages/engine/Source/Core/HermiteSpline.js
@@ -115,22 +115,18 @@ function generateNatural(points) {
* tangents are defined for points [1, n - 1]. For example, when interpolating a segment of the curve between points[i] and
* points[i + 1], the tangents at the points will be outTangents[i] and inTangents[i],
* respectively.
- *
* @alias HermiteSpline
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {number[]} options.times An array of strictly increasing, unit-less, floating-point times at each point.
* The values are in no way connected to the clock time. They are the parameterization for the curve.
* @param {Cartesian3[]} options.points The array of control points.
* @param {Cartesian3[]} options.inTangents The array of incoming tangents at each control point.
* @param {Cartesian3[]} options.outTangents The array of outgoing tangents at each control point.
- *
- * @exception {DeveloperError} points.length must be greater than or equal to 2.
- * @exception {DeveloperError} times.length must be equal to points.length.
- * @exception {DeveloperError} inTangents and outTangents must have a length equal to points.length - 1.
- * @exception {DeveloperError} inTangents and outTangents must be of the same type as points.
- *
+ * @throws {DeveloperError} points.length must be greater than or equal to 2.
+ * @throws {DeveloperError} times.length must be equal to points.length.
+ * @throws {DeveloperError} inTangents and outTangents must have a length equal to points.length - 1.
+ * @throws {DeveloperError} inTangents and outTangents must be of the same type as points.
* @example
* // Create a G1 continuous Hermite spline
* const times = [ 0.0, 1.5, 3.0, 4.5, 6.0 ];
@@ -158,7 +154,6 @@ function generateNatural(points) {
* });
*
* const p0 = spline.evaluate(times[0]);
- *
* @see ConstantSpline
* @see SteppedSpline
* @see LinearSpline
@@ -226,9 +221,7 @@ function HermiteSpline(options) {
Object.defineProperties(HermiteSpline.prototype, {
/**
* An array of times for the control points.
- *
* @memberof HermiteSpline.prototype
- *
* @type {number[]}
* @readonly
*/
@@ -240,9 +233,7 @@ Object.defineProperties(HermiteSpline.prototype, {
/**
* An array of control points.
- *
* @memberof HermiteSpline.prototype
- *
* @type {Cartesian3[]}
* @readonly
*/
@@ -254,9 +245,7 @@ Object.defineProperties(HermiteSpline.prototype, {
/**
* An array of incoming tangents at each control point.
- *
* @memberof HermiteSpline.prototype
- *
* @type {Cartesian3[]}
* @readonly
*/
@@ -268,9 +257,7 @@ Object.defineProperties(HermiteSpline.prototype, {
/**
* An array of outgoing tangents at each control point.
- *
* @memberof HermiteSpline.prototype
- *
* @type {Cartesian3[]}
* @readonly
*/
@@ -284,17 +271,14 @@ Object.defineProperties(HermiteSpline.prototype, {
/**
* Creates a spline where the tangents at each control point are the same.
* The curves are guaranteed to be at least in the class C1.
- *
* @param {object} options Object with the following properties:
* @param {number[]} options.times The array of control point times.
* @param {Cartesian3[]} options.points The array of control points.
* @param {Cartesian3[]} options.tangents The array of tangents at the control points.
* @returns {HermiteSpline} A hermite spline.
- *
- * @exception {DeveloperError} points, times and tangents are required.
- * @exception {DeveloperError} points.length must be greater than or equal to 2.
- * @exception {DeveloperError} times, points and tangents must have the same length.
- *
+ * @throws {DeveloperError} points, times and tangents are required.
+ * @throws {DeveloperError} points.length must be greater than or equal to 2.
+ * @throws {DeveloperError} times, points and tangents must have the same length.
* @example
* const points = [
* new Cesium.Cartesian3(1235398.0, -4810983.0, 4146266.0),
@@ -356,16 +340,13 @@ HermiteSpline.createC1 = function (options) {
/**
* Creates a natural cubic spline. The tangents at the control points are generated
* to create a curve in the class C2.
- *
* @param {object} options Object with the following properties:
* @param {number[]} options.times The array of control point times.
* @param {Cartesian3[]} options.points The array of control points.
* @returns {HermiteSpline|LinearSpline} A hermite spline, or a linear spline if less than 3 control points were given.
- *
- * @exception {DeveloperError} points and times are required.
- * @exception {DeveloperError} points.length must be greater than or equal to 2.
- * @exception {DeveloperError} times.length must be equal to points.length.
- *
+ * @throws {DeveloperError} points and times are required.
+ * @throws {DeveloperError} points.length must be greater than or equal to 2.
+ * @throws {DeveloperError} times.length must be equal to points.length.
* @example
* // Create a natural cubic spline above the earth from Philadelphia to Los Angeles.
* const spline = Cesium.HermiteSpline.createNaturalCubic({
@@ -421,19 +402,16 @@ HermiteSpline.createNaturalCubic = function (options) {
/**
* Creates a clamped cubic spline. The tangents at the interior control points are generated
* to create a curve in the class C2.
- *
* @param {object} options Object with the following properties:
* @param {number[]} options.times The array of control point times.
* @param {number[]|Cartesian3[]} options.points The array of control points.
* @param {Cartesian3} options.firstTangent The outgoing tangent of the first control point.
* @param {Cartesian3} options.lastTangent The incoming tangent of the last control point.
* @returns {HermiteSpline|LinearSpline} A hermite spline, or a linear spline if less than 3 control points were given.
- *
- * @exception {DeveloperError} points, times, firstTangent and lastTangent are required.
- * @exception {DeveloperError} points.length must be greater than or equal to 2.
- * @exception {DeveloperError} times.length must be equal to points.length.
- * @exception {DeveloperError} firstTangent and lastTangent must be of the same type as points.
- *
+ * @throws {DeveloperError} points, times, firstTangent and lastTangent are required.
+ * @throws {DeveloperError} points.length must be greater than or equal to 2.
+ * @throws {DeveloperError} times.length must be equal to points.length.
+ * @throws {DeveloperError} firstTangent and lastTangent must be of the same type as points.
* @example
* // Create a clamped cubic spline above the earth from Philadelphia to Los Angeles.
* const spline = Cesium.HermiteSpline.createClampedCubic({
@@ -522,11 +500,9 @@ HermiteSpline.hermiteCoefficientMatrix = new Matrix4(
* Finds an index i in times such that the parameter
* time is in the interval [times[i], times[i + 1]].
* @function
- *
* @param {number} time The time.
* @returns {number} The index for the element at the start of the interval.
- *
- * @exception {DeveloperError} time must be in the range [t0, tn], where t0
+ * @throws {DeveloperError} time must be in the range [t0, tn], where t0
* is the first element in the array times and tn is the last element
* in the array times.
*/
@@ -538,29 +514,25 @@ const scratchTemp = new Cartesian3();
/**
* Wraps the given time to the period covered by the spline.
* @function
- *
* @param {number} time The time.
- * @return {number} The time, wrapped around to the updated animation.
+ * @returns {number} The time, wrapped around to the updated animation.
*/
HermiteSpline.prototype.wrapTime = Spline.prototype.wrapTime;
/**
* Clamps the given time to the period covered by the spline.
* @function
- *
* @param {number} time The time.
- * @return {number} The time, clamped to the animation period.
+ * @returns {number} The time, clamped to the animation period.
*/
HermiteSpline.prototype.clampTime = Spline.prototype.clampTime;
/**
* Evaluates the curve at a given time.
- *
* @param {number} time The time at which to evaluate the curve.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new instance of the point on the curve at the given time.
- *
- * @exception {DeveloperError} time must be in the range [t0, tn], where t0
+ * @throws {DeveloperError} time must be in the range [t0, tn], where t0
* is the first element in the array times and tn is the last element
* in the array times.
*/
diff --git a/packages/engine/Source/Core/HilbertOrder.js b/packages/engine/Source/Core/HilbertOrder.js
index 540a1ea493b4..335fb936a217 100644
--- a/packages/engine/Source/Core/HilbertOrder.js
+++ b/packages/engine/Source/Core/HilbertOrder.js
@@ -3,14 +3,12 @@ import DeveloperError from "./DeveloperError.js";
/**
* Hilbert Order helper functions.
- *
* @namespace HilbertOrder
*/
const HilbertOrder = {};
/**
* Computes the Hilbert index at the given level from 2D coordinates.
- *
* @param {number} level The level of the curve
* @param {number} x The X coordinate
* @param {number} y The Y coordinate
@@ -54,7 +52,6 @@ HilbertOrder.encode2D = function (level, x, y) {
/**
* Computes the 2D coordinates from the Hilbert index at the given level.
- *
* @param {number} level The level of the curve
* @param {bigint} index The Hilbert index
* @returns {number[]} An array containing the 2D coordinates ([x, y]) corresponding to the Morton index.
@@ -98,6 +95,10 @@ HilbertOrder.decode2D = function (level, index) {
};
/**
+ * @param n
+ * @param p
+ * @param rx
+ * @param ry
* @private
*/
function rotate(n, p, rx, ry) {
diff --git a/packages/engine/Source/Core/Iau2000Orientation.js b/packages/engine/Source/Core/Iau2000Orientation.js
index e9595a481194..b4c4436cd14e 100644
--- a/packages/engine/Source/Core/Iau2000Orientation.js
+++ b/packages/engine/Source/Core/Iau2000Orientation.js
@@ -8,9 +8,7 @@ import TimeConstants from "./TimeConstants.js";
* This is a collection of the orientation information available for central bodies.
* The data comes from the Report of the IAU/IAG Working Group on Cartographic
* Coordinates and Rotational Elements: 2000.
- *
* @namespace Iau2000Orientation
- *
* @private
*/
const Iau2000Orientation = {};
@@ -35,7 +33,6 @@ let dateTT = new JulianDate();
/**
* Compute the orientation parameters for the Moon.
- *
* @param {JulianDate} [date=JulianDate.now()] The date to evaluate the parameters.
* @param {IauOrientationParameters} [result] The object onto which to store the result.
* @returns {IauOrientationParameters} The modified result parameter or a new instance representing the orientation of the Earth's Moon.
diff --git a/packages/engine/Source/Core/Iau2006XysData.js b/packages/engine/Source/Core/Iau2006XysData.js
index c09aec64a55c..0c8d9ccd4c00 100644
--- a/packages/engine/Source/Core/Iau2006XysData.js
+++ b/packages/engine/Source/Core/Iau2006XysData.js
@@ -9,10 +9,8 @@ import TimeStandard from "./TimeStandard.js";
/**
* A set of IAU2006 XYS data that is used to evaluate the transformation between the International
* Celestial Reference Frame (ICRF) and the International Terrestrial Reference Frame (ITRF).
- *
* @alias Iau2006XysData
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
* @param {Resource|string} [options.xysFileUrlTemplate='Assets/IAU2006_XYS/IAU2006_XYS_{0}.json'] A template URL for obtaining the XYS data. In the template,
* `{0}` will be replaced with the file index.
@@ -22,7 +20,6 @@ import TimeStandard from "./TimeStandard.js";
* @param {number} [options.stepSizeDays=1.0] The step size, in days, between successive XYS samples.
* @param {number} [options.samplesPerXysFile=1000] The number of samples in each XYS file.
* @param {number} [options.totalSamples=27426] The total number of samples in all XYS files.
- *
* @private
*/
function Iau2006XysData(options) {
@@ -84,7 +81,6 @@ function getDaysSinceEpoch(xys, dayTT, secondTT) {
/**
* Preloads XYS data for a specified date range.
- *
* @param {number} startDayTT The Julian day number of the beginning of the interval to preload, expressed in
* the Terrestrial Time (TT) time standard.
* @param {number} startSecondTT The seconds past noon of the beginning of the interval to preload, expressed in
@@ -137,7 +133,6 @@ Iau2006XysData.prototype.preload = function (
/**
* Computes the XYS values for a given date by interpolating. If the required data is not yet downloaded,
* this method will return undefined.
- *
* @param {number} dayTT The Julian day number for which to compute the XYS value, expressed in
* the Terrestrial Time (TT) time standard.
* @param {number} secondTT The seconds past noon of the date for which to compute the XYS value, expressed in
@@ -146,7 +141,6 @@ Iau2006XysData.prototype.preload = function (
* is undefined, a new instance is allocated and returned.
* @returns {Iau2006XysSample} The interpolated XYS values, or undefined if the required data for this
* computation has not yet been downloaded.
- *
* @see Iau2006XysData#preload
*/
Iau2006XysData.prototype.computeXysRadians = function (
diff --git a/packages/engine/Source/Core/Iau2006XysSample.js b/packages/engine/Source/Core/Iau2006XysSample.js
index e0a83e0c3258..b09244db62b9 100644
--- a/packages/engine/Source/Core/Iau2006XysSample.js
+++ b/packages/engine/Source/Core/Iau2006XysSample.js
@@ -1,13 +1,10 @@
/**
* An IAU 2006 XYS value sampled at a particular time.
- *
* @alias Iau2006XysSample
- * @constructor
- *
+ * @class
* @param {number} x The X value.
* @param {number} y The Y value.
* @param {number} s The S value.
- *
* @private
*/
function Iau2006XysSample(x, y, s) {
diff --git a/packages/engine/Source/Core/IauOrientationAxes.js b/packages/engine/Source/Core/IauOrientationAxes.js
index 098867325578..c6b6cd4b130f 100644
--- a/packages/engine/Source/Core/IauOrientationAxes.js
+++ b/packages/engine/Source/Core/IauOrientationAxes.js
@@ -10,12 +10,9 @@ import Quaternion from "./Quaternion.js";
* The Axes representing the orientation of a Globe as represented by the data
* from the IAU/IAG Working Group reports on rotational elements.
* @alias IauOrientationAxes
- * @constructor
- *
+ * @class
* @param {IauOrientationAxes.ComputeFunction} [computeFunction] The function that computes the {@link IauOrientationParameters} given a {@link JulianDate}.
- *
* @see Iau2000Orientation
- *
* @private
*/
function IauOrientationAxes(computeFunction) {
@@ -67,7 +64,6 @@ const quatScratch = new Quaternion();
/**
* Computes a rotation from ICRF to a Globe's Fixed axes.
- *
* @param {JulianDate} date The date to evaluate the matrix.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter or a new instance of the rotation from ICRF to Fixed.
diff --git a/packages/engine/Source/Core/IauOrientationParameters.js b/packages/engine/Source/Core/IauOrientationParameters.js
index ba72c47384e6..2dff5eadeeee 100644
--- a/packages/engine/Source/Core/IauOrientationParameters.js
+++ b/packages/engine/Source/Core/IauOrientationParameters.js
@@ -5,9 +5,11 @@
* These parameters correspond to the parameters in the Report from the IAU/IAG Working Group
* except that they are expressed in radians.
*
- *
+ * @param rightAscension
+ * @param declination
+ * @param rotation
+ * @param rotationRate
* @namespace IauOrientationParameters
- *
* @private
*/
function IauOrientationParameters(
@@ -20,7 +22,6 @@ function IauOrientationParameters(
* The right ascension of the north pole of the body with respect to
* the International Celestial Reference Frame, in radians.
* @type {number}
- *
* @private
*/
this.rightAscension = rightAscension;
@@ -29,7 +30,6 @@ function IauOrientationParameters(
* The declination of the north pole of the body with respect to
* the International Celestial Reference Frame, in radians.
* @type {number}
- *
* @private
*/
this.declination = declination;
@@ -38,7 +38,6 @@ function IauOrientationParameters(
* The rotation about the north pole used to align a set of axes with
* the meridian defined by the IAU report, in radians.
* @type {number}
- *
* @private
*/
this.rotation = rotation;
@@ -46,7 +45,6 @@ function IauOrientationParameters(
/**
* The instantaneous rotation rate about the north pole, in radians per second.
* @type {number}
- *
* @private
*/
this.rotationRate = rotationRate;
diff --git a/packages/engine/Source/Core/IndexDatatype.js b/packages/engine/Source/Core/IndexDatatype.js
index 6a31e2ce9426..a77dcf5a0e63 100644
--- a/packages/engine/Source/Core/IndexDatatype.js
+++ b/packages/engine/Source/Core/IndexDatatype.js
@@ -6,14 +6,12 @@ import WebGLConstants from "./WebGLConstants.js";
/**
* Constants for WebGL index datatypes. These corresponds to the
* type parameter of {@link http://www.khronos.org/opengles/sdk/docs/man/xhtml/glDrawElements.xml|drawElements}.
- *
* @enum {number}
*/
const IndexDatatype = {
/**
* 8-bit unsigned byte corresponding to UNSIGNED_BYTE and the type
* of an element in Uint8Array.
- *
* @type {number}
* @constant
*/
@@ -22,7 +20,6 @@ const IndexDatatype = {
/**
* 16-bit unsigned short corresponding to UNSIGNED_SHORT and the type
* of an element in Uint16Array.
- *
* @type {number}
* @constant
*/
@@ -31,7 +28,6 @@ const IndexDatatype = {
/**
* 32-bit unsigned int corresponding to UNSIGNED_INT and the type
* of an element in Uint32Array.
- *
* @type {number}
* @constant
*/
@@ -40,10 +36,8 @@ const IndexDatatype = {
/**
* Returns the size, in bytes, of the corresponding datatype.
- *
* @param {IndexDatatype} indexDatatype The index datatype to get the size of.
* @returns {number} The size in bytes.
- *
* @example
* // Returns 2
* const size = Cesium.IndexDatatype.getSizeInBytes(Cesium.IndexDatatype.UNSIGNED_SHORT);
@@ -67,7 +61,6 @@ IndexDatatype.getSizeInBytes = function (indexDatatype) {
/**
* Gets the datatype with a given size in bytes.
- *
* @param {number} sizeInBytes The size of a single index in bytes.
* @returns {IndexDatatype} The index datatype with the given size.
*/
@@ -90,10 +83,8 @@ IndexDatatype.fromSizeInBytes = function (sizeInBytes) {
/**
* Validates that the provided index datatype is a valid {@link IndexDatatype}.
- *
* @param {IndexDatatype} indexDatatype The index datatype to validate.
* @returns {boolean} true if the provided index datatype is a valid value; otherwise, false.
- *
* @example
* if (!Cesium.IndexDatatype.validate(indexDatatype)) {
* throw new Cesium.DeveloperError('indexDatatype must be a valid value.');
@@ -111,11 +102,9 @@ IndexDatatype.validate = function (indexDatatype) {
/**
* Creates a typed array that will store indices, using either
* or Uint32Array depending on the number of vertices.
- *
* @param {number} numberOfVertices Number of vertices that the indices will reference.
* @param {number|Array} indicesLengthOrArray Passed through to the typed array constructor.
* @returns {Uint16Array|Uint32Array} A Uint16Array or Uint32Array constructed with indicesLengthOrArray.
- *
* @example
* this.indices = Cesium.IndexDatatype.createTypedArray(positions.length / 3, numberOfIndices);
*/
@@ -139,13 +128,11 @@ IndexDatatype.createTypedArray = function (
/**
* Creates a typed array from a source array buffer. The resulting typed array will store indices, using either
* or Uint32Array depending on the number of vertices.
- *
* @param {number} numberOfVertices Number of vertices that the indices will reference.
* @param {ArrayBuffer} sourceArray Passed through to the typed array constructor.
* @param {number} byteOffset Passed through to the typed array constructor.
* @param {number} length Passed through to the typed array constructor.
* @returns {Uint16Array|Uint32Array} A Uint16Array or Uint32Array constructed with sourceArray, byteOffset, and length.
- *
*/
IndexDatatype.createTypedArrayFromArrayBuffer = function (
numberOfVertices,
@@ -174,7 +161,6 @@ IndexDatatype.createTypedArrayFromArrayBuffer = function (
/**
* Gets the {@link IndexDatatype} for the provided TypedArray instance.
- *
* @param {Uint8Array|Uint16Array|Uint32Array} array The typed array.
* @returns {IndexDatatype} The IndexDatatype for the provided array, or undefined if the array is not a Uint8Array, Uint16Array, or Uint32Array.
*/
diff --git a/packages/engine/Source/Core/InterpolationAlgorithm.js b/packages/engine/Source/Core/InterpolationAlgorithm.js
index b050eda4ddb8..d2ef9c5ad8b3 100644
--- a/packages/engine/Source/Core/InterpolationAlgorithm.js
+++ b/packages/engine/Source/Core/InterpolationAlgorithm.js
@@ -2,9 +2,7 @@ import DeveloperError from "./DeveloperError.js";
/**
* The interface for interpolation algorithms.
- *
* @interface InterpolationAlgorithm
- *
* @see LagrangePolynomialApproximation
* @see LinearApproximation
* @see HermitePolynomialApproximation
@@ -20,7 +18,6 @@ InterpolationAlgorithm.type = undefined;
/**
* Given the desired degree, returns the number of data points required for interpolation.
* @function
- *
* @param {number} degree The desired degree of interpolation.
* @returns {number} The number of required data points needed for the desired degree of interpolation.
*/
@@ -30,7 +27,6 @@ InterpolationAlgorithm.getRequiredDataPoints =
/**
* Performs zero order interpolation.
* @function
- *
* @param {number} x The independent variable for which the dependent variables will be interpolated.
* @param {number[]} xTable The array of independent variables to use to interpolate. The values
* in this array must be in increasing order and the same value must not occur twice in the array.
@@ -39,7 +35,6 @@ InterpolationAlgorithm.getRequiredDataPoints =
* @param {number} yStride The number of dependent variable values in yTable corresponding to
* each independent variable value in xTable.
* @param {number[]} [result] An existing array into which to store the result.
- *
* @returns {number[]} The array of interpolated values, or the result parameter if one was provided.
*/
InterpolationAlgorithm.interpolateOrderZero =
diff --git a/packages/engine/Source/Core/InterpolationType.js b/packages/engine/Source/Core/InterpolationType.js
index 50b6e4b3fc8f..cbc2dea864e2 100644
--- a/packages/engine/Source/Core/InterpolationType.js
+++ b/packages/engine/Source/Core/InterpolationType.js
@@ -1,8 +1,6 @@
/**
* An enum describing the type of interpolation used in a glTF animation.
- *
* @enum {number}
- *
* @private
*/
const InterpolationType = {
diff --git a/packages/engine/Source/Core/Intersect.js b/packages/engine/Source/Core/Intersect.js
index dada0889bd41..37b812ad1788 100644
--- a/packages/engine/Source/Core/Intersect.js
+++ b/packages/engine/Source/Core/Intersect.js
@@ -3,13 +3,11 @@
* object is located. The object can either be fully contained within the frustum (INSIDE),
* partially inside the frustum and partially outside (INTERSECTING), or somewhere entirely
* outside of the frustum's 6 planes (OUTSIDE).
- *
* @enum {number}
*/
const Intersect = {
/**
* Represents that an object is not contained within the frustum.
- *
* @type {number}
* @constant
*/
@@ -17,7 +15,6 @@ const Intersect = {
/**
* Represents that an object intersects one of the frustum's planes.
- *
* @type {number}
* @constant
*/
@@ -25,7 +22,6 @@ const Intersect = {
/**
* Represents that an object is fully within the frustum.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/IntersectionTests.js b/packages/engine/Source/Core/IntersectionTests.js
index 295b467bdb45..6e1b108e97e8 100644
--- a/packages/engine/Source/Core/IntersectionTests.js
+++ b/packages/engine/Source/Core/IntersectionTests.js
@@ -12,14 +12,12 @@ import Ray from "./Ray.js";
/**
* Functions for computing the intersection between geometries such as rays, planes, triangles, and ellipsoids.
- *
* @namespace IntersectionTests
*/
const IntersectionTests = {};
/**
* Computes the intersection of a ray and a plane.
- *
* @param {Ray} ray The ray.
* @param {Plane} plane The plane.
* @param {Cartesian3} [result] The object onto which to store the result.
@@ -70,9 +68,7 @@ const scratchQVec = new Cartesian3();
*
* Implements {@link https://cadxfem.org/inf/Fast%20MinimumStorage%20RayTriangle%20Intersection.pdf|
* Fast Minimum Storage Ray/Triangle Intersection} by Tomas Moller and Ben Trumbore.
- *
* @memberof IntersectionTests
- *
* @param {Ray} ray The ray.
* @param {Cartesian3} p0 The first vertex of the triangle.
* @param {Cartesian3} p1 The second vertex of the triangle.
@@ -170,9 +166,7 @@ IntersectionTests.rayTriangleParametric = function (
*
* Implements {@link https://cadxfem.org/inf/Fast%20MinimumStorage%20RayTriangle%20Intersection.pdf|
* Fast Minimum Storage Ray/Triangle Intersection} by Tomas Moller and Ben Trumbore.
- *
* @memberof IntersectionTests
- *
* @param {Ray} ray The ray.
* @param {Cartesian3} p0 The first vertex of the triangle.
* @param {Cartesian3} p1 The second vertex of the triangle.
@@ -214,7 +208,6 @@ const scratchLineSegmentTriangleRay = new Ray();
/**
* Computes the intersection of a line segment and a triangle.
* @memberof IntersectionTests
- *
* @param {Cartesian3} v0 The an end point of the line segment.
* @param {Cartesian3} v1 The other end point of the line segment.
* @param {Cartesian3} p0 The first vertex of the triangle.
@@ -341,7 +334,6 @@ function raySphere(ray, sphere, result) {
/**
* Computes the intersection points of a ray with a sphere.
* @memberof IntersectionTests
- *
* @param {Ray} ray The ray.
* @param {BoundingSphere} sphere The sphere.
* @param {Interval} [result] The result onto which to store the result.
@@ -371,7 +363,6 @@ const scratchLineSegmentRay = new Ray();
/**
* Computes the intersection points of a line segment with a sphere.
* @memberof IntersectionTests
- *
* @param {Cartesian3} p0 An end point of the line segment.
* @param {Cartesian3} p1 The other end point of the line segment.
* @param {BoundingSphere} sphere The sphere.
@@ -413,7 +404,6 @@ const scratchW = new Cartesian3();
/**
* Computes the intersection points of a ray with an ellipsoid.
- *
* @param {Ray} ray The ray.
* @param {Ellipsoid} ellipsoid The ellipsoid.
* @returns {Interval} The interval containing scalar points along the ray or undefined if there are no intersections.
@@ -509,6 +499,11 @@ function addWithCancellationCheck(left, right, tolerance) {
}
/**
+ * @param A
+ * @param b
+ * @param c
+ * @param x
+ * @param w
* @private
*/
IntersectionTests.quadraticVectorExpression = function (A, b, c, x, w) {
@@ -657,7 +652,6 @@ const surfPointScratch = new Cartographic();
/**
* Provides the point along the ray which is nearest to the ellipsoid.
- *
* @param {Ray} ray The ray.
* @param {Ellipsoid} ellipsoid The ellipsoid.
* @returns {Cartesian3} The nearest planetodetic point on the ray.
@@ -797,13 +791,11 @@ const lineSegmentPlaneDifference = new Cartesian3();
/**
* Computes the intersection of a line segment and a plane.
- *
* @param {Cartesian3} endPoint0 An end point of the line segment.
* @param {Cartesian3} endPoint1 The other end point of the line segment.
* @param {Plane} plane The plane.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The intersection point or undefined if there is no intersection.
- *
* @example
* const origin = Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883);
* const normal = ellipsoid.geodeticSurfaceNormal(origin);
@@ -866,13 +858,11 @@ IntersectionTests.lineSegmentPlane = function (
/**
* Computes the intersection of a triangle and a plane
- *
* @param {Cartesian3} p0 First point of the triangle
* @param {Cartesian3} p1 Second point of the triangle
* @param {Cartesian3} p2 Third point of the triangle
* @param {Plane} plane Intersection plane
* @returns {object} An object with properties positions and indices, which are arrays that represent three triangles that do not cross the plane. (Undefined if no intersection exists)
- *
* @example
* const origin = Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883);
* const normal = ellipsoid.geodeticSurfaceNormal(origin);
diff --git a/packages/engine/Source/Core/Intersections2D.js b/packages/engine/Source/Core/Intersections2D.js
index df98e06093db..8beab6cfed0c 100644
--- a/packages/engine/Source/Core/Intersections2D.js
+++ b/packages/engine/Source/Core/Intersections2D.js
@@ -6,7 +6,6 @@ import DeveloperError from "./DeveloperError.js";
/**
* Contains functions for operating on 2D triangles.
- *
* @namespace Intersections2D
*/
const Intersections2D = {};
@@ -15,7 +14,6 @@ const Intersections2D = {};
* Splits a 2D triangle at given axis-aligned threshold value and returns the resulting
* polygon on a given side of the threshold. The resulting polygon may have 0, 1, 2,
* 3, or 4 vertices.
- *
* @param {number} threshold The threshold coordinate value at which to clip the triangle.
* @param {boolean} keepAbove true to keep the portion of the triangle above the threshold, or false
* to keep the portion below.
@@ -32,7 +30,6 @@ const Intersections2D = {};
* index of each of the two original vertices forming the line segment that
* the new vertex lies on, and the fraction of the distance from the first
* vertex to the second one.
- *
* @example
* const result = Cesium.Intersections2D.clipTriangleAtAxisAlignedThreshold(0.5, false, 0.2, 0.6, 0.4);
* // result === [2, 0, -1, 1, 0, 0.25, -1, 1, 2, 0.5]
@@ -216,7 +213,6 @@ Intersections2D.clipTriangleAtAxisAlignedThreshold = function (
/**
* Compute the barycentric coordinates of a 2D position within a 2D triangle.
- *
* @param {number} x The x coordinate of the position for which to find the barycentric coordinates.
* @param {number} y The y coordinate of the position for which to find the barycentric coordinates.
* @param {number} x1 The x coordinate of the triangle's first vertex.
@@ -228,7 +224,6 @@ Intersections2D.clipTriangleAtAxisAlignedThreshold = function (
* @param {Cartesian3} [result] The instance into to which to copy the result. If this parameter
* is undefined, a new instance is created and returned.
* @returns {Cartesian3} The barycentric coordinates of the position within the triangle.
- *
* @example
* const result = Cesium.Intersections2D.computeBarycentricCoordinates(0.0, 0.0, 0.0, 1.0, -1, -0.5, 1, -0.5);
* // result === new Cesium.Cartesian3(1.0 / 3.0, 1.0 / 3.0, 1.0 / 3.0);
@@ -293,7 +288,6 @@ Intersections2D.computeBarycentricCoordinates = function (
/**
* Compute the intersection between 2 line segments
- *
* @param {number} x00 The x coordinate of the first line's first vertex.
* @param {number} y00 The y coordinate of the first line's first vertex.
* @param {number} x01 The x coordinate of the first line's second vertex.
@@ -305,7 +299,6 @@ Intersections2D.computeBarycentricCoordinates = function (
* @param {Cartesian2} [result] The instance into to which to copy the result. If this parameter
* is undefined, a new instance is created and returned.
* @returns {Cartesian2} The intersection point, undefined if there is no intersection point or lines are coincident.
- *
* @example
* const result = Cesium.Intersections2D.computeLineSegmentLineSegmentIntersection(0.0, 0.0, 0.0, 2.0, -1, 1, 1, 1);
* // result === new Cesium.Cartesian2(0.0, 1.0);
diff --git a/packages/engine/Source/Core/Interval.js b/packages/engine/Source/Core/Interval.js
index 4f8f99c8b962..672695ddc92a 100644
--- a/packages/engine/Source/Core/Interval.js
+++ b/packages/engine/Source/Core/Interval.js
@@ -3,8 +3,7 @@ import defaultValue from "./defaultValue.js";
/**
* Represents the closed interval [start, stop].
* @alias Interval
- * @constructor
- *
+ * @class
* @param {number} [start=0.0] The beginning of the interval.
* @param {number} [stop=0.0] The end of the interval.
*/
diff --git a/packages/engine/Source/Core/Ion.js b/packages/engine/Source/Core/Ion.js
index a0a4bba815e1..249e70fe315f 100644
--- a/packages/engine/Source/Core/Ion.js
+++ b/packages/engine/Source/Core/Ion.js
@@ -11,7 +11,6 @@ const defaultAccessToken =
* An ion access token is only required if you are using any ion related APIs.
* A default access token is provided for evaluation purposes only.
* Sign up for a free ion account and get your own access token at {@link https://cesium.com}
- *
* @see IonResource
* @see IonImageryProvider
* @see IonGeocoderService
@@ -23,14 +22,12 @@ const Ion = {};
/**
* Gets or sets the default Cesium ion access token.
- *
* @type {string}
*/
Ion.defaultAccessToken = defaultAccessToken;
/**
* Gets or sets the default Cesium ion server.
- *
* @type {string|Resource}
* @default https://api.cesium.com
*/
diff --git a/packages/engine/Source/Core/IonGeocoderService.js b/packages/engine/Source/Core/IonGeocoderService.js
index 7ff6f6260d2d..70bd3f3f6ecd 100644
--- a/packages/engine/Source/Core/IonGeocoderService.js
+++ b/packages/engine/Source/Core/IonGeocoderService.js
@@ -9,13 +9,11 @@ import Resource from "./Resource.js";
/**
* Provides geocoding through Cesium ion.
* @alias IonGeocoderService
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Scene} options.scene The scene
* @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.
- *
* @see Ion
*/
function IonGeocoderService(options) {
@@ -68,7 +66,7 @@ Object.defineProperties(IonGeocoderService.prototype, {
/**
* @function
- *
+ * @param geocodeType
* @param {string} query The query to be sent to the geocoder service
* @param {GeocodeType} [type=GeocodeType.SEARCH] The type of geocode to perform.
* @returns {Promise}
diff --git a/packages/engine/Source/Core/IonResource.js b/packages/engine/Source/Core/IonResource.js
index b0dfe6bd43ff..e108ba3cff32 100644
--- a/packages/engine/Source/Core/IonResource.js
+++ b/packages/engine/Source/Core/IonResource.js
@@ -10,14 +10,11 @@ import RuntimeError from "./RuntimeError.js";
/**
* A {@link Resource} instance that encapsulates Cesium ion asset access.
* This object is normally not instantiated directly, use {@link IonResource.fromAssetId}.
- *
* @alias IonResource
- * @constructor
+ * @class
* @augments Resource
- *
* @param {object} endpoint The result of the Cesium ion asset endpoint service.
* @param {Resource} endpointResource The resource used to retrieve the endpoint.
- *
* @see Ion
* @see IonImageryProvider
* @see createWorldTerrain
@@ -79,13 +76,11 @@ if (defined(Object.create)) {
/**
* Asynchronously creates an instance.
- *
* @param {number} assetId The Cesium ion asset id.
* @param {object} [options] An object with the following properties:
* @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.
* @returns {Promise} A Promise to am instance representing the Cesium ion Asset.
- *
* @example
* // Load a Cesium3DTileset with asset ID of 124624234
* try {
@@ -95,7 +90,6 @@ if (defined(Object.create)) {
* } catch (error) {
* console.error(`Error creating tileset: ${error}`);
* }
- *
* @example
* //Load a CZML file with asset ID of 10890
* Cesium.IonResource.fromAssetId(10890)
@@ -117,7 +111,6 @@ IonResource.fromAssetId = function (assetId, options) {
Object.defineProperties(IonResource.prototype, {
/**
* Gets the credits required for attribution of the asset.
- *
* @memberof IonResource.prototype
* @type {Credit[]}
* @readonly
@@ -144,7 +137,11 @@ Object.defineProperties(IonResource.prototype, {
},
});
-/** @private */
+/**
+ * @param endpoint
+ * @param endpointResource
+ * @private
+ */
IonResource.getCreditsFromEndpoint = function (endpoint, endpointResource) {
const credits = endpoint.attributions.map(Credit.getIonCredit);
const defaultTokenCredit = Ion.getDefaultTokenCredit(
@@ -213,6 +210,8 @@ IonResource.prototype._makeRequest = function (options) {
};
/**
+ * @param assetId
+ * @param options
* @private
*/
IonResource._createEndpointResource = function (assetId, options) {
diff --git a/packages/engine/Source/Core/Iso8601.js b/packages/engine/Source/Core/Iso8601.js
index 3b491f54c380..b477550baa14 100644
--- a/packages/engine/Source/Core/Iso8601.js
+++ b/packages/engine/Source/Core/Iso8601.js
@@ -16,9 +16,7 @@ const MAXIMUM_INTERVAL = Object.freeze(
/**
* Constants related to ISO8601 support.
- *
* @namespace
- *
* @see {@link http://en.wikipedia.org/wiki/ISO_8601|ISO 8601 on Wikipedia}
* @see JulianDate
* @see TimeInterval
@@ -27,7 +25,6 @@ const Iso8601 = {
/**
* A {@link JulianDate} representing the earliest time representable by an ISO8601 date.
* This is equivalent to the date string '0000-01-01T00:00:00Z'
- *
* @type {JulianDate}
* @constant
*/
@@ -36,7 +33,6 @@ const Iso8601 = {
/**
* A {@link JulianDate} representing the latest time representable by an ISO8601 date.
* This is equivalent to the date string '9999-12-31T24:00:00Z'
- *
* @type {JulianDate}
* @constant
*/
@@ -45,7 +41,6 @@ const Iso8601 = {
/**
* A {@link TimeInterval} representing the largest interval representable by an ISO8601 interval.
* This is equivalent to the interval string '0000-01-01T00:00:00Z/9999-12-31T24:00:00Z'
- *
* @type {TimeInterval}
* @constant
*/
diff --git a/packages/engine/Source/Core/JulianDate.js b/packages/engine/Source/Core/JulianDate.js
index 3e8a6ec24d5e..9574d6948dae 100644
--- a/packages/engine/Source/Core/JulianDate.js
+++ b/packages/engine/Source/Core/JulianDate.js
@@ -197,8 +197,7 @@ const iso8601ErrorMessage = "Invalid ISO 8601 date.";
* leap seconds, the date is always stored in the International Atomic Time standard
* {@link TimeStandard.TAI}.
* @alias JulianDate
- * @constructor
- *
+ * @class
* @param {number} [julianDayNumber=0.0] The Julian Day Number representing the number of whole days. Fractional days will also be handled correctly.
* @param {number} [secondsOfDay=0.0] The number of seconds into the current Julian Day Number. Fractional seconds, negative seconds and seconds greater than a day will be handled correctly.
* @param {TimeStandard} [timeStandard=TimeStandard.UTC] The time standard in which the first two parameters are defined.
@@ -235,12 +234,10 @@ function JulianDate(julianDayNumber, secondsOfDay, timeStandard) {
/**
* Creates a new instance from a GregorianDate.
- *
* @param {GregorianDate} date A GregorianDate.
* @param {JulianDate} [result] An existing instance to use for the result.
* @returns {JulianDate} The modified result parameter or a new instance if none was provided.
- *
- * @exception {DeveloperError} date must be a valid GregorianDate.
+ * @throws {DeveloperError} date must be a valid GregorianDate.
*/
JulianDate.fromGregorianDate = function (date, result) {
//>>includeStart('debug', pragmas.debug);
@@ -268,12 +265,10 @@ JulianDate.fromGregorianDate = function (date, result) {
/**
* Creates a new instance from a JavaScript Date.
- *
* @param {Date} date A JavaScript Date.
* @param {JulianDate} [result] An existing instance to use for the result.
* @returns {JulianDate} The modified result parameter or a new instance if none was provided.
- *
- * @exception {DeveloperError} date must be a valid JavaScript Date.
+ * @throws {DeveloperError} date must be a valid JavaScript Date.
*/
JulianDate.fromDate = function (date, result) {
//>>includeStart('debug', pragmas.debug);
@@ -303,12 +298,10 @@ JulianDate.fromDate = function (date, result) {
* Creates a new instance from a from an {@link http://en.wikipedia.org/wiki/ISO_8601|ISO 8601} date.
* This method is superior to Date.parse because it will handle all valid formats defined by the ISO 8601
* specification, including leap seconds and sub-millisecond times, which discarded by most JavaScript implementations.
- *
* @param {string} iso8601String An ISO 8601 date.
* @param {JulianDate} [result] An existing instance to use for the result.
* @returns {JulianDate} The modified result parameter or a new instance if none was provided.
- *
- * @exception {DeveloperError} Invalid ISO 8601 date.
+ * @throws {DeveloperError} Invalid ISO 8601 date.
*/
JulianDate.fromIso8601 = function (iso8601String, result) {
//>>includeStart('debug', pragmas.debug);
@@ -608,7 +601,6 @@ JulianDate.fromIso8601 = function (iso8601String, result) {
/**
* Creates a new instance that represents the current system time.
* This is equivalent to calling JulianDate.fromDate(new Date());.
- *
* @param {JulianDate} [result] An existing instance to use for the result.
* @returns {JulianDate} The modified result parameter or a new instance if none was provided.
*/
@@ -620,7 +612,6 @@ const toGregorianDateScratch = new JulianDate(0, 0, TimeStandard.TAI);
/**
* Creates a {@link GregorianDate} from the provided instance.
- *
* @param {JulianDate} julianDate The date to be converted.
* @param {GregorianDate} [result] An existing instance to use for the result.
* @returns {GregorianDate} The modified result parameter or a new instance if none was provided.
@@ -712,7 +703,6 @@ JulianDate.toGregorianDate = function (julianDate, result) {
* Since JavaScript dates are only accurate to the nearest millisecond and
* cannot represent a leap second, consider using {@link JulianDate.toGregorianDate} instead.
* If the provided JulianDate is during a leap second, the previous second is used.
- *
* @param {JulianDate} julianDate The date to be converted.
* @returns {Date} A new instance representing the provided date.
*/
@@ -743,7 +733,6 @@ JulianDate.toDate = function (julianDate) {
/**
* Creates an ISO8601 representation of the provided date.
- *
* @param {JulianDate} julianDate The date to be converted.
* @param {number} [precision] The number of fractional digits used to represent the seconds component. By default, the most precise representation is used.
* @returns {string} The ISO8601 representation of the provided date.
@@ -832,7 +821,6 @@ JulianDate.toIso8601 = function (julianDate, precision) {
/**
* Duplicates a JulianDate instance.
- *
* @param {JulianDate} julianDate The date to duplicate.
* @param {JulianDate} [result] An existing instance to use for the result.
* @returns {JulianDate} The modified result parameter or a new instance if none was provided. Returns undefined if julianDate is undefined.
@@ -855,7 +843,6 @@ JulianDate.clone = function (julianDate, result) {
/**
* Compares two instances.
- *
* @param {JulianDate} left The first instance.
* @param {JulianDate} right The second instance.
* @returns {number} A negative value if left is less than right, a positive value if left is greater than right, or zero if left and right are equal.
@@ -879,7 +866,6 @@ JulianDate.compare = function (left, right) {
/**
* Compares two instances and returns true if they are equal, false otherwise.
- *
* @param {JulianDate} [left] The first instance.
* @param {JulianDate} [right] The second instance.
* @returns {boolean} true if the dates are equal; otherwise, false.
@@ -899,7 +885,6 @@ JulianDate.equals = function (left, right) {
* each other. That is, in order for the dates to be considered equal (and for
* this function to return true), the absolute value of the difference between them, in
* seconds, must be less than epsilon.
- *
* @param {JulianDate} [left] The first instance.
* @param {JulianDate} [right] The second instance.
* @param {number} [epsilon=0] The maximum number of seconds that should separate the two instances.
@@ -918,7 +903,6 @@ JulianDate.equalsEpsilon = function (left, right, epsilon) {
/**
* Computes the total number of whole and fractional days represented by the provided instance.
- *
* @param {JulianDate} julianDate The date.
* @returns {number} The Julian date as single floating point number.
*/
@@ -936,7 +920,6 @@ JulianDate.totalDays = function (julianDate) {
/**
* Computes the difference in seconds between the provided instance.
- *
* @param {JulianDate} left The first instance.
* @param {JulianDate} right The second instance.
* @returns {number} The difference, in seconds, when subtracting right from left.
@@ -958,7 +941,6 @@ JulianDate.secondsDifference = function (left, right) {
/**
* Computes the difference in days between the provided instance.
- *
* @param {JulianDate} left The first instance.
* @param {JulianDate} right The second instance.
* @returns {number} The difference, in days, when subtracting right from left.
@@ -981,7 +963,6 @@ JulianDate.daysDifference = function (left, right) {
/**
* Computes the number of seconds the provided instance is ahead of UTC.
- *
* @param {JulianDate} julianDate The date.
* @returns {number} The number of seconds the provided instance is ahead of UTC
*/
@@ -1005,7 +986,6 @@ JulianDate.computeTaiMinusUtc = function (julianDate) {
/**
* Adds the provided number of seconds to the provided date instance.
- *
* @param {JulianDate} julianDate The date.
* @param {number} seconds The number of seconds to add or subtract.
* @param {JulianDate} result An existing instance to use for the result.
@@ -1033,7 +1013,6 @@ JulianDate.addSeconds = function (julianDate, seconds, result) {
/**
* Adds the provided number of minutes to the provided date instance.
- *
* @param {JulianDate} julianDate The date.
* @param {number} minutes The number of minutes to add or subtract.
* @param {JulianDate} result An existing instance to use for the result.
@@ -1059,7 +1038,6 @@ JulianDate.addMinutes = function (julianDate, minutes, result) {
/**
* Adds the provided number of hours to the provided date instance.
- *
* @param {JulianDate} julianDate The date.
* @param {number} hours The number of hours to add or subtract.
* @param {JulianDate} result An existing instance to use for the result.
@@ -1085,7 +1063,6 @@ JulianDate.addHours = function (julianDate, hours, result) {
/**
* Adds the provided number of days to the provided date instance.
- *
* @param {JulianDate} julianDate The date.
* @param {number} days The number of days to add or subtract.
* @param {JulianDate} result An existing instance to use for the result.
@@ -1110,7 +1087,6 @@ JulianDate.addDays = function (julianDate, days, result) {
/**
* Compares the provided instances and returns true if left is earlier than right, false otherwise.
- *
* @param {JulianDate} left The first instance.
* @param {JulianDate} right The second instance.
* @returns {boolean} true if left is earlier than right, false otherwise.
@@ -1121,7 +1097,6 @@ JulianDate.lessThan = function (left, right) {
/**
* Compares the provided instances and returns true if left is earlier than or equal to right, false otherwise.
- *
* @param {JulianDate} left The first instance.
* @param {JulianDate} right The second instance.
* @returns {boolean} true if left is earlier than or equal to right, false otherwise.
@@ -1132,7 +1107,6 @@ JulianDate.lessThanOrEquals = function (left, right) {
/**
* Compares the provided instances and returns true if left is later than right, false otherwise.
- *
* @param {JulianDate} left The first instance.
* @param {JulianDate} right The second instance.
* @returns {boolean} true if left is later than right, false otherwise.
@@ -1143,7 +1117,6 @@ JulianDate.greaterThan = function (left, right) {
/**
* Compares the provided instances and returns true if left is later than or equal to right, false otherwise.
- *
* @param {JulianDate} left The first instance.
* @param {JulianDate} right The second instance.
* @returns {boolean} true if left is later than or equal to right, false otherwise.
@@ -1154,7 +1127,6 @@ JulianDate.greaterThanOrEquals = function (left, right) {
/**
* Duplicates this instance.
- *
* @param {JulianDate} [result] An existing instance to use for the result.
* @returns {JulianDate} The modified result parameter or a new instance if none was provided.
*/
@@ -1164,7 +1136,6 @@ JulianDate.prototype.clone = function (result) {
/**
* Compares this and the provided instance and returns true if they are equal, false otherwise.
- *
* @param {JulianDate} [right] The second instance.
* @returns {boolean} true if the dates are equal; otherwise, false.
*/
@@ -1177,7 +1148,6 @@ JulianDate.prototype.equals = function (right) {
* each other. That is, in order for the dates to be considered equal (and for
* this function to return true), the absolute value of the difference between them, in
* seconds, must be less than epsilon.
- *
* @param {JulianDate} [right] The second instance.
* @param {number} [epsilon=0] The maximum number of seconds that should separate the two instances.
* @returns {boolean} true if the two dates are within epsilon seconds of each other; otherwise false.
@@ -1188,7 +1158,6 @@ JulianDate.prototype.equalsEpsilon = function (right, epsilon) {
/**
* Creates a string representing this date in ISO8601 format.
- *
* @returns {string} A string representing this date in ISO8601 format.
*/
JulianDate.prototype.toString = function () {
diff --git a/packages/engine/Source/Core/KTX2Transcoder.js b/packages/engine/Source/Core/KTX2Transcoder.js
index f570a32dc691..61d23848b760 100644
--- a/packages/engine/Source/Core/KTX2Transcoder.js
+++ b/packages/engine/Source/Core/KTX2Transcoder.js
@@ -6,7 +6,6 @@ import TaskProcessor from "./TaskProcessor.js";
/**
* Transcodes KTX2 textures using web workers.
- *
* @private
*/
function KTX2Transcoder() {}
diff --git a/packages/engine/Source/Core/KeyboardEventModifier.js b/packages/engine/Source/Core/KeyboardEventModifier.js
index ede05482c421..bb9e7106c299 100644
--- a/packages/engine/Source/Core/KeyboardEventModifier.js
+++ b/packages/engine/Source/Core/KeyboardEventModifier.js
@@ -1,13 +1,11 @@
/**
* This enumerated type is for representing keyboard modifiers. These are keys
* that are held down in addition to other event types.
- *
* @enum {number}
*/
const KeyboardEventModifier = {
/**
* Represents the shift key being held down.
- *
* @type {number}
* @constant
*/
@@ -15,7 +13,6 @@ const KeyboardEventModifier = {
/**
* Represents the control key being held down.
- *
* @type {number}
* @constant
*/
@@ -23,7 +20,6 @@ const KeyboardEventModifier = {
/**
* Represents the alt key being held down.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/LagrangePolynomialApproximation.js b/packages/engine/Source/Core/LagrangePolynomialApproximation.js
index 67c15aa28fb1..8e2fcd83a3e0 100644
--- a/packages/engine/Source/Core/LagrangePolynomialApproximation.js
+++ b/packages/engine/Source/Core/LagrangePolynomialApproximation.js
@@ -2,7 +2,6 @@ import defined from "./defined.js";
/**
* An {@link InterpolationAlgorithm} for performing Lagrange interpolation.
- *
* @namespace LagrangePolynomialApproximation
*/
const LagrangePolynomialApproximation = {
@@ -11,7 +10,6 @@ const LagrangePolynomialApproximation = {
/**
* Given the desired degree, returns the number of data points required for interpolation.
- *
* @param {number} degree The desired degree of interpolation.
* @returns {number} The number of required data points needed for the desired degree of interpolation.
*/
@@ -21,7 +19,6 @@ LagrangePolynomialApproximation.getRequiredDataPoints = function (degree) {
/**
* Interpolates values using Lagrange Polynomial Approximation.
- *
* @param {number} x The independent variable for which the dependent variables will be interpolated.
* @param {number[]} xTable The array of independent variables to use to interpolate. The values
* in this array must be in increasing order and the same value must not occur twice in the array.
diff --git a/packages/engine/Source/Core/LeapSecond.js b/packages/engine/Source/Core/LeapSecond.js
index dbcf62cd453f..eb6b39d7e05f 100644
--- a/packages/engine/Source/Core/LeapSecond.js
+++ b/packages/engine/Source/Core/LeapSecond.js
@@ -2,8 +2,7 @@
* Describes a single leap second, which is constructed from a {@link JulianDate} and a
* numerical offset representing the number of seconds TAI is ahead of the UTC time standard.
* @alias LeapSecond
- * @constructor
- *
+ * @class
* @param {JulianDate} [date] A Julian date representing the time of the leap second.
* @param {number} [offset] The cumulative number of seconds that TAI is ahead of UTC at the provided date.
*/
diff --git a/packages/engine/Source/Core/LinearApproximation.js b/packages/engine/Source/Core/LinearApproximation.js
index c605a7f4fb39..b36168e60722 100644
--- a/packages/engine/Source/Core/LinearApproximation.js
+++ b/packages/engine/Source/Core/LinearApproximation.js
@@ -3,7 +3,6 @@ import DeveloperError from "./DeveloperError.js";
/**
* An {@link InterpolationAlgorithm} for performing linear interpolation.
- *
* @namespace LinearApproximation
*/
const LinearApproximation = {
@@ -16,7 +15,6 @@ const LinearApproximation = {
* always returns 2.
* @param {number} degree The desired degree of interpolation.
* @returns {number} This function always returns 2.
- *
*/
LinearApproximation.getRequiredDataPoints = function (degree) {
return 2;
@@ -24,7 +22,6 @@ LinearApproximation.getRequiredDataPoints = function (degree) {
/**
* Interpolates values using linear approximation.
- *
* @param {number} x The independent variable for which the dependent variables will be interpolated.
* @param {number[]} xTable The array of independent variables to use to interpolate. The values
* in this array must be in increasing order and the same value must not occur twice in the array.
diff --git a/packages/engine/Source/Core/LinearSpline.js b/packages/engine/Source/Core/LinearSpline.js
index d067d318cc26..0b5adb604489 100644
--- a/packages/engine/Source/Core/LinearSpline.js
+++ b/packages/engine/Source/Core/LinearSpline.js
@@ -6,19 +6,14 @@ import Spline from "./Spline.js";
/**
* A spline that uses piecewise linear interpolation to create a curve.
- *
* @alias LinearSpline
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {number[]} options.times An array of strictly increasing, unit-less, floating-point times at each point.
* The values are in no way connected to the clock time. They are the parameterization for the curve.
* @param {number[]|Cartesian3[]} options.points The array of control points.
- *
- * @exception {DeveloperError} points.length must be greater than or equal to 2.
- * @exception {DeveloperError} times.length must be equal to points.length.
- *
- *
+ * @throws {DeveloperError} points.length must be greater than or equal to 2.
+ * @throws {DeveloperError} times.length must be equal to points.length.
* @example
* const times = [ 0.0, 1.5, 3.0, 4.5, 6.0 ];
* const spline = new Cesium.LinearSpline({
@@ -33,7 +28,6 @@ import Spline from "./Spline.js";
* });
*
* const p0 = spline.evaluate(times[0]);
- *
* @see ConstantSpline
* @see SteppedSpline
* @see HermiteSpline
@@ -71,9 +65,7 @@ function LinearSpline(options) {
Object.defineProperties(LinearSpline.prototype, {
/**
* An array of times for the control points.
- *
* @memberof LinearSpline.prototype
- *
* @type {number[]}
* @readonly
*/
@@ -85,9 +77,7 @@ Object.defineProperties(LinearSpline.prototype, {
/**
* An array of {@link Cartesian3} control points.
- *
* @memberof LinearSpline.prototype
- *
* @type {number[]|Cartesian3[]}
* @readonly
*/
@@ -102,11 +92,9 @@ Object.defineProperties(LinearSpline.prototype, {
* Finds an index i in times such that the parameter
* time is in the interval [times[i], times[i + 1]].
* @function
- *
* @param {number} time The time.
* @returns {number} The index for the element at the start of the interval.
- *
- * @exception {DeveloperError} time must be in the range [t0, tn], where t0
+ * @throws {DeveloperError} time must be in the range [t0, tn], where t0
* is the first element in the array times and tn is the last element
* in the array times.
*/
@@ -115,29 +103,25 @@ LinearSpline.prototype.findTimeInterval = Spline.prototype.findTimeInterval;
/**
* Wraps the given time to the period covered by the spline.
* @function
- *
* @param {number} time The time.
- * @return {number} The time, wrapped around to the updated animation.
+ * @returns {number} The time, wrapped around to the updated animation.
*/
LinearSpline.prototype.wrapTime = Spline.prototype.wrapTime;
/**
* Clamps the given time to the period covered by the spline.
* @function
- *
* @param {number} time The time.
- * @return {number} The time, clamped to the animation period.
+ * @returns {number} The time, clamped to the animation period.
*/
LinearSpline.prototype.clampTime = Spline.prototype.clampTime;
/**
* Evaluates the curve at a given time.
- *
* @param {number} time The time at which to evaluate the curve.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {number|Cartesian3} The modified result parameter or a new instance of the point on the curve at the given time.
- *
- * @exception {DeveloperError} time must be in the range [t0, tn], where t0
+ * @throws {DeveloperError} time must be in the range [t0, tn], where t0
* is the first element in the array times and tn is the last element
* in the array times.
*/
diff --git a/packages/engine/Source/Core/ManagedArray.js b/packages/engine/Source/Core/ManagedArray.js
index 9eeb280e5ffd..3155be6f8de5 100644
--- a/packages/engine/Source/Core/ManagedArray.js
+++ b/packages/engine/Source/Core/ManagedArray.js
@@ -3,11 +3,9 @@ import defaultValue from "./defaultValue.js";
/**
* A wrapper around arrays so that the internal length of the array can be manually managed.
- *
* @alias ManagedArray
- * @constructor
+ * @class
* @private
- *
* @param {number} [length=0] The initial length of the array.
*/
function ManagedArray(length) {
@@ -20,7 +18,6 @@ Object.defineProperties(ManagedArray.prototype, {
/**
* Gets or sets the length of the array.
* If the set length is greater than the length of the internal array, the internal array is resized.
- *
* @memberof ManagedArray.prototype
* @type {number}
*/
@@ -48,7 +45,6 @@ Object.defineProperties(ManagedArray.prototype, {
/**
* Gets the internal array.
- *
* @memberof ManagedArray.prototype
* @type {Array}
* @readonly
@@ -62,7 +58,6 @@ Object.defineProperties(ManagedArray.prototype, {
/**
* Gets the element at an index.
- *
* @param {number} index The index to get.
*/
ManagedArray.prototype.get = function (index) {
@@ -75,7 +70,6 @@ ManagedArray.prototype.get = function (index) {
/**
* Sets the element at an index. Resizes the array if index is greater than the length of the array.
- *
* @param {number} index The index to set.
* @param {*} element The element to set at index.
*/
@@ -92,7 +86,6 @@ ManagedArray.prototype.set = function (index, element) {
/**
* Returns the last element in the array without modifying the array.
- *
* @returns {*} The last element in the array.
*/
ManagedArray.prototype.peek = function () {
@@ -101,7 +94,6 @@ ManagedArray.prototype.peek = function () {
/**
* Push an element into the array.
- *
* @param {*} element The element to push.
*/
ManagedArray.prototype.push = function (element) {
@@ -111,7 +103,6 @@ ManagedArray.prototype.push = function (element) {
/**
* Pop an element from the array.
- *
* @returns {*} The last element in the array.
*/
ManagedArray.prototype.pop = function () {
@@ -125,7 +116,6 @@ ManagedArray.prototype.pop = function () {
/**
* Resize the internal array if length > _array.length.
- *
* @param {number} length The length.
*/
ManagedArray.prototype.reserve = function (length) {
@@ -140,7 +130,6 @@ ManagedArray.prototype.reserve = function (length) {
/**
* Resize the array.
- *
* @param {number} length The length.
*/
ManagedArray.prototype.resize = function (length) {
@@ -153,7 +142,6 @@ ManagedArray.prototype.resize = function (length) {
/**
* Trim the internal array to the specified length. Defaults to the current length.
- *
* @param {number} [length] The length.
*/
ManagedArray.prototype.trim = function (length) {
diff --git a/packages/engine/Source/Core/MapProjection.js b/packages/engine/Source/Core/MapProjection.js
index f630e69575d8..58364facc6dc 100644
--- a/packages/engine/Source/Core/MapProjection.js
+++ b/packages/engine/Source/Core/MapProjection.js
@@ -3,11 +3,9 @@ import DeveloperError from "./DeveloperError.js";
/**
* Defines how geodetic ellipsoid coordinates ({@link Cartographic}) project to a
* flat map like Cesium's 2D and Columbus View modes.
- *
* @alias MapProjection
- * @constructor
+ * @class
* @abstract
- *
* @see GeographicProjection
* @see WebMercatorProjection
*/
@@ -18,9 +16,7 @@ function MapProjection() {
Object.defineProperties(MapProjection.prototype, {
/**
* Gets the {@link Ellipsoid}.
- *
* @memberof MapProjection.prototype
- *
* @type {Ellipsoid}
* @readonly
*/
@@ -31,10 +27,8 @@ Object.defineProperties(MapProjection.prototype, {
/**
* Projects {@link Cartographic} coordinates, in radians, to projection-specific map coordinates, in meters.
- *
* @memberof MapProjection
* @function
- *
* @param {Cartographic} cartographic The coordinates to project.
* @param {Cartesian3} [result] An instance into which to copy the result. If this parameter is
* undefined, a new instance is created and returned.
@@ -47,10 +41,8 @@ MapProjection.prototype.project = DeveloperError.throwInstantiationError;
/**
* Unprojects projection-specific map {@link Cartesian3} coordinates, in meters, to {@link Cartographic}
* coordinates, in radians.
- *
* @memberof MapProjection
* @function
- *
* @param {Cartesian3} cartesian The Cartesian position to unproject with height (z) in meters.
* @param {Cartographic} [result] An instance into which to copy the result. If this parameter is
* undefined, a new instance is created and returned.
diff --git a/packages/engine/Source/Core/Math.js b/packages/engine/Source/Core/Math.js
index 59ae199d8dc0..a35ae8ac4968 100644
--- a/packages/engine/Source/Core/Math.js
+++ b/packages/engine/Source/Core/Math.js
@@ -6,7 +6,6 @@ import DeveloperError from "./DeveloperError.js";
/**
* Math functions.
- *
* @exports CesiumMath
* @alias Math
*/
@@ -200,7 +199,6 @@ CesiumMath.FOUR_GIGABYTES = 4 * 1024 * 1024 * 1024;
/**
* Returns the sign of the value; 1 if the value is positive, -1 if the value is
* negative, or 0 if the value is 0.
- *
* @function
* @param {number} value The value to return the sign of.
* @returns {number} The sign of value.
@@ -230,7 +228,6 @@ CesiumMath.signNotZero = function (value) {
* @param {number} value The scalar value in the range [-1.0, 1.0]
* @param {number} [rangeMaximum=255] The maximum value in the mapped range, 255 by default.
* @returns {number} A SNORM value, where 0 maps to -1.0 and rangeMaximum maps to 1.0.
- *
* @see CesiumMath.fromSNorm
*/
CesiumMath.toSNorm = function (value, rangeMaximum) {
@@ -245,7 +242,6 @@ CesiumMath.toSNorm = function (value, rangeMaximum) {
* @param {number} value SNORM value in the range [0, rangeMaximum]
* @param {number} [rangeMaximum=255] The maximum value in the SNORM range, 255 by default.
* @returns {number} Scalar in the range [-1.0, 1.0].
- *
* @see CesiumMath.toSNorm
*/
CesiumMath.fromSNorm = function (value, rangeMaximum) {
@@ -276,17 +272,16 @@ CesiumMath.normalize = function (value, rangeMinimum, rangeMaximum) {
* where e is Euler's number, approximately 2.71828183.
*
*
Special cases:
- *
- *
If the argument is NaN, then the result is NaN.
+ *
+ *
If the argument is NaN, then the result is NaN.
*
- *
If the argument is infinite, then the result is an infinity
- * with the same sign as the argument.
- *
- *
If the argument is zero, then the result is a zero with the
- * same sign as the argument.
- *
- *
+ *
If the argument is infinite, then the result is an infinity
+ * with the same sign as the argument.
*
+ *
If the argument is zero, then the result is a zero with the
+ * same sign as the argument.
+ *
+ *
* @function
* @param {number} value The number whose hyperbolic sine is to be returned.
* @returns {number} The hyperbolic sine of value.
@@ -302,15 +297,14 @@ CesiumMath.sinh = defaultValue(Math.sinh, function sinh(value) {
* where e is Euler's number, approximately 2.71828183.
*
*
Special cases:
- *
- *
If the argument is NaN, then the result is NaN.
- *
- *
If the argument is infinite, then the result is positive infinity.
+ *
+ *
If the argument is NaN, then the result is NaN.
*
- *
If the argument is zero, then the result is 1.0.
- *
- *
+ *
If the argument is infinite, then the result is positive infinity.
*
+ *
If the argument is zero, then the result is 1.0.
+ *
+ *
* @function
* @param {number} value The number whose hyperbolic cosine is to be returned.
* @returns {number} The hyperbolic cosine of value.
@@ -321,12 +315,10 @@ CesiumMath.cosh = defaultValue(Math.cosh, function cosh(value) {
/**
* Computes the linear interpolation of two values.
- *
* @param {number} p The start value to interpolate.
* @param {number} q The end value to interpolate.
* @param {number} time The time of interpolation generally in the range [0.0, 1.0].
* @returns {number} The linearly interpolated value.
- *
* @example
* const n = Cesium.Math.lerp(0.0, 2.0, 0.5); // returns 1.0
*/
@@ -336,7 +328,6 @@ CesiumMath.lerp = function (p, q, time) {
/**
* pi
- *
* @type {number}
* @constant
*/
@@ -344,7 +335,6 @@ CesiumMath.PI = Math.PI;
/**
* 1/pi
- *
* @type {number}
* @constant
*/
@@ -352,7 +342,6 @@ CesiumMath.ONE_OVER_PI = 1.0 / Math.PI;
/**
* pi/2
- *
* @type {number}
* @constant
*/
@@ -360,7 +349,6 @@ CesiumMath.PI_OVER_TWO = Math.PI / 2.0;
/**
* pi/3
- *
* @type {number}
* @constant
*/
@@ -368,7 +356,6 @@ CesiumMath.PI_OVER_THREE = Math.PI / 3.0;
/**
* pi/4
- *
* @type {number}
* @constant
*/
@@ -376,7 +363,6 @@ CesiumMath.PI_OVER_FOUR = Math.PI / 4.0;
/**
* pi/6
- *
* @type {number}
* @constant
*/
@@ -384,7 +370,6 @@ CesiumMath.PI_OVER_SIX = Math.PI / 6.0;
/**
* 3pi/2
- *
* @type {number}
* @constant
*/
@@ -392,7 +377,6 @@ CesiumMath.THREE_PI_OVER_TWO = (3.0 * Math.PI) / 2.0;
/**
* 2pi
- *
* @type {number}
* @constant
*/
@@ -400,7 +384,6 @@ CesiumMath.TWO_PI = 2.0 * Math.PI;
/**
* 1/2pi
- *
* @type {number}
* @constant
*/
@@ -408,7 +391,6 @@ CesiumMath.ONE_OVER_TWO_PI = 1.0 / (2.0 * Math.PI);
/**
* The number of radians in a degree.
- *
* @type {number}
* @constant
*/
@@ -416,7 +398,6 @@ CesiumMath.RADIANS_PER_DEGREE = Math.PI / 180.0;
/**
* The number of degrees in a radian.
- *
* @type {number}
* @constant
*/
@@ -424,7 +405,6 @@ CesiumMath.DEGREES_PER_RADIAN = 180.0 / Math.PI;
/**
* The number of radians in an arc second.
- *
* @type {number}
* @constant
*/
@@ -460,10 +440,8 @@ CesiumMath.toDegrees = function (radians) {
/**
* Converts a longitude value, in radians, to the range [-Math.PI, Math.PI).
- *
* @param {number} angle The longitude value, in radians, to convert to the range [-Math.PI, Math.PI).
* @returns {number} The equivalent longitude value in the range [-Math.PI, Math.PI).
- *
* @example
* // Convert 270 degrees to -90 degrees longitude
* const longitude = Cesium.Math.convertLongitudeRange(Cesium.Math.toRadians(270.0));
@@ -491,10 +469,8 @@ CesiumMath.convertLongitudeRange = function (angle) {
/**
* Convenience function that clamps a latitude value, in radians, to the range [-Math.PI/2, Math.PI/2).
* Useful for sanitizing data before use in objects requiring correct range.
- *
* @param {number} angle The latitude value, in radians, to clamp to the range [-Math.PI/2, Math.PI/2).
* @returns {number} The latitude value clamped to the range [-Math.PI/2, Math.PI/2).
- *
* @example
* // Clamp 108 degrees latitude to 90 degrees latitude
* const latitude = Cesium.Math.clampToLatitudeRange(Cesium.Math.toRadians(108.0));
@@ -515,7 +491,6 @@ CesiumMath.clampToLatitudeRange = function (angle) {
/**
* Produces an angle in the range -Pi <= angle <= Pi which is equivalent to the provided angle.
- *
* @param {number} angle in radians
* @returns {number} The angle in the range [-CesiumMath.PI, CesiumMath.PI].
*/
@@ -535,7 +510,6 @@ CesiumMath.negativePiToPi = function (angle) {
/**
* Produces an angle in the range 0 <= angle <= 2Pi which is equivalent to the provided angle.
- *
* @param {number} angle in radians
* @returns {number} The angle in the range [0, CesiumMath.TWO_PI].
*/
@@ -562,7 +536,6 @@ CesiumMath.zeroToTwoPi = function (angle) {
/**
* The modulo operation that also works for negative dividends.
- *
* @param {number} m The dividend.
* @param {number} n The divisor.
* @returns {number} The remainder.
@@ -593,13 +566,11 @@ CesiumMath.mod = function (m, n) {
* to avoid problems due to roundoff error when comparing floating-point values directly. The values are
* first compared using an absolute tolerance test. If that fails, a relative tolerance test is performed.
* Use this test if you are unsure of the magnitudes of left and right.
- *
* @param {number} left The first value to compare.
* @param {number} right The other value to compare.
* @param {number} [relativeEpsilon=0] The maximum inclusive delta between left and right for the relative tolerance test.
* @param {number} [absoluteEpsilon=relativeEpsilon] The maximum inclusive delta between left and right for the absolute tolerance test.
* @returns {boolean} true if the values are equal within the epsilon; otherwise, false.
- *
* @example
* const a = Cesium.Math.equalsEpsilon(0.0, 0.01, Cesium.Math.EPSILON2); // true
* const b = Cesium.Math.equalsEpsilon(0.0, 0.1, Cesium.Math.EPSILON2); // false
@@ -633,7 +604,6 @@ CesiumMath.equalsEpsilon = function (
/**
* Determines if the left value is less than the right value. If the two values are within
* absoluteEpsilon of each other, they are considered equal and this function returns false.
- *
* @param {number} left The first number to compare.
* @param {number} right The second number to compare.
* @param {number} absoluteEpsilon The absolute epsilon to use in comparison.
@@ -659,7 +629,6 @@ CesiumMath.lessThan = function (left, right, absoluteEpsilon) {
/**
* Determines if the left value is less than or equal to the right value. If the two values are within
* absoluteEpsilon of each other, they are considered equal and this function returns true.
- *
* @param {number} left The first number to compare.
* @param {number} right The second number to compare.
* @param {number} absoluteEpsilon The absolute epsilon to use in comparison.
@@ -684,7 +653,6 @@ CesiumMath.lessThanOrEquals = function (left, right, absoluteEpsilon) {
/**
* Determines if the left value is greater the right value. If the two values are within
* absoluteEpsilon of each other, they are considered equal and this function returns false.
- *
* @param {number} left The first number to compare.
* @param {number} right The second number to compare.
* @param {number} absoluteEpsilon The absolute epsilon to use in comparison.
@@ -710,7 +678,6 @@ CesiumMath.greaterThan = function (left, right, absoluteEpsilon) {
/**
* Determines if the left value is greater than or equal to the right value. If the two values are within
* absoluteEpsilon of each other, they are considered equal and this function returns true.
- *
* @param {number} left The first number to compare.
* @param {number} right The second number to compare.
* @param {number} absoluteEpsilon The absolute epsilon to use in comparison.
@@ -736,17 +703,12 @@ const factorials = [1];
/**
* Computes the factorial of the provided number.
- *
* @param {number} n The number whose factorial is to be computed.
* @returns {number} The factorial of the provided number or undefined if the number is less than 0.
- *
- * @exception {DeveloperError} A number greater than or equal to 0 is required.
- *
- *
+ * @throws {DeveloperError} A number greater than or equal to 0 is required.
* @example
* //Compute 7!, which is equal to 5040
* const computedFactorial = Cesium.Math.factorial(7);
- *
* @see {@link http://en.wikipedia.org/wiki/Factorial|Factorial on Wikipedia}
*/
CesiumMath.factorial = function (n) {
@@ -772,14 +734,11 @@ CesiumMath.factorial = function (n) {
/**
* Increments a number with a wrapping to a minimum value if the number exceeds the maximum value.
- *
* @param {number} [n] The number to be incremented.
* @param {number} [maximumValue] The maximum incremented value before rolling over to the minimum value.
* @param {number} [minimumValue=0.0] The number reset to after the maximum value has been exceeded.
* @returns {number} The incremented number.
- *
- * @exception {DeveloperError} Maximum value must be greater than minimum value.
- *
+ * @throws {DeveloperError} Maximum value must be greater than minimum value.
* @example
* const n = Cesium.Math.incrementWrap(5, 10, 0); // returns 6
* const m = Cesium.Math.incrementWrap(10, 10, 0); // returns 0
@@ -806,12 +765,9 @@ CesiumMath.incrementWrap = function (n, maximumValue, minimumValue) {
/**
* Determines if a non-negative integer is a power of two.
* The maximum allowed input is (2^32)-1 due to 32-bit bitwise operator limitation in Javascript.
- *
* @param {number} n The integer to test in the range [0, (2^32)-1].
* @returns {boolean} true if the number if a power of two; otherwise, false.
- *
- * @exception {DeveloperError} A number between 0 and (2^32)-1 is required.
- *
+ * @throws {DeveloperError} A number between 0 and (2^32)-1 is required.
* @example
* const t = Cesium.Math.isPowerOfTwo(16); // true
* const f = Cesium.Math.isPowerOfTwo(20); // false
@@ -829,12 +785,9 @@ CesiumMath.isPowerOfTwo = function (n) {
/**
* Computes the next power-of-two integer greater than or equal to the provided non-negative integer.
* The maximum allowed input is 2^31 due to 32-bit bitwise operator limitation in Javascript.
- *
* @param {number} n The integer to test in the range [0, 2^31].
* @returns {number} The next power-of-two integer.
- *
- * @exception {DeveloperError} A number between 0 and 2^31 is required.
- *
+ * @throws {DeveloperError} A number between 0 and 2^31 is required.
* @example
* const n = Cesium.Math.nextPowerOfTwo(29); // 32
* const m = Cesium.Math.nextPowerOfTwo(32); // 32
@@ -861,12 +814,9 @@ CesiumMath.nextPowerOfTwo = function (n) {
/**
* Computes the previous power-of-two integer less than or equal to the provided non-negative integer.
* The maximum allowed input is (2^32)-1 due to 32-bit bitwise operator limitation in Javascript.
- *
* @param {number} n The integer to test in the range [0, (2^32)-1].
* @returns {number} The previous power-of-two integer.
- *
- * @exception {DeveloperError} A number between 0 and (2^32)-1 is required.
- *
+ * @throws {DeveloperError} A number between 0 and (2^32)-1 is required.
* @example
* const n = Cesium.Math.previousPowerOfTwo(29); // 16
* const m = Cesium.Math.previousPowerOfTwo(32); // 32
@@ -893,7 +843,6 @@ CesiumMath.previousPowerOfTwo = function (n) {
/**
* Constraint a value to lie between two values.
- *
* @param {number} value The value to clamp.
* @param {number} min The minimum value.
* @param {number} max The maximum value.
@@ -914,7 +863,6 @@ let randomNumberGenerator = new MersenneTwister();
/**
* Sets the seed used by the random number generator
* in {@link CesiumMath#nextRandomNumber}.
- *
* @param {number} seed An integer used as the seed.
*/
CesiumMath.setRandomNumberSeed = function (seed) {
@@ -930,9 +878,7 @@ CesiumMath.setRandomNumberSeed = function (seed) {
/**
* Generates a random floating point number in the range of [0.0, 1.0)
* using a Mersenne twister.
- *
* @returns {number} A random number in the range of [0.0, 1.0).
- *
* @see CesiumMath.setRandomNumberSeed
* @see {@link http://en.wikipedia.org/wiki/Mersenne_twister|Mersenne twister on Wikipedia}
*/
@@ -942,7 +888,6 @@ CesiumMath.nextRandomNumber = function () {
/**
* Generates a random number between two numbers.
- *
* @param {number} min The minimum value.
* @param {number} max The maximum value.
* @returns {number} A random number between the min and max.
@@ -954,7 +899,6 @@ CesiumMath.randomBetween = function (min, max) {
/**
* Computes Math.acos(value), but first clamps value to the range [-1.0, 1.0]
* so that the function will never return NaN.
- *
* @param {number} value The value for which to compute acos.
* @returns {number} The acos of the value if the value is in the range [-1.0, 1.0], or the acos of -1.0 or 1.0,
* whichever is closer, if the value is outside the range.
@@ -971,7 +915,6 @@ CesiumMath.acosClamped = function (value) {
/**
* Computes Math.asin(value), but first clamps value to the range [-1.0, 1.0]
* so that the function will never return NaN.
- *
* @param {number} value The value for which to compute asin.
* @returns {number} The asin of the value if the value is in the range [-1.0, 1.0], or the asin of -1.0 or 1.0,
* whichever is closer, if the value is outside the range.
@@ -987,7 +930,6 @@ CesiumMath.asinClamped = function (value) {
/**
* Finds the chord length between two points given the circle's radius and the angle between the points.
- *
* @param {number} angle The angle between the two points.
* @param {number} radius The radius of the circle.
* @returns {number} The chord length.
@@ -1006,7 +948,6 @@ CesiumMath.chordLength = function (angle, radius) {
/**
* Finds the logarithm of a number to a base.
- *
* @param {number} number The number.
* @param {number} base The base.
* @returns {number} The result.
@@ -1026,7 +967,6 @@ CesiumMath.logBase = function (number, base) {
/**
* Finds the cube root of a number.
* Returns NaN if number is not provided.
- *
* @function
* @param {number} [number] The number.
* @returns {number} The result.
@@ -1038,7 +978,6 @@ CesiumMath.cbrt = defaultValue(Math.cbrt, function cbrt(number) {
/**
* Finds the base 2 logarithm of a number.
- *
* @function
* @param {number} number The number.
* @returns {number} The result.
@@ -1048,6 +987,8 @@ CesiumMath.log2 = defaultValue(Math.log2, function log2(number) {
});
/**
+ * @param distanceToCamera
+ * @param density
* @private
*/
CesiumMath.fog = function (distanceToCamera, density) {
@@ -1062,7 +1003,6 @@ CesiumMath.fog = function (distanceToCamera, density) {
* which in turn is based on "Efficient approximations for the arctangent function,"
* Rajan, S. Sichun Wang Inkol, R. Joyal, A., May 2006.
* Adapted from ShaderFastLibs under MIT License.
- *
* @param {number} x An input number in the range [-1, 1]
* @returns {number} An approximation of atan(x)
*/
@@ -1078,7 +1018,6 @@ CesiumMath.fastApproximateAtan = function (x) {
* Computes a fast approximation of Atan2(x, y) for arbitrary input scalars.
*
* Range reduction math based on nvidia's cg reference implementation: http://developer.download.nvidia.com/cg/atan2.html
- *
* @param {number} x An input number that isn't zero if y is zero.
* @param {number} y An input number that isn't zero if x is zero.
* @returns {number} An approximation of atan2(x, y)
diff --git a/packages/engine/Source/Core/Matrix2.js b/packages/engine/Source/Core/Matrix2.js
index 7f0cba621c0d..cb69e66c422b 100644
--- a/packages/engine/Source/Core/Matrix2.js
+++ b/packages/engine/Source/Core/Matrix2.js
@@ -8,14 +8,12 @@ import DeveloperError from "./DeveloperError.js";
* A 2x2 matrix, indexable as a column-major order array.
* Constructor parameters are in row-major order for code readability.
* @alias Matrix2
- * @constructor
+ * @class
* @implements {ArrayLike}
- *
* @param {number} [column0Row0=0.0] The value for column 0, row 0.
* @param {number} [column1Row0=0.0] The value for column 1, row 0.
* @param {number} [column0Row1=0.0] The value for column 0, row 1.
* @param {number} [column1Row1=0.0] The value for column 1, row 1.
- *
* @see Matrix2.fromArray
* @see Matrix2.fromColumnMajorArray
* @see Matrix2.fromRowMajorArray
@@ -40,11 +38,9 @@ Matrix2.packedLength = 4;
/**
* Stores the provided instance into the provided array.
- *
* @param {Matrix2} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
Matrix2.pack = function (value, array, startingIndex) {
@@ -65,7 +61,6 @@ Matrix2.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {Matrix2} [result] The object into which to store the result.
@@ -92,7 +87,6 @@ Matrix2.unpack = function (array, startingIndex, result) {
/**
* Flattens an array of Matrix2s into an array of components. The components
* are stored in column-major order.
- *
* @param {Matrix2[]} array The array of matrices to pack.
* @param {number[]} [result] The array onto which to store the result. If this is a typed array, it must have array.length * 4 components, else a {@link DeveloperError} will be thrown. If it is a regular array, it will be resized to have (array.length * 4) elements.
* @returns {number[]} The packed array.
@@ -124,7 +118,6 @@ Matrix2.packArray = function (array, result) {
/**
* Unpacks an array of column-major matrix components into an array of Matrix2s.
- *
* @param {number[]} array The array of components to unpack.
* @param {Matrix2[]} [result] The array onto which to store the result.
* @returns {Matrix2[]} The unpacked array.
@@ -154,7 +147,6 @@ Matrix2.unpackArray = function (array, result) {
/**
* Duplicates a Matrix2 instance.
- *
* @param {Matrix2} matrix The matrix to duplicate.
* @param {Matrix2} [result] The object onto which to store the result.
* @returns {Matrix2} The modified result parameter or a new Matrix2 instance if one was not provided. (Returns undefined if matrix is undefined)
@@ -175,13 +167,11 @@ Matrix2.clone = function (matrix, result) {
/**
* Creates a Matrix2 from 4 consecutive elements in an array.
- *
* @function
* @param {number[]} array The array whose 4 consecutive elements correspond to the positions of the matrix. Assumes column-major order.
* @param {number} [startingIndex=0] The offset into the array of the first element, which corresponds to first column first row position in the matrix.
* @param {Matrix2} [result] The object onto which to store the result.
* @returns {Matrix2} The modified result parameter or a new Matrix2 instance if one was not provided.
- *
* @example
* // Create the Matrix2:
* // [1.0, 2.0]
@@ -197,7 +187,6 @@ Matrix2.clone = function (matrix, result) {
Matrix2.fromArray = Matrix2.unpack;
/**
* Creates a Matrix2 instance from a column-major order array.
- *
* @param {number[]} values The column-major order array.
* @param {Matrix2} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix2} The modified result parameter, or a new Matrix2 instance if one was not provided.
@@ -213,7 +202,6 @@ Matrix2.fromColumnMajorArray = function (values, result) {
/**
* Creates a Matrix2 instance from a row-major order array.
* The resulting matrix will be in column-major order.
- *
* @param {number[]} values The row-major order array.
* @param {Matrix2} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix2} The modified result parameter, or a new Matrix2 instance if one was not provided.
@@ -235,11 +223,9 @@ Matrix2.fromRowMajorArray = function (values, result) {
/**
* Computes a Matrix2 instance representing a non-uniform scale.
- *
* @param {Cartesian2} scale The x and y scale factors.
* @param {Matrix2} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix2} The modified result parameter, or a new Matrix2 instance if one was not provided.
- *
* @example
* // Creates
* // [7.0, 0.0]
@@ -264,11 +250,9 @@ Matrix2.fromScale = function (scale, result) {
/**
* Computes a Matrix2 instance representing a uniform scale.
- *
* @param {number} scale The uniform scale factor.
* @param {Matrix2} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix2} The modified result parameter, or a new Matrix2 instance if one was not provided.
- *
* @example
* // Creates
* // [2.0, 0.0]
@@ -293,11 +277,9 @@ Matrix2.fromUniformScale = function (scale, result) {
/**
* Creates a rotation matrix.
- *
* @param {number} angle The angle, in radians, of the rotation. Positive angles are counterclockwise.
* @param {Matrix2} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix2} The modified result parameter, or a new Matrix2 instance if one was not provided.
- *
* @example
* // Rotate a point 45 degrees counterclockwise.
* const p = new Cesium.Cartesian2(5, 6);
@@ -325,7 +307,6 @@ Matrix2.fromRotation = function (angle, result) {
/**
* Creates an Array from the provided Matrix2 instance.
* The array will be in column-major order.
- *
* @param {Matrix2} matrix The matrix to use..
* @param {number[]} [result] The Array onto which to store the result.
* @returns {number[]} The modified Array parameter or a new Array instance if one was not provided.
@@ -347,14 +328,11 @@ Matrix2.toArray = function (matrix, result) {
/**
* Computes the array index of the element at the provided row and column.
- *
* @param {number} row The zero-based index of the row.
* @param {number} column The zero-based index of the column.
* @returns {number} The index of the element at the provided row and column.
- *
- * @exception {DeveloperError} row must be 0 or 1.
- * @exception {DeveloperError} column must be 0 or 1.
- *
+ * @throws {DeveloperError} row must be 0 or 1.
+ * @throws {DeveloperError} column must be 0 or 1.
* @example
* const myMatrix = new Cesium.Matrix2();
* const column1Row0Index = Cesium.Matrix2.getElementIndex(1, 0);
@@ -375,13 +353,11 @@ Matrix2.getElementIndex = function (column, row) {
/**
* Retrieves a copy of the matrix column at the provided index as a Cartesian2 instance.
- *
* @param {Matrix2} matrix The matrix to use.
* @param {number} index The zero-based index of the column to retrieve.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter.
- *
- * @exception {DeveloperError} index must be 0 or 1.
+ * @throws {DeveloperError} index must be 0 or 1.
*/
Matrix2.getColumn = function (matrix, index, result) {
//>>includeStart('debug', pragmas.debug);
@@ -404,14 +380,12 @@ Matrix2.getColumn = function (matrix, index, result) {
/**
* Computes a new matrix that replaces the specified column in the provided matrix with the provided Cartesian2 instance.
- *
* @param {Matrix2} matrix The matrix to use.
* @param {number} index The zero-based index of the column to set.
* @param {Cartesian2} cartesian The Cartesian whose values will be assigned to the specified column.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Matrix2} The modified result parameter.
- *
- * @exception {DeveloperError} index must be 0 or 1.
+ * @throws {DeveloperError} index must be 0 or 1.
*/
Matrix2.setColumn = function (matrix, index, cartesian, result) {
//>>includeStart('debug', pragmas.debug);
@@ -433,13 +407,11 @@ Matrix2.setColumn = function (matrix, index, cartesian, result) {
/**
* Retrieves a copy of the matrix row at the provided index as a Cartesian2 instance.
- *
* @param {Matrix2} matrix The matrix to use.
* @param {number} index The zero-based index of the row to retrieve.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter.
- *
- * @exception {DeveloperError} index must be 0 or 1.
+ * @throws {DeveloperError} index must be 0 or 1.
*/
Matrix2.getRow = function (matrix, index, result) {
//>>includeStart('debug', pragmas.debug);
@@ -461,14 +433,12 @@ Matrix2.getRow = function (matrix, index, result) {
/**
* Computes a new matrix that replaces the specified row in the provided matrix with the provided Cartesian2 instance.
- *
* @param {Matrix2} matrix The matrix to use.
* @param {number} index The zero-based index of the row to set.
* @param {Cartesian2} cartesian The Cartesian whose values will be assigned to the specified row.
* @param {Matrix2} result The object onto which to store the result.
* @returns {Matrix2} The modified result parameter.
- *
- * @exception {DeveloperError} index must be 0 or 1.
+ * @throws {DeveloperError} index must be 0 or 1.
*/
Matrix2.setRow = function (matrix, index, cartesian, result) {
//>>includeStart('debug', pragmas.debug);
@@ -492,12 +462,10 @@ const scaleScratch1 = new Cartesian2();
/**
* Computes a new matrix that replaces the scale with the provided scale.
* This assumes the matrix is an affine transformation.
- *
* @param {Matrix2} matrix The matrix to use.
* @param {Cartesian2} scale The scale that replaces the scale of the provided matrix.
* @param {Matrix2} result The object onto which to store the result.
* @returns {Matrix2} The modified result parameter.
- *
* @see Matrix2.setUniformScale
* @see Matrix2.fromScale
* @see Matrix2.fromUniformScale
@@ -529,12 +497,10 @@ const scaleScratch2 = new Cartesian2();
/**
* Computes a new matrix that replaces the scale with the provided uniform scale.
* This assumes the matrix is an affine transformation.
- *
* @param {Matrix2} matrix The matrix to use.
* @param {number} scale The uniform scale that replaces the scale of the provided matrix.
* @param {Matrix2} result The object onto which to store the result.
* @returns {Matrix2} The modified result parameter.
- *
* @see Matrix2.setScale
* @see Matrix2.fromScale
* @see Matrix2.fromUniformScale
@@ -565,11 +531,9 @@ const scratchColumn = new Cartesian2();
/**
* Extracts the non-uniform scale assuming the matrix is an affine transformation.
- *
* @param {Matrix2} matrix The matrix.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter.
- *
* @see Matrix2.multiplyByScale
* @see Matrix2.multiplyByUniformScale
* @see Matrix2.fromScale
@@ -597,7 +561,6 @@ const scaleScratch3 = new Cartesian2();
/**
* Computes the maximum scale assuming the matrix is an affine transformation.
* The maximum scale is the maximum length of the column vectors.
- *
* @param {Matrix2} matrix The matrix.
* @returns {number} The maximum scale.
*/
@@ -610,12 +573,10 @@ const scaleScratch4 = new Cartesian2();
/**
* Sets the rotation assuming the matrix is an affine transformation.
- *
* @param {Matrix2} matrix The matrix.
* @param {Matrix2} rotation The rotation matrix.
* @param {Matrix2} result The object onto which to store the result.
* @returns {Matrix2} The modified result parameter.
- *
* @see Matrix2.fromRotation
* @see Matrix2.getRotation
*/
@@ -639,11 +600,9 @@ const scaleScratch5 = new Cartesian2();
/**
* Extracts the rotation matrix assuming the matrix is an affine transformation.
- *
* @param {Matrix2} matrix The matrix.
* @param {Matrix2} result The object onto which to store the result.
* @returns {Matrix2} The modified result parameter.
- *
* @see Matrix2.setRotation
* @see Matrix2.fromRotation
*/
@@ -665,7 +624,6 @@ Matrix2.getRotation = function (matrix, result) {
/**
* Computes the product of two matrices.
- *
* @param {Matrix2} left The first matrix.
* @param {Matrix2} right The second matrix.
* @param {Matrix2} result The object onto which to store the result.
@@ -692,7 +650,6 @@ Matrix2.multiply = function (left, right, result) {
/**
* Computes the sum of two matrices.
- *
* @param {Matrix2} left The first matrix.
* @param {Matrix2} right The second matrix.
* @param {Matrix2} result The object onto which to store the result.
@@ -714,7 +671,6 @@ Matrix2.add = function (left, right, result) {
/**
* Computes the difference of two matrices.
- *
* @param {Matrix2} left The first matrix.
* @param {Matrix2} right The second matrix.
* @param {Matrix2} result The object onto which to store the result.
@@ -736,7 +692,6 @@ Matrix2.subtract = function (left, right, result) {
/**
* Computes the product of a matrix and a column vector.
- *
* @param {Matrix2} matrix The matrix.
* @param {Cartesian2} cartesian The column.
* @param {Cartesian2} result The object onto which to store the result.
@@ -759,7 +714,6 @@ Matrix2.multiplyByVector = function (matrix, cartesian, result) {
/**
* Computes the product of a matrix and a scalar.
- *
* @param {Matrix2} matrix The matrix.
* @param {number} scalar The number to multiply by.
* @param {Matrix2} result The object onto which to store the result.
@@ -781,17 +735,13 @@ Matrix2.multiplyByScalar = function (matrix, scalar, result) {
/**
* Computes the product of a matrix times a (non-uniform) scale, as if the scale were a scale matrix.
- *
* @param {Matrix2} matrix The matrix on the left-hand side.
* @param {Cartesian2} scale The non-uniform scale on the right-hand side.
* @param {Matrix2} result The object onto which to store the result.
* @returns {Matrix2} The modified result parameter.
- *
- *
* @example
* // Instead of Cesium.Matrix2.multiply(m, Cesium.Matrix2.fromScale(scale), m);
* Cesium.Matrix2.multiplyByScale(m, scale, m);
- *
* @see Matrix2.multiplyByUniformScale
* @see Matrix2.fromScale
* @see Matrix2.fromUniformScale
@@ -816,16 +766,13 @@ Matrix2.multiplyByScale = function (matrix, scale, result) {
/**
* Computes the product of a matrix times a uniform scale, as if the scale were a scale matrix.
- *
* @param {Matrix2} matrix The matrix on the left-hand side.
* @param {number} scale The uniform scale on the right-hand side.
* @param {Matrix2} result The object onto which to store the result.
* @returns {Matrix2} The modified result parameter.
- *
* @example
* // Instead of Cesium.Matrix2.multiply(m, Cesium.Matrix2.fromUniformScale(scale), m);
* Cesium.Matrix2.multiplyByUniformScale(m, scale, m);
- *
* @see Matrix2.multiplyByScale
* @see Matrix2.fromScale
* @see Matrix2.fromUniformScale
@@ -850,7 +797,6 @@ Matrix2.multiplyByUniformScale = function (matrix, scale, result) {
/**
* Creates a negated copy of the provided matrix.
- *
* @param {Matrix2} matrix The matrix to negate.
* @param {Matrix2} result The object onto which to store the result.
* @returns {Matrix2} The modified result parameter.
@@ -870,7 +816,6 @@ Matrix2.negate = function (matrix, result) {
/**
* Computes the transpose of the provided matrix.
- *
* @param {Matrix2} matrix The matrix to transpose.
* @param {Matrix2} result The object onto which to store the result.
* @returns {Matrix2} The modified result parameter.
@@ -895,7 +840,6 @@ Matrix2.transpose = function (matrix, result) {
/**
* Computes a matrix, which contains the absolute (unsigned) values of the provided matrix's elements.
- *
* @param {Matrix2} matrix The matrix with signed elements.
* @param {Matrix2} result The object onto which to store the result.
* @returns {Matrix2} The modified result parameter.
@@ -917,7 +861,6 @@ Matrix2.abs = function (matrix, result) {
/**
* Compares the provided matrices componentwise and returns
* true if they are equal, false otherwise.
- *
* @param {Matrix2} [left] The first matrix.
* @param {Matrix2} [right] The second matrix.
* @returns {boolean} true if left and right are equal, false otherwise.
@@ -935,6 +878,9 @@ Matrix2.equals = function (left, right) {
};
/**
+ * @param matrix
+ * @param array
+ * @param offset
* @private
*/
Matrix2.equalsArray = function (matrix, array, offset) {
@@ -950,7 +896,6 @@ Matrix2.equalsArray = function (matrix, array, offset) {
* Compares the provided matrices componentwise and returns
* true if they are within the provided epsilon,
* false otherwise.
- *
* @param {Matrix2} [left] The first matrix.
* @param {Matrix2} [right] The second matrix.
* @param {number} [epsilon=0] The epsilon to use for equality testing.
@@ -971,7 +916,6 @@ Matrix2.equalsEpsilon = function (left, right, epsilon) {
/**
* An immutable Matrix2 instance initialized to the identity matrix.
- *
* @type {Matrix2}
* @constant
*/
@@ -979,7 +923,6 @@ Matrix2.IDENTITY = Object.freeze(new Matrix2(1.0, 0.0, 0.0, 1.0));
/**
* An immutable Matrix2 instance initialized to the zero matrix.
- *
* @type {Matrix2}
* @constant
*/
@@ -987,10 +930,8 @@ Matrix2.ZERO = Object.freeze(new Matrix2(0.0, 0.0, 0.0, 0.0));
/**
* The index into Matrix2 for column 0, row 0.
- *
* @type {number}
* @constant
- *
* @example
* const matrix = new Cesium.Matrix2();
* matrix[Cesium.Matrix2.COLUMN0ROW0] = 5.0; // set column 0, row 0 to 5.0
@@ -999,10 +940,8 @@ Matrix2.COLUMN0ROW0 = 0;
/**
* The index into Matrix2 for column 0, row 1.
- *
* @type {number}
* @constant
- *
* @example
* const matrix = new Cesium.Matrix2();
* matrix[Cesium.Matrix2.COLUMN0ROW1] = 5.0; // set column 0, row 1 to 5.0
@@ -1011,10 +950,8 @@ Matrix2.COLUMN0ROW1 = 1;
/**
* The index into Matrix2 for column 1, row 0.
- *
* @type {number}
* @constant
- *
* @example
* const matrix = new Cesium.Matrix2();
* matrix[Cesium.Matrix2.COLUMN1ROW0] = 5.0; // set column 1, row 0 to 5.0
@@ -1023,10 +960,8 @@ Matrix2.COLUMN1ROW0 = 2;
/**
* The index into Matrix2 for column 1, row 1.
- *
* @type {number}
* @constant
- *
* @example
* const matrix = new Cesium.Matrix2();
* matrix[Cesium.Matrix2.COLUMN1ROW1] = 5.0; // set column 1, row 1 to 5.0
@@ -1037,7 +972,6 @@ Object.defineProperties(Matrix2.prototype, {
/**
* Gets the number of items in the collection.
* @memberof Matrix2.prototype
- *
* @type {number}
*/
length: {
@@ -1049,7 +983,6 @@ Object.defineProperties(Matrix2.prototype, {
/**
* Duplicates the provided Matrix2 instance.
- *
* @param {Matrix2} [result] The object onto which to store the result.
* @returns {Matrix2} The modified result parameter or a new Matrix2 instance if one was not provided.
*/
@@ -1060,7 +993,6 @@ Matrix2.prototype.clone = function (result) {
/**
* Compares this matrix to the provided matrix componentwise and returns
* true if they are equal, false otherwise.
- *
* @param {Matrix2} [right] The right hand side matrix.
* @returns {boolean} true if they are equal, false otherwise.
*/
@@ -1072,7 +1004,6 @@ Matrix2.prototype.equals = function (right) {
* Compares this matrix to the provided matrix componentwise and returns
* true if they are within the provided epsilon,
* false otherwise.
- *
* @param {Matrix2} [right] The right hand side matrix.
* @param {number} [epsilon=0] The epsilon to use for equality testing.
* @returns {boolean} true if they are within the provided epsilon, false otherwise.
@@ -1084,7 +1015,6 @@ Matrix2.prototype.equalsEpsilon = function (right, epsilon) {
/**
* Creates a string representing this Matrix with each row being
* on a separate line and in the format '(column0, column1)'.
- *
* @returns {string} A string representing the provided Matrix with each row being on a separate line and in the format '(column0, column1)'.
*/
Matrix2.prototype.toString = function () {
diff --git a/packages/engine/Source/Core/Matrix3.js b/packages/engine/Source/Core/Matrix3.js
index 80b4a5185c24..c57bbfd97fee 100644
--- a/packages/engine/Source/Core/Matrix3.js
+++ b/packages/engine/Source/Core/Matrix3.js
@@ -9,9 +9,8 @@ import CesiumMath from "./Math.js";
* A 3x3 matrix, indexable as a column-major order array.
* Constructor parameters are in row-major order for code readability.
* @alias Matrix3
- * @constructor
+ * @class
* @implements {ArrayLike}
- *
* @param {number} [column0Row0=0.0] The value for column 0, row 0.
* @param {number} [column1Row0=0.0] The value for column 1, row 0.
* @param {number} [column2Row0=0.0] The value for column 2, row 0.
@@ -21,7 +20,6 @@ import CesiumMath from "./Math.js";
* @param {number} [column0Row2=0.0] The value for column 0, row 2.
* @param {number} [column1Row2=0.0] The value for column 1, row 2.
* @param {number} [column2Row2=0.0] The value for column 2, row 2.
- *
* @see Matrix3.fromArray
* @see Matrix3.fromColumnMajorArray
* @see Matrix3.fromRowMajorArray
@@ -66,11 +64,9 @@ Matrix3.packedLength = 9;
/**
* Stores the provided instance into the provided array.
- *
* @param {Matrix3} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
Matrix3.pack = function (value, array, startingIndex) {
@@ -96,7 +92,6 @@ Matrix3.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {Matrix3} [result] The object into which to store the result.
@@ -128,7 +123,6 @@ Matrix3.unpack = function (array, startingIndex, result) {
/**
* Flattens an array of Matrix3s into an array of components. The components
* are stored in column-major order.
- *
* @param {Matrix3[]} array The array of matrices to pack.
* @param {number[]} [result] The array onto which to store the result. If this is a typed array, it must have array.length * 9 components, else a {@link DeveloperError} will be thrown. If it is a regular array, it will be resized to have (array.length * 9) elements.
* @returns {number[]} The packed array.
@@ -160,7 +154,6 @@ Matrix3.packArray = function (array, result) {
/**
* Unpacks an array of column-major matrix components into an array of Matrix3s.
- *
* @param {number[]} array The array of components to unpack.
* @param {Matrix3[]} [result] The array onto which to store the result.
* @returns {Matrix3[]} The unpacked array.
@@ -190,7 +183,6 @@ Matrix3.unpackArray = function (array, result) {
/**
* Duplicates a Matrix3 instance.
- *
* @param {Matrix3} matrix The matrix to duplicate.
* @param {Matrix3} [result] The object onto which to store the result.
* @returns {Matrix3} The modified result parameter or a new Matrix3 instance if one was not provided. (Returns undefined if matrix is undefined)
@@ -226,13 +218,11 @@ Matrix3.clone = function (matrix, result) {
/**
* Creates a Matrix3 from 9 consecutive elements in an array.
- *
* @function
* @param {number[]} array The array whose 9 consecutive elements correspond to the positions of the matrix. Assumes column-major order.
* @param {number} [startingIndex=0] The offset into the array of the first element, which corresponds to first column first row position in the matrix.
* @param {Matrix3} [result] The object onto which to store the result.
* @returns {Matrix3} The modified result parameter or a new Matrix3 instance if one was not provided.
- *
* @example
* // Create the Matrix3:
* // [1.0, 2.0, 3.0]
@@ -250,7 +240,6 @@ Matrix3.fromArray = Matrix3.unpack;
/**
* Creates a Matrix3 instance from a column-major order array.
- *
* @param {number[]} values The column-major order array.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.
@@ -266,7 +255,6 @@ Matrix3.fromColumnMajorArray = function (values, result) {
/**
* Creates a Matrix3 instance from a row-major order array.
* The resulting matrix will be in column-major order.
- *
* @param {number[]} values The row-major order array.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.
@@ -303,7 +291,6 @@ Matrix3.fromRowMajorArray = function (values, result) {
/**
* Computes a 3x3 rotation matrix from the provided quaternion.
- *
* @param {Quaternion} quaternion the quaternion to use.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The 3x3 rotation matrix from this quaternion.
@@ -353,7 +340,6 @@ Matrix3.fromQuaternion = function (quaternion, result) {
/**
* Computes a 3x3 rotation matrix from the provided headingPitchRoll. (see http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles )
- *
* @param {HeadingPitchRoll} headingPitchRoll the headingPitchRoll to use.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The 3x3 rotation matrix from this headingPitchRoll.
@@ -399,11 +385,9 @@ Matrix3.fromHeadingPitchRoll = function (headingPitchRoll, result) {
/**
* Computes a Matrix3 instance representing a non-uniform scale.
- *
* @param {Cartesian3} scale The x, y, and z scale factors.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.
- *
* @example
* // Creates
* // [7.0, 0.0, 0.0]
@@ -434,11 +418,9 @@ Matrix3.fromScale = function (scale, result) {
/**
* Computes a Matrix3 instance representing a uniform scale.
- *
* @param {number} scale The uniform scale factor.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.
- *
* @example
* // Creates
* // [2.0, 0.0, 0.0]
@@ -469,11 +451,9 @@ Matrix3.fromUniformScale = function (scale, result) {
/**
* Computes a Matrix3 instance representing the cross product equivalent matrix of a Cartesian3 vector.
- *
* @param {Cartesian3} vector the vector on the left hand side of the cross product operation.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.
- *
* @example
* // Creates
* // [0.0, -9.0, 8.0]
@@ -514,11 +494,9 @@ Matrix3.fromCrossProduct = function (vector, result) {
/**
* Creates a rotation matrix around the x-axis.
- *
* @param {number} angle The angle, in radians, of the rotation. Positive angles are counterclockwise.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.
- *
* @example
* // Rotate a point 45 degrees counterclockwise around the x-axis.
* const p = new Cesium.Cartesian3(5, 6, 7);
@@ -562,11 +540,9 @@ Matrix3.fromRotationX = function (angle, result) {
/**
* Creates a rotation matrix around the y-axis.
- *
* @param {number} angle The angle, in radians, of the rotation. Positive angles are counterclockwise.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.
- *
* @example
* // Rotate a point 45 degrees counterclockwise around the y-axis.
* const p = new Cesium.Cartesian3(5, 6, 7);
@@ -610,11 +586,9 @@ Matrix3.fromRotationY = function (angle, result) {
/**
* Creates a rotation matrix around the z-axis.
- *
* @param {number} angle The angle, in radians, of the rotation. Positive angles are counterclockwise.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.
- *
* @example
* // Rotate a point 45 degrees counterclockwise around the z-axis.
* const p = new Cesium.Cartesian3(5, 6, 7);
@@ -659,7 +633,6 @@ Matrix3.fromRotationZ = function (angle, result) {
/**
* Creates an Array from the provided Matrix3 instance.
* The array will be in column-major order.
- *
* @param {Matrix3} matrix The matrix to use..
* @param {number[]} [result] The Array onto which to store the result.
* @returns {number[]} The modified Array parameter or a new Array instance if one was not provided.
@@ -696,14 +669,11 @@ Matrix3.toArray = function (matrix, result) {
/**
* Computes the array index of the element at the provided row and column.
- *
* @param {number} column The zero-based index of the column.
* @param {number} row The zero-based index of the row.
* @returns {number} The index of the element at the provided row and column.
- *
- * @exception {DeveloperError} row must be 0, 1, or 2.
- * @exception {DeveloperError} column must be 0, 1, or 2.
- *
+ * @throws {DeveloperError} row must be 0, 1, or 2.
+ * @throws {DeveloperError} column must be 0, 1, or 2.
* @example
* const myMatrix = new Cesium.Matrix3();
* const column1Row0Index = Cesium.Matrix3.getElementIndex(1, 0);
@@ -723,13 +693,11 @@ Matrix3.getElementIndex = function (column, row) {
/**
* Retrieves a copy of the matrix column at the provided index as a Cartesian3 instance.
- *
* @param {Matrix3} matrix The matrix to use.
* @param {number} index The zero-based index of the column to retrieve.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
- *
- * @exception {DeveloperError} index must be 0, 1, or 2.
+ * @throws {DeveloperError} index must be 0, 1, or 2.
*/
Matrix3.getColumn = function (matrix, index, result) {
//>>includeStart('debug', pragmas.debug);
@@ -752,14 +720,12 @@ Matrix3.getColumn = function (matrix, index, result) {
/**
* Computes a new matrix that replaces the specified column in the provided matrix with the provided Cartesian3 instance.
- *
* @param {Matrix3} matrix The matrix to use.
* @param {number} index The zero-based index of the column to set.
* @param {Cartesian3} cartesian The Cartesian whose values will be assigned to the specified column.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
- *
- * @exception {DeveloperError} index must be 0, 1, or 2.
+ * @throws {DeveloperError} index must be 0, 1, or 2.
*/
Matrix3.setColumn = function (matrix, index, cartesian, result) {
//>>includeStart('debug', pragmas.debug);
@@ -780,13 +746,11 @@ Matrix3.setColumn = function (matrix, index, cartesian, result) {
/**
* Retrieves a copy of the matrix row at the provided index as a Cartesian3 instance.
- *
* @param {Matrix3} matrix The matrix to use.
* @param {number} index The zero-based index of the row to retrieve.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
- *
- * @exception {DeveloperError} index must be 0, 1, or 2.
+ * @throws {DeveloperError} index must be 0, 1, or 2.
*/
Matrix3.getRow = function (matrix, index, result) {
//>>includeStart('debug', pragmas.debug);
@@ -808,14 +772,12 @@ Matrix3.getRow = function (matrix, index, result) {
/**
* Computes a new matrix that replaces the specified row in the provided matrix with the provided Cartesian3 instance.
- *
* @param {Matrix3} matrix The matrix to use.
* @param {number} index The zero-based index of the row to set.
* @param {Cartesian3} cartesian The Cartesian whose values will be assigned to the specified row.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
- *
- * @exception {DeveloperError} index must be 0, 1, or 2.
+ * @throws {DeveloperError} index must be 0, 1, or 2.
*/
Matrix3.setRow = function (matrix, index, cartesian, result) {
//>>includeStart('debug', pragmas.debug);
@@ -838,12 +800,10 @@ const scaleScratch1 = new Cartesian3();
/**
* Computes a new matrix that replaces the scale with the provided scale.
* This assumes the matrix is an affine transformation.
- *
* @param {Matrix3} matrix The matrix to use.
* @param {Cartesian3} scale The scale that replaces the scale of the provided matrix.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
- *
* @see Matrix3.setUniformScale
* @see Matrix3.fromScale
* @see Matrix3.fromUniformScale
@@ -881,12 +841,10 @@ const scaleScratch2 = new Cartesian3();
/**
* Computes a new matrix that replaces the scale with the provided uniform scale.
* This assumes the matrix is an affine transformation.
- *
* @param {Matrix3} matrix The matrix to use.
* @param {number} scale The uniform scale that replaces the scale of the provided matrix.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
- *
* @see Matrix3.setScale
* @see Matrix3.fromScale
* @see Matrix3.fromUniformScale
@@ -923,11 +881,9 @@ const scratchColumn = new Cartesian3();
/**
* Extracts the non-uniform scale assuming the matrix is an affine transformation.
- *
* @param {Matrix3} matrix The matrix.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
- *
* @see Matrix3.multiplyByScale
* @see Matrix3.multiplyByUniformScale
* @see Matrix3.fromScale
@@ -958,7 +914,6 @@ const scaleScratch3 = new Cartesian3();
/**
* Computes the maximum scale assuming the matrix is an affine transformation.
* The maximum scale is the maximum length of the column vectors.
- *
* @param {Matrix3} matrix The matrix.
* @returns {number} The maximum scale.
*/
@@ -971,12 +926,10 @@ const scaleScratch4 = new Cartesian3();
/**
* Sets the rotation assuming the matrix is an affine transformation.
- *
* @param {Matrix3} matrix The matrix.
* @param {Matrix3} rotation The rotation matrix.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
- *
* @see Matrix3.getRotation
*/
Matrix3.setRotation = function (matrix, rotation, result) {
@@ -1004,11 +957,9 @@ const scaleScratch5 = new Cartesian3();
/**
* Extracts the rotation matrix assuming the matrix is an affine transformation.
- *
* @param {Matrix3} matrix The matrix.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
- *
* @see Matrix3.setRotation
*/
Matrix3.getRotation = function (matrix, result) {
@@ -1034,7 +985,6 @@ Matrix3.getRotation = function (matrix, result) {
/**
* Computes the product of two matrices.
- *
* @param {Matrix3} left The first matrix.
* @param {Matrix3} right The second matrix.
* @param {Matrix3} result The object onto which to store the result.
@@ -1082,7 +1032,6 @@ Matrix3.multiply = function (left, right, result) {
/**
* Computes the sum of two matrices.
- *
* @param {Matrix3} left The first matrix.
* @param {Matrix3} right The second matrix.
* @param {Matrix3} result The object onto which to store the result.
@@ -1109,7 +1058,6 @@ Matrix3.add = function (left, right, result) {
/**
* Computes the difference of two matrices.
- *
* @param {Matrix3} left The first matrix.
* @param {Matrix3} right The second matrix.
* @param {Matrix3} result The object onto which to store the result.
@@ -1136,7 +1084,6 @@ Matrix3.subtract = function (left, right, result) {
/**
* Computes the product of a matrix and a column vector.
- *
* @param {Matrix3} matrix The matrix.
* @param {Cartesian3} cartesian The column.
* @param {Cartesian3} result The object onto which to store the result.
@@ -1165,7 +1112,6 @@ Matrix3.multiplyByVector = function (matrix, cartesian, result) {
/**
* Computes the product of a matrix and a scalar.
- *
* @param {Matrix3} matrix The matrix.
* @param {number} scalar The number to multiply by.
* @param {Matrix3} result The object onto which to store the result.
@@ -1192,17 +1138,13 @@ Matrix3.multiplyByScalar = function (matrix, scalar, result) {
/**
* Computes the product of a matrix times a (non-uniform) scale, as if the scale were a scale matrix.
- *
* @param {Matrix3} matrix The matrix on the left-hand side.
* @param {Cartesian3} scale The non-uniform scale on the right-hand side.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
- *
- *
* @example
* // Instead of Cesium.Matrix3.multiply(m, Cesium.Matrix3.fromScale(scale), m);
* Cesium.Matrix3.multiplyByScale(m, scale, m);
- *
* @see Matrix3.multiplyByUniformScale
* @see Matrix3.fromScale
* @see Matrix3.fromUniformScale
@@ -1232,16 +1174,13 @@ Matrix3.multiplyByScale = function (matrix, scale, result) {
/**
* Computes the product of a matrix times a uniform scale, as if the scale were a scale matrix.
- *
* @param {Matrix3} matrix The matrix on the left-hand side.
* @param {number} scale The uniform scale on the right-hand side.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
- *
* @example
* // Instead of Cesium.Matrix3.multiply(m, Cesium.Matrix3.fromUniformScale(scale), m);
* Cesium.Matrix3.multiplyByUniformScale(m, scale, m);
- *
* @see Matrix3.multiplyByScale
* @see Matrix3.fromScale
* @see Matrix3.fromUniformScale
@@ -1271,7 +1210,6 @@ Matrix3.multiplyByUniformScale = function (matrix, scale, result) {
/**
* Creates a negated copy of the provided matrix.
- *
* @param {Matrix3} matrix The matrix to negate.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
@@ -1296,7 +1234,6 @@ Matrix3.negate = function (matrix, result) {
/**
* Computes the transpose of the provided matrix.
- *
* @param {Matrix3} matrix The matrix to transpose.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
@@ -1427,11 +1364,9 @@ const jMatrixTranspose = new Matrix3();
* The values along the diagonal of the diagonal matrix are the eigenvalues. The columns
* of the unitary matrix are the corresponding eigenvectors.
*
- *
* @param {Matrix3} matrix The matrix to decompose into diagonal and unitary matrix. Expected to be symmetric.
* @param {object} [result] An object with unitary and diagonal properties which are matrices onto which to store the result.
* @returns {object} An object with unitary and diagonal properties which are the unitary and diagonal matrices, respectively.
- *
* @example
* const a = //... symetric matrix
* const result = {
@@ -1492,7 +1427,6 @@ Matrix3.computeEigenDecomposition = function (matrix, result) {
/**
* Computes a matrix, which contains the absolute (unsigned) values of the provided matrix's elements.
- *
* @param {Matrix3} matrix The matrix with signed elements.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
@@ -1518,7 +1452,6 @@ Matrix3.abs = function (matrix, result) {
/**
* Computes the determinant of the provided matrix.
- *
* @param {Matrix3} matrix The matrix to use.
* @returns {number} The value of the determinant of the matrix.
*/
@@ -1546,12 +1479,10 @@ Matrix3.determinant = function (matrix) {
/**
* Computes the inverse of the provided matrix.
- *
* @param {Matrix3} matrix The matrix to invert.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
- *
- * @exception {DeveloperError} matrix is not invertible.
+ * @throws {DeveloperError} matrix is not invertible.
*/
Matrix3.inverse = function (matrix, result) {
//>>includeStart('debug', pragmas.debug);
@@ -1595,7 +1526,6 @@ const scratchTransposeMatrix = new Matrix3();
/**
* Computes the inverse transpose of a matrix.
- *
* @param {Matrix3} matrix The matrix to transpose and invert.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
@@ -1615,7 +1545,6 @@ Matrix3.inverseTranspose = function (matrix, result) {
/**
* Compares the provided matrices componentwise and returns
* true if they are equal, false otherwise.
- *
* @param {Matrix3} [left] The first matrix.
* @param {Matrix3} [right] The second matrix.
* @returns {boolean} true if left and right are equal, false otherwise.
@@ -1641,7 +1570,6 @@ Matrix3.equals = function (left, right) {
* Compares the provided matrices componentwise and returns
* true if they are within the provided epsilon,
* false otherwise.
- *
* @param {Matrix3} [left] The first matrix.
* @param {Matrix3} [right] The second matrix.
* @param {number} [epsilon=0] The epsilon to use for equality testing.
@@ -1668,7 +1596,6 @@ Matrix3.equalsEpsilon = function (left, right, epsilon) {
/**
* An immutable Matrix3 instance initialized to the identity matrix.
- *
* @type {Matrix3}
* @constant
*/
@@ -1678,7 +1605,6 @@ Matrix3.IDENTITY = Object.freeze(
/**
* An immutable Matrix3 instance initialized to the zero matrix.
- *
* @type {Matrix3}
* @constant
*/
@@ -1688,7 +1614,6 @@ Matrix3.ZERO = Object.freeze(
/**
* The index into Matrix3 for column 0, row 0.
- *
* @type {number}
* @constant
*/
@@ -1696,7 +1621,6 @@ Matrix3.COLUMN0ROW0 = 0;
/**
* The index into Matrix3 for column 0, row 1.
- *
* @type {number}
* @constant
*/
@@ -1704,7 +1628,6 @@ Matrix3.COLUMN0ROW1 = 1;
/**
* The index into Matrix3 for column 0, row 2.
- *
* @type {number}
* @constant
*/
@@ -1712,7 +1635,6 @@ Matrix3.COLUMN0ROW2 = 2;
/**
* The index into Matrix3 for column 1, row 0.
- *
* @type {number}
* @constant
*/
@@ -1720,7 +1642,6 @@ Matrix3.COLUMN1ROW0 = 3;
/**
* The index into Matrix3 for column 1, row 1.
- *
* @type {number}
* @constant
*/
@@ -1728,7 +1649,6 @@ Matrix3.COLUMN1ROW1 = 4;
/**
* The index into Matrix3 for column 1, row 2.
- *
* @type {number}
* @constant
*/
@@ -1736,7 +1656,6 @@ Matrix3.COLUMN1ROW2 = 5;
/**
* The index into Matrix3 for column 2, row 0.
- *
* @type {number}
* @constant
*/
@@ -1744,7 +1663,6 @@ Matrix3.COLUMN2ROW0 = 6;
/**
* The index into Matrix3 for column 2, row 1.
- *
* @type {number}
* @constant
*/
@@ -1752,7 +1670,6 @@ Matrix3.COLUMN2ROW1 = 7;
/**
* The index into Matrix3 for column 2, row 2.
- *
* @type {number}
* @constant
*/
@@ -1762,7 +1679,6 @@ Object.defineProperties(Matrix3.prototype, {
/**
* Gets the number of items in the collection.
* @memberof Matrix3.prototype
- *
* @type {number}
*/
length: {
@@ -1774,7 +1690,6 @@ Object.defineProperties(Matrix3.prototype, {
/**
* Duplicates the provided Matrix3 instance.
- *
* @param {Matrix3} [result] The object onto which to store the result.
* @returns {Matrix3} The modified result parameter or a new Matrix3 instance if one was not provided.
*/
@@ -1785,7 +1700,6 @@ Matrix3.prototype.clone = function (result) {
/**
* Compares this matrix to the provided matrix componentwise and returns
* true if they are equal, false otherwise.
- *
* @param {Matrix3} [right] The right hand side matrix.
* @returns {boolean} true if they are equal, false otherwise.
*/
@@ -1794,6 +1708,9 @@ Matrix3.prototype.equals = function (right) {
};
/**
+ * @param matrix
+ * @param array
+ * @param offset
* @private
*/
Matrix3.equalsArray = function (matrix, array, offset) {
@@ -1814,7 +1731,6 @@ Matrix3.equalsArray = function (matrix, array, offset) {
* Compares this matrix to the provided matrix componentwise and returns
* true if they are within the provided epsilon,
* false otherwise.
- *
* @param {Matrix3} [right] The right hand side matrix.
* @param {number} [epsilon=0] The epsilon to use for equality testing.
* @returns {boolean} true if they are within the provided epsilon, false otherwise.
@@ -1826,7 +1742,6 @@ Matrix3.prototype.equalsEpsilon = function (right, epsilon) {
/**
* Creates a string representing this Matrix with each row being
* on a separate line and in the format '(column0, column1, column2)'.
- *
* @returns {string} A string representing the provided Matrix with each row being on a separate line and in the format '(column0, column1, column2)'.
*/
Matrix3.prototype.toString = function () {
diff --git a/packages/engine/Source/Core/Matrix4.js b/packages/engine/Source/Core/Matrix4.js
index ecdaa3c0d001..10161e2f3dd5 100644
--- a/packages/engine/Source/Core/Matrix4.js
+++ b/packages/engine/Source/Core/Matrix4.js
@@ -12,9 +12,8 @@ import RuntimeError from "./RuntimeError.js";
* A 4x4 matrix, indexable as a column-major order array.
* Constructor parameters are in row-major order for code readability.
* @alias Matrix4
- * @constructor
+ * @class
* @implements {ArrayLike}
- *
* @param {number} [column0Row0=0.0] The value for column 0, row 0.
* @param {number} [column1Row0=0.0] The value for column 1, row 0.
* @param {number} [column2Row0=0.0] The value for column 2, row 0.
@@ -31,7 +30,6 @@ import RuntimeError from "./RuntimeError.js";
* @param {number} [column1Row3=0.0] The value for column 1, row 3.
* @param {number} [column2Row3=0.0] The value for column 2, row 3.
* @param {number} [column3Row3=0.0] The value for column 3, row 3.
- *
* @see Matrix4.fromArray
* @see Matrix4.fromColumnMajorArray
* @see Matrix4.fromRowMajorArray
@@ -97,11 +95,9 @@ Matrix4.packedLength = 16;
/**
* Stores the provided instance into the provided array.
- *
* @param {Matrix4} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
Matrix4.pack = function (value, array, startingIndex) {
@@ -134,7 +130,6 @@ Matrix4.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {Matrix4} [result] The object into which to store the result.
@@ -173,7 +168,6 @@ Matrix4.unpack = function (array, startingIndex, result) {
/**
* Flattens an array of Matrix4s into an array of components. The components
* are stored in column-major order.
- *
* @param {Matrix4[]} array The array of matrices to pack.
* @param {number[]} [result] The array onto which to store the result. If this is a typed array, it must have array.length * 16 components, else a {@link DeveloperError} will be thrown. If it is a regular array, it will be resized to have (array.length * 16) elements.
* @returns {number[]} The packed array.
@@ -205,7 +199,6 @@ Matrix4.packArray = function (array, result) {
/**
* Unpacks an array of column-major matrix components into an array of Matrix4s.
- *
* @param {number[]} array The array of components to unpack.
* @param {Matrix4[]} [result] The array onto which to store the result.
* @returns {Matrix4[]} The unpacked array.
@@ -235,7 +228,6 @@ Matrix4.unpackArray = function (array, result) {
/**
* Duplicates a Matrix4 instance.
- *
* @param {Matrix4} matrix The matrix to duplicate.
* @param {Matrix4} [result] The object onto which to store the result.
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if one was not provided. (Returns undefined if matrix is undefined)
@@ -286,12 +278,10 @@ Matrix4.clone = function (matrix, result) {
/**
* Creates a Matrix4 from 16 consecutive elements in an array.
* @function
- *
* @param {number[]} array The array whose 16 consecutive elements correspond to the positions of the matrix. Assumes column-major order.
* @param {number} [startingIndex=0] The offset into the array of the first element, which corresponds to first column first row position in the matrix.
* @param {Matrix4} [result] The object onto which to store the result.
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if one was not provided.
- *
* @example
* // Create the Matrix4:
* // [1.0, 2.0, 3.0, 4.0]
@@ -310,7 +300,6 @@ Matrix4.fromArray = Matrix4.unpack;
/**
* Computes a Matrix4 instance from a column-major order array.
- *
* @param {number[]} values The column-major order array.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
@@ -326,7 +315,6 @@ Matrix4.fromColumnMajorArray = function (values, result) {
/**
* Computes a Matrix4 instance from a row-major order array.
* The resulting matrix will be in column-major order.
- *
* @param {number[]} values The row-major order array.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
@@ -378,7 +366,6 @@ Matrix4.fromRowMajorArray = function (values, result) {
/**
* Computes a Matrix4 instance from a Matrix3 representing the rotation
* and a Cartesian3 representing the translation.
- *
* @param {Matrix3} rotation The upper left portion of the matrix representing the rotation.
* @param {Cartesian3} [translation=Cartesian3.ZERO] The upper right portion of the matrix representing the translation.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
@@ -434,13 +421,11 @@ Matrix4.fromRotationTranslation = function (rotation, translation, result) {
/**
* Computes a Matrix4 instance from a translation, rotation, and scale (TRS)
* representation with the rotation represented as a quaternion.
- *
* @param {Cartesian3} translation The translation transformation.
* @param {Quaternion} rotation The rotation transformation.
* @param {Cartesian3} scale The non-uniform scale transformation.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
- *
* @example
* const result = Cesium.Matrix4.fromTranslationQuaternionRotationScale(
* new Cesium.Cartesian3(1.0, 2.0, 3.0), // translation
@@ -513,7 +498,6 @@ Matrix4.fromTranslationQuaternionRotationScale = function (
/**
* Creates a Matrix4 instance from a {@link TranslationRotationScale} instance.
- *
* @param {TranslationRotationScale} translationRotationScale The instance.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
@@ -536,11 +520,9 @@ Matrix4.fromTranslationRotationScale = function (
/**
* Creates a Matrix4 instance from a Cartesian3 representing the translation.
- *
* @param {Cartesian3} translation The upper right portion of the matrix representing the translation.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
- *
* @see Matrix4.multiplyByTranslation
*/
Matrix4.fromTranslation = function (translation, result) {
@@ -553,11 +535,9 @@ Matrix4.fromTranslation = function (translation, result) {
/**
* Computes a Matrix4 instance representing a non-uniform scale.
- *
* @param {Cartesian3} scale The x, y, and z scale factors.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
- *
* @example
* // Creates
* // [7.0, 0.0, 0.0, 0.0]
@@ -613,11 +593,9 @@ Matrix4.fromScale = function (scale, result) {
/**
* Computes a Matrix4 instance representing a uniform scale.
- *
* @param {number} scale The uniform scale factor.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
- *
* @example
* // Creates
* // [2.0, 0.0, 0.0, 0.0]
@@ -673,7 +651,6 @@ Matrix4.fromUniformScale = function (scale, result) {
/**
* Creates a rotation matrix.
- *
* @param {Matrix3} rotation The rotation matrix.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
@@ -715,7 +692,6 @@ const fromCameraU = new Cartesian3();
/**
* Computes a Matrix4 instance from a Camera.
- *
* @param {Camera} camera The camera to use.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
@@ -817,18 +793,16 @@ Matrix4.fromCamera = function (camera, result) {
/**
* Computes a Matrix4 instance representing a perspective transformation matrix.
- *
* @param {number} fovY The field of view along the Y axis in radians.
* @param {number} aspectRatio The aspect ratio.
* @param {number} near The distance to the near plane in meters.
* @param {number} far The distance to the far plane in meters.
* @param {Matrix4} result The object in which the result will be stored.
* @returns {Matrix4} The modified result parameter.
- *
- * @exception {DeveloperError} fovY must be in (0, PI].
- * @exception {DeveloperError} aspectRatio must be greater than zero.
- * @exception {DeveloperError} near must be greater than zero.
- * @exception {DeveloperError} far must be greater than zero.
+ * @throws {DeveloperError} fovY must be in (0, PI].
+ * @throws {DeveloperError} aspectRatio must be greater than zero.
+ * @throws {DeveloperError} near must be greater than zero.
+ * @throws {DeveloperError} far must be greater than zero.
*/
Matrix4.computePerspectiveFieldOfView = function (
fovY,
@@ -873,7 +847,6 @@ Matrix4.computePerspectiveFieldOfView = function (
/**
* Computes a Matrix4 instance representing an orthographic transformation matrix.
- *
* @param {number} left The number of meters to the left of the camera that will be in view.
* @param {number} right The number of meters to the right of the camera that will be in view.
* @param {number} bottom The number of meters below of the camera that will be in view.
@@ -934,7 +907,6 @@ Matrix4.computeOrthographicOffCenter = function (
/**
* Computes a Matrix4 instance representing an off center perspective transformation.
- *
* @param {number} left The number of meters to the left of the camera that will be in view.
* @param {number} right The number of meters to the right of the camera that will be in view.
* @param {number} bottom The number of meters below of the camera that will be in view.
@@ -992,7 +964,6 @@ Matrix4.computePerspectiveOffCenter = function (
/**
* Computes a Matrix4 instance representing an infinite off center perspective transformation.
- *
* @param {number} left The number of meters to the left of the camera that will be in view.
* @param {number} right The number of meters to the right of the camera that will be in view.
* @param {number} bottom The number of meters below of the camera that will be in view.
@@ -1047,13 +1018,11 @@ Matrix4.computeInfinitePerspectiveOffCenter = function (
/**
* Computes a Matrix4 instance that transforms from normalized device coordinates to window coordinates.
- *
* @param {object} [viewport = { x : 0.0, y : 0.0, width : 0.0, height : 0.0 }] The viewport's corners as shown in Example 1.
* @param {number} [nearDepthRange=0.0] The near plane distance in window coordinates.
* @param {number} [farDepthRange=1.0] The far plane distance in window coordinates.
* @param {Matrix4} [result] The object in which the result will be stored.
* @returns {Matrix4} The modified result parameter.
- *
* @example
* // Create viewport transformation using an explicit viewport and depth range.
* const m = Cesium.Matrix4.computeViewportTransformation({
@@ -1115,7 +1084,6 @@ Matrix4.computeViewportTransformation = function (
/**
* Computes a Matrix4 instance that transforms from world space to view space.
- *
* @param {Cartesian3} position The position of the camera.
* @param {Cartesian3} direction The forward direction.
* @param {Cartesian3} up The up direction.
@@ -1154,11 +1122,9 @@ Matrix4.computeView = function (position, direction, up, right, result) {
/**
* Computes an Array from the provided Matrix4 instance.
* The array will be in column-major order.
- *
* @param {Matrix4} matrix The matrix to use..
* @param {number[]} [result] The Array onto which to store the result.
* @returns {number[]} The modified Array parameter or a new Array instance if one was not provided.
- *
* @example
* //create an array from an instance of Matrix4
* // m = [10.0, 14.0, 18.0, 22.0]
@@ -1216,14 +1182,11 @@ Matrix4.toArray = function (matrix, result) {
/**
* Computes the array index of the element at the provided row and column.
- *
* @param {number} row The zero-based index of the row.
* @param {number} column The zero-based index of the column.
* @returns {number} The index of the element at the provided row and column.
- *
- * @exception {DeveloperError} row must be 0, 1, 2, or 3.
- * @exception {DeveloperError} column must be 0, 1, 2, or 3.
- *
+ * @throws {DeveloperError} row must be 0, 1, 2, or 3.
+ * @throws {DeveloperError} column must be 0, 1, 2, or 3.
* @example
* const myMatrix = new Cesium.Matrix4();
* const column1Row0Index = Cesium.Matrix4.getElementIndex(1, 0);
@@ -1244,14 +1207,11 @@ Matrix4.getElementIndex = function (column, row) {
/**
* Retrieves a copy of the matrix column at the provided index as a Cartesian4 instance.
- *
* @param {Matrix4} matrix The matrix to use.
* @param {number} index The zero-based index of the column to retrieve.
* @param {Cartesian4} result The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter.
- *
- * @exception {DeveloperError} index must be 0, 1, 2, or 3.
- *
+ * @throws {DeveloperError} index must be 0, 1, 2, or 3.
* @example
* //returns a Cartesian4 instance with values from the specified column
* // m = [10.0, 11.0, 12.0, 13.0]
@@ -1261,7 +1221,6 @@ Matrix4.getElementIndex = function (column, row) {
*
* //Example 1: Creates an instance of Cartesian
* const a = Cesium.Matrix4.getColumn(m, 2, new Cesium.Cartesian4());
- *
* @example
* //Example 2: Sets values for Cartesian instance
* const a = new Cesium.Cartesian4();
@@ -1294,15 +1253,12 @@ Matrix4.getColumn = function (matrix, index, result) {
/**
* Computes a new matrix that replaces the specified column in the provided matrix with the provided Cartesian4 instance.
- *
* @param {Matrix4} matrix The matrix to use.
* @param {number} index The zero-based index of the column to set.
* @param {Cartesian4} cartesian The Cartesian whose values will be assigned to the specified column.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
- *
- * @exception {DeveloperError} index must be 0, 1, 2, or 3.
- *
+ * @throws {DeveloperError} index must be 0, 1, 2, or 3.
* @example
* //creates a new Matrix4 instance with new column values from the Cartesian4 instance
* // m = [10.0, 11.0, 12.0, 13.0]
@@ -1340,14 +1296,11 @@ Matrix4.setColumn = function (matrix, index, cartesian, result) {
/**
* Retrieves a copy of the matrix row at the provided index as a Cartesian4 instance.
- *
* @param {Matrix4} matrix The matrix to use.
* @param {number} index The zero-based index of the row to retrieve.
* @param {Cartesian4} result The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter.
- *
- * @exception {DeveloperError} index must be 0, 1, 2, or 3.
- *
+ * @throws {DeveloperError} index must be 0, 1, 2, or 3.
* @example
* //returns a Cartesian4 instance with values from the specified column
* // m = [10.0, 11.0, 12.0, 13.0]
@@ -1357,7 +1310,6 @@ Matrix4.setColumn = function (matrix, index, cartesian, result) {
*
* //Example 1: Returns an instance of Cartesian
* const a = Cesium.Matrix4.getRow(m, 2, new Cesium.Cartesian4());
- *
* @example
* //Example 2: Sets values for a Cartesian instance
* const a = new Cesium.Cartesian4();
@@ -1389,15 +1341,12 @@ Matrix4.getRow = function (matrix, index, result) {
/**
* Computes a new matrix that replaces the specified row in the provided matrix with the provided Cartesian4 instance.
- *
* @param {Matrix4} matrix The matrix to use.
* @param {number} index The zero-based index of the row to set.
* @param {Cartesian4} cartesian The Cartesian whose values will be assigned to the specified row.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
- *
- * @exception {DeveloperError} index must be 0, 1, 2, or 3.
- *
+ * @throws {DeveloperError} index must be 0, 1, 2, or 3.
* @example
* //create a new Matrix4 instance with new row values from the Cartesian4 instance
* // m = [10.0, 11.0, 12.0, 13.0]
@@ -1435,7 +1384,6 @@ Matrix4.setRow = function (matrix, index, cartesian, result) {
/**
* Computes a new matrix that replaces the translation in the rightmost column of the provided
* matrix with the provided translation. This assumes the matrix is an affine transformation.
- *
* @param {Matrix4} matrix The matrix to use.
* @param {Cartesian3} translation The translation that replaces the translation of the provided matrix.
* @param {Matrix4} result The object onto which to store the result.
@@ -1476,12 +1424,10 @@ const scaleScratch1 = new Cartesian3();
/**
* Computes a new matrix that replaces the scale with the provided scale.
* This assumes the matrix is an affine transformation.
- *
* @param {Matrix4} matrix The matrix to use.
* @param {Cartesian3} scale The scale that replaces the scale of the provided matrix.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
- *
* @see Matrix4.setUniformScale
* @see Matrix4.fromScale
* @see Matrix4.fromUniformScale
@@ -1529,12 +1475,10 @@ const scaleScratch2 = new Cartesian3();
/**
* Computes a new matrix that replaces the scale with the provided uniform scale.
* This assumes the matrix is an affine transformation.
- *
* @param {Matrix4} matrix The matrix to use.
* @param {number} scale The uniform scale that replaces the scale of the provided matrix.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
- *
* @see Matrix4.setScale
* @see Matrix4.fromScale
* @see Matrix4.fromUniformScale
@@ -1581,11 +1525,9 @@ const scratchColumn = new Cartesian3();
/**
* Extracts the non-uniform scale assuming the matrix is an affine transformation.
- *
* @param {Matrix4} matrix The matrix.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter
- *
* @see Matrix4.multiplyByScale
* @see Matrix4.multiplyByUniformScale
* @see Matrix4.fromScale
@@ -1617,7 +1559,6 @@ const scaleScratch3 = new Cartesian3();
* Computes the maximum scale assuming the matrix is an affine transformation.
* The maximum scale is the maximum length of the column vectors in the upper-left
* 3x3 matrix.
- *
* @param {Matrix4} matrix The matrix.
* @returns {number} The maximum scale.
*/
@@ -1630,12 +1571,10 @@ const scaleScratch4 = new Cartesian3();
/**
* Sets the rotation assuming the matrix is an affine transformation.
- *
* @param {Matrix4} matrix The matrix.
* @param {Matrix3} rotation The rotation matrix.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
- *
* @see Matrix4.fromRotation
* @see Matrix4.getRotation
*/
@@ -1674,11 +1613,9 @@ const scaleScratch5 = new Cartesian3();
/**
* Extracts the rotation matrix assuming the matrix is an affine transformation.
- *
* @param {Matrix4} matrix The matrix.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
- *
* @see Matrix4.setRotation
* @see Matrix4.fromRotation
*/
@@ -1707,7 +1644,6 @@ Matrix4.getRotation = function (matrix, result) {
/**
* Computes the product of two matrices.
- *
* @param {Matrix4} left The first matrix.
* @param {Matrix4} right The second matrix.
* @param {Matrix4} result The object onto which to store the result.
@@ -1811,7 +1747,6 @@ Matrix4.multiply = function (left, right, result) {
/**
* Computes the sum of two matrices.
- *
* @param {Matrix4} left The first matrix.
* @param {Matrix4} right The second matrix.
* @param {Matrix4} result The object onto which to store the result.
@@ -1845,7 +1780,6 @@ Matrix4.add = function (left, right, result) {
/**
* Computes the difference of two matrices.
- *
* @param {Matrix4} left The first matrix.
* @param {Matrix4} right The second matrix.
* @param {Matrix4} result The object onto which to store the result.
@@ -1885,12 +1819,10 @@ Matrix4.subtract = function (left, right, result) {
* The matrix is not verified to be in the proper form.
* This method is faster than computing the product for general 4x4
* matrices using {@link Matrix4.multiply}.
- *
* @param {Matrix4} left The first matrix.
* @param {Matrix4} right The second matrix.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
- *
* @example
* const m1 = new Cesium.Matrix4(1.0, 6.0, 7.0, 0.0, 2.0, 5.0, 8.0, 0.0, 3.0, 4.0, 9.0, 0.0, 0.0, 0.0, 0.0, 1.0);
* const m2 = Cesium.Transforms.eastNorthUpToFixedFrame(new Cesium.Cartesian3(1.0, 1.0, 1.0));
@@ -1971,12 +1903,10 @@ Matrix4.multiplyTransformation = function (left, right, result) {
* Multiplies a transformation matrix (with a bottom row of [0.0, 0.0, 0.0, 1.0])
* by a 3x3 rotation matrix. This is an optimization
* for Matrix4.multiply(m, Matrix4.fromRotationTranslation(rotation), m); with less allocations and arithmetic operations.
- *
* @param {Matrix4} matrix The matrix on the left-hand side.
* @param {Matrix3} rotation The 3x3 rotation matrix on the right-hand side.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
- *
* @example
* // Instead of Cesium.Matrix4.multiply(m, Cesium.Matrix4.fromRotationTranslation(rotation), m);
* Cesium.Matrix4.multiplyByMatrix3(m, rotation, m);
@@ -2043,12 +1973,10 @@ Matrix4.multiplyByMatrix3 = function (matrix, rotation, result) {
* Multiplies a transformation matrix (with a bottom row of [0.0, 0.0, 0.0, 1.0])
* by an implicit translation matrix defined by a {@link Cartesian3}. This is an optimization
* for Matrix4.multiply(m, Matrix4.fromTranslation(position), m); with less allocations and arithmetic operations.
- *
* @param {Matrix4} matrix The matrix on the left-hand side.
* @param {Cartesian3} translation The translation on the right-hand side.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
- *
* @example
* // Instead of Cesium.Matrix4.multiply(m, Cesium.Matrix4.fromTranslation(position), m);
* Cesium.Matrix4.multiplyByTranslation(m, position, m);
@@ -2093,17 +2021,13 @@ Matrix4.multiplyByTranslation = function (matrix, translation, result) {
* for Matrix4.multiply(m, Matrix4.fromUniformScale(scale), m);, where
* m must be an affine matrix.
* This function performs fewer allocations and arithmetic operations.
- *
* @param {Matrix4} matrix The affine matrix on the left-hand side.
* @param {Cartesian3} scale The non-uniform scale on the right-hand side.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
- *
- *
* @example
* // Instead of Cesium.Matrix4.multiply(m, Cesium.Matrix4.fromScale(scale), m);
* Cesium.Matrix4.multiplyByScale(m, scale, m);
- *
* @see Matrix4.multiplyByUniformScale
* @see Matrix4.fromScale
* @see Matrix4.fromUniformScale
@@ -2152,16 +2076,13 @@ Matrix4.multiplyByScale = function (matrix, scale, result) {
/**
* Computes the product of a matrix times a uniform scale, as if the scale were a scale matrix.
- *
* @param {Matrix4} matrix The matrix on the left-hand side.
* @param {number} scale The uniform scale on the right-hand side.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
- *
* @example
* // Instead of Cesium.Matrix4.multiply(m, Cesium.Matrix4.fromUniformScale(scale), m);
* Cesium.Matrix4.multiplyByUniformScale(m, scale, m);
- *
* @see Matrix4.multiplyByScale
* @see Matrix4.fromScale
* @see Matrix4.fromUniformScale
@@ -2201,7 +2122,6 @@ Matrix4.multiplyByUniformScale = function (matrix, scale, result) {
/**
* Computes the product of a matrix and a column vector.
- *
* @param {Matrix4} matrix The matrix.
* @param {Cartesian4} cartesian The vector.
* @param {Cartesian4} result The object onto which to store the result.
@@ -2234,12 +2154,10 @@ Matrix4.multiplyByVector = function (matrix, cartesian, result) {
/**
* Computes the product of a matrix and a {@link Cartesian3}. This is equivalent to calling {@link Matrix4.multiplyByVector}
* with a {@link Cartesian4} with a w component of zero.
- *
* @param {Matrix4} matrix The matrix.
* @param {Cartesian3} cartesian The point.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
- *
* @example
* const p = new Cesium.Cartesian3(1.0, 2.0, 3.0);
* const result = Cesium.Matrix4.multiplyByPointAsVector(matrix, p, new Cesium.Cartesian3());
@@ -2271,12 +2189,10 @@ Matrix4.multiplyByPointAsVector = function (matrix, cartesian, result) {
/**
* Computes the product of a matrix and a {@link Cartesian3}. This is equivalent to calling {@link Matrix4.multiplyByVector}
* with a {@link Cartesian4} with a w component of 1, but returns a {@link Cartesian3} instead of a {@link Cartesian4}.
- *
* @param {Matrix4} matrix The matrix.
* @param {Cartesian3} cartesian The point.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
- *
* @example
* const p = new Cesium.Cartesian3(1.0, 2.0, 3.0);
* const result = Cesium.Matrix4.multiplyByPoint(matrix, p, new Cesium.Cartesian3());
@@ -2304,12 +2220,10 @@ Matrix4.multiplyByPoint = function (matrix, cartesian, result) {
/**
* Computes the product of a matrix and a scalar.
- *
* @param {Matrix4} matrix The matrix.
* @param {number} scalar The number to multiply by.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
- *
* @example
* //create a Matrix4 instance which is a scaled version of the supplied Matrix4
* // m = [10.0, 11.0, 12.0, 13.0]
@@ -2353,11 +2267,9 @@ Matrix4.multiplyByScalar = function (matrix, scalar, result) {
/**
* Computes a negated copy of the provided matrix.
- *
* @param {Matrix4} matrix The matrix to negate.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
- *
* @example
* //create a new Matrix4 instance which is a negation of a Matrix4
* // m = [10.0, 11.0, 12.0, 13.0]
@@ -2400,11 +2312,9 @@ Matrix4.negate = function (matrix, result) {
/**
* Computes the transpose of the provided matrix.
- *
* @param {Matrix4} matrix The matrix to transpose.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
- *
* @example
* //returns transpose of a Matrix4
* // m = [10.0, 11.0, 12.0, 13.0]
@@ -2454,7 +2364,6 @@ Matrix4.transpose = function (matrix, result) {
/**
* Computes a matrix, which contains the absolute (unsigned) values of the provided matrix's elements.
- *
* @param {Matrix4} matrix The matrix with signed elements.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
@@ -2488,11 +2397,9 @@ Matrix4.abs = function (matrix, result) {
/**
* Compares the provided matrices componentwise and returns
* true if they are equal, false otherwise.
- *
* @param {Matrix4} [left] The first matrix.
* @param {Matrix4} [right] The second matrix.
* @returns {boolean} true if left and right are equal, false otherwise.
- *
* @example
* //compares two Matrix4 instances
*
@@ -2549,12 +2456,10 @@ Matrix4.equals = function (left, right) {
* Compares the provided matrices componentwise and returns
* true if they are within the provided epsilon,
* false otherwise.
- *
* @param {Matrix4} [left] The first matrix.
* @param {Matrix4} [right] The second matrix.
* @param {number} [epsilon=0] The epsilon to use for equality testing.
* @returns {boolean} true if left and right are within the provided epsilon, false otherwise.
- *
* @example
* //compares two Matrix4 instances
*
@@ -2604,7 +2509,6 @@ Matrix4.equalsEpsilon = function (left, right, epsilon) {
/**
* Gets the translation portion of the provided matrix, assuming the matrix is an affine transformation matrix.
- *
* @param {Matrix4} matrix The matrix to use.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
@@ -2623,11 +2527,9 @@ Matrix4.getTranslation = function (matrix, result) {
/**
* Gets the upper left 3x3 matrix of the provided matrix.
- *
* @param {Matrix4} matrix The matrix to use.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
- *
* @example
* // returns a Matrix3 instance from a Matrix4 instance
*
@@ -2671,12 +2573,10 @@ const scratchExpectedBottomRow = new Cartesian4(0.0, 0.0, 0.0, 1.0);
* If the determinant is zero, the matrix can not be inverted, and an exception is thrown.
* If the matrix is a proper rigid transformation, it is more efficient
* to invert it with {@link Matrix4.inverseTransformation}.
- *
* @param {Matrix4} matrix The matrix to invert.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
- *
- * @exception {RuntimeError} matrix is not invertible because its determinate is zero.
+ * @throws {RuntimeError} matrix is not invertible because its determinate is zero.
*/
Matrix4.inverse = function (matrix, result) {
//>>includeStart('debug', pragmas.debug);
@@ -2887,7 +2787,6 @@ Matrix4.inverse = function (matrix, result) {
* The matrix is not verified to be in the proper form.
* This method is faster than computing the inverse for a general 4x4
* matrix using {@link Matrix4.inverse}.
- *
* @param {Matrix4} matrix The matrix to invert.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
@@ -2945,7 +2844,6 @@ const scratchTransposeMatrix = new Matrix4();
/**
* Computes the inverse transpose of a matrix.
- *
* @param {Matrix4} matrix The matrix to transpose and invert.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
@@ -2964,7 +2862,6 @@ Matrix4.inverseTranspose = function (matrix, result) {
/**
* An immutable Matrix4 instance initialized to the identity matrix.
- *
* @type {Matrix4}
* @constant
*/
@@ -2991,7 +2888,6 @@ Matrix4.IDENTITY = Object.freeze(
/**
* An immutable Matrix4 instance initialized to the zero matrix.
- *
* @type {Matrix4}
* @constant
*/
@@ -3018,7 +2914,6 @@ Matrix4.ZERO = Object.freeze(
/**
* The index into Matrix4 for column 0, row 0.
- *
* @type {number}
* @constant
*/
@@ -3026,7 +2921,6 @@ Matrix4.COLUMN0ROW0 = 0;
/**
* The index into Matrix4 for column 0, row 1.
- *
* @type {number}
* @constant
*/
@@ -3034,7 +2928,6 @@ Matrix4.COLUMN0ROW1 = 1;
/**
* The index into Matrix4 for column 0, row 2.
- *
* @type {number}
* @constant
*/
@@ -3042,7 +2935,6 @@ Matrix4.COLUMN0ROW2 = 2;
/**
* The index into Matrix4 for column 0, row 3.
- *
* @type {number}
* @constant
*/
@@ -3050,7 +2942,6 @@ Matrix4.COLUMN0ROW3 = 3;
/**
* The index into Matrix4 for column 1, row 0.
- *
* @type {number}
* @constant
*/
@@ -3058,7 +2949,6 @@ Matrix4.COLUMN1ROW0 = 4;
/**
* The index into Matrix4 for column 1, row 1.
- *
* @type {number}
* @constant
*/
@@ -3066,7 +2956,6 @@ Matrix4.COLUMN1ROW1 = 5;
/**
* The index into Matrix4 for column 1, row 2.
- *
* @type {number}
* @constant
*/
@@ -3074,7 +2963,6 @@ Matrix4.COLUMN1ROW2 = 6;
/**
* The index into Matrix4 for column 1, row 3.
- *
* @type {number}
* @constant
*/
@@ -3082,7 +2970,6 @@ Matrix4.COLUMN1ROW3 = 7;
/**
* The index into Matrix4 for column 2, row 0.
- *
* @type {number}
* @constant
*/
@@ -3090,7 +2977,6 @@ Matrix4.COLUMN2ROW0 = 8;
/**
* The index into Matrix4 for column 2, row 1.
- *
* @type {number}
* @constant
*/
@@ -3098,7 +2984,6 @@ Matrix4.COLUMN2ROW1 = 9;
/**
* The index into Matrix4 for column 2, row 2.
- *
* @type {number}
* @constant
*/
@@ -3106,7 +2991,6 @@ Matrix4.COLUMN2ROW2 = 10;
/**
* The index into Matrix4 for column 2, row 3.
- *
* @type {number}
* @constant
*/
@@ -3114,7 +2998,6 @@ Matrix4.COLUMN2ROW3 = 11;
/**
* The index into Matrix4 for column 3, row 0.
- *
* @type {number}
* @constant
*/
@@ -3122,7 +3005,6 @@ Matrix4.COLUMN3ROW0 = 12;
/**
* The index into Matrix4 for column 3, row 1.
- *
* @type {number}
* @constant
*/
@@ -3130,7 +3012,6 @@ Matrix4.COLUMN3ROW1 = 13;
/**
* The index into Matrix4 for column 3, row 2.
- *
* @type {number}
* @constant
*/
@@ -3138,7 +3019,6 @@ Matrix4.COLUMN3ROW2 = 14;
/**
* The index into Matrix4 for column 3, row 3.
- *
* @type {number}
* @constant
*/
@@ -3148,7 +3028,6 @@ Object.defineProperties(Matrix4.prototype, {
/**
* Gets the number of items in the collection.
* @memberof Matrix4.prototype
- *
* @type {number}
*/
length: {
@@ -3160,7 +3039,6 @@ Object.defineProperties(Matrix4.prototype, {
/**
* Duplicates the provided Matrix4 instance.
- *
* @param {Matrix4} [result] The object onto which to store the result.
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if one was not provided.
*/
@@ -3171,7 +3049,6 @@ Matrix4.prototype.clone = function (result) {
/**
* Compares this matrix to the provided matrix componentwise and returns
* true if they are equal, false otherwise.
- *
* @param {Matrix4} [right] The right hand side matrix.
* @returns {boolean} true if they are equal, false otherwise.
*/
@@ -3180,6 +3057,9 @@ Matrix4.prototype.equals = function (right) {
};
/**
+ * @param matrix
+ * @param array
+ * @param offset
* @private
*/
Matrix4.equalsArray = function (matrix, array, offset) {
@@ -3207,7 +3087,6 @@ Matrix4.equalsArray = function (matrix, array, offset) {
* Compares this matrix to the provided matrix componentwise and returns
* true if they are within the provided epsilon,
* false otherwise.
- *
* @param {Matrix4} [right] The right hand side matrix.
* @param {number} [epsilon=0] The epsilon to use for equality testing.
* @returns {boolean} true if they are within the provided epsilon, false otherwise.
@@ -3219,7 +3098,6 @@ Matrix4.prototype.equalsEpsilon = function (right, epsilon) {
/**
* Computes a string representing this Matrix with each row being
* on a separate line and in the format '(column0, column1, column2, column3)'.
- *
* @returns {string} A string representing the provided Matrix with each row being on a separate line and in the format '(column0, column1, column2, column3)'.
*/
Matrix4.prototype.toString = function () {
diff --git a/packages/engine/Source/Core/MorphWeightSpline.js b/packages/engine/Source/Core/MorphWeightSpline.js
index d566c1e604f7..ec94d11df1bf 100644
--- a/packages/engine/Source/Core/MorphWeightSpline.js
+++ b/packages/engine/Source/Core/MorphWeightSpline.js
@@ -6,10 +6,8 @@ import Spline from "./Spline.js";
/**
* A spline that linearly interpolates over an array of weight values used by morph targets.
- *
* @alias MorphWeightSpline
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {number[]} options.times An array of strictly increasing, unit-less, floating-point times at each point.
* The values are in no way connected to the clock time. They are the parameterization for the curve.
@@ -17,11 +15,8 @@ import Spline from "./Spline.js";
* that all weights for the targets are given in chronological order and order in which they appear in
* the glTF from which the morph targets come. This means for 2 targets, weights = [w(0,0), w(0,1), w(1,0), w(1,1) ...]
* where i and j in w(i,j) are the time indices and target indices, respectively.
- *
- * @exception {DeveloperError} weights.length must be greater than or equal to 2.
- * @exception {DeveloperError} times.length must be a factor of weights.length.
- *
- *
+ * @throws {DeveloperError} weights.length must be greater than or equal to 2.
+ * @throws {DeveloperError} times.length must be a factor of weights.length.
* @example
* const times = [ 0.0, 1.5, 3.0, 4.5, 6.0 ];
* const weights = [0.0, 1.0, 0.25, 0.75, 0.5, 0.5, 0.75, 0.25, 1.0, 0.0]; //Two targets
@@ -31,7 +26,6 @@ import Spline from "./Spline.js";
* });
*
* const p0 = spline.evaluate(times[0]);
- *
* @see ConstantSpline
* @see SteppedSpline
* @see LinearSpline
@@ -66,9 +60,7 @@ function MorphWeightSpline(options) {
Object.defineProperties(MorphWeightSpline.prototype, {
/**
* An array of times for the control weights.
- *
* @memberof WeightSpline.prototype
- *
* @type {number[]}
* @readonly
*/
@@ -80,9 +72,7 @@ Object.defineProperties(MorphWeightSpline.prototype, {
/**
* An array of floating-point array control weights.
- *
* @memberof WeightSpline.prototype
- *
* @type {number[]}
* @readonly
*/
@@ -97,11 +87,9 @@ Object.defineProperties(MorphWeightSpline.prototype, {
* Finds an index i in times such that the parameter
* time is in the interval [times[i], times[i + 1]].
* @function
- *
* @param {number} time The time.
* @returns {number} The index for the element at the start of the interval.
- *
- * @exception {DeveloperError} time must be in the range [t0, tn], where t0
+ * @throws {DeveloperError} time must be in the range [t0, tn], where t0
* is the first element in the array times and tn is the last element
* in the array times.
*/
@@ -111,29 +99,25 @@ MorphWeightSpline.prototype.findTimeInterval =
/**
* Wraps the given time to the period covered by the spline.
* @function
- *
* @param {number} time The time.
- * @return {number} The time, wrapped around to the updated animation.
+ * @returns {number} The time, wrapped around to the updated animation.
*/
MorphWeightSpline.prototype.wrapTime = Spline.prototype.wrapTime;
/**
* Clamps the given time to the period covered by the spline.
* @function
- *
* @param {number} time The time.
- * @return {number} The time, clamped to the animation period.
+ * @returns {number} The time, clamped to the animation period.
*/
MorphWeightSpline.prototype.clampTime = Spline.prototype.clampTime;
/**
* Evaluates the curve at a given time.
- *
* @param {number} time The time at which to evaluate the curve.
* @param {number[]} [result] The object onto which to store the result.
* @returns {number[]} The modified result parameter or a new instance of the point on the curve at the given time.
- *
- * @exception {DeveloperError} time must be in the range [t0, tn], where t0
+ * @throws {DeveloperError} time must be in the range [t0, tn], where t0
* is the first element in the array times and tn is the last element
* in the array times.
*/
diff --git a/packages/engine/Source/Core/MortonOrder.js b/packages/engine/Source/Core/MortonOrder.js
index 390abf913957..b1a8ee27b88a 100644
--- a/packages/engine/Source/Core/MortonOrder.js
+++ b/packages/engine/Source/Core/MortonOrder.js
@@ -5,7 +5,6 @@ import DeveloperError from "./DeveloperError.js";
/**
* Morton Order (aka Z-Order Curve) helper functions.
* @see {@link https://en.wikipedia.org/wiki/Z-order_curve}
- *
* @namespace MortonOrder
* @private
*/
@@ -15,17 +14,15 @@ const MortonOrder = {};
* Inserts one 0 bit of spacing between a number's bits. This is the opposite of removeOneSpacing.
*
* Example:
- * input: 6
- * input (binary): 110
- * output (binary): 10100
- * ^ ^ (added)
- * output: 20
- *
+ * input: 6
+ * input (binary): 110
+ * output (binary): 10100
+ * ^ ^ (added)
+ * output: 20
* @private
* @param {number} v A 16-bit unsigned integer.
* @returns {number} A 32-bit unsigned integer.
* @see {@link https://fgiesen.wordpress.com/2009/12/13/decoding-morton-codes/}
- * @private
*/
function insertOneSpacing(v) {
v = (v ^ (v << 8)) & 0x00ff00ff;
@@ -39,12 +36,11 @@ function insertOneSpacing(v) {
* Inserts two 0 bits of spacing between a number's bits. This is the opposite of removeTwoSpacing.
*
* Example:
- * input: 6
- * input (binary): 110
- * output (binary): 1001000
- * ^^ ^^ (added)
- * output: 72
- *
+ * input: 6
+ * input (binary): 110
+ * output (binary): 1001000
+ * ^^ ^^ (added)
+ * output: 72
* @private
* @param {number} v A 10-bit unsigned integer.
* @returns {number} A 30-bit unsigned integer.
@@ -62,12 +58,11 @@ function insertTwoSpacing(v) {
* Removes one bit of spacing between bits. This is the opposite of insertOneSpacing.
*
* Example:
- * input: 20
- * input (binary): 10100
- * ^ ^ (removed)
- * output (binary): 110
- * output: 6
- *
+ * input: 20
+ * input (binary): 10100
+ * ^ ^ (removed)
+ * output (binary): 110
+ * output: 6
* @private
* @param {number} v A 32-bit unsigned integer.
* @returns {number} A 16-bit unsigned integer.
@@ -86,12 +81,11 @@ function removeOneSpacing(v) {
* Removes two bits of spacing between bits. This is the opposite of insertTwoSpacing.
*
* Example:
- * input: 72
- * input (binary): 1001000
- * ^^ ^^ (removed)
- * output (binary): 110
- * output: 6
- *
+ * input: 72
+ * input (binary): 1001000
+ * ^^ ^^ (removed)
+ * output (binary): 110
+ * output: 6
* @private
* @param {number} v A 30-bit unsigned integer.
* @returns {number} A 10-bit unsigned integer.
@@ -109,7 +103,6 @@ function removeTwoSpacing(v) {
/**
* Computes the Morton index from 2D coordinates. This is equivalent to interleaving their bits.
* The inputs must be 16-bit unsigned integers (resulting in 32-bit Morton index) due to 32-bit bitwise operator limitation in JavaScript.
- *
* @param {number} x The X coordinate in the range [0, (2^16)-1].
* @param {number} y The Y coordinate in the range [0, (2^16)-1].
* @returns {number} The Morton index.
@@ -134,7 +127,6 @@ MortonOrder.encode2D = function (x, y) {
/**
* Computes the 2D coordinates from a Morton index. This is equivalent to deinterleaving their bits.
* The input must be a 32-bit unsigned integer (resulting in 16 bits per coordinate) due to 32-bit bitwise operator limitation in JavaScript.
- *
* @param {number} mortonIndex The Morton index in the range [0, (2^32)-1].
* @param {number[]} [result] The array onto which to store the result.
* @returns {number[]} An array containing the 2D coordinates correspoding to the Morton index.
@@ -160,7 +152,6 @@ MortonOrder.decode2D = function (mortonIndex, result) {
/**
* Computes the Morton index from 3D coordinates. This is equivalent to interleaving their bits.
* The inputs must be 10-bit unsigned integers (resulting in 30-bit Morton index) due to 32-bit bitwise operator limitation in JavaScript.
- *
* @param {number} x The X coordinate in the range [0, (2^10)-1].
* @param {number} y The Y coordinate in the range [0, (2^10)-1].
* @param {number} z The Z coordinate in the range [0, (2^10)-1].
@@ -187,7 +178,6 @@ MortonOrder.encode3D = function (x, y, z) {
/**
* Computes the 3D coordinates from a Morton index. This is equivalent to deinterleaving their bits.
* The input must be a 30-bit unsigned integer (resulting in 10 bits per coordinate) due to 32-bit bitwise operator limitation in JavaScript.
- *
* @param {number} mortonIndex The Morton index in the range [0, (2^30)-1].
* @param {number[]} [result] The array onto which to store the result.
* @returns {number[]} An array containing the 3D coordinates corresponding to the Morton index.
diff --git a/packages/engine/Source/Core/NearFarScalar.js b/packages/engine/Source/Core/NearFarScalar.js
index 9b693fcc6387..e3e28f893823 100644
--- a/packages/engine/Source/Core/NearFarScalar.js
+++ b/packages/engine/Source/Core/NearFarScalar.js
@@ -5,13 +5,11 @@ import DeveloperError from "./DeveloperError.js";
/**
* Represents a scalar value's lower and upper bound at a near distance and far distance in eye space.
* @alias NearFarScalar
- * @constructor
- *
+ * @class
* @param {number} [near=0.0] The lower bound of the camera range.
* @param {number} [nearValue=0.0] The value at the lower bound of the camera range.
* @param {number} [far=1.0] The upper bound of the camera range.
* @param {number} [farValue=0.0] The value at the upper bound of the camera range.
- *
* @see Packable
*/
function NearFarScalar(near, nearValue, far, farValue) {
@@ -43,7 +41,6 @@ function NearFarScalar(near, nearValue, far, farValue) {
/**
* Duplicates a NearFarScalar instance.
- *
* @param {NearFarScalar} nearFarScalar The NearFarScalar to duplicate.
* @param {NearFarScalar} [result] The object onto which to store the result.
* @returns {NearFarScalar} The modified result parameter or a new NearFarScalar instance if one was not provided. (Returns undefined if nearFarScalar is undefined)
@@ -77,11 +74,9 @@ NearFarScalar.packedLength = 4;
/**
* Stores the provided instance into the provided array.
- *
* @param {NearFarScalar} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
NearFarScalar.pack = function (value, array, startingIndex) {
@@ -106,7 +101,6 @@ NearFarScalar.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {NearFarScalar} [result] The object into which to store the result.
@@ -134,7 +128,6 @@ NearFarScalar.unpack = function (array, startingIndex, result) {
/**
* Compares the provided NearFarScalar and returns true if they are equal,
* false otherwise.
- *
* @param {NearFarScalar} [left] The first NearFarScalar.
* @param {NearFarScalar} [right] The second NearFarScalar.
* @returns {boolean} true if left and right are equal; otherwise false.
@@ -153,7 +146,6 @@ NearFarScalar.equals = function (left, right) {
/**
* Duplicates this instance.
- *
* @param {NearFarScalar} [result] The object onto which to store the result.
* @returns {NearFarScalar} The modified result parameter or a new NearFarScalar instance if one was not provided.
*/
@@ -164,7 +156,6 @@ NearFarScalar.prototype.clone = function (result) {
/**
* Compares this instance to the provided NearFarScalar and returns true if they are equal,
* false otherwise.
- *
* @param {NearFarScalar} [right] The right hand side NearFarScalar.
* @returns {boolean} true if left and right are equal; otherwise false.
*/
diff --git a/packages/engine/Source/Core/Occluder.js b/packages/engine/Source/Core/Occluder.js
index cf247a0c3600..bab9c71088f7 100644
--- a/packages/engine/Source/Core/Occluder.js
+++ b/packages/engine/Source/Core/Occluder.js
@@ -12,14 +12,10 @@ import Visibility from "./Visibility.js";
* Creates an Occluder derived from an object's position and radius, as well as the camera position.
* The occluder can be used to determine whether or not other objects are visible or hidden behind the
* visible horizon defined by the occluder and camera position.
- *
* @alias Occluder
- *
* @param {BoundingSphere} occluderBoundingSphere The bounding sphere surrounding the occluder.
* @param {Cartesian3} cameraPosition The coordinate of the viewer/camera.
- *
- * @constructor
- *
+ * @class
* @example
* // Construct an occluder one unit away from the origin with a radius of one.
* const cameraPosition = Cesium.Cartesian3.ZERO;
@@ -137,7 +133,6 @@ Object.defineProperties(Occluder.prototype, {
/**
* Creates an occluder from a bounding sphere and the camera position.
- *
* @param {BoundingSphere} occluderBoundingSphere The bounding sphere surrounding the occluder.
* @param {Cartesian3} cameraPosition The coordinate of the viewer/camera.
* @param {Occluder} [result] The object onto which to store the result.
@@ -173,18 +168,14 @@ const tempVecScratch = new Cartesian3();
/**
* Determines whether or not a point, the occludee, is hidden from view by the occluder.
- *
* @param {Cartesian3} occludee The point surrounding the occludee object.
* @returns {boolean} true if the occludee is visible; otherwise false.
- *
- *
* @example
* const cameraPosition = new Cesium.Cartesian3(0, 0, 0);
* const littleSphere = new Cesium.BoundingSphere(new Cesium.Cartesian3(0, 0, -1), 0.25);
* const occluder = new Cesium.Occluder(littleSphere, cameraPosition);
* const point = new Cesium.Cartesian3(0, 0, -3);
* occluder.isPointVisible(point); //returns true
- *
* @see Occluder#computeVisibility
*/
Occluder.prototype.isPointVisible = function (occludee) {
@@ -209,18 +200,14 @@ const occludeePositionScratch = new Cartesian3();
/**
* Determines whether or not a sphere, the occludee, is hidden from view by the occluder.
- *
* @param {BoundingSphere} occludee The bounding sphere surrounding the occludee object.
* @returns {boolean} true if the occludee is visible; otherwise false.
- *
- *
* @example
* const cameraPosition = new Cesium.Cartesian3(0, 0, 0);
* const littleSphere = new Cesium.BoundingSphere(new Cesium.Cartesian3(0, 0, -1), 0.25);
* const occluder = new Cesium.Occluder(littleSphere, cameraPosition);
* const bigSphere = new Cesium.BoundingSphere(new Cesium.Cartesian3(0, 0, -3), 1);
* occluder.isBoundingSphereVisible(bigSphere); //returns true
- *
* @see Occluder#computeVisibility
*/
Occluder.prototype.isBoundingSphereVisible = function (occludee) {
@@ -288,20 +275,16 @@ Occluder.prototype.isBoundingSphereVisible = function (occludee) {
const tempScratch = new Cartesian3();
/**
* Determine to what extent an occludee is visible (not visible, partially visible, or fully visible).
- *
* @param {BoundingSphere} occludeeBS The bounding sphere of the occludee.
* @returns {Visibility} Visibility.NONE if the occludee is not visible,
* Visibility.PARTIAL if the occludee is partially visible, or
* Visibility.FULL if the occludee is fully visible.
- *
- *
* @example
* const sphere1 = new Cesium.BoundingSphere(new Cesium.Cartesian3(0, 0, -1.5), 0.5);
* const sphere2 = new Cesium.BoundingSphere(new Cesium.Cartesian3(0, 0, -2.5), 0.5);
* const cameraPosition = new Cesium.Cartesian3(0, 0, 0);
* const occluder = new Cesium.Occluder(sphere1, cameraPosition);
* occluder.computeVisibility(sphere2); //returns Visibility.NONE
- *
* @see Occluder#isVisible
*/
Occluder.prototype.computeVisibility = function (occludeeBS) {
@@ -385,16 +368,13 @@ const occludeePointScratch = new Cartesian3();
* called for objects that do not move relative to the occluder and is large, such as a chunk of
* terrain. You are better off not calling this and using the object's bounding sphere for objects
* such as a satellite or ground vehicle.
- *
* @param {BoundingSphere} occluderBoundingSphere The bounding sphere surrounding the occluder.
* @param {Cartesian3} occludeePosition The point where the occludee (bounding sphere of radius 0) is located.
* @param {Cartesian3[]} positions List of altitude points on the horizon near the surface of the occluder.
* @returns {object} An object containing two attributes: occludeePoint and valid
* which is a boolean value.
- *
- * @exception {DeveloperError} positions must contain at least one element.
- * @exception {DeveloperError} occludeePosition must have a value other than occluderBoundingSphere.center.
- *
+ * @throws {DeveloperError} positions must contain at least one element.
+ * @throws {DeveloperError} occludeePosition must have a value other than occluderBoundingSphere.center.
* @example
* const cameraPosition = new Cesium.Cartesian3(0, 0, 0);
* const occluderBoundingSphere = new Cesium.BoundingSphere(new Cesium.Cartesian3(0, 0, -8), 2);
@@ -497,7 +477,6 @@ Occluder.computeOccludeePoint = function (
const computeOccludeePointFromRectangleScratch = [];
/**
* Computes a point that can be used as the occludee position to the visibility functions from a rectangle.
- *
* @param {Rectangle} rectangle The rectangle used to create a bounding sphere.
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid used to determine positions of the rectangle.
* @returns {object} An object containing two attributes: occludeePoint and valid
diff --git a/packages/engine/Source/Core/OffsetGeometryInstanceAttribute.js b/packages/engine/Source/Core/OffsetGeometryInstanceAttribute.js
index 039d0b2136af..4e3392118884 100644
--- a/packages/engine/Source/Core/OffsetGeometryInstanceAttribute.js
+++ b/packages/engine/Source/Core/OffsetGeometryInstanceAttribute.js
@@ -5,16 +5,12 @@ import defined from "./defined.js";
/**
* Value and type information for per-instance geometry attribute that determines the geometry instance offset
- *
* @alias OffsetGeometryInstanceAttribute
- * @constructor
- *
+ * @class
* @param {number} [x=0] The x translation
* @param {number} [y=0] The y translation
* @param {number} [z=0] The z translation
- *
* @private
- *
* @see GeometryInstance
* @see GeometryInstanceAttribute
*/
@@ -25,7 +21,6 @@ function OffsetGeometryInstanceAttribute(x, y, z) {
/**
* The values for the attributes stored in a typed array.
- *
* @type Float32Array
*/
this.value = new Float32Array([x, y, z]);
@@ -35,12 +30,9 @@ Object.defineProperties(OffsetGeometryInstanceAttribute.prototype, {
/**
* The datatype of each component in the attribute, e.g., individual elements in
* {@link OffsetGeometryInstanceAttribute#value}.
- *
* @memberof OffsetGeometryInstanceAttribute.prototype
- *
* @type {ComponentDatatype}
* @readonly
- *
* @default {@link ComponentDatatype.FLOAT}
*/
componentDatatype: {
@@ -51,12 +43,9 @@ Object.defineProperties(OffsetGeometryInstanceAttribute.prototype, {
/**
* The number of components in the attributes, i.e., {@link OffsetGeometryInstanceAttribute#value}.
- *
* @memberof OffsetGeometryInstanceAttribute.prototype
- *
* @type {number}
* @readonly
- *
* @default 3
*/
componentsPerAttribute: {
@@ -69,12 +58,9 @@ Object.defineProperties(OffsetGeometryInstanceAttribute.prototype, {
* When true and componentDatatype is an integer format,
* indicate that the components should be mapped to the range [0, 1] (unsigned)
* or [-1, 1] (signed) when they are accessed as floating-point for rendering.
- *
* @memberof OffsetGeometryInstanceAttribute.prototype
- *
* @type {boolean}
* @readonly
- *
* @default false
*/
normalize: {
@@ -86,7 +72,6 @@ Object.defineProperties(OffsetGeometryInstanceAttribute.prototype, {
/**
* Creates a new {@link OffsetGeometryInstanceAttribute} instance given the provided an enabled flag and {@link DistanceDisplayCondition}.
- *
* @param {Cartesian3} offset The cartesian offset
* @returns {OffsetGeometryInstanceAttribute} The new {@link OffsetGeometryInstanceAttribute} instance.
*/
@@ -100,11 +85,9 @@ OffsetGeometryInstanceAttribute.fromCartesian3 = function (offset) {
/**
* Converts a distance display condition to a typed array that can be used to assign a distance display condition attribute.
- *
* @param {Cartesian3} offset The cartesian offset
* @param {Float32Array} [result] The array to store the result in, if undefined a new instance will be created.
* @returns {Float32Array} The modified result parameter or a new instance if result was undefined.
- *
* @example
* const attributes = primitive.getGeometryInstanceAttributes('an id');
* attributes.modelMatrix = Cesium.OffsetGeometryInstanceAttribute.toValue(modelMatrix, attributes.modelMatrix);
diff --git a/packages/engine/Source/Core/OpenCageGeocoderService.js b/packages/engine/Source/Core/OpenCageGeocoderService.js
index 139a7f194f2d..7ba7f631e808 100644
--- a/packages/engine/Source/Core/OpenCageGeocoderService.js
+++ b/packages/engine/Source/Core/OpenCageGeocoderService.js
@@ -10,8 +10,7 @@ import Resource from "./Resource.js";
/**
* Provides geocoding via a {@link https://opencagedata.com/|OpenCage} server.
* @alias OpenCageGeocoderService
- * @constructor
- *
+ * @class
* @param {Resource|string} url The endpoint to the OpenCage server.
* @param {string} apiKey The OpenCage API Key.
* @param {object} [params] An object with the following properties (See https://opencagedata.com/api#forward-opt):
@@ -28,7 +27,6 @@ import Resource from "./Resource.js";
* @param {number} [options.no_record] When set to 1 the query contents are not logged.
* @param {number} [options.pretty] When set to 1 results are 'pretty' printed for easier reading. Useful for debugging.
* @param {string} [options.proximity] Provides the geocoder with a hint to bias results in favour of those closer to the specified location (For example: 41.40139,2.12870).
- *
* @example
* // Configure a Viewer to use the OpenCage Geocoder
* const viewer = new Cesium.Viewer('cesiumContainer', {
@@ -94,7 +92,6 @@ Object.defineProperties(OpenCageGeocoderService.prototype, {
/**
* @function
- *
* @param {string} query The query to be sent to the geocoder service
* @returns {Promise}
*/
diff --git a/packages/engine/Source/Core/OrientedBoundingBox.js b/packages/engine/Source/Core/OrientedBoundingBox.js
index c7fe3c292285..db2cdffeee4c 100644
--- a/packages/engine/Source/Core/OrientedBoundingBox.js
+++ b/packages/engine/Source/Core/OrientedBoundingBox.js
@@ -20,21 +20,17 @@ import Rectangle from "./Rectangle.js";
* Creates an instance of an OrientedBoundingBox.
* An OrientedBoundingBox of some object is a closed and convex rectangular cuboid. It can provide a tighter bounding volume than {@link BoundingSphere} or {@link AxisAlignedBoundingBox} in many cases.
* @alias OrientedBoundingBox
- * @constructor
- *
+ * @class
* @param {Cartesian3} [center=Cartesian3.ZERO] The center of the box.
* @param {Matrix3} [halfAxes=Matrix3.ZERO] The three orthogonal half-axes of the bounding box.
* Equivalently, the transformation matrix, to rotate and scale a 2x2x2
* cube centered at the origin.
- *
- *
* @example
* // Create an OrientedBoundingBox using a transformation matrix, a position where the box will be translated, and a scale.
* const center = new Cesium.Cartesian3(1.0, 0.0, 0.0);
* const halfAxes = Cesium.Matrix3.fromScale(new Cesium.Cartesian3(1.0, 3.0, 2.0), new Cesium.Matrix3());
*
* const obb = new Cesium.OrientedBoundingBox(center, halfAxes);
- *
* @see BoundingSphere
* @see BoundingRectangle
*/
@@ -64,11 +60,9 @@ OrientedBoundingBox.packedLength =
/**
* Stores the provided instance into the provided array.
- *
* @param {OrientedBoundingBox} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
OrientedBoundingBox.pack = function (value, array, startingIndex) {
@@ -87,7 +81,6 @@ OrientedBoundingBox.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {OrientedBoundingBox} [result] The object into which to store the result.
@@ -129,11 +122,9 @@ const scratchEigenResult = {
* Computes an instance of an OrientedBoundingBox of the given positions.
* This is an implementation of Stefan Gottschalk's Collision Queries using Oriented Bounding Boxes solution (PHD thesis).
* Reference: http://gamma.cs.unc.edu/users/gottschalk/main.pdf
- *
* @param {Cartesian3[]} [positions] List of {@link Cartesian3} points that the bounding box will enclose.
* @param {OrientedBoundingBox} [result] The object onto which to store the result.
* @returns {OrientedBoundingBox} The modified result parameter or a new OrientedBoundingBox instance if one was not provided.
- *
* @example
* // Compute an object oriented bounding box enclosing two points.
* const box = Cesium.OrientedBoundingBox.fromPoints([new Cesium.Cartesian3(2, 0, 0), new Cesium.Cartesian3(-2, 0, 0)]);
@@ -328,17 +319,15 @@ const scratchPlane = new Plane(Cartesian3.UNIT_X, 0.0);
/**
* Computes an OrientedBoundingBox that bounds a {@link Rectangle} on the surface of an {@link Ellipsoid}.
* There are no guarantees about the orientation of the bounding box.
- *
* @param {Rectangle} rectangle The cartographic rectangle on the surface of the ellipsoid.
* @param {number} [minimumHeight=0.0] The minimum height (elevation) within the tile.
* @param {number} [maximumHeight=0.0] The maximum height (elevation) within the tile.
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the rectangle is defined.
* @param {OrientedBoundingBox} [result] The object onto which to store the result.
* @returns {OrientedBoundingBox} The modified result parameter or a new OrientedBoundingBox instance if none was provided.
- *
- * @exception {DeveloperError} rectangle.width must be between 0 and 2 * pi.
- * @exception {DeveloperError} rectangle.height must be between 0 and pi.
- * @exception {DeveloperError} ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)
+ * @throws {DeveloperError} rectangle.width must be between 0 and 2 * pi.
+ * @throws {DeveloperError} rectangle.height must be between 0 and pi.
+ * @throws {DeveloperError} ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)
*/
OrientedBoundingBox.fromRectangle = function (
rectangle,
@@ -612,7 +601,6 @@ OrientedBoundingBox.fromRectangle = function (
/**
* Computes an OrientedBoundingBox that bounds an affine transformation.
- *
* @param {Matrix4} transformation The affine transformation.
* @param {OrientedBoundingBox} [result] The object onto which to store the result.
* @returns {OrientedBoundingBox} The modified result parameter or a new OrientedBoundingBox instance if none was provided.
@@ -638,7 +626,6 @@ OrientedBoundingBox.fromTransformation = function (transformation, result) {
/**
* Duplicates a OrientedBoundingBox instance.
- *
* @param {OrientedBoundingBox} box The bounding box to duplicate.
* @param {OrientedBoundingBox} [result] The object onto which to store the result.
* @returns {OrientedBoundingBox} The modified result parameter or a new OrientedBoundingBox instance if none was provided. (Returns undefined if box is undefined)
@@ -660,7 +647,6 @@ OrientedBoundingBox.clone = function (box, result) {
/**
* Determines which side of a plane the oriented bounding box is located.
- *
* @param {OrientedBoundingBox} box The oriented bounding box to test.
* @param {Plane} plane The plane to test against.
* @returns {Intersect} {@link Intersect.INSIDE} if the entire box is on the side of the plane
@@ -723,11 +709,9 @@ const scratchPPrime = new Cartesian3();
/**
* Computes the estimated distance squared from the closest point on a bounding box to a point.
- *
* @param {OrientedBoundingBox} box The box.
* @param {Cartesian3} cartesian The point
* @returns {number} The distance squared from the oriented bounding box to the point. Returns 0 if the point is inside the box.
- *
* @example
* // Sort bounding boxes from back to front
* boxes.sort(function(a, b) {
@@ -882,7 +866,6 @@ const scratchToCenter = new Cartesian3();
*
* If you imagine the infinite number of planes with normal direction, this computes the smallest distance to the
* closest and farthest planes from position that intersect the bounding box.
- *
* @param {OrientedBoundingBox} box The bounding box to calculate the distance to.
* @param {Cartesian3} position The position to calculate the distance from.
* @param {Cartesian3} direction The direction from position.
@@ -1022,7 +1005,6 @@ const scratchZAxis = new Cartesian3();
/**
* Computes the eight corners of an oriented bounding box. The corners are ordered by (-X, -Y, -Z), (-X, -Y, +Z), (-X, +Y, -Z), (-X, +Y, +Z), (+X, -Y, -Z), (+X, -Y, +Z), (+X, +Y, -Z), (+X, +Y, +Z).
- *
* @param {OrientedBoundingBox} box The oriented bounding box.
* @param {Cartesian3[]} [result] An array of eight {@link Cartesian3} instances onto which to store the corners.
* @returns {Cartesian3[]} The modified result parameter or a new array if none was provided.
@@ -1098,7 +1080,6 @@ const scratchRotationScale = new Matrix3();
/**
* Computes a transformation matrix from an oriented bounding box.
- *
* @param {OrientedBoundingBox} box The oriented bounding box.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter or a new {@link Matrix4} instance if none was provided.
@@ -1125,7 +1106,6 @@ const scratchBoundingSphere = new BoundingSphere();
/**
* Determines whether or not a bounding box is hidden from view by the occluder.
- *
* @param {OrientedBoundingBox} box The bounding box surrounding the occludee object.
* @param {Occluder} occluder The occluder.
* @returns {boolean} true if the box is not visible; otherwise false.
@@ -1150,7 +1130,6 @@ OrientedBoundingBox.isOccluded = function (box, occluder) {
/**
* Determines which side of a plane the oriented bounding box is located.
- *
* @param {Plane} plane The plane to test against.
* @returns {Intersect} {@link Intersect.INSIDE} if the entire box is on the side of the plane
* the normal is pointing, {@link Intersect.OUTSIDE} if the entire box is
@@ -1163,10 +1142,8 @@ OrientedBoundingBox.prototype.intersectPlane = function (plane) {
/**
* Computes the estimated distance squared from the closest point on a bounding box to a point.
- *
* @param {Cartesian3} cartesian The point
* @returns {number} The estimated distance squared from the bounding sphere to the point.
- *
* @example
* // Sort bounding boxes from back to front
* boxes.sort(function(a, b) {
@@ -1182,7 +1159,6 @@ OrientedBoundingBox.prototype.distanceSquaredTo = function (cartesian) {
*
* If you imagine the infinite number of planes with normal direction, this computes the smallest distance to the
* closest and farthest planes from position that intersect the bounding box.
- *
* @param {Cartesian3} position The position to calculate the distance from.
* @param {Cartesian3} direction The direction from position.
* @param {Interval} [result] A Interval to store the nearest and farthest distances.
@@ -1203,7 +1179,6 @@ OrientedBoundingBox.prototype.computePlaneDistances = function (
/**
* Computes the eight corners of an oriented bounding box. The corners are ordered by (-X, -Y, -Z), (-X, -Y, +Z), (-X, +Y, -Z), (-X, +Y, +Z), (+X, -Y, -Z), (+X, -Y, +Z), (+X, +Y, -Z), (+X, +Y, +Z).
- *
* @param {Cartesian3[]} [result] An array of eight {@link Cartesian3} instances onto which to store the corners.
* @returns {Cartesian3[]} The modified result parameter or a new array if none was provided.
*/
@@ -1213,7 +1188,6 @@ OrientedBoundingBox.prototype.computeCorners = function (result) {
/**
* Computes a transformation matrix from an oriented bounding box.
- *
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter or a new {@link Matrix4} instance if none was provided.
*/
@@ -1223,7 +1197,6 @@ OrientedBoundingBox.prototype.computeTransformation = function (result) {
/**
* Determines whether or not a bounding box is hidden from view by the occluder.
- *
* @param {Occluder} occluder The occluder.
* @returns {boolean} true if the sphere is not visible; otherwise false.
*/
@@ -1234,7 +1207,6 @@ OrientedBoundingBox.prototype.isOccluded = function (occluder) {
/**
* Compares the provided OrientedBoundingBox componentwise and returns
* true if they are equal, false otherwise.
- *
* @param {OrientedBoundingBox} left The first OrientedBoundingBox.
* @param {OrientedBoundingBox} right The second OrientedBoundingBox.
* @returns {boolean} true if left and right are equal, false otherwise.
@@ -1251,7 +1223,6 @@ OrientedBoundingBox.equals = function (left, right) {
/**
* Duplicates this OrientedBoundingBox instance.
- *
* @param {OrientedBoundingBox} [result] The object onto which to store the result.
* @returns {OrientedBoundingBox} The modified result parameter or a new OrientedBoundingBox instance if one was not provided.
*/
@@ -1262,7 +1233,6 @@ OrientedBoundingBox.prototype.clone = function (result) {
/**
* Compares this OrientedBoundingBox against the provided OrientedBoundingBox componentwise and returns
* true if they are equal, false otherwise.
- *
* @param {OrientedBoundingBox} [right] The right hand side OrientedBoundingBox.
* @returns {boolean} true if they are equal, false otherwise.
*/
diff --git a/packages/engine/Source/Core/OrthographicFrustum.js b/packages/engine/Source/Core/OrthographicFrustum.js
index e94dcb868101..b63733ac8a34 100644
--- a/packages/engine/Source/Core/OrthographicFrustum.js
+++ b/packages/engine/Source/Core/OrthographicFrustum.js
@@ -10,16 +10,13 @@ import OrthographicOffCenterFrustum from "./OrthographicOffCenterFrustum.js";
* Each plane is represented by a {@link Cartesian4} object, where the x, y, and z components
* define the unit vector normal to the plane, and the w component is the distance of the
* plane from the origin/camera position.
- *
* @alias OrthographicFrustum
- * @constructor
- *
+ * @class
* @param {object} [options] An object with the following properties:
* @param {number} [options.width] The width of the frustum in meters.
* @param {number} [options.aspectRatio] The aspect ratio of the frustum's width to it's height.
* @param {number} [options.near=1.0] The distance of the near plane.
* @param {number} [options.far=500000000.0] The distance of the far plane.
- *
* @example
* const maxRadii = ellipsoid.maximumRadius;
*
@@ -73,11 +70,9 @@ OrthographicFrustum.packedLength = 4;
/**
* Stores the provided instance into the provided array.
- *
* @param {OrthographicFrustum} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
OrthographicFrustum.pack = function (value, array, startingIndex) {
@@ -98,7 +93,6 @@ OrthographicFrustum.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {OrthographicFrustum} [result] The object into which to store the result.
@@ -201,12 +195,10 @@ Object.defineProperties(OrthographicFrustum.prototype, {
/**
* Creates a culling volume for this frustum.
- *
* @param {Cartesian3} position The eye position.
* @param {Cartesian3} direction The view direction.
* @param {Cartesian3} up The up direction.
* @returns {CullingVolume} A culling volume at the given position and orientation.
- *
* @example
* // Check if a bounding volume intersects the frustum.
* const cullingVolume = frustum.computeCullingVolume(cameraPosition, cameraDirection, cameraUp);
@@ -223,18 +215,15 @@ OrthographicFrustum.prototype.computeCullingVolume = function (
/**
* Returns the pixel's width and height in meters.
- *
* @param {number} drawingBufferWidth The width of the drawing buffer.
* @param {number} drawingBufferHeight The height of the drawing buffer.
* @param {number} distance The distance to the near plane in meters.
* @param {number} pixelRatio The scaling factor from pixel space to coordinate space.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new instance of {@link Cartesian2} with the pixel's width and height in the x and y properties, respectively.
- *
- * @exception {DeveloperError} drawingBufferWidth must be greater than zero.
- * @exception {DeveloperError} drawingBufferHeight must be greater than zero.
- * @exception {DeveloperError} pixelRatio must be greater than zero.
- *
+ * @throws {DeveloperError} drawingBufferWidth must be greater than zero.
+ * @throws {DeveloperError} drawingBufferHeight must be greater than zero.
+ * @throws {DeveloperError} pixelRatio must be greater than zero.
* @example
* // Example 1
* // Get the width and height of a pixel.
@@ -259,7 +248,6 @@ OrthographicFrustum.prototype.getPixelDimensions = function (
/**
* Returns a duplicate of a OrthographicFrustum instance.
- *
* @param {OrthographicFrustum} [result] The object onto which to store the result.
* @returns {OrthographicFrustum} The modified result parameter or a new OrthographicFrustum instance if one was not provided.
*/
@@ -287,7 +275,6 @@ OrthographicFrustum.prototype.clone = function (result) {
/**
* Compares the provided OrthographicFrustum componentwise and returns
* true if they are equal, false otherwise.
- *
* @param {OrthographicFrustum} [other] The right hand side OrthographicFrustum.
* @returns {boolean} true if they are equal, false otherwise.
*/
@@ -310,7 +297,6 @@ OrthographicFrustum.prototype.equals = function (other) {
* Compares the provided OrthographicFrustum componentwise and returns
* true if they pass an absolute or relative tolerance test,
* false otherwise.
- *
* @param {OrthographicFrustum} other The right hand side OrthographicFrustum.
* @param {number} relativeEpsilon The relative epsilon tolerance to use for equality testing.
* @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
diff --git a/packages/engine/Source/Core/OrthographicOffCenterFrustum.js b/packages/engine/Source/Core/OrthographicOffCenterFrustum.js
index b99d0c5065bf..d1d3bb8eb20b 100644
--- a/packages/engine/Source/Core/OrthographicOffCenterFrustum.js
+++ b/packages/engine/Source/Core/OrthographicOffCenterFrustum.js
@@ -12,10 +12,8 @@ import Matrix4 from "./Matrix4.js";
* Each plane is represented by a {@link Cartesian4} object, where the x, y, and z components
* define the unit vector normal to the plane, and the w component is the distance of the
* plane from the origin/camera position.
- *
* @alias OrthographicOffCenterFrustum
- * @constructor
- *
+ * @class
* @param {object} [options] An object with the following properties:
* @param {number} [options.left] The left clipping plane distance.
* @param {number} [options.right] The right clipping plane distance.
@@ -23,7 +21,6 @@ import Matrix4 from "./Matrix4.js";
* @param {number} [options.bottom] The bottom clipping plane distance.
* @param {number} [options.near=1.0] The near clipping plane distance.
* @param {number} [options.far=500000000.0] The far clipping plane distance.
- *
* @example
* const maxRadii = ellipsoid.maximumRadius;
*
@@ -168,12 +165,10 @@ const negateScratch = new Cartesian3();
/**
* Creates a culling volume for this frustum.
- *
* @param {Cartesian3} position The eye position.
* @param {Cartesian3} direction The view direction.
* @param {Cartesian3} up The up direction.
* @returns {CullingVolume} A culling volume at the given position and orientation.
- *
* @example
* // Check if a bounding volume intersects the frustum.
* const cullingVolume = frustum.computeCullingVolume(cameraPosition, cameraDirection, cameraUp);
@@ -292,18 +287,15 @@ OrthographicOffCenterFrustum.prototype.computeCullingVolume = function (
/**
* Returns the pixel's width and height in meters.
- *
* @param {number} drawingBufferWidth The width of the drawing buffer.
* @param {number} drawingBufferHeight The height of the drawing buffer.
* @param {number} distance The distance to the near plane in meters.
* @param {number} pixelRatio The scaling factor from pixel space to coordinate space.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new instance of {@link Cartesian2} with the pixel's width and height in the x and y properties, respectively.
- *
- * @exception {DeveloperError} drawingBufferWidth must be greater than zero.
- * @exception {DeveloperError} drawingBufferHeight must be greater than zero.
- * @exception {DeveloperError} pixelRatio must be greater than zero.
- *
+ * @throws {DeveloperError} drawingBufferWidth must be greater than zero.
+ * @throws {DeveloperError} drawingBufferHeight must be greater than zero.
+ * @throws {DeveloperError} pixelRatio must be greater than zero.
* @example
* // Example 1
* // Get the width and height of a pixel.
@@ -356,7 +348,6 @@ OrthographicOffCenterFrustum.prototype.getPixelDimensions = function (
/**
* Returns a duplicate of a OrthographicOffCenterFrustum instance.
- *
* @param {OrthographicOffCenterFrustum} [result] The object onto which to store the result.
* @returns {OrthographicOffCenterFrustum} The modified result parameter or a new OrthographicOffCenterFrustum instance if one was not provided.
*/
@@ -386,7 +377,6 @@ OrthographicOffCenterFrustum.prototype.clone = function (result) {
/**
* Compares the provided OrthographicOffCenterFrustum componentwise and returns
* true if they are equal, false otherwise.
- *
* @param {OrthographicOffCenterFrustum} [other] The right hand side OrthographicOffCenterFrustum.
* @returns {boolean} true if they are equal, false otherwise.
*/
@@ -407,7 +397,6 @@ OrthographicOffCenterFrustum.prototype.equals = function (other) {
* Compares the provided OrthographicOffCenterFrustum componentwise and returns
* true if they pass an absolute or relative tolerance test,
* false otherwise.
- *
* @param {OrthographicOffCenterFrustum} other The right hand side OrthographicOffCenterFrustum.
* @param {number} relativeEpsilon The relative epsilon tolerance to use for equality testing.
* @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
diff --git a/packages/engine/Source/Core/Packable.js b/packages/engine/Source/Core/Packable.js
index ef167bed20d1..4ec3aad0171e 100644
--- a/packages/engine/Source/Core/Packable.js
+++ b/packages/engine/Source/Core/Packable.js
@@ -4,9 +4,7 @@ import DeveloperError from "./DeveloperError.js";
* Static interface for types which can store their values as packed
* elements in an array. These methods and properties are expected to be
* defined on a constructor function.
- *
* @interface Packable
- *
* @see PackableForInterpolation
*/
const Packable = {
@@ -19,7 +17,6 @@ const Packable = {
/**
* Stores the provided instance into the provided array.
* @function
- *
* @param {*} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
@@ -29,7 +26,6 @@ const Packable = {
/**
* Retrieves an instance from a packed array.
* @function
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {object} [result] The object into which to store the result.
diff --git a/packages/engine/Source/Core/PackableForInterpolation.js b/packages/engine/Source/Core/PackableForInterpolation.js
index 11e4a3885884..bb0de34fed5c 100644
--- a/packages/engine/Source/Core/PackableForInterpolation.js
+++ b/packages/engine/Source/Core/PackableForInterpolation.js
@@ -4,9 +4,7 @@ import DeveloperError from "./DeveloperError.js";
* Static interface for {@link Packable} types which are interpolated in a
* different representation than their packed value. These methods and
* properties are expected to be defined on a constructor function.
- *
* @namespace PackableForInterpolation
- *
* @see Packable
*/
const PackableForInterpolation = {
@@ -19,7 +17,6 @@ const PackableForInterpolation = {
/**
* Converts a packed array into a form suitable for interpolation.
* @function
- *
* @param {number[]} packedArray The packed array.
* @param {number} [startingIndex=0] The index of the first element to be converted.
* @param {number} [lastIndex=packedArray.length] The index of the last element to be converted.
@@ -30,7 +27,6 @@ const PackableForInterpolation = {
/**
* Retrieves an instance from a packed array converted with {@link PackableForInterpolation.convertPackedArrayForInterpolation}.
* @function
- *
* @param {number[]} array The array previously packed for interpolation.
* @param {number[]} sourceArray The original packed array.
* @param {number} [startingIndex=0] The startingIndex used to convert the array.
diff --git a/packages/engine/Source/Core/PeliasGeocoderService.js b/packages/engine/Source/Core/PeliasGeocoderService.js
index 30da8c2c43c1..54e1a65ba704 100644
--- a/packages/engine/Source/Core/PeliasGeocoderService.js
+++ b/packages/engine/Source/Core/PeliasGeocoderService.js
@@ -8,10 +8,8 @@ import Resource from "./Resource.js";
/**
* Provides geocoding via a {@link https://pelias.io/|Pelias} server.
* @alias PeliasGeocoderService
- * @constructor
- *
+ * @class
* @param {Resource|string} url The endpoint to the Pelias server.
- *
* @example
* // Configure a Viewer to use the Pelias server hosted by https://geocode.earth/
* const viewer = new Cesium.Viewer('cesiumContainer', {
@@ -60,7 +58,6 @@ Object.defineProperties(PeliasGeocoderService.prototype, {
/**
* @function
- *
* @param {string} query The query to be sent to the geocoder service
* @param {GeocodeType} [type=GeocodeType.SEARCH] The type of geocode to perform.
* @returns {Promise}
diff --git a/packages/engine/Source/Core/PerspectiveFrustum.js b/packages/engine/Source/Core/PerspectiveFrustum.js
index 0442961c533f..c16dcb093313 100644
--- a/packages/engine/Source/Core/PerspectiveFrustum.js
+++ b/packages/engine/Source/Core/PerspectiveFrustum.js
@@ -10,10 +10,8 @@ import PerspectiveOffCenterFrustum from "./PerspectiveOffCenterFrustum.js";
* Each plane is represented by a {@link Cartesian4} object, where the x, y, and z components
* define the unit vector normal to the plane, and the w component is the distance of the
* plane from the origin/camera position.
- *
* @alias PerspectiveFrustum
- * @constructor
- *
+ * @class
* @param {object} [options] An object with the following properties:
* @param {number} [options.fov] The angle of the field of view (FOV), in radians.
* @param {number} [options.aspectRatio] The aspect ratio of the frustum's width to it's height.
@@ -21,7 +19,6 @@ import PerspectiveOffCenterFrustum from "./PerspectiveOffCenterFrustum.js";
* @param {number} [options.far=500000000.0] The distance of the far plane.
* @param {number} [options.xOffset=0.0] The offset in the x direction.
* @param {number} [options.yOffset=0.0] The offset in the y direction.
- *
* @example
* const frustum = new Cesium.PerspectiveFrustum({
* fov : Cesium.Math.PI_OVER_THREE,
@@ -29,7 +26,6 @@ import PerspectiveOffCenterFrustum from "./PerspectiveOffCenterFrustum.js";
* near : 1.0,
* far : 1000.0
* });
- *
* @see PerspectiveOffCenterFrustum
*/
function PerspectiveFrustum(options) {
@@ -99,11 +95,9 @@ PerspectiveFrustum.packedLength = 6;
/**
* Stores the provided instance into the provided array.
- *
* @param {PerspectiveFrustum} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
PerspectiveFrustum.pack = function (value, array, startingIndex) {
@@ -126,7 +120,6 @@ PerspectiveFrustum.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {PerspectiveFrustum} [result] The object into which to store the result.
@@ -225,7 +218,6 @@ Object.defineProperties(PerspectiveFrustum.prototype, {
* @memberof PerspectiveFrustum.prototype
* @type {Matrix4}
* @readonly
- *
* @see PerspectiveFrustum#infiniteProjectionMatrix
*/
projectionMatrix: {
@@ -240,7 +232,6 @@ Object.defineProperties(PerspectiveFrustum.prototype, {
* @memberof PerspectiveFrustum.prototype
* @type {Matrix4}
* @readonly
- *
* @see PerspectiveFrustum#projectionMatrix
*/
infiniteProjectionMatrix: {
@@ -292,12 +283,10 @@ Object.defineProperties(PerspectiveFrustum.prototype, {
/**
* Creates a culling volume for this frustum.
- *
* @param {Cartesian3} position The eye position.
* @param {Cartesian3} direction The view direction.
* @param {Cartesian3} up The up direction.
* @returns {CullingVolume} A culling volume at the given position and orientation.
- *
* @example
* // Check if a bounding volume intersects the frustum.
* const cullingVolume = frustum.computeCullingVolume(cameraPosition, cameraDirection, cameraUp);
@@ -314,23 +303,19 @@ PerspectiveFrustum.prototype.computeCullingVolume = function (
/**
* Returns the pixel's width and height in meters.
- *
* @param {number} drawingBufferWidth The width of the drawing buffer.
* @param {number} drawingBufferHeight The height of the drawing buffer.
* @param {number} distance The distance to the near plane in meters.
* @param {number} pixelRatio The scaling factor from pixel space to coordinate space.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new instance of {@link Cartesian2} with the pixel's width and height in the x and y properties, respectively.
- *
- * @exception {DeveloperError} drawingBufferWidth must be greater than zero.
- * @exception {DeveloperError} drawingBufferHeight must be greater than zero.
- * @exception {DeveloperError} pixelRatio must be greater than zero.
- *
+ * @throws {DeveloperError} drawingBufferWidth must be greater than zero.
+ * @throws {DeveloperError} drawingBufferHeight must be greater than zero.
+ * @throws {DeveloperError} pixelRatio must be greater than zero.
* @example
* // Example 1
* // Get the width and height of a pixel.
* const pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, 1.0, scene.pixelRatio, new Cesium.Cartesian2());
- *
* @example
* // Example 2
* // Get the width and height of a pixel if the near plane was set to 'distance'.
@@ -361,7 +346,6 @@ PerspectiveFrustum.prototype.getPixelDimensions = function (
/**
* Returns a duplicate of a PerspectiveFrustum instance.
- *
* @param {PerspectiveFrustum} [result] The object onto which to store the result.
* @returns {PerspectiveFrustum} The modified result parameter or a new PerspectiveFrustum instance if one was not provided.
*/
@@ -389,7 +373,6 @@ PerspectiveFrustum.prototype.clone = function (result) {
/**
* Compares the provided PerspectiveFrustum componentwise and returns
* true if they are equal, false otherwise.
- *
* @param {PerspectiveFrustum} [other] The right hand side PerspectiveFrustum.
* @returns {boolean} true if they are equal, false otherwise.
*/
@@ -412,7 +395,6 @@ PerspectiveFrustum.prototype.equals = function (other) {
* Compares the provided PerspectiveFrustum componentwise and returns
* true if they pass an absolute or relative tolerance test,
* false otherwise.
- *
* @param {PerspectiveFrustum} other The right hand side PerspectiveFrustum.
* @param {number} relativeEpsilon The relative epsilon tolerance to use for equality testing.
* @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
diff --git a/packages/engine/Source/Core/PerspectiveOffCenterFrustum.js b/packages/engine/Source/Core/PerspectiveOffCenterFrustum.js
index 00339b199d60..e62e0de93fc2 100644
--- a/packages/engine/Source/Core/PerspectiveOffCenterFrustum.js
+++ b/packages/engine/Source/Core/PerspectiveOffCenterFrustum.js
@@ -12,10 +12,8 @@ import Matrix4 from "./Matrix4.js";
* Each plane is represented by a {@link Cartesian4} object, where the x, y, and z components
* define the unit vector normal to the plane, and the w component is the distance of the
* plane from the origin/camera position.
- *
* @alias PerspectiveOffCenterFrustum
- * @constructor
- *
+ * @class
* @param {object} [options] An object with the following properties:
* @param {number} [options.left] The left clipping plane distance.
* @param {number} [options.right] The right clipping plane distance.
@@ -23,7 +21,6 @@ import Matrix4 from "./Matrix4.js";
* @param {number} [options.bottom] The bottom clipping plane distance.
* @param {number} [options.near=1.0] The near clipping plane distance.
* @param {number} [options.far=500000000.0] The far clipping plane distance.
- *
* @example
* const frustum = new Cesium.PerspectiveOffCenterFrustum({
* left : -1.0,
@@ -33,7 +30,6 @@ import Matrix4 from "./Matrix4.js";
* near : 1.0,
* far : 100.0
* });
- *
* @see PerspectiveFrustum
*/
function PerspectiveOffCenterFrustum(options) {
@@ -163,7 +159,6 @@ Object.defineProperties(PerspectiveOffCenterFrustum.prototype, {
* @memberof PerspectiveOffCenterFrustum.prototype
* @type {Matrix4}
* @readonly
- *
* @see PerspectiveOffCenterFrustum#infiniteProjectionMatrix
*/
projectionMatrix: {
@@ -178,7 +173,6 @@ Object.defineProperties(PerspectiveOffCenterFrustum.prototype, {
* @memberof PerspectiveOffCenterFrustum.prototype
* @type {Matrix4}
* @readonly
- *
* @see PerspectiveOffCenterFrustum#projectionMatrix
*/
infiniteProjectionMatrix: {
@@ -195,12 +189,10 @@ const getPlanesFarCenter = new Cartesian3();
const getPlanesNormal = new Cartesian3();
/**
* Creates a culling volume for this frustum.
- *
* @param {Cartesian3} position The eye position.
* @param {Cartesian3} direction The view direction.
* @param {Cartesian3} up The up direction.
* @returns {CullingVolume} A culling volume at the given position and orientation.
- *
* @example
* // Check if a bounding volume intersects the frustum.
* const cullingVolume = frustum.computeCullingVolume(cameraPosition, cameraDirection, cameraUp);
@@ -338,23 +330,19 @@ PerspectiveOffCenterFrustum.prototype.computeCullingVolume = function (
/**
* Returns the pixel's width and height in meters.
- *
* @param {number} drawingBufferWidth The width of the drawing buffer.
* @param {number} drawingBufferHeight The height of the drawing buffer.
* @param {number} distance The distance to the near plane in meters.
* @param {number} pixelRatio The scaling factor from pixel space to coordinate space.
* @param {Cartesian2} result The object onto which to store the result.
* @returns {Cartesian2} The modified result parameter or a new instance of {@link Cartesian2} with the pixel's width and height in the x and y properties, respectively.
- *
- * @exception {DeveloperError} drawingBufferWidth must be greater than zero.
- * @exception {DeveloperError} drawingBufferHeight must be greater than zero.
- * @exception {DeveloperError} pixelRatio must be greater than zero.
- *
+ * @throws {DeveloperError} drawingBufferWidth must be greater than zero.
+ * @throws {DeveloperError} drawingBufferHeight must be greater than zero.
+ * @throws {DeveloperError} pixelRatio must be greater than zero.
* @example
* // Example 1
* // Get the width and height of a pixel.
* const pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, 1.0, scene.pixelRatio, new Cesium.Cartesian2());
- *
* @example
* // Example 2
* // Get the width and height of a pixel if the near plane was set to 'distance'.
@@ -416,7 +404,6 @@ PerspectiveOffCenterFrustum.prototype.getPixelDimensions = function (
/**
* Returns a duplicate of a PerspectiveOffCenterFrustum instance.
- *
* @param {PerspectiveOffCenterFrustum} [result] The object onto which to store the result.
* @returns {PerspectiveOffCenterFrustum} The modified result parameter or a new PerspectiveFrustum instance if one was not provided.
*/
@@ -446,7 +433,6 @@ PerspectiveOffCenterFrustum.prototype.clone = function (result) {
/**
* Compares the provided PerspectiveOffCenterFrustum componentwise and returns
* true if they are equal, false otherwise.
- *
* @param {PerspectiveOffCenterFrustum} [other] The right hand side PerspectiveOffCenterFrustum.
* @returns {boolean} true if they are equal, false otherwise.
*/
@@ -467,7 +453,6 @@ PerspectiveOffCenterFrustum.prototype.equals = function (other) {
* Compares the provided PerspectiveOffCenterFrustum componentwise and returns
* true if they pass an absolute or relative tolerance test,
* false otherwise.
- *
* @param {PerspectiveOffCenterFrustum} other The right hand side PerspectiveOffCenterFrustum.
* @param {number} relativeEpsilon The relative epsilon tolerance to use for equality testing.
* @param {number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
diff --git a/packages/engine/Source/Core/PinBuilder.js b/packages/engine/Source/Core/PinBuilder.js
index 143477b41c9d..56cd4b554faf 100644
--- a/packages/engine/Source/Core/PinBuilder.js
+++ b/packages/engine/Source/Core/PinBuilder.js
@@ -12,10 +12,8 @@ import writeTextToCanvas from "./writeTextToCanvas.js";
*
* Example pins generated using both the maki icon set, which ships with Cesium, and single character text.
*
- *
* @alias PinBuilder
- * @constructor
- *
+ * @class
* @demo {@link https://sandcastle.cesium.com/index.html?src=Map%20Pins.html|Cesium Sandcastle PinBuilder Demo}
*/
function PinBuilder() {
@@ -24,7 +22,6 @@ function PinBuilder() {
/**
* Creates an empty pin of the specified color and size.
- *
* @param {Color} color The color of the pin.
* @param {number} size The size of the pin, in pixels.
* @returns {HTMLCanvasElement} The canvas element that represents the generated pin.
@@ -43,7 +40,6 @@ PinBuilder.prototype.fromColor = function (color, size) {
/**
* Creates a pin with the specified icon, color, and size.
- *
* @param {Resource|string} url The url of the image to be stamped onto the pin.
* @param {Color} color The color of the pin.
* @param {number} size The size of the pin, in pixels.
@@ -66,7 +62,6 @@ PinBuilder.prototype.fromUrl = function (url, color, size) {
/**
* Creates a pin with the specified {@link https://www.mapbox.com/maki/|maki} icon identifier, color, and size.
- *
* @param {string} id The id of the maki icon to be stamped onto the pin.
* @param {Color} color The color of the pin.
* @param {number} size The size of the pin, in pixels.
@@ -96,7 +91,6 @@ PinBuilder.prototype.fromMakiIconId = function (id, color, size) {
/**
* Creates a pin with the specified text, color, and size. The text will be sized to be as large as possible
* while still being contained completely within the pin.
- *
* @param {string} text The text to be stamped onto the pin.
* @param {Color} color The color of the pin.
* @param {number} size The size of the pin, in pixels.
diff --git a/packages/engine/Source/Core/PixelFormat.js b/packages/engine/Source/Core/PixelFormat.js
index 6f7061252aa7..4a830b54c68b 100644
--- a/packages/engine/Source/Core/PixelFormat.js
+++ b/packages/engine/Source/Core/PixelFormat.js
@@ -3,13 +3,11 @@ import WebGLConstants from "./WebGLConstants.js";
/**
* The format of a pixel, i.e., the number of components it has and what they represent.
- *
* @enum {number}
*/
const PixelFormat = {
/**
* A pixel format containing a depth value.
- *
* @type {number}
* @constant
*/
@@ -17,7 +15,6 @@ const PixelFormat = {
/**
* A pixel format containing a depth and stencil value, most often used with {@link PixelDatatype.UNSIGNED_INT_24_8}.
- *
* @type {number}
* @constant
*/
@@ -25,7 +22,6 @@ const PixelFormat = {
/**
* A pixel format containing an alpha channel.
- *
* @type {number}
* @constant
*/
@@ -33,7 +29,6 @@ const PixelFormat = {
/**
* A pixel format containing a red channel
- *
* @type {number}
* @constant
*/
@@ -41,7 +36,6 @@ const PixelFormat = {
/**
* A pixel format containing red and green channels.
- *
* @type {number}
* @constant
*/
@@ -49,7 +43,6 @@ const PixelFormat = {
/**
* A pixel format containing red, green, and blue channels.
- *
* @type {number}
* @constant
*/
@@ -57,7 +50,6 @@ const PixelFormat = {
/**
* A pixel format containing red, green, blue, and alpha channels.
- *
* @type {number}
* @constant
*/
@@ -65,7 +57,6 @@ const PixelFormat = {
/**
* A pixel format containing a luminance (intensity) channel.
- *
* @type {number}
* @constant
*/
@@ -73,7 +64,6 @@ const PixelFormat = {
/**
* A pixel format containing luminance (intensity) and alpha channels.
- *
* @type {number}
* @constant
*/
@@ -81,7 +71,6 @@ const PixelFormat = {
/**
* A pixel format containing red, green, and blue channels that is DXT1 compressed.
- *
* @type {number}
* @constant
*/
@@ -89,7 +78,6 @@ const PixelFormat = {
/**
* A pixel format containing red, green, blue, and alpha channels that is DXT1 compressed.
- *
* @type {number}
* @constant
*/
@@ -97,7 +85,6 @@ const PixelFormat = {
/**
* A pixel format containing red, green, blue, and alpha channels that is DXT3 compressed.
- *
* @type {number}
* @constant
*/
@@ -105,7 +92,6 @@ const PixelFormat = {
/**
* A pixel format containing red, green, blue, and alpha channels that is DXT5 compressed.
- *
* @type {number}
* @constant
*/
@@ -113,7 +99,6 @@ const PixelFormat = {
/**
* A pixel format containing red, green, and blue channels that is PVR 4bpp compressed.
- *
* @type {number}
* @constant
*/
@@ -121,7 +106,6 @@ const PixelFormat = {
/**
* A pixel format containing red, green, and blue channels that is PVR 2bpp compressed.
- *
* @type {number}
* @constant
*/
@@ -129,7 +113,6 @@ const PixelFormat = {
/**
* A pixel format containing red, green, blue, and alpha channels that is PVR 4bpp compressed.
- *
* @type {number}
* @constant
*/
@@ -137,7 +120,6 @@ const PixelFormat = {
/**
* A pixel format containing red, green, blue, and alpha channels that is PVR 2bpp compressed.
- *
* @type {number}
* @constant
*/
@@ -145,7 +127,6 @@ const PixelFormat = {
/**
* A pixel format containing red, green, blue, and alpha channels that is ASTC compressed.
- *
* @type {number}
* @constant
*/
@@ -153,7 +134,6 @@ const PixelFormat = {
/**
* A pixel format containing red, green, and blue channels that is ETC1 compressed.
- *
* @type {number}
* @constant
*/
@@ -161,7 +141,6 @@ const PixelFormat = {
/**
* A pixel format containing red, green, and blue channels that is ETC2 compressed.
- *
* @type {number}
* @constant
*/
@@ -169,7 +148,6 @@ const PixelFormat = {
/**
* A pixel format containing red, green, blue, and alpha channels that is ETC2 compressed.
- *
* @type {number}
* @constant
*/
@@ -177,7 +155,6 @@ const PixelFormat = {
/**
* A pixel format containing red, green, blue, and alpha channels that is BC7 compressed.
- *
* @type {number}
* @constant
*/
@@ -185,6 +162,7 @@ const PixelFormat = {
};
/**
+ * @param pixelFormat
* @private
*/
PixelFormat.componentsLength = function (pixelFormat) {
@@ -206,6 +184,7 @@ PixelFormat.componentsLength = function (pixelFormat) {
};
/**
+ * @param pixelFormat
* @private
*/
PixelFormat.validate = function (pixelFormat) {
@@ -236,6 +215,7 @@ PixelFormat.validate = function (pixelFormat) {
};
/**
+ * @param pixelFormat
* @private
*/
PixelFormat.isColorFormat = function (pixelFormat) {
@@ -250,6 +230,7 @@ PixelFormat.isColorFormat = function (pixelFormat) {
};
/**
+ * @param pixelFormat
* @private
*/
PixelFormat.isDepthFormat = function (pixelFormat) {
@@ -260,6 +241,7 @@ PixelFormat.isDepthFormat = function (pixelFormat) {
};
/**
+ * @param pixelFormat
* @private
*/
PixelFormat.isCompressedFormat = function (pixelFormat) {
@@ -281,6 +263,7 @@ PixelFormat.isCompressedFormat = function (pixelFormat) {
};
/**
+ * @param pixelFormat
* @private
*/
PixelFormat.isDXTFormat = function (pixelFormat) {
@@ -293,6 +276,7 @@ PixelFormat.isDXTFormat = function (pixelFormat) {
};
/**
+ * @param pixelFormat
* @private
*/
PixelFormat.isPVRTCFormat = function (pixelFormat) {
@@ -305,6 +289,7 @@ PixelFormat.isPVRTCFormat = function (pixelFormat) {
};
/**
+ * @param pixelFormat
* @private
*/
PixelFormat.isASTCFormat = function (pixelFormat) {
@@ -312,6 +297,7 @@ PixelFormat.isASTCFormat = function (pixelFormat) {
};
/**
+ * @param pixelFormat
* @private
*/
PixelFormat.isETC1Format = function (pixelFormat) {
@@ -319,6 +305,7 @@ PixelFormat.isETC1Format = function (pixelFormat) {
};
/**
+ * @param pixelFormat
* @private
*/
PixelFormat.isETC2Format = function (pixelFormat) {
@@ -329,6 +316,7 @@ PixelFormat.isETC2Format = function (pixelFormat) {
};
/**
+ * @param pixelFormat
* @private
*/
PixelFormat.isBC7Format = function (pixelFormat) {
@@ -336,6 +324,9 @@ PixelFormat.isBC7Format = function (pixelFormat) {
};
/**
+ * @param pixelFormat
+ * @param width
+ * @param height
* @private
*/
PixelFormat.compressedTextureSizeInBytes = function (
@@ -375,6 +366,10 @@ PixelFormat.compressedTextureSizeInBytes = function (
};
/**
+ * @param pixelFormat
+ * @param pixelDatatype
+ * @param width
+ * @param height
* @private
*/
PixelFormat.textureSizeInBytes = function (
@@ -393,6 +388,9 @@ PixelFormat.textureSizeInBytes = function (
};
/**
+ * @param pixelFormat
+ * @param pixelDatatype
+ * @param width
* @private
*/
PixelFormat.alignmentInBytes = function (pixelFormat, pixelDatatype, width) {
@@ -435,6 +433,11 @@ PixelFormat.createTypedArray = function (
};
/**
+ * @param bufferView
+ * @param pixelFormat
+ * @param pixelDatatype
+ * @param width
+ * @param height
* @private
*/
PixelFormat.flipY = function (
@@ -466,6 +469,9 @@ PixelFormat.flipY = function (
};
/**
+ * @param pixelFormat
+ * @param pixelDatatype
+ * @param context
* @private
*/
PixelFormat.toInternalFormat = function (pixelFormat, pixelDatatype, context) {
diff --git a/packages/engine/Source/Core/Plane.js b/packages/engine/Source/Core/Plane.js
index ab9ee77567c9..39397903b8fb 100644
--- a/packages/engine/Source/Core/Plane.js
+++ b/packages/engine/Source/Core/Plane.js
@@ -14,22 +14,18 @@ import Matrix4 from "./Matrix4.js";
* where (a, b, c) is the plane's normal, d is the signed
* distance to the plane, and (x, y, z) is any point on
* the plane.
- *
* @alias Plane
- * @constructor
- *
+ * @class
* @param {Cartesian3} normal The plane's normal (normalized).
* @param {number} distance The shortest distance from the origin to the plane. The sign of
* distance determines which side of the plane the origin
* is on. If distance is positive, the origin is in the half-space
* in the direction of the normal; if negative, the origin is in the half-space
* opposite to the normal; if zero, the plane passes through the origin.
- *
* @example
* // The plane x=0
* const plane = new Cesium.Plane(Cesium.Cartesian3.UNIT_X, 0.0);
- *
- * @exception {DeveloperError} Normal must be normalized
+ * @throws {DeveloperError} Normal must be normalized
*/
function Plane(normal, distance) {
//>>includeStart('debug', pragmas.debug);
@@ -48,7 +44,6 @@ function Plane(normal, distance) {
/**
* The plane's normal.
- *
* @type {Cartesian3}
*/
this.normal = Cartesian3.clone(normal);
@@ -59,7 +54,6 @@ function Plane(normal, distance) {
* is on. If distance is positive, the origin is in the half-space
* in the direction of the normal; if negative, the origin is in the half-space
* opposite to the normal; if zero, the plane passes through the origin.
- *
* @type {number}
*/
this.distance = distance;
@@ -67,18 +61,15 @@ function Plane(normal, distance) {
/**
* Creates a plane from a normal and a point on the plane.
- *
* @param {Cartesian3} point The point on the plane.
* @param {Cartesian3} normal The plane's normal (normalized).
* @param {Plane} [result] The object onto which to store the result.
* @returns {Plane} A new plane instance or the modified result parameter.
- *
* @example
* const point = Cesium.Cartesian3.fromDegrees(-72.0, 40.0);
* const normal = ellipsoid.geodeticSurfaceNormal(point);
* const tangentPlane = Cesium.Plane.fromPointNormal(point, normal);
- *
- * @exception {DeveloperError} Normal must be normalized
+ * @throws {DeveloperError} Normal must be normalized
*/
Plane.fromPointNormal = function (point, normal, result) {
//>>includeStart('debug', pragmas.debug);
@@ -109,12 +100,10 @@ Plane.fromPointNormal = function (point, normal, result) {
const scratchNormal = new Cartesian3();
/**
* Creates a plane from the general equation
- *
* @param {Cartesian4} coefficients The plane's normal (normalized).
* @param {Plane} [result] The object onto which to store the result.
* @returns {Plane} A new plane instance or the modified result parameter.
- *
- * @exception {DeveloperError} Normal must be normalized
+ * @throws {DeveloperError} Normal must be normalized
*/
Plane.fromCartesian4 = function (coefficients, result) {
//>>includeStart('debug', pragmas.debug);
@@ -150,7 +139,6 @@ Plane.fromCartesian4 = function (coefficients, result) {
* is on. If the distance is positive, the point is in the half-space
* in the direction of the normal; if negative, the point is in the half-space
* opposite to the normal; if zero, the plane passes through the point.
- *
* @param {Plane} plane The plane.
* @param {Cartesian3} point The point.
* @returns {number} The signed shortest distance of the point to the plane.
@@ -198,7 +186,6 @@ const scratchPlaneCartesian4 = new Cartesian4();
const scratchTransformNormal = new Cartesian3();
/**
* Transforms the plane by the given transformation matrix.
- *
* @param {Plane} plane The plane.
* @param {Matrix4} transform The transformation matrix.
* @param {Plane} [result] The object into which to store the result.
@@ -246,7 +233,6 @@ Plane.transform = function (plane, transform, result) {
/**
* Duplicates a Plane instance.
- *
* @param {Plane} plane The plane to duplicate.
* @param {Plane} [result] The object onto which to store the result.
* @returns {Plane} The modified result parameter or a new Plane instance if one was not provided.
@@ -269,7 +255,6 @@ Plane.clone = function (plane, result) {
/**
* Compares the provided Planes by normal and distance and returns
* true if they are equal, false otherwise.
- *
* @param {Plane} left The first plane.
* @param {Plane} right The second plane.
* @returns {boolean} true if left and right are equal, false otherwise.
@@ -288,7 +273,6 @@ Plane.equals = function (left, right) {
/**
* A constant initialized to the XY plane passing through the origin, with normal in positive Z.
- *
* @type {Plane}
* @constant
*/
@@ -296,7 +280,6 @@ Plane.ORIGIN_XY_PLANE = Object.freeze(new Plane(Cartesian3.UNIT_Z, 0.0));
/**
* A constant initialized to the YZ plane passing through the origin, with normal in positive X.
- *
* @type {Plane}
* @constant
*/
@@ -304,7 +287,6 @@ Plane.ORIGIN_YZ_PLANE = Object.freeze(new Plane(Cartesian3.UNIT_X, 0.0));
/**
* A constant initialized to the ZX plane passing through the origin, with normal in positive Y.
- *
* @type {Plane}
* @constant
*/
diff --git a/packages/engine/Source/Core/PlaneGeometry.js b/packages/engine/Source/Core/PlaneGeometry.js
index 8bc861fd149f..9921269bed7d 100644
--- a/packages/engine/Source/Core/PlaneGeometry.js
+++ b/packages/engine/Source/Core/PlaneGeometry.js
@@ -12,13 +12,10 @@ import VertexFormat from "./VertexFormat.js";
/**
* Describes geometry representing a plane centered at the origin, with a unit width and length.
- *
* @alias PlaneGeometry
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
* @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
- *
* @example
* const planeGeometry = new Cesium.PlaneGeometry({
* vertexFormat : Cesium.VertexFormat.POSITION_ONLY
@@ -41,11 +38,9 @@ PlaneGeometry.packedLength = VertexFormat.packedLength;
/**
* Stores the provided instance into the provided array.
- *
* @param {PlaneGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
PlaneGeometry.pack = function (value, array, startingIndex) {
@@ -68,7 +63,6 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {PlaneGeometry} [result] The object into which to store the result.
@@ -101,7 +95,6 @@ const max = new Cartesian3(0.5, 0.5, 0.0);
/**
* Computes the geometric representation of a plane, including its vertices, indices, and a bounding sphere.
- *
* @param {PlaneGeometry} planeGeometry A description of the plane.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/PlaneOutlineGeometry.js b/packages/engine/Source/Core/PlaneOutlineGeometry.js
index e116db3d6fe2..05dea4631a63 100644
--- a/packages/engine/Source/Core/PlaneOutlineGeometry.js
+++ b/packages/engine/Source/Core/PlaneOutlineGeometry.js
@@ -10,10 +10,8 @@ import PrimitiveType from "./PrimitiveType.js";
/**
* Describes geometry representing the outline of a plane centered at the origin, with a unit width and length.
- *
* @alias PlaneOutlineGeometry
- * @constructor
- *
+ * @class
*/
function PlaneOutlineGeometry() {
this._workerName = "createPlaneOutlineGeometry";
@@ -27,10 +25,8 @@ PlaneOutlineGeometry.packedLength = 0;
/**
* Stores the provided instance into the provided array.
- *
* @param {PlaneOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
- *
* @returns {number[]} The array that was packed into
*/
PlaneOutlineGeometry.pack = function (value, array) {
@@ -44,7 +40,6 @@ PlaneOutlineGeometry.pack = function (value, array) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {PlaneOutlineGeometry} [result] The object into which to store the result.
@@ -67,7 +62,6 @@ const max = new Cartesian3(0.5, 0.5, 0.0);
/**
* Computes the geometric representation of an outline of a plane, including its vertices, indices, and a bounding sphere.
- *
* @returns {Geometry|undefined} The computed vertices and indices.
*/
PlaneOutlineGeometry.createGeometry = function () {
diff --git a/packages/engine/Source/Core/PolygonGeometry.js b/packages/engine/Source/Core/PolygonGeometry.js
index 6e8e9988dead..7d872d7e9a67 100644
--- a/packages/engine/Source/Core/PolygonGeometry.js
+++ b/packages/engine/Source/Core/PolygonGeometry.js
@@ -575,10 +575,8 @@ function createGeometryFromPositionsExtruded(
/**
* A description of a polygon on the ellipsoid. The polygon is defined by a polygon hierarchy. Polygon geometry can be rendered with both {@link Primitive} and {@link GroundPrimitive}.
- *
* @alias PolygonGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {PolygonHierarchy} options.polygonHierarchy A polygon hierarchy that can include holes.
* @param {number} [options.height=0.0] The distance in meters between the polygon and the ellipsoid surface.
@@ -592,12 +590,9 @@ function createGeometryFromPositionsExtruded(
* @param {boolean} [options.closeBottom=true] When false, leaves off the bottom of an extruded polygon open.
* @param {ArcType} [options.arcType=ArcType.GEODESIC] The type of line the polygon edges must follow. Valid options are {@link ArcType.GEODESIC} and {@link ArcType.RHUMB}.
* @param {PolygonHierarchy} [options.textureCoordinates] Texture coordinates as a {@link PolygonHierarchy} of {@link Cartesian2} points. Has no effect for ground primitives.
- *
* @see PolygonGeometry#createGeometry
* @see PolygonGeometry#fromPositions
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Polygon.html|Cesium Sandcastle Polygon Demo}
- *
* @example
* // 1. create a polygon from points
* const polygon = new Cesium.PolygonGeometry({
@@ -752,7 +747,6 @@ function PolygonGeometry(options) {
/**
* A description of a polygon from an array of positions. Polygon geometry can be rendered with both {@link Primitive} and {@link GroundPrimitive}.
- *
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of positions that defined the corner points of the polygon.
* @param {number} [options.height=0.0] The height of the polygon.
@@ -767,7 +761,6 @@ function PolygonGeometry(options) {
* @param {ArcType} [options.arcType=ArcType.GEODESIC] The type of line the polygon edges must follow. Valid options are {@link ArcType.GEODESIC} and {@link ArcType.RHUMB}.
* @param {PolygonHierarchy} [options.textureCoordinates] Texture coordinates as a {@link PolygonHierarchy} of {@link Cartesian2} points. Has no effect for ground primitives.
* @returns {PolygonGeometry}
- *
* @example
* // create a polygon from points
* const polygon = Cesium.PolygonGeometry.fromPositions({
@@ -780,7 +773,6 @@ function PolygonGeometry(options) {
* ])
* });
* const geometry = Cesium.PolygonGeometry.createGeometry(polygon);
- *
* @see PolygonGeometry#createGeometry
*/
PolygonGeometry.fromPositions = function (options) {
@@ -812,11 +804,9 @@ PolygonGeometry.fromPositions = function (options) {
/**
* Stores the provided instance into the provided array.
- *
* @param {PolygonGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
PolygonGeometry.pack = function (value, array, startingIndex) {
@@ -875,7 +865,6 @@ const dummyOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {PolygonGeometry} [result] The object into which to store the result.
@@ -1038,12 +1027,10 @@ const polygon = {
/**
* Computes a rectangle which encloses the polygon defined by the list of positions, including cases over the international date line and the poles.
- *
* @param {Cartesian3[]} positions A linear ring defining the outer boundary of the polygon.
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
* @param {ArcType} [arcType=ArcType.GEODESIC] The type of line the polygon edges must follow. Valid options are {@link ArcType.GEODESIC} and {@link ArcType.RHUMB}.
* @param {Rectangle} [result] An object in which to store the result.
- *
* @returns {Rectangle} The result rectangle
*/
PolygonGeometry.computeRectangleFromPositions = function (
@@ -1271,7 +1258,6 @@ function computeBoundingRectangle(outerRing, rectangle, ellipsoid, stRotation) {
/**
* Computes the geometric representation of a polygon, including its vertices, indices, and a bounding sphere.
- *
* @param {PolygonGeometry} polygonGeometry A description of the polygon.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
@@ -1502,6 +1488,9 @@ PolygonGeometry.createGeometry = function (polygonGeometry) {
};
/**
+ * @param polygonGeometry
+ * @param minHeightFunc
+ * @param maxHeightFunc
* @private
*/
PolygonGeometry.createShadowVolume = function (
diff --git a/packages/engine/Source/Core/PolygonGeometryLibrary.js b/packages/engine/Source/Core/PolygonGeometryLibrary.js
index 2381d80d4e73..287d1f72b25a 100644
--- a/packages/engine/Source/Core/PolygonGeometryLibrary.js
+++ b/packages/engine/Source/Core/PolygonGeometryLibrary.js
@@ -190,14 +190,12 @@ PolygonGeometryLibrary.subdivideRhumbLineCount = function (
/**
* Subdivides texture coordinates based on the subdivision of the associated world positions.
- *
* @param {Cartesian2} t0 First texture coordinate.
* @param {Cartesian2} t1 Second texture coordinate.
* @param {Cartesian3} p0 First world position.
* @param {Cartesian3} p1 Second world position.
* @param {number} minDistance Minimum distance for a segment.
* @param {Cartesian2[]} result The subdivided texture coordinates.
- *
* @private
*/
PolygonGeometryLibrary.subdivideTexcoordLine = function (
@@ -263,7 +261,6 @@ PolygonGeometryLibrary.subdivideLine = function (p0, p1, minDistance, result) {
/**
* Subdivides texture coordinates based on the subdivision of the associated world positions using a rhumb line.
- *
* @param {Cartesian2} t0 First texture coordinate.
* @param {Cartesian2} t1 Second texture coordinate.
* @param {Ellipsoid} ellipsoid The ellipsoid.
@@ -271,7 +268,6 @@ PolygonGeometryLibrary.subdivideLine = function (p0, p1, minDistance, result) {
* @param {Cartesian3} p1 Second world position.
* @param {number} minDistance Minimum distance for a segment.
* @param {Cartesian2[]} result The subdivided texture coordinates.
- *
* @private
*/
PolygonGeometryLibrary.subdivideTexcoordRhumbLine = function (
@@ -687,12 +683,10 @@ function wirePolygon(
/**
* Splits an array of polygons, defined as a list of Cartesian3 positions in counter-clockwise winding order, along the equator.
- *
* @param {Array} outerRings An array of polygons, defined as a list of Cartesian3 positions in counter-clockwise winding order.
* @param {Ellipsoid} ellipsoid The ellipsoid to be used as a reference.
* @param {ArcType} arcType The type of line the polygon edges must follow. Valid options are {@link ArcType.GEODESIC} and {@link ArcType.RHUMB}.
* @param {Array} [result] An array of split polygons.
- *
* @returns {Array} An array of split polygons.
*/
PolygonGeometryLibrary.splitPolygonsOnEquator = function (
diff --git a/packages/engine/Source/Core/PolygonHierarchy.js b/packages/engine/Source/Core/PolygonHierarchy.js
index a1751f6f7284..92aff2c5f4c3 100644
--- a/packages/engine/Source/Core/PolygonHierarchy.js
+++ b/packages/engine/Source/Core/PolygonHierarchy.js
@@ -4,8 +4,7 @@ import defined from "./defined.js";
* An hierarchy of linear rings which define a polygon and its holes.
* The holes themselves may also have holes which nest inner polygons.
* @alias PolygonHierarchy
- * @constructor
- *
+ * @class
* @param {Cartesian3[]} [positions] A linear ring defining the outer boundary of the polygon or hole.
* @param {PolygonHierarchy[]} [holes] An array of polygon hierarchies defining holes in the polygon.
*/
diff --git a/packages/engine/Source/Core/PolygonOutlineGeometry.js b/packages/engine/Source/Core/PolygonOutlineGeometry.js
index 14c235d55c48..cb42c8494167 100644
--- a/packages/engine/Source/Core/PolygonOutlineGeometry.js
+++ b/packages/engine/Source/Core/PolygonOutlineGeometry.js
@@ -264,10 +264,8 @@ function createGeometryFromPositionsExtruded(
/**
* A description of the outline of a polygon on the ellipsoid. The polygon is defined by a polygon hierarchy.
- *
* @alias PolygonOutlineGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {PolygonHierarchy} options.polygonHierarchy A polygon hierarchy that can include holes.
* @param {number} [options.height=0.0] The distance in meters between the polygon and the ellipsoid surface.
@@ -277,10 +275,8 @@ function createGeometryFromPositionsExtruded(
* @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
* @param {boolean} [options.perPositionHeight=false] Use the height of options.positions for each position instead of using options.height to determine the height.
* @param {ArcType} [options.arcType=ArcType.GEODESIC] The type of path the outline must follow. Valid options are {@link ArcType.GEODESIC} and {@link ArcType.RHUMB}.
- *
* @see PolygonOutlineGeometry#createGeometry
* @see PolygonOutlineGeometry#fromPositions
- *
* @example
* // 1. create a polygon outline from points
* const polygon = new Cesium.PolygonOutlineGeometry({
@@ -415,11 +411,9 @@ function PolygonOutlineGeometry(options) {
/**
* Stores the provided instance into the provided array.
- *
* @param {PolygonOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
PolygonOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -459,7 +453,6 @@ const dummyOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {PolygonOutlineGeometry} [result] The object into which to store the result.
@@ -513,7 +506,6 @@ PolygonOutlineGeometry.unpack = function (array, startingIndex, result) {
/**
* A description of a polygon outline from an array of positions.
- *
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of positions that defined the corner points of the polygon.
* @param {number} [options.height=0.0] The height of the polygon.
@@ -523,8 +515,6 @@ PolygonOutlineGeometry.unpack = function (array, startingIndex, result) {
* @param {boolean} [options.perPositionHeight=false] Use the height of options.positions for each position instead of using options.height to determine the height.
* @param {ArcType} [options.arcType=ArcType.GEODESIC] The type of path the outline must follow. Valid options are {@link LinkType.GEODESIC} and {@link ArcType.RHUMB}.
* @returns {PolygonOutlineGeometry}
- *
- *
* @example
* // create a polygon from points
* const polygon = Cesium.PolygonOutlineGeometry.fromPositions({
@@ -537,7 +527,6 @@ PolygonOutlineGeometry.unpack = function (array, startingIndex, result) {
* ])
* });
* const geometry = Cesium.PolygonOutlineGeometry.createGeometry(polygon);
- *
* @see PolygonOutlineGeometry#createGeometry
*/
PolygonOutlineGeometry.fromPositions = function (options) {
@@ -564,7 +553,6 @@ PolygonOutlineGeometry.fromPositions = function (options) {
/**
* Computes the geometric representation of a polygon outline, including its vertices, indices, and a bounding sphere.
- *
* @param {PolygonOutlineGeometry} polygonGeometry A description of the polygon outline.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/PolygonPipeline.js b/packages/engine/Source/Core/PolygonPipeline.js
index 539c656f8d29..75a1898e3554 100644
--- a/packages/engine/Source/Core/PolygonPipeline.js
+++ b/packages/engine/Source/Core/PolygonPipeline.js
@@ -23,7 +23,8 @@ const scaleToGeodeticHeightP = new Cartesian3();
const PolygonPipeline = {};
/**
- * @exception {DeveloperError} At least three positions are required.
+ * @param positions
+ * @throws {DeveloperError} At least three positions are required.
*/
PolygonPipeline.computeArea2D = function (positions) {
//>>includeStart('debug', pragmas.debug);
@@ -49,9 +50,9 @@ PolygonPipeline.computeArea2D = function (positions) {
};
/**
+ * @param positions
* @returns {WindingOrder} The winding order.
- *
- * @exception {DeveloperError} At least three positions are required.
+ * @throws {DeveloperError} At least three positions are required.
*/
PolygonPipeline.computeWindingOrder2D = function (positions) {
const area = PolygonPipeline.computeArea2D(positions);
@@ -60,7 +61,6 @@ PolygonPipeline.computeWindingOrder2D = function (positions) {
/**
* Triangulate a polygon.
- *
* @param {Cartesian2[]} positions Cartesian2 array containing the vertices of the polygon
* @param {number[]} [holes] An array of the staring indices of the holes.
* @returns {number[]} Index array representing triangles that fill the polygon
@@ -88,16 +88,14 @@ const subdivisionTexcoordMidScratch = new Cartesian2();
/**
* Subdivides positions and raises points to the surface of the ellipsoid.
- *
* @param {Ellipsoid} ellipsoid The ellipsoid the polygon in on.
* @param {Cartesian3[]} positions An array of {@link Cartesian3} positions of the polygon.
* @param {number[]} indices An array of indices that determines the triangles in the polygon.
* @param {Cartesian2[]} texcoords An optional array of {@link Cartesian2} texture coordinates of the polygon.
* @param {number} [granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- *
- * @exception {DeveloperError} At least three indices are required.
- * @exception {DeveloperError} The number of indices must be divisable by three.
- * @exception {DeveloperError} Granularity must be greater than zero.
+ * @throws {DeveloperError} At least three indices are required.
+ * @throws {DeveloperError} The number of indices must be divisable by three.
+ * @throws {DeveloperError} Granularity must be greater than zero.
*/
PolygonPipeline.computeSubdivision = function (
ellipsoid,
@@ -323,16 +321,14 @@ const subdivisionCartographicScratch = new Cartographic();
/**
* Subdivides positions on rhumb lines and raises points to the surface of the ellipsoid.
- *
* @param {Ellipsoid} ellipsoid The ellipsoid the polygon in on.
* @param {Cartesian3[]} positions An array of {@link Cartesian3} positions of the polygon.
* @param {number[]} indices An array of indices that determines the triangles in the polygon.
* @param {Cartesian2[]} texcoords An optional array of {@link Cartesian2} texture coordinates of the polygon.
* @param {number} [granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
- *
- * @exception {DeveloperError} At least three indices are required.
- * @exception {DeveloperError} The number of indices must be divisable by three.
- * @exception {DeveloperError} Granularity must be greater than zero.
+ * @throws {DeveloperError} At least three indices are required.
+ * @throws {DeveloperError} The number of indices must be divisable by three.
+ * @throws {DeveloperError} Granularity must be greater than zero.
*/
PolygonPipeline.computeRhumbLineSubdivision = function (
ellipsoid,
@@ -584,7 +580,6 @@ PolygonPipeline.computeRhumbLineSubdivision = function (
/**
* Scales each position of a geometry's position attribute to a height, in place.
- *
* @param {number[]} positions The array of numbers representing the positions to be scaled
* @param {number} [height=0.0] The desired height to add to the positions
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the positions lie.
diff --git a/packages/engine/Source/Core/PolylineGeometry.js b/packages/engine/Source/Core/PolylineGeometry.js
index a5f50ef1680a..38632af49a83 100644
--- a/packages/engine/Source/Core/PolylineGeometry.js
+++ b/packages/engine/Source/Core/PolylineGeometry.js
@@ -63,10 +63,8 @@ function interpolateColors(p0, p1, color0, color1, numPoints) {
* A description of a polyline modeled as a line strip; the first two positions define a line segment,
* and each additional position defines a line segment from the previous position. The polyline is capable of
* displaying with a material.
- *
* @alias PolylineGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of {@link Cartesian3} defining the positions in the polyline as a line strip.
* @param {number} [options.width=1.0] The width in pixels.
@@ -76,15 +74,11 @@ function interpolateColors(p0, p1, color0, color1, numPoints) {
* @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude if options.arcType is not ArcType.NONE. Determines the number of positions in the buffer.
* @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
- *
- * @exception {DeveloperError} At least two positions are required.
- * @exception {DeveloperError} width must be greater than or equal to one.
- * @exception {DeveloperError} colors has an invalid length.
- *
+ * @throws {DeveloperError} At least two positions are required.
+ * @throws {DeveloperError} width must be greater than or equal to one.
+ * @throws {DeveloperError} colors has an invalid length.
* @see PolylineGeometry#createGeometry
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Polyline.html|Cesium Sandcastle Polyline Demo}
- *
* @example
* // A polyline with two connected line segments
* const polyline = new Cesium.PolylineGeometry({
@@ -151,11 +145,9 @@ function PolylineGeometry(options) {
/**
* Stores the provided instance into the provided array.
- *
* @param {PolylineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
PolylineGeometry.pack = function (value, array, startingIndex) {
@@ -217,7 +209,6 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {PolylineGeometry} [result] The object into which to store the result.
@@ -292,7 +283,6 @@ const scratchNextPosition = new Cartesian3();
/**
* Computes the geometric representation of a polyline, including its vertices, indices, and a bounding sphere.
- *
* @param {PolylineGeometry} polylineGeometry A description of the polyline.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/PolylinePipeline.js b/packages/engine/Source/Core/PolylinePipeline.js
index dccbae1ec08f..a07455177683 100644
--- a/packages/engine/Source/Core/PolylinePipeline.js
+++ b/packages/engine/Source/Core/PolylinePipeline.js
@@ -182,7 +182,6 @@ function generateCartesianRhumbArc(
/**
* Breaks a {@link Polyline} into segments such that it does not cross the ±180 degree meridian of an ellipsoid.
- *
* @param {Cartesian3[]} positions The polyline's Cartesian positions.
* @param {Matrix4} [modelMatrix=Matrix4.IDENTITY] The polyline's model matrix. Assumed to be an affine
* transformation matrix, where the upper left 3x3 elements are a rotation matrix, and
@@ -190,15 +189,12 @@ function generateCartesianRhumbArc(
* The matrix is not verified to be in the proper form.
* @returns {object} An object with a positions property that is an array of positions and a
* segments property.
- *
- *
* @example
* const polylines = new Cesium.PolylineCollection();
* const polyline = polylines.add(...);
* const positions = polyline.positions;
* const modelMatrix = polylines.modelMatrix;
* const segments = Cesium.PolylinePipeline.wrapLongitude(positions, modelMatrix);
- *
* @see PolygonPipeline.wrapLongitude
* @see Polyline
* @see PolylineCollection
@@ -313,7 +309,6 @@ PolylinePipeline.wrapLongitude = function (positions, modelMatrix) {
* @param {number} [options.granularity = CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the positions lie.
* @returns {number[]} A new array of positions of type {number} that have been subdivided and raised to the surface of the ellipsoid.
- *
* @example
* const positions = Cesium.Cartesian3.fromDegreesArray([
* -105.0, 40.0,
@@ -420,7 +415,6 @@ const scratchCartographic1 = new Cartographic();
* @param {number} [options.granularity = CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the positions lie.
* @returns {number[]} A new array of positions of type {number} that have been subdivided and raised to the surface of the ellipsoid.
- *
* @example
* const positions = Cesium.Cartesian3.fromDegreesArray([
* -105.0, 40.0,
@@ -526,7 +520,6 @@ PolylinePipeline.generateRhumbArc = function (options) {
* @param {number} [options.granularity = CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the positions lie.
* @returns {Cartesian3[]} A new array of cartesian3 positions that have been subdivided and raised to the surface of the ellipsoid.
- *
* @example
* const positions = Cesium.Cartesian3.fromDegreesArray([
* -105.0, 40.0,
@@ -556,7 +549,6 @@ PolylinePipeline.generateCartesianArc = function (options) {
* @param {number} [options.granularity = CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the positions lie.
* @returns {Cartesian3[]} A new array of cartesian3 positions that have been subdivided and raised to the surface of the ellipsoid.
- *
* @example
* const positions = Cesium.Cartesian3.fromDegreesArray([
* -105.0, 40.0,
diff --git a/packages/engine/Source/Core/PolylineVolumeGeometry.js b/packages/engine/Source/Core/PolylineVolumeGeometry.js
index fe5aa704bbfc..65ddf0c56333 100644
--- a/packages/engine/Source/Core/PolylineVolumeGeometry.js
+++ b/packages/engine/Source/Core/PolylineVolumeGeometry.js
@@ -171,10 +171,8 @@ function computeAttributes(
/**
* A description of a polyline with a volume (a 2D shape extruded along a polyline).
- *
* @alias PolylineVolumeGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.polylinePositions An array of {@link Cartesian3} positions that define the center of the polyline volume.
* @param {Cartesian2[]} options.shapePositions An array of {@link Cartesian2} positions that define the shape to be extruded along the polyline
@@ -182,11 +180,8 @@ function computeAttributes(
* @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
* @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
* @param {CornerType} [options.cornerType=CornerType.ROUNDED] Determines the style of the corners.
- *
* @see PolylineVolumeGeometry#createGeometry
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Polyline%20Volume.html|Cesium Sandcastle Polyline Volume Demo}
- *
* @example
* function computeCircle(radius) {
* const positions = [];
@@ -248,11 +243,9 @@ function PolylineVolumeGeometry(options) {
/**
* Stores the provided instance into the provided array.
- *
* @param {PolylineVolumeGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
PolylineVolumeGeometry.pack = function (value, array, startingIndex) {
@@ -310,7 +303,6 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {PolylineVolumeGeometry} [result] The object into which to store the result.
@@ -376,7 +368,6 @@ const brScratch = new BoundingRectangle();
/**
* Computes the geometric representation of a polyline with a volume, including its vertices, indices, and a bounding sphere.
- *
* @param {PolylineVolumeGeometry} polylineVolumeGeometry A description of the polyline volume.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/PolylineVolumeOutlineGeometry.js b/packages/engine/Source/Core/PolylineVolumeOutlineGeometry.js
index facd80c11dfd..7e986881a420 100644
--- a/packages/engine/Source/Core/PolylineVolumeOutlineGeometry.js
+++ b/packages/engine/Source/Core/PolylineVolumeOutlineGeometry.js
@@ -76,19 +76,15 @@ function computeAttributes(positions, shape) {
/**
* A description of a polyline with a volume (a 2D shape extruded along a polyline).
- *
* @alias PolylineVolumeOutlineGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.polylinePositions An array of positions that define the center of the polyline volume.
* @param {Cartesian2[]} options.shapePositions An array of positions that define the shape to be extruded along the polyline
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
* @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
* @param {CornerType} [options.cornerType=CornerType.ROUNDED] Determines the style of the corners.
- *
* @see PolylineVolumeOutlineGeometry#createGeometry
- *
* @example
* function computeCircle(radius) {
* const positions = [];
@@ -145,11 +141,9 @@ function PolylineVolumeOutlineGeometry(options) {
/**
* Stores the provided instance into the provided array.
- *
* @param {PolylineVolumeOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
PolylineVolumeOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -203,7 +197,6 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {PolylineVolumeOutlineGeometry} [result] The object into which to store the result.
@@ -261,7 +254,6 @@ const brScratch = new BoundingRectangle();
/**
* Computes the geometric representation of the outline of a polyline with a volume, including its vertices, indices, and a bounding sphere.
- *
* @param {PolylineVolumeOutlineGeometry} polylineVolumeOutlineGeometry A description of the polyline volume outline.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/PrimitiveType.js b/packages/engine/Source/Core/PrimitiveType.js
index 9be8354aa0b7..b1e464032a11 100644
--- a/packages/engine/Source/Core/PrimitiveType.js
+++ b/packages/engine/Source/Core/PrimitiveType.js
@@ -2,13 +2,11 @@ import WebGLConstants from "./WebGLConstants.js";
/**
* The type of a geometric primitive, i.e., points, lines, and triangles.
- *
* @enum {number}
*/
const PrimitiveType = {
/**
* Points primitive where each vertex (or index) is a separate point.
- *
* @type {number}
* @constant
*/
@@ -16,7 +14,6 @@ const PrimitiveType = {
/**
* Lines primitive where each two vertices (or indices) is a line segment. Line segments are not necessarily connected.
- *
* @type {number}
* @constant
*/
@@ -25,7 +22,6 @@ const PrimitiveType = {
/**
* Line loop primitive where each vertex (or index) after the first connects a line to
* the previous vertex, and the last vertex implicitly connects to the first.
- *
* @type {number}
* @constant
*/
@@ -33,7 +29,6 @@ const PrimitiveType = {
/**
* Line strip primitive where each vertex (or index) after the first connects a line to the previous vertex.
- *
* @type {number}
* @constant
*/
@@ -41,7 +36,6 @@ const PrimitiveType = {
/**
* Triangles primitive where each three vertices (or indices) is a triangle. Triangles do not necessarily share edges.
- *
* @type {number}
* @constant
*/
@@ -50,7 +44,6 @@ const PrimitiveType = {
/**
* Triangle strip primitive where each vertex (or index) after the first two connect to
* the previous two vertices forming a triangle. For example, this can be used to model a wall.
- *
* @type {number}
* @constant
*/
@@ -60,7 +53,6 @@ const PrimitiveType = {
* Triangle fan primitive where each vertex (or index) after the first two connect to
* the previous vertex and the first vertex forming a triangle. For example, this can be used
* to model a cone or circle.
- *
* @type {number}
* @constant
*/
@@ -68,6 +60,7 @@ const PrimitiveType = {
};
/**
+ * @param primitiveType
* @private
*/
PrimitiveType.isLines = function (primitiveType) {
@@ -79,6 +72,7 @@ PrimitiveType.isLines = function (primitiveType) {
};
/**
+ * @param primitiveType
* @private
*/
PrimitiveType.isTriangles = function (primitiveType) {
@@ -90,6 +84,7 @@ PrimitiveType.isTriangles = function (primitiveType) {
};
/**
+ * @param primitiveType
* @private
*/
PrimitiveType.validate = function (primitiveType) {
diff --git a/packages/engine/Source/Core/Proxy.js b/packages/engine/Source/Core/Proxy.js
index c16a27f1ad1f..775cb7ce30aa 100644
--- a/packages/engine/Source/Core/Proxy.js
+++ b/packages/engine/Source/Core/Proxy.js
@@ -2,10 +2,8 @@ import DeveloperError from "./DeveloperError.js";
/**
* Base class for proxying requested made by {@link Resource}.
- *
* @alias Proxy
- * @constructor
- *
+ * @class
* @see DefaultProxy
*/
function Proxy() {
@@ -14,7 +12,6 @@ function Proxy() {
/**
* Get the final URL to use to request a given resource.
- *
* @param {string} resource The resource to request.
* @returns {string} proxied resource
* @function
diff --git a/packages/engine/Source/Core/QuadraticRealPolynomial.js b/packages/engine/Source/Core/QuadraticRealPolynomial.js
index 17a0fe1031f8..14515354dc0d 100644
--- a/packages/engine/Source/Core/QuadraticRealPolynomial.js
+++ b/packages/engine/Source/Core/QuadraticRealPolynomial.js
@@ -3,14 +3,12 @@ import CesiumMath from "./Math.js";
/**
* Defines functions for 2nd order polynomial functions of one variable with only real coefficients.
- *
* @namespace QuadraticRealPolynomial
*/
const QuadraticRealPolynomial = {};
/**
* Provides the discriminant of the quadratic equation from the supplied coefficients.
- *
* @param {number} a The coefficient of the 2nd order monomial.
* @param {number} b The coefficient of the 1st order monomial.
* @param {number} c The coefficient of the 0th order monomial.
@@ -47,7 +45,6 @@ function addWithCancellationCheck(left, right, tolerance) {
/**
* Provides the real valued roots of the quadratic polynomial with the provided coefficients.
- *
* @param {number} a The coefficient of the 2nd order monomial.
* @param {number} b The coefficient of the 1st order monomial.
* @param {number} c The coefficient of the 0th order monomial.
diff --git a/packages/engine/Source/Core/QuantizedMeshTerrainData.js b/packages/engine/Source/Core/QuantizedMeshTerrainData.js
index f3c8d45d7cad..4c14105d0a98 100644
--- a/packages/engine/Source/Core/QuantizedMeshTerrainData.js
+++ b/packages/engine/Source/Core/QuantizedMeshTerrainData.js
@@ -20,10 +20,8 @@ import TerrainMesh from "./TerrainMesh.js";
* as 16-bit values in the range 0 to 32767. Longitude and latitude are zero at the southwest corner
* of the tile and 32767 at the northeast corner. Height is zero at the minimum height in the tile
* and 32767 at the maximum height in the tile.
- *
* @alias QuantizedMeshTerrainData
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Uint16Array} options.quantizedVertices The buffer containing the quantized mesh.
* @param {Uint16Array|Uint32Array} options.indices The indices specifying how the quantized vertices are linked
@@ -59,8 +57,6 @@ import TerrainMesh from "./TerrainMesh.js";
* @param {Uint8Array} [options.encodedNormals] The buffer containing per vertex normals, encoded using 'oct' encoding
* @param {Uint8Array} [options.waterMask] The buffer containing the watermask.
* @param {Credit[]} [options.credits] Array of credits for this tile.
- *
- *
* @example
* const data = new Cesium.QuantizedMeshTerrainData({
* minimumHeight : -100,
@@ -86,7 +82,6 @@ import TerrainMesh from "./TerrainMesh.js";
* eastSkirtHeight : 1.0,
* northSkirtHeight : 1.0
* });
- *
* @see TerrainData
* @see HeightmapTerrainData
* @see GoogleEarthEnterpriseTerrainData
@@ -272,9 +267,7 @@ const createMeshTaskProcessorThrottle = new TaskProcessor(
/**
* Creates a {@link TerrainMesh} from this terrain data.
- *
* @private
- *
* @param {object} options Object with the following properties:
* @param {TilingScheme} options.tilingScheme The tiling scheme to which this tile belongs.
* @param {number} options.x The X coordinate of the tile for which to create the terrain data.
@@ -416,7 +409,6 @@ const upsampleTaskProcessor = new TaskProcessor(
/**
* Upsamples this terrain data for use by a descendant tile. The resulting instance will contain a subset of the
* vertices in this instance, interpolated if necessary.
- *
* @param {TilingScheme} tilingScheme The tiling scheme of this terrain data.
* @param {number} thisX The X coordinate of this tile in the tiling scheme.
* @param {number} thisY The Y coordinate of this tile in the tiling scheme.
@@ -561,7 +553,6 @@ const barycentricCoordinateScratch = new Cartesian3();
/**
* Computes the terrain height at a specified longitude and latitude.
- *
* @param {Rectangle} rectangle The rectangle covered by this terrain data.
* @param {number} longitude The longitude in radians.
* @param {number} latitude The latitude in radians.
@@ -719,7 +710,6 @@ function interpolateHeight(terrainData, u, v) {
* {@link HeightmapTerrainData.childTileMask}. The given child tile coordinates are assumed
* to be one of the four children of this tile. If non-child tile coordinates are
* given, the availability of the southeast child tile is returned.
- *
* @param {number} thisX The tile X coordinate of this (the parent) tile.
* @param {number} thisY The tile Y coordinate of this (the parent) tile.
* @param {number} childX The tile X coordinate of the child tile to check for availability.
@@ -763,7 +753,6 @@ QuantizedMeshTerrainData.prototype.isChildAvailable = function (
* terrain data. If this value is false, the data was obtained from some other source, such
* as by downloading it from a remote server. This method should return true for instances
* returned from a call to {@link HeightmapTerrainData#upsample}.
- *
* @returns {boolean} True if this instance was created by upsampling; otherwise, false.
*/
QuantizedMeshTerrainData.prototype.wasCreatedByUpsampling = function () {
diff --git a/packages/engine/Source/Core/QuarticRealPolynomial.js b/packages/engine/Source/Core/QuarticRealPolynomial.js
index c71888ad4fae..9d81a95087b7 100644
--- a/packages/engine/Source/Core/QuarticRealPolynomial.js
+++ b/packages/engine/Source/Core/QuarticRealPolynomial.js
@@ -5,14 +5,12 @@ import QuadraticRealPolynomial from "./QuadraticRealPolynomial.js";
/**
* Defines functions for 4th order polynomial functions of one variable with only real coefficients.
- *
* @namespace QuarticRealPolynomial
*/
const QuarticRealPolynomial = {};
/**
* Provides the discriminant of the quartic equation from the supplied coefficients.
- *
* @param {number} a The coefficient of the 4th order monomial.
* @param {number} b The coefficient of the 3rd order monomial.
* @param {number} c The coefficient of the 2nd order monomial.
@@ -262,7 +260,6 @@ function neumark(a3, a2, a1, a0) {
/**
* Provides the real valued roots of the quartic polynomial with the provided coefficients.
- *
* @param {number} a The coefficient of the 4th order monomial.
* @param {number} b The coefficient of the 3rd order monomial.
* @param {number} c The coefficient of the 2nd order monomial.
diff --git a/packages/engine/Source/Core/Quaternion.js b/packages/engine/Source/Core/Quaternion.js
index 333e353b7816..414945162f5f 100644
--- a/packages/engine/Source/Core/Quaternion.js
+++ b/packages/engine/Source/Core/Quaternion.js
@@ -9,13 +9,11 @@ import Matrix3 from "./Matrix3.js";
/**
* A set of 4-dimensional coordinates used to represent rotation in 3-dimensional space.
* @alias Quaternion
- * @constructor
- *
+ * @class
* @param {number} [x=0.0] The X component.
* @param {number} [y=0.0] The Y component.
* @param {number} [z=0.0] The Z component.
* @param {number} [w=0.0] The W component.
- *
* @see PackableForInterpolation
*/
function Quaternion(x, y, z, w) {
@@ -52,7 +50,6 @@ let fromAxisAngleScratch = new Cartesian3();
/**
* Computes a quaternion representing a rotation around an axis.
- *
* @param {Cartesian3} axis The axis of rotation.
* @param {number} angle The angle in radians to rotate around the axis.
* @param {Quaternion} [result] The object onto which to store the result.
@@ -86,11 +83,9 @@ const fromRotationMatrixNext = [1, 2, 0];
const fromRotationMatrixQuat = new Array(3);
/**
* Computes a Quaternion from the provided Matrix3 instance.
- *
* @param {Matrix3} matrix The rotation matrix.
* @param {Quaternion} [result] The object onto which to store the result.
* @returns {Quaternion} The modified result parameter or a new Quaternion instance if one was not provided.
- *
* @see Matrix3.fromQuaternion
*/
Quaternion.fromRotationMatrix = function (matrix, result) {
@@ -179,7 +174,6 @@ let scratchRollQuaternion = new Quaternion();
* Computes a rotation from the given heading, pitch and roll angles. Heading is the rotation about the
* negative z axis. Pitch is the rotation about the negative y axis. Roll is the rotation about
* the positive x axis.
- *
* @param {HeadingPitchRoll} headingPitchRoll The rotation expressed as a heading, pitch and roll.
* @param {Quaternion} [result] The object onto which to store the result.
* @returns {Quaternion} The modified result parameter or a new Quaternion instance if none was provided.
@@ -226,11 +220,9 @@ Quaternion.packedLength = 4;
/**
* Stores the provided instance into the provided array.
- *
* @param {Quaternion} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
Quaternion.pack = function (value, array, startingIndex) {
@@ -251,7 +243,6 @@ Quaternion.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {Quaternion} [result] The object into which to store the result.
@@ -282,7 +273,6 @@ Quaternion.packedInterpolationLength = 3;
/**
* Converts a packed array into a form suitable for interpolation.
- *
* @param {number[]} packedArray The packed array.
* @param {number} [startingIndex=0] The index of the first element to be converted.
* @param {number} [lastIndex=packedArray.length] The index of the last element to be converted.
@@ -341,7 +331,6 @@ Quaternion.convertPackedArrayForInterpolation = function (
/**
* Retrieves an instance from a packed array converted with {@link convertPackedArrayForInterpolation}.
- *
* @param {number[]} array The array previously packed for interpolation.
* @param {number[]} sourceArray The original packed array.
* @param {number} [firstIndex=0] The firstIndex used to convert the array.
@@ -383,7 +372,6 @@ Quaternion.unpackInterpolationResult = function (
/**
* Duplicates a Quaternion instance.
- *
* @param {Quaternion} quaternion The quaternion to duplicate.
* @param {Quaternion} [result] The object onto which to store the result.
* @returns {Quaternion} The modified result parameter or a new Quaternion instance if one was not provided. (Returns undefined if quaternion is undefined)
@@ -411,7 +399,6 @@ Quaternion.clone = function (quaternion, result) {
/**
* Computes the conjugate of the provided quaternion.
- *
* @param {Quaternion} quaternion The quaternion to conjugate.
* @param {Quaternion} result The object onto which to store the result.
* @returns {Quaternion} The modified result parameter.
@@ -431,7 +418,6 @@ Quaternion.conjugate = function (quaternion, result) {
/**
* Computes magnitude squared for the provided quaternion.
- *
* @param {Quaternion} quaternion The quaternion to conjugate.
* @returns {number} The magnitude squared.
*/
@@ -450,7 +436,6 @@ Quaternion.magnitudeSquared = function (quaternion) {
/**
* Computes magnitude for the provided quaternion.
- *
* @param {Quaternion} quaternion The quaternion to conjugate.
* @returns {number} The magnitude.
*/
@@ -460,7 +445,6 @@ Quaternion.magnitude = function (quaternion) {
/**
* Computes the normalized form of the provided quaternion.
- *
* @param {Quaternion} quaternion The quaternion to normalize.
* @param {Quaternion} result The object onto which to store the result.
* @returns {Quaternion} The modified result parameter.
@@ -485,7 +469,6 @@ Quaternion.normalize = function (quaternion, result) {
/**
* Computes the inverse of the provided quaternion.
- *
* @param {Quaternion} quaternion The quaternion to normalize.
* @param {Quaternion} result The object onto which to store the result.
* @returns {Quaternion} The modified result parameter.
@@ -502,7 +485,6 @@ Quaternion.inverse = function (quaternion, result) {
/**
* Computes the componentwise sum of two quaternions.
- *
* @param {Quaternion} left The first quaternion.
* @param {Quaternion} right The second quaternion.
* @param {Quaternion} result The object onto which to store the result.
@@ -524,7 +506,6 @@ Quaternion.add = function (left, right, result) {
/**
* Computes the componentwise difference of two quaternions.
- *
* @param {Quaternion} left The first quaternion.
* @param {Quaternion} right The second quaternion.
* @param {Quaternion} result The object onto which to store the result.
@@ -546,7 +527,6 @@ Quaternion.subtract = function (left, right, result) {
/**
* Negates the provided quaternion.
- *
* @param {Quaternion} quaternion The quaternion to be negated.
* @param {Quaternion} result The object onto which to store the result.
* @returns {Quaternion} The modified result parameter.
@@ -566,7 +546,6 @@ Quaternion.negate = function (quaternion, result) {
/**
* Computes the dot (scalar) product of two quaternions.
- *
* @param {Quaternion} left The first quaternion.
* @param {Quaternion} right The second quaternion.
* @returns {number} The dot product.
@@ -584,7 +563,6 @@ Quaternion.dot = function (left, right) {
/**
* Computes the product of two quaternions.
- *
* @param {Quaternion} left The first quaternion.
* @param {Quaternion} right The second quaternion.
* @param {Quaternion} result The object onto which to store the result.
@@ -621,7 +599,6 @@ Quaternion.multiply = function (left, right, result) {
/**
* Multiplies the provided quaternion componentwise by the provided scalar.
- *
* @param {Quaternion} quaternion The quaternion to be scaled.
* @param {number} scalar The scalar to multiply with.
* @param {Quaternion} result The object onto which to store the result.
@@ -643,7 +620,6 @@ Quaternion.multiplyByScalar = function (quaternion, scalar, result) {
/**
* Divides the provided quaternion componentwise by the provided scalar.
- *
* @param {Quaternion} quaternion The quaternion to be divided.
* @param {number} scalar The scalar to divide by.
* @param {Quaternion} result The object onto which to store the result.
@@ -665,7 +641,6 @@ Quaternion.divideByScalar = function (quaternion, scalar, result) {
/**
* Computes the axis of rotation of the provided quaternion.
- *
* @param {Quaternion} quaternion The quaternion to use.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
@@ -696,7 +671,6 @@ Quaternion.computeAxis = function (quaternion, result) {
/**
* Computes the angle of rotation of the provided quaternion.
- *
* @param {Quaternion} quaternion The quaternion to use.
* @returns {number} The angle of rotation.
*/
@@ -714,7 +688,6 @@ Quaternion.computeAngle = function (quaternion) {
let lerpScratch = new Quaternion();
/**
* Computes the linear interpolation or extrapolation at t using the provided quaternions.
- *
* @param {Quaternion} start The value corresponding to t at 0.0.
* @param {Quaternion} end The value corresponding to t at 1.0.
* @param {number} t The point along t at which to interpolate.
@@ -739,13 +712,11 @@ let slerpScaledP = new Quaternion();
let slerpScaledR = new Quaternion();
/**
* Computes the spherical linear interpolation or extrapolation at t using the provided quaternions.
- *
* @param {Quaternion} start The value corresponding to t at 0.0.
* @param {Quaternion} end The value corresponding to t at 1.0.
* @param {number} t The point along t at which to interpolate.
* @param {Quaternion} result The object onto which to store the result.
* @returns {Quaternion} The modified result parameter.
- *
* @see Quaternion#fastSlerp
*/
Quaternion.slerp = function (start, end, t, result) {
@@ -789,7 +760,6 @@ Quaternion.slerp = function (start, end, t, result) {
/**
* The logarithmic quaternion function.
- *
* @param {Quaternion} quaternion The unit quaternion.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
@@ -812,7 +782,6 @@ Quaternion.log = function (quaternion, result) {
/**
* The exponential quaternion function.
- *
* @param {Cartesian3} cartesian The cartesian.
* @param {Quaternion} result The object onto which to store the result.
* @returns {Quaternion} The modified result parameter.
@@ -846,13 +815,11 @@ const squadScratchQuaternion1 = new Quaternion();
/**
* Computes an inner quadrangle point.
*
This will compute quaternions that ensure a squad curve is C1.
- *
* @param {Quaternion} q0 The first quaternion.
* @param {Quaternion} q1 The second quaternion.
* @param {Quaternion} q2 The third quaternion.
* @param {Quaternion} result The object onto which to store the result.
* @returns {Quaternion} The modified result parameter.
- *
* @see Quaternion#squad
*/
Quaternion.computeInnerQuadrangle = function (q0, q1, q2, result) {
@@ -880,7 +847,6 @@ Quaternion.computeInnerQuadrangle = function (q0, q1, q2, result) {
/**
* Computes the spherical quadrangle interpolation between quaternions.
- *
* @param {Quaternion} q0 The first quaternion.
* @param {Quaternion} q1 The second quaternion.
* @param {Quaternion} s0 The first inner quadrangle.
@@ -888,8 +854,6 @@ Quaternion.computeInnerQuadrangle = function (q0, q1, q2, result) {
* @param {number} t The time in [0,1] used to interpolate.
* @param {Quaternion} result The object onto which to store the result.
* @returns {Quaternion} The modified result parameter.
- *
- *
* @example
* // 1. compute the squad interpolation between two quaternions on a curve
* const s0 = Cesium.Quaternion.computeInnerQuadrangle(quaternions[i - 1], quaternions[i], quaternions[i + 1], new Cesium.Quaternion());
@@ -899,7 +863,6 @@ Quaternion.computeInnerQuadrangle = function (q0, q1, q2, result) {
* // 2. compute the squad interpolation as above but where the first quaternion is a end point.
* const s1 = Cesium.Quaternion.computeInnerQuadrangle(quaternions[0], quaternions[1], quaternions[2], new Cesium.Quaternion());
* const q = Cesium.Quaternion.squad(quaternions[0], quaternions[1], quaternions[0], s1, t, new Cesium.Quaternion());
- *
* @see Quaternion#computeInnerQuadrangle
*/
Quaternion.squad = function (q0, q1, s0, s1, t, result) {
@@ -938,13 +901,11 @@ v[7] = (opmu * 8.0) / 17.0;
/**
* Computes the spherical linear interpolation or extrapolation at t using the provided quaternions.
* This implementation is faster than {@link Quaternion#slerp}, but is only accurate up to 10-6.
- *
* @param {Quaternion} start The value corresponding to t at 0.0.
* @param {Quaternion} end The value corresponding to t at 1.0.
* @param {number} t The point along t at which to interpolate.
* @param {Quaternion} result The object onto which to store the result.
* @returns {Quaternion} The modified result parameter.
- *
* @see Quaternion#slerp
*/
Quaternion.fastSlerp = function (start, end, t, result) {
@@ -1015,7 +976,6 @@ Quaternion.fastSlerp = function (start, end, t, result) {
/**
* Computes the spherical quadrangle interpolation between quaternions.
* An implementation that is faster than {@link Quaternion#squad}, but less accurate.
- *
* @param {Quaternion} q0 The first quaternion.
* @param {Quaternion} q1 The second quaternion.
* @param {Quaternion} s0 The first inner quadrangle.
@@ -1023,7 +983,6 @@ Quaternion.fastSlerp = function (start, end, t, result) {
* @param {number} t The time in [0,1] used to interpolate.
* @param {Quaternion} result The object onto which to store the result.
* @returns {Quaternion} The modified result parameter or a new instance if none was provided.
- *
* @see Quaternion#squad
*/
Quaternion.fastSquad = function (q0, q1, s0, s1, t, result) {
@@ -1044,7 +1003,6 @@ Quaternion.fastSquad = function (q0, q1, s0, s1, t, result) {
/**
* Compares the provided quaternions componentwise and returns
* true if they are equal, false otherwise.
- *
* @param {Quaternion} [left] The first quaternion.
* @param {Quaternion} [right] The second quaternion.
* @returns {boolean} true if left and right are equal, false otherwise.
@@ -1065,7 +1023,6 @@ Quaternion.equals = function (left, right) {
* Compares the provided quaternions componentwise and returns
* true if they are within the provided epsilon,
* false otherwise.
- *
* @param {Quaternion} [left] The first quaternion.
* @param {Quaternion} [right] The second quaternion.
* @param {number} [epsilon=0] The epsilon to use for equality testing.
@@ -1087,7 +1044,6 @@ Quaternion.equalsEpsilon = function (left, right, epsilon) {
/**
* An immutable Quaternion instance initialized to (0.0, 0.0, 0.0, 0.0).
- *
* @type {Quaternion}
* @constant
*/
@@ -1095,7 +1051,6 @@ Quaternion.ZERO = Object.freeze(new Quaternion(0.0, 0.0, 0.0, 0.0));
/**
* An immutable Quaternion instance initialized to (0.0, 0.0, 0.0, 1.0).
- *
* @type {Quaternion}
* @constant
*/
@@ -1103,7 +1058,6 @@ Quaternion.IDENTITY = Object.freeze(new Quaternion(0.0, 0.0, 0.0, 1.0));
/**
* Duplicates this Quaternion instance.
- *
* @param {Quaternion} [result] The object onto which to store the result.
* @returns {Quaternion} The modified result parameter or a new Quaternion instance if one was not provided.
*/
@@ -1114,7 +1068,6 @@ Quaternion.prototype.clone = function (result) {
/**
* Compares this and the provided quaternion componentwise and returns
* true if they are equal, false otherwise.
- *
* @param {Quaternion} [right] The right hand side quaternion.
* @returns {boolean} true if left and right are equal, false otherwise.
*/
@@ -1126,7 +1079,6 @@ Quaternion.prototype.equals = function (right) {
* Compares this and the provided quaternion componentwise and returns
* true if they are within the provided epsilon,
* false otherwise.
- *
* @param {Quaternion} [right] The right hand side quaternion.
* @param {number} [epsilon=0] The epsilon to use for equality testing.
* @returns {boolean} true if left and right are within the provided epsilon, false otherwise.
@@ -1137,7 +1089,6 @@ Quaternion.prototype.equalsEpsilon = function (right, epsilon) {
/**
* Returns a string representing this quaternion in the format (x, y, z, w).
- *
* @returns {string} A string representing this Quaternion.
*/
Quaternion.prototype.toString = function () {
diff --git a/packages/engine/Source/Core/QuaternionSpline.js b/packages/engine/Source/Core/QuaternionSpline.js
index a469c068c92f..1a236c4845cf 100644
--- a/packages/engine/Source/Core/QuaternionSpline.js
+++ b/packages/engine/Source/Core/QuaternionSpline.js
@@ -29,19 +29,15 @@ function createEvaluateFunction(spline) {
/**
* A spline that uses spherical linear (slerp) interpolation to create a quaternion curve.
* The generated curve is in the class C1.
- *
* @alias QuaternionSpline
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {number[]} options.times An array of strictly increasing, unit-less, floating-point times at each point.
* The values are in no way connected to the clock time. They are the parameterization for the curve.
* @param {Quaternion[]} options.points The array of {@link Quaternion} control points.
- *
- * @exception {DeveloperError} points and times are required
- * @exception {DeveloperError} points.length must be greater than or equal to 2.
- * @exception {DeveloperError} times.length must be equal to points.length.
-
+ * @throws {DeveloperError} points and times are required
+ * @throws {DeveloperError} points.length must be greater than or equal to 2.
+ * @throws {DeveloperError} times.length must be equal to points.length.
* @see ConstantSpline
* @see SteppedSpline
* @see HermiteSpline
@@ -79,9 +75,7 @@ function QuaternionSpline(options) {
Object.defineProperties(QuaternionSpline.prototype, {
/**
* An array of times for the control points.
- *
* @memberof QuaternionSpline.prototype
- *
* @type {number[]}
* @readonly
*/
@@ -93,9 +87,7 @@ Object.defineProperties(QuaternionSpline.prototype, {
/**
* An array of {@link Quaternion} control points.
- *
* @memberof QuaternionSpline.prototype
- *
* @type {Quaternion[]}
* @readonly
*/
@@ -110,11 +102,9 @@ Object.defineProperties(QuaternionSpline.prototype, {
* Finds an index i in times such that the parameter
* time is in the interval [times[i], times[i + 1]].
* @function
- *
* @param {number} time The time.
* @returns {number} The index for the element at the start of the interval.
- *
- * @exception {DeveloperError} time must be in the range [t0, tn], where t0
+ * @throws {DeveloperError} time must be in the range [t0, tn], where t0
* is the first element in the array times and tn is the last element
* in the array times.
*/
@@ -123,29 +113,25 @@ QuaternionSpline.prototype.findTimeInterval = Spline.prototype.findTimeInterval;
/**
* Wraps the given time to the period covered by the spline.
* @function
- *
* @param {number} time The time.
- * @return {number} The time, wrapped around to the updated animation.
+ * @returns {number} The time, wrapped around to the updated animation.
*/
QuaternionSpline.prototype.wrapTime = Spline.prototype.wrapTime;
/**
* Clamps the given time to the period covered by the spline.
* @function
- *
* @param {number} time The time.
- * @return {number} The time, clamped to the animation period.
+ * @returns {number} The time, clamped to the animation period.
*/
QuaternionSpline.prototype.clampTime = Spline.prototype.clampTime;
/**
* Evaluates the curve at a given time.
- *
* @param {number} time The time at which to evaluate the curve.
* @param {Quaternion} [result] The object onto which to store the result.
* @returns {Quaternion} The modified result parameter or a new instance of the point on the curve at the given time.
- *
- * @exception {DeveloperError} time must be in the range [t0, tn], where t0
+ * @throws {DeveloperError} time must be in the range [t0, tn], where t0
* is the first element in the array times and tn is the last element
* in the array times.
*/
diff --git a/packages/engine/Source/Core/Queue.js b/packages/engine/Source/Core/Queue.js
index b21cff76d1a4..6d46f8cc14d8 100644
--- a/packages/engine/Source/Core/Queue.js
+++ b/packages/engine/Source/Core/Queue.js
@@ -1,8 +1,7 @@
/**
* A queue that can enqueue items at the end, and dequeue items from the front.
- *
* @alias Queue
- * @constructor
+ * @class
*/
function Queue() {
this._array = [];
@@ -13,9 +12,7 @@ function Queue() {
Object.defineProperties(Queue.prototype, {
/**
* The length of the queue.
- *
* @memberof Queue.prototype
- *
* @type {number}
* @readonly
*/
@@ -28,7 +25,6 @@ Object.defineProperties(Queue.prototype, {
/**
* Enqueues the specified item.
- *
* @param {*} item The item to enqueue.
*/
Queue.prototype.enqueue = function (item) {
@@ -38,7 +34,6 @@ Queue.prototype.enqueue = function (item) {
/**
* Dequeues an item. Returns undefined if the queue is empty.
- *
* @returns {*} The the dequeued item.
*/
Queue.prototype.dequeue = function () {
@@ -66,7 +61,6 @@ Queue.prototype.dequeue = function () {
/**
* Returns the item at the front of the queue. Returns undefined if the queue is empty.
- *
* @returns {*} The item at the front of the queue.
*/
Queue.prototype.peek = function () {
@@ -79,7 +73,6 @@ Queue.prototype.peek = function () {
/**
* Check whether this queue contains the specified item.
- *
* @param {*} item The item to search for.
*/
Queue.prototype.contains = function (item) {
@@ -95,7 +88,6 @@ Queue.prototype.clear = function () {
/**
* Sort the items in the queue in-place.
- *
* @param {Queue.Comparator} compareFunction A function that defines the sort order.
*/
Queue.prototype.sort = function (compareFunction) {
@@ -111,13 +103,11 @@ Queue.prototype.sort = function (compareFunction) {
/**
* A function used to compare two items while sorting a queue.
* @callback Queue.Comparator
- *
* @param {*} a An item in the array.
* @param {*} b An item in the array.
* @returns {number} Returns a negative value if a is less than b,
* a positive value if a is greater than b, or
* 0 if a is equal to b.
- *
* @example
* function compareNumbers(a, b) {
* return a - b;
diff --git a/packages/engine/Source/Core/Ray.js b/packages/engine/Source/Core/Ray.js
index 6b63229d65b0..7e2335c45c10 100644
--- a/packages/engine/Source/Core/Ray.js
+++ b/packages/engine/Source/Core/Ray.js
@@ -6,8 +6,7 @@ import defined from "./defined.js";
/**
* Represents a ray that extends infinitely from the provided origin in the provided direction.
* @alias Ray
- * @constructor
- *
+ * @class
* @param {Cartesian3} [origin=Cartesian3.ZERO] The origin of the ray.
* @param {Cartesian3} [direction=Cartesian3.ZERO] The direction of the ray.
*/
@@ -33,7 +32,6 @@ function Ray(origin, direction) {
/**
* Duplicates a Ray instance.
- *
* @param {Ray} ray The ray to duplicate.
* @param {Ray} [result] The object onto which to store the result.
* @returns {Ray} The modified result parameter or a new Ray instance if one was not provided. (Returns undefined if ray is undefined)
@@ -53,12 +51,10 @@ Ray.clone = function (ray, result) {
/**
* Computes the point along the ray given by r(t) = o + t*d,
* where o is the origin of the ray and d is the direction.
- *
* @param {Ray} ray The ray.
* @param {number} t A scalar value.
* @param {Cartesian3} [result] The object in which the result will be stored.
* @returns {Cartesian3} The modified result parameter, or a new instance if none was provided.
- *
* @example
* //Get the first intersection point of a ray and an ellipsoid.
* const intersection = Cesium.IntersectionTests.rayEllipsoid(ray, ellipsoid);
diff --git a/packages/engine/Source/Core/Rectangle.js b/packages/engine/Source/Core/Rectangle.js
index ffbcf09b4684..c96706c803bd 100644
--- a/packages/engine/Source/Core/Rectangle.js
+++ b/packages/engine/Source/Core/Rectangle.js
@@ -10,21 +10,17 @@ import Matrix4 from "./Matrix4.js";
/**
* A two dimensional region specified as longitude and latitude coordinates.
- *
* @alias Rectangle
- * @constructor
- *
+ * @class
* @param {number} [west=0.0] The westernmost longitude, in radians, in the range [-Pi, Pi].
* @param {number} [south=0.0] The southernmost latitude, in radians, in the range [-Pi/2, Pi/2].
* @param {number} [east=0.0] The easternmost longitude, in radians, in the range [-Pi, Pi].
* @param {number} [north=0.0] The northernmost latitude, in radians, in the range [-Pi/2, Pi/2].
- *
* @see Packable
*/
function Rectangle(west, south, east, north) {
/**
* The westernmost longitude in radians in the range [-Pi, Pi].
- *
* @type {number}
* @default 0.0
*/
@@ -32,7 +28,6 @@ function Rectangle(west, south, east, north) {
/**
* The southernmost latitude in radians in the range [-Pi/2, Pi/2].
- *
* @type {number}
* @default 0.0
*/
@@ -40,7 +35,6 @@ function Rectangle(west, south, east, north) {
/**
* The easternmost longitude in radians in the range [-Pi, Pi].
- *
* @type {number}
* @default 0.0
*/
@@ -48,7 +42,6 @@ function Rectangle(west, south, east, north) {
/**
* The northernmost latitude in radians in the range [-Pi/2, Pi/2].
- *
* @type {number}
* @default 0.0
*/
@@ -89,11 +82,9 @@ Rectangle.packedLength = 4;
/**
* Stores the provided instance into the provided array.
- *
* @param {Rectangle} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
Rectangle.pack = function (value, array, startingIndex) {
@@ -114,7 +105,6 @@ Rectangle.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {Rectangle} [result] The object into which to store the result.
@@ -169,14 +159,12 @@ Rectangle.computeHeight = function (rectangle) {
/**
* Creates a rectangle given the boundary longitude and latitude in degrees.
- *
* @param {number} [west=0.0] The westernmost longitude in degrees in the range [-180.0, 180.0].
* @param {number} [south=0.0] The southernmost latitude in degrees in the range [-90.0, 90.0].
* @param {number} [east=0.0] The easternmost longitude in degrees in the range [-180.0, 180.0].
* @param {number} [north=0.0] The northernmost latitude in degrees in the range [-90.0, 90.0].
* @param {Rectangle} [result] The object onto which to store the result, or undefined if a new instance should be created.
* @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided.
- *
* @example
* const rectangle = Cesium.Rectangle.fromDegrees(0.0, 20.0, 10.0, 30.0);
*/
@@ -200,14 +188,12 @@ Rectangle.fromDegrees = function (west, south, east, north, result) {
/**
* Creates a rectangle given the boundary longitude and latitude in radians.
- *
* @param {number} [west=0.0] The westernmost longitude in radians in the range [-Math.PI, Math.PI].
* @param {number} [south=0.0] The southernmost latitude in radians in the range [-Math.PI/2, Math.PI/2].
* @param {number} [east=0.0] The easternmost longitude in radians in the range [-Math.PI, Math.PI].
* @param {number} [north=0.0] The northernmost latitude in radians in the range [-Math.PI/2, Math.PI/2].
* @param {Rectangle} [result] The object onto which to store the result, or undefined if a new instance should be created.
* @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided.
- *
* @example
* const rectangle = Cesium.Rectangle.fromRadians(0.0, Math.PI/4, Math.PI/8, 3*Math.PI/4);
*/
@@ -226,7 +212,6 @@ Rectangle.fromRadians = function (west, south, east, north, result) {
/**
* Creates the smallest possible Rectangle that encloses all positions in the provided array.
- *
* @param {Cartographic[]} cartographics The list of Cartographic instances.
* @param {Rectangle} [result] The object onto which to store the result, or undefined if a new instance should be created.
* @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided.
@@ -283,7 +268,6 @@ Rectangle.fromCartographicArray = function (cartographics, result) {
/**
* Creates the smallest possible Rectangle that encloses all positions in the provided array.
- *
* @param {Cartesian3[]} cartesians The list of Cartesian instances.
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid the cartesians are on.
* @param {Rectangle} [result] The object onto which to store the result, or undefined if a new instance should be created.
@@ -351,8 +335,6 @@ for (let n = 0; n < fromBoundingSpherePositionsScratch.length; ++n) {
}
/**
* Create a rectangle from a bounding sphere, ignoring height.
- *
- *
* @param {BoundingSphere} boundingSphere The bounding sphere.
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid.
* @param {Rectangle} [result] The object onto which to store the result, or undefined if a new instance should be created.
@@ -428,7 +410,6 @@ Rectangle.fromBoundingSphere = function (boundingSphere, ellipsoid, result) {
/**
* Duplicates a Rectangle.
- *
* @param {Rectangle} rectangle The rectangle to clone.
* @param {Rectangle} [result] The object onto which to store the result, or undefined if a new instance should be created.
* @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided. (Returns undefined if rectangle is undefined)
@@ -458,7 +439,6 @@ Rectangle.clone = function (rectangle, result) {
* Compares the provided Rectangles componentwise and returns
* true if they pass an absolute or relative tolerance test,
* false otherwise.
- *
* @param {Rectangle} [left] The first Rectangle.
* @param {Rectangle} [right] The second Rectangle.
* @param {number} [absoluteEpsilon=0] The absolute epsilon tolerance to use for equality testing.
@@ -480,7 +460,6 @@ Rectangle.equalsEpsilon = function (left, right, absoluteEpsilon) {
/**
* Duplicates this Rectangle.
- *
* @param {Rectangle} [result] The object onto which to store the result.
* @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided.
*/
@@ -491,7 +470,6 @@ Rectangle.prototype.clone = function (result) {
/**
* Compares the provided Rectangle with this Rectangle componentwise and returns
* true if they are equal, false otherwise.
- *
* @param {Rectangle} [other] The Rectangle to compare.
* @returns {boolean} true if the Rectangles are equal, false otherwise.
*/
@@ -502,7 +480,6 @@ Rectangle.prototype.equals = function (other) {
/**
* Compares the provided rectangles and returns true if they are equal,
* false otherwise.
- *
* @param {Rectangle} [left] The first Rectangle.
* @param {Rectangle} [right] The second Rectangle.
* @returns {boolean} true if left and right are equal; otherwise false.
@@ -523,7 +500,6 @@ Rectangle.equals = function (left, right) {
* Compares the provided Rectangle with this Rectangle componentwise and returns
* true if they are within the provided epsilon,
* false otherwise.
- *
* @param {Rectangle} [other] The Rectangle to compare.
* @param {number} [epsilon=0] The epsilon to use for equality testing.
* @returns {boolean} true if the Rectangles are within the provided epsilon, false otherwise.
@@ -534,13 +510,11 @@ Rectangle.prototype.equalsEpsilon = function (other, epsilon) {
/**
* Checks a Rectangle's properties and throws if they are not in valid ranges.
- *
* @param {Rectangle} rectangle The rectangle to validate
- *
- * @exception {DeveloperError} north must be in the interval [-Pi/2, Pi/2].
- * @exception {DeveloperError} south must be in the interval [-Pi/2, Pi/2].
- * @exception {DeveloperError} east must be in the interval [-Pi, Pi].
- * @exception {DeveloperError} west must be in the interval [-Pi, Pi].
+ * @throws {DeveloperError} north must be in the interval [-Pi/2, Pi/2].
+ * @throws {DeveloperError} south must be in the interval [-Pi/2, Pi/2].
+ * @throws {DeveloperError} east must be in the interval [-Pi, Pi].
+ * @throws {DeveloperError} west must be in the interval [-Pi, Pi].
*/
Rectangle.validate = function (rectangle) {
//>>includeStart('debug', pragmas.debug);
@@ -574,7 +548,6 @@ Rectangle.validate = function (rectangle) {
/**
* Computes the southwest corner of a rectangle.
- *
* @param {Rectangle} rectangle The rectangle for which to find the corner
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if none was provided.
@@ -595,7 +568,6 @@ Rectangle.southwest = function (rectangle, result) {
/**
* Computes the northwest corner of a rectangle.
- *
* @param {Rectangle} rectangle The rectangle for which to find the corner
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if none was provided.
@@ -616,7 +588,6 @@ Rectangle.northwest = function (rectangle, result) {
/**
* Computes the northeast corner of a rectangle.
- *
* @param {Rectangle} rectangle The rectangle for which to find the corner
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if none was provided.
@@ -637,7 +608,6 @@ Rectangle.northeast = function (rectangle, result) {
/**
* Computes the southeast corner of a rectangle.
- *
* @param {Rectangle} rectangle The rectangle for which to find the corner
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if none was provided.
@@ -658,7 +628,6 @@ Rectangle.southeast = function (rectangle, result) {
/**
* Computes the center of a rectangle.
- *
* @param {Rectangle} rectangle The rectangle for which to find the center
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if none was provided.
@@ -694,7 +663,6 @@ Rectangle.center = function (rectangle, result) {
* the same angle can be represented with multiple values as well as the wrapping of longitude at the
* anti-meridian. For a simple intersection that ignores these factors and can be used with projected
* coordinates, see {@link Rectangle.simpleIntersection}.
- *
* @param {Rectangle} rectangle On rectangle to find an intersection
* @param {Rectangle} otherRectangle Another rectangle to find an intersection
* @param {Rectangle} [result] The object onto which to store the result.
@@ -761,7 +729,6 @@ Rectangle.intersection = function (rectangle, otherRectangle, result) {
* does not attempt to put the angular coordinates into a consistent range or to account for crossing the
* anti-meridian. As such, it can be used for rectangles where the coordinates are not simply latitude
* and longitude (i.e. projected coordinates).
- *
* @param {Rectangle} rectangle On rectangle to find an intersection
* @param {Rectangle} otherRectangle Another rectangle to find an intersection
* @param {Rectangle} [result] The object onto which to store the result.
@@ -795,7 +762,6 @@ Rectangle.simpleIntersection = function (rectangle, otherRectangle, result) {
/**
* Computes a rectangle that is the union of two rectangles.
- *
* @param {Rectangle} rectangle A rectangle to enclose in rectangle.
* @param {Rectangle} otherRectangle A rectangle to enclose in a rectangle.
* @param {Rectangle} [result] The object onto which to store the result.
@@ -846,7 +812,6 @@ Rectangle.union = function (rectangle, otherRectangle, result) {
/**
* Computes a rectangle by enlarging the provided rectangle until it contains the provided cartographic.
- *
* @param {Rectangle} rectangle A rectangle to expand.
* @param {Cartographic} cartographic A cartographic to enclose in a rectangle.
* @param {Rectangle} [result] The object onto which to store the result.
@@ -872,7 +837,6 @@ Rectangle.expand = function (rectangle, cartographic, result) {
/**
* Returns true if the cartographic is on or inside the rectangle, false otherwise.
- *
* @param {Rectangle} rectangle The rectangle
* @param {Cartographic} cartographic The cartographic to test.
* @returns {boolean} true if the provided cartographic is inside the rectangle, false otherwise.
@@ -910,7 +874,6 @@ const subsampleLlaScratch = new Cartographic();
* Samples a rectangle so that it includes a list of Cartesian points suitable for passing to
* {@link BoundingSphere#fromPoints}. Sampling is necessary to account
* for rectangles that cover the poles or cross the equator.
- *
* @param {Rectangle} rectangle The rectangle to subsample.
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid to use.
* @param {number} [surfaceHeight=0.0] The height of the rectangle above the ellipsoid.
@@ -985,7 +948,6 @@ Rectangle.subsample = function (rectangle, ellipsoid, surfaceHeight, result) {
/**
* Computes a subsection of a rectangle from normalized coordinates in the range [0.0, 1.0].
- *
* @param {Rectangle} rectangle The rectangle to subsection.
* @param {number} westLerp The west interpolation factor in the range [0.0, 1.0]. Must be less than or equal to eastLerp.
* @param {number} southLerp The south interpolation factor in the range [0.0, 1.0]. Must be less than or equal to northLerp.
@@ -1056,7 +1018,6 @@ Rectangle.subsection = function (
/**
* The largest possible rectangle.
- *
* @type {Rectangle}
* @constant
*/
diff --git a/packages/engine/Source/Core/RectangleCollisionChecker.js b/packages/engine/Source/Core/RectangleCollisionChecker.js
index bb8cdb516840..01075d6f2c1e 100644
--- a/packages/engine/Source/Core/RectangleCollisionChecker.js
+++ b/packages/engine/Source/Core/RectangleCollisionChecker.js
@@ -28,7 +28,6 @@ RectangleWithId.fromRectangleAndId = function (id, rectangle, result) {
/**
* Insert a rectangle into the collision checker.
- *
* @param {string} id Unique string ID for the rectangle being inserted.
* @param {Rectangle} rectangle A Rectangle
* @private
@@ -54,7 +53,6 @@ function idCompare(a, b) {
const removalScratch = new RectangleWithId();
/**
* Remove a rectangle from the collision checker.
- *
* @param {string} id Unique string ID for the rectangle being removed.
* @param {Rectangle} rectangle A Rectangle
* @private
@@ -76,7 +74,6 @@ RectangleCollisionChecker.prototype.remove = function (id, rectangle) {
const collisionScratch = new RectangleWithId();
/**
* Checks if a given rectangle collides with any of the rectangles in the collection.
- *
* @param {Rectangle} rectangle A Rectangle that should be checked against the rectangles in the collision checker.
* @returns {boolean} Whether the rectangle collides with any of the rectangles in the collision checker.
*/
diff --git a/packages/engine/Source/Core/RectangleGeometry.js b/packages/engine/Source/Core/RectangleGeometry.js
index 7e0b8d5ae7d7..02cdd0744c21 100644
--- a/packages/engine/Source/Core/RectangleGeometry.js
+++ b/packages/engine/Source/Core/RectangleGeometry.js
@@ -971,10 +971,8 @@ function computeRectangle(rectangle, granularity, rotation, ellipsoid, result) {
/**
* A description of a cartographic rectangle on an ellipsoid centered at the origin. Rectangle geometry can be rendered with both {@link Primitive} and {@link GroundPrimitive}.
- *
* @alias RectangleGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Rectangle} options.rectangle A cartographic rectangle with north, south, east and west properties in radians.
* @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
@@ -984,17 +982,13 @@ function computeRectangle(rectangle, granularity, rotation, ellipsoid, result) {
* @param {number} [options.rotation=0.0] The rotation of the rectangle, in radians. A positive rotation is counter-clockwise.
* @param {number} [options.stRotation=0.0] The rotation of the texture coordinates, in radians. A positive rotation is counter-clockwise.
* @param {number} [options.extrudedHeight] The distance in meters between the rectangle's extruded face and the ellipsoid surface.
- *
- * @exception {DeveloperError} options.rectangle.north must be in the interval [-Pi/2, Pi/2].
- * @exception {DeveloperError} options.rectangle.south must be in the interval [-Pi/2, Pi/2].
- * @exception {DeveloperError} options.rectangle.east must be in the interval [-Pi, Pi].
- * @exception {DeveloperError} options.rectangle.west must be in the interval [-Pi, Pi].
- * @exception {DeveloperError} options.rectangle.north must be greater than options.rectangle.south.
- *
+ * @throws {DeveloperError} options.rectangle.north must be in the interval [-Pi/2, Pi/2].
+ * @throws {DeveloperError} options.rectangle.south must be in the interval [-Pi/2, Pi/2].
+ * @throws {DeveloperError} options.rectangle.east must be in the interval [-Pi, Pi].
+ * @throws {DeveloperError} options.rectangle.west must be in the interval [-Pi, Pi].
+ * @throws {DeveloperError} options.rectangle.north must be greater than options.rectangle.south.
* @see RectangleGeometry#createGeometry
- *
* @demo {@link https://sandcastle.cesium.com/index.html?src=Rectangle.html|Cesium Sandcastle Rectangle Demo}
- *
* @example
* // 1. create a rectangle
* const rectangle = new Cesium.RectangleGeometry({
@@ -1066,11 +1060,9 @@ RectangleGeometry.packedLength =
/**
* Stores the provided instance into the provided array.
- *
* @param {RectangleGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
RectangleGeometry.pack = function (value, array, startingIndex) {
@@ -1118,7 +1110,6 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {RectangleGeometry} [result] The object into which to store the result.
@@ -1182,14 +1173,12 @@ RectangleGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the bounding rectangle based on the provided options
- *
* @param {object} options Object with the following properties:
* @param {Rectangle} options.rectangle A cartographic rectangle with north, south, east and west properties in radians.
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the rectangle lies.
* @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
* @param {number} [options.rotation=0.0] The rotation of the rectangle, in radians. A positive rotation is counter-clockwise.
* @param {Rectangle} [result] An object in which to store the result.
- *
* @returns {Rectangle} The result rectangle
*/
RectangleGeometry.computeRectangle = function (options, result) {
@@ -1222,11 +1211,9 @@ const quaternionScratch = new Quaternion();
const centerScratch = new Cartographic();
/**
* Computes the geometric representation of a rectangle, including its vertices, indices, and a bounding sphere.
- *
* @param {RectangleGeometry} rectangleGeometry A description of the rectangle.
* @returns {Geometry|undefined} The computed vertices and indices.
- *
- * @exception {DeveloperError} Rotated rectangle is invalid.
+ * @throws {DeveloperError} Rotated rectangle is invalid.
*/
RectangleGeometry.createGeometry = function (rectangleGeometry) {
if (
@@ -1345,6 +1332,9 @@ RectangleGeometry.createGeometry = function (rectangleGeometry) {
};
/**
+ * @param rectangleGeometry
+ * @param minHeightFunc
+ * @param maxHeightFunc
* @private
*/
RectangleGeometry.createShadowVolume = function (
diff --git a/packages/engine/Source/Core/RectangleGeometryLibrary.js b/packages/engine/Source/Core/RectangleGeometryLibrary.js
index a413d08c82da..6e17ca2546d1 100644
--- a/packages/engine/Source/Core/RectangleGeometryLibrary.js
+++ b/packages/engine/Source/Core/RectangleGeometryLibrary.js
@@ -17,6 +17,13 @@ const sqrt = Math.sqrt;
const RectangleGeometryLibrary = {};
/**
+ * @param computedOptions
+ * @param ellipsoid
+ * @param computeST
+ * @param row
+ * @param col
+ * @param position
+ * @param st
* @private
*/
RectangleGeometryLibrary.computePosition = function (
@@ -145,6 +152,13 @@ function getRotationOptions(
}
/**
+ * @param rectangle
+ * @param granularity
+ * @param rotation
+ * @param stRotation
+ * @param boundingRectangleScratch
+ * @param nwCornerResult
+ * @param stNwCornerResult
* @private
*/
RectangleGeometryLibrary.computeOptions = function (
diff --git a/packages/engine/Source/Core/RectangleOutlineGeometry.js b/packages/engine/Source/Core/RectangleOutlineGeometry.js
index 35988cb7daf8..51ed2cf42484 100644
--- a/packages/engine/Source/Core/RectangleOutlineGeometry.js
+++ b/packages/engine/Source/Core/RectangleOutlineGeometry.js
@@ -241,10 +241,8 @@ function constructExtrudedRectangle(rectangleGeometry, computedOptions) {
/**
* A description of the outline of a a cartographic rectangle on an ellipsoid centered at the origin.
- *
* @alias RectangleOutlineGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Rectangle} options.rectangle A cartographic rectangle with north, south, east and west properties in radians.
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the rectangle lies.
@@ -252,15 +250,12 @@ function constructExtrudedRectangle(rectangleGeometry, computedOptions) {
* @param {number} [options.height=0.0] The distance in meters between the rectangle and the ellipsoid surface.
* @param {number} [options.rotation=0.0] The rotation of the rectangle, in radians. A positive rotation is counter-clockwise.
* @param {number} [options.extrudedHeight] The distance in meters between the rectangle's extruded face and the ellipsoid surface.
- *
- * @exception {DeveloperError} options.rectangle.north must be in the interval [-Pi/2, Pi/2].
- * @exception {DeveloperError} options.rectangle.south must be in the interval [-Pi/2, Pi/2].
- * @exception {DeveloperError} options.rectangle.east must be in the interval [-Pi, Pi].
- * @exception {DeveloperError} options.rectangle.west must be in the interval [-Pi, Pi].
- * @exception {DeveloperError} options.rectangle.north must be greater than rectangle.south.
- *
+ * @throws {DeveloperError} options.rectangle.north must be in the interval [-Pi/2, Pi/2].
+ * @throws {DeveloperError} options.rectangle.south must be in the interval [-Pi/2, Pi/2].
+ * @throws {DeveloperError} options.rectangle.east must be in the interval [-Pi, Pi].
+ * @throws {DeveloperError} options.rectangle.west must be in the interval [-Pi, Pi].
+ * @throws {DeveloperError} options.rectangle.north must be greater than rectangle.south.
* @see RectangleOutlineGeometry#createGeometry
- *
* @example
* const rectangle = new Cesium.RectangleOutlineGeometry({
* ellipsoid : Cesium.Ellipsoid.WGS84,
@@ -314,11 +309,9 @@ RectangleOutlineGeometry.packedLength =
/**
* Stores the provided instance into the provided array.
- *
* @param {RectangleOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
RectangleOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -363,7 +356,6 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {RectangleOutlineGeometry} [result] The object into which to store the result.
@@ -415,11 +407,9 @@ RectangleOutlineGeometry.unpack = function (array, startingIndex, result) {
const nwScratch = new Cartographic();
/**
* Computes the geometric representation of an outline of a rectangle, including its vertices, indices, and a bounding sphere.
- *
* @param {RectangleOutlineGeometry} rectangleGeometry A description of the rectangle outline.
* @returns {Geometry|undefined} The computed vertices and indices.
- *
- * @exception {DeveloperError} Rotated rectangle is invalid.
+ * @throws {DeveloperError} Rotated rectangle is invalid.
*/
RectangleOutlineGeometry.createGeometry = function (rectangleGeometry) {
const rectangle = rectangleGeometry._rectangle;
diff --git a/packages/engine/Source/Core/ReferenceFrame.js b/packages/engine/Source/Core/ReferenceFrame.js
index fdc899040355..5f84dab72422 100644
--- a/packages/engine/Source/Core/ReferenceFrame.js
+++ b/packages/engine/Source/Core/ReferenceFrame.js
@@ -1,12 +1,10 @@
/**
* Constants for identifying well-known reference frames.
- *
* @enum {number}
*/
const ReferenceFrame = {
/**
* The fixed frame.
- *
* @type {number}
* @constant
*/
@@ -14,7 +12,6 @@ const ReferenceFrame = {
/**
* The inertial frame.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/Request.js b/packages/engine/Source/Core/Request.js
index 0274ab3e4d55..489ca211bff2 100644
--- a/packages/engine/Source/Core/Request.js
+++ b/packages/engine/Source/Core/Request.js
@@ -5,10 +5,8 @@ import RequestType from "./RequestType.js";
/**
* Stores information for making a request. In general this does not need to be constructed directly.
- *
* @alias Request
- * @constructor
-
+ * @class
* @param {object} [options] An object with the following properties:
* @param {string} [options.url] The url to request.
* @param {Request.RequestCallback} [options.requestFunction] The function that makes the actual data request.
@@ -28,28 +26,24 @@ function Request(options) {
/**
* The URL to request.
- *
* @type {string}
*/
this.url = options.url;
/**
* The function that makes the actual data request.
- *
* @type {Request.RequestCallback}
*/
this.requestFunction = options.requestFunction;
/**
* The function that is called when the request is cancelled.
- *
* @type {Request.CancelCallback}
*/
this.cancelFunction = options.cancelFunction;
/**
* The function that is called to update the request's priority, which occurs once per frame.
- *
* @type {Request.PriorityCallback}
*/
this.priorityFunction = options.priorityFunction;
@@ -60,7 +54,6 @@ function Request(options) {
* A request that does not have a priority function defaults to a priority of 0.
*
* If priorityFunction is defined, this value is updated every frame with the result of that call.
- *
* @type {number}
* @default 0.0
*/
@@ -69,10 +62,8 @@ function Request(options) {
/**
* Whether to throttle and prioritize the request. If false, the request will be sent immediately. If true, the
* request will be throttled and sent based on priority.
- *
* @type {boolean}
* @readonly
- *
* @default false
*/
this.throttle = throttle;
@@ -81,36 +72,29 @@ function Request(options) {
* Whether to throttle the request by server. Browsers typically support about 6-8 parallel connections
* for HTTP/1 servers, and an unlimited amount of connections for HTTP/2 servers. Setting this value
* to true is preferable for requests going through HTTP/1 servers.
- *
* @type {boolean}
* @readonly
- *
* @default false
*/
this.throttleByServer = throttleByServer;
/**
* Type of request.
- *
* @type {RequestType}
* @readonly
- *
* @default RequestType.OTHER
*/
this.type = defaultValue(options.type, RequestType.OTHER);
/**
* A key used to identify the server that a request is going to. It is derived from the url's authority and scheme.
- *
* @type {string}
- *
* @private
*/
this.serverKey = options.serverKey;
/**
* The current state of the request.
- *
* @type {RequestState}
* @readonly
*/
@@ -118,18 +102,14 @@ function Request(options) {
/**
* The requests's deferred promise.
- *
* @type {object}
- *
* @private
*/
this.deferred = undefined;
/**
* Whether the request was explicitly cancelled.
- *
* @type {boolean}
- *
* @private
*/
this.cancelled = false;
@@ -137,7 +117,6 @@ function Request(options) {
/**
* Mark the request as cancelled.
- *
* @private
*/
Request.prototype.cancel = function () {
@@ -146,9 +125,7 @@ Request.prototype.cancel = function () {
/**
* Duplicates a Request instance.
- *
* @param {Request} [result] The object onto which to store the result.
- *
* @returns {Request} The modified result parameter or a new Resource instance if one was not provided.
*/
Request.prototype.clone = function (result) {
diff --git a/packages/engine/Source/Core/RequestErrorEvent.js b/packages/engine/Source/Core/RequestErrorEvent.js
index 41f0e685e550..a62cc2ffaed4 100644
--- a/packages/engine/Source/Core/RequestErrorEvent.js
+++ b/packages/engine/Source/Core/RequestErrorEvent.js
@@ -3,10 +3,8 @@ import parseResponseHeaders from "./parseResponseHeaders.js";
/**
* An event that is raised when a request encounters an error.
- *
- * @constructor
+ * @class
* @alias RequestErrorEvent
- *
* @param {number} [statusCode] The HTTP error status code, such as 404.
* @param {object} [response] The response included along with the error.
* @param {string|object} [responseHeaders] The response headers, represented either as an object literal or as a
@@ -16,7 +14,6 @@ function RequestErrorEvent(statusCode, response, responseHeaders) {
/**
* The HTTP error status code, such as 404. If the error does not have a particular
* HTTP code, this property will be undefined.
- *
* @type {number}
*/
this.statusCode = statusCode;
@@ -24,7 +21,6 @@ function RequestErrorEvent(statusCode, response, responseHeaders) {
/**
* The response included along with the error. If the error does not include a response,
* this property will be undefined.
- *
* @type {object}
*/
this.response = response;
@@ -32,7 +28,6 @@ function RequestErrorEvent(statusCode, response, responseHeaders) {
/**
* The headers included in the response, represented as an object literal of key/value pairs.
* If the error does not include any headers, this property will be undefined.
- *
* @type {object}
*/
this.responseHeaders = responseHeaders;
@@ -45,7 +40,6 @@ function RequestErrorEvent(statusCode, response, responseHeaders) {
/**
* Creates a string representing this RequestErrorEvent.
* @memberof RequestErrorEvent
- *
* @returns {string} A string representing the provided RequestErrorEvent.
*/
RequestErrorEvent.prototype.toString = function () {
diff --git a/packages/engine/Source/Core/RequestScheduler.js b/packages/engine/Source/Core/RequestScheduler.js
index 2caded8f67b9..0f725ed96a76 100644
--- a/packages/engine/Source/Core/RequestScheduler.js
+++ b/packages/engine/Source/Core/RequestScheduler.js
@@ -43,9 +43,7 @@ const requestCompletedEvent = new Event();
* to retain control over the number of requests in CesiumJS is important because due to events such as changes in the camera position,
* a lot of new requests may be generated and a lot of in-flight requests may become redundant. The request scheduler manually constrains the
* number of requests so that newer requests wait in a shorter queue and don't have to compete for bandwidth with requests that have expired.
- *
* @namespace RequestScheduler
- *
*/
function RequestScheduler() {}
@@ -68,10 +66,8 @@ RequestScheduler.maximumRequestsPerServer = 18;
* A per server key list of overrides to use for throttling instead of maximumRequestsPerServer.
* Useful when streaming data from a known HTTP/2 or HTTP/3 server.
* @type {object}
- *
* @example
* RequestScheduler.requestsByServer["myserver.com:443"] = 18;
- *
* @example
* RequestScheduler.requestsByServer = {
* "api.cesium.com:443": 18,
@@ -98,7 +94,6 @@ RequestScheduler.debugShowStatistics = false;
/**
* An event that's raised when a request is completed. Event handlers are passed
* the error object if the request fails.
- *
* @type {Event}
* @default Event()
* @private
@@ -108,9 +103,7 @@ RequestScheduler.requestCompletedEvent = requestCompletedEvent;
Object.defineProperties(RequestScheduler, {
/**
* Returns the statistics used by the request scheduler.
- *
* @memberof RequestScheduler
- *
* @type {object}
* @readonly
* @private
@@ -123,9 +116,7 @@ Object.defineProperties(RequestScheduler, {
/**
* The maximum size of the priority heap. This limits the number of requests that are sorted by priority. Only applies to requests that are not yet active.
- *
* @memberof RequestScheduler
- *
* @type {number}
* @default 20
* @private
@@ -160,7 +151,7 @@ function updatePriority(request) {
* Check if there are open slots for a particular server key. If desiredRequests is greater than 1, this checks if the queue has room for scheduling multiple requests.
* @param {string} serverKey The server key returned by {@link RequestScheduler.getServerKey}.
* @param {number} [desiredRequests=1] How many requests the caller plans to request
- * @return {boolean} True if there are enough open slots for desiredRequests more requests.
+ * @returns {boolean} True if there are enough open slots for desiredRequests more requests.
* @private
*/
RequestScheduler.serverHasOpenSlots = function (serverKey, desiredRequests) {
@@ -181,8 +172,7 @@ RequestScheduler.serverHasOpenSlots = function (serverKey, desiredRequests) {
* are from. This is used in {@link Multiple3DTileContent} for determining when
* all requests can be scheduled
* @param {number} desiredRequests The number of requests the caller intends to make
- * @return {boolean} true if the heap has enough available slots to meet the desiredRequests. false otherwise.
- *
+ * @returns {boolean} true if the heap has enough available slots to meet the desiredRequests. false otherwise.
* @private
*/
RequestScheduler.heapHasOpenSlots = function (desiredRequests) {
@@ -341,7 +331,6 @@ RequestScheduler.update = function () {
/**
* Get the server key from a given url.
- *
* @param {string} url The url.
* @returns {string} The server key.
* @private
@@ -374,11 +363,8 @@ RequestScheduler.getServerKey = function (url) {
/**
* Issue a request. If request.throttle is false, the request is sent immediately. Otherwise the request will be
* queued and sorted by priority before being sent.
- *
* @param {Request} request The request object.
- *
* @returns {Promise|undefined} A Promise for the requested data, or undefined if this request does not have high enough priority to be issued.
- *
* @private
*/
RequestScheduler.request = function (request) {
@@ -478,7 +464,6 @@ function updateStatistics() {
/**
* For testing only. Clears any requests that may not have completed from previous tests.
- *
* @private
*/
RequestScheduler.clearForSpecs = function () {
@@ -505,7 +490,7 @@ RequestScheduler.clearForSpecs = function () {
/**
* For testing only.
- *
+ * @param serverKey
* @private
*/
RequestScheduler.numberOfActiveRequestsByServer = function (serverKey) {
@@ -514,7 +499,6 @@ RequestScheduler.numberOfActiveRequestsByServer = function (serverKey) {
/**
* For testing only.
- *
* @private
*/
RequestScheduler.requestHeap = requestHeap;
diff --git a/packages/engine/Source/Core/RequestState.js b/packages/engine/Source/Core/RequestState.js
index fe83c4ffb640..1f33e7dc7516 100644
--- a/packages/engine/Source/Core/RequestState.js
+++ b/packages/engine/Source/Core/RequestState.js
@@ -1,12 +1,10 @@
/**
* State of the request.
- *
* @enum {number}
*/
const RequestState = {
/**
* Initial unissued state.
- *
* @type {number}
* @constant
*/
@@ -14,7 +12,6 @@ const RequestState = {
/**
* Issued but not yet active. Will become active when open slots are available.
- *
* @type {number}
* @constant
*/
@@ -22,7 +19,6 @@ const RequestState = {
/**
* Actual http request has been sent.
- *
* @type {number}
* @constant
*/
@@ -30,7 +26,6 @@ const RequestState = {
/**
* Request completed successfully.
- *
* @type {number}
* @constant
*/
@@ -38,7 +33,6 @@ const RequestState = {
/**
* Request was cancelled, either explicitly or automatically because of low priority.
- *
* @type {number}
* @constant
*/
@@ -46,7 +40,6 @@ const RequestState = {
/**
* Request failed.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/RequestType.js b/packages/engine/Source/Core/RequestType.js
index e8cda3d64974..6b8da515c836 100644
--- a/packages/engine/Source/Core/RequestType.js
+++ b/packages/engine/Source/Core/RequestType.js
@@ -1,12 +1,10 @@
/**
* An enum identifying the type of request. Used for finer grained logging and priority sorting.
- *
* @enum {number}
*/
const RequestType = {
/**
* Terrain request.
- *
* @type {number}
* @constant
*/
@@ -14,7 +12,6 @@ const RequestType = {
/**
* Imagery request.
- *
* @type {number}
* @constant
*/
@@ -22,7 +19,6 @@ const RequestType = {
/**
* 3D Tiles request.
- *
* @type {number}
* @constant
*/
@@ -30,7 +26,6 @@ const RequestType = {
/**
* Other request.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/Resource.js b/packages/engine/Source/Core/Resource.js
index cec46808118d..4a095bbf0d6b 100644
--- a/packages/engine/Source/Core/Resource.js
+++ b/packages/engine/Source/Core/Resource.js
@@ -40,7 +40,6 @@ const xhrBlobSupported = (function () {
* @typedef {object} Resource.ConstructorOptions
*
* Initialization options for the Resource constructor
- *
* @property {string} url The url of the resource.
* @property {object} [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}).
@@ -54,12 +53,9 @@ const xhrBlobSupported = (function () {
/**
* 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
- *
+ * @class
* @param {string|Resource.ConstructorOptions} options A url or an object describing initialization options
- *
* @example
* function refreshTokenRetryCallback(resource, error) {
* if (error.statusCode === 403) {
@@ -108,35 +104,30 @@ function Resource(options) {
/**
* Additional HTTP headers that will be sent with the request.
- *
* @type {object}
*/
this.headers = defaultClone(options.headers, {});
/**
* A Request object that will be used. Intended for internal use only.
- *
* @type {Request}
*/
this.request = defaultValue(options.request, new Request());
/**
* A proxy to be used when loading the resource.
- *
* @type {Proxy}
*/
this.proxy = options.proxy;
/**
* Function to call when a request for this resource fails. If it returns true or a Promise that resolves to true, the request will be retried.
- *
* @type {Function}
*/
this.retryCallback = options.retryCallback;
/**
* The number of times the retryCallback should be called before giving up.
- *
* @type {number}
*/
this.retryAttempts = defaultValue(options.retryAttempts, 0);
@@ -154,12 +145,9 @@ function Resource(options) {
/**
* Clones a value if it is defined, otherwise returns the default value
- *
* @param {object} [value] The value to clone.
* @param {object} [defaultValue] The default value.
- *
* @returns {object} A clone of value or the defaultValue.
- *
* @private
*/
function defaultClone(value, defaultValue) {
@@ -168,11 +156,8 @@ function defaultClone(value, defaultValue) {
/**
* A helper function to create a resource depending on whether we have a String or a Resource
- *
* @param {Resource|string} resource A Resource or a String to use when creating a new Resource.
- *
* @returns {Resource} If resource is a String, a Resource constructed with the url and options. Otherwise the resource parameter is returned.
- *
* @private
*/
Resource.createIfNeeded = function (resource) {
@@ -198,9 +183,7 @@ Resource.createIfNeeded = function (resource) {
let supportsImageBitmapOptionsPromise;
/**
* A helper function to check whether createImageBitmap supports passing ImageBitmapOptions.
- *
* @returns {Promise} A promise that resolves to true if this browser supports creating an ImageBitmap with options.
- *
* @private
*/
Resource.supportsImageBitmapOptions = function () {
@@ -256,10 +239,8 @@ Resource.supportsImageBitmapOptions = function () {
Object.defineProperties(Resource, {
/**
* Returns true if blobs are supported.
- *
* @memberof Resource
* @type {boolean}
- *
* @readonly
*/
isBlobSupported: {
@@ -272,10 +253,8 @@ Object.defineProperties(Resource, {
Object.defineProperties(Resource.prototype, {
/**
* Query parameters appended to the url.
- *
* @memberof Resource.prototype
* @type {object}
- *
* @readonly
*/
queryParameters: {
@@ -286,10 +265,8 @@ Object.defineProperties(Resource.prototype, {
/**
* The key/value pairs used to replace template parameters in the url.
- *
* @memberof Resource.prototype
* @type {object}
- *
* @readonly
*/
templateValues: {
@@ -300,7 +277,6 @@ Object.defineProperties(Resource.prototype, {
/**
* The url to the resource with template values replaced, query string appended and encoded by proxy if one was set.
- *
* @memberof Resource.prototype
* @type {string}
*/
@@ -315,10 +291,8 @@ Object.defineProperties(Resource.prototype, {
/**
* The file extension of the resource.
- *
* @memberof Resource.prototype
* @type {string}
- *
* @readonly
*/
extension: {
@@ -329,7 +303,6 @@ Object.defineProperties(Resource.prototype, {
/**
* True if the Resource refers to a data URI.
- *
* @memberof Resource.prototype
* @type {boolean}
*/
@@ -341,7 +314,6 @@ Object.defineProperties(Resource.prototype, {
/**
* True if the Resource refers to a blob URI.
- *
* @memberof Resource.prototype
* @type {boolean}
*/
@@ -353,7 +325,6 @@ Object.defineProperties(Resource.prototype, {
/**
* True if the Resource refers to a cross origin URL.
- *
* @memberof Resource.prototype
* @type {boolean}
*/
@@ -365,7 +336,6 @@ Object.defineProperties(Resource.prototype, {
/**
* True if the Resource has request headers. This is equivalent to checking if the headers property has any keys.
- *
* @memberof Resource.prototype
* @type {boolean}
*/
@@ -389,7 +359,6 @@ Object.defineProperties(Resource.prototype, {
/**
* Override Object#toString so that implicit string conversion gives the
* complete URL represented by this Resource.
- *
* @returns {string} The URL represented by this Resource
*/
Resource.prototype.toString = function () {
@@ -398,12 +367,10 @@ Resource.prototype.toString = function () {
/**
* Parse a url string, and store its info
- *
* @param {string} url The input url string.
* @param {boolean} merge If true, we'll merge with the resource's existing queryParameters. Otherwise they will be replaced.
* @param {boolean} preserveQuery If true duplicate parameters will be concatenated into an array. If false, keys in url will take precedence.
* @param {string} [baseUrl] If supplied, and input url is a relative url, it will be made absolute relative to baseUrl
- *
* @private
*/
Resource.prototype.parseUrl = function (url, merge, preserveQuery, baseUrl) {
@@ -427,10 +394,8 @@ Resource.prototype.parseUrl = function (url, merge, preserveQuery, baseUrl) {
/**
* Parses a query string and returns the object equivalent.
- *
* @param {string} queryString The query string
* @returns {object}
- *
* @private
*/
function parseQueryString(queryString) {
@@ -448,13 +413,10 @@ function parseQueryString(queryString) {
/**
* This combines a map of query parameters.
- *
* @param {object} q1 The first map of query parameters. Values in this map will take precedence if preserveQueryParameters is false.
* @param {object} q2 The second map of query parameters.
* @param {boolean} preserveQueryParameters If true duplicate parameters will be concatenated into an array. If false, keys in q1 will take precedence.
- *
* @returns {object} The combined map of query parameters.
- *
* @example
* const q1 = {
* a: 1,
@@ -500,7 +462,6 @@ function parseQueryString(queryString) {
* // d: 7
* // };
* combineQueryParameters(q1, q3, false);
- *
* @private
*/
function combineQueryParameters(q1, q2, preserveQueryParameters) {
@@ -530,10 +491,8 @@ function combineQueryParameters(q1, q2, preserveQueryParameters) {
/**
* Returns the url, optional with the query string and processed by a proxy.
- *
* @param {boolean} [query=false] If true, the query string is included.
* @param {boolean} [proxy=false] If true, the url is processed by the proxy object, if defined.
- *
* @returns {string} The url with all the requested components.
*/
Resource.prototype.getUrlComponent = function (query, proxy) {
@@ -571,10 +530,8 @@ Resource.prototype.getUrlComponent = function (query, proxy) {
/**
* Converts a query object into a string.
- *
* @param {object} queryObject The object with query parameters
* @returns {string}
- *
* @private
*/
function stringifyQuery(queryObject) {
@@ -593,8 +550,7 @@ function stringifyQuery(queryObject) {
/**
* 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.
- *
+ * 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 {boolean} [useAsDefault=false] If true the params will be used as the default values, so they will only be set if they are undefined.
*/
@@ -616,8 +572,7 @@ Resource.prototype.setQueryParameters = function (params, useAsDefault) {
/**
* 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.
- *
+ * as opposed to adding them one at a time to the queryParameters property.
* @param {object} params The query parameters
*/
Resource.prototype.appendQueryParameters = function (params) {
@@ -630,8 +585,7 @@ Resource.prototype.appendQueryParameters = function (params) {
/**
* Combines the specified object and the existing template values. This allows you to add many values at once,
- * as opposed to adding them one at a time to the templateValues property. If a value is already set, it will become an array and the new value will be appended.
- *
+ * as opposed to adding them one at a time to the templateValues property. If a value is already set, it will become an array and the new value will be appended.
* @param {object} template The template values
* @param {boolean} [useAsDefault=false] If true the values will be used as the default values, so they will only be set if they are undefined.
*/
@@ -645,7 +599,6 @@ Resource.prototype.setTemplateValues = function (template, useAsDefault) {
/**
* Returns a resource relative to the current instance. All properties remain the same as the current instance unless overridden in options.
- *
* @param {object} options An object with the following properties
* @param {string} [options.url] The url that will be resolved relative to the url of the current instance.
* @param {object} [options.queryParameters] An object containing query parameters that will be combined with those of the current instance.
@@ -656,7 +609,6 @@ Resource.prototype.setTemplateValues = function (template, useAsDefault) {
* @param {number} [options.retryAttempts] 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 {boolean} [options.preserveQueryParameters=false] If true, this will keep all query parameters from the current resource and derived resource. If false, derived parameters will replace those of the current resource.
- *
* @returns {Resource} The resource derived from the current one.
*/
Resource.prototype.getDerivedResource = function (options) {
@@ -701,11 +653,8 @@ Resource.prototype.getDerivedResource = function (options) {
/**
* Called when a resource fails to load. This will call the retryCallback function if defined until retryAttempts is reached.
- *
* @param {RequestErrorEvent} [error] The error that was encountered.
- *
* @returns {Promise} A promise to a boolean, that if true will cause the resource request to be retried.
- *
* @private
*/
Resource.prototype.retryOnError = function (error) {
@@ -727,9 +676,7 @@ Resource.prototype.retryOnError = function (error) {
/**
* Duplicates a Resource instance.
- *
* @param {Resource} [result] The object onto which to store the result.
- *
* @returns {Resource} The modified result parameter or a new Resource instance if one was not provided.
*/
Resource.prototype.clone = function (result) {
@@ -763,9 +710,7 @@ Resource.prototype.clone = function (result) {
/**
* Returns the base path of the Resource.
- *
* @param {boolean} [includeQuery = false] Whether or not to include the query string and fragment form the uri
- *
* @returns {string} The base URI of the resource
*/
Resource.prototype.getBaseUri = function (includeQuery) {
@@ -784,9 +729,7 @@ Resource.prototype.appendForwardSlash = function () {
* an ArrayBuffer once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
- *
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
- *
* @example
* // load a single URL asynchronously
* resource.fetchArrayBuffer().then(function(arrayBuffer) {
@@ -794,7 +737,6 @@ Resource.prototype.appendForwardSlash = function () {
* }).catch(function(error) {
* // an error occurred
* });
- *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
@@ -806,7 +748,6 @@ Resource.prototype.fetchArrayBuffer = function () {
/**
* Creates a Resource and calls fetchArrayBuffer() on it.
- *
* @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.
@@ -828,9 +769,7 @@ Resource.fetchArrayBuffer = function (options) {
* a Blob once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
- *
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
- *
* @example
* // load a single URL asynchronously
* resource.fetchBlob().then(function(blob) {
@@ -838,7 +777,6 @@ Resource.fetchArrayBuffer = function (options) {
* }).catch(function(error) {
* // an error occurred
* });
- *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
@@ -850,7 +788,6 @@ Resource.prototype.fetchBlob = function () {
/**
* Creates a Resource and calls fetchBlob() on it.
- *
* @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.
@@ -871,15 +808,12 @@ Resource.fetchBlob = function (options) {
* Asynchronously loads the given image resource. Returns a promise that will resolve to
* an {@link https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap|ImageBitmap} if preferImageBitmap is true and the browser supports createImageBitmap or otherwise an
* {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement|Image} once loaded, or reject if the image failed to load.
- *
* @param {object} [options] An object with the following properties.
* @param {boolean} [options.preferBlob=false] If true, we will load the image via a blob.
* @param {boolean} [options.preferImageBitmap=false] If true, image will be decoded during fetch and an ImageBitmap is returned.
* @param {boolean} [options.flipY=false] If true, image will be vertically flipped during decode. Only applies if the browser supports createImageBitmap.
* @param {boolean} [options.skipColorSpaceConversion=false] If true, any custom gamma or color profiles in the image will be ignored. Only applies if the browser supports createImageBitmap.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
- *
- *
* @example
* // load a single image asynchronously
* resource.fetchImage().then(function(image) {
@@ -892,7 +826,6 @@ Resource.fetchBlob = function (options) {
* Promise.all([resource1.fetchImage(), resource2.fetchImage()]).then(function(images) {
* // images is an array containing all the loaded images
* });
- *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
@@ -998,7 +931,6 @@ Resource.prototype.fetchImage = function (options) {
/**
* Fetches an image and returns a promise to it.
- *
* @param {object} [options] An object with the following properties.
* @param {Resource} [options.resource] Resource object that points to an image to fetch.
* @param {boolean} [options.preferImageBitmap] If true, image will be decoded during fetch and an ImageBitmap is returned.
@@ -1065,7 +997,6 @@ function fetchImage(options) {
/**
* Creates a Resource and calls fetchImage() on it.
- *
* @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.
@@ -1096,9 +1027,7 @@ Resource.fetchImage = function (options) {
* a String once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
- *
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
- *
* @example
* // load text from a URL, setting a custom header
* const resource = new Resource({
@@ -1112,7 +1041,6 @@ Resource.fetchImage = function (options) {
* }).catch(function(error) {
* // an error occurred
* });
- *
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest|XMLHttpRequest}
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
@@ -1125,7 +1053,6 @@ Resource.prototype.fetchText = function () {
/**
* Creates a Resource and calls fetchText() on it.
- *
* @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.
@@ -1150,17 +1077,13 @@ Resource.fetchText = function (options) {
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled. This function
* adds 'Accept: application/json,*/*;q=0.01' to the request headers, if not
* already specified.
- *
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
- *
- *
* @example
* resource.fetchJson().then(function(jsonData) {
* // Do something with the JSON object
* }).catch(function(error) {
* // an error occurred
* });
- *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
@@ -1186,7 +1109,6 @@ Resource.prototype.fetchJson = function () {
/**
* Creates a Resource and calls fetchJson() on it.
- *
* @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.
@@ -1208,10 +1130,7 @@ Resource.fetchJson = function (options) {
* an XML Document once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
- *
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
- *
- *
* @example
* // load XML from a URL, setting a custom header
* Cesium.loadXML('http://someUrl.com/someXML.xml', {
@@ -1221,7 +1140,6 @@ Resource.fetchJson = function (options) {
* }).catch(function(error) {
* // an error occurred
* });
- *
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest|XMLHttpRequest}
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
@@ -1235,7 +1153,6 @@ Resource.prototype.fetchXML = function () {
/**
* Creates a Resource and calls fetchXML() on it.
- *
* @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.
@@ -1254,11 +1171,8 @@ Resource.fetchXML = function (options) {
/**
* Requests a resource using JSONP.
- *
* @param {string} [callbackParameterName='callback'] The callback parameter name that the server expects.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
- *
- *
* @example
* // load a data asynchronously
* resource.fetchJsonp().then(function(data) {
@@ -1266,7 +1180,6 @@ Resource.fetchXML = function (options) {
* }).catch(function(error) {
* // an error occurred
* });
- *
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
Resource.prototype.fetchJsonp = function (callbackParameterName) {
@@ -1337,7 +1250,6 @@ function fetchJsonp(resource, callbackParameterName, functionName) {
/**
* Creates a Resource from a URL and calls fetchJsonp() on it.
- *
* @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.
@@ -1356,6 +1268,7 @@ Resource.fetchJsonp = function (options) {
};
/**
+ * @param options
* @private
*/
Resource.prototype._makeRequest = function (options) {
@@ -1423,9 +1336,7 @@ Resource.prototype._makeRequest = function (options) {
/**
* Checks to make sure the Resource isn't already being requested.
- *
* @param {Request} request The request to check.
- *
* @private
*/
function checkAndResetRequest(request) {
@@ -1500,14 +1411,11 @@ function decodeDataUri(dataUriRegexResult, responseType) {
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled. It's recommended that you use
* the more specific functions eg. fetchJson, fetchBlob, etc.
- *
* @param {object} [options] Object with the following properties:
* @param {string} [options.responseType] The type of response. This controls the type of item returned.
* @param {object} [options.headers] Additional HTTP headers to send with the request, if any.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
- *
- *
* @example
* resource.fetch()
* .then(function(body) {
@@ -1515,7 +1423,6 @@ function decodeDataUri(dataUriRegexResult, responseType) {
* }).catch(function(error) {
* // an error occurred
* });
- *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
@@ -1528,7 +1435,6 @@ Resource.prototype.fetch = function (options) {
/**
* Creates a Resource from a URL and calls fetch() on it.
- *
* @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.
@@ -1556,14 +1462,11 @@ Resource.fetch = function (options) {
* the result once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
- *
* @param {object} [options] Object with the following properties:
* @param {string} [options.responseType] The type of response. This controls the type of item returned.
* @param {object} [options.headers] Additional HTTP headers to send with the request, if any.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
- *
- *
* @example
* resource.delete()
* .then(function(body) {
@@ -1571,7 +1474,6 @@ Resource.fetch = function (options) {
* }).catch(function(error) {
* // an error occurred
* });
- *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
@@ -1584,7 +1486,6 @@ Resource.prototype.delete = function (options) {
/**
* Creates a Resource from a URL and calls delete() on it.
- *
* @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.data] Data that is posted with the resource.
@@ -1614,14 +1515,11 @@ Resource.delete = function (options) {
* the result once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
- *
* @param {object} [options] Object with the following properties:
* @param {string} [options.responseType] The type of response. This controls the type of item returned.
* @param {object} [options.headers] Additional HTTP headers to send with the request, if any.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
- *
- *
* @example
* resource.head()
* .then(function(headers) {
@@ -1629,7 +1527,6 @@ Resource.delete = function (options) {
* }).catch(function(error) {
* // an error occurred
* });
- *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
@@ -1642,7 +1539,6 @@ Resource.prototype.head = function (options) {
/**
* Creates a Resource from a URL and calls head() on it.
- *
* @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.
@@ -1670,14 +1566,11 @@ Resource.head = function (options) {
* the result once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
- *
* @param {object} [options] Object with the following properties:
* @param {string} [options.responseType] The type of response. This controls the type of item returned.
* @param {object} [options.headers] Additional HTTP headers to send with the request, if any.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
- *
- *
* @example
* resource.options()
* .then(function(headers) {
@@ -1685,7 +1578,6 @@ Resource.head = function (options) {
* }).catch(function(error) {
* // an error occurred
* });
- *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
@@ -1698,7 +1590,6 @@ Resource.prototype.options = function (options) {
/**
* Creates a Resource from a URL and calls options() on it.
- *
* @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.
@@ -1726,7 +1617,6 @@ Resource.options = function (options) {
* the result once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
- *
* @param {object} data Data that is posted with the resource.
* @param {object} [options] Object with the following properties:
* @param {object} [options.data] Data that is posted with the resource.
@@ -1734,8 +1624,6 @@ Resource.options = function (options) {
* @param {object} [options.headers] Additional HTTP headers to send with the request, if any.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
- *
- *
* @example
* resource.post(data)
* .then(function(result) {
@@ -1743,7 +1631,6 @@ Resource.options = function (options) {
* }).catch(function(error) {
* // an error occurred
* });
- *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
@@ -1759,7 +1646,6 @@ Resource.prototype.post = function (data, options) {
/**
* Creates a Resource from a URL and calls post() on it.
- *
* @param {object} options A url or an object with the following properties
* @param {string} options.url The url of the resource.
* @param {object} options.data Data that is posted with the resource.
@@ -1788,15 +1674,12 @@ Resource.post = function (options) {
* the result once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
- *
* @param {object} data Data that is posted with the resource.
* @param {object} [options] Object with the following properties:
* @param {string} [options.responseType] The type of response. This controls the type of item returned.
* @param {object} [options.headers] Additional HTTP headers to send with the request, if any.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
- *
- *
* @example
* resource.put(data)
* .then(function(result) {
@@ -1804,7 +1687,6 @@ Resource.post = function (options) {
* }).catch(function(error) {
* // an error occurred
* });
- *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
@@ -1820,7 +1702,6 @@ Resource.prototype.put = function (data, options) {
/**
* Creates a Resource from a URL and calls put() on it.
- *
* @param {object} options A url or an object with the following properties
* @param {string} options.url The url of the resource.
* @param {object} options.data Data that is posted with the resource.
@@ -1849,15 +1730,12 @@ Resource.put = function (options) {
* the result once loaded, or reject if the resource failed to load. The data is loaded
* using XMLHttpRequest, which means that in order to make requests to another origin,
* the server must have Cross-Origin Resource Sharing (CORS) headers enabled.
- *
* @param {object} data Data that is posted with the resource.
* @param {object} [options] Object with the following properties:
* @param {string} [options.responseType] The type of response. This controls the type of item returned.
* @param {object} [options.headers] Additional HTTP headers to send with the request, if any.
* @param {string} [options.overrideMimeType] Overrides the MIME type returned by the server.
* @returns {Promise|undefined} a promise that will resolve to the requested data when loaded. Returns undefined if request.throttle is true and the request does not have high enough priority.
- *
- *
* @example
* resource.patch(data)
* .then(function(result) {
@@ -1865,7 +1743,6 @@ Resource.put = function (options) {
* }).catch(function(error) {
* // an error occurred
* });
- *
* @see {@link http://www.w3.org/TR/cors/|Cross-Origin Resource Sharing}
* @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}
*/
@@ -1881,7 +1758,6 @@ Resource.prototype.patch = function (data, options) {
/**
* Creates a Resource from a URL and calls patch() on it.
- *
* @param {object} options A url or an object with the following properties
* @param {string} options.url The url of the resource.
* @param {object} options.data Data that is posted with the resource.
@@ -1907,7 +1783,6 @@ Resource.patch = function (options) {
/**
* Contains implementations of functions that can be replaced for testing
- *
* @private
*/
Resource._Implementations = {};
@@ -2026,7 +1901,8 @@ Resource._Implementations.createImage = function (
/**
* Wrapper for createImageBitmap
- *
+ * @param blob
+ * @param options
* @private
*/
Resource.createImageBitmapFromBlob = function (blob, options) {
@@ -2238,7 +2114,6 @@ Resource._Implementations.loadAndExecuteScript = function (
/**
* The default implementations
- *
* @private
*/
Resource._DefaultImplementations = {};
@@ -2251,7 +2126,6 @@ Resource._DefaultImplementations.loadAndExecuteScript =
/**
* A resource instance initialized to the current browser location
- *
* @type {Resource}
* @constant
*/
@@ -2267,7 +2141,6 @@ Resource.DEFAULT = Object.freeze(
/**
* A function that returns the value of the property.
* @callback Resource.RetryCallback
- *
* @param {Resource} [resource] The resource that failed to load.
* @param {RequestErrorEvent} [error] The error that occurred during the loading of the resource.
* @returns {boolean|Promise} If true or a promise that resolved to true, the resource will be retried. Otherwise the failure will be returned.
diff --git a/packages/engine/Source/Core/RuntimeError.js b/packages/engine/Source/Core/RuntimeError.js
index 8bbd56d74efe..ccf62acbce0d 100644
--- a/packages/engine/Source/Core/RuntimeError.js
+++ b/packages/engine/Source/Core/RuntimeError.js
@@ -8,13 +8,10 @@ import defined from "./defined.js";
* On the other hand, a {@link DeveloperError} indicates an exception due
* to a developer error, e.g., invalid argument, that usually indicates a bug in the
* calling code.
- *
* @alias RuntimeError
- * @constructor
- * @extends Error
- *
+ * @class
+ * @augments Error
* @param {string} [message] The error message for this exception.
- *
* @see DeveloperError
*/
function RuntimeError(message) {
diff --git a/packages/engine/Source/Core/S2Cell.js b/packages/engine/Source/Core/S2Cell.js
index 67a05266fce4..ff9b415ab103 100644
--- a/packages/engine/Source/Core/S2Cell.js
+++ b/packages/engine/Source/Core/S2Cell.js
@@ -32,13 +32,13 @@ import RuntimeError from "./RuntimeError.js";
* of the cell along the Hilbert curve. After the positions bits is the sentinel bit, which is always set to 1, and it indicates the level of the
* cell. Again, the level can be between 0 and 30 in S2.
*
- * Note: In the illustration below, the face bits are marked with 'f', the position bits are marked with 'p', the zero bits are marked with '-'.
+ * Note: In the illustration below, the face bits are marked with 'f', the position bits are marked with 'p', the zero bits are marked with '-'.
*
- * Cell ID (base 10): 3170534137668829184
- * Cell ID (base 2) : 0010110000000000000000000000000000000000000000000000000000000000
+ * Cell ID (base 10): 3170534137668829184
+ * Cell ID (base 2) : 0010110000000000000000000000000000000000000000000000000000000000
*
- * 001 0110000000000000000000000000000000000000000000000000000000000
- * fff pps----------------------------------------------------------
+ * 001 0110000000000000000000000000000000000000000000000000000000000
+ * fff pps----------------------------------------------------------
*
* For the cell above, we can see that it lies on face 1 (01), with a Hilbert index of 1 (1).
*
@@ -48,43 +48,43 @@ import RuntimeError from "./RuntimeError.js";
* Cells in S2 subdivide recursively using quadtree subdivision. For each cell, you can get a child of index [0-3]. To compute the child at index i,
* insert the base 2 representation of i to the right of the parent's position bits. Ensure that the sentinel bit is also shifted two places to the right.
*
- * Parent Cell ID (base 10) : 3170534137668829184
- * Parent Cell ID (base 2) : 0010110000000000000000000000000000000000000000000000000000000000
+ * Parent Cell ID (base 10) : 3170534137668829184
+ * Parent Cell ID (base 2) : 0010110000000000000000000000000000000000000000000000000000000000
*
- * 001 0110000000000000000000000000000000000000000000000000000000000
- * fff pps----------------------------------------------------------
+ * 001 0110000000000000000000000000000000000000000000000000000000000
+ * fff pps----------------------------------------------------------
*
- * To get the 3rd child of the cell above, we insert the binary representation of 3 to the right of the parent's position bits:
+ * To get the 3rd child of the cell above, we insert the binary representation of 3 to the right of the parent's position bits:
*
- * Note: In the illustration below, the bits to be added are highlighted with '^'.
+ * Note: In the illustration below, the bits to be added are highlighted with '^'.
*
- * 001 0111100000000000000000000000000000000000000000000000000000000
- * fff pppps--------------------------------------------------------
- * ^^
+ * 001 0111100000000000000000000000000000000000000000000000000000000
+ * fff pppps--------------------------------------------------------
+ * ^^
*
- * Child(3) Cell ID (base 10) : 3386706919782612992
- * Child(3) Cell ID (base 2) : 0010111100000000000000000000000000000000000000000000000000000000
+ * Child(3) Cell ID (base 10) : 3386706919782612992
+ * Child(3) Cell ID (base 2) : 0010111100000000000000000000000000000000000000000000000000000000
*
* Cell Token:
* -----------
* To provide a more concise representation of the S2 cell ID, we can use their hexadecimal representation.
*
- * Cell ID (base 10): 3170534137668829184
- * Cell ID (base 2) : 0010110000000000000000000000000000000000000000000000000000000000
+ * Cell ID (base 10): 3170534137668829184
+ * Cell ID (base 2) : 0010110000000000000000000000000000000000000000000000000000000000
*
- * We remove all trailing zero bits, until we reach the nybble (4 bits) that contains the sentinel bit.
+ * We remove all trailing zero bits, until we reach the nybble (4 bits) that contains the sentinel bit.
*
- * Note: In the illustration below, the bits to be removed are highlighted with 'X'.
+ * Note: In the illustration below, the bits to be removed are highlighted with 'X'.
*
- * 0010110000000000000000000000000000000000000000000000000000000000
- * fffpps--XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
+ * 0010110000000000000000000000000000000000000000000000000000000000
+ * fffpps--XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
*
- * We convert the remaining bits to their hexadecimal representation.
+ * We convert the remaining bits to their hexadecimal representation.
*
- * Base 2: 0010 1100
- * Base 16: "2" "c"
+ * Base 2: 0010 1100
+ * Base 16: "2" "c"
*
- * Cell Token: "2c"
+ * Cell Token: "2c"
*
* To compute the cell ID from the token, we simply add enough zeros to the right to make the ID span 64 bits.
*
@@ -93,14 +93,13 @@ import RuntimeError from "./RuntimeError.js";
*
* To go from a cell in S2 to a point on the ellipsoid, the following order of transforms is applied:
*
- * 1. (Cell ID): S2 cell ID
- * 2. (Face, I, J): Leaf cell coordinates, where i and j are in range [0, 2^30 - 1]
- * 3. (Face, S, T): Cell space coordinates, where s and t are in range [0, 1].
- * 4. (Face, Si, Ti): Discrete cell space coordinates, where si and ti are in range [0, 2^31]
- * 5. (Face, U, V): Cube space coordinates, where u and v are in range [-1, 1]. We apply the non-linear quadratic transform here.
- * 6. (X, Y, Z): Direction vector, where vector may not be unit length. Can be normalized to obtain point on unit sphere
- * 7. (Latitude, Longitude): Direction vector, where latitude is in range [-90, 90] and longitude is in range [-180, 180]
- *
+ * 1. (Cell ID): S2 cell ID
+ * 2. (Face, I, J): Leaf cell coordinates, where i and j are in range [0, 2^30 - 1]
+ * 3. (Face, S, T): Cell space coordinates, where s and t are in range [0, 1].
+ * 4. (Face, Si, Ti): Discrete cell space coordinates, where si and ti are in range [0, 2^31]
+ * 5. (Face, U, V): Cube space coordinates, where u and v are in range [-1, 1]. We apply the non-linear quadratic transform here.
+ * 6. (X, Y, Z): Direction vector, where vector may not be unit length. Can be normalized to obtain point on unit sphere
+ * 7. (Latitude, Longitude): Direction vector, where latitude is in range [-90, 90] and longitude is in range [-180, 180]
* @ignore
*/
@@ -150,10 +149,8 @@ const S2_POSITION_TO_ORIENTATION_MASK = [
/**
* Represents a cell in the S2 geometry library.
- *
* @alias S2Cell
- * @constructor
- *
+ * @class
* @param {bigint} [cellId] The 64-bit S2CellId.
* @private
*/
@@ -176,7 +173,6 @@ function S2Cell(cellId) {
/**
* Creates a new S2Cell from a token. A token is a hexadecimal representation of the 64-bit S2CellId.
- *
* @param {string} token The token for the S2 Cell.
* @returns {S2Cell} Returns a new S2Cell.
* @private
@@ -194,7 +190,6 @@ S2Cell.fromToken = function (token) {
/**
* Validates an S2 cell ID.
- *
* @param {bigint} [cellId] The S2CellId.
* @returns {boolean} Returns true if the cell ID is valid, returns false otherwise.
* @private
@@ -228,7 +223,6 @@ S2Cell.isValidId = function (cellId) {
/**
* Validates an S2 cell token.
- *
* @param {string} [token] The hexadecimal representation of an S2CellId.
* @returns {boolean} Returns true if the token is valid, returns false otherwise.
* @private
@@ -247,7 +241,6 @@ S2Cell.isValidToken = function (token) {
/**
* Converts an S2 cell token to a 64-bit S2 cell ID.
- *
* @param {string} [token] The hexadecimal representation of an S2CellId. Expected to be a valid S2 token.
* @returns {bigint} Returns the S2 cell ID.
* @private
@@ -262,7 +255,6 @@ S2Cell.getIdFromToken = function (token) {
/**
* Converts a 64-bit S2 cell ID to an S2 cell token.
- *
* @param {bigint} [cellId] The S2 cell ID.
* @returns {string} Returns hexadecimal representation of an S2CellId.
* @private
@@ -283,7 +275,6 @@ S2Cell.getTokenFromId = function (cellId) {
/**
* Gets the level of the cell from the cell ID.
- *
* @param {bigint} [cellId] The S2 cell ID.
* @returns {number} Returns the level of the cell.
* @private
@@ -313,7 +304,6 @@ S2Cell.getLevel = function (cellId) {
/**
* Gets the child cell of the cell at the given index.
- *
* @param {number} index An integer index of the child.
* @returns {S2Cell} The child of the S2Cell.
* @private
@@ -340,7 +330,6 @@ S2Cell.prototype.getChild = function (index) {
/**
* Gets the parent cell of an S2Cell.
- *
* @returns {S2Cell} Returns the parent of the S2Cell.
* @private
*/
@@ -360,7 +349,7 @@ S2Cell.prototype.getParent = function () {
/**
* Gets the parent cell at the given level.
- *
+ * @param level
* @returns {S2Cell} Returns the parent of the S2Cell.
* @private
*/
@@ -376,8 +365,8 @@ S2Cell.prototype.getParentAtLevel = function (level) {
/**
* Get center of the S2 cell.
- *
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid.
+ * @param ellipsoid
* @returns {Cartesian3} The position of center of the S2 cell.
* @private
*/
@@ -397,9 +386,9 @@ S2Cell.prototype.getCenter = function (ellipsoid) {
/**
* Get vertex of the S2 cell. Vertices are indexed in CCW order.
- *
* @param {number} index An integer index of the vertex. Must be in the range [0-3].
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid.
+ * @param ellipsoid
* @returns {Cartesian3} The position of the vertex of the S2 cell.
* @private
*/
@@ -426,7 +415,6 @@ S2Cell.prototype.getVertex = function (index, ellipsoid) {
/**
* Creates an S2Cell from its face, position along the Hilbert curve for a given level.
- *
* @param {number} face The root face of S2 this cell is on. Must be in the range [0-5].
* @param {bigint} position The position along the Hilbert curve. Must be in the range [0-4**level).
* @param {number} level The level of the S2 curve. Must be in the range [0-30].
@@ -467,6 +455,8 @@ S2Cell.fromFacePositionLevel = function (face, position, level) {
};
/**
+ * @param cellId
+ * @param level
* @private
*/
function getS2Center(cellId, level) {
@@ -474,6 +464,9 @@ function getS2Center(cellId, level) {
return convertFaceSiTitoXYZ(faceSiTi[0], faceSiTi[1], faceSiTi[2]);
}
/**
+ * @param cellId
+ * @param level
+ * @param index
* @private
*/
function getS2Vertex(cellId, level, index) {
@@ -487,6 +480,8 @@ function getS2Vertex(cellId, level, index) {
// S2 Coordinate Conversions
/**
+ * @param cellId
+ * @param level
* @private
*/
function convertCellIdToFaceSiTi(cellId, level) {
@@ -509,6 +504,7 @@ function convertCellIdToFaceSiTi(cellId, level) {
}
/**
+ * @param cellId
* @private
*/
function convertCellIdToFaceIJ(cellId) {
@@ -546,6 +542,9 @@ function convertCellIdToFaceIJ(cellId) {
}
/**
+ * @param face
+ * @param si
+ * @param ti
* @private
*/
function convertFaceSiTitoXYZ(face, si, ti) {
@@ -558,6 +557,9 @@ function convertFaceSiTitoXYZ(face, si, ti) {
}
/**
+ * @param face
+ * @param u
+ * @param v
* @private
*/
function convertFaceUVtoXYZ(face, u, v) {
@@ -584,6 +586,7 @@ function convertFaceUVtoXYZ(face, u, v) {
*
* For a more detailed comparison of these transform methods, see
* {@link https://github.com/google/s2geometry/blob/0c4c460bdfe696da303641771f9def900b3e440f/src/s2/s2metrics.cc}
+ * @param s
* @private
*/
function convertSTtoUV(s) {
@@ -594,6 +597,7 @@ function convertSTtoUV(s) {
}
/**
+ * @param si
* @private
*/
function convertSiTitoST(si) {
@@ -601,6 +605,8 @@ function convertSiTitoST(si) {
}
/**
+ * @param ij
+ * @param level
* @private
*/
function convertIJLeveltoBoundUV(ij, level) {
@@ -616,6 +622,7 @@ function convertIJLeveltoBoundUV(ij, level) {
}
/**
+ * @param level
* @private
*/
function getSizeIJ(level) {
@@ -623,6 +630,7 @@ function getSizeIJ(level) {
}
/**
+ * @param i
* @private
*/
function convertIJtoSTMinimum(i) {
@@ -637,6 +645,12 @@ function convertIJtoSTMinimum(i) {
* recursively.
*
* See {@link https://github.com/google/s2geometry/blob/c59d0ca01ae3976db7f8abdc83fcc871a3a95186/src/s2/s2cell_id.cc#L75-L109}
+ * @param level
+ * @param i
+ * @param j
+ * @param originalOrientation
+ * @param position
+ * @param orientation
* @private
*/
function generateLookupCell(
@@ -713,6 +727,7 @@ function generateLookupTable() {
/**
* Return the lowest-numbered bit that is on for this cell id
+ * @param cellId
* @private
*/
function lsb(cellId) {
@@ -721,6 +736,7 @@ function lsb(cellId) {
/**
* Return the lowest-numbered bit that is on for cells at the given level.
+ * @param level
* @private
*/
function lsbForLevel(level) {
@@ -802,6 +818,7 @@ const Mod67BitPosition = [
/**
* Return the number of trailing zeros in number.
+ * @param x
* @private
*/
function countTrailingZeroBits(x) {
diff --git a/packages/engine/Source/Core/ScreenSpaceEventHandler.js b/packages/engine/Source/Core/ScreenSpaceEventHandler.js
index 0c2fb86c6079..e3d174ca1e35 100644
--- a/packages/engine/Source/Core/ScreenSpaceEventHandler.js
+++ b/packages/engine/Source/Core/ScreenSpaceEventHandler.js
@@ -896,7 +896,6 @@ function handlePointerMove(screenSpaceEventHandler, event) {
* @typedef {object} ScreenSpaceEventHandler.PositionedEvent
*
* An Event that occurs at a single position on screen.
- *
* @property {Cartesian2} position
*/
@@ -904,7 +903,6 @@ function handlePointerMove(screenSpaceEventHandler, event) {
* @callback ScreenSpaceEventHandler.PositionedEventCallback
*
* The callback invoked when a positioned event triggers an event listener.
- *
* @param {ScreenSpaceEventHandler.PositionedEvent} event The event which triggered the listener
*/
@@ -912,7 +910,6 @@ function handlePointerMove(screenSpaceEventHandler, event) {
* @typedef {object} ScreenSpaceEventHandler.MotionEvent
*
* An Event that starts at one position and ends at another.
- *
* @property {Cartesian2} startPosition
* @property {Cartesian2} endPosition
*/
@@ -921,7 +918,6 @@ function handlePointerMove(screenSpaceEventHandler, event) {
* @callback ScreenSpaceEventHandler.MotionEventCallback
*
* The callback invoked when a motion event triggers an event listener.
- *
* @param {ScreenSpaceEventHandler.MotionEvent} event The event which triggered the listener
*/
@@ -929,7 +925,6 @@ function handlePointerMove(screenSpaceEventHandler, event) {
* @typedef {object} ScreenSpaceEventHandler.TwoPointEvent
*
* An Event that occurs at a two positions on screen.
- *
* @property {Cartesian2} position1
* @property {Cartesian2} position2
*/
@@ -938,7 +933,6 @@ function handlePointerMove(screenSpaceEventHandler, event) {
* @callback ScreenSpaceEventHandler.TwoPointEventCallback
*
* The callback invoked when a two-point event triggers an event listener.
- *
* @param {ScreenSpaceEventHandler.TwoPointEvent} event The event which triggered the listener
*/
@@ -946,7 +940,6 @@ function handlePointerMove(screenSpaceEventHandler, event) {
* @typedef {object} ScreenSpaceEventHandler.TwoPointMotionEvent
*
* An Event that starts at a two positions on screen and moves to two other positions.
- *
* @property {Cartesian2} position1
* @property {Cartesian2} position2
* @property {Cartesian2} previousPosition1
@@ -957,7 +950,6 @@ function handlePointerMove(screenSpaceEventHandler, event) {
* @callback ScreenSpaceEventHandler.TwoPointMotionEventCallback
*
* The callback invoked when a two-point motion event triggers an event listener.
- *
* @param {ScreenSpaceEventHandler.TwoPointMotionEvent} event The event which triggered the listener
*/
@@ -965,19 +957,15 @@ function handlePointerMove(screenSpaceEventHandler, event) {
* @callback ScreenSpaceEventHandler.WheelEventCallback
*
* The callback invoked when a mouse-wheel event triggers an event listener.
- *
* @param {number} delta The amount that the mouse wheel moved
*/
/**
* Handles user input events. Custom functions can be added to be executed on
* when the user enters input.
- *
* @alias ScreenSpaceEventHandler
- *
* @param {HTMLCanvasElement} [element=document] The element to add events to.
- *
- * @constructor
+ * @class
*/
function ScreenSpaceEventHandler(element) {
this._inputEvents = {};
@@ -1013,12 +1001,10 @@ function ScreenSpaceEventHandler(element) {
/**
* Set a function to be executed on an input event.
- *
* @param {ScreenSpaceEventHandler.PositionedEventCallback|ScreenSpaceEventHandler.MotionEventCallback|ScreenSpaceEventHandler.WheelEventCallback|ScreenSpaceEventHandler.TwoPointEventCallback|ScreenSpaceEventHandler.TwoPointMotionEventCallback} action Function to be executed when the input event occurs.
* @param {ScreenSpaceEventType} type The ScreenSpaceEventType of input event.
* @param {KeyboardEventModifier} [modifier] A KeyboardEventModifier key that is held when a type
* event occurs.
- *
* @see ScreenSpaceEventHandler#getInputAction
* @see ScreenSpaceEventHandler#removeInputAction
*/
@@ -1042,13 +1028,10 @@ ScreenSpaceEventHandler.prototype.setInputAction = function (
/**
* Returns the function to be executed on an input event.
- *
* @param {ScreenSpaceEventType} type The ScreenSpaceEventType of input event.
* @param {KeyboardEventModifier} [modifier] A KeyboardEventModifier key that is held when a type
* event occurs.
- *
* @returns {ScreenSpaceEventHandler.PositionedEventCallback|ScreenSpaceEventHandler.MotionEventCallback|ScreenSpaceEventHandler.WheelEventCallback|ScreenSpaceEventHandler.TwoPointEventCallback|ScreenSpaceEventHandler.TwoPointMotionEventCallback} The function to be executed on an input event.
- *
* @see ScreenSpaceEventHandler#setInputAction
* @see ScreenSpaceEventHandler#removeInputAction
*/
@@ -1065,11 +1048,9 @@ ScreenSpaceEventHandler.prototype.getInputAction = function (type, modifier) {
/**
* Removes the function to be executed on an input event.
- *
* @param {ScreenSpaceEventType} type The ScreenSpaceEventType of input event.
* @param {KeyboardEventModifier} [modifier] A KeyboardEventModifier key that is held when a type
* event occurs.
- *
* @see ScreenSpaceEventHandler#getInputAction
* @see ScreenSpaceEventHandler#setInputAction
*/
@@ -1092,9 +1073,7 @@ ScreenSpaceEventHandler.prototype.removeInputAction = function (
*
* If this object was destroyed, it should not be used; calling any function other than
* isDestroyed will result in a {@link DeveloperError} exception.
- *
* @returns {boolean} true if this object was destroyed; otherwise, false.
- *
* @see ScreenSpaceEventHandler#destroy
*/
ScreenSpaceEventHandler.prototype.isDestroyed = function () {
@@ -1107,13 +1086,9 @@ ScreenSpaceEventHandler.prototype.isDestroyed = function () {
* Once an object is destroyed, it should not be used; calling any function other than
* isDestroyed will result in a {@link DeveloperError} exception. Therefore,
* assign the return value (undefined) to the object as done in the example.
- *
- * @exception {DeveloperError} This object was destroyed, i.e., destroy() was called.
- *
- *
+ * @throws {DeveloperError} This object was destroyed, i.e., destroy() was called.
* @example
* handler = handler && handler.destroy();
- *
* @see ScreenSpaceEventHandler#isDestroyed
*/
ScreenSpaceEventHandler.prototype.destroy = function () {
diff --git a/packages/engine/Source/Core/ScreenSpaceEventType.js b/packages/engine/Source/Core/ScreenSpaceEventType.js
index cb5f633f39b4..b55f4b7d6648 100644
--- a/packages/engine/Source/Core/ScreenSpaceEventType.js
+++ b/packages/engine/Source/Core/ScreenSpaceEventType.js
@@ -1,12 +1,10 @@
/**
* This enumerated type is for classifying mouse events: down, up, click, double click, move and move while a button is held down.
- *
* @enum {number}
*/
const ScreenSpaceEventType = {
/**
* Represents a mouse left button down event.
- *
* @type {number}
* @constant
*/
@@ -14,7 +12,6 @@ const ScreenSpaceEventType = {
/**
* Represents a mouse left button up event.
- *
* @type {number}
* @constant
*/
@@ -22,7 +19,6 @@ const ScreenSpaceEventType = {
/**
* Represents a mouse left click event.
- *
* @type {number}
* @constant
*/
@@ -30,7 +26,6 @@ const ScreenSpaceEventType = {
/**
* Represents a mouse left double click event.
- *
* @type {number}
* @constant
*/
@@ -38,7 +33,6 @@ const ScreenSpaceEventType = {
/**
* Represents a mouse left button down event.
- *
* @type {number}
* @constant
*/
@@ -46,7 +40,6 @@ const ScreenSpaceEventType = {
/**
* Represents a mouse right button up event.
- *
* @type {number}
* @constant
*/
@@ -54,7 +47,6 @@ const ScreenSpaceEventType = {
/**
* Represents a mouse right click event.
- *
* @type {number}
* @constant
*/
@@ -62,7 +54,6 @@ const ScreenSpaceEventType = {
/**
* Represents a mouse middle button down event.
- *
* @type {number}
* @constant
*/
@@ -70,7 +61,6 @@ const ScreenSpaceEventType = {
/**
* Represents a mouse middle button up event.
- *
* @type {number}
* @constant
*/
@@ -78,7 +68,6 @@ const ScreenSpaceEventType = {
/**
* Represents a mouse middle click event.
- *
* @type {number}
* @constant
*/
@@ -86,7 +75,6 @@ const ScreenSpaceEventType = {
/**
* Represents a mouse move event.
- *
* @type {number}
* @constant
*/
@@ -94,7 +82,6 @@ const ScreenSpaceEventType = {
/**
* Represents a mouse wheel event.
- *
* @type {number}
* @constant
*/
@@ -102,7 +89,6 @@ const ScreenSpaceEventType = {
/**
* Represents the start of a two-finger event on a touch surface.
- *
* @type {number}
* @constant
*/
@@ -110,7 +96,6 @@ const ScreenSpaceEventType = {
/**
* Represents the end of a two-finger event on a touch surface.
- *
* @type {number}
* @constant
*/
@@ -118,7 +103,6 @@ const ScreenSpaceEventType = {
/**
* Represents a change of a two-finger event on a touch surface.
- *
* @type {number}
* @constant
*/
diff --git a/packages/engine/Source/Core/ShowGeometryInstanceAttribute.js b/packages/engine/Source/Core/ShowGeometryInstanceAttribute.js
index ddef78ca7af9..5765c3599a7d 100644
--- a/packages/engine/Source/Core/ShowGeometryInstanceAttribute.js
+++ b/packages/engine/Source/Core/ShowGeometryInstanceAttribute.js
@@ -5,13 +5,9 @@ import DeveloperError from "./DeveloperError.js";
/**
* Value and type information for per-instance geometry attribute that determines if the geometry instance will be shown.
- *
* @alias ShowGeometryInstanceAttribute
- * @constructor
- *
+ * @class
* @param {boolean} [show=true] Determines if the geometry instance will be shown.
- *
- *
* @example
* const instance = new Cesium.GeometryInstance({
* geometry : new Cesium.BoxGeometry({
@@ -26,7 +22,6 @@ import DeveloperError from "./DeveloperError.js";
* show : new Cesium.ShowGeometryInstanceAttribute(false)
* }
* });
- *
* @see GeometryInstance
* @see GeometryInstanceAttribute
*/
@@ -35,9 +30,7 @@ function ShowGeometryInstanceAttribute(show) {
/**
* The values for the attributes stored in a typed array.
- *
* @type Uint8Array
- *
* @default [1.0]
*/
this.value = ShowGeometryInstanceAttribute.toValue(show);
@@ -47,12 +40,9 @@ Object.defineProperties(ShowGeometryInstanceAttribute.prototype, {
/**
* The datatype of each component in the attribute, e.g., individual elements in
* {@link ColorGeometryInstanceAttribute#value}.
- *
* @memberof ShowGeometryInstanceAttribute.prototype
- *
* @type {ComponentDatatype}
* @readonly
- *
* @default {@link ComponentDatatype.UNSIGNED_BYTE}
*/
componentDatatype: {
@@ -63,12 +53,9 @@ Object.defineProperties(ShowGeometryInstanceAttribute.prototype, {
/**
* The number of components in the attributes, i.e., {@link ColorGeometryInstanceAttribute#value}.
- *
* @memberof ShowGeometryInstanceAttribute.prototype
- *
* @type {number}
* @readonly
- *
* @default 1
*/
componentsPerAttribute: {
@@ -81,12 +68,9 @@ Object.defineProperties(ShowGeometryInstanceAttribute.prototype, {
* When true and componentDatatype is an integer format,
* indicate that the components should be mapped to the range [0, 1] (unsigned)
* or [-1, 1] (signed) when they are accessed as floating-point for rendering.
- *
* @memberof ShowGeometryInstanceAttribute.prototype
- *
* @type {boolean}
* @readonly
- *
* @default true
*/
normalize: {
@@ -98,11 +82,9 @@ Object.defineProperties(ShowGeometryInstanceAttribute.prototype, {
/**
* Converts a boolean show to a typed array that can be used to assign a show attribute.
- *
* @param {boolean} show The show value.
* @param {Uint8Array} [result] The array to store the result in, if undefined a new instance will be created.
* @returns {Uint8Array} The modified result parameter or a new instance if result was undefined.
- *
* @example
* const attributes = primitive.getGeometryInstanceAttributes('an id');
* attributes.show = Cesium.ShowGeometryInstanceAttribute.toValue(true, attributes.show);
diff --git a/packages/engine/Source/Core/Simon1994PlanetaryPositions.js b/packages/engine/Source/Core/Simon1994PlanetaryPositions.js
index 9a26ab3eb886..cc71bc65191b 100644
--- a/packages/engine/Source/Core/Simon1994PlanetaryPositions.js
+++ b/packages/engine/Source/Core/Simon1994PlanetaryPositions.js
@@ -10,7 +10,6 @@ import TimeStandard from "./TimeStandard.js";
/**
* Contains functions for finding the Cartesian coordinates of the sun and the moon in the
* Earth-centered inertial frame.
- *
* @namespace Simon1994PlanetaryPositions
*/
const Simon1994PlanetaryPositions = {};
@@ -629,7 +628,6 @@ const axesTransformation = new Matrix3(
let translation = new Cartesian3();
/**
* Computes the position of the Sun in the Earth-centered inertial frame
- *
* @param {JulianDate} [julianDate] The time at which to compute the Sun's position, if not provided the current system time is used.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} Calculated sun position
@@ -661,7 +659,6 @@ Simon1994PlanetaryPositions.computeSunPositionInEarthInertialFrame = function (
/**
* Computes the position of the Moon in the Earth-centered inertial frame
- *
* @param {JulianDate} [julianDate] The time at which to compute the Sun's position, if not provided the current system time is used.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} Calculated moon position
diff --git a/packages/engine/Source/Core/SimplePolylineGeometry.js b/packages/engine/Source/Core/SimplePolylineGeometry.js
index cabcb2312d4b..a10dc78c943c 100644
--- a/packages/engine/Source/Core/SimplePolylineGeometry.js
+++ b/packages/engine/Source/Core/SimplePolylineGeometry.js
@@ -58,10 +58,8 @@ function interpolateColors(p0, p1, color0, color1, minDistance, array, offset) {
/**
* A description of a polyline modeled as a line strip; the first two positions define a line segment,
* and each additional position defines a line segment from the previous position.
- *
* @alias SimplePolylineGeometry
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of {@link Cartesian3} defining the positions in the polyline as a line strip.
* @param {Color[]} [options.colors] An Array of {@link Color} defining the per vertex or per segment colors.
@@ -69,12 +67,9 @@ function interpolateColors(p0, p1, color0, color1, minDistance, array, offset) {
* @param {ArcType} [options.arcType=ArcType.GEODESIC] The type of line the polyline segments must follow.
* @param {number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude if options.arcType is not ArcType.NONE. Determines the number of positions in the buffer.
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
- *
- * @exception {DeveloperError} At least two positions are required.
- * @exception {DeveloperError} colors has an invalid length.
- *
+ * @throws {DeveloperError} At least two positions are required.
+ * @throws {DeveloperError} colors has an invalid length.
* @see SimplePolylineGeometry#createGeometry
- *
* @example
* // A polyline with two connected line segments
* const polyline = new Cesium.SimplePolylineGeometry({
@@ -129,11 +124,9 @@ function SimplePolylineGeometry(options) {
/**
* Stores the provided instance into the provided array.
- *
* @param {SimplePolylineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
SimplePolylineGeometry.pack = function (value, array, startingIndex) {
@@ -178,7 +171,6 @@ SimplePolylineGeometry.pack = function (value, array, startingIndex) {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {SimplePolylineGeometry} [result] The object into which to store the result.
@@ -249,7 +241,6 @@ const generateArcOptionsScratch = {
/**
* Computes the geometric representation of a simple polyline, including its vertices, indices, and a bounding sphere.
- *
* @param {SimplePolylineGeometry} simplePolylineGeometry A description of the polyline.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/SphereGeometry.js b/packages/engine/Source/Core/SphereGeometry.js
index 14246063e2f2..501d9d861520 100644
--- a/packages/engine/Source/Core/SphereGeometry.js
+++ b/packages/engine/Source/Core/SphereGeometry.js
@@ -7,21 +7,16 @@ import VertexFormat from "./VertexFormat.js";
/**
* A description of a sphere centered at the origin.
- *
* @alias SphereGeometry
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
* @param {number} [options.radius=1.0] The radius of the sphere.
* @param {number} [options.stackPartitions=64] The number of times to partition the ellipsoid into stacks.
* @param {number} [options.slicePartitions=64] The number of times to partition the ellipsoid into radial slices.
* @param {VertexFormat} [options.vertexFormat=VertexFormat.DEFAULT] The vertex attributes to be computed.
- *
- * @exception {DeveloperError} options.slicePartitions cannot be less than three.
- * @exception {DeveloperError} options.stackPartitions cannot be less than three.
- *
+ * @throws {DeveloperError} options.slicePartitions cannot be less than three.
+ * @throws {DeveloperError} options.stackPartitions cannot be less than three.
* @see SphereGeometry#createGeometry
- *
* @example
* const sphere = new Cesium.SphereGeometry({
* radius : 100.0,
@@ -51,11 +46,9 @@ SphereGeometry.packedLength = EllipsoidGeometry.packedLength;
/**
* Stores the provided instance into the provided array.
- *
* @param {SphereGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
SphereGeometry.pack = function (value, array, startingIndex) {
@@ -77,7 +70,6 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {SphereGeometry} [result] The object into which to store the result.
@@ -108,7 +100,6 @@ SphereGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of a sphere, including its vertices, indices, and a bounding sphere.
- *
* @param {SphereGeometry} sphereGeometry A description of the sphere.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/SphereOutlineGeometry.js b/packages/engine/Source/Core/SphereOutlineGeometry.js
index f8a182129a04..42ece52aea95 100644
--- a/packages/engine/Source/Core/SphereOutlineGeometry.js
+++ b/packages/engine/Source/Core/SphereOutlineGeometry.js
@@ -6,20 +6,16 @@ import EllipsoidOutlineGeometry from "./EllipsoidOutlineGeometry.js";
/**
* A description of the outline of a sphere.
- *
* @alias SphereOutlineGeometry
- * @constructor
- *
+ * @class
* @param {object} [options] Object with the following properties:
* @param {number} [options.radius=1.0] The radius of the sphere.
* @param {number} [options.stackPartitions=10] The count of stacks for the sphere (1 greater than the number of parallel lines).
* @param {number} [options.slicePartitions=8] The count of slices for the sphere (Equal to the number of radial lines).
* @param {number} [options.subdivisions=200] The number of points per line, determining the granularity of the curvature .
- *
- * @exception {DeveloperError} options.stackPartitions must be greater than or equal to one.
- * @exception {DeveloperError} options.slicePartitions must be greater than or equal to zero.
- * @exception {DeveloperError} options.subdivisions must be greater than or equal to zero.
- *
+ * @throws {DeveloperError} options.stackPartitions must be greater than or equal to one.
+ * @throws {DeveloperError} options.slicePartitions must be greater than or equal to zero.
+ * @throws {DeveloperError} options.subdivisions must be greater than or equal to zero.
* @example
* const sphere = new Cesium.SphereOutlineGeometry({
* radius : 100.0,
@@ -50,11 +46,9 @@ SphereOutlineGeometry.packedLength = EllipsoidOutlineGeometry.packedLength;
/**
* Stores the provided instance into the provided array.
- *
* @param {SphereOutlineGeometry} value The value to pack.
* @param {number[]} array The array to pack into.
* @param {number} [startingIndex=0] The index into the array at which to start packing the elements.
- *
* @returns {number[]} The array that was packed into
*/
SphereOutlineGeometry.pack = function (value, array, startingIndex) {
@@ -80,7 +74,6 @@ const scratchOptions = {
/**
* Retrieves an instance from a packed array.
- *
* @param {number[]} array The packed array.
* @param {number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {SphereOutlineGeometry} [result] The object into which to store the result.
@@ -108,7 +101,6 @@ SphereOutlineGeometry.unpack = function (array, startingIndex, result) {
/**
* Computes the geometric representation of an outline of a sphere, including its vertices, indices, and a bounding sphere.
- *
* @param {SphereOutlineGeometry} sphereGeometry A description of the sphere outline.
* @returns {Geometry|undefined} The computed vertices and indices.
*/
diff --git a/packages/engine/Source/Core/Spherical.js b/packages/engine/Source/Core/Spherical.js
index 57dca19407fd..5686942dd303 100644
--- a/packages/engine/Source/Core/Spherical.js
+++ b/packages/engine/Source/Core/Spherical.js
@@ -4,10 +4,8 @@ import defined from "./defined.js";
/**
* A set of curvilinear 3-dimensional coordinates.
- *
* @alias Spherical
- * @constructor
- *
+ * @class
* @param {number} [clock=0.0] The angular coordinate lying in the xy-plane measured from the positive x-axis and toward the positive y-axis.
* @param {number} [cone=0.0] The angular coordinate measured from the positive z-axis and toward the negative z-axis.
* @param {number} [magnitude=1.0] The linear coordinate measured from the origin.
@@ -35,7 +33,6 @@ function Spherical(clock, cone, magnitude) {
/**
* Converts the provided Cartesian3 into Spherical coordinates.
- *
* @param {Cartesian3} cartesian3 The Cartesian3 to be converted to Spherical.
* @param {Spherical} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Spherical} The modified result parameter, or a new instance if one was not provided.
@@ -62,7 +59,6 @@ Spherical.fromCartesian3 = function (cartesian3, result) {
/**
* Creates a duplicate of a Spherical.
- *
* @param {Spherical} spherical The spherical to clone.
* @param {Spherical} [result] The object to store the result into, if undefined a new instance will be created.
* @returns {Spherical} The modified result parameter or a new instance if result was undefined. (Returns undefined if spherical is undefined)
@@ -84,7 +80,6 @@ Spherical.clone = function (spherical, result) {
/**
* Computes the normalized version of the provided spherical.
- *
* @param {Spherical} spherical The spherical to be normalized.
* @param {Spherical} [result] The object to store the result into, if undefined a new instance will be created.
* @returns {Spherical} The modified result parameter or a new instance if result was undefined.
@@ -106,7 +101,6 @@ Spherical.normalize = function (spherical, result) {
/**
* Returns true if the first spherical is equal to the second spherical, false otherwise.
- *
* @param {Spherical} left The first Spherical to be compared.
* @param {Spherical} right The second Spherical to be compared.
* @returns {boolean} true if the first spherical is equal to the second spherical, false otherwise.
@@ -124,7 +118,6 @@ Spherical.equals = function (left, right) {
/**
* Returns true if the first spherical is within the provided epsilon of the second spherical, false otherwise.
- *
* @param {Spherical} left The first Spherical to be compared.
* @param {Spherical} right The second Spherical to be compared.
* @param {number} [epsilon=0.0] The epsilon to compare against.
@@ -144,7 +137,6 @@ Spherical.equalsEpsilon = function (left, right, epsilon) {
/**
* Returns true if this spherical is equal to the provided spherical, false otherwise.
- *
* @param {Spherical} other The Spherical to be compared.
* @returns {boolean} true if this spherical is equal to the provided spherical, false otherwise.
*/
@@ -154,7 +146,6 @@ Spherical.prototype.equals = function (other) {
/**
* Creates a duplicate of this Spherical.
- *
* @param {Spherical} [result] The object to store the result into, if undefined a new instance will be created.
* @returns {Spherical} The modified result parameter or a new instance if result was undefined.
*/
@@ -164,7 +155,6 @@ Spherical.prototype.clone = function (result) {
/**
* Returns true if this spherical is within the provided epsilon of the provided spherical, false otherwise.
- *
* @param {Spherical} other The Spherical to be compared.
* @param {number} epsilon The epsilon to compare against.
* @returns {boolean} true if this spherical is within the provided epsilon of the provided spherical, false otherwise.
@@ -175,7 +165,6 @@ Spherical.prototype.equalsEpsilon = function (other, epsilon) {
/**
* Returns a string representing this instance in the format (clock, cone, magnitude).
- *
* @returns {string} A string representing this instance.
*/
Spherical.prototype.toString = function () {
diff --git a/packages/engine/Source/Core/Spline.js b/packages/engine/Source/Core/Spline.js
index 5dba9c6d77e6..5e47d72067e1 100644
--- a/packages/engine/Source/Core/Spline.js
+++ b/packages/engine/Source/Core/Spline.js
@@ -8,10 +8,8 @@ import Quaternion from "./Quaternion.js";
/**
* Creates a curve parameterized and evaluated by time. This type describes an interface
* and is not intended to be instantiated directly.
- *
* @alias Spline
- * @constructor
- *
+ * @class
* @see CatmullRomSpline
* @see LinearSpline
* @see HermiteSpline
@@ -39,12 +37,9 @@ function Spline() {
/**
* Gets the type of the point. This helps a spline determine how to interpolate
* and return its values.
- *
* @param {number|Cartesian3|Quaternion} point
* @returns {*} The type of the point.
- *
- * @exception {DeveloperError} value must be a Cartesian3, Quaternion, or number.
- *
+ * @throws {DeveloperError} value must be a Cartesian3, Quaternion, or number.
* @private
*/
Spline.getPointType = function (point) {
@@ -68,12 +63,10 @@ Spline.getPointType = function (point) {
/**
* Evaluates the curve at a given time.
* @function
- *
* @param {number} time The time at which to evaluate the curve.
* @param {Cartesian3|Quaternion|number[]} [result] The object onto which to store the result.
* @returns {Cartesian3|Quaternion|number[]} The modified result parameter or a new instance of the point on the curve at the given time.
- *
- * @exception {DeveloperError} time must be in the range [t0, tn], where t0
+ * @throws {DeveloperError} time must be in the range [t0, tn], where t0
* is the first element in the array times and tn is the last element
* in the array times.
*/
@@ -82,12 +75,10 @@ Spline.prototype.evaluate = DeveloperError.throwInstantiationError;
/**
* Finds an index i in times such that the parameter
* time is in the interval [times[i], times[i + 1]].
- *
* @param {number} time The time.
* @param {number} startIndex The index from which to start the search.
* @returns {number} The index for the element at the start of the interval.
- *
- * @exception {DeveloperError} time must be in the range [t0, tn], where t0
+ * @throws {DeveloperError} time must be in the range [t0, tn], where t0
* is the first element in the array times and tn is the last element
* in the array times.
*/
@@ -145,9 +136,8 @@ Spline.prototype.findTimeInterval = function (time, startIndex) {
/**
* Wraps the given time to the period covered by the spline.
* @function
- *
* @param {number} time The time.
- * @return {number} The time, wrapped around the animation period.
+ * @returns {number} The time, wrapped around the animation period.
*/
Spline.prototype.wrapTime = function (time) {
//>>includeStart('debug', pragmas.debug);
@@ -173,9 +163,8 @@ Spline.prototype.wrapTime = function (time) {
/**
* Clamps the given time to the period covered by the spline.
* @function
- *
* @param {number} time The time.
- * @return {number} The time, clamped to the animation period.
+ * @returns {number} The time, clamped to the animation period.
*/
Spline.prototype.clampTime = function (time) {
//>>includeStart('debug', pragmas.debug);
diff --git a/packages/engine/Source/Core/SteppedSpline.js b/packages/engine/Source/Core/SteppedSpline.js
index 4f3242a2f0db..f69c6e96f4c8 100644
--- a/packages/engine/Source/Core/SteppedSpline.js
+++ b/packages/engine/Source/Core/SteppedSpline.js
@@ -5,17 +5,13 @@ import Spline from "./Spline.js";
/**
* A spline that is composed of piecewise constants representing a step function.
- *
* @alias SteppedSpline
- * @constructor
- *
+ * @class
* @param {object} options Object with the following properties:
* @param {number[]} options.times An array of strictly increasing, unit-less, floating-point times at each point. The values are in no way connected to the clock time. They are the parameterization for the curve.
* @param {number[]|Cartesian3[]|Quaternion[]} options.points The array of control points.
- *
- * @exception {DeveloperError} points.length must be greater than or equal to 2.
- * @exception {DeveloperError} times.length must be equal to points.length.
- *
+ * @throws {DeveloperError} points.length must be greater than or equal to 2.
+ * @throws {DeveloperError} times.length must be equal to points.length.
* @example
* const times = [ 0.0, 1.5, 3.0, 4.5, 6.0 ];
* const spline = new Cesium.SteppedSpline({
@@ -30,7 +26,6 @@ import Spline from "./Spline.js";
* });
*
* const p0 = spline.evaluate(times[0]);
- *
* @see ConstantSpline
* @see CatmullRomSpline
* @see HermiteSpline
@@ -68,9 +63,7 @@ function SteppedSpline(options) {
Object.defineProperties(SteppedSpline.prototype, {
/**
* An array of times for the control points.
- *
* @memberof SteppedSpline.prototype
- *
* @type {number[]}
* @readonly
*/
@@ -82,9 +75,7 @@ Object.defineProperties(SteppedSpline.prototype, {
/**
* An array of control points.
- *
* @memberof SteppedSpline.prototype
- *
* @type {number[]|Cartesian3[]|Quaternion[]}
* @readonly
*/
@@ -99,12 +90,10 @@ Object.defineProperties(SteppedSpline.prototype, {
* Finds an index i in times such that the parameter
* time is in the interval [times[i], times[i + 1]].
* @function
- *
* @param {number} time The time.
* @param {number} startIndex The index from which to start the search.
* @returns {number} The index for the element at the start of the interval.
- *
- * @exception {DeveloperError} time must be in the range [t0, tn], where t0
+ * @throws {DeveloperError} time must be in the range [t0, tn], where t0
* is the first element in the array times and tn is the last element
* in the array times.
*/
@@ -113,29 +102,25 @@ SteppedSpline.prototype.findTimeInterval = Spline.prototype.findTimeInterval;
/**
* Wraps the given time to the period covered by the spline.
* @function
- *
* @param {number} time The time.
- * @return {number} The time, wrapped around to the updated animation.
+ * @returns {number} The time, wrapped around to the updated animation.
*/
SteppedSpline.prototype.wrapTime = Spline.prototype.wrapTime;
/**
* Clamps the given time to the period covered by the spline.
* @function
- *
* @param {number} time The time.
- * @return {number} The time, clamped to the animation period.
+ * @returns {number} The time, clamped to the animation period.
*/
SteppedSpline.prototype.clampTime = Spline.prototype.clampTime;
/**
* Evaluates the curve at a given time.
- *
* @param {number} time The time at which to evaluate the curve.
* @param {Cartesian3|Quaternion} [result] The object onto which to store the result.
* @returns {number|Cartesian3|Quaternion} The modified result parameter or a new instance of the point on the curve at the given time.
- *
- * @exception {DeveloperError} time must be in the range [t0, tn], where t0
+ * @throws {DeveloperError} time must be in the range [t0, tn], where t0
* is the first element in the array times and tn is the last element
* in the array times.
*/
diff --git a/packages/engine/Source/Core/Stereographic.js b/packages/engine/Source/Core/Stereographic.js
index d632ab326c44..183352caa0b1 100644
--- a/packages/engine/Source/Core/Stereographic.js
+++ b/packages/engine/Source/Core/Stereographic.js
@@ -98,7 +98,6 @@ const scratchCartesian = new Cartesian3();
/**
* Computes the latitude based on an ellipsoid.
- *
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which to compute the longitude.
* @returns {number} The latitude
*/
@@ -124,7 +123,6 @@ const scratchProjectPointOntoPlaneCartesian3 = new Cartesian3();
/**
* Computes the projection of the provided 3D position onto the 2D polar plane, radially outward from the provided origin.
- *
* @param {Cartesian3} cartesian The point to project.
* @param {Stereographic} [result] The object onto which to store the result.
* @returns {Sterographic} The modified result parameter or a new Sterographic instance if none was provided.
@@ -174,7 +172,6 @@ Stereographic.fromCartesian = function (cartesian, result) {
/**
* Computes the projection of the provided 3D positions onto the 2D polar plane, radially outward from the provided origin.
- *
* @param {Cartesian3[]} cartesians The points to project.
* @param {Stereographic[]} [result] The object onto which to store the result.
* @returns {Sterographic[]} The modified result parameter or a new Sterographic instance if none was provided.
@@ -198,7 +195,6 @@ Stereographic.fromCartesianArray = function (cartesians, result) {
/**
* Duplicates a Stereographic instance.
- *
* @param {Stereographic} stereographic The Stereographic to duplicate.
* @param {Stereographic} [result] The object onto which to store the result.
* @returns {Stereographic} The modified result parameter or a new Stereographic instance if one was not provided. (Returns undefined if stereographic is undefined)
@@ -222,7 +218,6 @@ Stereographic.clone = function (stereographic, result) {
/**
* An Ellipsoid instance initialized to radii of (0.5, 0.5, 0.5).
- *
* @type {Stereographic}
* @constant
*/
diff --git a/packages/engine/Source/Core/TaskProcessor.js b/packages/engine/Source/Core/TaskProcessor.js
index 9eca8d863e1b..abea58788ef3 100644
--- a/packages/engine/Source/Core/TaskProcessor.js
+++ b/packages/engine/Source/Core/TaskProcessor.js
@@ -173,10 +173,8 @@ async function getWebAssemblyLoaderConfig(processor, wasmOptions) {
* returning results asynchronously via a promise.
*
* The Worker is not constructed until a task is scheduled.
- *
* @alias TaskProcessor
- * @constructor
- *
+ * @class
* @param {string} workerPath The Url to the worker. This can either be an absolute path or relative to the Cesium Workers folder.
* @param {number} [maximumActiveTasks=Number.POSITIVE_INFINITY] The maximum number of active tasks. Once exceeded,
* scheduleTask will not queue any more tasks, allowing
@@ -272,13 +270,11 @@ async function scheduleTask(processor, parameters, transferableObjects) {
* tasks active than the maximum set by the constructor, will immediately return undefined.
* Otherwise, returns a promise that will resolve to the result posted back by the worker when
* finished.
- *
* @param {object} parameters Any input data that will be posted to the worker.
* @param {Object[]} [transferableObjects] An array of objects contained in parameters that should be
* transferred to the worker instead of copied.
* @returns {Promise