Skip to content

Commit 435ff9a

Browse files
authored
Merge pull request phaserjs#2664 from jayrobin/fix-fractional-anim-speed
Allow animation speed greater than 0
2 parents 63ce6ae + 118d205 commit 435ff9a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/animation/Animation.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -768,19 +768,19 @@ Object.defineProperty(Phaser.Animation.prototype, 'frame', {
768768

769769
/**
770770
* @name Phaser.Animation#speed
771-
* @property {number} speed - Gets or sets the current speed of the animation in frames per second. Changing this in a playing animation will take effect from the next frame. Minimum value is 1.
771+
* @property {number} speed - Gets or sets the current speed of the animation in frames per second. Changing this in a playing animation will take effect from the next frame. Value must be greater than 0.
772772
*/
773773
Object.defineProperty(Phaser.Animation.prototype, 'speed', {
774774

775775
get: function () {
776776

777-
return Math.round(1000 / this.delay);
777+
return 1000 / this.delay;
778778

779779
},
780780

781781
set: function (value) {
782782

783-
if (value >= 1)
783+
if (value > 0)
784784
{
785785
this.delay = 1000 / value;
786786
}

0 commit comments

Comments
 (0)