This repository has been archived by the owner on Nov 27, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
62 lines (62 loc) · 1.68 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!-- Responsive is good -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>ITP 01</title>
<!-- Normalize the default margins around canvas; slight overkill -->
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
<style>
html, body {
/* blend in with canvas */
background-color: #333;
/* fullheight frame to fix broken resize when body shrinks */
height: 100%;
display: flex;
/* center canvas with Flexbox */
align-items: center;
align-content: center;
justify-content: center;
}
#overlay {
z-index: 10;
position: fixed;
display: flex;
width: 100%;
height: 100%;
justify-content: center;
align-items: flex-end;
bottom: 1rem;
}
#overlay .container {
background-color: rgba(255, 255, 255, .1);
font-size: 1rem;
color: #fff;
font-family: monospace;
}
.container > * {
text-align: center;
padding: .5rem;
}
.hidden {
display: none;
}
</style>
</head>
<body>
<div id="overlay">
<div class="container">
<h1>Click to set a new GRAVITY ATTRACTOR</h1>
<h2>SPACEBAR to change colours.</h2>
</div>
</div>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.4/p5.min.js"
charset="utf-8"></script>
<!-- finally start the sketch -->
<script src="src/script.js" charset="utf-8" defer></script>
</body>
</html>