sparkbox / bouncy-ball

:red_circle: Compare web animation techniques by bouncing a ball with each one.
https://sparkbox.github.io/bouncy-ball
MIT License
605 stars 66 forks source link

MatterJS Demo bounces too quickly in some browsers (Chrome / Firefox) #113

Closed bryanbraun closed 2 years ago

bryanbraun commented 2 years ago

I noticed that the MatterJS demo is bouncing really quickly in some browsers:

Safari Firefox
safaru firefox

(I'm testing on Macbook Pro, Monterey v12.3.1, and latest versions of browsers)

Weirdly, for Chrome (version 100.0.4896.127), I'm seeing it run at normal speed on a typical display, and run at high speed on a retina display! That makes me wonder if the matter.js render speed is somehow based on the refresh-rate of the browser or display (it doesn't seem to affect any other demos... just the matter.js one).

I'm not sure how this issue was introduced... we haven't changed this demo recently and we're pinned to a specific version of matterjs. I'm guessing that the issue was aways there, but I'm just now seeing it because of recent browser or hardware updates.


Update: it looks like this issue has been reported before and might be fixable with a small config change:

Runner.create({
  isFixed: true,
})