-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathindex.html
158 lines (143 loc) · 5.73 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Shader Expo</title>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css"
integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">
<link rel="stylesheet" href="./css/style.css">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-119972196-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'UA-119972196-1');
</script>
<script src="https://cdn.jsdelivr.net/pako/1.0.3/pako.min.js"></script>
</head>
<body>
<button id="run-shader">
<div class="button-ui">
<label>
<input id="live-edit" type="checkbox" name="check" checked />
<span class="label-text">Live</span>
</label>
</div>
<i class="fa fa-2x fa-play"></i>
</button>
<section class="ui-menu" id="ui-menu">
<div id="compile-time">compiled in 0.00 miliseconds</div>
<div class="ui-menu__item">
<button class="ui-menu__button"><i class="fas fa-file-upload"></i></button>
<div class="ui-menu__dropdown">
<label class="range-slider _file">
<input class="file-input" type="file" id="file-load" />
</label>
<label class="range-slider _file">
<input class="file-input model-load" type="file" id="model-load" />
</label>
</div>
</div>
<div class="ui-menu__item">
<button class="ui-menu__button"><i class="fas fa-file-export"></i></button>
<div class="ui-menu__dropdown">
<label class="range-slider _file">
<input class="text-input" type="text" id="export-name" placeholder="export file name" />
</label>
<label class="range-slider _file">
<button class="ui-menu__dropdown--button" id="export-html">Export HTML</button>
</label>
</div>
</div>
<div class="ui-menu__item">
<button class="ui-menu__button"><i class="fas fa-sync-alt"></i></button>
<div class="ui-menu__dropdown">
<label class="range-slider">
<input id="auto-rotate" type="checkbox" name="check" checked />
<span class="label-text">Auto Rotate</span>
</label>
<label class="range-slider">
<input class="range-slider__range" id="rot-x" type="range" value="0.01" min="0" max="1" step="0.01">
<span class="range-slider__text">Rotation X</span>
</label>
<label class="range-slider">
<input class="range-slider__range" id="rot-y" type="range" value="0.01" min="0" max="1" step="0.01">
<span class="range-slider__text">Rotation Y</span>
</label>
</div>
</div>
<div class="ui-menu__item">
<select class="select-box" type="file" id="select-model">
<option value="CUBE">Cube</option>
<option value="SPHERE">Sphere</option>
<option value="PLANE">Plane</option>
<option value="TORUS">Torus</option>
<option value="TEAPOT">Teapot</option>
</select>
</div>
<div class="ui-menu__item">
<select class="select-box" type="file" id="select-box">
<option value="default">Default Shader</option>
<option value="fire_grid">Fire Grid</option>
<option value="circle_spiral">Circle Spiral</option>
<option value="shader_ball">Shader Balls</option>
<option value="snowflakes">Snow Flakes</option>
<option value="ocean">Ocean</option>
<option value="mandelbrot">Mandelbrot</option>
<option value="light_show">Light Show</option>
<option value="specular">Specular</option>
<option value="rim_light">Rim Light</option>
</select>
</div>
<div class="ui-menu__item">
<button id="share-expo" class="ui-menu__button"><i class="fas fa-share"></i></button>
</div>
</section>
<div class="popup-window hidden" id="pop-up">
<div class="popup-window__innercontent">
<p>Share Your Shader.</p>
<div class="popup-window__innercontent--flex">
<input onclick="event.stopPropagation()" id="share-link" type="text" />
<button class="ui-menu__button" id="copy-share-link"><i class="fas fa-copy"></i></button>
</div>
</div>
</div>
<main class="wrapper">
<div id="left">
<section class="canvas-wrapper">
<canvas id="c"></canvas>
<div id="fps-counter"></div>
</section>
</div>
<div class="right">
<div class="editor" id="vertex-shader-code">
</div>
<div class="editor" id="fragment-shader-code">
</div>
</div>
</main>
<div id="preloader" class="preloader">
<div>
<div class="loader"></div>
Loading....
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gl-matrix/2.8.1/gl-matrix-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.3/ace.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.3/ext-language_tools.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.3/mode-glsl.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.3/snippets/glsl.js"></script>
<script src="./js/utils.js"></script>
<script src="./js/helpers.js"></script>
<script src="./js/ui.js"></script>
<script src="./js/Editor.js"></script>
<script src="./js/Camera.js"></script>
<script src="./js/RawModel.js"></script>
<script src="./js/Shader.js"></script>
<script src="./js/Mesh.js"></script>
<script src="./index.js"></script>
</body>
</html>