From a727437304addb97609b5d65a8f46a064ff9b3bc Mon Sep 17 00:00:00 2001 From: cyantree Date: Wed, 13 Jun 2018 20:01:26 +0200 Subject: [PATCH] Changed options and sub options of `Graphics` constructor in docs to be optional --- src/gameobjects/graphics/Graphics.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/gameobjects/graphics/Graphics.js b/src/gameobjects/graphics/Graphics.js index 91032ea7b..d2bd9c2d0 100644 --- a/src/gameobjects/graphics/Graphics.js +++ b/src/gameobjects/graphics/Graphics.js @@ -19,9 +19,9 @@ var Render = require('./GraphicsRender'); * * @typedef {object} GraphicsLineStyle * - * @property {number} width - The stroke width. - * @property {number} color - The stroke color. - * @property {number} alpha - The stroke alpha. + * @property {number} [width] - The stroke width. + * @property {number} [color] - The stroke color. + * @property {number} [alpha] - The stroke alpha. */ /** @@ -29,8 +29,8 @@ var Render = require('./GraphicsRender'); * * @typedef {object} GraphicsFillStyle * - * @property {number} color - The fill color. - * @property {number} alpha - The fill alpha. + * @property {number} [color] - The fill color. + * @property {number} [alpha] - The fill alpha. */ /** @@ -38,8 +38,8 @@ var Render = require('./GraphicsRender'); * * @typedef {object} GraphicsStyles * - * @property {GraphicsLineStyle} lineStyle - The style applied to shape outlines. - * @property {GraphicsFillStyle} fillStyle - The style applied to shape areas. + * @property {GraphicsLineStyle} [lineStyle] - The style applied to shape outlines. + * @property {GraphicsFillStyle} [fillStyle] - The style applied to shape areas. */ /** @@ -48,8 +48,8 @@ var Render = require('./GraphicsRender'); * @typedef {object} GraphicsOptions * @extends GraphicsStyles * - * @property {number} x - The x coordinate of the Graphics. - * @property {number} y - The y coordinate of the Graphics. + * @property {number} [x] - The x coordinate of the Graphics. + * @property {number} [y] - The y coordinate of the Graphics. */ /** @@ -109,7 +109,7 @@ var Render = require('./GraphicsRender'); * @extends Phaser.GameObjects.Components.ScrollFactor * * @param {Phaser.Scene} scene - The Scene to which this Graphics object belongs. - * @param {GraphicsOptions} options - Options that set the position and default style of this Graphics object. + * @param {GraphicsOptions} [options] - Options that set the position and default style of this Graphics object. */ var Graphics = new Class({