index.html 634 B

123456789101112131415161718192021222324252627282930313233
  1. <head>
  2. <style type="text/css">
  3. .multigame {
  4. display:flex;
  5. flex-direction: row;
  6. flex-wrap: wrap;
  7. justify-content: space-around;
  8. }
  9. canvas {
  10. border: 1px solid darkgray;
  11. padding: 2px;
  12. margin: 2px 0;
  13. }
  14. </style>
  15. </head>
  16. <body>
  17. <div class="multigame"></div>
  18. <script src="./js/autoload.js"></script>
  19. <script>
  20. require('MultigameManager');
  21. document.addEventListener("JSContentLoaded", (event) => {
  22. let multigameManager = new MultigameManager();
  23. let container = document.getElementsByClassName('multigame')[0];
  24. for(let i = 0; i < 24; i++) {
  25. multigameManager.spawnGame(container);
  26. }
  27. });
  28. </script>
  29. </body>