Some browser events (such as pointermove) can fire faster than the frame-rate of the browser. This causes issues, because the browser cannot keep up. Although some browsers automatically "throttle" such events to run at 60fps, there are some bugs / inconsistencies.
For example, on Chrome, when the Dev-tools are open, the throttling doesn't work.
To reproduce, open the Dev-tools on Chrome and click the element attached to Pressure.js and move the mouse a lot. After a while you will see a performance drop, which only gets worse and worse.
Please refer to this article here which describes the problem in detail and proposes a solution.
Please consider this, as it makes the library completely unusable under those conditions.
Hello 👋,
Some browser events (such as pointermove) can fire faster than the frame-rate of the browser. This causes issues, because the browser cannot keep up. Although some browsers automatically "throttle" such events to run at 60fps, there are some bugs / inconsistencies.
For example, on Chrome, when the Dev-tools are open, the throttling doesn't work. To reproduce, open the Dev-tools on Chrome and click the element attached to Pressure.js and move the mouse a lot. After a while you will see a performance drop, which only gets worse and worse.
Please refer to this article here which describes the problem in detail and proposes a solution.
Please consider this, as it makes the library completely unusable under those conditions.
Thanks!
Macbook Pro 16", macOS Big Sur, Chrome