-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
47 lines (42 loc) · 1.82 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<!DOCTYPE html>
<html>
<head>
<title>irmf-editor</title>
<meta charset="utf-8">
<link rel="stylesheet" href="css/irmf-editor.css">
<link rel="icon" href="favicon.ico" type="image/x-icon" />
</head>
<body>
<div class="full-height">
<div class="split full-height" id="one" style="border:1px solid grey; overflow:hidden"></div>
<div class="split full-height" id="two" style="border:1px solid grey; overflow:hidden">
<canvas id="canvas" width="640" height="480"></canvas>
<button id='slice-button' onclick="goSliceCallback()" style="display:none">Slice it!</button>
<div id="logf" style="height:100px;color:white">
<div>Output messages from the compiler will appear here.</div>
<div>Hit Ctrl-Enter (or Cmd-Enter on Mac) to recompile IRMF shader.</div>
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/split.js/1.5.11/split.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/110/three.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.7.6/dat.gui.min.js"></script>
<script src="js/trackball-controls.js"></script>
<script src="js/glsl-lang.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.20.0/min/vs/loader.js"></script>
<script src="js/startup.js"></script>
<script src="js/wasm_exec.js"></script>
<script>
if (!WebAssembly.instantiateStreaming) { // polyfill
WebAssembly.instantiateStreaming = async (resp, importObject) => {
const source = await (await resp).arrayBuffer();
return await WebAssembly.instantiate(source, importObject);
};
}
const go = new Go();
WebAssembly.instantiateStreaming(fetch("main.wasm"), go.importObject).then((result) => {
go.run(result.instance);
});
</script>
</body>
</html>