From 0b589564ea5e04932779bfdda0f2ec207f0e3b03 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 20 Nov 2020 16:37:53 +0000 Subject: [PATCH] JSDoc fixes --- src/renderer/webgl/PipelineManager.js | 2 +- src/renderer/webgl/pipelines/GraphicsPipeline.js | 4 ++-- src/tilemaps/components/Copy.js | 3 +-- src/tilemaps/components/CreateFromTiles.js | 10 +++++----- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/renderer/webgl/PipelineManager.js b/src/renderer/webgl/PipelineManager.js index d57d9ec2d..014abef78 100644 --- a/src/renderer/webgl/PipelineManager.js +++ b/src/renderer/webgl/PipelineManager.js @@ -838,7 +838,7 @@ var PipelineManager = new Class({ /** * Clears the given Render Target. * - * @method Phaser.Renderer.WebGL.Pipelines.UtilityPipeline#clearFrame + * @method Phaser.Renderer.WebGL.PipelineManager#clearFrame * @since 3.50.0 * * @param {Phaser.Renderer.WebGL.RenderTarget} target - The Render Target to clear. diff --git a/src/renderer/webgl/pipelines/GraphicsPipeline.js b/src/renderer/webgl/pipelines/GraphicsPipeline.js index 51bdf363c..8a3885cb2 100644 --- a/src/renderer/webgl/pipelines/GraphicsPipeline.js +++ b/src/renderer/webgl/pipelines/GraphicsPipeline.js @@ -660,8 +660,8 @@ var GraphicsPipeline = new Class({ /** * Destroys all shader instances, removes all object references and nulls all external references. * - * @method Phaser.Renderer.WebGL.WebGLPipeline#destroy - * @since 3.0.0 + * @method Phaser.Renderer.WebGL.Pipelines.GraphicsPipeline#destroy + * @since 3.50.0 * * @return {this} This WebGLPipeline instance. */ diff --git a/src/tilemaps/components/Copy.js b/src/tilemaps/components/Copy.js index 5fc3993c3..01caa9907 100644 --- a/src/tilemaps/components/Copy.js +++ b/src/tilemaps/components/Copy.js @@ -21,14 +21,13 @@ var CalculateFacesWithin = require('./CalculateFacesWithin'); * @param {integer} height - The height of the area to copy, in tiles, not pixels. * @param {integer} destTileX - The x coordinate of the area to copy to, in tiles, not pixels. * @param {integer} destTileY - The y coordinate of the area to copy to, in tiles, not pixels. - * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated. + * @param {boolean} recalculateFaces - `true` if the faces data should be recalculated. * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. */ var Copy = function (srcTileX, srcTileY, width, height, destTileX, destTileY, recalculateFaces, layer) { if (srcTileX < 0) { srcTileX = 0; } if (srcTileY < 0) { srcTileY = 0; } - if (recalculateFaces === undefined) { recalculateFaces = true; } var srcTiles = GetTilesWithin(srcTileX, srcTileY, width, height, null, layer); diff --git a/src/tilemaps/components/CreateFromTiles.js b/src/tilemaps/components/CreateFromTiles.js index 51f8f71c6..f86831206 100644 --- a/src/tilemaps/components/CreateFromTiles.js +++ b/src/tilemaps/components/CreateFromTiles.js @@ -19,15 +19,15 @@ var ReplaceByIndex = require('./ReplaceByIndex'); * @param {(number|number[])} indexes - The tile index, or array of indexes, to create Sprites from. * @param {(number|number[])} replacements - The tile index, or array of indexes, to change a converted tile to. Set to `null` to leave the tiles unchanged. If an array is given, it is assumed to be a one-to-one mapping with the indexes array. * @param {Phaser.Types.GameObjects.Sprite.SpriteConfig} spriteConfig - The config object to pass into the Sprite creator (i.e. scene.make.sprite). - * @param {Phaser.Scene} [scene=scene the map is within] - The Scene to create the Sprites within. - * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when determining the world XY + * @param {Phaser.Scene} scene - The Scene to create the Sprites within. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to use when determining the world XY * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon. * * @return {Phaser.GameObjects.Sprite[]} An array of the Sprites that were created. */ var CreateFromTiles = function (indexes, replacements, spriteConfig, scene, camera, layer) { - if (spriteConfig === undefined) { spriteConfig = {}; } + if (!spriteConfig) { spriteConfig = {}; } if (!Array.isArray(indexes)) { @@ -36,8 +36,8 @@ var CreateFromTiles = function (indexes, replacements, spriteConfig, scene, came var tilemapLayer = layer.tilemapLayer; - if (scene === undefined) { scene = tilemapLayer.scene; } - if (camera === undefined) { camera = scene.cameras.main; } + if (!scene) { scene = tilemapLayer.scene; } + if (!camera) { camera = scene.cameras.main; } var tiles = GetTilesWithin(0, 0, layer.width, layer.height, null, layer); var sprites = [];