-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
199 lines (185 loc) · 9.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
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
193
194
195
196
197
198
199
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Holiday Shaders 2</title>
<link rel="stylesheet" href="styles/main.css" />
<!-- Bootstrap & JQuery -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/darkly/bootstrap.min.css"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js">
</script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"
integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
crossorigin="anonymous">
</script>
<!-- Three.js -->
<!-- TODO: Move this to vendor/ -->
<!--<script src="scripts/three.min.js"></script>-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/88/three.js"></script>
<!-- SHA-256 hash function -->
<script src="scripts/sha256.js"></script>
<!-- Helper libraries -->
<script src="scripts/Messenger.js"></script>
<script src="scripts/NoiseSource.js"></script>
<script src="scripts/AnimationManager.js"></script>
<script src="scripts/UniformManager.js"></script>
<script src="scripts/ShaderLibrary.js"></script>
<script src="scripts/ShaderSelector.js"></script>
<script src="scripts/MaterialManager.js"></script>
<script src="scripts/ShaderViewer.js"></script>
<script src="scripts/DimensionsSelector.js"></script>
<script src="scripts/ShaderRenderer.js"></script>
<script src="scripts/ResolutionManager.js"></script>
<script src="scripts/InputManager.js"></script>
<script src="scripts/ModelSelector.js"></script>
<!-- Main Script -->
<script src="scripts/main2.js"></script>
</head>
<body>
<div class="gh-icon">
<a href="https://github.com/ptrgags/holiday-shaders2"><img alt="GitHub icon that links to the project repo" src="./assets/github-mark-white.svg" /></a>
</div>
<div class="container-fluid">
<!-- Title and main buttons to switch shaders/open settings -->
<h2 class="text-center">Holiday Shaders 2</h2>
<div id="links" class="text-center">
<a href="index.html">Home</a>
•
<a href="tutorials.html">Tutorials</a>
•
<a href="credits.html">Credits</a>
•
<a href="contact.html">Contact</a>
</div>
<div class="row">
<!-- Canvas for displaying the shader -->
<div class="col-sm-7 text-center">
<div class="justify-controls">
<!-- Size Controls -->
<div id="resolution" class="vertical-space">
<div class="row">
<div class="col-sm-2">
<label>Size</label>
</div>
<div class="col-sm-10">
<button id="size-avatar" class="btn btn-primary">Avatar</button>
<button id="size-small" class="btn btn-primary">Small Card</button>
<button id="size-medium" class="btn btn-primary">Medium Card</button>
<button id="size-large" class="btn btn-primary">Large Card</button>
<button id="size-small-tex" class="btn btn-primary">Small Texture</button>
<button id="size-medium-tex" class="btn btn-primary">Medium Texture</button>
<button id="size-large-tex" class="btn btn-primary">Large Texture</button>
</div>
</div>
</div>
<!-- Animation controls -->
<div id="animation" class="vertical-space">
<div class="row">
<div class="col-sm-2">
<label>Animation</label>
</div>
<div class="col-sm-10">
<button id="pause" class="btn btn-primary">Pause</button>
<button id="rewind" class="btn btn-primary">Rewind</button>
Elapsed Time (sec): <span id="animation-time"></span>
</div>
</div>
</div>
</div>
<!-- The Three.js canvas + a wrapper for full-screen -->
<div id="wrapper">
<canvas id="screen"></canvas>
</div>
</div>
<!-- Info panel for shader -->
<div class="col-sm-5">
<h4 class="text-center">
<!--<button id="prev" class="btn btn-primary">Previous</button>-->
<a id="prev"><span class="glyphicon glyphicon-menu-left"></span></a>
<span class="wide">
<span id="shader-title">[TITLE]</span>
- (<span id="shader-index">[CURRENT]</span>/<span id="num-shaders">[MAX]</span>)
</span>
<a id="next"><span class="glyphicon glyphicon-menu-right"></span></a>
</h4>
<p id="shader-description">[INFO]</p>
<!-- Collapsible Settings panel -->
<div id="settings" class="well">
<h3 class="text-center">Settings</h3>
<div id="noise-source">
<label>Noise Source</label>
<!-- Use a SHA-256 hash as the noise buffer -->
<div class="form-inline">
<input type="radio" name="noise-source" value="sha_hash"/>
Hash
<input id="hash-input" placeholder="Type any text here!" class="form-control"/>
→
<code class="hash" id="hash-output"></code>
</div>
<!-- Use the current time as the noise buffer -->
<div class="form-group">
<input type="radio" name="noise-source" value="time_hash"/>
Time
→
<span id="time"></span>
→
<code class="hash" id="time-hash"></code>
</div>
<!-- Use random numbers as the buffer -->
<div class="form-group">
<input type="radio" name="noise-source" value="rand_hash"/>
Random
→
<code class="hash" id="rand-hash"></code>
<br/>
Update Speed: Slow
<input id="rand-freq" type="range" min="1" max="20" step="1" value="10" />
Fast
</div>
<!-- Toggle bits with the keyboardd -->
<div class="form-group">
<input type="radio" name="noise-source" value="keyboard_hash"/>
Keyboard
→
<code class="hash" id="keyboard-hash"></code>
</div>
<!-- MANUAL OVERRIDE -->
<div class="form-group">
<input type="radio" name="noise-source" value="manual_hash"/>
Manual
→
<code class="hash" id="manual-hash"></code>
<br/>
(<a href="#manual-controls" data-toggle="collapse">Show/Hide Sliders</a>)
<div id="manual-controls" class="collapse"></div>
</div>
</div>
<div id="dimension-select">
<label>Dimensions</label>
<button id="mode-2d" class="btn btn-primary">2D</button>
<button id="mode-3d" class="btn btn-primary">3D</button>
</div>
<div id="settings-3d">
<label>3D Model</label>
<div class="form-group">
<select id="model-select" class="form-control">
</select>
</div>
<div class="form-group">
<input id="rotate-model" type="checkbox" checked/>
Rotate
</div>
</div>
<div id="vertex-settings">
<label>Vertex Shader</label>
<div class="form-group">
<select id="vertex-shader" class="form-control">
</select>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>