From 0dc51d4f30ae63201e00ea9023b3584feb0141df Mon Sep 17 00:00:00 2001 From: YoussefV Date: Tue, 21 Apr 2020 14:46:02 -0400 Subject: [PATCH 1/4] Made documentation fixes so that there are no false globals from JSDoc --- Source/Core/WallGeometryLibrary.js | 2 +- Source/Renderer/ClearCommand.js | 1 + Source/Renderer/ComputeCommand.js | 1 + Source/Renderer/Context.js | 1 + Source/Renderer/Framebuffer.js | 1 + Source/Renderer/PassState.js | 1 + Source/Renderer/UniformState.js | 1 + Source/Renderer/createUniform.js | 13 +++++++++++++ Source/Renderer/createUniformArray.js | 13 +++++++++++++ Source/Scene/Cesium3DTileBatchTable.js | 1 + Source/Scene/Cesium3DTilePassState.js | 1 + Source/Scene/Cesium3DTilesetHeatmap.js | 1 + Source/Scene/Cesium3DTilesetTraversal.js | 1 + Source/Scene/ImageryLayer.js | 1 + Source/Scene/JobScheduler.js | 5 +++++ Source/Scene/ModelLoadResources.js | 1 + Source/Scene/QuadtreePrimitive.js | 1 + Source/Scene/ShadowVolumeAppearance.js | 2 ++ Source/Scene/TileMapServiceImageryProvider.js | 1 + 19 files changed, 48 insertions(+), 1 deletion(-) diff --git a/Source/Core/WallGeometryLibrary.js b/Source/Core/WallGeometryLibrary.js index c8f903e0ffef..ff4fc2a956b9 100644 --- a/Source/Core/WallGeometryLibrary.js +++ b/Source/Core/WallGeometryLibrary.js @@ -7,7 +7,7 @@ import PolylinePipeline from "./PolylinePipeline.js"; import WindingOrder from "./WindingOrder.js"; /** - * private + * @private */ var WallGeometryLibrary = {}; diff --git a/Source/Renderer/ClearCommand.js b/Source/Renderer/ClearCommand.js index 332c195c692c..b2b23f86c905 100644 --- a/Source/Renderer/ClearCommand.js +++ b/Source/Renderer/ClearCommand.js @@ -5,6 +5,7 @@ import defaultValue from "../Core/defaultValue.js"; * Represents a command to the renderer for clearing a framebuffer. * * @private + * @constructor */ function ClearCommand(options) { options = defaultValue(options, defaultValue.EMPTY_OBJECT); diff --git a/Source/Renderer/ComputeCommand.js b/Source/Renderer/ComputeCommand.js index 15b287ea7b4e..8f9422c28c40 100644 --- a/Source/Renderer/ComputeCommand.js +++ b/Source/Renderer/ComputeCommand.js @@ -5,6 +5,7 @@ import Pass from "./Pass.js"; * Represents a command to the renderer for GPU Compute (using old-school GPGPU). * * @private + * @constructor */ function ComputeCommand(options) { options = defaultValue(options, defaultValue.EMPTY_OBJECT); diff --git a/Source/Renderer/Context.js b/Source/Renderer/Context.js index dcc832b4170e..6c29cf8b1108 100644 --- a/Source/Renderer/Context.js +++ b/Source/Renderer/Context.js @@ -145,6 +145,7 @@ function getExtension(gl, names) { /** * @private + * @constructor */ function Context(canvas, options) { // this check must use typeof, not defined, because defined doesn't work with undeclared variables. diff --git a/Source/Renderer/Framebuffer.js b/Source/Renderer/Framebuffer.js index b316ccb05907..17eb57c16866 100644 --- a/Source/Renderer/Framebuffer.js +++ b/Source/Renderer/Framebuffer.js @@ -70,6 +70,7 @@ function attachRenderbuffer(framebuffer, attachment, renderbuffer) { * }); * * @private + * @constructor */ function Framebuffer(options) { options = defaultValue(options, defaultValue.EMPTY_OBJECT); diff --git a/Source/Renderer/PassState.js b/Source/Renderer/PassState.js index f9dbd7e5b92c..f634256ce14e 100644 --- a/Source/Renderer/PassState.js +++ b/Source/Renderer/PassState.js @@ -3,6 +3,7 @@ * in a command being executed. * * @private + * @constructor */ function PassState(context) { /** diff --git a/Source/Renderer/UniformState.js b/Source/Renderer/UniformState.js index a85f57670225..d456419789c0 100644 --- a/Source/Renderer/UniformState.js +++ b/Source/Renderer/UniformState.js @@ -19,6 +19,7 @@ import SunLight from "../Scene/SunLight.js"; /** * @private + * @constructor */ function UniformState() { /** diff --git a/Source/Renderer/createUniform.js b/Source/Renderer/createUniform.js index a28be81b6e06..7a440bd92bce 100644 --- a/Source/Renderer/createUniform.js +++ b/Source/Renderer/createUniform.js @@ -11,6 +11,7 @@ import RuntimeError from "../Core/RuntimeError.js"; /** * @private + * @constructor */ function createUniform(gl, activeUniform, uniformName, location) { switch (activeUniform.type) { @@ -56,6 +57,7 @@ function createUniform(gl, activeUniform, uniformName, location) { /** * @private + * @constructor */ function UniformFloat(gl, activeUniform, uniformName, location) { /** @@ -82,6 +84,7 @@ UniformFloat.prototype.set = function () { /** * @private + * @constructor */ function UniformFloatVec2(gl, activeUniform, uniformName, location) { /** @@ -109,6 +112,7 @@ UniformFloatVec2.prototype.set = function () { /** * @private + * @constructor */ function UniformFloatVec3(gl, activeUniform, uniformName, location) { /** @@ -150,6 +154,7 @@ UniformFloatVec3.prototype.set = function () { /** * @private + * @constructor */ function UniformFloatVec4(gl, activeUniform, uniformName, location) { /** @@ -191,6 +196,7 @@ UniformFloatVec4.prototype.set = function () { /** * @private + * @constructor */ function UniformSampler(gl, activeUniform, uniformName, location) { /** @@ -225,6 +231,7 @@ UniformSampler.prototype._setSampler = function (textureUnitIndex) { /** * @private + * @constructor */ function UniformInt(gl, activeUniform, uniformName, location) { /** @@ -250,6 +257,7 @@ UniformInt.prototype.set = function () { /////////////////////////////////////////////////////////////////////////// /** * @private + * @constructor */ function UniformIntVec2(gl, activeUniform, uniformName, location) { /** @@ -276,6 +284,7 @@ UniformIntVec2.prototype.set = function () { /////////////////////////////////////////////////////////////////////////// /** * @private + * @constructor */ function UniformIntVec3(gl, activeUniform, uniformName, location) { /** @@ -302,6 +311,7 @@ UniformIntVec3.prototype.set = function () { /////////////////////////////////////////////////////////////////////////// /** * @private + * @constructor */ function UniformIntVec4(gl, activeUniform, uniformName, location) { /** @@ -330,6 +340,7 @@ UniformIntVec4.prototype.set = function () { var scratchUniformArray = new Float32Array(4); /** * @private + * @constructor */ function UniformMat2(gl, activeUniform, uniformName, location) { /** @@ -359,6 +370,7 @@ UniformMat2.prototype.set = function () { var scratchMat3Array = new Float32Array(9); /** * @private + * @constructor */ function UniformMat3(gl, activeUniform, uniformName, location) { /** @@ -388,6 +400,7 @@ UniformMat3.prototype.set = function () { var scratchMat4Array = new Float32Array(16); /** * @private + * @constructor */ function UniformMat4(gl, activeUniform, uniformName, location) { /** diff --git a/Source/Renderer/createUniformArray.js b/Source/Renderer/createUniformArray.js index 7604f74ca1cc..bdd862a5208e 100644 --- a/Source/Renderer/createUniformArray.js +++ b/Source/Renderer/createUniformArray.js @@ -11,6 +11,7 @@ import RuntimeError from "../Core/RuntimeError.js"; /** * @private + * @constructor */ function createUniformArray(gl, activeUniform, uniformName, locations) { switch (activeUniform.type) { @@ -71,6 +72,7 @@ function createUniformArray(gl, activeUniform, uniformName, locations) { /** * @private + * @constructor */ function UniformArrayFloat(gl, activeUniform, uniformName, locations) { var length = locations.length; @@ -112,6 +114,7 @@ UniformArrayFloat.prototype.set = function () { /** * @private + * @constructor */ function UniformArrayFloatVec2(gl, activeUniform, uniformName, locations) { var length = locations.length; @@ -155,6 +158,7 @@ UniformArrayFloatVec2.prototype.set = function () { /** * @private + * @constructor */ function UniformArrayFloatVec3(gl, activeUniform, uniformName, locations) { var length = locations.length; @@ -216,6 +220,7 @@ UniformArrayFloatVec3.prototype.set = function () { /** * @private + * @constructor */ function UniformArrayFloatVec4(gl, activeUniform, uniformName, locations) { var length = locations.length; @@ -282,6 +287,7 @@ UniformArrayFloatVec4.prototype.set = function () { /** * @private + * @constructor */ function UniformArraySampler(gl, activeUniform, uniformName, locations) { var length = locations.length; @@ -331,6 +337,7 @@ UniformArraySampler.prototype._setSampler = function (textureUnitIndex) { /** * @private + * @constructor */ function UniformArrayInt(gl, activeUniform, uniformName, locations) { var length = locations.length; @@ -372,6 +379,7 @@ UniformArrayInt.prototype.set = function () { /** * @private + * @constructor */ function UniformArrayIntVec2(gl, activeUniform, uniformName, locations) { var length = locations.length; @@ -415,6 +423,7 @@ UniformArrayIntVec2.prototype.set = function () { /** * @private + * @constructor */ function UniformArrayIntVec3(gl, activeUniform, uniformName, locations) { var length = locations.length; @@ -458,6 +467,7 @@ UniformArrayIntVec3.prototype.set = function () { /** * @private + * @constructor */ function UniformArrayIntVec4(gl, activeUniform, uniformName, locations) { var length = locations.length; @@ -501,6 +511,7 @@ UniformArrayIntVec4.prototype.set = function () { /** * @private + * @constructor */ function UniformArrayMat2(gl, activeUniform, uniformName, locations) { var length = locations.length; @@ -544,6 +555,7 @@ UniformArrayMat2.prototype.set = function () { /** * @private + * @constructor */ function UniformArrayMat3(gl, activeUniform, uniformName, locations) { var length = locations.length; @@ -587,6 +599,7 @@ UniformArrayMat3.prototype.set = function () { /** * @private + * @constructor */ function UniformArrayMat4(gl, activeUniform, uniformName, locations) { var length = locations.length; diff --git a/Source/Scene/Cesium3DTileBatchTable.js b/Source/Scene/Cesium3DTileBatchTable.js index b0ef2805eaa5..90255e28fa2d 100644 --- a/Source/Scene/Cesium3DTileBatchTable.js +++ b/Source/Scene/Cesium3DTileBatchTable.js @@ -36,6 +36,7 @@ var DEFAULT_SHOW_VALUE = true; /** * @private + * @constructor */ function Cesium3DTileBatchTable( content, diff --git a/Source/Scene/Cesium3DTilePassState.js b/Source/Scene/Cesium3DTilePassState.js index b70522012a7c..ac53e44fad48 100644 --- a/Source/Scene/Cesium3DTilePassState.js +++ b/Source/Scene/Cesium3DTilePassState.js @@ -4,6 +4,7 @@ import Check from "../Core/Check.js"; * The state for a 3D Tiles update pass. * * @private + * @constructor */ function Cesium3DTilePassState(options) { //>>includeStart('debug', pragmas.debug); diff --git a/Source/Scene/Cesium3DTilesetHeatmap.js b/Source/Scene/Cesium3DTilesetHeatmap.js index abff98a9c63b..84997ce85c35 100644 --- a/Source/Scene/Cesium3DTilesetHeatmap.js +++ b/Source/Scene/Cesium3DTilesetHeatmap.js @@ -35,6 +35,7 @@ function Cesium3DTilesetHeatmap(tilePropertyName) { /** * Convert to a usable heatmap value (i.e. a number). Ensures that tile values that aren't stored as numbers can be used for colorization. + * @private */ function getHeatmapValue(tileValue, tilePropertyName) { var value; diff --git a/Source/Scene/Cesium3DTilesetTraversal.js b/Source/Scene/Cesium3DTilesetTraversal.js index 3b0f8508693b..4e022ba775d5 100644 --- a/Source/Scene/Cesium3DTilesetTraversal.js +++ b/Source/Scene/Cesium3DTilesetTraversal.js @@ -693,6 +693,7 @@ function executeEmptyTraversal(tileset, root, frameState) { * * NOTE: 3D Tiles uses 3 bits from the stencil buffer meaning this will not work when there is a chain of * selected tiles that is deeper than 7. This is not very likely. + * @private */ function traverseAndSelect(tileset, root, frameState) { var stack = selectionTraversal.stack; diff --git a/Source/Scene/ImageryLayer.js b/Source/Scene/ImageryLayer.js index d6f7fb35059f..b8938689eff2 100644 --- a/Source/Scene/ImageryLayer.js +++ b/Source/Scene/ImageryLayer.js @@ -1467,6 +1467,7 @@ function reprojectToGeographic(command, context, texture, rectangle) { * @param {Number} texelSpacing The texel spacing for which to find a corresponding level. * @param {Number} latitudeClosestToEquator The latitude closest to the equator that we're concerned with. * @returns {Number} The level with the specified texel spacing or less. + * @private */ function getLevelWithMaximumTexelSpacing( layer, diff --git a/Source/Scene/JobScheduler.js b/Source/Scene/JobScheduler.js index 7cf29bff151c..9f1d6217e0f8 100644 --- a/Source/Scene/JobScheduler.js +++ b/Source/Scene/JobScheduler.js @@ -3,6 +3,11 @@ import DeveloperError from "../Core/DeveloperError.js"; import getTimestamp from "../Core/getTimestamp.js"; import JobType from "./JobType.js"; +/** + * + * @private + * @constructor + */ function JobTypeBudget(total) { /** * Total budget, in milliseconds, allowed for one frame diff --git a/Source/Scene/ModelLoadResources.js b/Source/Scene/ModelLoadResources.js index b734df12cc3f..a3b25c4b116a 100644 --- a/Source/Scene/ModelLoadResources.js +++ b/Source/Scene/ModelLoadResources.js @@ -41,6 +41,7 @@ function ModelLoadResources() { /** * This function differs from the normal subarray function * because it takes offset and length, rather than begin and end. + * @private */ function getSubarray(array, offset, length) { return array.subarray(offset, offset + length); diff --git a/Source/Scene/QuadtreePrimitive.js b/Source/Scene/QuadtreePrimitive.js index e43dcc928280..a513eed880d2 100644 --- a/Source/Scene/QuadtreePrimitive.js +++ b/Source/Scene/QuadtreePrimitive.js @@ -378,6 +378,7 @@ QuadtreePrimitive.prototype.render = function (frameState) { /** * Checks if the load queue length has changed since the last time we raised a queue change event - if so, raises * a new change event at the end of the render cycle. + * @private */ function updateTileLoadProgress(primitive, frameState) { var currentLoadQueueLength = diff --git a/Source/Scene/ShadowVolumeAppearance.js b/Source/Scene/ShadowVolumeAppearance.js index 33b3d050a3bf..423f56920dfe 100644 --- a/Source/Scene/ShadowVolumeAppearance.js +++ b/Source/Scene/ShadowVolumeAppearance.js @@ -670,6 +670,8 @@ var pointsCartographicScratch = [ * Flatten the ellipsoid-centered corners and edge-centers of the rectangle * into the plane of the local ENU system, compute bounds in 2D, and * project back to ellipsoid-centered. + * + * @private */ function computeRectangleBounds( rectangle, diff --git a/Source/Scene/TileMapServiceImageryProvider.js b/Source/Scene/TileMapServiceImageryProvider.js index 221e5653e07f..9f16e1e8392d 100644 --- a/Source/Scene/TileMapServiceImageryProvider.js +++ b/Source/Scene/TileMapServiceImageryProvider.js @@ -120,6 +120,7 @@ TileMapServiceImageryProvider.prototype._requestMetadata = function () { /** * Mutates the properties of a given rectangle so it does not extend outside of the given tiling scheme's rectangle + * @private */ function confineRectangleToTilingScheme(rectangle, tilingScheme) { if (rectangle.west < tilingScheme.rectangle.west) { From 36147ae8e59ec4bd77d69a1c46d174b98b9890f8 Mon Sep 17 00:00:00 2001 From: YoussefV Date: Tue, 21 Apr 2020 16:54:35 -0400 Subject: [PATCH 2/4] deleted isArray.js, cleaned up commit history --- CHANGES.md | 2 ++ Source/Core/isArray.js | 27 --------------------------- 2 files changed, 2 insertions(+), 27 deletions(-) delete mode 100644 Source/Core/isArray.js diff --git a/CHANGES.md b/CHANGES.md index ea8256f390ef..4ba54958bf61 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,8 @@ - The property `Scene.sunColor` has been removed. Use `scene.light.color` and `scene.light.intensity` instead. [#8774](https://github.com/CesiumGS/cesium/pull/8774) +- Removed `Cesium.isArray` (from file: `isArray.js`) using native `Array.isArray` instead. [#8779](https://github.com/CesiumGS/cesium/pull/8779) + ##### Additions :tada: - Added `Scene.cameraUnderground` for checking whether the camera is underneath the globe. [#8765](https://github.com/CesiumGS/cesium/pull/8765) diff --git a/Source/Core/isArray.js b/Source/Core/isArray.js deleted file mode 100644 index f22df4ec523c..000000000000 --- a/Source/Core/isArray.js +++ /dev/null @@ -1,27 +0,0 @@ -import defined from "./defined.js"; -import deprecationWarning from "./deprecationWarning.js"; - -/** - * Tests an object to see if it is an array. - * @exports isArray - * - * @param {*} value The value to test. - * @returns {Boolean} true if the value is an array, false otherwise. - * @deprecated See https://github.com/AnalyticalGraphicsInc/cesium/issues/8526. - * Use `Array.isArray` instead - */ -var isArray = Array.isArray; -if (!defined(isArray)) { - isArray = function (value) { - return Object.prototype.toString.call(value) === "[object Array]"; - }; -} - -function isArrayFunction(value) { - deprecationWarning( - "isArray", - "isArray will be removed in Cesium 1.69. Use the native `Array.isArray` function instead." - ); - return isArray(value); -} -export default isArrayFunction; From 7fc216aa8b25d0e22f4b52040291418827aee4ac Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Tue, 21 Apr 2020 17:12:02 -0400 Subject: [PATCH 3/4] Update CHANGES.md Co-Authored-By: Sean Lilley --- CHANGES.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 4ba54958bf61..805583d6224a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,8 +5,7 @@ ##### Breaking Changes :mega: - The property `Scene.sunColor` has been removed. Use `scene.light.color` and `scene.light.intensity` instead. [#8774](https://github.com/CesiumGS/cesium/pull/8774) - -- Removed `Cesium.isArray` (from file: `isArray.js`) using native `Array.isArray` instead. [#8779](https://github.com/CesiumGS/cesium/pull/8779) +- Removed `isArray`. Use the native `Array.isArray` function instead. [#8779](https://github.com/CesiumGS/cesium/pull/8779) ##### Additions :tada: From 0a7a1d52e98bf6dbca3179980294c16e061fac44 Mon Sep 17 00:00:00 2001 From: Omar Shehata Date: Wed, 22 Apr 2020 10:16:38 -0400 Subject: [PATCH 4/4] Update default value in jsdoc --- Source/Scene/Scene.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Scene/Scene.js b/Source/Scene/Scene.js index 47bc258c55db..3370802a3700 100644 --- a/Source/Scene/Scene.js +++ b/Source/Scene/Scene.js @@ -680,7 +680,7 @@ function Scene(options) { * @see Scene#requestRenderMode * * @type {Number} - * @default 0.5 + * @default 0.0 */ this.maximumRenderTimeChange = defaultValue( options.maximumRenderTimeChange,