|
4 | 4 | * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} |
5 | 5 | */ |
6 | 6 |
|
| 7 | +/** |
| 8 | + * @typedef {object} TweenDataGenConfig |
| 9 | + * |
| 10 | + * @property {function} delay - [description] |
| 11 | + * @property {function} duration - [description] |
| 12 | + * @property {function} hold - [description] |
| 13 | + * @property {function} repeat - [description] |
| 14 | + * @property {function} repeatDelay - [description] |
| 15 | + */ |
| 16 | + |
| 17 | +/** |
| 18 | + * @typedef {object} Phaser.Tweens.TweenDataConfig |
| 19 | + * |
| 20 | + * @property {object} target - The target to tween. |
| 21 | + * @property {string} key - The property of the target being tweened. |
| 22 | + * @property {function} getEndValue - The returned value sets what the property will be at the END of the Tween. |
| 23 | + * @property {function} getStartValue - The returned value sets what the property will be at the START of the Tween. |
| 24 | + * @property {function} ease - The ease function this tween uses. |
| 25 | + * @property {number} [duration=0] - Duration of the tween in ms/frames, excludes time for yoyo or repeats. |
| 26 | + * @property {number} [totalDuration=0] - The total calculated duration of this TweenData (based on duration, repeat, delay and yoyo) |
| 27 | + * @property {number} [delay=0] - Time in ms/frames before tween will start. |
| 28 | + * @property {boolean} [yoyo=false] - Cause the tween to return back to its start value after hold has expired. |
| 29 | + * @property {number} [hold=0] - Time in ms/frames the tween will pause before running the yoyo or starting a repeat. |
| 30 | + * @property {integer} [repeat=0] - Number of times to repeat the tween. The tween will always run once regardless, so a repeat value of '1' will play the tween twice. |
| 31 | + * @property {number} [repeatDelay=0] - Time in ms/frames before the repeat will start. |
| 32 | + * @property {boolean} [flipX=false] - Automatically call toggleFlipX when the TweenData yoyos or repeats |
| 33 | + * @property {boolean} [flipY=false] - Automatically call toggleFlipY when the TweenData yoyos or repeats |
| 34 | + * @property {float} [progress=0] - Between 0 and 1 showing completion of this TweenData. |
| 35 | + * @property {float} [elapsed=0] - Delta counter |
| 36 | + * @property {integer} [repeatCounter=0] - How many repeats are left to run? |
| 37 | + * @property {number} [start=0] - Ease value data. |
| 38 | + * @property {number} [current=0] - Ease value data. |
| 39 | + * @property {number} [end=0] - Ease value data. |
| 40 | + * @property {number} [t1=0] - Time duration 1. |
| 41 | + * @property {number} [t2=0] - Time duration 2. |
| 42 | + * @property {TweenDataGenConfig} [gen] - LoadValue generation functions. |
| 43 | + * @property {integer} [state=0] - TWEEN_CONST.CREATED |
| 44 | + */ |
| 45 | + |
7 | 46 | /** |
8 | 47 | * [description] |
9 | 48 | * |
|
24 | 63 | * @param {boolean} flipX - [description] |
25 | 64 | * @param {boolean} flipY - [description] |
26 | 65 | * |
27 | | - * @return {Phaser.Tweens.TweenData} [description] |
| 66 | + * @return {TweenDataConfig} [description] |
28 | 67 | */ |
29 | 68 | var TweenData = function (target, key, getEnd, getStart, ease, delay, duration, yoyo, hold, repeat, repeatDelay, flipX, flipY) |
30 | 69 | { |
|
0 commit comments