-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught TypeError: Cannot read property 'fps' of undefined #171
Comments
Well, I don't know exactly how to fix it, but I see that in commit dcdc43d the As of df5f16c the error is on line text += "fps: " + Math.round(metrics.timing.fps) + space; where |
What's confusing is that when you run the demo it works just fine. But after a bit of spelunking I found this on line // pass through runner as timing for debug rendering
demo.engine.metrics.timing = demo.runner; So the demo code hacks its way around the problem by passing in a reference to the runner. |
Really it seems that the only problem here is that I propose that the fps counter simply be removed from |
Looks like I didn't properly maintain backwards compatibility when I refactored this. @anthropomorphic you're right about this and it's something I hope to address when I get around to working on decoupling the renderers, but this should at least prevent the errors for the time being |
With the last version of the library (https://github.com/liabru/matter-js/blob/master/build/matter.min.js), when I run the engine, I always get the following error in the console:
Uncaught TypeError: Cannot read property 'fps' of undefined
every single frame of the animation. The message is only visible when I render the engine with the flag showDebug: true, so it is not fatal, but still annoying. Anybody knows the reason?
Thanks,
Jesús
The text was updated successfully, but these errors were encountered: