|
| 1 | +/** |
| 2 | + * @typedef {object} Phaser.Types.Tweens.TweenBuilderConfig |
| 3 | + * @since 3.18.0 |
| 4 | + * |
| 5 | + * @property {any} targets - The object, or an array of objects, to run the tween on. |
| 6 | + * @property {number} [delay=0] - The number of milliseconds to delay before the tween will start. |
| 7 | + * @property {number} [duration=1000] - The duration of the tween in milliseconds. |
| 8 | + * @property {string} [ease='Power0'] - The easing equation to use for the tween. |
| 9 | + * @property {array} [easeParams] - Optional easing parameters. |
| 10 | + * @property {number} [hold=0] - The number of milliseconds to hold the tween for before yoyo'ing. |
| 11 | + * @property {number} [repeat=0] - The number of times each property tween repeats. |
| 12 | + * @property {number} [repeatDelay=0] - The number of milliseconds to pause before a repeat. |
| 13 | + * @property {boolean} [yoyo=false] - Should the tween complete, then reverse the values incrementally to get back to the starting tween values? The reverse tweening will also take `duration` milliseconds to complete. |
| 14 | + * @property {boolean} [flipX=false] - Horizontally flip the target of the Tween when it completes (before it yoyos, if set to do so). Only works for targets that support the `flipX` property. |
| 15 | + * @property {boolean} [flipY=false] - Vertically flip the target of the Tween when it completes (before it yoyos, if set to do so). Only works for targets that support the `flipY` property. |
| 16 | + * @property {number|function|object|array} [offset=null] - Used when the Tween is part of a Timeline. |
| 17 | + * @property {number|function|object|array} [completeDelay=0] - The time the tween will wait before the onComplete event is dispatched once it has completed, in ms. |
| 18 | + * @property {number|function|object|array} [loop=0] - The number of times the tween will repeat. (A value of 1 means the tween will play twice, as it repeated once.) The first loop starts after every property tween has completed once. |
| 19 | + * @property {number|function|object|array} [loopDelay=0] - The time the tween will pause before starting either a yoyo or returning to the start for a repeat. |
| 20 | + * @property {boolean} [paused=false] - Does the tween start in a paused state (true) or playing (false)? |
| 21 | + * @property {object} [props] - The properties to tween. |
| 22 | + * @property {boolean} [useFrames=false] - Use frames or milliseconds? |
| 23 | + * @property {any} [callbackScope] - Scope (this) for the callbacks. The default scope is the tween. |
| 24 | + * @property {Phaser.Types.Tweens.TweenOnCompleteCallback} [onComplete] - A function to call when the tween completes. |
| 25 | + * @property {array} [onCompleteParams] - Additional parameters to pass to `onComplete`. |
| 26 | + * @property {any} [onCompleteScope] - Scope (this) for `onComplete`. |
| 27 | + * @property {Phaser.Types.Tweens.TweenOnLoopCallback} [onLoop] - A function to call each time the tween loops. |
| 28 | + * @property {array} [onLoopParams] - Additional parameters to pass to `onLoop`. |
| 29 | + * @property {any} [onLoopScope] - Scope (this) for `onLoop`. |
| 30 | + * @property {Phaser.Types.Tweens.TweenOnRepeatCallback} [onRepeat] - A function to call each time the tween repeats. Called once per property per target. |
| 31 | + * @property {array} [onRepeatParams] - Additional parameters to pass to `onRepeat`. |
| 32 | + * @property {any} [onRepeatScope] - Scope (this) for `onRepeat`. |
| 33 | + * @property {Phaser.Types.Tweens.TweenOnStartCallback} [onStart] - A function to call when the tween starts. |
| 34 | + * @property {array} [onStartParams] - Additional parameters to pass to `onStart`. |
| 35 | + * @property {any} [onStartScope] - Scope (this) for `onStart`. |
| 36 | + * @property {Phaser.Types.Tweens.TweenOnUpdateCallback} [onUpdate] - A function to call each time the tween steps. Called once per property per target. |
| 37 | + * @property {array} [onUpdateParams] - Additional parameters to pass to `onUpdate`. |
| 38 | + * @property {any} [onUpdateScope] - Scope (this) for `onUpdate`. |
| 39 | + * @property {Phaser.Types.Tweens.TweenOnYoyoCallback} [onYoyo] - A function to call each time the tween yoyos. Called once per property per target. |
| 40 | + * @property {array} [onYoyoParams] - Additional parameters to pass to `onYoyo`. |
| 41 | + * @property {any} [onYoyoScope] - Scope (this) for `onYoyo`. |
| 42 | + * |
| 43 | + * @example |
| 44 | + * { |
| 45 | + * targets: null, |
| 46 | + * delay: 0, |
| 47 | + * duration: 1000, |
| 48 | + * ease: 'Power0', |
| 49 | + * easeParams: null, |
| 50 | + * hold: 0, |
| 51 | + * repeat: 0, |
| 52 | + * repeatDelay: 0, |
| 53 | + * yoyo: false, |
| 54 | + * flipX: false, |
| 55 | + * flipY: false |
| 56 | + * }; |
| 57 | + */ |
0 commit comments