Re: [csswg-drafts] [web-animations-2] controlling animation frame rate (#7196)

> I can see the argument for opting all animations on the page to a lower rate but I think it would be incomplete without a way of excepting some animations/JS callback loops (`CustomEffect`/`rAF`) that want to run in sync with higher fps paints or input, like scroll or touch.

I was thinking something like this:
```js
const highPerformance = new DocumentTimeline({minInterval: 0}); // use this timeline for max frame rate.
document.timeline.minInterval = 1000 / 30; // Run default effects at 30fps.
```

I'm not sure if you change the default document timeline rate though how we would express whether we want to limit or not limit inputs so maybe it needs to be more nuanced.

-- 
GitHub Notification of comment by flackr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7196#issuecomment-1674922167 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 11 August 2023 14:54:26 UTC