Frame Rate and Power consumption

Dear Cesium Dev,

We are getting 60fps on our laptop. This is great, but the battery drains too quickly.

My question is if there's a way to limit the frame rate. Something like this maxTPerFrame = 1.0/30.0 would be great.

Thank you!

Hi,

Cesium doesn’t have something out of the box for this yet; Cesium just use the browser’s requestAnimationFrame. Both the Viewer widget and Cesium widget allow a custom render loop. It should be pretty straightforward to write a custom loop that limits the frame rate.

Patrick

I agree with Cozzi that this should be easy to do, but I also think it may be possible to add something like a targetFramerate property to the CeisumWidget to make it even easier. No promises, but I may look into it.

On a related note, we also need to to optimize the case where time is not important and therefore we don’t need to actually render every frame (and instead only render on user input or other things that affect the scene). Me, Scott, and Kevin were talking about this recently but I’m not sure if it’s on anyone’s roadmap.

I opened a pull request to add a targetFrameRate property to both CesiumWidget and Viewer: https://github.com/AnalyticalGraphicsInc/cesium/pull/1676