-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
342 lines (259 loc) · 8.63 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
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
<!-- ben olayinka made this with his computer -->
<!DOCTYPE html>
<html lang="en">
<head>
<title>späti party</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="shortcut icon" href="favicon.ico"/>
<link rel="apple-touch-icon-precomposed"
sizes="144x144" href="favicon-apple-touch-144.png">
<link rel="icon" sizes="128x128" href="favicon.icns">
<link rel="manifest" href="manifest.json"/>
<!-- Material Icons -->
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<!-- Bootstrap -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
<style>
body {
margin: 0;
background-image: url("banner.jpg");
background-position: center; /* Center the image */
background-repeat: no-repeat; /* Do not repeat the image */
background-size: cover; /* Resize the background image to cover the entire container */
background-color: #F3BEBD;
color: #fff;
font-family: Monospace;
font-size: 13px;
line-height: 24px;
overscroll-behavior: none;
height: 100vh;
width: 100vw;
}
a {
color: #fff;
text-decoration: none;
}
a:hover {
color: #fff;
text-decoration: underline;
}
button {
cursor: pointer;
text-transform: uppercase;
}
.info {
position: absolute;
top: 0px;
width: 100%;
padding: 10px;
box-sizing: border-box;
text-align: center;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
pointer-events: none;
z-index: 1; /* TODO Solve this in HTML */
}
canvas {
display: block;
}
a, button, input, select {
pointer-events: auto;
}
.modal-backdrop {
background-color: red;
}
.modal-body {
background-color: red;
}
.material-icons{
display: inline-flex;
vertical-align: top;
}
.absolute-center {
text-align: center;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.loading:after {
content: ' .';
animation: dots 1s steps(5, end) infinite;
}
.hide {
display: none;
}
@keyframes dots {
0%, 20% {
color: rgba(0,0,0,0);
text-shadow:
.25em 0 0 rgba(0,0,0,0),
.5em 0 0 rgba(0,0,0,0);}
40% {
color: white;
text-shadow:
.25em 0 0 rgba(0,0,0,0),
.5em 0 0 rgba(0,0,0,0);}
60% {
text-shadow:
.25em 0 0 white,
.5em 0 0 rgba(0,0,0,0);}
80%, 100% {
text-shadow:
.25em 0 0 white,
.5em 0 0 white;}}
</style>
</head>
<body>
<div class="info">
<h1>excuse me where da späti party at</h1>
<button type="button" class="btn btn-light" data-toggle="modal" data-target="#modal">
get da location
</button>
</div>
<h1 id="loading" class="loading absolute-center">loading</h1>
<footer class="fixed-bottom center">
<div class="container">
<div class="d-flex justify-content-center">
<a href="https://www.facebook.com/spaeti180/">
<i class="material-icons display-4">facebook</i>
</a>
</div>
</div>
</footer>
<!-- Modal -->
<div class="modal fade" id="modal" tabindex="-1" role="dialog" aria-labelledby="modal" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-body">
<h5>how u wanna holla at späti party?</h5>
<div>
<a href="https://www.facebook.com/events/695170211550780/">
<i class="material-icons">facebook</i>
<span class="telegram-text">fb event june 18</span>
</a>
</div>
<div>
<a href="https://ra.co/events/1546955">
<i class="material-icons">toll</i>
<span class="telegram-text">afterparty tix june 18</span>
</a>
</div>
<div>
<a href="https://t.me/spaetiparty">
<i class="material-icons">send</i>
<span class="telegram-text">telegram</span>
</a>
</div>
<div>
<a href="http://eepurl.com/gnrReb">
<i class="material-icons">email</i>
<span class="email-text">email</span>
</a>
</div>
</div>
</div>
</div>
</div>
<script type="module">
import * as THREE from '/js/libs/three.module.min.js';
import { OrbitControls } from '/js/libs/OrbitControls.js';
import { GLTFLoader } from '/js/libs/GLTFLoader.js';
var container, controls, object;
var camera, scene, renderer, ambientLight, directionalsceneLight, pointLight, sceneLight;
var clock = new THREE.Clock();
init();
animate();
function init() {
// SCENE
scene = new THREE.Scene();
// LIGHTS
const sphere = new THREE.SphereBufferGeometry( 0.5, 16, 8 );
ambientLight = new THREE.AmbientLight( 0xFFFFFF ); // soft white light
scene.add( ambientLight );
pointLight = new THREE.PointLight( 0xff0040, 10, 30 );
pointLight.add( new THREE.Mesh( sphere, new THREE.MeshBasicMaterial( { color: 0xff0040 } ) ) );
scene.add( pointLight );
var directionalLight = new THREE.DirectionalLight( 0xffffff, 1 );
scene.add( directionalLight );
sceneLight = new THREE.PointLight( 0xffffff, 5, 30 );
scene.add( sceneLight )
sceneLight.position.y += 20
sceneLight.position.x -= 20
// CAMERA
camera = new THREE.PerspectiveCamera( 50, window.innerWidth / window.innerHeight, 1, 1000 );
camera.position.z = 100;
renderer = new THREE.WebGLRenderer( { antialias: true, alpha: true } );
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );
controls = new OrbitControls( camera, renderer.domElement );
controls.addEventListener( 'change', render ); // use if there is no animation loop
controls.autoRotate = true
controls.enableDamping = true
controls.target.set( 0, 0, - 0.2 );
controls.update();
function loadAsset( asset ) {
var format = asset.formats.find( format => { return format.formatType === 'GLTF2'; } );
if ( format !== undefined ) {
var url = format.root.url;
var loader = new GLTFLoader();
loader.load(
// resource URL
url,
// called when the resource is loaded
function ( gltf ) {
scene.add( gltf.scene );
object = gltf.scene;
object.scale.multiplyScalar( 20 );
render()
},
// called while loading is progressing
function ( xhr ) {
const element = document.getElementById("loading");
element.classList.add("hide");
},
// called when loading has errors
function ( error ) {
console.log( 'An error happened' );
}
);
}
}
const url = "https://poly.googleapis.com/v1/assets/5AW4hipBgK3?key=AIzaSyAU-IiyxLrcfA3tiXYh-cs_JSS0bFMhNrE"
var request = new XMLHttpRequest();
request.open( 'GET', url, true );
request.addEventListener( 'load', function ( event ) {
loadAsset( JSON.parse( event.target.response ) );
} );
request.send( null );
document.body.appendChild( renderer.domElement );
window.addEventListener( 'resize', onWindowResize, false );
}
function onWindowResize() {
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
renderer.setSize( window.innerWidth, window.innerHeight );
render();
}
function animate() {
controls.update();
requestAnimationFrame( animate );
render();
}
function render() {
renderer.render( scene, camera );
var time = Date.now() * 0.0005;
var delta = clock.getDelta();
pointLight.position.x = Math.sin( time * 5 ) * 20;
pointLight.position.y = Math.cos( time * 5 ) * 20 - 2 * Math.cos(time);
pointLight.position.z = Math.cos( time ) * 35 - 10;
}
</script>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>
</body>
</html>