You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use matter.js on a web worker with offscreen canvas, but the problem is it seems to throw errors about requestAnimationFrame. It tries to get it by using window.requestAnimationFrame but in a web worker window is not defined. Also if I try to set a sprite, it fails because matter.js uses new Image() but that isn't defined in a web worker. Also it tries to style the canvas, but that doesn't work since its an offscreen canvas.
Has anyone gotten this to work?
The text was updated successfully, but these errors were encountered:
I want to use matter.js on a web worker with offscreen canvas, but the problem is it seems to throw errors about requestAnimationFrame. It tries to get it by using window.requestAnimationFrame but in a web worker window is not defined. Also if I try to set a sprite, it fails because matter.js uses new Image() but that isn't defined in a web worker. Also it tries to style the canvas, but that doesn't work since its an offscreen canvas.
Has anyone gotten this to work?
The text was updated successfully, but these errors were encountered: