Skip to content
ClassDebugger & Diagnostics@public

FlxFpsDisplay ​

Small dependency-free DOM display for render FPS and frame pacing.

ts
export declare class FlxFpsDisplay

Constructors ​

ts
constructor(options?: FlxFpsDisplayOptions)

Constructs a new instance of the FlxFpsDisplay class

ParameterTypeDescription
optionsFlxFpsDisplayOptions-

Properties ​

PropertyModifiersTypeDescription
fpsreadonlynumber-
metricsreadonlyFlxFpsMetricsMetrics from the most recently completed sampling window.

Methods ​

destroy() ​

ts
destroy(): void

Returns: void

recordFrame() ​

ts
recordFrame(elapsedMS: number, simulationSteps?: number): void

Record one completed render and the fixed updates executed before it.

Parameters:

ParameterTypeDescription
elapsedMSnumber-
simulationStepsnumber-

Returns: void

reset() ​

ts
reset(): void

Clear collected samples, such as after returning from a background tab.

Returns: void

Released under the MIT License.