Detect Graphics card performance - JS

后端 未结 7 1737
轮回少年
轮回少年 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:45

    This is where "old school" loading screens came in useful, you could render something complex either in the foreground (or hidden away) that didn't matter if it looked odd or jurky -- and by the time you had loaded your resources you could decide on what effects to enable or disable.

    Basically you would use what jcage mentioned for this, testing of frame-rate (i.e. using a setInterval in conjuction with a timer). This isn't always 100% reliable however because if their machine decides in that instance to do a triple-helix-backward-somersault (or something more likely) you'd get a dodgy reading. It is possible, depending on the animations involved, to upgrade and downgrade the effects in realtime — but this is always more tricky to code, plus your own analysis of the situation can actually sometimes cause dropped performance.

提交回复
热议问题