*blog... kind of... *rss
stats.js
15 comments written so far...Some of you may have realised already that I've been using a Javascript FPS counter on some of my experiments.
Originally it had exactly the same look as the Actionscript version but, as far as I know, you can't query the system to get the amount of memory the application is using from Javascript. So 2 of the 4 common values of the Actionscript version were empty. That made me reconsider the design and tried to improve it a bit. And after using it for quite a while I think it's ready.

As you can see it has two modes, FPS and MS. Just click on the widget to switch between them. I may change MS to use greens instead of cyan to match the Actionscript version a bit more. Thoughts?
Unfortunately this time the code is not as simple as the Actionscript version, but I think it's still simple enough.
Find the source code, compressed file and more examples at the project page on github.
Originally it had exactly the same look as the Actionscript version but, as far as I know, you can't query the system to get the amount of memory the application is using from Javascript. So 2 of the 4 common values of the Actionscript version were empty. That made me reconsider the design and tried to improve it a bit. And after using it for quite a while I think it's ready.

As you can see it has two modes, FPS and MS. Just click on the widget to switch between them. I may change MS to use greens instead of cyan to match the Actionscript version a bit more. Thoughts?
Unfortunately this time the code is not as simple as the Actionscript version, but I think it's still simple enough.
var stats = new Stats();
parentElement.appendChild(stats.domElement);
setInterval(function () {
stats.update();
}, 1000/60);
Find the source code, compressed file and more examples at the project page on github.
Thanks for this component, helps me a lot. For your info: I've found that IE chokes on the implementation of Stats, and put the code above in a try / catch block.
July 7th 2010, Monokai
Is that IE9? Or IE8-? (Not a fan of adding browser specific code/detection stuff ;P)
Actually in Google Chrome you can query the memory usage. Here is one I ported from AS3 as well for my JS experiments.
http://www.coursevector.com/projects/orion/jsdemo/
http://www.coursevector.com/projects/orion/jsdemo/
Wow, didn't now that! :) Also, really nice port! Do you mind if I include it in the main repository?
http://github.com/mrdoob/Hi-ReS-Stats
http://github.com/mrdoob/Hi-ReS-Stats
Only briefly tried Stats in IE8, looks like addEventListener & canvas calls are incompatible with IE.
execellent!!!
but remeber you've already übber surpassed the expectations of javascript from its conception feel comfortable with things like this, shit happens.
:(
"you can't query the system to get the amount of memory the application is usin"
but remeber you've already übber surpassed the expectations of javascript from its conception feel comfortable with things like this, shit happens.
:(
"you can't query the system to get the amount of memory the application is usin"
JaK, what about reading the comments? Turns out you can.
%20AND%201=1
%20AND%201=2
AND 1=1/*
AND 1=2/*
' AND '1'='1
' AND '1'='2
' AND 1=1/*
' AND 1=2/*
Have your say!
*profile

traditional id: Ricardo Cabello Miguel
based in: London, UK
more: github, twitter, twitpic, soundcloud and flattr
*post nav
Deleted myself from Facebook
stats.js
César Alierta y las anotaciones de Youtube
Moving back to Spain
Setting up Ubuntu 9.10 on a Eee PC 1101HA
I'm a Windows... ssss... sseven! ... PC...
Decent SVN Client for Ubuntu / Linux
60fps' Cube Clock
Tweaking the spam comments filter
Prettifying Ubuntu
HTC Magic
*latest comments
Deleted myself from Facebook
Deleted myself from Facebook
Deleted myself from Facebook
César Alierta y las anotaciones de Youtube
La profesionalidad de Recreo comunicación
Nathan Fake the Sky Was Pink (edicion Leonardo Martin)
César Alierta y las anotaciones de Youtube
César Alierta y las anotaciones de Youtube
César Alierta y las anotaciones de Youtube
César Alierta y las anotaciones de Youtube