You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -157,7 +157,7 @@
157
157
158
158
My thanks to the following for helping with the Phaser 3 Examples, Docs and TypeScript definitions, either by reporting errors, fixing them or helping author the docs:
* @param {number} u - The relative position, [0..1].
287
+
* @param {Phaser.Math.Vector2} [out] - A point to store the result in.
280
288
*
281
-
* @return {Phaser.Math.Vector2} [description]
289
+
* @return {Phaser.Math.Vector2} The point.
282
290
*/
283
291
getPointAt: function(u,out)
284
292
{
@@ -290,15 +298,25 @@ var Curve = new Class({
290
298
// Get sequence of points using getPoint( t )
291
299
292
300
/**
293
-
* [description]
301
+
* Get a sequence of evenly spaced points from the curve.
302
+
*
303
+
* You can pass `divisions`, `stepRate`, or neither.
304
+
*
305
+
* The number of divisions will be
306
+
*
307
+
* 1. `divisions`, if `divisions` > 0; or
308
+
* 2. `this.getLength / stepRate`, if `stepRate` > 0; or
309
+
* 3. `this.defaultDivisions`
310
+
*
311
+
* `1 + divisions` points will be returned.
294
312
*
295
313
* @method Phaser.Curves.Curve#getPoints
296
314
* @since 3.0.0
297
315
*
298
316
* @generic {Phaser.Math.Vector2[]} O - [out,$return]
299
317
*
300
-
* @param {integer} divisions - The number of evenly spaced points from the curve to return. If falsy, step param will be used to calculate the number of points.
301
-
* @param {number} step - Step between points. Used to calculate the number of points to return when divisions is falsy. Ignored if divisions is positive.
318
+
* @param {integer} [divisions] - The number of divisions to make.
319
+
* @param {number} [stepRate] - The curve distance between points, implying `divisions`.
302
320
* @param {(array|Phaser.Math.Vector2[])} [out] - An optional array to store the points in.
303
321
*
304
322
* @return {(array|Phaser.Math.Vector2[])} An array of Points from the curve.
@@ -329,16 +347,16 @@ var Curve = new Class({
329
347
},
330
348
331
349
/**
332
-
* [description]
350
+
* Get a random point from the curve.
333
351
*
334
352
* @method Phaser.Curves.Curve#getRandomPoint
335
353
* @since 3.0.0
336
354
*
337
355
* @generic {Phaser.Math.Vector2} O - [out,$return]
* @param {Phaser.Math.Vector2} [out] - A point object to store the result in.
340
358
*
341
-
* @return {Phaser.Math.Vector2} [description]
359
+
* @return {Phaser.Math.Vector2} The point.
342
360
*/
343
361
getRandomPoint: function(out)
344
362
{
@@ -350,16 +368,18 @@ var Curve = new Class({
350
368
// Get sequence of points using getPointAt( u )
351
369
352
370
/**
353
-
* [description]
371
+
* Get a sequence of equally spaced points (by arc distance) from the curve.
372
+
*
373
+
* `1 + divisions` points will be returned.
354
374
*
355
375
* @method Phaser.Curves.Curve#getSpacedPoints
356
376
* @since 3.0.0
357
377
*
358
-
* @param {integer} [divisions] - The number of evenly spaced points from the curve to return. If falsy, step param will be used to calculate the number of points.
359
-
* @param {number} [step] - Step between points. Used to calculate the number of points to return when divisions is falsy. Ignored if divisions is positive.
378
+
* @param {integer} [divisions=this.defaultDivisions] - The number of divisions to make.
379
+
* @param {number} [stepRate] - Step between points. Used to calculate the number of points to return when divisions is falsy. Ignored if divisions is positive.
360
380
* @param {(array|Phaser.Math.Vector2[])} [out] - An optional array to store the points in.
361
381
*
362
-
* @return {Phaser.Math.Vector2[]} [description]
382
+
* @return {Phaser.Math.Vector2[]} An array of points.
363
383
*/
364
384
getSpacedPoints: function(divisions,stepRate,out)
365
385
{
@@ -389,16 +409,16 @@ var Curve = new Class({
389
409
},
390
410
391
411
/**
392
-
* [description]
412
+
* Get a point at the start of the curve.
393
413
*
394
414
* @method Phaser.Curves.Curve#getStartPoint
395
415
* @since 3.0.0
396
416
*
397
417
* @generic {Phaser.Math.Vector2} O - [out,$return]
Copy file name to clipboardExpand all lines: src/curves/path/Path.js
+5-7Lines changed: 5 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -569,14 +569,12 @@ var Path = new Class({
569
569
},
570
570
571
571
/**
572
-
* Returns the defined starting point of the Path.
573
-
*
574
-
* This is not necessarily equal to the starting point of the first Curve if it differs from {@link startPoint}.
572
+
* Get a sequence of points on the path.
575
573
*
576
574
* @method Phaser.Curves.Path#getPoints
577
575
* @since 3.0.0
578
576
*
579
-
* @param {integer} [divisions=12] - The number of points to divide the path in to.
577
+
* @param {integer} [divisions=12] - The number of divisions per resolution per curve.
580
578
*
581
579
* @return {Phaser.Math.Vector2[]} An array of Vector2 objects that containing the points along the Path.
582
580
*/
@@ -626,7 +624,7 @@ var Path = new Class({
626
624
627
625
/**
628
626
* Returns a randomly chosen point anywhere on the path. This follows the same rules as `getPoint` in that it may return a point on any Curve inside this path.
629
-
*
627
+
*
630
628
* When calling this method multiple times, the points are not guaranteed to be equally spaced spatially.
631
629
*
632
630
* @method Phaser.Curves.Path#getRandomPoint
@@ -647,7 +645,7 @@ var Path = new Class({
647
645
648
646
/**
649
647
* Divides this Path into a set of equally spaced points,
650
-
*
648
+
*
651
649
* The resulting points are equally spaced with respect to the points' position on the path, but not necessarily equally spaced spatially.
652
650
*
653
651
* @method Phaser.Curves.Path#getSpacedPoints
@@ -741,7 +739,7 @@ var Path = new Class({
741
739
742
740
/**
743
741
* Creates a "gap" in this path from the path's current end point to the given coordinates.
744
-
*
742
+
*
745
743
* After calling this function, this Path's end point will be equal to the given coordinates
0 commit comments