jakearchibald/svgomg

Revisit `setTimeout` usage/JS animations

Open

#332 建立於 2021年9月29日

在 GitHub 查看
 (0 留言) (0 反應) (0 負責人)JavaScript (474 fork)batch import
enhancementhelp wanted

倉庫指標

Star
 (5,473 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

There are known performance issues with setTimeout. IIRC requestAnimationFrame should behave better.

I notice junky settings checkboxes animation on Firefox for Android when Power Saving is enabled on the device. Not sure it's related, but it would probably be better to use rAF anyway?

EDIT: we are also using offsetLeft is ripple. Not sure if there's a better way to do the same thing nowadays.

貢獻者指南