Added jsdoc data types

This commit is contained in:
Richard Davey 2018-03-19 11:25:46 +00:00
parent 9ed04588d5
commit 4fe6a25117
7 changed files with 246 additions and 300 deletions

View file

@ -54,7 +54,7 @@ var Matrix3 = new Class({
* @method Phaser.Math.Matrix3#clone
* @since 3.0.0
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix3} A new Matrix3 object.
*/
clone: function ()
{
@ -67,9 +67,9 @@ var Matrix3 = new Class({
* @method Phaser.Math.Matrix3#set
* @since 3.0.0
*
* @param {[type]} src - [description]
* @param {Phaser.Math.Matrix3} src - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix3} This Matrix3 object.
*/
set: function (src)
{
@ -82,9 +82,9 @@ var Matrix3 = new Class({
* @method Phaser.Math.Matrix3#copy
* @since 3.0.0
*
* @param {[type]} src - [description]
* @param {Phaser.Math.Matrix3} src - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix3} This Matrix3 object.
*/
copy: function (src)
{
@ -110,9 +110,9 @@ var Matrix3 = new Class({
* @method Phaser.Math.Matrix3#fromMat4
* @since 3.0.0
*
* @param {[type]} m - [description]
* @param {Phaser.Math.Matrix4} m - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix3} This Matrix3 object.
*/
fromMat4: function (m)
{
@ -138,9 +138,9 @@ var Matrix3 = new Class({
* @method Phaser.Math.Matrix3#fromArray
* @since 3.0.0
*
* @param {[type]} a - [description]
* @param {array} a - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix3} This Matrix3 object.
*/
fromArray: function (a)
{
@ -165,7 +165,7 @@ var Matrix3 = new Class({
* @method Phaser.Math.Matrix3#identity
* @since 3.0.0
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix3} This Matrix3 object.
*/
identity: function ()
{
@ -190,7 +190,7 @@ var Matrix3 = new Class({
* @method Phaser.Math.Matrix3#transpose
* @since 3.0.0
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix3} This Matrix3 object.
*/
transpose: function ()
{
@ -215,7 +215,7 @@ var Matrix3 = new Class({
* @method Phaser.Math.Matrix3#invert
* @since 3.0.0
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix3} This Matrix3 object.
*/
invert: function ()
{
@ -264,7 +264,7 @@ var Matrix3 = new Class({
* @method Phaser.Math.Matrix3#adjoint
* @since 3.0.0
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix3} This Matrix3 object.
*/
adjoint: function ()
{
@ -299,7 +299,7 @@ var Matrix3 = new Class({
* @method Phaser.Math.Matrix3#determinant
* @since 3.0.0
*
* @return {[type]} [description]
* @return {number} [description]
*/
determinant: function ()
{
@ -324,9 +324,9 @@ var Matrix3 = new Class({
* @method Phaser.Math.Matrix3#multiply
* @since 3.0.0
*
* @param {[type]} src - [description]
* @param {Phaser.Math.Matrix3} src - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix3} This Matrix3 object.
*/
multiply: function (src)
{
@ -375,9 +375,9 @@ var Matrix3 = new Class({
* @method Phaser.Math.Matrix3#translate
* @since 3.0.0
*
* @param {[type]} v - [description]
* @param {Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4} v - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix3} This Matrix3 object.
*/
translate: function (v)
{
@ -398,9 +398,9 @@ var Matrix3 = new Class({
* @method Phaser.Math.Matrix3#rotate
* @since 3.0.0
*
* @param {[type]} rad - [description]
* @param {number} rad - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix3} This Matrix3 object.
*/
rotate: function (rad)
{
@ -433,9 +433,9 @@ var Matrix3 = new Class({
* @method Phaser.Math.Matrix3#scale
* @since 3.0.0
*
* @param {[type]} v - [description]
* @param {Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4} v - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix3} This Matrix3 object.
*/
scale: function (v)
{
@ -460,9 +460,9 @@ var Matrix3 = new Class({
* @method Phaser.Math.Matrix3#fromQuat
* @since 3.0.0
*
* @param {[type]} q - [description]
* @param {Phaser.Math.Quaternion} q - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix3} This Matrix3 object.
*/
fromQuat: function (q)
{
@ -510,9 +510,9 @@ var Matrix3 = new Class({
* @method Phaser.Math.Matrix3#normalFromMat4
* @since 3.0.0
*
* @param {[type]} m - [description]
* @param {Phaser.Math.Matrix4} m - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix3} This Matrix3 object.
*/
normalFromMat4: function (m)
{

View file

@ -55,13 +55,15 @@ var Matrix4 = new Class({
* @method Phaser.Math.Matrix4#clone
* @since 3.0.0
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix4} A new Matrix4 object.
*/
clone: function ()
{
return new Matrix4(this);
},
// TODO - Should work with basic values
/**
* [description]
*
@ -70,7 +72,7 @@ var Matrix4 = new Class({
*
* @param {[type]} src - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix4} This Matrix4 object.
*/
set: function (src)
{
@ -83,9 +85,9 @@ var Matrix4 = new Class({
* @method Phaser.Math.Matrix4#copy
* @since 3.0.0
*
* @param {[type]} src - [description]
* @param {Phaser.Math.Matrix4} src - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix4} This Matrix4 object.
*/
copy: function (src)
{
@ -118,9 +120,9 @@ var Matrix4 = new Class({
* @method Phaser.Math.Matrix4#fromArray
* @since 3.0.0
*
* @param {[type]} a - [description]
* @param {array} a - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix4} This Matrix4 object.
*/
fromArray: function (a)
{
@ -152,7 +154,7 @@ var Matrix4 = new Class({
* @method Phaser.Math.Matrix4#zero
* @since 3.0.0
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix4} This Matrix4 object.
*/
zero: function ()
{
@ -184,11 +186,11 @@ var Matrix4 = new Class({
* @method Phaser.Math.Matrix4#xyz
* @since 3.0.0
*
* @param {[type]} x - [description]
* @param {[type]} y - [description]
* @param {[type]} z - [description]
* @param {number} x - [description]
* @param {number} y - [description]
* @param {number} z - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix4} This Matrix4 object.
*/
xyz: function (x, y, z)
{
@ -209,11 +211,11 @@ var Matrix4 = new Class({
* @method Phaser.Math.Matrix4#scaling
* @since 3.0.0
*
* @param {[type]} x - [description]
* @param {[type]} y - [description]
* @param {[type]} z - [description]
* @param {number} x - [description]
* @param {number} y - [description]
* @param {number} z - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix4} This Matrix4 object.
*/
scaling: function (x, y, z)
{
@ -235,7 +237,7 @@ var Matrix4 = new Class({
* @method Phaser.Math.Matrix4#identity
* @since 3.0.0
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix4} This Matrix4 object.
*/
identity: function ()
{
@ -267,7 +269,7 @@ var Matrix4 = new Class({
* @method Phaser.Math.Matrix4#transpose
* @since 3.0.0
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix4} This Matrix4 object.
*/
transpose: function ()
{
@ -302,7 +304,7 @@ var Matrix4 = new Class({
* @method Phaser.Math.Matrix4#invert
* @since 3.0.0
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix4} This Matrix4 object.
*/
invert: function ()
{
@ -343,7 +345,6 @@ var Matrix4 = new Class({
var b10 = a21 * a33 - a23 * a31;
var b11 = a22 * a33 - a23 * a32;
// Calculate the determinant
var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;
@ -380,7 +381,7 @@ var Matrix4 = new Class({
* @method Phaser.Math.Matrix4#adjoint
* @since 3.0.0
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix4} This Matrix4 object.
*/
adjoint: function ()
{
@ -432,7 +433,7 @@ var Matrix4 = new Class({
* @method Phaser.Math.Matrix4#determinant
* @since 3.0.0
*
* @return {[type]} [description]
* @return {number} [description]
*/
determinant: function ()
{
@ -481,9 +482,9 @@ var Matrix4 = new Class({
* @method Phaser.Math.Matrix4#multiply
* @since 3.0.0
*
* @param {[type]} src - [description]
* @param {Phaser.Math.Matrix4} src - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix4} This Matrix4 object.
*/
multiply: function (src)
{
@ -561,9 +562,9 @@ var Matrix4 = new Class({
* @method Phaser.Math.Matrix4#multiplyLocal
* @since 3.0.0
*
* @param {[type]} src - [description]
* @param {Phaser.Math.Matrix4} src - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix4} This Matrix4 object.
*/
multiplyLocal: function (src)
{
@ -600,9 +601,9 @@ var Matrix4 = new Class({
* @method Phaser.Math.Matrix4#translate
* @since 3.0.0
*
* @param {[type]} v - [description]
* @param {Phaser.Math.Vector3|Phaser.Math.Vector4} v - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix4} This Matrix4 object.
*/
translate: function (v)
{
@ -625,9 +626,9 @@ var Matrix4 = new Class({
* @method Phaser.Math.Matrix4#scale
* @since 3.0.0
*
* @param {[type]} v - [description]
* @param {Phaser.Math.Vector3|Phaser.Math.Vector4} v - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix4} This Matrix4 object.
*/
scale: function (v)
{
@ -654,17 +655,16 @@ var Matrix4 = new Class({
return this;
},
// Axis = vec3, angle = radians
/**
* [description]
*
* @method Phaser.Math.Matrix4#makeRotationAxis
* @since 3.0.0
*
* @param {[type]} axis - [description]
* @param {[type]} angle - [description]
* @param {Phaser.Math.Vector3|Phaser.Math.Vector4} axis - [description]
* @param {float} angle - The angle of rotation in radians.
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix4} This Matrix4 object.
*/
makeRotationAxis: function (axis, angle)
{
@ -696,10 +696,10 @@ var Matrix4 = new Class({
* @method Phaser.Math.Matrix4#rotate
* @since 3.0.0
*
* @param {[type]} rad - [description]
* @param {[type]} axis - [description]
* @param {float} rad - [description]
* @param {Phaser.Math.Vector3} axis - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix4} This Matrix4 object.
*/
rotate: function (rad, axis)
{
@ -774,9 +774,9 @@ var Matrix4 = new Class({
* @method Phaser.Math.Matrix4#rotateX
* @since 3.0.0
*
* @param {[type]} rad - [description]
* @param {float} rad - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix4} This Matrix4 object.
*/
rotateX: function (rad)
{
@ -813,9 +813,9 @@ var Matrix4 = new Class({
* @method Phaser.Math.Matrix4#rotateY
* @since 3.0.0
*
* @param {[type]} rad - [description]
* @param {float} rad - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix4} This Matrix4 object.
*/
rotateY: function (rad)
{
@ -852,9 +852,9 @@ var Matrix4 = new Class({
* @method Phaser.Math.Matrix4#rotateZ
* @since 3.0.0
*
* @param {[type]} rad - [description]
* @param {float} rad - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix4} This Matrix4 object.
*/
rotateZ: function (rad)
{
@ -891,10 +891,10 @@ var Matrix4 = new Class({
* @method Phaser.Math.Matrix4#fromRotationTranslation
* @since 3.0.0
*
* @param {[type]} q - [description]
* @param {[type]} v - [description]
* @param {Phaser.Math.Quaternion} q - [description]
* @param {Phaser.Math.Vector3} v - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix4} This Matrix4 object.
*/
fromRotationTranslation: function (q, v)
{
@ -951,9 +951,9 @@ var Matrix4 = new Class({
* @method Phaser.Math.Matrix4#fromQuat
* @since 3.0.0
*
* @param {[type]} q - [description]
* @param {Phaser.Math.Quaternion} q - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix4} This Matrix4 object.
*/
fromQuat: function (q)
{
@ -1004,30 +1004,19 @@ var Matrix4 = new Class({
},
/**
* Generates a frustum matrix with the given bounds
*
* @param {Number} left Left bound of the frustum
* @param {Number} right Right bound of the frustum
* @param {Number} bottom Bottom bound of the frustum
* @param {Number} top Top bound of the frustum
* @param {Number} near Near bound of the frustum
* @param {Number} far Far bound of the frustum
* @returns {Matrix4} this for chaining
*/
/**
* [description]
* Generates a frustum matrix with the given bounds.
*
* @method Phaser.Math.Matrix4#frustum
* @since 3.0.0
*
* @param {[type]} left - [description]
* @param {[type]} right - [description]
* @param {[type]} bottom - [description]
* @param {[type]} top - [description]
* @param {[type]} near - [description]
* @param {[type]} far - [description]
* @param {number} left - The left bound of the frustum.
* @param {number} right - The right bound of the frustum.
* @param {number} bottom - The bottom bound of the frustum.
* @param {number} top - The top bound of the frustum.
* @param {number} near - The near bound of the frustum.
* @param {number} far - The far bound of the frustum.
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix4} This Matrix4 object.
*/
frustum: function (left, right, bottom, top, near, far)
{
@ -1064,24 +1053,15 @@ var Matrix4 = new Class({
* Generates a perspective projection matrix with the given bounds.
* perspective fov lh
*
* @param {number} fovy Vertical field of view in radians
* @param {number} aspect Aspect ratio. typically viewport width/height
* @param {number} near Near bound of the frustum
* @param {number} far Far bound of the frustum
* @returns {Matrix4} this for chaining
*/
/**
* [description]
*
* @method Phaser.Math.Matrix4#perspective
* @since 3.0.0
*
* @param {[type]} fovy - [description]
* @param {[type]} aspect - [description]
* @param {[type]} near - [description]
* @param {[type]} far - [description]
* @param {number} fovy - Vertical field of view in radians
* @param {number} aspect - Aspect ratio. Typically viewport width /height.
* @param {number} near - Near bound of the frustum.
* @param {number} far - Far bound of the frustum.
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix4} This Matrix4 object.
*/
perspective: function (fovy, aspect, near, far)
{
@ -1118,12 +1098,12 @@ var Matrix4 = new Class({
* @method Phaser.Math.Matrix4#perspectiveLH
* @since 3.0.0
*
* @param {[type]} width - [description]
* @param {[type]} height - [description]
* @param {[type]} near - [description]
* @param {[type]} far - [description]
* @param {number} width - [description]
* @param {number} height - [description]
* @param {number} near - Near bound of the frustum.
* @param {number} far - Far bound of the frustum.
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix4} This Matrix4 object.
*/
perspectiveLH: function (width, height, near, far)
{
@ -1153,30 +1133,19 @@ var Matrix4 = new Class({
},
/**
* Generates a orthogonal projection matrix with the given bounds
*
* @param {number} left Left bound of the frustum
* @param {number} right Right bound of the frustum
* @param {number} bottom Bottom bound of the frustum
* @param {number} top Top bound of the frustum
* @param {number} near Near bound of the frustum
* @param {number} far Far bound of the frustum
* @returns {Matrix4} this for chaining
*/
/**
* [description]
* Generates a orthogonal projection matrix with the given bounds.
*
* @method Phaser.Math.Matrix4#ortho
* @since 3.0.0
*
* @param {[type]} left - [description]
* @param {[type]} right - [description]
* @param {[type]} bottom - [description]
* @param {[type]} top - [description]
* @param {[type]} near - [description]
* @param {[type]} far - [description]
* @param {number} left - The left bound of the frustum.
* @param {number} right - The right bound of the frustum.
* @param {number} bottom - The bottom bound of the frustum.
* @param {number} top - The top bound of the frustum.
* @param {number} near - The near bound of the frustum.
* @param {number} far - The far bound of the frustum.
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix4} This Matrix4 object.
*/
ortho: function (left, right, bottom, top, near, far)
{
@ -1214,24 +1183,16 @@ var Matrix4 = new Class({
},
/**
* Generates a look-at matrix with the given eye position, focal point, and up axis
*
* @param {Vector3} eye Position of the viewer
* @param {Vector3} center Point the viewer is looking at
* @param {Vector3} up vec3 pointing up
* @returns {Matrix4} this for chaining
*/
/**
* [description]
* Generates a look-at matrix with the given eye position, focal point, and up axis.
*
* @method Phaser.Math.Matrix4#lookAt
* @since 3.0.0
*
* @param {[type]} eye - [description]
* @param {[type]} center - [description]
* @param {[type]} up - [description]
* @param {Phaser.Math.Vector3} eye - Position of the viewer
* @param {Phaser.Math.Vector3} center - Point the viewer is looking at
* @param {Phaser.Math.Vector3} up - vec3 pointing up.
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix4} This Matrix4 object.
*/
lookAt: function (eye, center, up)
{
@ -1335,11 +1296,11 @@ var Matrix4 = new Class({
* @method Phaser.Math.Matrix4#yawPitchRoll
* @since 3.0.0
*
* @param {[type]} yaw - [description]
* @param {[type]} pitch - [description]
* @param {[type]} roll - [description]
* @param {number} yaw - [description]
* @param {number} pitch - [description]
* @param {number} roll - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix4} This Matrix4 object.
*/
yawPitchRoll: function (yaw, pitch, roll)
{
@ -1396,13 +1357,13 @@ var Matrix4 = new Class({
* @method Phaser.Math.Matrix4#setWorldMatrix
* @since 3.0.0
*
* @param {[type]} rotation - [description]
* @param {[type]} position - [description]
* @param {[type]} scale - [description]
* @param {[type]} viewMatrix - [description]
* @param {[type]} projectionMatrix - [description]
* @param {Phaser.Math.Vector3} rotation - [description]
* @param {Phaser.Math.Vector3} position - [description]
* @param {Phaser.Math.Vector3} scale - [description]
* @param {Phaser.Math.Matrix4} [viewMatrix] - [description]
* @param {Phaser.Math.Matrix4} [projectionMatrix] - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Matrix4} This Matrix4 object.
*/
setWorldMatrix: function (rotation, position, scale, viewMatrix, projectionMatrix)
{

View file

@ -101,9 +101,9 @@ var Quaternion = new Class({
* @method Phaser.Math.Quaternion#copy
* @since 3.0.0
*
* @param {[type]} src - [description]
* @param {Phaser.Math.Quaternion|Phaser.Math.Vector4} src - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Quaternion} This Quaternion object.
*/
copy: function (src)
{
@ -121,12 +121,12 @@ var Quaternion = new Class({
* @method Phaser.Math.Quaternion#set
* @since 3.0.0
*
* @param {[type]} x - [description]
* @param {[type]} y - [description]
* @param {[type]} z - [description]
* @param {[type]} w - [description]
* @param {number|object} [x=0] - [description]
* @param {number} [y=0] - [description]
* @param {number} [z=0] - [description]
* @param {number} [w=0] - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Quaternion} This Quaternion object.
*/
set: function (x, y, z, w)
{
@ -154,9 +154,9 @@ var Quaternion = new Class({
* @method Phaser.Math.Quaternion#add
* @since 3.0.0
*
* @param {[type]} v - [description]
* @param {Phaser.Math.Quaternion|Phaser.Math.Vector4} v - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Quaternion} This Quaternion object.
*/
add: function (v)
{
@ -174,9 +174,9 @@ var Quaternion = new Class({
* @method Phaser.Math.Quaternion#subtract
* @since 3.0.0
*
* @param {[type]} v - [description]
* @param {Phaser.Math.Quaternion|Phaser.Math.Vector4} v - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Quaternion} This Quaternion object.
*/
subtract: function (v)
{
@ -194,9 +194,9 @@ var Quaternion = new Class({
* @method Phaser.Math.Quaternion#scale
* @since 3.0.0
*
* @param {[type]} scale - [description]
* @param {number} scale - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Quaternion} This Quaternion object.
*/
scale: function (scale)
{
@ -214,7 +214,7 @@ var Quaternion = new Class({
* @method Phaser.Math.Quaternion#length
* @since 3.0.0
*
* @return {[type]} [description]
* @return {number} [description]
*/
length: function ()
{
@ -232,7 +232,7 @@ var Quaternion = new Class({
* @method Phaser.Math.Quaternion#lengthSq
* @since 3.0.0
*
* @return {[type]} [description]
* @return {number} [description]
*/
lengthSq: function ()
{
@ -250,7 +250,7 @@ var Quaternion = new Class({
* @method Phaser.Math.Quaternion#normalize
* @since 3.0.0
*
* @return {[type]} [description]
* @return {Phaser.Math.Quaternion} This Quaternion object.
*/
normalize: function ()
{
@ -279,9 +279,9 @@ var Quaternion = new Class({
* @method Phaser.Math.Quaternion#dot
* @since 3.0.0
*
* @param {[type]} v - [description]
* @param {Phaser.Math.Quaternion|Phaser.Math.Vector4} v - [description]
*
* @return {[type]} [description]
* @return {number} [description]
*/
dot: function (v)
{
@ -294,10 +294,10 @@ var Quaternion = new Class({
* @method Phaser.Math.Quaternion#lerp
* @since 3.0.0
*
* @param {[type]} v - [description]
* @param {[type]} t - [description]
* @param {Phaser.Math.Quaternion|Phaser.Math.Vector4} v - [description]
* @param {number} [t=0] - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Quaternion} This Quaternion object.
*/
lerp: function (v, t)
{
@ -322,10 +322,10 @@ var Quaternion = new Class({
* @method Phaser.Math.Quaternion#rotationTo
* @since 3.0.0
*
* @param {[type]} a - [description]
* @param {[type]} b - [description]
* @param {Phaser.Math.Vector3} a - [description]
* @param {Phaser.Math.Vector3} b - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Quaternion} This Quaternion object.
*/
rotationTo: function (a, b)
{
@ -371,11 +371,11 @@ var Quaternion = new Class({
* @method Phaser.Math.Quaternion#setAxes
* @since 3.0.0
*
* @param {[type]} view - [description]
* @param {[type]} right - [description]
* @param {[type]} up - [description]
* @param {Phaser.Math.Vector3} view - [description]
* @param {Phaser.Math.Vector3} right - [description]
* @param {Phaser.Math.Vector3} up - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Quaternion} This Quaternion object.
*/
setAxes: function (view, right, up)
{
@ -402,7 +402,7 @@ var Quaternion = new Class({
* @method Phaser.Math.Quaternion#identity
* @since 3.0.0
*
* @return {[type]} [description]
* @return {Phaser.Math.Quaternion} This Quaternion object.
*/
identity: function ()
{
@ -420,10 +420,10 @@ var Quaternion = new Class({
* @method Phaser.Math.Quaternion#setAxisAngle
* @since 3.0.0
*
* @param {[type]} axis - [description]
* @param {[type]} rad - [description]
* @param {Phaser.Math.Vector3} axis - [description]
* @param {number} rad - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Quaternion} This Quaternion object.
*/
setAxisAngle: function (axis, rad)
{
@ -445,9 +445,9 @@ var Quaternion = new Class({
* @method Phaser.Math.Quaternion#multiply
* @since 3.0.0
*
* @param {[type]} b - [description]
* @param {Phaser.Math.Quaternion|Phaser.Math.Vector4} b - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Quaternion} This Quaternion object.
*/
multiply: function (b)
{
@ -475,10 +475,10 @@ var Quaternion = new Class({
* @method Phaser.Math.Quaternion#slerp
* @since 3.0.0
*
* @param {[type]} b - [description]
* @param {[type]} t - [description]
* @param {Phaser.Math.Quaternion|Phaser.Math.Vector4} b - [description]
* @param {number} t - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Quaternion} This Quaternion object.
*/
slerp: function (b, t)
{
@ -538,7 +538,7 @@ var Quaternion = new Class({
* @method Phaser.Math.Quaternion#invert
* @since 3.0.0
*
* @return {[type]} [description]
* @return {Phaser.Math.Quaternion} This Quaternion object.
*/
invert: function ()
{
@ -566,7 +566,7 @@ var Quaternion = new Class({
* @method Phaser.Math.Quaternion#conjugate
* @since 3.0.0
*
* @return {[type]} [description]
* @return {Phaser.Math.Quaternion} This Quaternion object.
*/
conjugate: function ()
{
@ -583,9 +583,9 @@ var Quaternion = new Class({
* @method Phaser.Math.Quaternion#rotateX
* @since 3.0.0
*
* @param {[type]} rad - [description]
* @param {number} rad - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Quaternion} This Quaternion object.
*/
rotateX: function (rad)
{
@ -613,9 +613,9 @@ var Quaternion = new Class({
* @method Phaser.Math.Quaternion#rotateY
* @since 3.0.0
*
* @param {[type]} rad - [description]
* @param {number} rad - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Quaternion} This Quaternion object.
*/
rotateY: function (rad)
{
@ -643,9 +643,9 @@ var Quaternion = new Class({
* @method Phaser.Math.Quaternion#rotateZ
* @since 3.0.0
*
* @param {[type]} rad - [description]
* @param {number} rad - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Quaternion} This Quaternion object.
*/
rotateZ: function (rad)
{
@ -673,7 +673,7 @@ var Quaternion = new Class({
* @method Phaser.Math.Quaternion#calculateW
* @since 3.0.0
*
* @return {[type]} [description]
* @return {Phaser.Math.Quaternion} This Quaternion object.
*/
calculateW: function ()
{
@ -692,9 +692,9 @@ var Quaternion = new Class({
* @method Phaser.Math.Quaternion#fromMat3
* @since 3.0.0
*
* @param {[type]} mat - [description]
* @param {Phaser.Math.Matrix3} mat - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Quaternion} This Quaternion object.
*/
fromMat3: function (mat)
{

View file

@ -96,7 +96,7 @@ var Vector2 = new Class({
* @method Phaser.Math.Vector2#setFromObject
* @since 3.0.0
*
* @param {[type]} obj - [description]
* @param {object} obj - [description]
*
* @return {Phaser.Math.Vector2} This Vector2.
*/
@ -114,8 +114,8 @@ var Vector2 = new Class({
* @method Phaser.Math.Vector2#set
* @since 3.0.0
*
* @param {[type]} x - [description]
* @param {[type]} y - [description]
* @param {number} x - [description]
* @param {number} [y=x] - [description]
*
* @return {Phaser.Math.Vector2} This Vector2.
*/
@ -129,17 +129,14 @@ var Vector2 = new Class({
return this;
},
// Sets the `x` and `y` values of this object from a given polar coordinate.
// @param {number} azimuth - The angular coordinate, in radians.
// @param {number} [radius=1] - The radial coordinate (length).
/**
* [description]
* Sets the `x` and `y` values of this object from a given polar coordinate.
*
* @method Phaser.Math.Vector2#setToPolar
* @since 3.0.0
*
* @param {[type]} azimuth - [description]
* @param {[type]} radius - [description]
* @param {float} azimuth - The angular coordinate, in radians.
* @param {float} [radius=1] - The radial coordinate (length).
*
* @return {Phaser.Math.Vector2} This Vector2.
*/
@ -159,7 +156,7 @@ var Vector2 = new Class({
* @method Phaser.Math.Vector2#equals
* @since 3.0.0
*
* @param {[type]} v - [description]
* @param {Phaser.Math.Vector2} v - [description]
*
* @return {boolean} [description]
*/
@ -196,7 +193,7 @@ var Vector2 = new Class({
* @method Phaser.Math.Vector2#add
* @since 3.0.0
*
* @param {[type]} src - [description]
* @param {Phaser.Math.Vector2} src - [description]
*
* @return {Phaser.Math.Vector2} This Vector2.
*/
@ -214,7 +211,7 @@ var Vector2 = new Class({
* @method Phaser.Math.Vector2#subtract
* @since 3.0.0
*
* @param {[type]} src - [description]
* @param {Phaser.Math.Vector2} src - [description]
*
* @return {Phaser.Math.Vector2} This Vector2.
*/
@ -232,7 +229,7 @@ var Vector2 = new Class({
* @method Phaser.Math.Vector2#multiply
* @since 3.0.0
*
* @param {[type]} src - [description]
* @param {Phaser.Math.Vector2} src - [description]
*
* @return {Phaser.Math.Vector2} This Vector2.
*/
@ -250,7 +247,7 @@ var Vector2 = new Class({
* @method Phaser.Math.Vector2#scale
* @since 3.0.0
*
* @param {[type]} value - [description]
* @param {number} value - [description]
*
* @return {Phaser.Math.Vector2} This Vector2.
*/
@ -276,7 +273,7 @@ var Vector2 = new Class({
* @method Phaser.Math.Vector2#divide
* @since 3.0.0
*
* @param {[type]} src - [description]
* @param {Phaser.Math.Vector2} src - [description]
*
* @return {Phaser.Math.Vector2} This Vector2.
*/
@ -310,7 +307,7 @@ var Vector2 = new Class({
* @method Phaser.Math.Vector2#distance
* @since 3.0.0
*
* @param {[type]} src - [description]
* @param {Phaser.Math.Vector2} src - [description]
*
* @return {number} [description]
*/
@ -328,7 +325,7 @@ var Vector2 = new Class({
* @method Phaser.Math.Vector2#distanceSq
* @since 3.0.0
*
* @param {[type]} src - [description]
* @param {Phaser.Math.Vector2} src - [description]
*
* @return {number} [description]
*/
@ -423,7 +420,7 @@ var Vector2 = new Class({
* @method Phaser.Math.Vector2#dot
* @since 3.0.0
*
* @param {[type]} src - [description]
* @param {Phaser.Math.Vector2} src - [description]
*
* @return {number} [description]
*/
@ -438,7 +435,7 @@ var Vector2 = new Class({
* @method Phaser.Math.Vector2#cross
* @since 3.0.0
*
* @param {[type]} src - [description]
* @param {Phaser.Math.Vector2} src - [description]
*
* @return {number} [description]
*/
@ -453,8 +450,8 @@ var Vector2 = new Class({
* @method Phaser.Math.Vector2#lerp
* @since 3.0.0
*
* @param {[type]} src - [description]
* @param {[type]} t - [description]
* @param {Phaser.Math.Vector2} src - [description]
* @param {number} [t=0] - [description]
*
* @return {Phaser.Math.Vector2} This Vector2.
*/
@ -477,7 +474,7 @@ var Vector2 = new Class({
* @method Phaser.Math.Vector2#transformMat3
* @since 3.0.0
*
* @param {[type]} mat - [description]
* @param {Phaser.Math.Matrix3} mat - [description]
*
* @return {Phaser.Math.Vector2} This Vector2.
*/
@ -499,7 +496,7 @@ var Vector2 = new Class({
* @method Phaser.Math.Vector2#transformMat4
* @since 3.0.0
*
* @param {[type]} mat - [description]
* @param {Phaser.Math.Matrix4} mat - [description]
*
* @return {Phaser.Math.Vector2} This Vector2.
*/

View file

@ -75,7 +75,7 @@ var Vector3 = new Class({
* @method Phaser.Math.Vector3#up
* @since 3.0.0
*
* @return {[type]} [description]
* @return {Phaser.Math.Vector3} This Vector3 object.
*/
up: function ()
{
@ -92,7 +92,7 @@ var Vector3 = new Class({
* @method Phaser.Math.Vector3#clone
* @since 3.0.0
*
* @return {[type]} [description]
* @return {Phaser.Math.Vector3} A new Vector3 object containing this Vectors values.
*/
clone: function ()
{
@ -108,7 +108,7 @@ var Vector3 = new Class({
* @param {[type]} a - [description]
* @param {[type]} b - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Vector3} This Vector3 object.
*/
crossVectors: function (a, b)
{
@ -132,9 +132,9 @@ var Vector3 = new Class({
* @method Phaser.Math.Vector3#equals
* @since 3.0.0
*
* @param {[type]} v - [description]
* @param {Phaser.Math.Vector3} v - The Vector3 to compare against.
*
* @return {[type]} [description]
* @return {boolean} True if the two vectors strictly match, otherwise false.
*/
equals: function (v)
{
@ -147,9 +147,9 @@ var Vector3 = new Class({
* @method Phaser.Math.Vector3#copy
* @since 3.0.0
*
* @param {[type]} src - [description]
* @param {Phaser.Math.Vector2|Phaser.Math.Vector3} src - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Vector3} This Vector3 object.
*/
copy: function (src)
{
@ -166,11 +166,11 @@ var Vector3 = new Class({
* @method Phaser.Math.Vector3#set
* @since 3.0.0
*
* @param {[type]} x - [description]
* @param {[type]} y - [description]
* @param {[type]} z - [description]
* @param {number|object} x - [description]
* @param {number} [y] - [description]
* @param {number} [z] - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Vector3} This Vector3 object.
*/
set: function (x, y, z)
{
@ -196,9 +196,9 @@ var Vector3 = new Class({
* @method Phaser.Math.Vector3#add
* @since 3.0.0
*
* @param {[type]} v - [description]
* @param {Phaser.Math.Vector2|Phaser.Math.Vector3} v - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Vector3} This Vector3 object.
*/
add: function (v)
{
@ -215,9 +215,9 @@ var Vector3 = new Class({
* @method Phaser.Math.Vector3#subtract
* @since 3.0.0
*
* @param {[type]} v - [description]
* @param {Phaser.Math.Vector2|Phaser.Math.Vector3} v - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Vector3} This Vector3 object.
*/
subtract: function (v)
{
@ -234,9 +234,9 @@ var Vector3 = new Class({
* @method Phaser.Math.Vector3#multiply
* @since 3.0.0
*
* @param {[type]} v - [description]
* @param {Phaser.Math.Vector2|Phaser.Math.Vector3} v - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Vector3} This Vector3 object.
*/
multiply: function (v)
{
@ -253,9 +253,9 @@ var Vector3 = new Class({
* @method Phaser.Math.Vector3#scale
* @since 3.0.0
*
* @param {[type]} scale - [description]
* @param {float} scale - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Vector3} This Vector3 object.
*/
scale: function (scale)
{
@ -281,9 +281,9 @@ var Vector3 = new Class({
* @method Phaser.Math.Vector3#divide
* @since 3.0.0
*
* @param {[type]} v - [description]
* @param {Phaser.Math.Vector2|Phaser.Math.Vector3} v - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Vector3} This Vector3 object.
*/
divide: function (v)
{
@ -300,7 +300,7 @@ var Vector3 = new Class({
* @method Phaser.Math.Vector3#negate
* @since 3.0.0
*
* @return {[type]} [description]
* @return {Phaser.Math.Vector3} This Vector3 object.
*/
negate: function ()
{
@ -317,9 +317,9 @@ var Vector3 = new Class({
* @method Phaser.Math.Vector3#distance
* @since 3.0.0
*
* @param {[type]} v - [description]
* @param {Phaser.Math.Vector2|Phaser.Math.Vector3} v - [description]
*
* @return {[type]} [description]
* @return {number} [description]
*/
distance: function (v)
{
@ -336,9 +336,9 @@ var Vector3 = new Class({
* @method Phaser.Math.Vector3#distanceSq
* @since 3.0.0
*
* @param {[type]} v - [description]
* @param {Phaser.Math.Vector2|Phaser.Math.Vector3} v - [description]
*
* @return {[type]} [description]
* @return {number} [description]
*/
distanceSq: function (v)
{
@ -355,7 +355,7 @@ var Vector3 = new Class({
* @method Phaser.Math.Vector3#length
* @since 3.0.0
*
* @return {[type]} [description]
* @return {number} [description]
*/
length: function ()
{
@ -372,7 +372,7 @@ var Vector3 = new Class({
* @method Phaser.Math.Vector3#lengthSq
* @since 3.0.0
*
* @return {[type]} [description]
* @return {number} [description]
*/
lengthSq: function ()
{
@ -389,7 +389,9 @@ var Vector3 = new Class({
* @method Phaser.Math.Vector3#normalize
* @since 3.0.0
*
* @return {[type]} [description]
* @param {Phaser.Math.Vector2|Phaser.Math.Vector3} v - [description]
*
* @return {Phaser.Math.Vector3} This Vector3 object.
*/
normalize: function ()
{
@ -416,9 +418,9 @@ var Vector3 = new Class({
* @method Phaser.Math.Vector3#dot
* @since 3.0.0
*
* @param {[type]} v - [description]
* @param {Phaser.Math.Vector3} v - [description]
*
* @return {[type]} [description]
* @return {number} [description]
*/
dot: function (v)
{
@ -431,9 +433,9 @@ var Vector3 = new Class({
* @method Phaser.Math.Vector3#cross
* @since 3.0.0
*
* @param {[type]} v - [description]
* @param {Phaser.Math.Vector3} v - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Vector3} This Vector3 object.
*/
cross: function (v)
{
@ -457,10 +459,10 @@ var Vector3 = new Class({
* @method Phaser.Math.Vector3#lerp
* @since 3.0.0
*
* @param {[type]} v - [description]
* @param {[type]} t - [description]
* @param {Phaser.Math.Vector3} v - [description]
* @param {number} [t=0] - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Vector3} This Vector3 object.
*/
lerp: function (v, t)
{
@ -483,9 +485,9 @@ var Vector3 = new Class({
* @method Phaser.Math.Vector3#transformMat3
* @since 3.0.0
*
* @param {[type]} mat - [description]
* @param {Phaser.Math.Matrix3} mat - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Vector3} This Vector3 object.
*/
transformMat3: function (mat)
{
@ -507,9 +509,9 @@ var Vector3 = new Class({
* @method Phaser.Math.Vector3#transformMat4
* @since 3.0.0
*
* @param {[type]} mat - [description]
* @param {Phaser.Math.Matrix4} mat - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Vector3} This Vector3 object.
*/
transformMat4: function (mat)
{
@ -531,9 +533,9 @@ var Vector3 = new Class({
* @method Phaser.Math.Vector3#transformCoordinates
* @since 3.0.0
*
* @param {[type]} mat - [description]
* @param {Phaser.Math.Matrix4} mat - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Vector3} This Vector3 object.
*/
transformCoordinates: function (mat)
{
@ -560,9 +562,9 @@ var Vector3 = new Class({
* @method Phaser.Math.Vector3#transformQuat
* @since 3.0.0
*
* @param {[type]} q - [description]
* @param {Phaser.Math.Quaternion} q - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Vector3} This Vector3 object.
*/
transformQuat: function (q)
{
@ -590,23 +592,15 @@ var Vector3 = new Class({
},
/**
* Multiplies this Vector3 by the specified matrix,
* applying a W divide. This is useful for projection,
* Multiplies this Vector3 by the specified matrix, applying a W divide. This is useful for projection,
* e.g. unprojecting a 2D point into 3D space.
*
* @method project
* @param {Matrix4} the 4x4 matrix to multiply with
* @return {Vector3} this object for chaining
*/
/**
* [description]
*
* @method Phaser.Math.Vector3#project
* @since 3.0.0
*
* @param {[type]} mat - [description]
* @param {Phaser.Math.Matrix4} mat - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Vector3} This Vector3 object.
*/
project: function (mat)
{
@ -650,21 +644,14 @@ var Vector3 = new Class({
*
* After this operation, this vector's (x, y, z) components will
* represent the unprojected 3D coordinate.
*
* @param {Vector4} viewport screen x, y, width and height in pixels
* @param {Matrix4} invProjectionView combined projection and view matrix
* @return {Vector3} this object, for chaining
*/
/**
* [description]
*
* @method Phaser.Math.Vector3#unproject
* @since 3.0.0
*
* @param {[type]} viewport - [description]
* @param {[type]} invProjectionView - [description]
* @param {Phaser.Math.Vector4} viewport - Screen x, y, width and height in pixels.
* @param {Phaser.Math.Matrix4} invProjectionView - Combined projection and view matrix.
*
* @return {[type]} [description]
* @return {Phaser.Math.Vector3} This Vector3 object.
*/
unproject: function (viewport, invProjectionView)
{
@ -690,7 +677,7 @@ var Vector3 = new Class({
* @method Phaser.Math.Vector3#reset
* @since 3.0.0
*
* @return {[type]} [description]
* @return {Phaser.Math.Vector3} This Vector3 object.
*/
reset: function ()
{

View file

@ -293,7 +293,7 @@ var Vector4 = new Class({
* @method Phaser.Math.Vector4#dot
* @since 3.0.0
*
* @param {[type]} v - [description]
* @param {Phaser.Math.Vector4} v - [description]
*
* @return {number} [description]
*/
@ -308,8 +308,8 @@ var Vector4 = new Class({
* @method Phaser.Math.Vector4#lerp
* @since 3.0.0
*
* @param {[type]} v - [description]
* @param {[type]} t - [description]
* @param {Phaser.Math.Vector4} v - [description]
* @param {number} [t=0] - [description]
*
* @return {Phaser.Math.Vector4} This Vector4 object.
*/
@ -336,7 +336,7 @@ var Vector4 = new Class({
* @method Phaser.Math.Vector4#multiply
* @since 3.0.0
*
* @param {[type]} v - [description]
* @param {Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4} v - [description]
*
* @return {Phaser.Math.Vector4} This Vector4 object.
*/
@ -356,7 +356,7 @@ var Vector4 = new Class({
* @method Phaser.Math.Vector4#divide
* @since 3.0.0
*
* @param {[type]} v - [description]
* @param {Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4} v - [description]
*
* @return {Phaser.Math.Vector4} This Vector4 object.
*/
@ -376,7 +376,7 @@ var Vector4 = new Class({
* @method Phaser.Math.Vector4#distance
* @since 3.0.0
*
* @param {[type]} v - [description]
* @param {Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4} v - [description]
*
* @return {number} [description]
*/
@ -396,7 +396,7 @@ var Vector4 = new Class({
* @method Phaser.Math.Vector4#distanceSq
* @since 3.0.0
*
* @param {[type]} v - [description]
* @param {Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4} v - [description]
*
* @return {number} [description]
*/
@ -434,7 +434,7 @@ var Vector4 = new Class({
* @method Phaser.Math.Vector4#transformMat4
* @since 3.0.0
*
* @param {[type]} mat - [description]
* @param {Phaser.Math.Matrix4} mat - [description]
*
* @return {Phaser.Math.Vector4} This Vector4 object.
*/
@ -456,13 +456,14 @@ var Vector4 = new Class({
// TODO: is this really the same as Vector3?
// Also, what about this: http://molecularmusings.wordpress.com/2013/05/24/a-faster-quaternion-vector-multiplication/
/**
* [description]
*
* @method Phaser.Math.Vector4#transformQuat
* @since 3.0.0
*
* @param {[type]} q - [description]
* @param {Phaser.Math.Quaternion} q - [description]
*
* @return {Phaser.Math.Vector4} This Vector4 object.
*/

View file

@ -120,7 +120,7 @@ var Systems = new Class({
* [description]
*
* @name Phaser.Scenes.Systems#registry
* @type {[type]}
* @type {Phaser.Data.DataManager}
* @since 3.0.0
*/
this.registry;