mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 22:18:29 +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} rotation - Rotation of the transform point, in radians.
|
||||||
* @param {number} scaleX - Horizontal scale of the transform point.
|
* @param {number} scaleX - Horizontal scale of the transform point.
|
||||||
* @param {number} scaleY - Vertical 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)
|
var TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output)
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,6 +9,13 @@
|
||||||
|
|
||||||
var Class = require('../utils/Class');
|
var Class = require('../utils/Class');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @typedef {object} Vector2Like
|
||||||
|
*
|
||||||
|
* @property {number} x - [description]
|
||||||
|
* @property {number} y - [description]
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* [description]
|
* [description]
|
||||||
|
@ -35,6 +42,7 @@ var Vector2 = new Class({
|
||||||
* @default 0
|
* @default 0
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*/
|
*/
|
||||||
|
this.x = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The y component of this Vector.
|
* The y component of this Vector.
|
||||||
|
@ -44,6 +52,7 @@ var Vector2 = new Class({
|
||||||
* @default 0
|
* @default 0
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*/
|
*/
|
||||||
|
this.y = 0;
|
||||||
|
|
||||||
if (typeof x === 'object')
|
if (typeof x === 'object')
|
||||||
{
|
{
|
||||||
|
@ -78,7 +87,7 @@ var Vector2 = new Class({
|
||||||
* @method Phaser.Math.Vector2#copy
|
* @method Phaser.Math.Vector2#copy
|
||||||
* @since 3.0.0
|
* @since 3.0.0
|
||||||
*
|
*
|
||||||
* @param {(Phaser.Math.Vector2|object)} src - [description]
|
* @param {(Phaser.Math.Vector2|Vector2Like)} src - [description]
|
||||||
*
|
*
|
||||||
* @return {Phaser.Math.Vector2} This Vector2.
|
* @return {Phaser.Math.Vector2} This Vector2.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Reference in a new issue