Class
FPSDebugger
View sourceExtendsPlugin
Adds a browser overlay that reports the app’s instantaneous frame rate.
Registering FPSDebugger creates a repeating one-second RAFTimer
and adds a #fps-container element to the browser’s top-right corner. The
overlay refreshes once per timer cycle with the rounded value from
VirtualClock#getFrameRate, such as 60 fps.
Register CorePlugin, ReflectPlugin, and
TimePlugin before FPSDebugger. These dependencies must
already be registered; FPSDebugger does not install them.
Examples
import { App } from '@wimaengine/app'
import { CorePlugin } from '@wimaengine/core'
import { FPSDebugger } from '@wimaengine/diagnostic'
import { ReflectPlugin } from '@wimaengine/reflect'
import { TimePlugin } from '@wimaengine/time'
new App()
.registerPlugin(new ReflectPlugin())
.registerPlugin(new CorePlugin())
.registerPlugin(new TimePlugin())
.registerDebugger(new FPSDebugger())
.run()Constructor
Methods
register(app: App): void
View sourceAdds the browser frame-rate overlay and its repeating RAFTimer to
the app.
requires(): TypeId[]
View sourceReturns the plugin IDs for the CorePlugin, ReflectPlugin,
and TimePlugin dependencies.
