How sawyer1995nie-cpu/mingmirror-shadow-play works
MingMirror Shadow Play is a browser-local hand-gesture puppet experience. A visitor starts camera input or a simulated demo; landmarks are converted into gesture state and events, which drive the five-finger puppet rig on the shadow-play stage. The README documents this input-to-engine-to-scene separation and privacy behavior. Core gesture processing is represented at the detector, smoothing, and state-transition layers. Some UI and scene files were not sampled, so links beyond documented or indexed relationships are omitted rather than inferred.
Main entry points: GestureEngine.ts Gesture Engine · GestureInput.tsx Gesture Input · App.tsx App Wiring · GestureDetector.ts Gesture Detector
Components 15
Stage Experience
- App Wiring
src/App.tsx - Shadow Stage
src/components/ShadowPlayground.tsx - Puppet Rig
src/components/ShadowPuppet.tsx
Hand Input
- Gesture Input
src/components/GestureInput.tsx - Hand Tracker
src/gesture/HandTracker.ts - Demo Hands
src/utils/demoHands.ts
Gesture Engine
- Gesture Engine
src/gesture/GestureEngine.ts - Gesture Detector
src/gesture/GestureDetector.ts - State Machine
src/gesture/GestureStateMachine.ts - Gesture State
src/gesture/GestureState.ts
Gesture Support
- Gesture Smoother
src/gesture/GestureSmoother.ts - Gesture Recognizers
src/gestures - Landmark Math
src/utils/math.ts
Other components
- Visitor
- MediaPipe Vision
Connections 17
- Visitor → App Wiring: opens experience
README.md - App Wiring → Shadow Stage: renders stage
src/App.tsx - App Wiring → Gesture Input: renders input
src/App.tsx - App Wiring → Gesture Engine: creates engine
src/App.tsx - Visitor → Gesture Input: starts input
README.md - Gesture Input → Hand Tracker: initializes and samples
src/components/GestureInput.tsx - Gesture Input → Demo Hands: requests demo signals
src/components/GestureInput.tsx - Gesture Input → Gesture Engine: submits hand state
README.md - Hand Tracker → MediaPipe Vision: runs landmark inference
src/gesture/HandTracker.ts - Gesture Engine → Gesture Detector: detects gestures
src/gesture/GestureEngine.ts - Gesture Engine → State Machine: transitions phases
src/gesture/GestureEngine.ts - Gesture Engine → Gesture State: stores and emits
src/gesture/GestureEngine.ts - Gesture Detector → Gesture Smoother: smooths landmarks
src/gesture/GestureDetector.ts - Gesture Detector → Gesture Recognizers: evaluates gestures
src/gesture/GestureDetector.ts - Gesture Detector → Landmark Math: uses landmark math
src/gesture/GestureDetector.ts - Shadow Stage → Puppet Rig: presents puppet
- Puppet Rig → Gesture Engine: subscribes to changes
src/components/ShadowPuppet.tsx