-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
71 lines (63 loc) · 1.31 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<html>
<head>
<script src="mask.js"></script>
<style>
html , body {
padding: 0px;
margin: 0px;
background-color: #0d1012;
white-space: nowrap;
}
body {
padding-bottom: 18px;
}
div {
padding: 18px;
display: inline-block;
margin: 18px;
margin-bottom: 0px;
margin-right: 0px;
background-color: rgba(255,255,255,0.1);
}
div p {
font-family: Helvetica;
font-weight: 900;
line-height: 36px;
font-size: 21px;
color: rgba(255,255,255,1);
margin-top: 0px;
}
</style>
</head>
<body>
<div>
<p>Starting image</p>
<img id="inputImage" src="images/cat.jpg" />
</div><br />
<div>
<p>Output image</p>
<img id="base" src="" />
</div><div>
<p>Image mask</p>
<img id="mask" src="images/mask_middle.png" />
</div><div>
<p>Image overlay</p>
<img id="over" src="images/over_middle_left.png" />
</div>
</body>
<script>
var imgMask;
window.onload = function(){
document.getElementById("base").src = document.getElementById("inputImage").src;
imgMask = new mask();
imgMask.settings({
mask: document.getElementById("mask"),
overlay: document.getElementById("over"),
size: "mask",
aInvert: false,
cInvert: false,
});
imgMask.gen( document.getElementById("base"));
}
</script>
</html>