Detect Graphics card performance - JS

后端 未结 7 1736
轮回少年
轮回少年 2021-01-30 09:06

This is a longshot - is there anyway to detect poor vs strong graphics card performance via a JS plugin?

We have built a parallax site for a client, it stutters on lower

7条回答
  •  日久生厌
    2021-01-30 09:32

    requestAnimationFrame (rAF) can help with this.

    You could figure out your framerate using rAF. Details about that here: calculate FPS in Canvas using requestAnimationFrame. In short, you figure out the time difference between frames then divide 1 by it (e.g. 1/.0159s ~= 62fps ).

    Note: with any method you choose, performance will be arbitrarily decided. Perhaps anything over 24 frames per second could be considered "high performance."

提交回复
热议问题