Bindgen for raygui
This commit is contained in:
parent
b9d7d9ba7e
commit
ff8f538996
3 changed files with 64 additions and 13 deletions
|
|
@ -4,12 +4,20 @@
|
|||
<meta charset="utf-8">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
|
||||
<title>Odin + Raylib on the web</title>
|
||||
<meta name="title" content="Odin + Raylib on the web">
|
||||
<meta name="description" content="Make games using Odin + Raylib that work in the browser">
|
||||
<title>Transformation Visualizer</title>
|
||||
<meta name="title" content="Transformation Visualizer">
|
||||
<meta name="description" content="Math visualization tool">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
|
||||
<style>
|
||||
* {
|
||||
vertical-align: baseline;
|
||||
border: 0 none;
|
||||
outline: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
body {
|
||||
margin: 0px;
|
||||
overflow: hidden;
|
||||
|
|
@ -27,6 +35,11 @@
|
|||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
overflow: hidden;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
|
@ -61,17 +74,16 @@
|
|||
e._start();
|
||||
e.main_start();
|
||||
|
||||
function send_resize() {
|
||||
var canvas = document.getElementById('canvas');
|
||||
canvas.width = document.documentElement.clientWidth;
|
||||
canvas.height = document.documentElement.clientHeight;
|
||||
console.log(canvas.width, canvas.height);
|
||||
e.web_window_size_changed(canvas.width, canvas.height);
|
||||
}
|
||||
function send_resize() {
|
||||
var canvas = document.getElementById('canvas');
|
||||
canvas.width = document.documentElement.clientWidth;
|
||||
canvas.height = document.documentElement.clientHeight;
|
||||
e.web_window_size_changed(canvas.width, canvas.height);
|
||||
}
|
||||
|
||||
window.addEventListener('resize', function(event) {
|
||||
send_resize();
|
||||
}, true);
|
||||
window.addEventListener('resize', function(event) {
|
||||
send_resize();
|
||||
}, true);
|
||||
|
||||
send_resize();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue