When working in the editor and launching the game in the browser, I have access to the “Show FPS” button. But when I build the game (Web-Desktop, Web-Mobile), this button is no longer available. I would like to display some statistics (FPS and Draw Calls).
I know about this. But this information is always shown. And it is not always clearly visible (size, color). I want to be able to display FPS and Draw Calls in the location, size and color I need.
You can simply get FPS by deltaTime. In cocos, deltaTime params on update method is time between two update call. So you can get Frame Per Second by let 1 / deltaTime.
Eg: my normal deltaTime is 0.016 so my FPS is 1/0.016 = 120FPS.