[bug] calling tween.stop() does not cause tween.update() to return false
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 10.1k
- Forks
- 1.4k
- PR merge metrics
- No merged PRs in 30d
Description
Calling tween.stop() should stop the tween, and a following tween.update(time) (f.e. in an animation frame) should return false so that the return value is reliable for exiting the animation loop. Currently this will fail:
function loop(time) {
const keepGoing = tween.update(time)
if (keepGoing) requestAnimationFrame(loop)
}
loop(performance.now())
// ... later, before the animation is finished ...
tween.stop() // Does not cause the loop to stop, the loop keeps going.
The tween.stop() call should cause tween.update() to return true so that the animation loop will end.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the tween.stop() and tween.update(time) entry points described in the issue and trace how stopped tweens affect the update return value. Resolve the contradictory wording about returning false versus true, then verify that calling stop before completion produces the intended value for ending the animation loop.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100