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
tween._transitionHasCompleted is set to false (unnecessarily, I think; the default nil would already do the same job), but never to true, in particular in the if part just above. I think the cases where this flag is tested might actually be okay, since the tween has already been added to the completed listeners and then quickly evicted, but I'm not certain.
Since I figured at this point the library details will be, at best, slow to change, I wrote some predicates making use of internal members: IsCancelled(), IsCompleted(), etc. That's where I ran afoul of this. 😃 In an earlier iteration of these APIs I was using the onComplete handler and friends, piggybacking any user-provided listeners atop them if needed; however, doing so artificially limited the logic to transitions launched by my own wrappers, and this even affected other utilities in the same module.
Lacking a proper _transitionHasCompleted, my current fallback is "not paused, and the time has elapsed?", basically mirroring the logic in the library. This will be very slightly off the event.time used internally, so occasionally will be a frame off, but it's probably not so bad.
Anyhow, I'd submit a PR if this were urgent, but I mostly wanted to mention it. Maybe adding some predicates like I described, officially, would be a decent idea? (I have similar stuff for timers, though without problems there.)
The text was updated successfully, but these errors were encountered:
A weird issue here.
tween._transitionHasCompleted
is set to false (unnecessarily, I think; the default nil would already do the same job), but never to true, in particular in theif
part just above. I think the cases where this flag is tested might actually be okay, since the tween has already been added to the completed listeners and then quickly evicted, but I'm not certain.Since I figured at this point the library details will be, at best, slow to change, I wrote some predicates making use of internal members:
IsCancelled()
,IsCompleted()
, etc. That's where I ran afoul of this. 😃 In an earlier iteration of these APIs I was using theonComplete
handler and friends, piggybacking any user-provided listeners atop them if needed; however, doing so artificially limited the logic to transitions launched by my own wrappers, and this even affected other utilities in the same module.Lacking a proper
_transitionHasCompleted
, my current fallback is "not paused, and the time has elapsed?", basically mirroring the logic in the library. This will be very slightly off theevent.time
used internally, so occasionally will be a frame off, but it's probably not so bad.Anyhow, I'd submit a PR if this were urgent, but I mostly wanted to mention it. Maybe adding some predicates like I described, officially, would be a decent idea? (I have similar stuff for timers, though without problems there.)
The text was updated successfully, but these errors were encountered: