{"id":14971115,"url":"https://github.com/samme/phaser-plugin-advanced-timing","last_synced_at":"2025-10-26T14:31:08.255Z","repository":{"id":57322879,"uuid":"74515321","full_name":"samme/phaser-plugin-advanced-timing","owner":"samme","description":"Shows FPS, frame intervals, and performance info. Phaser 2/CE","archived":false,"fork":false,"pushed_at":"2023-04-18T01:06:40.000Z","size":2073,"stargazers_count":28,"open_issues_count":1,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-01-31T20:19:35.160Z","etag":null,"topics":["fps","phaser","phaser-plugin"],"latest_commit_sha":null,"homepage":"https://samme.github.io/phaser-plugin-advanced-timing/","language":"CoffeeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samme.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-11-22T21:34:42.000Z","updated_at":"2024-09-13T19:06:19.000Z","dependencies_parsed_at":"2024-01-12T00:26:30.786Z","dependency_job_id":"a5be35aa-8d05-46e8-839f-84ba17a8c4f8","html_url":"https://github.com/samme/phaser-plugin-advanced-timing","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samme%2Fphaser-plugin-advanced-timing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samme%2Fphaser-plugin-advanced-timing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samme%2Fphaser-plugin-advanced-timing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samme%2Fphaser-plugin-advanced-timing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samme","download_url":"https://codeload.github.com/samme/phaser-plugin-advanced-timing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238347617,"owners_count":19456967,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fps","phaser","phaser-plugin"],"created_at":"2024-09-24T13:44:44.053Z","updated_at":"2025-10-26T14:31:07.777Z","avatar_url":"https://github.com/samme.png","language":"CoffeeScript","readme":"Shows FPS, frame intervals, draw count, and other performance info. [Demo](https://samme.github.io/phaser-plugin-advanced-timing/)\n\nUsage\n-----\n\n```javascript\ngame.plugins.add(Phaser.Plugin.AdvancedTiming);\n// or\ngame.plugins.add(Phaser.Plugin.AdvancedTiming, {mode: 'graph'});\n```\n\nThe display modes are `domMeter`, `domText`, `graph`, `meter`, and `text`. The default mode is `text`.\n\nYou can save a reference to switch modes later:\n\n```javascript\nvar plugin = game.plugins.add(Phaser.Plugin.AdvancedTiming);\n// …\nplugin.mode = 'text';\n```\n\nThe plugin also provides two [debug methods](#debug-methods):\n\n```javascript\ngame.debug.gameInfo(x, y);\ngame.debug.gameTimeInfo(x, y);\n```\n\nBeware that [debug display can be slow in WebGL](https://phaser.io/docs/2.6.2/Phaser.Utils.Debug.html).\n\nDOM Text, Text\n--------------\n\n```javascript\nplugin.mode = 'domText';\nplugin.mode = 'text';\n```\n\n![Text Mode](https://samme.github.io/phaser-plugin-advanced-timing/screenshots/text.png)\n\nBoth show [FPS][fps], [render type][renderType], and WebGL draw count.\n\n`text` is drawn on the game canvas. `domText` is a separate HTML element.\n\nThe `domText` element can be styled as\n\n```css\n.ppat-text {\n  position: absolute;\n  left: 0;\n  top: 0;\n  margin: 0;\n  font: 16px/1 monospace;\n}\n```\n\nDOM Meter\n---------\n\n```javascript\nplugin.mode = 'domMeter';\n```\n\n![DOM Meter Mode](https://samme.github.io/phaser-plugin-advanced-timing/screenshots/domMeter.png)\n\nShows [FPS](fps). It can be styled as\n\n```css\n.ppat-fps {\n  position: absolute;\n  left: 0;\n  top: 0;\n}\n```\n\nGraph\n-----\n\n![Graph Mode](https://samme.github.io/phaser-plugin-advanced-timing/screenshots/graph.png)\n\n```javascript\nplugin.mode = 'graph';\n```\n\nPlots values for the last 60 updates:\n\n  - [FPS](fps) (blue)\n  - [update duration][updateLogic] (orange)\n  - [render duration][updateRender] (violet)\n  - spiraling (red)\n  - [updatesThisFrame](updatesThisFrame) (dark blue; only when [forceSingleUpdate][forceSingleUpdate] is off)\n\nMeter\n-----\n\n```javascript\nplugin.mode = 'meter';\n```\n\n![Meter Mode](https://samme.github.io/phaser-plugin-advanced-timing/screenshots/meter.png)\n\nShows [FPS](fps) (blue), [update duration][updateLogic] (orange), and [render duration][updateRender] (violet).\n\nDebug Methods\n-------------\n\n```javascript\ngame.debug.gameInfo(x, y);\ngame.debug.gameTimeInfo(x, y);\n```\n\n![Example output of debug.gameInfo() and debug.gameTimeInfo()](https://samme.github.io/phaser-plugin-advanced-timing/screenshots/debug.png)\n\n### debug.gameInfo()\n\nPrints values for\n\n- [game.forceSingleUpdate][forceSingleUpdate]\n- `game._lastCount`: “how many ‘catch-up’ iterations were used on the logic update last frame”\n- [game.lockRender][lockRender]\n- [game.renderType][renderType]\n- `game._spiraling`: “if the ‘catch-up’ iterations are spiraling out of control, this counter is incremented”\n- [game.updatesThisFrame][updatesThisFrame]: “number of logic updates expected to occur this render frame; will be 1 unless there are catch-ups required (and allowed)”\n\n### debug.gameTimeInfo()\n\nPrints values for\n\n- [game.time.desiredFps][desiredFps]\n- [game.time.elapsed][elapsed] (and min–max range)\n- [game.time.elapsedMS][elapsedMS]\n- [game.time.fps][fps] (and min–max range)\n- [game.time.physicsElapsedMS][physicsElapsedMS]\n- [game.time.slowMotion][slowMotion]\n- [game.time.suggestedFps][suggestedFps]\n\n\n[desiredFps]: http://phaser.io/docs/2.6.2/Phaser.Time.html#desiredFps\n[elapsed]: http://phaser.io/docs/2.6.2/Phaser.Time.html#elapsed\n[elapsedMS]: http://phaser.io/docs/2.6.2/Phaser.Time.html#elapsedMS\n[forceSingleUpdate]: http://phaser.io/docs/2.6.2/Phaser.Game.html#forceSingleUpdate\n[fps]: http://phaser.io/docs/2.6.2/Phaser.Time.html#fps\n[lockRender]: http://phaser.io/docs/2.6.2/Phaser.Game.html#lockRender\n[physicsElapsedMS]: http://phaser.io/docs/2.6.2/Phaser.Time.html#physicsElapsedMS\n[renderType]: http://phaser.io/docs/2.6.2/Phaser.Game.html#renderType\n[slowMotion]: http://phaser.io/docs/2.6.2/Phaser.Time.html#slowMotion\n[suggestedFps]: http://phaser.io/docs/2.6.2/Phaser.Time.html#suggestedFps\n[updatesThisFrame]: http://phaser.io/docs/2.6.2/Phaser.Game.html#updatesThisFrame\n[updateLogic]: http://phaser.io/docs/2.6.2/Phaser.Game.html#updateLogic\n[updateRender]: http://phaser.io/docs/2.6.2/Phaser.Game.html#updateRender\n","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamme%2Fphaser-plugin-advanced-timing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamme%2Fphaser-plugin-advanced-timing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamme%2Fphaser-plugin-advanced-timing/lists"}