Skip to content

[bug] calling tween.stop() does not cause tween.update() to return false #665

@trusktr

Description

@trusktr

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy