Methods
addPerFrameRenderCallback(callback)
The callback to be executed every time a new frame is displayed.
It should be utilized to display mask data or any effect. It receives the current
frame number, the canvas the canvas context in the parameters:
(frameNumber: number, canvas: HTMLCanvasElement, context: CanvasRenderingContext2D) => void
Parameters:
Name | Type | Description |
---|---|---|
callback |
Function |
getFps() → {number}
Returns the current numer of frames per second.