Jump to content

Fps function


Adem
 Share

Recommended Posts

First of all I know from your earlier post that you have already checked out the documentation for scene optimization. If you want to find out how to get the fps  in BabylonJS then the best way is to go to the documention site and in the search box (top right hand corner) enter fps and search. From the resulting list note that the engine class must have an entry related to fps, so go there. On the engine page either use the drop down menu and the down arrow to scroll down until you get an entry that has fps in or open the brower's - find on page- option and use it to check for fps on the page. Both of these ways will lead you to engine.getFps(). Even easier typing "Babylonjs fps" into google leads to a forum question http://www.html5gamedevs.com/topic/6672-measure-fps/ which includes the answer engine.getFps()

Playground http://www.babylonjs-playground.com/#1BVAHH#1

Having (perhaps) just answered your question this proves that the way I have just stated is the second best way and the best way is to ask on the forum. :) But then you have to wait until someone answers you question whereas the described way leads you straight to an answer without waiting to see if anybody understands the question correctly and gives you a useful answer. So maybe after all the best way is to do some searching in the documentation and/or forum and/or google.:rolleyes:

 

Second of all why only optimize if your project falls below 10 fps, surely it is better to fully optimize your project in the first place.

 

Third of all Convergence has some great tips on optimization http://www.html5gamedevs.com/topic/26886-creating-a-city-building-simulator/?do=findComment&comment=154182

 

Fourth of all welcome from me to the forum - you will soon get use to peoples idiocentric sense of humour.

Link to comment
Share on other sites

I came up with this using the PG's SSAO example:

http://www.babylonjs-playground.com/#27NUSW

Is it normal for the scene optimizer to keep calling the optimization.apply() even if the target fps has been reached?  I think that was because an old optimizer was still running in the background after editing my PG.

optimizations are applied only if the target fps is not met: 

10 fps

http://www.babylonjs-playground.com/#27NUSW#2

60 fps

http://www.babylonjs-playground.com/#27NUSW#1

 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...