-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
executable file
·309 lines (207 loc) · 9.61 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
<!--
____ ___ __ _______
/ __ \/ | / |/ / __ \
/ / / / /| | / /|_/ / /_/ /
/ /_/ / ___ |/ / / / ____/
/_____/_/ |_/_/ /_/_/
416 / YYZ
Mackenzie Davidson
Peter Li
Theresa Ma
Theodore Fox
Susie Kim
Ben Milligan
contribute: https://github.com/mwvd/damp
2k14
--------------------------------------------------------------
children made up most of the terminal ward.
you speak to me, a glossolalia
of flesh in strangers' beds
and that makes all the difference.
when i retreat back
to the chrysalis of
bed linens, i am mimosa pudica, rapid
plant movement, and my fingers
speak seismonastically
against the highway congestion
of your veins.
-->
<html>
<head>
<title>damp</title>
<meta name="description" content="ISSUE #0 // ICARUS">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<meta property="og:title" content="damp // issue #0: icarus" />
<meta property="og:type" content="article" />
<meta property="og:image" content="https://raw.githubusercontent.com/mwvd/damp/gh-pages/assets/1.png" />
<meta property="og:url" content="http://d-a-m-p.com" />
<meta property="og:description" content="everything is cold // everything is quiet // everything is temporary" />
<link rel="shortcut icon" href="assets/favicon.ico" type="image/x-icon">
<link rel="icon" href="assets/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="stylesheets/screen.css" type="text/css">
<link rel="stylesheet" href="stylesheets/transition.css" type="text/css">
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Inconsolata">
<body>
<div class="nomobile">
This project was designed to be viewed on a computer.
</div>
<div class="ghoul" id="ghoul">
<div class="toowet">
<svg class="reach" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="893.662px" height="381.441px" viewBox="0 -175.559 893.662 381.441" enable-background="new 0 -175.559 893.662 381.441"
xml:space="preserve">
<text transform="matrix(1 0 0 1 7.3662 110.187)" font-family="'Optima-ExtraBlack'" font-size="336.8885" letter-spacing="-18">da</text>
<text transform="matrix(1 0 0 1 378.5435 110.187)" font-family="'Optima-ExtraBlack'" font-size="336.8885" letter-spacing="-26">m</text>
<text transform="matrix(1 0 0 1 669.6851 110.187)" font-family="'Optima-ExtraBlack'" font-size="336.8885">p</text>
</svg>
</div>
<div class="tomycity">
<div class="gottawrapthis">
<a href="1" onclick="centeredPopup(this.href,'myWindow','1000','800','yes');return false">1</a> :: <a href="2" onclick="centeredPopup(this.href,'myWindow','1000','800','yes');return false">2</a> :: <a href="3" onclick="centeredPopup(this.href,'myWindow','1000','800','yes');return false">3</a> :: <a href="4" onclick="centeredPopup(this.href,'myWindow','1000','800','yes');return false">4</a> :: <a href="5" onclick="centeredPopup(this.href,'myWindow','1000','800','yes');return false">5</a> :: <a href="6" onclick="centeredPopup(this.href,'myWindow','1000','800','yes');return false">6</a>
</div>
</div>
<div class="three05">
<a href="about/">about / credits</a>
</div>
</div>
<div class="saltcircle">
<img class="spin" src="assets/svgs/everything.svg">
</div>
<div id="container"><br/><br/><br/>just a moment...</div>
<div id="info"></div>
<script src="young/money/threejs/build/three.min.js"></script>
<script src="js/FirstPersonControls.js"></script>
<script src="js/ImprovedNoise.js"></script>
<script src="js/detector.js"></script>
<script src="js/stats.min.js"></script>
<script>
if ( ! Detector.webgl ) {
Detector.addGetWebGLMessage();
document.getElementById( 'container' ).innerHTML = "";
}
var camera, controls, scene, renderer;
var mesh, texture;
var worldWidth = 256, worldDepth = 256,
worldHalfWidth = worldWidth / 2, worldHalfDepth = worldDepth / 2;
var clock = new THREE.Clock();
init();
animate();
function init() {
container = document.getElementById( 'container' );
camera = new THREE.PerspectiveCamera( 60, window.innerWidth / window.innerHeight, 1, 20000 );
scene = new THREE.Scene();
controls = new THREE.FirstPersonControls( camera );
controls.movementSpeed = 500;
controls.lookSpeed = 0.05;
data = generateHeight( worldWidth, worldDepth );
camera.position.y = data[ worldHalfWidth + worldHalfDepth * worldWidth ] * 5 + 100;
var geometry = new THREE.PlaneGeometry( 9000, 9000, worldWidth - 1, worldDepth - 1 );
geometry.applyMatrix( new THREE.Matrix4().makeRotationX( - Math.PI / 2 ) );
for ( var i = 0, l = geometry.vertices.length; i < l; i ++ ) {
geometry.vertices[ i ].y = data[ i ] * 7;
}
texture = new THREE.Texture( generateTexture( data, worldWidth, worldDepth ), new THREE.UVMapping(), THREE.ClampToEdgeWrapping, THREE.ClampToEdgeWrapping );
texture.needsUpdate = true;
mesh = new THREE.Mesh( geometry, new THREE.MeshBasicMaterial( { map: texture } ) );
scene.add( mesh );
renderer = new THREE.WebGLRenderer();
renderer.setClearColor( 0x0000ff );
renderer.setSize( window.innerWidth, window.innerHeight );
container.innerHTML = "";
container.appendChild( renderer.domElement );
//
window.addEventListener( 'resize', onWindowResize, false );
}
function onWindowResize() {
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
renderer.setSize( window.innerWidth, window.innerHeight );
controls.handleResize();
}
function generateHeight( width, height ) {
var size = width * height, data = new Uint8Array( size ),
perlin = new ImprovedNoise(), quality = 1, z = Math.random() * 100;
for ( var j = 0; j < 4; j ++ ) {
for ( var i = 0; i < size; i ++ ) {
var x = i % width, y = ~~ ( i / width );
data[ i ] += Math.abs( perlin.noise( x / quality, y / quality, z ) * quality * 1.75 );
}
quality *= 5;
}
return data;
}
function generateTexture( data, width, height ) {
var canvas, canvasScaled, context, image, imageData,
level, diff, vector3, sun, shade;
vector3 = new THREE.Vector3( 0, 0, 0 );
sun = new THREE.Vector3( 1, 1, 1 );
sun.normalize();
canvas = document.createElement( 'canvas' );
canvas.width = width;
canvas.height = height;
context = canvas.getContext( '2d' );
context.fillStyle = '#000';
context.fillRect( 0, 0, width, height );
image = context.getImageData( 0, 0, canvas.width, canvas.height );
imageData = image.data;
for ( var i = 0, j = 0, l = imageData.length; i < l; i += 4, j ++ ) {
vector3.x = data[ j - 4 ] - data[ j + 4 ];
vector3.y = 2;
vector3.z = data[ j - width * 2 ] - data[ j + width * 2 ];
vector3.normalize();
shade = vector3.dot( sun );
imageData[ i ] = ( shade * 168 ) * ( 0.5 + data[ j ] * 0.007 );
imageData[ i + 1 ] = ( shade * 156 ) * ( 0.5 + data[ j ] * 0.007 );
imageData[ i + 2 ] = ( shade * 196 ) * ( 0.5 + data[ j ] * 0.007 );
}
context.putImageData( image, 0, 0 );
// Scaled 4x
canvasScaled = document.createElement( 'canvas' );
canvasScaled.width = width * 4;
canvasScaled.height = height * 4;
context = canvasScaled.getContext( '2d' );
context.scale( 4, 4 );
context.drawImage( canvas, 0, 0 );
image = context.getImageData( 0, 0, canvasScaled.width, canvasScaled.height );
imageData = image.data;
for ( var i = 0, l = imageData.length; i < l; i += 4 ) {
var v = ~~ ( Math.random() * 5 );
imageData[ i ] += v;
imageData[ i + 1 ] += v;
imageData[ i + 2 ] += v;
}
context.putImageData( image, 0, 0 );
return canvasScaled;
}
//
function animate() {
requestAnimationFrame( animate );
render();
}
function render() {
controls.update( clock.getDelta() );
renderer.render( scene, camera );
}
</script>
<script language="javascript">
var popupWindow = null;
function centeredPopup(url,winName,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
popupWindow = window.open(url,winName,settings)
}
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-55931307-1', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>