Handling of repeats with browser tab sleep
Related Issues
#557 When the browser tab sleeps, the delay of repeated tweens is not keep
Purpose of this Pull Request
This fixes handling of repeats.
Details of the changes
When interval for TWEEN.update() is more than one repeat
- Continuous elapsed
- Multiple
tween._repeatsubtractions
Thanks for doing this! Will review it soon.
Merged! All existing tests pass, plus the new tests pass, so this is an improvement even if we know it is not working with all features.
What we should do now is start to prevent more complexity, and next we should focus on simplifying, and then Timeline.
Ah shoot, I'm doing some manual testing, and the 13_relative_start_time example broke. Will revert. But I think 13_relative_start_time will provides some clues as to what is missing
Hmmm, actually, the 13_relative_start_time example uses .delay(-500). It is not intuitive what "delay negative 500" means, and the improvement of this PR is a lot more significant.
I'm going to change that example so it only uses positive values, "remove" the undocumented "feature", and keep the change from this PR because it is more valuable. The next release will be a major version bump.
Released in v23.0.0