-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
71 lines (62 loc) · 2.12 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>batic</title>
<link rel="shortcut icon" href="res/logo.png">
<!-- main logic -->
<script src="lib/tarp-require/require.js"></script>
<link rel="stylesheet" href="src/index.css">
<script>
Tarp.require("./src/index.js", true);
</script>
<!-- pan/zoom logic -->
<script src="lib/panzoom/panzoom.min.js"></script>
<script>
window.addEventListener("load", () => {
let scene = document.getElementById("canvas");
panzoom(scene, {
smoothScroll: true
})
});
</script>
<!-- code editor logic -->
<script src="lib/ace-builds/src-noconflict/ace.js"></script>
<script src="lib/ace-builds/src-noconflict/ext-language_tools.js"></script>
<script>
window.addEventListener("load", () => {
window.code = ace.edit("code");
window.code.session.setMode("ace/mode/glsl");
ace.require("ace/ext/language_tools");
window.code.setOptions({
enableBasicAutocompletion: true,
enableSnippets: true,
enableLiveAutocompletion: true
});
});
</script>
</head>
<body>
<!-- the loading div will be set to display: none when everything is loaded -->
<div id="loading">
LOADING...
</div>
<!-- everything below this line will only be visible when everything is set up by the js -->
<main>
<canvas id="canvas"></canvas>
</main>
<aside>
<h1>### BATIC </h1>
<a href="https://github.com/anuejn/batic" style="position: absolute; right: 20px; top: 40px;">(WHATS THIS?!)</a>
<div id="controls">
<!-- this is the place for the controls of the shader -->
</div>
<div id="code"></div>
<pre id="errors">
<!-- this is the place for the compiler errors of the shader -->
</pre>
<label>RAW image: <input type="file" id="file"></label>
<label>Image Width: <input type="number" id="width" value="4096"></label>
</aside>
</body>
</html>