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 isfps
)draggable
- Is the performance monitor is draggable? (default istrue
)horizontalCenter
- Does the performance monitor have to be horizontally centered? (default isfalse
)verticalCenter
- Does the performance monitor have to be vertically centered? (default isfalse
)top
- The top margin in pixels (default isnull
)right
- The right margin in pixels (default isnull
)bottom
- The bottom margin in pixels (default isnull
)left
- The left margin in pixels (default isnull
)
actions
The exposed actions are :
show
- Show the performance monitor.hide
- Hide the performance monitor.