You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var config = {
type: Phaser.AUTO,
width: 800,
height: 600,
parent: 'phaser-example',
scene: {
preload: preload,
create: create,
}
};
var game = new Phaser.Game(config);
function preload () {
this.load.image('block', 'assets/sprites/block.png');
}
function create () {
var image = this.add.image(200, 300, 'block');
this.tweens.add({
targets: image,
x: 300,
duration: 0
});
}
Change the duration to anything greater than 0, and it works - but when duration is 0, the sprite just disappears instead. I'd expect it to just jump to the end of the tween instantly if the duration is 0.
The text was updated successfully, but these errors were encountered:
Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.
Version
Description
When a tween's duration is 0, the object being animated disappears.
Example Test Code
Using https://labs.phaser.io/edit.html
Change the duration to anything greater than 0, and it works - but when duration is 0, the sprite just disappears instead. I'd expect it to just jump to the end of the tween instantly if the duration is 0.
The text was updated successfully, but these errors were encountered: