3 ms·
I have a 60fps + 144fps monitor setup and when I move it to my high refresh rate one, it goes hyperspeed :) You should calculate delta time with performance.now
by odensc 6y ago
I have a 60fps + 144fps monitor setup and when I move it to my high refresh rate one, it goes hyperspeed :) You should calculate delta time with performance.now() and change position based off of that.
- ricardobeat 6y agoHaha, indeed. A correct implementation would calculate (pixel) movement speed based on a delta from last frame, left that out to simplify the code. EDIT: I added a simple rate-limiting function :)
- jrockway 6y agoI tried it on my 120Hz monitor, looks great.