-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
78 lines (69 loc) · 2.36 KB
/
index.html
File metadata and controls
78 lines (69 loc) · 2.36 KB
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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>SELF PORTRAIT</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="./style.css" />
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Raleway">
<style>
body,h1 {font-family: "Raleway", sans-serif}
body, html {height: 100%}
body {
background-image: url('bg.jpg');
min-height: 100%;
background-position: center;
background-size: cover;
color: white;
}
</style>
</head>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-Q0G74WNENF"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-Q0G74WNENF');
</script>
<body>
<script src="./libraries/tone.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/heic2any/0.0.3/heic2any.min.js" integrity="sha512-/WKQk6ZoCxDcTEavvdHQJKucCb39gRwV325cm9oDlInehCe6kI71RqYP5hWyQRvzdgqKcZErH5baSs2TRPTRfQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="./index.js"></script>
<script src="./music.js"></script>
<h1>SELF PORTRAIT</h1>
<div id="audioContextSuspended">
<div>
<p>Please turn on your sound to enjoy the full experience. If you have an iPhone, you will have to flip the silent mode toggle as well.</p>
<button id="unmute">Unmute</button>
</div>
</div>
<form action="#">
<input type="button" id="loadFileXml" value="Show Me What You've Made" onclick="document.getElementById('imgfile').click();" />
<input type="file" style="display:none;" id="imgfile" name="file" capture accept="image/*" onchange="convertHeicToJpg(this)"/>
<input type="button" id="btnLoad" value="Reveal"/>
</form>
<canvas id="canvas"></canvas>
<div id="palette"></div>
<hr />
<div id="complementary"></div>
<div id="explain"></div>
<hr />
<script>
if (Tone.context.state !== "running"){
$("#audioContextSuspended").show();
document.querySelector('#unmute').addEventListener('click', function() {
Tone.context.resume().then(() => {
$("#audioContextSuspended").hide();
perform();
});
});
}else{
perform();
}
</script>
</body>
<footer>
</footer>
</html>