jakearchibald/svgomg

Revisit `setTimeout` usage/JS animations

开放

#332 创建于 2021年9月29日

 (0 条评论) (0 个反应) (0 位负责人)JavaScript (526 个派生)batch import
enhancementhelp wanted

仓库指标

星标
 (6,191 个星标)
PR 合并指标
 (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.

贡献者指南