mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 22:18:29 +00:00
Vector2.setTo is a method alias for Vector2.set allowing it to be used inter-changeably with Geom.Point.
This commit is contained in:
parent
57c5ca657b
commit
34b236df41
2 changed files with 18 additions and 0 deletions
|
@ -39,6 +39,7 @@ being passed to the simulation. The default value is 1 to remain consistent with
|
||||||
* 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)
|
* 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 part of a Path. It now defaults to return 1 unless specified otherwise (thanks _ok)
|
* LineCurve.getResolution was missing the `divisions` argument and always returning 1, which made it fail when used as part of a Path. It now defaults to return 1 unless specified otherwise (thanks _ok)
|
||||||
* A Game Object enabled for drag would no longer fire over and out events after being dragged, now it does (thanks @jmcriat)
|
* A Game Object enabled for drag would no longer fire over and out events after being dragged, now it does (thanks @jmcriat)
|
||||||
|
* Line.getPointA and Line.getPointB incorrectly set the values into the Vector2 (thanks @Tomas2h)
|
||||||
|
|
||||||
### Updates
|
### Updates
|
||||||
|
|
||||||
|
@ -51,6 +52,7 @@ being passed to the simulation. The default value is 1 to remain consistent with
|
||||||
* The GamepadManager now extends EventEmitter directly, just like the KeyboardManager does.
|
* The GamepadManager now extends EventEmitter directly, just like the KeyboardManager does.
|
||||||
* The Gamepad Axis threshold has been increased from 0.05 to 0.1.
|
* The Gamepad Axis threshold has been increased from 0.05 to 0.1.
|
||||||
* Utils.Array.FindClosestInSorted has a new optional argument `key` which will allow you to scan a top-level property of any object in the given sorted array and get the closest match to it.
|
* Utils.Array.FindClosestInSorted has a new optional argument `key` which will allow you to scan a top-level property of any object in the given sorted array and get the closest match to it.
|
||||||
|
* Vector2.setTo is a method alias for Vector2.set allowing it to be used inter-changeably with Geom.Point.
|
||||||
|
|
||||||
### Animation Component Updates
|
### Animation Component Updates
|
||||||
|
|
||||||
|
|
|
@ -138,6 +138,22 @@ var Vector2 = new Class({
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method is an alias for `Vector2.set`.
|
||||||
|
*
|
||||||
|
* @method Phaser.Math.Vector2#setTo
|
||||||
|
* @since 3.4.0
|
||||||
|
*
|
||||||
|
* @param {number} x - [description]
|
||||||
|
* @param {number} [y=x] - [description]
|
||||||
|
*
|
||||||
|
* @return {Phaser.Math.Vector2} This Vector2.
|
||||||
|
*/
|
||||||
|
setTo: function (x, y)
|
||||||
|
{
|
||||||
|
return this.set(x, y);
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the `x` and `y` values of this object from a given polar coordinate.
|
* Sets the `x` and `y` values of this object from a given polar coordinate.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue