We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
BaseTweenData.duration
1 parent c8219a3 commit 1bcdc87Copy full SHA for 1bcdc87
src/tweens/tween/BaseTweenData.js
@@ -66,13 +66,14 @@ var BaseTweenData = new Class({
66
67
/**
68
* The duration of the tween in milliseconds, excluding any time required
69
- * for yoyo or repeats.
+ * for yoyo or repeats. A tween can never have a duration of zero, so this
70
+ * will be set to 0.01 if the value is incorrectly less than or equal to zero.
71
*
72
* @name Phaser.Tweens.BaseTweenData#duration
73
* @type {number}
74
* @since 3.60.0
75
*/
- this.duration = duration;
76
+ this.duration = (duration <= 0) ? 0.01 : duration;
77
78
79
* The total calculated duration, in milliseconds, of this TweenData.
0 commit comments