/ fps.html
fps.html
1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="utf-8"> 5 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> 6 7 <title>FPS — Space.js</title> 8 9 <link rel="preconnect" href="https://fonts.gstatic.com"> 10 <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto+Mono"> 11 <link rel="stylesheet" href="assets/css/style.css"> 12 13 <script type="module"> 14 import { UI } from './src/index.js'; 15 16 const ui = new UI({ fps: true }); 17 ui.animateIn(); 18 document.body.appendChild(ui.element); 19 20 function animate() { 21 requestAnimationFrame(animate); 22 23 ui.update(); 24 } 25 26 requestAnimationFrame(animate); 27 </script> 28 </head> 29 <body> 30 </body> 31 </html>