sinisterchipmunk / jax

Framework for creating rich WebGL-enabled applications using JavaScript and Ruby
http://jaxgl.com
MIT License
96 stars 16 forks source link

to be added: fps window #10

Closed brownman closed 13 years ago

brownman commented 13 years ago

option to report low fps by supplying a calculated average.

sinisterchipmunk commented 13 years ago

Jax now (as of v0.0.0.6) calculates framerate and update rate via the Jax.Context#getFramesPerSecond() and Jax.Context#getUpdatesPerSecond(). With this info it should be easy to implement a reporting system based on whatever algorithm you want -- but such a reporting system is currently outside the Jax scope, so it'll have to be implemented within the target application.

See /spec/example_app/spec/javascripts/support/spec_layout.html.erb for an example utilizing these methods; the same example is also auto-generated for new applications, but won't be available in old ones since they already have a spec layout.