-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfocus.html
56 lines (54 loc) · 1.4 KB
/
focus.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Multi-Canvas DEMO</title>
<style>
html, body {
height: 100%;
width: 100%;
margin: 10px;
overflow: hidden;
color: #222;
font-size: 15px;
letter-spacing: 1.5px;
line-height: 1.5em;
}
* {
box-sizing: border-box;
}
canvas {
background: transparent;
position: absolute;
transition: filter .5s;
}
#canvContainer {
position: relative;
height: 500px;
opacity: 0;
transition: opacity .8s;
}
#focusRange {
width: 300px;
}
</style>
</head>
<body>
<script type="text/javascript" src="src/multicanvas.js"></script>
<div id="canvContainer">
</div>
<label for="focusRange" id="focusLabel"></label><br>
<input type="range" name="focusRange" id="focusRange" min="0" max="10" value="0">
<script type="text/javascript">
var range = document.querySelector("#focusRange");
var label = document.querySelector("#focusLabel");
var mcanv = new MultiCanvas({
'images': 'assets/MultiCanvas_',
'imageSuffix': [4,3,2,1],
'imageType': 'png',
'focusRange': range,
'focusLabel': label,
});
</script>
</body>