-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
82 lines (78 loc) · 2.02 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
72
73
74
75
76
77
78
79
80
81
82
<!DOCTYPE html>
<html>
<head>
<title>Basic Three.js App</title>
<style>
body {
background-color: burlywood;
}
video {
border: black solid 1px;
}
canvas {
border: black solid 1px;
}
#settings {
display: flex;
flex-wrap: wrap;
}
#settings div {
padding: 10px;
}
</style>
</head>
<body>
<h3>Replace Background with WebGL.</h3>
<div id="settings">
<div id="output">
<p>Output:</p>
<canvas id="canvas" width="320" height="240" />
</div>
<div id="input">
<p>Input:</p>
<video
width="320"
height="240"
id="video"
autoplay
crossorigin="anonymous"
controls
loop
>
<source src="video.mp4" type="video/mp4" />
</video>
</div>
<div id="config">
<p>Processing configs:</p>
<input type="color" id="keyColor" value="#000000" />
<label for="keyColor">Key color</label>
<p>Threshold:</p>
<input type="range" id="threshold" value="40" min="0" max="100" />
</div>
<div id="background">
<p>Background:</p>
<input type="color" id="color" value="#e66465" />
<input type="radio" id="useColor" name="Background" checked />
<label for="useColor">Color</label>
<input type="radio" id="transparent" name="Background" />
<label for="transparent">Transparent</label>
<input type="radio" id="useSky" name="Background" />
<label for="useSky">Sky</label>
<br />
<video
width="320"
height="240"
id="sky"
autoplay
crossorigin="anonymous"
controls
loop
>
<source src="sky.mp4" type="video/mp4" />
</video>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/109/three.min.js"></script>
<script src="script.js"></script>
</body>
</html>