Skip to content

Animation loop should use or reference requestAnimationFrame #4

Open

Description

@zachberry

The loop code uses setInterval which will work in every browser, but we should at least mention requestAnimationFrame which is more efficient and built for animations.

More info: http://paulirish.com/2011/requestanimationframe-for-smart-animating/

Activity

  1. zachberry commented on Mar 6, 2013

    @zachberry
    Author

    Interesting debate on requestAnimationFrame: http://stackoverflow.com/questions/7999680/why-doesnt-jquery-use-requestanimationframe

    My experience with requestAnimationFrame has just been limited to a tiny amount of three.js work where I didn't come across these problems - regardless, it's worth looking at and perhaps mentioning to some degree if requestAnimationFrame is added into the tutorial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions