-
Notifications
You must be signed in to change notification settings - Fork 9
/
index.html
104 lines (97 loc) · 4.1 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, shrink-to-fit=yes">
<title>Chladni plate</title>
<meta name="title" content="Chladni plate">
<meta name="author" content="Lucio Paiva">
<meta name="description" content="When resonating, a vibrating plate is divided into regions that oscillate in opposite directions, bounded by lines where no vibration occurs. The resulting patterns are what is called Chladni figures.">
<meta property="og:type" content="article">
<meta property="og:title" content="Chladni plate">
<meta property="og:description" content="When resonating, a vibrating plate is divided into regions that oscillate in opposite directions, bounded by lines where no vibration occurs. The resulting patterns are what is called Chladni figures.">
<meta property="og:site_name" content="Lucio Paiva">
<meta property="og:url" content="https://luciopaiva.com/chladni/">
<meta property="og:image" content="https://luciopaiva.com/chladni/thumbnail.png">
<meta property="article:author" content="https://luciopaiva.com">
<meta property="article:published_time" content="2018-11-15T00:00:00.000Z">
<link rel="author" href="https://luciopaiva.com">
<style>
:root {
--non-resonant-color: #9b9b9b;
--particle-color-1: #996dff;
--particle-color-2: #ffb73e;
--particle-color-3: #ff3dda;
--background-color: #000000;
}
body {
background-color: var(--background-color);
padding: 0;
margin: 0;
overflow: hidden;
font-family: monospace;
color: white;
}
p {
margin: 0;
}
canvas {
width: 100%;
height: 100%;
}
/* see http://phrogz.net/tmp/canvas_image_zoom.html
(via https://developer.mozilla.org/en-US/docs/Web/CSS/image-rendering)
*/
.pixelated {
image-rendering: -moz-crisp-edges; /* Firefox */
image-rendering: -o-crisp-edges; /* Opera */
image-rendering: -webkit-optimize-contrast; /* Safari */
image-rendering: optimize-contrast; /* CSS3 Proposed */
image-rendering: crisp-edges; /* CSS4 Proposed */
image-rendering: pixelated; /* CSS4 Proposed */
-ms-interpolation-mode: nearest-neighbor; /* IE8+ */
}
#status {
position: absolute;
top: 10px;
right: 10px;
background-color: rgba(0, 0, 0, .6);
padding: 10px;
display: none; /* change to show status */
}
#author {
position: absolute;
right: 20px;
bottom: 20px;
}
.circle-portrait {
width: 48px;
border-radius: 24px;
}
.inverted {
filter: invert(100%);
}
</style>
<script src="utils.js" defer type="module"></script>
<script src="index.js" defer type="module"></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','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-101273659-1', 'auto');
ga('send', 'pageview');
</script>
</head>
<body>
<div id="status">
<p>fps: <span id="fps"></span></p>
</div>
<span id="author">
<a href="https://luciopaiva.com"><img class="circle-portrait" src="https://luciopaiva.com/img/avatar.jpg" alt="avatar" title="Lucio Paiva, 2018"></a>
<a href="https://github.com/luciopaiva/chladni">
<img src="https://luciopaiva.com/img/github-logo.svg" alt="github" class="circle-portrait inverted" title="Source code">
</a>
</span>
</body>
</html>