Skip to content

Commit 65fa70a

Browse files
committed
Upload 2022 C++ demo.
1 parent ce2f434 commit 65fa70a

File tree

4 files changed

+42
-0
lines changed

4 files changed

+42
-0
lines changed

demos/cpp-engine-2022/index.html

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<!doctype HTML>
2+
<html lang=en-us>
3+
4+
<head>
5+
<meta charset=utf-8>
6+
<title>LibTCOD Emscripten demo</title>
7+
<style>
8+
body {
9+
background-color: #000;
10+
margin: 0;
11+
padding: none;
12+
}
13+
14+
.center {
15+
display: flex;
16+
justify-content: center;
17+
align-items: center;
18+
}
19+
20+
canvas {
21+
display: block;
22+
aspect-ratio: 800 / 500;
23+
width: calc(min(100vw, 160vh));
24+
}
25+
</style>
26+
</head>
27+
28+
<body>
29+
<div class=center>
30+
<canvas id=canvas oncontextmenu=event.preventDefault() tabindex=-1></canvas>
31+
</div>
32+
<script>
33+
var Module = {
34+
print(...args) { console.log("", ...args); },
35+
canvas: document.getElementById('canvas'),
36+
};
37+
</script>
38+
<script async src=tcod-engine-2022.js></script>
39+
</body>
40+
41+
</html>
11.9 KB
Binary file not shown.

demos/cpp-engine-2022/tcod-engine-2022.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
906 KB
Binary file not shown.

0 commit comments

Comments
 (0)