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
(sorry im not getting the list to fill out, ill just fill in the issue as best as i can)
[OS]
Win10
[Phaser version]
3.60.0-beta.9
[Trivia]
calling killTweensOf(target) on a target on which tween has been recently created (set to paused:false [or default eg 'not set']) does not stop said tween and rather the 'tween runs anyways'.
I can also confirm, that keeping an instance of created tween and calling myTween.stop() does stop the tween properly, but in my use-case keeping an instance is not preferable.
[Suggestion]
Reading the docs, on the surface it seems the tween should be stopped (bug herein reported), but also flagged to be removed from TweenManager, but the removal happens 'start of next frame'. I wonder if this could interfere with trying to use the same tween in the same frame (possibly from elsewhere) right after the kill, or some other such edge cases (using the reference in the same frame for 'reasons' eg 'other code not knowing that the kill happened and the reference shouldnt be used until next frame' or other). I wonder, would having a 'removeImmediately' flag to remove the tween from TM instantly (synchronously) help to alleviate such edge cases (whilst incurring perf overhead-which might be preferable)? Just worrying a bit about delayed cleanup whils some code that executes in current frame might want to use/create new of same instance, which is not fully collected (maybe i'm overthinking it).
[Possibly related]
(1) Issue: #6169
(2) might also affect myScene.tweens.addCounter (UNTESTED) and should be solved-for there as well.
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.
(sorry im not getting the list to fill out, ill just fill in the issue as best as i can)
[OS]
Win10
[Phaser version]
3.60.0-beta.9
[Trivia]
calling killTweensOf(target) on a target on which tween has been recently created (set to paused:false [or default eg 'not set']) does not stop said tween and rather the 'tween runs anyways'.
[Code to repro]
go to labs example:
https://labs.phaser.io/edit.html?src=src/tweens/immediate%20stop%20a%20tween.js&v=3.55.2
Copy paste following code and replace create() function in labs example:
I can also confirm, that keeping an instance of created tween and calling
myTween.stop()
does stop the tween properly, but in my use-case keeping an instance is not preferable.[Suggestion]
Reading the docs, on the surface it seems the tween should be stopped (bug herein reported), but also flagged to be removed from TweenManager, but the removal happens 'start of next frame'. I wonder if this could interfere with trying to use the same tween in the same frame (possibly from elsewhere) right after the kill, or some other such edge cases (using the reference in the same frame for 'reasons' eg 'other code not knowing that the kill happened and the reference shouldnt be used until next frame' or other). I wonder, would having a 'removeImmediately' flag to remove the tween from TM instantly (synchronously) help to alleviate such edge cases (whilst incurring perf overhead-which might be preferable)? Just worrying a bit about delayed cleanup whils some code that executes in current frame might want to use/create new of same instance, which is not fully collected (maybe i'm overthinking it).
[Possibly related]
(1) Issue: #6169
(2) might also affect myScene.tweens.addCounter (UNTESTED) and should be solved-for there as well.
The text was updated successfully, but these errors were encountered: