eclipsesource / eclipsesource/tabris-js

Support for requestAnimationFrame(callback) is missing

Open
#383 2 comments 1 reaction 0 assignees View on GitHub
feature
Dominant language
JavaScript
Stars
1.4k
Forks
171
PR merge metrics
No merged PRs in 30d

Description

Next to the scheduling functions `setInterval(function, delay)` and `setTimeout(function, delay)` Tabris.js should also support the third variant `requestAnimationFrame(callback)`.

See [Schedule Update in Animations](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Basic_animations#Scheduled_updates) in MDN.

This third variant is useful for animating things.

Currently setTimeout() shows a wide variety in number of executions per second.
- If you alter a native widget in the callback, number of executions is capped by vsynch (60 calls per scond).
- If you draw on a canvas, you get around 100 calls per second.
- If you just increment a counter without altering the UI, you get around 4000 calls per second.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.