12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- <!DOCTYPE html>
- <html dir="ltr" lang="en">
- <head>
- <meta charset="UTF-8" />
- <title>Bevy demo!!</title>
- <meta
- name="description"
- content="A little demo using Bevy so that I can learn how it works lol"
- />
- <meta name="viewport" content="width=device-width,initial-scale=1" />
- <style>
- html,
- body {
- margin: 0;
- padding: 0;
- width: 100%;
- height: 100%;
- font-family: sans-serif;
- }
- body {
- background: linear-gradient(
- 135deg,
- #111513 0%,
- #111513 49%,
- #607068 49%,
- #607068 51%,
- #111513 51%,
- #111513 100%
- );
- background-repeat: repeat;
- background-size: 20px 20px;
- display: flex;
- }
- canvas {
- margin: auto;
- padding: 0;
- /* offset-x | offset-y | blur-radius | spread-radius | color */
- box-shadow: 0 0 16px 2px #000;
- background-color: #000;
- }
- button {
- margin: auto;
- color: #d0e0d8;
- background-color: #111513;
- padding: 1rem;
- font-size: 2rem;
- /* width | style | color */
- border: 2px solid #607068;
- border-radius: 1rem;
- /* offset-x | offset-y | blur-radius | spread-radius | color */
- box-shadow: 0 0 16px 2px #000;
- }
- button:hover {
- cursor: pointer;
- color: #e0f0e8;
- background-color: #212523;
- padding: 1.125rem;
- /* offset-x | offset-y | blur-radius | spread-radius | color */
- box-shadow: 0 0 24px 4px #000;
- }
- </style>
- </head>
- <body>
- <button id="play-button">Play!</button>
- </body>
- <script type="module">
- import init from "./bevy_test.js";
- const playButton = document.getElementById("play-button");
- playButton.addEventListener("click", () => {
- playButton.remove();
- init();
- }, { once: true });
- </script>
- </html>
|