/
index.html
47 lines (43 loc) · 1.09 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
<!doctype html>
<html lang="en">
<head>
<title>VU Meter</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
body {
background-color: #323232;
}
section {
text-align: center;
}
canvas {
padding: 1em;
margin: 0em;
}
</style>
</head>
<body>
<section class="main">
<canvas id="demo" width="100" height="400" data-val="0">No canvas</canvas>
</section>
<div style="text-align: center;">
<input type="range" id="demoInput" min="0" max="100" value="0">
</div>
<script src="vumeter.js"></script>
<script>
window.onload = function(){
var demo = document.getElementById('demo');
vumeter(demo, {
"boxCount": 15,
"boxGapFraction": 0.25,
"max": 100,
});
var demoInput = document.getElementById('demoInput');
demoInput.oninput = function(e){
console.log(this.value);
demo.setAttribute('data-val', this.value);
};
};
</script>
</body>
</html>