Skip to content

Commit 77582fb

Browse files
pixelpicoseanphotonstorm
authored andcommitted
Re-format optional parameters.
1 parent 2a8447f commit 77582fb

20 files changed

Lines changed: 192 additions & 191 deletions

Phaser/Collision.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ module Phaser {
108108
* Checks for Line to Line intersection and returns an IntersectResult object containing the results of the intersection.
109109
* @param line1 The first Line object to check
110110
* @param line2 The second Line object to check
111-
* @param output An optional IntersectResult object to store the intersection values in. One is created if none given.
111+
* @param [output] An optional IntersectResult object to store the intersection values in. One is created if none given.
112112
* @returns {IntersectResult=} An IntersectResult object containing the results of the intersection
113113
*/
114114
public static lineToLine(line1: Line, line2: Line, output?: IntersectResult = new IntersectResult): IntersectResult {
@@ -129,7 +129,7 @@ module Phaser {
129129
* Checks for Line to Line Segment intersection and returns an IntersectResult object containing the results of the intersection.
130130
* @param line The Line object to check
131131
* @param seg The Line segment object to check
132-
* @param output An optional IntersectResult object to store the intersection values in. One is created if none given.
132+
* @param [output] An optional IntersectResult object to store the intersection values in. One is created if none given.
133133
* @returns {IntersectResult=} An IntersectResult object containing the results of the intersection
134134
*/
135135
public static lineToLineSegment(line: Line, seg: Line, output?: IntersectResult = new IntersectResult): IntersectResult {
@@ -164,7 +164,7 @@ module Phaser {
164164
* @param y1 The start y coordinate of the raw segment
165165
* @param x2 The end x coordinate of the raw segment
166166
* @param y2 The end y coordinate of the raw segment
167-
* @param output An optional IntersectResult object to store the intersection values in. One is created if none given.
167+
* @param [output] An optional IntersectResult object to store the intersection values in. One is created if none given.
168168
* @returns {IntersectResult=} An IntersectResult object containing the results of the intersection
169169
*/
170170
public static lineToRawSegment(line: Line, x1: number, y1: number, x2: number, y2: number, output?: IntersectResult = new IntersectResult): IntersectResult {
@@ -196,7 +196,7 @@ module Phaser {
196196
* Checks for Line to Ray intersection and returns the result in an IntersectResult object.
197197
* @param line1 The Line object to check
198198
* @param ray The Ray object to check
199-
* @param output An optional IntersectResult object to store the intersection values in. One is created if none given.
199+
* @param [output] An optional IntersectResult object to store the intersection values in. One is created if none given.
200200
* @returns {IntersectResult=} An IntersectResult object containing the results of the intersection
201201
*/
202202
public static lineToRay(line1: Line, ray: Line, output?: IntersectResult = new IntersectResult): IntersectResult {
@@ -229,7 +229,7 @@ module Phaser {
229229
* Check if the Line and Circle objects intersect
230230
* @param line The Line object to check
231231
* @param circle The Circle object to check
232-
* @param output An optional IntersectResult object to store the intersection values in. One is created if none given.
232+
* @param [output] An optional IntersectResult object to store the intersection values in. One is created if none given.
233233
* @returns {IntersectResult=} An IntersectResult object containing the results of the intersection
234234
*/
235235
public static lineToCircle(line: Line, circle: Circle, output?: IntersectResult = new IntersectResult): IntersectResult {
@@ -248,7 +248,7 @@ module Phaser {
248248
* Check if the Line intersects each side of the Rectangle
249249
* @param line The Line object to check
250250
* @param rect The Rectangle object to check
251-
* @param output An optional IntersectResult object to store the intersection values in. One is created if none given.
251+
* @param [output] An optional IntersectResult object to store the intersection values in. One is created if none given.
252252
* @returns {IntersectResult=} An IntersectResult object containing the results of the intersection
253253
*/
254254
public static lineToRectangle(line: Line, rect: Rectangle, output?: IntersectResult = new IntersectResult): IntersectResult {
@@ -288,7 +288,7 @@ module Phaser {
288288
* Check if the two Line Segments intersect and returns the result in an IntersectResult object.
289289
* @param line1 The first Line Segment to check
290290
* @param line2 The second Line Segment to check
291-
* @param output An optional IntersectResult object to store the intersection values in. One is created if none given.
291+
* @param [output] An optional IntersectResult object to store the intersection values in. One is created if none given.
292292
* @returns {IntersectResult=} An IntersectResult object containing the results of the intersection
293293
*/
294294
public static lineSegmentToLineSegment(line1: Line, line2: Line, output?: IntersectResult = new IntersectResult): IntersectResult {
@@ -311,7 +311,7 @@ module Phaser {
311311
* Check if the Line Segment intersects with the Ray and returns the result in an IntersectResult object.
312312
* @param line The Line Segment to check.
313313
* @param ray The Ray to check.
314-
* @param output An optional IntersectResult object to store the intersection values in. One is created if none given.
314+
* @param [output] An optional IntersectResult object to store the intersection values in. One is created if none given.
315315
* @returns {IntersectResult=} An IntersectResult object containing the results of the intersection
316316
*/
317317
public static lineSegmentToRay(line: Line, ray: Line, output?: IntersectResult = new IntersectResult): IntersectResult {
@@ -335,7 +335,7 @@ module Phaser {
335335
* Check if the Line Segment intersects with the Circle and returns the result in an IntersectResult object.
336336
* @param seg The Line Segment to check.
337337
* @param circle The Circle to check
338-
* @param output An optional IntersectResult object to store the intersection values in. One is created if none given.
338+
* @param [output] An optional IntersectResult object to store the intersection values in. One is created if none given.
339339
* @returns {IntersectResult=} An IntersectResult object containing the results of the intersection
340340
*/
341341
public static lineSegmentToCircle(seg: Line, circle: Circle, output?: IntersectResult = new IntersectResult): IntersectResult {
@@ -372,7 +372,7 @@ module Phaser {
372372
* Check if the Line Segment intersects with the Rectangle and returns the result in an IntersectResult object.
373373
* @param seg The Line Segment to check.
374374
* @param rect The Rectangle to check.
375-
* @param output An optional IntersectResult object to store the intersection values in. One is created if none given.
375+
* @param [output] An optional IntersectResult object to store the intersection values in. One is created if none given.
376376
* @returns {IntersectResult=} An IntersectResult object containing the results of the intersection
377377
*/
378378
public static lineSegmentToRectangle(seg: Line, rect: Rectangle, output?: IntersectResult = new IntersectResult): IntersectResult {
@@ -422,7 +422,7 @@ module Phaser {
422422
* Check for Ray to Rectangle intersection and returns the result in an IntersectResult object.
423423
* @param ray The Ray to check.
424424
* @param rect The Rectangle to check.
425-
* @param output An optional IntersectResult object to store the intersection values in. One is created if none given.
425+
* @param [output] An optional IntersectResult object to store the intersection values in. One is created if none given.
426426
* @returns {IntersectResult=} An IntersectResult object containing the results of the intersection
427427
*/
428428
public static rayToRectangle(ray: Line, rect: Rectangle, output?: IntersectResult = new IntersectResult): IntersectResult {
@@ -445,7 +445,7 @@ module Phaser {
445445
* @param lineY1
446446
* @param lineX2
447447
* @param lineY2
448-
* @param output An optional IntersectResult object to store the intersection values in. One is created if none given.
448+
* @param [output] An optional IntersectResult object to store the intersection values in. One is created if none given.
449449
* @returns {IntersectResult=} An IntersectResult object containing the results of the intersection
450450
*/
451451
public static rayToLineSegment(rayX1, rayY1, rayX2, rayY2, lineX1, lineY1, lineX2, lineY2, output?: IntersectResult = new IntersectResult): IntersectResult {
@@ -484,7 +484,7 @@ module Phaser {
484484
* Determines whether the specified point is contained within the rectangular region defined by the Rectangle object and returns the result in an IntersectResult object.
485485
* @param point The Point or MicroPoint object to check, or any object with x and y properties.
486486
* @param rect The Rectangle object to check the point against
487-
* @param output An optional IntersectResult object to store the intersection values in. One is created if none given.
487+
* @param [output] An optional IntersectResult object to store the intersection values in. One is created if none given.
488488
* @returns {IntersectResult=} An IntersectResult object containing the results of the intersection
489489
*/
490490
public static pointToRectangle(point, rect: Rectangle, output?: IntersectResult = new IntersectResult): IntersectResult {
@@ -501,7 +501,7 @@ module Phaser {
501501
* Check whether two axis aligned Rectangles intersect and returns the intersecting rectangle dimensions in an IntersectResult object if they do.
502502
* @param rect1 The first Rectangle object.
503503
* @param rect2 The second Rectangle object.
504-
* @param output An optional IntersectResult object to store the intersection values in. One is created if none given.
504+
* @param [output] An optional IntersectResult object to store the intersection values in. One is created if none given.
505505
* @returns {IntersectResult=} An IntersectResult object containing the results of the intersection
506506
*/
507507
public static rectangleToRectangle(rect1: Rectangle, rect2: Rectangle, output?: IntersectResult = new IntersectResult): IntersectResult {
@@ -529,7 +529,7 @@ module Phaser {
529529
* Checks if the Rectangle and Circle objects intersect and returns the result in an IntersectResult object.
530530
* @param rect The Rectangle object to check
531531
* @param circle The Circle object to check
532-
* @param output An optional IntersectResult object to store the intersection values in. One is created if none given.
532+
* @param [output] An optional IntersectResult object to store the intersection values in. One is created if none given.
533533
* @returns {IntersectResult=} An IntersectResult object containing the results of the intersection
534534
*/
535535
public static rectangleToCircle(rect: Rectangle, circle: Circle, output?: IntersectResult = new IntersectResult): IntersectResult {
@@ -542,7 +542,7 @@ module Phaser {
542542
* Checks if the two Circle objects intersect and returns the result in an IntersectResult object.
543543
* @param circle1 The first Circle object to check
544544
* @param circle2 The second Circle object to check
545-
* @param output An optional IntersectResult object to store the intersection values in. One is created if none given.
545+
* @param [output] An optional IntersectResult object to store the intersection values in. One is created if none given.
546546
* @returns {IntersectResult=} An IntersectResult object containing the results of the intersection
547547
*/
548548
public static circleToCircle(circle1: Circle, circle2: Circle, output?: IntersectResult = new IntersectResult): IntersectResult {
@@ -557,7 +557,7 @@ module Phaser {
557557
* Checks if the Circle object intersects with the Rectangle and returns the result in an IntersectResult object.
558558
* @param circle The Circle object to check
559559
* @param rect The Rectangle object to check
560-
* @param output An optional IntersectResult object to store the intersection values in. One is created if none given.
560+
* @param [output] An optional IntersectResult object to store the intersection values in. One is created if none given.
561561
* @returns {IntersectResult=} An IntersectResult object containing the results of the intersection
562562
*/
563563
public static circleToRectangle(circle: Circle, rect: Rectangle, output?: IntersectResult = new IntersectResult): IntersectResult {
@@ -576,7 +576,7 @@ module Phaser {
576576
* Checks if the Point object is contained within the Circle and returns the result in an IntersectResult object.
577577
* @param circle The Circle object to check
578578
* @param point A Point or MicroPoint object to check, or any object with x and y properties
579-
* @param output An optional IntersectResult object to store the intersection values in. One is created if none given.
579+
* @param [output] An optional IntersectResult object to store the intersection values in. One is created if none given.
580580
* @returns {IntersectResult=} An IntersectResult object containing the results of the intersection
581581
*/
582582
public static circleContainsPoint(circle: Circle, point, output?: IntersectResult = new IntersectResult): IntersectResult {

Phaser/Game.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,8 @@ module Phaser {
415415
/**
416416
* Switch to a new State.
417417
* @param state {State} The state you want to switch to.
418-
* @param clearWorld {boolean} Optional, clear everything in the world? (Default to true)
419-
* @param clearCache {boolean} Optional, clear asset cache? (Default to false and ONLY available when clearWorld=true)
418+
* @param [clearWorld] {boolean} clear everything in the world? (Default to true)
419+
* @param [clearCache] {boolean} clear asset cache? (Default to false and ONLY available when clearWorld=true)
420420
*/
421421
public switchState(state, clearWorld: bool = true, clearCache: bool = false) {
422422

@@ -655,9 +655,9 @@ module Phaser {
655655
* @param key {string} Key for tileset image.
656656
* @param mapData {string} Data of this tilemap.
657657
* @param format {number} Format of map data. (Tilemap.FORMAT_CSV or Tilemap.FORMAT_TILED_JSON)
658-
* @param resizeWorld {boolean} Optional, resize the world to make same as tilemap?
659-
* @param tileWidth {number} Optional, width of each tile.
660-
* @param tileHeight {number} Optional, height of each tile.
658+
* @param [resizeWorld] {boolean} resize the world to make same as tilemap?
659+
* @param [tileWidth] {number} width of each tile.
660+
* @param [tileHeight] {number} height of each tile.
661661
* @return {Tilemap} The newly created tilemap object.
662662
*/
663663
public createTilemap(key: string, mapData: string, format: number, resizeWorld: bool = true, tileWidth?: number = 0, tileHeight?: number = 0): Tilemap {

0 commit comments

Comments
 (0)