-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
167 lines (151 loc) · 7.2 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- seo -->
<title>ChromoSketch</title>
<meta
name="description"
content="A simple app for applying artistic effects on video."
/>
<meta name="theme-color" content="#ffffff" />
<link
rel="shortcut icon"
href="/assets/icons/android-chrome-512x512.png"
/>
<link
rel="icon"
href="/assets/icons/android-launchericon-144-144.png"
/>
<link
rel="apple-touch-icon"
href="/assets/icons/apple-touch-icon.png"
/>
<link rel="icon" type="image/x-icon" href="/assets/icons/favicon.ico" />
<link rel="manifest" href="/assets/site.webmanifest" />
<!-- links -->
<link rel="stylesheet" href="/css/styles.css" />
<script src="/scripts/lib/seriously.js" defer></script>
<script src="/scripts/lib/htmlslider.js" defer></script>
<script src="/scripts/effects/effect.kuwahara.js" defer></script>
<script src="/scripts/effects/effect.comic.js" defer></script>
<script src="/scripts/effects/effect.ink.js" defer></script>
<script src="/scripts/main.js" defer></script>
</head>
<body>
<header>
<div>
<a href="/" style="font-size: 2rem; font-weight: bolder">
ChromoSketch
</a>
</div>
</header>
<main>
<!-- for switching tabs -->
<section id="tabs-section">
<h2>Select video from...</h2>
<div>
<label id="file-btn" class="btn" for="file-input">
From Storage
</label>
<button class="btn" id="cam-btn">From Camera</button>
</div>
</section>
<!-- for storage mode -->
<input type="file" id="file-input" accept="video/*" />
<!-- for switching effects - display only when not loading -->
<section id="effects-section">
<h2>Switch effects</h2>
<div>
<label for="ink" class="btn active">Ink</label>
<label for="comic" class="btn">Comic</label>
<label for="kuwahara" class="btn">Painted</label>
</div>
<input type="radio" id="ink" name="effects" checked value="0" />
<input type="radio" id="comic" name="effects" value="1" />
<input type="radio" id="kuwahara" name="effects" value="2" />
</section>
<!-- for displaying video or loading -->
<section id="display-section">
<div id="loading-div">Loading.....</div>
<div id="cnv-div">
<canvas id="main-canvas"></canvas>
</div>
<section id="controls-section">
<button class="btn" id="minus-10">
<svg
width="100%"
height="100%"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M21.9998 17.5737L21.9998 6.42632C21.9998 4.57895 20.3991 3.41122 19.0966 4.30838L13 8.76844L13 7.12303C13 5.50658 11.5327 4.48482 10.3388 5.26983L2.92136 10.1468C1.69288 10.9545 1.69288 13.0455 2.92135 13.8532L10.3388 18.7302C11.5327 19.5152 13 18.4934 13 16.877V15.2316L19.0966 19.6916C20.3991 20.5888 21.9998 19.4211 21.9998 17.5737Z"
fill="#1C274C"
/>
</svg>
</button>
<button class="btn" id="play-btn" style="display: none">
<svg
width="100%"
height="100%"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M21.4086 9.35258C23.5305 10.5065 23.5305 13.4935 21.4086 14.6474L8.59662 21.6145C6.53435 22.736 4 21.2763 4 18.9671L4 5.0329C4 2.72368 6.53435 1.26402 8.59661 2.38548L21.4086 9.35258Z"
fill="#1C274C"
/>
</svg>
</button>
<button class="btn" id="pause-btn">
<svg
width="100%"
height="100%"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M2 6C2 4.11438 2 3.17157 2.58579 2.58579C3.17157 2 4.11438 2 6 2C7.88562 2 8.82843 2 9.41421 2.58579C10 3.17157 10 4.11438 10 6V18C10 19.8856 10 20.8284 9.41421 21.4142C8.82843 22 7.88562 22 6 22C4.11438 22 3.17157 22 2.58579 21.4142C2 20.8284 2 19.8856 2 18V6Z"
fill="#1C274C"
/>
<path
d="M14 6C14 4.11438 14 3.17157 14.5858 2.58579C15.1716 2 16.1144 2 18 2C19.8856 2 20.8284 2 21.4142 2.58579C22 3.17157 22 4.11438 22 6V18C22 19.8856 22 20.8284 21.4142 21.4142C20.8284 22 19.8856 22 18 22C16.1144 22 15.1716 22 14.5858 21.4142C14 20.8284 14 19.8856 14 18V6Z"
fill="#1C274C"
/>
</svg>
</button>
<button class="btn" id="plus-10">
<svg
width="100%"
height="100%"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M2 17.5737L2 6.42632C2 4.57895 3.60064 3.41122 4.90312 4.30838L10.9998 8.76844L10.9998 7.12303C10.9998 5.50658 12.467 4.48482 13.661 5.26983L21.0784 10.1468C22.3069 10.9545 22.3069 13.0455 21.0784 13.8532L13.661 18.7302C12.467 19.5152 10.9998 18.4934 10.9998 16.877V15.2316L4.90313 19.6916C3.60065 20.5888 2 19.4211 2 17.5737Z"
fill="#1C274C"
/>
</svg>
</button>
</section>
</section>
<!-- for video controls - display only when not loading and in file mode-->
<!-- not for display -->
<video id="main-video" loop autoplay>
<source src="" />
</video>
<video id="cam-video">
<source src="" />
</video>
</main>
<footer>
<p>Developed by <a href="#">Harshit</a></p>
</footer>
</body>
</html>