Spaces:
Sleeping
Sleeping
Upload deepseek_html_20260623_426d4d.html
Browse files
deepseek_html_20260623_426d4d.html
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8" />
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 6 |
+
<title>Gesture Drawing · Camera Overlay</title>
|
| 7 |
+
<!-- Font Awesome for icons (optional) -->
|
| 8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" />
|
| 9 |
+
<link rel="stylesheet" href="style.css" />
|
| 10 |
+
</head>
|
| 11 |
+
<body>
|
| 12 |
+
<div id="app">
|
| 13 |
+
<header>
|
| 14 |
+
<h1>✋ Gesture Draw</h1>
|
| 15 |
+
<div class="toolbar">
|
| 16 |
+
<button id="colorPicker" title="Brush color"><i class="fas fa-palette"></i></button>
|
| 17 |
+
<input type="color" id="brushColor" value="#FF4500" />
|
| 18 |
+
<button id="brushSizeDown"><i class="fas fa-minus"></i></button>
|
| 19 |
+
<span id="sizeDisplay">5</span>
|
| 20 |
+
<button id="brushSizeUp"><i class="fas fa-plus"></i></button>
|
| 21 |
+
<button id="eraserToggle" title="Eraser mode"><i class="fas fa-eraser"></i></button>
|
| 22 |
+
<button id="clearCanvas" title="Clear drawing"><i class="fas fa-trash"></i></button>
|
| 23 |
+
<button id="snapshotBtn" title="Save snapshot"><i class="fas fa-camera"></i> Save</button>
|
| 24 |
+
<button id="toggleCamera" title="Show/Hide camera feed"><i class="fas fa-video"></i></button>
|
| 25 |
+
</div>
|
| 26 |
+
<div id="status">🟢 Camera ready · Move index finger up to draw</div>
|
| 27 |
+
</header>
|
| 28 |
+
|
| 29 |
+
<main>
|
| 30 |
+
<!-- The camera video is hidden; we draw it onto the canvas -->
|
| 31 |
+
<video id="webcam" autoplay playsinline style="display:none;"></video>
|
| 32 |
+
|
| 33 |
+
<!-- Main canvas: draws video background + hand tracking overlay + user strokes -->
|
| 34 |
+
<canvas id="drawCanvas"></canvas>
|
| 35 |
+
|
| 36 |
+
<!-- Floating feedback for gesture state -->
|
| 37 |
+
<div id="gestureIndicator" class="gesture-off">✋</div>
|
| 38 |
+
</main>
|
| 39 |
+
|
| 40 |
+
<footer>
|
| 41 |
+
<span id="fpsCounter">0 FPS</span>
|
| 42 |
+
<span id="savedCounter">Saved: 0</span>
|
| 43 |
+
</footer>
|
| 44 |
+
</div>
|
| 45 |
+
|
| 46 |
+
<!-- MediaPipe Tasks Vision (from Google CDN) -->
|
| 47 |
+
<script src="https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.8/wasm/vision_bundle.js" crossorigin="anonymous"></script>
|
| 48 |
+
|
| 49 |
+
<!-- Our application script -->
|
| 50 |
+
<script src="script.js"></script>
|
| 51 |
+
</body>
|
| 52 |
+
</html>
|