This commit is contained in:
Richard Davey 2018-06-21 14:03:35 +01:00
commit 583d464230
3 changed files with 65 additions and 50 deletions

View file

@ -100,7 +100,7 @@ var Wrap = require('../../math/Wrap');
* @since 3.0.0
*
* @param {ParticleEmitterConfig} config - Settings for the Particle Emitter that owns this property.
* @param {string} key - The key of the Particle Emitter property.
* @param {string} key - The name of the Particle Emitter property.
* @param {number} defaultValue - The default value of the Particle Emitter property.
* @param {boolean} [emitOnly=false] - [description]
*/
@ -116,7 +116,7 @@ var EmitterOp = new Class({
}
/**
* The key of this property.
* The name of this property.
*
* @name Phaser.GameObjects.Particles.EmitterOp#propertyKey
* @type {string}
@ -184,7 +184,7 @@ var EmitterOp = new Class({
this.end = 0;
/**
* The easing function to use for interpolating this property.
* The easing function to use for updating this property.
*
* @name Phaser.GameObjects.Particles.EmitterOp#ease
* @type {?function}
@ -280,12 +280,12 @@ var EmitterOp = new Class({
},
/**
* [description]
* Change the current value of the property and update its callback methods.
*
* @method Phaser.GameObjects.Particles.EmitterOp#onChange
* @since 3.0.0
*
* @param {number} value - [description]
* @param {number} value - The value of the property.
*
* @return {Phaser.GameObjects.Particles.EmitterOp} This Emitter Op object.
*/
@ -497,11 +497,11 @@ var EmitterOp = new Class({
* @method Phaser.GameObjects.Particles.EmitterOp#defaultEmit
* @since 3.0.0
*
* @param {Phaser.GameObjects.Particles.Particle} particle - [description]
* @param {string} key - [description]
* @param {number} value - [description]
* @param {Phaser.GameObjects.Particles.Particle} particle - The particle.
* @param {string} key - The name of the property.
* @param {number} [value] - The current value of the property.
*
* @return {number} [description]
* @return {number} The new value of hte property.
*/
defaultEmit: function (particle, key, value)
{
@ -514,12 +514,12 @@ var EmitterOp = new Class({
* @method Phaser.GameObjects.Particles.EmitterOp#defaultUpdate
* @since 3.0.0
*
* @param {Phaser.GameObjects.Particles.Particle} particle - [description]
* @param {string} key - [description]
* @param {Phaser.GameObjects.Particles.Particle} particle - The particle.
* @param {string} key - The name of the property.
* @param {number} t - The T value (between 0 and 1)
* @param {number} value - [description]
* @param {number} value - The current value of the property.
*
* @return {number} [description]
* @return {number} The new value of the property.
*/
defaultUpdate: function (particle, key, t, value)
{
@ -527,12 +527,12 @@ var EmitterOp = new Class({
},
/**
* [description]
* An `onEmit` callback that returns the current value of the property.
*
* @method Phaser.GameObjects.Particles.EmitterOp#staticValueEmit
* @since 3.0.0
*
* @return {number} [description]
* @return {number} The current value of the property.
*/
staticValueEmit: function ()
{
@ -540,12 +540,12 @@ var EmitterOp = new Class({
},
/**
* [description]
* An `onUpdate` callback that returns the current value of the property.
*
* @method Phaser.GameObjects.Particles.EmitterOp#staticValueUpdate
* @since 3.0.0
*
* @return {number} [description]
* @return {number} The current value of the property.
*/
staticValueUpdate: function ()
{
@ -553,12 +553,12 @@ var EmitterOp = new Class({
},
/**
* [description]
* An `onEmit` callback that returns a random value from the current value array.
*
* @method Phaser.GameObjects.Particles.EmitterOp#randomStaticValueEmit
* @since 3.0.0
*
* @return {number} [description]
* @return {number} The new value of the property.
*/
randomStaticValueEmit: function ()
{
@ -568,15 +568,16 @@ var EmitterOp = new Class({
},
/**
* [description]
* An `onEmit` callback that returns a value between the {@link Phaser.GameObjects.Particles.EmitterOp#start} and
* {@link Phaser.GameObjects.Particles.EmitterOp#end} range.
*
* @method Phaser.GameObjects.Particles.EmitterOp#randomRangedValueEmit
* @since 3.0.0
*
* @param {Phaser.GameObjects.Particles.Particle} particle - [description]
* @param {string} key - [description]
* @param {Phaser.GameObjects.Particles.Particle} particle - The particle.
* @param {string} key - The key of the property.
*
* @return {number} [description]
* @return {number} The new value of the property.
*/
randomRangedValueEmit: function (particle, key)
{
@ -591,12 +592,14 @@ var EmitterOp = new Class({
},
/**
* [description]
* An `onEmit` callback that returns a stepped value between the
* {@link Phaser.GameObjects.Particles.EmitterOp#start} and {@link Phaser.GameObjects.Particles.EmitterOp#end}
* range.
*
* @method Phaser.GameObjects.Particles.EmitterOp#steppedEmit
* @since 3.0.0
*
* @return {number} [description]
* @return {number} The new value of the property.
*/
steppedEmit: function ()
{
@ -610,15 +613,17 @@ var EmitterOp = new Class({
},
/**
* [description]
* An `onEmit` callback that returns an eased value between the
* {@link Phaser.GameObjects.Particles.EmitterOp#start} and {@link Phaser.GameObjects.Particles.EmitterOp#end}
* range.
*
* @method Phaser.GameObjects.Particles.EmitterOp#easedValueEmit
* @since 3.0.0
*
* @param {Phaser.GameObjects.Particles.Particle} particle - [description]
* @param {string} key - [description]
* @param {Phaser.GameObjects.Particles.Particle} particle - The particle.
* @param {string} key - The name of the property.
*
* @return {number} [description]
* @return {number} The new value of the property.
*/
easedValueEmit: function (particle, key)
{
@ -634,16 +639,18 @@ var EmitterOp = new Class({
},
/**
* [description]
* An `onUpdate` callback that returns an eased value between the
* {@link Phaser.GameObjects.Particles.EmitterOp#start} and {@link Phaser.GameObjects.Particles.EmitterOp#end}
* range.
*
* @method Phaser.GameObjects.Particles.EmitterOp#easeValueUpdate
* @since 3.0.0
*
* @param {Phaser.GameObjects.Particles.Particle} particle - [description]
* @param {string} key - [description]
* @param {float} t - The T value (between 0 and 1)
* @param {Phaser.GameObjects.Particles.Particle} particle - The particle.
* @param {string} key - The name of the property.
* @param {number} t - The T value (between 0 and 1)
*
* @return {number} [description]
* @return {number} The new value of the property.
*/
easeValueUpdate: function (particle, key, t)
{

View file

@ -13,14 +13,16 @@ var TWEEN_CONST = require('../../tweens/tween/const');
var Vector2 = require('../../math/Vector2');
/**
* Settings for a PathFollower.
*
* @typedef {object} PathConfig
*
* @property {number} duration - [description]
* @property {number} from - [description]
* @property {number} to - [description]
* @property {boolean} [positionOnPath=false] - [description]
* @property {boolean} [rotateToPath=false] - [description]
* @property {number} [rotationOffset=0] - [description]
* @property {number} duration - The duration of the path follow.
* @property {number} from - The start position of the path follow, between 0 and 1.
* @property {number} to - The end position of the path follow, between 0 and 1.
* @property {boolean} [positionOnPath=false] - Whether to position the PathFollower on the Path using its path offset.
* @property {boolean} [rotateToPath=false] - Should the PathFollower automatically rotate to point in the direction of the Path?
* @property {number} [rotationOffset=0] - If the PathFollower is rotating to match the Path, this value is added to the rotation value. This allows you to rotate objects to a path but control the angle of the rotation as well.
* @property {boolean} [verticalAdjust=false] - [description]
*/
@ -121,7 +123,7 @@ var PathFollower = new Class({
this.pathVector = new Vector2();
/**
* [description]
* The Tween used for following the Path.
*
* @name Phaser.GameObjects.PathFollower#pathTween
* @type {Phaser.Tweens.Tween}
@ -130,7 +132,7 @@ var PathFollower = new Class({
this.pathTween;
/**
* [description]
* Settings for the PathFollower.
*
* @name Phaser.GameObjects.PathFollower#pathConfig
* @type {?PathConfig}
@ -151,13 +153,15 @@ var PathFollower = new Class({
},
/**
* [description]
* Set the Path that this PathFollower should follow.
*
* Optionally accepts {@link PathConfig} settings.
*
* @method Phaser.GameObjects.PathFollower#setPath
* @since 3.0.0
*
* @param {Phaser.Curves.Path} path - The Path this PathFollower is following. It can only follow one Path at a time.
* @param {PathConfig} [config] - [description]
* @param {PathConfig} [config] - Settings for the PathFollower.
*
* @return {Phaser.GameObjects.PathFollower} This Game Object.
*/
@ -183,12 +187,12 @@ var PathFollower = new Class({
},
/**
* [description]
* Set whether the PathFollower should automatically rotate to point in the direction of the Path.
*
* @method Phaser.GameObjects.PathFollower#setRotateToPath
* @since 3.0.0
*
* @param {number} value - [description]
* @param {boolean} value - Whether the PathFollower should automatically rotate to point in the direction of the Path.
* @param {number} [offset=0] - Rotation offset in degrees.
* @param {boolean} [verticalAdjust=false] - [description]
*
@ -209,6 +213,7 @@ var PathFollower = new Class({
/**
* Is this PathFollower actively following a Path or not?
*
* To be considered as `isFollowing` it must be currently moving on a Path, and not paused.
*
* @method Phaser.GameObjects.PathFollower#isFollowing
@ -229,8 +234,8 @@ var PathFollower = new Class({
* @method Phaser.GameObjects.PathFollower#startFollow
* @since 3.3.0
*
* @param {(number|PathConfig)} [config={}] - [description]
* @param {number} [startAt=0] - [description]
* @param {(number|PathConfig)} [config={}] - The duration of the follow, or a PathFollower config object.
* @param {number} [startAt=0] - Optional start position of the follow, between 0 and 1.
*
* @return {Phaser.GameObjects.PathFollower} This Game Object.
*/
@ -315,6 +320,7 @@ var PathFollower = new Class({
/**
* Resumes a previously paused PathFollower.
*
* If the PathFollower was not paused this has no effect.
*
* @method Phaser.GameObjects.PathFollower#resumeFollow
@ -336,6 +342,7 @@ var PathFollower = new Class({
/**
* Stops this PathFollower from following the path any longer.
*
* This will invoke any 'stop' conditions that may exist on the Path, or for the follower.
*
* @method Phaser.GameObjects.PathFollower#stopFollow
@ -357,6 +364,7 @@ var PathFollower = new Class({
/**
* Internal update handler that advances this PathFollower along the path.
*
* Called automatically by the Scene step, should not typically be called directly.
*
* @method Phaser.GameObjects.PathFollower#preUpdate

View file

@ -31,8 +31,8 @@
* @property {number} [repeatDelay=0] - Time in ms/frames before the repeat will start.
* @property {boolean} [flipX=false] - Automatically call toggleFlipX when the TweenData yoyos or repeats
* @property {boolean} [flipY=false] - Automatically call toggleFlipY when the TweenData yoyos or repeats
* @property {float} [progress=0] - Between 0 and 1 showing completion of this TweenData.
* @property {float} [elapsed=0] - Delta counter
* @property {number} [progress=0] - Between 0 and 1 showing completion of this TweenData.
* @property {number} [elapsed=0] - Delta counter
* @property {integer} [repeatCounter=0] - How many repeats are left to run?
* @property {number} [start=0] - Ease value data.
* @property {number} [current=0] - Ease value data.