This plugin is an implementation of Stats.js and it displays a performance monitor. This is a simple way to monitor the performance of your ForgeJS project, like frame per second (fps), milliseconds between frames and memory used. If you click on the performance monitor, you switch from a mode to another and see the different modes in action : fps > ms > mb.

json configuration

{
    "story": { ... },

    "plugins":
    {
        "engines":
        [
            {
                "uid": "org.forgejs.performancemonitor",
                "url": "PerformanceMonitor/"
            }
        ],

        "instances":
        [
            {
                "uid": "plugin-performancemonitor",
                "engine": "org.forgejs.performancemonitor",

                "options":
                {
                    "top": 5,
                    "horizontalCenter": true,
                    "mode": fps
                }
            }
        ]
    }
}

options

  • mode - The default mode to display (fps, ms, mb) (default is fps)
  • draggable - Is the performance monitor is draggable? (default is true)
  • horizontalCenter - Does the performance monitor have to be horizontally centered? (default is false)
  • verticalCenter - Does the performance monitor have to be vertically centered? (default is false)
  • top - The top margin in pixels (default is null)
  • right - The right margin in pixels (default is null)
  • bottom - The bottom margin in pixels (default is null)
  • left - The left margin in pixels (default is null)

actions

The exposed actions are :

  • show - Show the performance monitor.
  • hide - Hide the performance monitor.

7th Mar 2017