diff --git a/CHANGES.md b/CHANGES.md index 7ab5c50f40a..b3751eaadc0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,6 +7,7 @@ ##### Fixes :wrench: - Fixed error when resetting `Cesium3DTileset.modelMatrix` to its initial value. [#12409](https://github.com/CesiumGS/cesium/pull/12409) +- Fixed the parameter types of the `ClippingPolygon.equals` function, and fixed cases where parameters to `equals` functions had erroneously not been marked as 'optional'. [#12394](https://github.com/CesiumGS/cesium/pull/12394) - Fixed type of `ImageryLayer.fromProviderAsync`, to correctly show that the param `options` is optional. [#12400](https://github.com/CesiumGS/cesium/pull/12400) ### 1.125 - 2025-01-02 diff --git a/packages/engine/Source/Core/Color.js b/packages/engine/Source/Core/Color.js index 8fd5b033119..5f39d2ddac3 100644 --- a/packages/engine/Source/Core/Color.js +++ b/packages/engine/Source/Core/Color.js @@ -536,8 +536,8 @@ 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. + * @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. */ Color.equals = function (left, right) { @@ -577,7 +577,7 @@ Color.prototype.clone = function (result) { /** * Returns true if this Color equals other. * - * @param {Color} other The Color to compare for equality. + * @param {Color} [other] The Color to compare for equality. * @returns {boolean} true if the Colors are equal; otherwise, false. */ Color.prototype.equals = function (other) { diff --git a/packages/engine/Source/Core/Credit.js b/packages/engine/Source/Core/Credit.js index bbbe7984a43..863a64be80d 100644 --- a/packages/engine/Source/Core/Credit.js +++ b/packages/engine/Source/Core/Credit.js @@ -115,8 +115,8 @@ Object.defineProperties(Credit.prototype, { /** * Returns true if the credits are equal * - * @param {Credit} left The first credit - * @param {Credit} right The second credit + * @param {Credit} [left] The first credit + * @param {Credit} [right] The second credit * @returns {boolean} true if left and right are equal, false otherwise. */ Credit.equals = function (left, right) { @@ -132,7 +132,7 @@ Credit.equals = function (left, right) { /** * Returns true if the credits are equal * - * @param {Credit} credit The credit to compare to. + * @param {Credit} [credit] The credit to compare to. * @returns {boolean} true if left and right are equal, false otherwise. */ Credit.prototype.equals = function (credit) { diff --git a/packages/engine/Source/Core/DistanceDisplayCondition.js b/packages/engine/Source/Core/DistanceDisplayCondition.js index e00e08aec34..8d57139dc70 100644 --- a/packages/engine/Source/Core/DistanceDisplayCondition.js +++ b/packages/engine/Source/Core/DistanceDisplayCondition.js @@ -115,8 +115,8 @@ 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. + * @param {DistanceDisplayCondition} [left] A distance display condition. + * @param {DistanceDisplayCondition} [right] Another distance display condition. * @return {boolean} Whether the two distance display conditions are equal. */ DistanceDisplayCondition.equals = function (left, right) { @@ -163,7 +163,7 @@ DistanceDisplayCondition.prototype.clone = function (result) { /** * Determines if this distance display condition is equal to another. * - * @param {DistanceDisplayCondition} other Another distance display condition. + * @param {DistanceDisplayCondition} [other] Another distance display condition. * @return {boolean} Whether this distance display condition is equal to the other. */ DistanceDisplayCondition.prototype.equals = function (other) { diff --git a/packages/engine/Source/Core/OrientedBoundingBox.js b/packages/engine/Source/Core/OrientedBoundingBox.js index cf4a6d392b4..64d588b06d9 100644 --- a/packages/engine/Source/Core/OrientedBoundingBox.js +++ b/packages/engine/Source/Core/OrientedBoundingBox.js @@ -1236,8 +1236,8 @@ 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. + * @param {OrientedBoundingBox} [left] The first OrientedBoundingBox. + * @param {OrientedBoundingBox} [right] The second OrientedBoundingBox. * @returns {boolean} true if left and right are equal, false otherwise. */ OrientedBoundingBox.equals = function (left, right) { diff --git a/packages/engine/Source/Core/Spherical.js b/packages/engine/Source/Core/Spherical.js index 57dca19407f..e0d84bd387e 100644 --- a/packages/engine/Source/Core/Spherical.js +++ b/packages/engine/Source/Core/Spherical.js @@ -107,8 +107,8 @@ 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. + * @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. */ Spherical.equals = function (left, right) { @@ -145,7 +145,7 @@ 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. + * @param {Spherical} [other] The Spherical to be compared. * @returns {boolean} true if this spherical is equal to the provided spherical, false otherwise. */ Spherical.prototype.equals = function (other) { diff --git a/packages/engine/Source/DataSources/DataSourceClock.js b/packages/engine/Source/DataSources/DataSourceClock.js index 58d55e2a3f0..8bebb21cc2b 100644 --- a/packages/engine/Source/DataSources/DataSourceClock.js +++ b/packages/engine/Source/DataSources/DataSourceClock.js @@ -108,7 +108,7 @@ DataSourceClock.prototype.clone = function (result) { /** * Returns true if this DataSourceClock is equivalent to the other * - * @param {DataSourceClock} other The other DataSourceClock to compare to. + * @param {DataSourceClock} [other] The other DataSourceClock to compare to. * @returns {boolean} true if the DataSourceClocks are equal; otherwise, false. */ DataSourceClock.prototype.equals = function (other) { diff --git a/packages/engine/Source/Scene/Billboard.js b/packages/engine/Source/Scene/Billboard.js index d0612980096..9834474f59b 100644 --- a/packages/engine/Source/Scene/Billboard.js +++ b/packages/engine/Source/Scene/Billboard.js @@ -1562,7 +1562,7 @@ Billboard.getScreenSpaceBoundingBox = function ( * Determines if this billboard equals another billboard. Billboards are equal if all their properties * are equal. Billboards in different collections can be equal. * - * @param {Billboard} other The billboard to compare for equality. + * @param {Billboard} [other] The billboard to compare for equality. * @returns {boolean} true if the billboards are equal; otherwise, false. */ Billboard.prototype.equals = function (other) { diff --git a/packages/engine/Source/Scene/ClippingPolygon.js b/packages/engine/Source/Scene/ClippingPolygon.js index 3b1886aa44b..566f6941e84 100644 --- a/packages/engine/Source/Scene/ClippingPolygon.js +++ b/packages/engine/Source/Scene/ClippingPolygon.js @@ -117,8 +117,8 @@ ClippingPolygon.clone = function (polygon, result) { * Compares the provided ClippingPolygons and returns * true if they are equal, false otherwise. * - * @param {Plane} left The first polygon. - * @param {Plane} right The second polygon. + * @param {ClippingPolygon} left The first polygon. + * @param {ClippingPolygon} right The second polygon. * @returns {boolean} true if left and right are equal, false otherwise. */ ClippingPolygon.equals = function (left, right) { diff --git a/packages/engine/Source/Scene/Label.js b/packages/engine/Source/Scene/Label.js index 61168a5ff2c..19b645ac13e 100644 --- a/packages/engine/Source/Scene/Label.js +++ b/packages/engine/Source/Scene/Label.js @@ -1364,7 +1364,7 @@ Label.filterUnsupportedCharacters = function (text) { * Determines if this label equals another label. Labels are equal if all their properties * are equal. Labels in different collections can be equal. * - * @param {Label} other The label to compare for equality. + * @param {Label} [other] The label to compare for equality. * @returns {boolean} true if the labels are equal; otherwise, false. */ Label.prototype.equals = function (other) { diff --git a/packages/engine/Source/Scene/PointPrimitive.js b/packages/engine/Source/Scene/PointPrimitive.js index db93554292c..cafd54eabfe 100644 --- a/packages/engine/Source/Scene/PointPrimitive.js +++ b/packages/engine/Source/Scene/PointPrimitive.js @@ -665,7 +665,7 @@ PointPrimitive.getScreenSpaceBoundingBox = function ( * Determines if this point equals another point. Points are equal if all their properties * are equal. Points in different collections can be equal. * - * @param {PointPrimitive} other The point to compare for equality. + * @param {PointPrimitive} [other] The point to compare for equality. * @returns {boolean} true if the points are equal; otherwise, false. */ PointPrimitive.prototype.equals = function (other) {