-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
192 lines (189 loc) · 8.32 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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Grubix - Cube visualizer</title>
<link href="css/index.css" rel="stylesheet">
<link rel="shortcut icon" type="image/svg+xml" href="assets/favicon.svg" />
</head>
<body>
<div class="container">
<div class="sidebar-right" id="sidebar">
<button type="button" id="toggle-sidebar">Toggle sidebar</button>
<div class="option-container" id="light">
<label for="light-id">Light ID</label>
<select id="light-id">
</select>
<button id="add-light">+</button>
<button id="remove-light">-</button>
<br>
<label for="light-type">Light type</label>
<select id="light-type">
<option value="direct" selected>Direct</option>
<option value="point">Point</option>
<option value="spot">Spot</option>
</select>
<br>
<div id="light-direct">
<label for="light-direct-azimuth">Azimuth direction</label>
<input type="range" min="-180" max="180" value="0" id="light-direct-azimuth">
<br>
<label for="light-direct-elevation">Elevation direction</label>
<input type="range" min="0" max="180" value="90" id="light-direct-elevation">
<br>
<label for="light-direct-color">Color</label>
<input type="color" id="light-direct-color" name="light-direct-color" value="#c0ffee">
</div>
<div id="light-point" class="hidden">
<label for="light-point-x">Position x</label>
<input type="range" min="-60" max="60" value="0" id="light-point-x">
<br>
<label for="light-point-y">Position y</label>
<input type="range" min="-60" max="60" value="0" id="light-point-y">
<br>
<label for="light-point-z">Position z</label>
<input type="range" min="-60" max="60" value="30" id="light-point-z">
<br>
<label for="light-point-color">Color</label>
<input type="color" id="light-point-color" name="light-point-color" value="#c0ffee">
<br>
<label for="light-point-decay">Decay</label>
<select id="light-point-decay">
<option value="0" selected>0</option>
<option value="1">1</option>
<option value="2">2</option>
</select>
<br>
<label for="light-point-target">Target Distance</label>
<input type="range" min="10" max="200" value="0" id="light-point-target">
<br>
</div>
<div id="light-spot" class="hidden">
<label for="light-spot-x">Position x</label>
<input type="range" min="-60" max="60" value="0" id="light-spot-x">
<br>
<label for="light-spot-y">Position y</label>
<input type="range" min="-60" max="60" value="0" id="light-spot-y">
<br>
<label for="light-spot-z">Position z</label>
<input type="range" min="-60" max="60" value="30" id="light-spot-z">
<br>
<label for="light-spot-azimuth">Azimuth direction</label>
<input type="range" min="-180" max="180" value="0" id="light-spot-azimuth">
<br>
<label for="light-spot-elevation">Elevation direction</label>
<input type="range" min="0" max="180" value="90" id="light-spot-elevation">
<br>
<label for="light-spot-color">Color</label>
<input type="color" id="light-spot-color" name="light-spot-color" value="#c0ffee">
<label for="light-spot-decay">Decay</label>
<select id="light-spot-decay">
<option value="0" selected>0</option>
<option value="1">1</option>
<option value="2">2</option>
</select>
<br>
<label for="light-spot-target">Target Distance</label>
<input type="range" min="1" max="200" value="1" id="light-spot-target">
<br>
<label for="light-spot-cone-out">Cone out</label>
<input type="range" min="0" max="180" value="100" id="light-spot-cone-out">
<br>
<label for="light-spot-cone-in">Cone in</label>
<input type="range" min="0" max="100" value="50" id="light-spot-cone-in">
<br>
</div>
</div>
<div class="option-container">
<label for="ambient-select">Ambient type</label>
<select id="ambient-select">
<option value="skybox" selected>Skybox + Irradiance</option>
<option value="ambient">Ambient</option>
<option value="hemispheric">Hemispheric</option>
</select>
<div id="ambient" class="hidden">
<label for="ambient-color">Main ambient color</label>
<input type="color" id="ambient-color" name="ambient-color" value="#c0ffee">
</div>
<div id="hemispheric" class="hidden">
<label for="hemispheric-upper-color">Upper color</label>
<input type="color" id="hemispheric-upper-color" name="hemispheric-upper-color" value="#c0ffee">
<br>
<label for="hemispheric-lower-color">Lower color</label>
<input type="color" id="hemispheric-lower-color" name="hemispheric-lower-color" value="#beb02a">
<br>
<label for="hemispheric-azimuth">Azimuth direction</label>
<input type="range" min="-180" max="180" value="0" id="hemispheric-azimuth">
<br>
<label for="hemispheric-elevation">Elevation direction</label>
<input type="range" min="0" max="180" value="90" id="hemispheric-elevation">
</div>
</div>
<div class="option-container">
<label for="diffuse-select">Diffuse type</label>
<select id="diffuse-select">
<option value="lambert" selected>Lambert</option>
<option value="toon">Toon</option>
</select>
<br>
<label for="diffuse-color">Color</label>
<input type="color" id="diffuse-color" name="diffuse-color" value="#beb02a">
<br>
<label for="diffuse-texture">Texture Intensity</label>
<input type="range" min="0" max="100" value="100" id="diffuse-texture">
<br>
<div id="toon" class="hidden">
<label for="diffuse-toon-threshold">Toon Threshold</label>
<input type="range" min="0" max="100" value="0" id="diffuse-toon-threshold">
<br>
</div>
</div>
<div id="specular" class="option-container">
<label for="specular-select">Specular type</label>
<select id="specular-select">
<option value="phong" selected>Phong</option>
<option value="blinn">Blinn</option>
</select>
<br>
<label for="specular-color">Color</label>
<input type="color" id="specular-color" name="specular-color" value="#8f00ff">
<br>
<label for="specular-shininess">Shininess</label>
<input type="range" min="1" max="200" value="10" id="specular-shininess">
</div>
<div class="option-container">
<label for="enable-pom">Enable Parallax Occlusion Mapping</label>
<input type="checkbox" id="enable-pom" name="enable-pom" checked="checked">
<br>
<label for="pom-scale">Parallax scale</label>
<input type="range" id="pom-scale" name="pom-scale" min="0.001" max="0.03" step="0.0005">
</div>
<div class="option-container">
<label for="enable-pbr">Enable PBR</label>
<input type="checkbox" id="enable-pbr" name="enable-pbr" checked="checked">
<br>
<label for="pbr-metallic">PBR metallic</label>
<input type="range" id="pbr-metallic" name="pbr-metallic" min="0.0" max="1.0" step="0.0005">
<br>
<label for="pbr-roughness">PBR roughness</label>
<input type="range" id="pbr-roughness" name="pbr-roughness" min="0.0" max="1.0" step="0.0005">
</div>
<div class="option-container">
<button id="scramble">Scramble!</button>
<button id="solve">Solve!</button>
<button id="reset">Reset!</button>
</div>
</div>
<div class="left">
<div id="loading-spinner-container">
<div id="loading-spinner"></div>
</div>
<canvas id="canvas"></canvas>
</div>
</div>
<script src="js/lib/cube.js"></script>
<script src="js/lib/solve.js"></script>
<script type="module" src="js/index.js"></script>
</body>
</html>