Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure out what to do in tick when tween is completed via set_{elapsed,progress} #43

Open
SUPERCILEX opened this issue Aug 4, 2022 · 3 comments
Labels
design A design remark or improvement

Comments

@SUPERCILEX
Copy link
Contributor

Currently we'll block you from updating the underlying structure if the tween is complete, but we should probably remove that optimization or keep track of whether or not the underlying was updated and perform the update even if the tween is completed.

@djeedai
Copy link
Owner

djeedai commented Aug 10, 2022

What does that mean exactly? Are you saying that when the tweenable completes, we can't use tick() anymore (fine, probably)? Or that the last tick that completes the tweenable does not apply its changes to the underlying object (component/asset), which would be a bug?

@SUPERCILEX
Copy link
Contributor Author

SUPERCILEX commented Aug 10, 2022

Are you saying that when the tweenable completes, we can't use tick() anymore (fine, probably)?

Yes, pretty much. This behavior has been around for as long as I can tell, but it feels wrong. Here's some pseudo code:

let transform;
let tween = from transform;
tween.set_elapsed MAX OR tween.set_progress 1. // Complete the tween somehow
tween.tick

// transform is not updated

If this is the desired behavior, we should document it. Though I feel like the transform should be updated.

@djeedai
Copy link
Owner

djeedai commented Aug 18, 2022

Ah right, in that case indeed it's bad the transform doesn't get updated

@djeedai djeedai added the design A design remark or improvement label Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design A design remark or improvement
Projects
None yet
Development

No branches or pull requests

2 participants