Jump to content

Highres timestamp for runRenderLoop


earslap
 Share

Recommended Posts

The regular requestAnimationFrame function is sent in a high res timestamp as an argument by the browser so that we can accurately calculate the interval between frames. This value is needed for doing fluid animations, accurate physics etc. that are not tied to a framerate. I assume that babylon renderloop uses requestAnimationFrame; is there a particular reason why this value is not exposed to the user? Is there another way / convention of getting it?

Also, would it be unwise to use requestAnimationFrame directly to render our scenes bypassing the render loop of babylon? Would this have any unintended consequences?

Link to comment
Share on other sites

Thank you David, should I open an issue in the tracker for this? I'm not very familiar with babylon.js source but if you think it is trivial enough I might attempt a PR soon if you want, if you think sending in the time as an argument is a good idea that is.

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...