Skip to content

Commit d066b31

Browse files
committed
Update
1 parent 70cc873 commit d066b31

File tree

3 files changed

+10242
-2
lines changed

3 files changed

+10242
-2
lines changed

index.html

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,49 @@
1-
<!doctypehtml><html><head><meta charset=utf-8><meta content="text/html; charset=utf-8"http-equiv=Content-Type><title>raylib-nuklear</title><style>body,html{margin:0;height:100vh;max-width:100vw}body{display:flex;align-items:center;justify-content:center;flex-direction:column;color:#fff;background:#000}#console{overflow:auto}</style></head><body><canvas id=canvas oncontextmenu=event.preventDefault()></canvas><script>window.Module={canvas:document.getElementById("canvas"),print:(...n)=>{const e=document.getElementById("console"),o=n.join(" ");console.log(o),e&&(e.innerText+=o+"\n",e.scrollTop=e.scrollHeight)}}</script><script async src=index.js></script></body></html>
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6+
<title>raylib-nuklear: Demo</title>
7+
<meta name="description" content="Use Nuklear GUI within raylib: https://github.com/RobLoach/raylib-nuklear">
8+
<meta name="viewport" content="width=device-width, initial-scale=1">
9+
<meta name="author" content="Rob Loach">
10+
<style>
11+
html, body {
12+
margin: 0;
13+
height: 100vh;
14+
max-width: 100vw;
15+
}
16+
body {
17+
display: flex;
18+
align-items: center;
19+
justify-content: center;
20+
flex-direction: column;
21+
color: white;
22+
background: black;
23+
}
24+
#console {
25+
overflow: auto;
26+
}
27+
</style>
28+
</head>
29+
30+
<body>
31+
<canvas id="canvas" oncontextmenu="event.preventDefault()"></canvas>
32+
<!-- <pre id="console"></pre> -->
33+
<script type='text/javascript'>
34+
window.Module = {
35+
canvas: document.getElementById('canvas'),
36+
print: (...args) => {
37+
const consoleElement = document.getElementById('console')
38+
const text = args.join(' ')
39+
console.log(text);
40+
if (consoleElement) {
41+
consoleElement.innerText += text + "\n"
42+
consoleElement.scrollTop = consoleElement.scrollHeight
43+
}
44+
}
45+
}
46+
</script>
47+
<script async type="text/javascript" src="index.js"></script>
48+
</body>
49+
</html>

index.js

Lines changed: 10193 additions & 1 deletion
Large diffs are not rendered by default.

index.wasm

660 KB
Binary file not shown.

0 commit comments

Comments
 (0)