(args)
| 3 | |
| 4 | let fpsCallbackId; |
| 5 | export function onLoaded(args) { |
| 6 | const page = args.object; |
| 7 | const fpsLabel = getViewById(page, 'fps') as Label; |
| 8 | fpsCallbackId = fpsMeter.addCallback((fps: number, minFps: number) => { |
| 9 | fpsLabel.text = `${fps.toFixed(2)}/${minFps.toFixed(2)}`; |
| 10 | }); |
| 11 | fpsMeter.start(); |
| 12 | } |
| 13 | |
| 14 | export function onUnloaded() { |
| 15 | fpsMeter.removeCallback(fpsCallbackId); |
nothing calls this directly
no test coverage detected