Skip to content

Pause all rendering if canvas is not visible #3

@zackarydev

Description

@zackarydev

HTML5 automatically pauses rAF calls if canvas is no longer visible.
Previous timestamp of our rAF calls are not deleted when the canvas starts being re-rendered.
This causes large deltas, breaking some animations.

https://www.html5gamedevs.com/topic/3054-detect-when-the-game-change-visibility/?do=findComment&comment=177653

https://www.w3.org/TR/page-visibility-2/#introduction

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions