Maybe it is possible by indirectly looking for it, maybe something like looking for window.WebAssembly && window.Worker maybe but I'm not really sure what works. It should be a very generic and stable solution.
In addition to Using javascript to detect device CPU/GPU performance?, it should be a very simple test without having to do any WebGL or similar tests.
The css animation I use has the following keyframes:
animation: bgRotation 240s linear infinite; @keyframes bgRotation { from { background-position: 0 0; } 50% { background-position: -4000px 0; } to { background-position: 0 0; } }
navigator.hardwareConcurrency: stackoverflow.com/questions/39516931/…navigator.hardwareConcurrencyseems to be a good starting point. But what if there are multiple cpu but slower ones? And what about gpu? Isn't this even more important for such animations? On a Redmi 12 for example, it is slow, even though there are 8 cpu in total: mi.com/global/product/redmi-12/specs