News for hackers. Stuff that matters.
Re:Sprite.js: HTML5 framework for creating efficient animati... by olalonde on Thursday December 09, 2010 @09:13AM (#1987459)
I was a bit curious what exactly this "system load" was. Turns out it's a ratio between the time the browser takes to draw the particles and the frequency at which it is supposed which to draw.

    this.tick_duration = 25;
    
    ....

    this.now = new Date().getTime();

    // Drawing...

    this.time_to_paint = (new Date().getTime()) - this.now;
    this.load = Math.round((this.time_to_paint / this.tick_duration) * 100);
Re:Sprite.js: HTML5 framework for creating efficient animati... by coderdude on Thursday December 09, 2010 @09:34AM (#1987539)
This should shed some light on the technique: http://gamedev.stackexchange.com/questions/1589/fixed-time-s...