mirror of
https://github.com/photonstorm/phaser
synced 2024-11-22 12:43:26 +00:00
Fix Vector2 types
This commit is contained in:
parent
e60d573912
commit
c5d4c0a9d2
2 changed files with 12 additions and 3 deletions
|
@ -20,9 +20,9 @@ var Vector2 = require('./Vector2');
|
|||
* @param {number} rotation - Rotation of the transform point, in radians.
|
||||
* @param {number} scaleX - Horizontal scale of the transform point.
|
||||
* @param {number} scaleY - Vertical scale of the transform point.
|
||||
* @param {(Vector2|Point|object)} [output] - [description]
|
||||
* @param {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} [output] - [description]
|
||||
*
|
||||
* @return {(Vector2|Point|object)} The translated point.
|
||||
* @return {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} The translated point.
|
||||
*/
|
||||
var TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output)
|
||||
{
|
||||
|
|
|
@ -9,6 +9,13 @@
|
|||
|
||||
var Class = require('../utils/Class');
|
||||
|
||||
/**
|
||||
* @typedef {object} Vector2Like
|
||||
*
|
||||
* @property {number} x - [description]
|
||||
* @property {number} y - [description]
|
||||
*/
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
* [description]
|
||||
|
@ -35,6 +42,7 @@ var Vector2 = new Class({
|
|||
* @default 0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
this.x = 0;
|
||||
|
||||
/**
|
||||
* The y component of this Vector.
|
||||
|
@ -44,6 +52,7 @@ var Vector2 = new Class({
|
|||
* @default 0
|
||||
* @since 3.0.0
|
||||
*/
|
||||
this.y = 0;
|
||||
|
||||
if (typeof x === 'object')
|
||||
{
|
||||
|
@ -78,7 +87,7 @@ var Vector2 = new Class({
|
|||
* @method Phaser.Math.Vector2#copy
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {(Phaser.Math.Vector2|object)} src - [description]
|
||||
* @param {(Phaser.Math.Vector2|Vector2Like)} src - [description]
|
||||
*
|
||||
* @return {Phaser.Math.Vector2} This Vector2.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue