-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
561dc11
commit 76c8ec7
Showing
1 changed file
with
37 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |