Skip to content

๐ŸŽฏ้€š่ฟ‡ๆ‰‹ๅŠฟ่ฏ†ๅˆซๆŽงๅˆถ 3D ็ฒ’ๅญ่ฟ›่กŒไบ’ๅŠจ-A web-based augmented reality (AR) particle interaction system that controls 3D particle effects through gesture recognition. It uses MediaPipe Hands for real-time gesture detection and Three.js for rendering 3D particle animations, supporting various gestures to control different particle shapes.

License

Notifications You must be signed in to change notification settings

zhoujun94511/GestureInteraction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

GestureInteraction

GestureInteraction is a high-performance, Web-based AR hand gesture particle interaction system powered by Flask, MediaPipe, and Three.js.


๐ŸŒ Documentation / ๆ–‡ๆกฃ่ฏญ่จ€


Demo GIF


๐Ÿ“ Introduction

GestureInteraction is a web-based Augmented Reality (AR) hand gesture particle interaction system.

The system uses MediaPipe Hands for real-time hand gesture recognition and Three.js + WebGL for rendering interactive 3D particle animations. It enables natural and smooth visual interactions driven entirely by hand gestures.

The project runs purely in the browser and does not require any native applications, making it suitable for desktop and mobile devices.


โœจ Key Features

๐Ÿ–๏ธ Gesture Interaction

  • Real-time hand tracking powered by MediaPipe Hands
  • Multiple gesture modes (open palm, fist, V-sign, single finger, thumb, three fingers)
  • Gesture stability processing to reduce jitter and false recognition

๐ŸŒŒ Particle System

  • Three.jsโ€“based 3D particle system
  • Multiple particle shapes (sphere, ring, star, text, heart, dragon)
  • Physics-based following with damping and inertia for natural motion

๐Ÿš€ Visuals and Performance

  • WebGL hardware-accelerated rendering
  • Adaptive particle count based on device performance
  • Basic depth perception and occlusion simulation

๐Ÿ“ฑ System Capabilities

  • HTTPS secure access using self-signed certificates
  • Automatic detection and switching of front/rear cameras
  • Automatic demo mode when no camera is available
  • Responsive layout for desktop, tablet, and mobile screens

๐Ÿ› ๏ธ Technology Stack

Backend

  • Flask โ€“ Python web framework
  • SSL/TLS โ€“ HTTPS support required for browser camera access

Frontend

  • MediaPipe Hands โ€“ Real-time hand gesture recognition
  • Three.js โ€“ 3D scene and particle rendering
  • WebGL โ€“ GPU-accelerated graphics
  • MediaDevices API โ€“ Camera access and stream management
  • ES6+ JavaScript โ€“ Modular frontend architecture

๐Ÿš€ Quick Start

Requirements

  • Python 3.8 or later
  • A modern browser with WebGL support
  • Camera device (optional; demo mode will be enabled if unavailable)

Installation and Run

  1. Install dependencies:

    pip install -r requirements.txt
  2. Run the server:

    python app.py
  3. Open the application in your browser: Access the URL displayed in the terminal:

    https://<your-local-ip>:5001
    

    [!IMPORTANT] On first access, you must install the self-signed HTTPS certificate; otherwise, the browser will block camera access.

Usage (Gestures)

Gesture Particle Effect
Open palm Sphere
Fist Ring
V-sign Text particles
Single finger Star
Thumb Heart
Three fingers Dragon

Place your hand in front of the camera. The system will automatically recognize the gesture and switch to the corresponding particle shape.


๐Ÿ“‚ Project Structure

GestureInteraction/
โ”œโ”€โ”€ app.py              # Main Flask backend
โ”œโ”€โ”€ tools/              # Utility tools
โ”‚   โ”œโ”€โ”€ utils.py
โ”‚   โ””โ”€โ”€ gsignature.py
โ”œโ”€โ”€ requirements.txt    # Project dependencies
โ”œโ”€โ”€ README.md           # Entry documentation
โ”œโ”€โ”€ README_en.md        # English documentation
โ”œโ”€โ”€ README_zh.md        # Chinese documentation
โ”œโ”€โ”€ ssl/                # SSL certificates
โ”‚   โ”œโ”€โ”€ server.crt
โ”‚   โ””โ”€โ”€ server.key
โ”œโ”€โ”€ static/             # Static assets
โ”‚   โ”œโ”€โ”€ gicss/          # Stylesheets
โ”‚   โ”œโ”€โ”€ gijss/          # Core logic
โ”‚   โ””โ”€โ”€ giresource/     # Textures and resources
โ””โ”€โ”€ templates/          # HTML templates
    โ””โ”€โ”€ index.html

โš™๏ธ Configuration

Port Configuration

The default port is 5001 and can be modified in app.py.

Particle Parameters

Particle count, size, and physics parameters are configured in the frontend static/gijss/config.js file and can be adjusted based on performance requirements.

Gesture Parameters

Gesture stability frames, smoothing factors, and follow strength can be tuned to better match different devices and environments.


โ“ FAQ

Camera access is blocked

  • Ensure the application is accessed via HTTPS.
  • Check browser permission settings.
  • Make sure the camera is not being used by another application.

Low performance or frame drops

  • Reduce the particle count in config.js.
  • Close other resource-intensive applications.
  • Use a device with better GPU performance.

๐Ÿ“„ License

This project is licensed under the MIT License.

About

๐ŸŽฏ้€š่ฟ‡ๆ‰‹ๅŠฟ่ฏ†ๅˆซๆŽงๅˆถ 3D ็ฒ’ๅญ่ฟ›่กŒไบ’ๅŠจ-A web-based augmented reality (AR) particle interaction system that controls 3D particle effects through gesture recognition. It uses MediaPipe Hands for real-time gesture detection and Three.js for rendering 3D particle animations, supporting various gestures to control different particle shapes.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published