()
| 4 | let callbackId; |
| 5 | let fpsLabel: any; |
| 6 | export function startFPSMeter() { |
| 7 | callbackId = addCallback((fps: number, minFps: number) => { |
| 8 | // console.log(`Frames per seconds: ${fps.toFixed(2)}`); |
| 9 | // console.log(minFps.toFixed(2)); |
| 10 | if (fpsLabel) { |
| 11 | fpsLabel.text = `${fps}`; |
| 12 | } |
| 13 | }); |
| 14 | start(); |
| 15 | } |
| 16 | |
| 17 | export function stopFPSMeter() { |
| 18 | removeCallback(callbackId); |
no test coverage detected