Jump to content

Advanced Timing Plugin: FPS graph, meter, text


samme
 Share

Recommended Posts

  • 2 weeks later...
  • 2 weeks later...
  • 6 months later...
  • 1 month later...

Big update, I'm excited. :rolleyes:

  • Two new display modes, domMeter and domText, skip Phaser rendering entirely.
  • The graph and meter displays now show the actual updateLogic and updateRender durations (ms).
  • The text displays now show Phaser's renderer type and WebGL draw count.

NPM: phaser-plugin-advanced-timing

GitHub: samme/phaser-plugin-advanced-timing

domMeter.pnggraph.pngmeter.pngtext.png

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...

Good morning @samme!

I don't understand how to install your plugin.

I've Phaser 2.6.2, if I write on my code:

game.plugins.add(Phaser.Plugin.AdvancedTiming);

Visual studio 2017 said "AdvancedTiming" does not exist in Phaser.Plugin.

Even if I put your files in my project folder and call theme in the head of my index.html it doesn't see the AdvancedTiming.

Otherwise:

game.time.advancedTiming = true;

will correctly work but I cannot use the AdvancedTiming methods.

Link to comment
Share on other sites

@Fenopiù it would be something like this. I'm not sure sure how best to add them to your project though.

declare module Phaser {
  module Plugin {
    class AdvancedTiming extends Phaser.Plugin {
      mode: string;
      constructor(game: Phaser.Game, parent: Phaser.PluginManager, options: any);
    }
  }
  module Utils {
    class Debug {
      gameInfo(x: number, y: number): void;
      gameTimeInfo(x: number, y: number): void;
    }
  }
}

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...