-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
42 lines (42 loc) · 1.78 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Higher Hat</title>
<link rel="icon" type="image/png" sizes="32x32" href="images/favicon.png">
<link rel="stylesheet" href="styles.css">
<link rel="manifest" href="manifest.json">
</head>
<body>
<div class="container">
<h1>HIGHER HAT</h1>
<button class="btn" onclick="document.getElementById('fileInput').click()">Select Photo</button>
<input type="file" id="fileInput" accept="image/*" onchange="loadImage(event)">
<canvas id="canvas"></canvas>
<div class="controls">
<label>X Axis</label>
<input type="range" id="xAxis" min="0" max="500" value="0" oninput="adjustHat()">
<label>Y Axis</label>
<input type="range" id="yAxis" min="0" max="500" value="0" oninput="adjustHat()">
<label>Scale</label>
<input type="range" id="scale" min="0.1" max="2" step="0.01" value="1" oninput="adjustHat()">
</div>
<button class="btn" onclick="downloadImage()">Download</button>
</div>
<div class="footer">
<p>hat by <a href="https://warpcast.com/clfx.eth">clfx.eth</a> | idea by <a href="https://warpcast.com/nishu">nishu</a></p>
</div>
<script src="script.js"></script>
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/service-worker.js')
.then(function(registration) {
console.log('Service Worker registered with scope:', registration.scope);
}).catch(function(error) {
console.log('Service Worker registration failed:', error);
});
}
</script>
</body>
</html>