Skip to content

Commit

Permalink
💄 html
Browse files Browse the repository at this point in the history
  • Loading branch information
fabienjuif authored Dec 2, 2023
1 parent 561dc11 commit 76c8ec7
Showing 1 changed file with 37 additions and 14 deletions.
51 changes: 37 additions & 14 deletions web/index.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,50 @@
<html>
<head>
<meta charset="UTF-8" />
<title>An other bevy 2D game</title>
<style>
body {
background: linear-gradient(
135deg,
white 0%,
white 49%,
black 49%,
black 51%,
white 51%,
white 100%
45deg,
#4b0082 0%,
#8a2be2 100%
);
background-repeat: repeat;
background-size: 20px 20px;
background-repeat: no-repeat;
background-size: cover;
height: 100vh;
margin: 0;
display: flex;
align-items: center;
justify-content: center;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
color: #ffffff;
}
h1 {
font-size: 2.5em;
text-align: center;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
padding: 2em;
}
canvas {
background-color: white;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
outline: none;
}
</style>
</head>
<script type="module">
import init from './wasm_game.js'
init()
</script>
<body>
<h1>An other bevy 2D game</h1>
<script type="module">
import init from './wasm_game.js'
init()
</script>
<script>
interval = setInterval(function () {
let canvas = document.getElementsByTagName("canvas")[0]
if (canvas) {
canvas.focus()
clearInterval(interval)
}
}, 100)
</script>
</body>
</html>

0 comments on commit 76c8ec7

Please sign in to comment.