FPS
FPS Text view. With builtin debouncer and styling features.
Quick Theatre:
files: "fps"
draw(ctx) {
this.fps.print(ctx)
}
When loaded, an instance is applied to the stage:
class FPSExample extends Stage {
draw(ctx){
this.step()
this.clear(ctx)
// Call the function
this.fps.drawFPS(ctx)
// continue drawing stuff.
this.center.pen.indicator(ctx, { color: 'gray', width: 1})
this.mouse.point.pen.indicator(ctx, { color: 'green', width: 1})
}
}
It's automounted on the stage for free or you can create a new instance:
stage.fps
Meta Data
| title | FPS |
| dependencies | () |
| unused_keys | () |
| unknown_keys | ('files',) |
| files | ['', 'smooth-number.js'] |
| filepath_exists | True |
| path | text/fps.js |
| filepath | text/fps.js |
| clean_files | ('smooth-number.js',) |