mirror of
https://github.com/photonstorm/phaser
synced 2024-11-30 00:21:04 +00:00
LineCurve.getResolution was missing the divisions
argument and always returning 1, which made it fail when used as path of a Path. It now defaults to return 1 unless specified otherwise
This commit is contained in:
parent
3589013af2
commit
0c200054b6
2 changed files with 8 additions and 3 deletions
|
@ -35,6 +35,7 @@ being passed to the simulation. The default value is 1 to remain consistent with
|
|||
* Keyboard.JustDown and Keyboard.JustUp were being reset too early, causing them to fail when called in `update` loops. Fix #3490 (thanks @belen-albeza)
|
||||
* RenderTexture.destroy no longer throws an error when called. Fix #3475 (thanks @kuoruan)
|
||||
* The WebGL TileSprite batch now modulates the tilePosition to avoid large values being passed into the UV data, fixing corruption when scrolling TileSprites over a long period of time. Fix #3402 (thanks @vinerz @FrancescoNegri)
|
||||
* LineCurve.getResolution was missing the `divisions` argument and always returning 1, which made it fail when used as path of a Path. It now defaults to return 1 unless specified otherwise (thanks _ok)
|
||||
|
||||
### Updates
|
||||
|
||||
|
|
|
@ -107,11 +107,15 @@ var LineCurve = new Class({
|
|||
* @method Phaser.Curves.LineCurve#getResolution
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @return {integer} [description]
|
||||
* @param {number} [divisions=1] - [description]
|
||||
*
|
||||
* @return {number} [description]
|
||||
*/
|
||||
getResolution: function ()
|
||||
getResolution: function (divisions)
|
||||
{
|
||||
return 1;
|
||||
if (divisions === undefined) { divisions = 1; }
|
||||
|
||||
return divisions;
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue