-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
18 lines (18 loc) · 894 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<html>
<head>
<script src="libraries/p5.min.js" type="text/javascript"></script>
<!-- <script src="libraries/matter.min.js" type="text/javascript"></script> --> <!-- for jan15 -->
<!-- <script src="libraries/spectral.min.js" type="text/javascript"></script> --> <!-- for jan21 -->
<script src="week5/jan31/sketch.js" type="text/javascript"></script>
<script>
function rainbow(t) {
let palette = ["#f9d531", "#ef562f", "#bd4ee5", "#4bafdd", "#a7cc51", "#dae544"];
let i = floor(palette.length*t);
let amt = fract(palette.length*t);
return lerpColor(color(palette[i%palette.length]), color(palette[(i+1)%palette.length]), amt);
}
</script>
</head>
<body style = "width: 100%; height: 100%; background-color: 0; margin: 0; display: flex; justify-content: center; align-items: center;">
</body>
</html>