index.html 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <!DOCTYPE html>
  2. <html dir="ltr" lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <title>Bevy demo!!</title>
  6. <meta
  7. name="description"
  8. content="A little demo using Bevy so that I can learn how it works lol"
  9. />
  10. <meta name="viewport" content="width=device-width,initial-scale=1" />
  11. <style>
  12. html,
  13. body {
  14. margin: 0;
  15. padding: 0;
  16. width: 100%;
  17. height: 100%;
  18. font-family: sans-serif;
  19. }
  20. body {
  21. background: linear-gradient(
  22. 135deg,
  23. #111513 0%,
  24. #111513 49%,
  25. #607068 49%,
  26. #607068 51%,
  27. #111513 51%,
  28. #111513 100%
  29. );
  30. background-repeat: repeat;
  31. background-size: 20px 20px;
  32. display: flex;
  33. }
  34. canvas {
  35. margin: auto;
  36. padding: 0;
  37. /* offset-x | offset-y | blur-radius | spread-radius | color */
  38. box-shadow: 0 0 16px 2px #000;
  39. background-color: #000;
  40. }
  41. button {
  42. margin: auto;
  43. color: #d0e0d8;
  44. background-color: #111513;
  45. padding: 1rem;
  46. font-size: 2rem;
  47. /* width | style | color */
  48. border: 2px solid #607068;
  49. border-radius: 1rem;
  50. /* offset-x | offset-y | blur-radius | spread-radius | color */
  51. box-shadow: 0 0 16px 2px #000;
  52. }
  53. button:hover {
  54. cursor: pointer;
  55. color: #e0f0e8;
  56. background-color: #212523;
  57. padding: 1.125rem;
  58. /* offset-x | offset-y | blur-radius | spread-radius | color */
  59. box-shadow: 0 0 24px 4px #000;
  60. }
  61. </style>
  62. </head>
  63. <body>
  64. <button id="play-button">Play!</button>
  65. </body>
  66. <script type="module">
  67. import init from "./bevy_test.js";
  68. const playButton = document.getElementById("play-button");
  69. playButton.addEventListener("click", () => {
  70. playButton.remove();
  71. init();
  72. }, { once: true });
  73. </script>
  74. </html>