max123 Posted June 14, 2017 Share Posted June 14, 2017 (edited) Hi, How can I reliably read running scene's framerate? When I output to console values of engine.fps, it gives me heartwarming 59-60fps. However, visually my Babylon app runs at 7-8fps at most! Where's the catch? The reason I need this is to disable certain features if framerate drops below 30fps for like 5-10 ticks. Or is there a better way to detect slower devices? Cheers Edited June 14, 2017 by max123 Quote Link to comment Share on other sites More sharing options...
Hersir Posted June 14, 2017 Share Posted June 14, 2017 Not directly related to question but you can also try Scene Optimizer to maintain frame rate. Quote Link to comment Share on other sites More sharing options...
adam Posted June 14, 2017 Share Posted June 14, 2017 engine.getFps().toFixed() Quote Link to comment Share on other sites More sharing options...
max123 Posted June 14, 2017 Author Share Posted June 14, 2017 @Hersir, yep, I'm aware of Scene Optimizer but will need more control (e.i. dispose some meshes or disable certain effects if needed). @adam, yep, that's essentially what I'm using at the moment, minus the .toFixed() bit - makes no difference. Quote Link to comment Share on other sites More sharing options...
max123 Posted June 14, 2017 Author Share Posted June 14, 2017 Sorry guys, it's me being an idiot again: I have 5 devices all linked to Browsersync and somehow managed to read framerate from a wrong device! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 14, 2017 Share Posted June 14, 2017 LOL...good catch Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.