Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
65 lines (57 loc) · 2.58 KB
/
Copy pathindex.html
File metadata and controls
65 lines (57 loc) · 2.58 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Magic Invisible Window</title>
<meta name="description" content="See-through hand gesture magic using MediaPipe hand tracking in the browser.">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- Hidden video element for webcam stream (never shown, only used as texture source) -->
<video id="webcam" autoplay playsinline muted></video>
<!-- Main rendering canvas – draws the mirrored camera + effects -->
<canvas id="output_canvas"></canvas>
<!-- UI Overlay -->
<div id="ui-layer">
<header>
<div class="logo">
<h1>Magic Window</h1>
</div>
<div id="rec-indicator" class="hidden">
<span class="dot"></span> REC
</div>
</header>
<div class="controls-container">
<button id="start-btn" class="primary-btn">▶ Start Camera</button>
<button id="capture-bg-btn" class="secondary-btn hidden">📸 Capture Background <small>(B / Space)</small></button>
<div id="status-panel" class="glass-panel hidden">
<div class="status-item">
<span class="label">Effect Mode</span>
<span id="effect-mode-display" class="value highlight">1: Invisible</span>
</div>
<div class="status-item">
<span class="label">Background</span>
<span id="bg-status-display" class="value">Not captured</span>
</div>
<div class="instructions">
<p><strong>Controls:</strong></p>
<ul>
<li><strong>B / Space:</strong> Capture Background</li>
<li><strong>R:</strong> Record Video</li>
<li><strong>D:</strong> Toggle Debug Panel</li>
</ul>
</div>
</div>
</div>
<div id="toast-message" class="toast hidden">Message</div>
</div>
<!-- Debug panel lives outside ui-layer so it's always on top and clickable -->
<div id="debug-panel"></div>
<!-- App entry point (ES module) -->
<script type="module" src="app.js"></script>
</body>
</html>