Update JSDoc on Cameras

This commit is contained in:
orblazer 2018-03-19 01:49:29 +01:00
parent ae15eca7bd
commit c3fb72780b
5 changed files with 86 additions and 86 deletions

View file

@ -200,7 +200,7 @@ var CameraManager = new Class({
this.cameraPool.slice(poolIndex, 1);
return camera;
}
return null;
},
@ -236,9 +236,9 @@ var CameraManager = new Class({
* @method Phaser.Cameras.Scene2D.CameraManager#fromJSON
* @since 3.0.0
*
* @param {[type]} config - [description]
* @param {object|object[]} config - [description]
*
* @return {[type]} [description]
* @return {Phaser.Cameras.Scene2D.CameraManager} [description]
*/
fromJSON: function (config)
{
@ -436,7 +436,7 @@ var CameraManager = new Class({
*
* @method Phaser.Cameras.Scene2D.CameraManager#resize
* @since 3.2.0
*
*
* @param {number} width - The new width of the camera.
* @param {number} height - The new height of the camera.
*/

View file

@ -178,7 +178,7 @@ var Camera = new Class({
* [description]
*
* @name Phaser.Cameras.Sprite3D#ray
* @type {[type]}
* @type {{origin:Phaser.Math.Vector3,direction:Phaser.Math.Vector3}}
* @since 3.0.0
*/
this.ray = {
@ -268,7 +268,7 @@ var Camera = new Class({
* @method Phaser.Cameras.Sprite3D.Camera#setPixelScale
* @since 3.0.0
*
* @param {[type]} value - [description]
* @param {number} value - [description]
*
* @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.
*/
@ -285,9 +285,9 @@ var Camera = new Class({
* @method Phaser.Cameras.Sprite3D.Camera#add
* @since 3.0.0
*
* @param {[type]} sprite3D - [description]
* @param {Phaser.GameObjects.Sprite3D} sprite3D - [description]
*
* @return {[type]} [description]
* @return {Phaser.GameObjects.Sprite3D} [description]
*/
add: function (sprite3D)
{
@ -304,7 +304,7 @@ var Camera = new Class({
* @method Phaser.Cameras.Sprite3D.Camera#remove
* @since 3.0.0
*
* @param {[type]} child - [description]
* @param {Phaser.GameObjects.GameObject} child - [description]
*
* @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.
*/
@ -357,14 +357,14 @@ var Camera = new Class({
* @method Phaser.Cameras.Sprite3D.Camera#create
* @since 3.0.0
*
* @param {[type]} x - [description]
* @param {[type]} y - [description]
* @param {[type]} z - [description]
* @param {[type]} key - [description]
* @param {[type]} frame - [description]
* @param {[type]} visible - [description]
* @param {number} x - [description]
* @param {number} y - [description]
* @param {number} z - [description]
* @param {string} key - [description]
* @param {string|number} frame - [description]
* @param {boolean} [visible=true] - [description]
*
* @return {[type]} [description]
* @return {Phaser.GameObjects.Sprite3D} [description]
*/
create: function (x, y, z, key, frame, visible)
{
@ -390,12 +390,12 @@ var Camera = new Class({
* @method Phaser.Cameras.Sprite3D.Camera#createMultiple
* @since 3.0.0
*
* @param {[type]} quantity - [description]
* @param {[type]} key - [description]
* @param {[type]} frame - [description]
* @param {[type]} visible - [description]
* @param {number} quantity - [description]
* @param {string} key - [description]
* @param {string|number} frame - [description]
* @param {boolean} [visible=true] - [description]
*
* @return {[type]} [description]
* @return {Phaser.GameObjects.Sprite3D[]} [description]
*/
createMultiple: function (quantity, key, frame, visible)
{
@ -428,12 +428,12 @@ var Camera = new Class({
* @method Phaser.Cameras.Sprite3D.Camera#createRect
* @since 3.0.0
*
* @param {[type]} size - [description]
* @param {[type]} spacing - [description]
* @param {[type]} key - [description]
* @param {[type]} frame - [description]
* @param {number|{x:number,y:number}} size - [description]
* @param {number|{x:number,y:number,z:number}} spacing - [description]
* @param {string} key - [description]
* @param {string|number} [frame] - [description]
*
* @return {[type]} [description]
* @return {Phaser.GameObjects.Sprite3D[]} [description]
*/
createRect: function (size, spacing, key, frame)
{
@ -474,8 +474,8 @@ var Camera = new Class({
* @method Phaser.Cameras.Sprite3D.Camera#randomSphere
* @since 3.0.0
*
* @param {[type]} radius - [description]
* @param {[type]} sprites - [description]
* @param {number} [radius=1] - [description]
* @param {Phaser.GameObjects.Sprite3D[]} [sprites] - [description]
*
* @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.
*/
@ -497,8 +497,8 @@ var Camera = new Class({
* @method Phaser.Cameras.Sprite3D.Camera#randomCube
* @since 3.0.0
*
* @param {[type]} scale - [description]
* @param {[type]} sprites - [description]
* @param {float} [scale=1] - [description]
* @param {Phaser.GameObjects.Sprite3D[]} [sprites] - [description]
*
* @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.
*/
@ -520,8 +520,8 @@ var Camera = new Class({
* @method Phaser.Cameras.Sprite3D.Camera#translateChildren
* @since 3.0.0
*
* @param {[type]} vec3 - [description]
* @param {[type]} sprites - [description]
* @param {Phaser.Math.Vector3} vec3 - [description]
* @param {Phaser.GameObjects.Sprite3D[]} sprites - [description]
*
* @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.
*/
@ -543,8 +543,8 @@ var Camera = new Class({
* @method Phaser.Cameras.Sprite3D.Camera#transformChildren
* @since 3.0.0
*
* @param {[type]} mat4 - [description]
* @param {[type]} sprites - [description]
* @param {Phaser.Math.Matrix4} mat4 - [description]
* @param {Phaser.GameObjects.Sprite3D[]} sprites - [description]
*
* @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.
*/
@ -588,9 +588,9 @@ var Camera = new Class({
* @method Phaser.Cameras.Sprite3D.Camera#translate
* @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 {Phaser.Cameras.Sprite3D.Camera} This Camera object.
*/
@ -618,9 +618,9 @@ var Camera = new Class({
* @method Phaser.Cameras.Sprite3D.Camera#lookAt
* @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 {Phaser.Cameras.Sprite3D.Camera} This Camera object.
*/
@ -655,8 +655,8 @@ var Camera = new Class({
* @method Phaser.Cameras.Sprite3D.Camera#rotate
* @since 3.0.0
*
* @param {[type]} radians - [description]
* @param {[type]} axis - [description]
* @param {float} radians - [description]
* @param {Phaser.Math.Vector3} axis - [description]
*
* @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.
*/
@ -674,9 +674,9 @@ var Camera = new Class({
* @method Phaser.Cameras.Sprite3D.Camera#rotateAround
* @since 3.0.0
*
* @param {[type]} point - [description]
* @param {[type]} radians - [description]
* @param {[type]} axis - [description]
* @param {Phaser.Math.Vector3} point - [description]
* @param {float} radians - [description]
* @param {Phaser.Math.Vector3} axis - [description]
*
* @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.
*/
@ -697,10 +697,10 @@ var Camera = new Class({
* @method Phaser.Cameras.Sprite3D.Camera#project
* @since 3.0.0
*
* @param {[type]} vec - [description]
* @param {[type]} out - [description]
* @param {Phaser.Math.Vector3} vec - [description]
* @param {Phaser.Math.Vector4} out - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Vector4} [description]
*/
project: function (vec, out)
{
@ -751,10 +751,10 @@ var Camera = new Class({
* @method Phaser.Cameras.Sprite3D.Camera#unproject
* @since 3.0.0
*
* @param {[type]} vec - [description]
* @param {[type]} out - [description]
* @param {Phaser.Math.Vector4} vec - [description]
* @param {Phaser.Math.Vector3} out - [description]
*
* @return {[type]} [description]
* @return {Phaser.Math.Vector3} [description]
*/
unproject: function (vec, out)
{
@ -771,10 +771,10 @@ var Camera = new Class({
* @method Phaser.Cameras.Sprite3D.Camera#getPickRay
* @since 3.0.0
*
* @param {[type]} x - [description]
* @param {[type]} y - [description]
* @param {number} x - [description]
* @param {number} [y] - [description]
*
* @return {[type]} [description]
* @return {{origin:Phaser.Math.Vector3,direction:Phaser.Math.Vector3}} [description]
*/
getPickRay: function (x, y)
{
@ -838,7 +838,7 @@ var Camera = new Class({
// Better view-aligned billboards might use this:
// var dir = tmp.set(camera.position).subtract(p).normalize();
var right = rightvec.set(this.up).cross(dir).normalize();
var up = tmpVec3.set(dir).cross(right).normalize();
@ -866,27 +866,27 @@ var Camera = new Class({
this.billboardMatrixDirty = false;
},
/**
* This is a utility function for canvas 3D rendering,
* This is a utility function for canvas 3D rendering,
* which determines the "point size" of a camera-facing
* sprite billboard given its 3D world position
* sprite billboard given its 3D world position
* (origin at center of sprite) and its world width
* and height in x/y.
* and height in x/y.
*
* We place into the output Vector2 the scaled width
* and height. If no `out` is specified, a new Vector2
* will be created for convenience (this should be avoided
* will be created for convenience (this should be avoided
* in tight loops).
*
* @method Phaser.Cameras.Sprite3D.Camera#getPointSize
* @since 3.0.0
*
* @param {[type]} vec - The position of the 3D Sprite.
* @param {[type]} size - The x and y dimensions.
* @param {[type]} out - The result, scaled x and y dimensions.
* @param {Phaser.Math.Vector2} vec - The position of the 3D Sprite.
* @param {Phaser.Math.Vector2} size - The x and y dimensions.
* @param {Phaser.Math.Vector2} out - The result, scaled x and y dimensions.
*
* @return {[type]} [description]
* @return {Phaser.Math.Vector2} [description]
*/
getPointSize: function (vec, size, out)
{
@ -949,7 +949,7 @@ var Camera = new Class({
* @method Phaser.Cameras.Sprite3D.Camera#setX
* @since 3.0.0
*
* @param {[type]} value - [description]
* @param {number} value - [description]
*
* @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.
*/
@ -966,7 +966,7 @@ var Camera = new Class({
* @method Phaser.Cameras.Sprite3D.Camera#setY
* @since 3.0.0
*
* @param {[type]} value - [description]
* @param {number} value - [description]
*
* @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.
*/
@ -983,7 +983,7 @@ var Camera = new Class({
* @method Phaser.Cameras.Sprite3D.Camera#setZ
* @since 3.0.0
*
* @param {[type]} value - [description]
* @param {number} value - [description]
*
* @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.
*/

View file

@ -80,11 +80,11 @@ var CameraManager = new Class({
* @method Phaser.Cameras.Sprite3D.CameraManager#add
* @since 3.0.0
*
* @param {[type]} fieldOfView - [description]
* @param {[type]} width - [description]
* @param {[type]} height - [description]
* @param {number} [fieldOfView=80] - [description]
* @param {number} [width] - [description]
* @param {number} [height] - [description]
*
* @return {[type]} [description]
* @return {Phaser.Cameras.Sprite3D.PerspectiveCamera} [description]
*/
add: function (fieldOfView, width, height)
{
@ -100,7 +100,7 @@ var CameraManager = new Class({
* @param {number} width - [description]
* @param {number} height - [description]
*
* @return {[type]} [description]
* @return {Phaser.Cameras.Sprite3D.OrthographicCamera} [description]
*/
addOrthographicCamera: function (width, height)
{
@ -126,7 +126,7 @@ var CameraManager = new Class({
* @param {number} [width] - [description]
* @param {number} [height] - [description]
*
* @return {[type]} [description]
* @return {Phaser.Cameras.Sprite3D.PerspectiveCamera} [description]
*/
addPerspectiveCamera: function (fieldOfView, width, height)
{
@ -151,7 +151,7 @@ var CameraManager = new Class({
*
* @param {string} name - [description]
*
* @return {[type]} [description]
* @return {Phaser.Cameras.Sprite3D.OrthographicCamera|Phaser.Cameras.Sprite3D.PerspectiveCamera} [description]
*/
getCamera: function (name)
{
@ -172,7 +172,7 @@ var CameraManager = new Class({
* @method Phaser.Cameras.Sprite3D.CameraManager#removeCamera
* @since 3.0.0
*
* @param {[type]} camera - [description]
* @param {Phaser.Cameras.Sprite3D.OrthographicCamera|Phaser.Cameras.Sprite3D.PerspectiveCamera} camera - [description]
*/
removeCamera: function (camera)
{
@ -190,7 +190,7 @@ var CameraManager = new Class({
* @method Phaser.Cameras.Sprite3D.CameraManager#removeAll
* @since 3.0.0
*
* @return {[type]} [description]
* @return {Phaser.Cameras.Sprite3D.OrthographicCamera|Phaser.Cameras.Sprite3D.PerspectiveCamera} [description]
*/
removeAll: function ()
{

View file

@ -85,11 +85,11 @@ var OrthographicCamera = new Class({
* @method Phaser.Cameras.Sprite3D.OrthographicCamera#setToOrtho
* @since 3.0.0
*
* @param {[type]} yDown - [description]
* @param {[type]} viewportWidth - [description]
* @param {[type]} viewportHeight - [description]
* @param {number} yDown - [description]
* @param {number} [viewportWidth] - [description]
* @param {number} [viewportHeight] - [description]
*
* @return {[type]} [description]
* @return {Phaser.Cameras.Sprite3D.OrthographicCamera} [description]
*/
setToOrtho: function (yDown, viewportWidth, viewportHeight)
{
@ -114,7 +114,7 @@ var OrthographicCamera = new Class({
* @method Phaser.Cameras.Sprite3D.OrthographicCamera#update
* @since 3.0.0
*
* @return {[type]} [description]
* @return {Phaser.Cameras.Sprite3D.OrthographicCamera} [description]
*/
update: function ()
{
@ -137,7 +137,7 @@ var OrthographicCamera = new Class({
far
);
// Build the view matrix
// Build the view matrix
tmpVec3.copy(this.position).add(this.direction);
this.view.lookAt(this.position, tmpVec3, this.up);

View file

@ -80,9 +80,9 @@ var PerspectiveCamera = new Class({
* @method Phaser.Cameras.Sprite3D.PerspectiveCamera#setFOV
* @since 3.0.0
*
* @param {[type]} value - [description]
* @param {number} value - [description]
*
* @return {[type]} [description]
* @return {Phaser.Cameras.Sprite3D.PerspectiveCamera} [description]
*/
setFOV: function (value)
{
@ -97,7 +97,7 @@ var PerspectiveCamera = new Class({
* @method Phaser.Cameras.Sprite3D.PerspectiveCamera#update
* @since 3.0.0
*
* @return {[type]} [description]
* @return {Phaser.Cameras.Sprite3D.PerspectiveCamera} [description]
*/
update: function ()
{
@ -111,7 +111,7 @@ var PerspectiveCamera = new Class({
Math.abs(this.far)
);
// Build the view matrix
// Build the view matrix
tmpVec3.copy(this.position).add(this.direction);
this.view.lookAt(this.position, tmpVec3, this.up);