Timeline looping breaking in minified v.3.21

I believe I found a bug and I’d be more than happy to report it and contribute to its fix, but I wanted to make sure I wasn’t just going crazy or that it’s not known first.

I have a class called Enemy that extends another called Entity that extends Phaser.GameObject.Sprite. I am adding a timeline in Enemy that houses a finite but arbitrarily sized number of tween objects that follow a specific pattern. Here’s how I am using it:

const timeline = this.scene.tweens.timeline({
	loop: -1,
	duration: 3000,
	tweens: [{
		targets: { val: 0 },
		val: 1,
		yoyo: false,
		ease: "Linear",
		callbackScope: this,
		onStart: () => { this.setX(initialPosition.x); this.setY(initialPosition.y); },
		onUpdate: this.move,
	}],
});

This code works perfectly as intended when I use phaser.js, the full development version built by webpack and downloaded from the site. It does an odd thing similar to this issue from earlier this year, where the infinite loop is not being respected and the second time my tween occurs it’s going twice as fast. Am I just missing something or did I come across a bug?

Which Phaser version shows in the browser console?

1 Like

Oh dang:

Phaser v3.17.0 (WebGL | Web Audio) https://phaser.io

There’s my answer. I’m glad I posted here sooner! Thank you, @samme!