diff --git a/src/physics/impact/Body.js b/src/physics/impact/Body.js index cf0affa09..aa5c20777 100644 --- a/src/physics/impact/Body.js +++ b/src/physics/impact/Body.js @@ -293,7 +293,7 @@ var Body = new Class({ * @since 3.0.0 */ this.updateCallback; - + /** * min 44 deg, max 136 deg * @@ -331,7 +331,7 @@ var Body = new Class({ this.accelGround = 0; this.accelAir = 0; this.jumpSpeed = 0; - + this.type = TYPE.NONE; this.checkAgainst = TYPE.NONE; this.collides = COLLIDES.NEVER; @@ -353,10 +353,10 @@ var Body = new Class({ this.last.y = pos.y; this.vel.y += this.world.gravity * delta * this.gravityFactor; - + this.vel.x = GetVelocity(delta, this.vel.x, this.accel.x, this.friction.x, this.maxVel.x); this.vel.y = GetVelocity(delta, this.vel.y, this.accel.y, this.friction.y, this.maxVel.y); - + var mx = this.vel.x * delta; var my = this.vel.y * delta; @@ -539,7 +539,7 @@ var Body = new Class({ * @since 3.0.0 * * @param {Phaser.Physics.Impact.Body} other - [description] - * @param {[type]} axis - [description] + * @param {string} axis - [description] */ collideWith: function (other, axis) { diff --git a/src/physics/impact/COLLIDES.js b/src/physics/impact/COLLIDES.js index 3ed175ee5..5af469268 100644 --- a/src/physics/impact/COLLIDES.js +++ b/src/physics/impact/COLLIDES.js @@ -6,21 +6,20 @@ /** * Collision Types - Determine if and how entities collide with each other. - * + * * In ACTIVE vs. LITE or FIXED vs. ANY collisions, only the "weak" entity moves, * while the other one stays fixed. In ACTIVE vs. ACTIVE and ACTIVE vs. PASSIVE * collisions, both entities are moved. LITE or PASSIVE entities don't collide * with other LITE or PASSIVE entities at all. The behavior for FIXED vs. * FIXED collisions is undefined. - * + * * @namespace Phaser.Physics.Impact.COLLIDES */ - module.exports = { /** * Never collides. - * + * * @name Phaser.Physics.Impact.COLLIDES.NEVER * @type {integer} * @since 3.0.0 @@ -29,7 +28,7 @@ module.exports = { /** * Lite collision. - * + * * @name Phaser.Physics.Impact.COLLIDES.LITE * @type {integer} * @since 3.0.0 @@ -38,7 +37,7 @@ module.exports = { /** * Passive collision. - * + * * @name Phaser.Physics.Impact.COLLIDES.PASSIVE * @type {integer} * @since 3.0.0 @@ -47,7 +46,7 @@ module.exports = { /** * Active collision. - * + * * @name Phaser.Physics.Impact.COLLIDES.ACTIVE * @type {integer} * @since 3.0.0 @@ -56,7 +55,7 @@ module.exports = { /** * Fixed collision. - * + * * @name Phaser.Physics.Impact.COLLIDES.FIXED * @type {integer} * @since 3.0.0 diff --git a/src/physics/impact/Factory.js b/src/physics/impact/Factory.js index 3df3f03fe..92bbee070 100644 --- a/src/physics/impact/Factory.js +++ b/src/physics/impact/Factory.js @@ -97,7 +97,7 @@ var Factory = new Class({ * * @param {number} x - The horizontal position of this Game Object in the world. * @param {number} y - The vertical position of this Game Object in the world. - * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param {string} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. * @param {string|integer} [frame] - An optional frame from the Texture this Game Object is rendering with. * * @return {Phaser.Physics.Impact.ImpactImage} The ImpactImage object that was created. @@ -119,7 +119,7 @@ var Factory = new Class({ * * @param {number} x - The horizontal position of this Game Object in the world. * @param {number} y - The vertical position of this Game Object in the world. - * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. + * @param {string} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager. * @param {string|integer} [frame] - An optional frame from the Texture this Game Object is rendering with. * * @return {Phaser.Physics.Impact.ImpactSprite} The ImpactSprite object that was created. diff --git a/src/physics/impact/TYPE.js b/src/physics/impact/TYPE.js index ff18af8dc..4f5a884cc 100644 --- a/src/physics/impact/TYPE.js +++ b/src/physics/impact/TYPE.js @@ -6,21 +6,20 @@ /** * Collision Types - Determine if and how entities collide with each other. - * + * * In ACTIVE vs. LITE or FIXED vs. ANY collisions, only the "weak" entity moves, * while the other one stays fixed. In ACTIVE vs. ACTIVE and ACTIVE vs. PASSIVE * collisions, both entities are moved. LITE or PASSIVE entities don't collide * with other LITE or PASSIVE entities at all. The behavior for FIXED vs. * FIXED collisions is undefined. - * + * * @namespace Phaser.Physics.Impact.TYPES */ - module.exports = { /** * Collides with nothing. - * + * * @name Phaser.Physics.Impact.TYPES.NONE * @type {integer} * @since 3.0.0 @@ -29,7 +28,7 @@ module.exports = { /** * Type A. Collides with Type B. - * + * * @name Phaser.Physics.Impact.TYPES.A * @type {integer} * @since 3.0.0 @@ -38,7 +37,7 @@ module.exports = { /** * Type B. Collides with Type A. - * + * * @name Phaser.Physics.Impact.TYPES.B * @type {integer} * @since 3.0.0 @@ -47,7 +46,7 @@ module.exports = { /** * Collides with both types A and B. - * + * * @name Phaser.Physics.Impact.TYPES.BOTH * @type {integer} * @since 3.0.0 diff --git a/src/physics/impact/components/Acceleration.js b/src/physics/impact/components/Acceleration.js index 01c4f9c32..efed22d6f 100644 --- a/src/physics/impact/components/Acceleration.js +++ b/src/physics/impact/components/Acceleration.js @@ -18,9 +18,9 @@ var Acceleration = { * @method Phaser.Physics.Impact.Components.Acceleration#setAccelerationX * @since 3.0.0 * - * @param {[type]} x - [description] + * @param {number} x - [description] * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ setAccelerationX: function (x) { @@ -35,9 +35,9 @@ var Acceleration = { * @method Phaser.Physics.Impact.Components.Acceleration#setAccelerationY * @since 3.0.0 * - * @param {[type]} y - [description] + * @param {number} y - [description] * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ setAccelerationY: function (y) { @@ -52,10 +52,10 @@ var Acceleration = { * @method Phaser.Physics.Impact.Components.Acceleration#setAcceleration * @since 3.0.0 * - * @param {[type]} x - [description] - * @param {[type]} y - [description] + * @param {number} x - [description] + * @param {number} y - [description] * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ setAcceleration: function (x, y) { diff --git a/src/physics/impact/components/BodyScale.js b/src/physics/impact/components/BodyScale.js index a5bb888c4..dab45e806 100644 --- a/src/physics/impact/components/BodyScale.js +++ b/src/physics/impact/components/BodyScale.js @@ -18,10 +18,10 @@ var BodyScale = { * @method Phaser.Physics.Impact.Components.BodyScale#setBodySize * @since 3.0.0 * - * @param {[type]} width - [description] - * @param {[type]} height - [description] + * @param {number} width - [description] + * @param {number} [height=width] - [description] * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ setBodySize: function (width, height) { @@ -39,10 +39,10 @@ var BodyScale = { * @method Phaser.Physics.Impact.Components.BodyScale#setBodyScale * @since 3.0.0 * - * @param {[type]} scaleX - [description] - * @param {[type]} scaleY - [description] + * @param {number} scaleX - [description] + * @param {number} [scaleY] - [description] * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ setBodyScale: function (scaleX, scaleY) { diff --git a/src/physics/impact/components/BodyType.js b/src/physics/impact/components/BodyType.js index 48725d410..b6d6f6bc8 100644 --- a/src/physics/impact/components/BodyType.js +++ b/src/physics/impact/components/BodyType.js @@ -20,7 +20,7 @@ var BodyType = { * @method Phaser.Physics.Impact.Components.BodyType#getBodyType * @since 3.0.0 * - * @return {[type]} [description] + * @return {number} [description] */ getBodyType: function () { @@ -33,7 +33,7 @@ var BodyType = { * @method Phaser.Physics.Impact.Components.BodyType#setTypeNone * @since 3.0.0 * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ setTypeNone: function () { @@ -48,7 +48,7 @@ var BodyType = { * @method Phaser.Physics.Impact.Components.BodyType#setTypeA * @since 3.0.0 * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ setTypeA: function () { @@ -63,7 +63,7 @@ var BodyType = { * @method Phaser.Physics.Impact.Components.BodyType#setTypeB * @since 3.0.0 * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ setTypeB: function () { diff --git a/src/physics/impact/components/Bounce.js b/src/physics/impact/components/Bounce.js index d10cf3380..11814aa99 100644 --- a/src/physics/impact/components/Bounce.js +++ b/src/physics/impact/components/Bounce.js @@ -18,9 +18,9 @@ var Bounce = { * @method Phaser.Physics.Impact.Components.Bounce#setBounce * @since 3.0.0 * - * @param {[type]} value - [description] + * @param {number} value - [description] * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ setBounce: function (value) { @@ -35,9 +35,9 @@ var Bounce = { * @method Phaser.Physics.Impact.Components.Bounce#setMinBounceVelocity * @since 3.0.0 * - * @param {[type]} value - [description] + * @param {number} value - [description] * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ setMinBounceVelocity: function (value) { @@ -50,7 +50,7 @@ var Bounce = { * [description] * * @name Phaser.Physics.Impact.Components.Bounce#bounce - * @type {[type]} + * @type {number} * @since 3.0.0 */ bounce: { diff --git a/src/physics/impact/components/CheckAgainst.js b/src/physics/impact/components/CheckAgainst.js index f3740fecc..118d51f89 100644 --- a/src/physics/impact/components/CheckAgainst.js +++ b/src/physics/impact/components/CheckAgainst.js @@ -20,7 +20,7 @@ var CheckAgainst = { * @method Phaser.Physics.Impact.Components.CheckAgainst#setAvsB * @since 3.0.0 * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ setAvsB: function () { @@ -35,7 +35,7 @@ var CheckAgainst = { * @method Phaser.Physics.Impact.Components.CheckAgainst#setBvsA * @since 3.0.0 * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ setBvsA: function () { @@ -50,7 +50,7 @@ var CheckAgainst = { * @method Phaser.Physics.Impact.Components.CheckAgainst#setCheckAgainstNone * @since 3.0.0 * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ setCheckAgainstNone: function () { @@ -65,7 +65,7 @@ var CheckAgainst = { * @method Phaser.Physics.Impact.Components.CheckAgainst#setCheckAgainstA * @since 3.0.0 * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ setCheckAgainstA: function () { @@ -80,7 +80,7 @@ var CheckAgainst = { * @method Phaser.Physics.Impact.Components.CheckAgainst#setCheckAgainstB * @since 3.0.0 * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ setCheckAgainstB: function () { @@ -93,7 +93,7 @@ var CheckAgainst = { * [description] * * @name Phaser.Physics.Impact.Components.CheckAgainst#checkAgainst - * @type {[type]} + * @type {number} * @since 3.0.0 */ checkAgainst: { diff --git a/src/physics/impact/components/Collides.js b/src/physics/impact/components/Collides.js index 6040fd411..0d5822cd4 100644 --- a/src/physics/impact/components/Collides.js +++ b/src/physics/impact/components/Collides.js @@ -23,10 +23,10 @@ var Collides = { * @method Phaser.Physics.Impact.Components.Collides#setCollideCallback * @since 3.0.0 * - * @param {[type]} callback - [description] - * @param {[type]} scope - [description] + * @param {function} callback - [description] + * @param {object} scope - [description] * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ setCollideCallback: function (callback, scope) { @@ -46,7 +46,7 @@ var Collides = { * @method Phaser.Physics.Impact.Components.Collides#setCollidesNever * @since 3.0.0 * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ setCollidesNever: function () { @@ -61,7 +61,7 @@ var Collides = { * @method Phaser.Physics.Impact.Components.Collides#setLite * @since 3.0.0 * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ setLite: function () { @@ -76,7 +76,7 @@ var Collides = { * @method Phaser.Physics.Impact.Components.Collides#setPassive * @since 3.0.0 * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ setPassive: function () { @@ -91,7 +91,7 @@ var Collides = { * @method Phaser.Physics.Impact.Components.Collides#setActive * @since 3.0.0 * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ setActive: function () { @@ -106,7 +106,7 @@ var Collides = { * @method Phaser.Physics.Impact.Components.Collides#setFixed * @since 3.0.0 * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ setFixed: function () { @@ -119,7 +119,7 @@ var Collides = { * [description] * * @name Phaser.Physics.Impact.Components.Collides#collides - * @type {[type]} + * @type {number} * @since 3.0.0 */ collides: { diff --git a/src/physics/impact/components/Debug.js b/src/physics/impact/components/Debug.js index 652d05e99..267478bbb 100644 --- a/src/physics/impact/components/Debug.js +++ b/src/physics/impact/components/Debug.js @@ -18,11 +18,11 @@ var Debug = { * @method Phaser.Physics.Impact.Components.Debug#setDebug * @since 3.0.0 * - * @param {[type]} showBody - [description] - * @param {[type]} showVelocity - [description] - * @param {[type]} bodyColor - [description] + * @param {boolean} showBody - [description] + * @param {boolean} showVelocity - [description] + * @param {number} bodyColor - [description] * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ setDebug: function (showBody, showVelocity, bodyColor) { @@ -39,9 +39,9 @@ var Debug = { * @method Phaser.Physics.Impact.Components.Debug#setDebugBodyColor * @since 3.0.0 * - * @param {[type]} value - [description] + * @param {number} value - [description] * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ setDebugBodyColor: function (value) { @@ -54,7 +54,7 @@ var Debug = { * [description] * * @name Phaser.Physics.Impact.Components.Debug#debugShowBody - * @type {[type]} + * @type {boolean} * @since 3.0.0 */ debugShowBody: { @@ -75,7 +75,7 @@ var Debug = { * [description] * * @name Phaser.Physics.Impact.Components.Debug#debugShowVelocity - * @type {[type]} + * @type {boolean} * @since 3.0.0 */ debugShowVelocity: { @@ -96,7 +96,7 @@ var Debug = { * [description] * * @name Phaser.Physics.Impact.Components.Debug#debugBodyColor - * @type {[type]} + * @type {number} * @since 3.0.0 */ debugBodyColor: { diff --git a/src/physics/impact/components/Friction.js b/src/physics/impact/components/Friction.js index 0d681d143..24f50501e 100644 --- a/src/physics/impact/components/Friction.js +++ b/src/physics/impact/components/Friction.js @@ -18,9 +18,9 @@ var Friction = { * @method Phaser.Physics.Impact.Components.Friction#setFrictionX * @since 3.0.0 * - * @param {[type]} x - [description] + * @param {number} x - [description] * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ setFrictionX: function (x) { @@ -35,9 +35,9 @@ var Friction = { * @method Phaser.Physics.Impact.Components.Friction#setFrictionY * @since 3.0.0 * - * @param {[type]} y - [description] + * @param {number} y - [description] * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ setFrictionY: function (y) { @@ -52,10 +52,10 @@ var Friction = { * @method Phaser.Physics.Impact.Components.Friction#setFriction * @since 3.0.0 * - * @param {[type]} x - [description] - * @param {[type]} y - [description] + * @param {number} x - [description] + * @param {number} y - [description] * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ setFriction: function (x, y) { diff --git a/src/physics/impact/components/Gravity.js b/src/physics/impact/components/Gravity.js index cb99193b2..ae5e34444 100644 --- a/src/physics/impact/components/Gravity.js +++ b/src/physics/impact/components/Gravity.js @@ -18,9 +18,9 @@ var Gravity = { * @method Phaser.Physics.Impact.Components.Gravity#setGravity * @since 3.0.0 * - * @param {[type]} value - [description] + * @param {number} value - [description] * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ setGravity: function (value) { @@ -33,7 +33,7 @@ var Gravity = { * [description] * * @name Phaser.Physics.Impact.Components.Gravity#gravity - * @type {[type]} + * @type {number} * @since 3.0.0 */ gravity: { diff --git a/src/physics/impact/components/Offset.js b/src/physics/impact/components/Offset.js index aafbf152d..2c1329c23 100644 --- a/src/physics/impact/components/Offset.js +++ b/src/physics/impact/components/Offset.js @@ -18,12 +18,12 @@ var Offset = { * @method Phaser.Physics.Impact.Components.Offset#setOffset * @since 3.0.0 * - * @param {[type]} x - [description] - * @param {[type]} y - [description] - * @param {[type]} width - [description] - * @param {[type]} height - [description] + * @param {number} x - [description] + * @param {number} y - [description] + * @param {number} [width] - [description] + * @param {number} [height] - [description] * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ setOffset: function (x, y, width, height) { diff --git a/src/physics/impact/components/SetGameObject.js b/src/physics/impact/components/SetGameObject.js index 3a32e03a9..1fcb1b9c1 100644 --- a/src/physics/impact/components/SetGameObject.js +++ b/src/physics/impact/components/SetGameObject.js @@ -18,10 +18,10 @@ var SetGameObject = { * @method Phaser.Physics.Impact.Components.SetGameObject#setGameObject * @since 3.0.0 * - * @param {[type]} gameObject - [description] - * @param {[type]} sync - [description] + * @param {Phaser.GameObjects.GameObject} gameObject - [description] + * @param {boolean} [sync=true] - [description] * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ setGameObject: function (gameObject, sync) { @@ -50,7 +50,7 @@ var SetGameObject = { * @method Phaser.Physics.Impact.Components.SetGameObject#syncGameObject * @since 3.0.0 * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ syncGameObject: function () { diff --git a/src/physics/impact/components/Velocity.js b/src/physics/impact/components/Velocity.js index 83f615b21..551d2c5c0 100644 --- a/src/physics/impact/components/Velocity.js +++ b/src/physics/impact/components/Velocity.js @@ -18,9 +18,9 @@ var Velocity = { * @method Phaser.Physics.Impact.Components.Velocity#setVelocityX * @since 3.0.0 * - * @param {[type]} x - [description] + * @param {number} x - [description] * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ setVelocityX: function (x) { @@ -35,9 +35,9 @@ var Velocity = { * @method Phaser.Physics.Impact.Components.Velocity#setVelocityY * @since 3.0.0 * - * @param {[type]} y - [description] + * @param {number} y - [description] * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ setVelocityY: function (y) { @@ -52,10 +52,10 @@ var Velocity = { * @method Phaser.Physics.Impact.Components.Velocity#setVelocity * @since 3.0.0 * - * @param {[type]} x - [description] - * @param {[type]} y - [description] + * @param {number} x - [description] + * @param {number} [y=x] - [description] * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ setVelocity: function (x, y) { @@ -73,10 +73,10 @@ var Velocity = { * @method Phaser.Physics.Impact.Components.Velocity#setMaxVelocity * @since 3.0.0 * - * @param {[type]} x - [description] - * @param {[type]} y - [description] + * @param {number} x - [description] + * @param {number} [y=x] - [description] * - * @return {[type]} [description] + * @return {Phaser.GameObjects.GameObject} This Game Object. */ setMaxVelocity: function (x, y) { diff --git a/src/physics/impact/components/index.js b/src/physics/impact/components/index.js index 877426add..dd14ca7c9 100644 --- a/src/physics/impact/components/index.js +++ b/src/physics/impact/components/index.js @@ -4,7 +4,9 @@ * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -// Phaser.Physics.Impact.Body.Components +/** + * @namespace Phaser.Physics.Impact.Body.Components + */ module.exports = { diff --git a/src/physics/impact/index.js b/src/physics/impact/index.js index a32bf3589..134886ad3 100644 --- a/src/physics/impact/index.js +++ b/src/physics/impact/index.js @@ -8,18 +8,17 @@ * An Impact.js compatible physics world, body and solver, for those who are used * to the Impact way of defining and controlling physics bodies. Also works with * the new Loader support for Weltmeister map data. - * + * * World updated to run off the Phaser main loop. * Body extended to support additional setter functions. - * + * * To create the map data you'll need Weltmeister, which comes with Impact * and can be purchased from http://impactjs.com - * + * * My thanks to Dominic Szablewski for his permission to support Impact in Phaser. - * + * * @namespace Phaser.Physics.Impact */ - module.exports = { Body: require('./Body'), @@ -32,5 +31,5 @@ module.exports = { Sprite: require('./ImpactSprite'), TYPE: require('./TYPE'), World: require('./World') - + };