.repeatForever() appears to be damaged. The tween embed inside it doesn’t run. If I have been to substitute it with .repeat() it really works positive.
this.button.setScale(0, 0, 0);
tween(this.button)
.to(0.25, { scale: new Vec3(1, 1, 1) }, { easing: 'sineIn' })
.repeatForever(
tween()
.to(0.5, { scale: new Vec3(1.1, 1.1, 1.1) }, { easing: 'backIn' })
.to(0.5, { scale: new Vec3(0.9, 0.9, 0.9) }, { easing: 'backOut' })
)
.begin();
I’ve connected the undertaking information for reproducing.
repeat-bug.zip (1.9 MB)
begin() {
this.button.setScale(0, 0, 0);
tween(this.button)
.to(0.25, { scale: new Vec3(1, 1, 1) }, { easing: 'sineIn' })
.name(() => {
tween(this.button)
.sequence(
tween().to(0.5, { scale: new Vec3(1.1, 1.1, 1.1) }, { easing: 'backIn' }),
tween().to(0.5, { scale: new Vec3(0.9, 0.9, 0.9) }, { easing: 'backOut' })
)
.repeatForever()
.begin();
})
.begin();
}
You should use it like this