-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathindex.html
executable file
·311 lines (278 loc) · 9.38 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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
<!doctype html>
<html lang="en">
<head>
<title>Codevember 2016</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<link rel="stylesheet" type="text/css" href="css/styles.css" media="screen" />
<link href="https://fonts.googleapis.com/css?family=Lato:100,200,400|Playfair+Display:700" rel="stylesheet">
<style>
html{
-moz-user-select: auto;
-khtml-user-select: auto;
-webkit-user-select: auto;
-ms-user-select: auto;
user-select: auto;
}
body{ overflow: auto; font-weight: 200;}
section{ padding: 40px 0; position: absolute; }
h1{ font-family: 'Playfair Display', serif; font-size: 30px; margin-bottom: .5em; }
h2{ font-family: 'Playfair Display', serif; font-size: 16px;}
#intro{ margin-top: 2em;margin-bottom: 2em; max-width: 600px;}
#intro p{ margin-bottom: 1em; }
li{ width: 300px; height: 140px; float: left; padding: 2px; cursor: pointer; }
li h2{ position: absolute; left: 20px; top: 20px; right: 20px; }
li p, li h2{ z-index: 100 }
li div{ border: 1px solid rgba( 0,0,0, 1 ); position: relative; width: 100%; height: 100%; transition: border 250ms ease-out; overflow: hidden; background-image: url(assets/poster.jpg);}
li div .overlay{ position: absolute; left: 0; top: 0; right: 0; bottom: 0;
/* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#000000+0,000000+100&0+0,1+100 */
background: -moz-radial-gradient(center, ellipse cover, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 100%); /* FF3.6-15 */
background: -webkit-radial-gradient(center, ellipse cover, rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%); /* Chrome10-25,Safari5.1-6 */
background: radial-gradient(ellipse at center, rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#000000',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
}
li.disabled{ cursor: default; opacity: .1;}
li:not(.disabled):hover div{ border: 1px solid rgba( 255, 255, 255, 1 ); }
li p{ position: absolute; left: 20px; bottom: 20px; right: 20px;}
ul{ list-style-type: none; }
canvas{ position: fixed; left: 0; top: 0; right: 0; bottom: 0; }
.break{ clear: both;}
a{ color: inherit; }
.number{ position: absolute; left: 0; right: 0; text-align: center; top: 50%; font-size: 240px; line-height: 0; opacity: .1; font-weight: 100 }
</style>
</head>
<body>
<section>
<h1>Codevember 2016</h1>
<p>Jaume Sanchez Elias · <a href="https://twitter.com/thespite" >@thespite</a></p>
<div id="intro">
<p>This are the projects created for Codevember 2016 -a challenge for developers creating a creative sketch by day during the whole month of November.</p>
<p>Initially I wanted to mix very different browsers technologies: CSS, SVG, WebGL, and not limited to just visual effects. In the end i went with WebGL + three.js, creating a basic boilerplate and starting from scratch every project. Of course as I went, the toolbox grew considerably, with things like ShaderTexture, Odeo and a lot of shaders and helper methods.</p>
<p>I've tried to make all sites work in as many platforms as possible, but the time constrains don't allow for a lot of beta testing and bug hunting. Wobbly Earth, for instance, doesn't work on my Nexus 5, but works everywhere else I've tried. I have reports that Lines in a Sphere doesn't go well with MacBook Airs. If you find any issue and want to help debug, <a href="https://twitter.com/thespite" >tweet me</a>.</p>
<p>So this is all I've been able to churn out, between work, two kids, broken eyeglasses...<br/>Just don't judge the code too strictly :)</p>
<p><b>Inside info:</b> in all the effects with music (10, 16 and 30) you can open the console and run <span class="code" >odeo.playSoundCloud( "whatever_soundcloud_url" )</span> and you can change the track.</p>
<p><b>Even more inside info:</b> in all the effects with FBOS, shadows, etc. you can probably open the console and run <span class="code" >helper.show(true)</span> to see the FBOHelper.</p>
<p><b>Source code</b> for all experiments -and discarded ones- is here: <a href="https://github.com/spite/codevember-2016" >codevember-2016</a></p>
</div>
<ul id="entries">
<li>
<div>
<h2>Procedurally textured torus</h2>
<p>A.k.a. "The decadent golden-plated knot torus"</p>
</div>
</li>
<li>
<div>
<h2>Dotty Earth</h2>
<p>All is full of dots</p>
</div>
</li>
<li>
<div>
<h2>Strange attractors</h2>
<p>Strangely attractive strange attractors</p>
</div>
</li>
<li>
<div>
<h2>Trencadís texture</h2>
<p>A surface shader to make a plane look like glazed porcelain</p>
</div>
</li>
<li>
<div>
<h2>Particle field</h2>
<p>Oldschool plasma moving particles with motion blur</p>
</div>
</li>
<li>
<div>
<h2>Wobbly Earth</h2>
<p>The day the Earth didn't stand still</p>
</div>
</li>
<li>
<div>
<h2>A (very) poor man's GI</h2>
<p>Computing Global Illumination (GI) by rendering the scene from every vertex... four times!</p>
</div>
</li>
<li>
<div>
<h2>Metaballs</h2>
<p>Shiny striped metaballs</p>
</div>
</li>
<li>
<div>
<h2>Street View PBR</h2>
<p>Hacking image-based lighting (IBL) into a material</p>
</div>
</li>
<li>
<div>
<h2>Odeo</h2>
<p>Music visualisation to demo an audio manager</p>
</div>
</li>
<li>
<div>
<h2>Blocky Water</h2>
<p>Oldschool water with lots of AO</p>
</div>
</li>
<li>
<div>
<h2>AO Blocks</h2>
<p>Take a walk on the occluded side</p>
</div>
</li>
<li>
<div>
<h2>Sphere Impostor</h2>
<p>Don't use many triangles when you can use just one!</p>
</div>
</li>
<li>
<div>
<h2>Clock Flag</h2>
<p>See time fly</p>
</div>
</li>
<li>
<div>
<h2>Crystals</h2>
<p>Generative rocks, or minerals, Marie</p>
</div>
</li>
<li>
<div>
<h2>Torus</h2>
<p>Music visualisation simulating a phosphor oscilloscope</p>
</div>
</li>
<li>
<div>
<h2>Conway</h2>
<p>GPGPU Game of Life with AO and shadows</p>
</div>
</li>
<li>
<div>
<h2>Starfield</h2>
<p>It's a very small universe</p>
</div>
</li>
<li>
<div>
<h2>DOF Tunnel</h2>
<p>Long tunnel with lots of postprocessing</p>
</div>
</li>
<li>
<div>
<h2>Lines on a Sphere</h2>
<p>Lines and streaks moving in the surface of a sphere</p>
</div>
</li>
<li>
<div>
<h2>Numerical renderer</h2>
<p>Rendering with numbers (very digital!)</p>
</div>
</li>
<li>
<div>
<h2>Line thickness</h2>
<p>Creating an engraving effect with shaders</p>
</div>
</li>
<li>
<div>
<h2>Emitter</h2>
<p>Weird thing that started as a particle emitter and ended up like Matrix sentinels</p>
</div>
</li>
<li>
<div>
<h2>AO Spheres</h2>
<p>Boids and soft shadows and analytical ambient occlusion</p>
</div>
</li>
<li>
<div>
<h2>Lines</h2>
<p>More lines and feedback effect</p>
</div>
</li>
<li>
<div>
<h2>Volumetric rendering</h2>
<p>March your ray through a cloud</p>
</div>
</li>
<li>
<div>
<h2>Medusa</h2>
<p>Random jellyfish-like objects</p>
</div>
</li>
<li>
<div>
<h2>Greeble AO</h2>
<p>Rotating greeble, with SSAO</p>
</div>
</li>
<li>
<div>
<h2>Bands</h2>
<p>Twisty pieces of sliced floor</p>
</div>
</li>
<li>
<div>
<h2>Triangle tunnel</h2>
<p>A WebGL remake of GMUNK's PYRADICAL</p>
</div>
</li>
</ul>
<span class="break"></span>
</section>
<script>
var panel = document.querySelector( 'section' );
onWindowResize();
var entries = [].slice.call( document.querySelectorAll( '#entries li' ) );
var panels = [].slice.call( document.querySelectorAll( '#entries li div' ) );
entries.forEach( function( entry, id ) {
var div = entry.querySelector( 'div' );
var overlay = document.createElement( 'div' );
overlay.className = 'overlay';
div.appendChild( overlay );
var span = document.createElement( 'span' );
span.className = 'number';
span.textContent = id + 1;
div.appendChild( span );
div.style.backgroundSize = '500% 1250%';
var x = id % 5;
var y = Math.floor ( id / 5 );
div.style.backgroundPosition = -( x * 294 ) + 'px ' + ( - y * 280 - 70 ) + 'px';
if( entry.getAttribute( 'data-disabled' ) === null ) {
entry.addEventListener( 'click', function( e ) {
window.location = './' + ( id + 1 );
})
} else {
entry.classList.add( 'disabled' );
}
})
window.addEventListener( 'resize', onWindowResize );
function onWindowResize() {
var dPR = window.devicePixelRatio;
var w = window.innerWidth * dPR - 80;
var liW = 300 * dPR;
var pW = Math.floor( w / liW ) * liW;
panel.style.width = pW / dPR + 'px';
panel.style.left = Math.round( .5 * ( window.innerWidth - pW / dPR ) ) + 'px';
}
</script>
</body>
</html>