-
Notifications
You must be signed in to change notification settings - Fork 7.1k
/
Defaults.js
42 lines (39 loc) · 2.05 KB
/
Defaults.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/**
* @author Richard Davey <rich@phaser.io>
* @copyright 2013-2024 Phaser Studio Inc.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
/**
* @typedef {object} Phaser.Types.Tweens.TweenConfigDefaults
* @since 3.0.0
*
* @property {(object|object[])} targets - The object, or an array of objects, to run the tween on.
* @property {number} [delay=0] - The number of milliseconds to delay before the tween will start.
* @property {number} [duration=1000] - The duration of the tween in milliseconds.
* @property {string} [ease='Power0'] - The easing equation to use for the tween.
* @property {array} [easeParams] - Optional easing parameters.
* @property {number} [hold=0] - The number of milliseconds to hold the tween for before yoyo'ing.
* @property {number} [repeat=0] - The number of times to repeat the tween.
* @property {number} [repeatDelay=0] - The number of milliseconds to pause before a tween will repeat.
* @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.
* @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.
* @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.
* @property {boolean} [persist=false] - Retain the tween within the Tween Manager, even after playback completes?
* @property {function} [interpolation=null] - The interpolation function to use for array-based tween values.
*/
var TWEEN_DEFAULTS = {
targets: null,
delay: 0,
duration: 1000,
ease: 'Power0',
easeParams: null,
hold: 0,
repeat: 0,
repeatDelay: 0,
yoyo: false,
flipX: false,
flipY: false,
persist: false,
interpolation: null
};
module.exports = TWEEN_DEFAULTS;