-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
9ae5743
commit d8ab1cd
Showing
5 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,93 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>CGL-Web</title> | ||
<style> | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; | ||
background-color: #f0f0f0; | ||
} | ||
canvas { | ||
border: 1px solid #000; | ||
} | ||
html, | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
width: 100%; | ||
height: 100%; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
overflow: hidden; | ||
} | ||
|
||
canvas { | ||
width: 100vmin; | ||
height: 100vmin; | ||
} | ||
|
||
.window { | ||
position: fixed; | ||
top: 10px; | ||
left: 10px; | ||
width: 120px; | ||
background: #1e1e1e; | ||
padding: 15px; | ||
border-radius: 10px; | ||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); | ||
z-index: 9999; | ||
text-align: center; | ||
} | ||
.window p { | ||
font-size: 14px; | ||
margin-bottom: 10px; | ||
color: #bbb; | ||
} | ||
.options { | ||
list-style: none; | ||
padding: 0; | ||
} | ||
.options li { | ||
background: #333; | ||
padding: 10px; | ||
margin: 5px 0; | ||
border-radius: 6px; | ||
text-align: center; | ||
cursor: pointer; | ||
transition: background 0.2s, transform 0.1s; | ||
font-size: 14px; | ||
} | ||
.options li:hover { | ||
background: #444; | ||
transform: scale(1.05); | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<canvas id="cglCanvas" width="800" height="600"></canvas> | ||
<div class="window"> | ||
<p>Left/Right Arrow to move</p> | ||
<p>Up/Down Arrow to change camera angle</p> | ||
<p>R to restart after Game Over</p> | ||
<p>Avoid the Red, Collect the Blue</p> | ||
<p>NOTE: The Web version does not suppoer postprocessing(bloom & toon shading) so looks much shabbier than the native version</p> | ||
</div> | ||
<script> | ||
var Module = { | ||
onRuntimeInitialized: function () { | ||
console.log("WASM Module Loaded"); | ||
}, | ||
canvas: document.getElementById("cglCanvas"), | ||
}; | ||
</script> | ||
<script src="./cglweb.js"></script> | ||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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