/ test_fps.html
test_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="importmap">
14          {
15              "imports": {
16                  "@alienkitty/space.js": "../src/index.js"
17              }
18          }
19      </script>
20  
21      <script type="module">
22          import { UI } from '@alienkitty/space.js';
23  
24          const ui = new UI({
25              fps: true
26              // header
27              // footer
28              // menu
29              // info
30              // details
31              // instructions
32              // detailsButton
33              // muteButton
34              // audioButton
35          });
36          ui.animateIn();
37          document.body.appendChild(ui.element);
38  
39          function animate() {
40              requestAnimationFrame(animate);
41  
42              ui.update();
43          }
44  
45          requestAnimationFrame(animate);
46      </script>
47  </head>
48  <body>
49  </body>
50  </html>