Skip to content

Commit ddd1d88

Browse files
author
ChidcGithub
committed
v0.7.0-beta: Add webcam gesture control for 2D/3D visualization
- Add GestureService.js using MediaPipe GestureRecognizer - Add GestureControl.js UI component with camera preview - Support 7 gestures + two-hand pinch for zoom/pan/rotate/select - Add gesture toggle in header (default OFF) - Refactor backend: split main.py and parser.py into modules - Add backend routers for cleaner API structure
1 parent a4183d4 commit ddd1d88

26 files changed

Lines changed: 4584 additions & 2763 deletions

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,5 @@ htmlcov/
6262
logs/
6363
*.log
6464

65-
# AI Memory
65+
# Memory
6666
memory.md

README.md

Lines changed: 50 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# PyVizAST
22

3-
[![Version](https://img.shields.io/badge/Version-0.6.3-blue.svg)](https://github.com/ChidcGithub/PyVizAST)
3+
[![Version](https://img.shields.io/badge/Version-0.7.0--beta-orange.svg)](https://github.com/ChidcGithub/PyVizAST)
44
[![Python](https://img.shields.io/badge/Python-3.8%2B-brightgreen.svg)](https://www.python.org/)
55
[![License](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](LICENSE)
66
[![Platform](https://img.shields.io/badge/Platform-Windows%20%7C%20Linux%20%7C%20macOS-lightgrey.svg)](https://github.com/ChidcGithub/PyVizAST)
7-
[![Status](https://img.shields.io/badge/Status-stable-brightgreen.svg)](https://github.com/ChidcGithub/PyVizAST)
7+
[![Status](https://img.shields.io/badge/Status-beta-yellow.svg)](https://github.com/ChidcGithub/PyVizAST)
88

99
A Python AST Visualizer & Static Analyzer that transforms code into interactive graphs. Detect complexity, performance bottlenecks, and code smells with actionable refactoring suggestions.
1010

@@ -35,9 +35,7 @@ A Python AST Visualizer & Static Analyzer that transforms code into interactive
3535
- **Challenge Mode**: Identify performance issues in provided code samples
3636

3737
### Easter Egg
38-
- Click the "PV" logo 5 times within 2 seconds to discover a hidden surprise
39-
- Features a physics-based confetti animation with 300 realistic paper particles
40-
- Particles spray from screen corners with natural flutter, bend, and fold effects
38+
- Just explore the project and you'll find it :)
4139

4240
## Architecture
4341

@@ -201,7 +199,54 @@ Contributions are welcome. Please submit pull requests to the main repository.
201199

202200
<summary>Version History</summary>
203201

202+
<details>
203+
<summary>v0.7.0-beta (2026-03-11)</summary>
204+
205+
**New Feature: Webcam Gesture Control**
206+
207+
Hand gesture recognition for 2D/3D AST visualization control using MediaPipe.
208+
209+
**Supported Gestures:**
210+
- **Thumb Up**: Zoom in
211+
- **Thumb Down**: Zoom out
212+
- **Closed Fist**: Pan mode (grab and drag)
213+
- **Open Palm**: Quick tap = select, Hold = reset view
214+
- **Pointing Up**: Select node
215+
- **Victory (V sign)**: Rotate mode
216+
- **Two Hands Pinch**: Pinch to zoom, move both hands to pan
217+
218+
**Components:**
219+
- `GestureService.js`: Core gesture recognition service using MediaPipe GestureRecognizer
220+
- `GestureControl.js`: UI component with camera preview, status indicator, gesture guide
221+
- `GestureControl.css`: Styling for gesture control overlay
222+
223+
**Features:**
224+
- Toggle button in header (default OFF)
225+
- Real-time camera preview with gesture overlay
226+
- Status indicator (loading/ready/running/error/stopped)
227+
- Visual gesture guide with action mappings
228+
- Support for both 2D (Cytoscape) and 3D (Three.js) visualizations
204229

230+
**Dependencies:**
231+
- Added `@mediapipe/tasks-vision` for gesture recognition
232+
233+
**Known Issues:**
234+
- Gesture recognition may be unstable in certain lighting conditions
235+
- Future improvements planned: stability filtering, confidence threshold adjustment, gesture cooldown
236+
237+
**Files Added:**
238+
- `frontend/src/utils/GestureService.js`
239+
- `frontend/src/components/GestureControl.js`
240+
- `frontend/src/components/GestureControl.css`
241+
242+
**Files Modified:**
243+
- `frontend/src/components/Header.js` - Added gesture toggle button
244+
- `frontend/src/App.js` - Added gesture state management
245+
- `frontend/src/components/ASTVisualizer.js` - Added gesture handling for 2D
246+
- `frontend/src/components/ASTVisualizer3D.js` - Added gesture handling for 3D
247+
- `frontend/package.json` - Added MediaPipe dependency
248+
249+
</details>
205250

206251
<details>
207252

0 commit comments

Comments
 (0)