Skip to content

Latest commit

ย 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

โ—ˆ RealityFrames โ€” AR Portal Engine

A real-time Augmented Reality web app powered by MediaPipe Hand Tracking โ€” no app install needed, runs straight in the browser.

License Deploy Tech


โœจ Features

๐ŸŒ€ Portal Mode

  • Raise both hands to open a live AR portal between them
  • Spread your hands apart to resize the portal
  • Pinch left hand to cycle through 4 worlds:
    • ๐ŸŒŒ Space Galaxy โ€” spiral nebula with orbiting stars
    • ๐ŸŒŠ Deep Ocean โ€” bubbles, fish, and wave caustics
    • ๐Ÿ’ป Matrix Rain โ€” falling glyph streams on cyber grid
    • ๐Ÿ”ฎ Nebula Drift โ€” golden cosmic particle mandala

๐Ÿ‘ป Freeze Mode

  • Hold a tight fist for 2 seconds to capture a ghost snapshot of yourself
  • Up to 5 layered ghost snapshots stack on screen
  • Open palm and hold 3 seconds to clear all ghosts

โšก Painter Mode

  • Point your index finger to draw in AR space
  • Pinch to cycle through 4 brush types:
    • โšก Lightning โ€” electric jitter strokes
    • ๐Ÿ”ฅ Fire โ€” flame particles with glow
    • โœจ Neon โ€” rainbow colour-shifting lines
    • ๐Ÿ’จ Smoke โ€” soft diffuse trails
  • Tap index + middle finger together to wipe the canvas
  • Adjust Brush Size and Intensity from the panel

๐Ÿš€ Live Demo

๐Ÿ”— https://realityframes.vercel.app/


๐Ÿ› ๏ธ Tech Stack

Layer Technology
Hand Tracking MediaPipe Hands v0.4
Rendering HTML5 Canvas 2D API
Camera WebRTC getUserMedia
Audio Web Audio API
Fonts Google Fonts โ€” Orbitron, Share Tech Mono
Hosting Vercel

๐Ÿ“ Project Structure

realityframes/
โ”œโ”€โ”€ index.html        # App shell, UI layout, boot overlay
โ”œโ”€โ”€ app.js            # Core engine โ€” modes, gestures, rendering
โ”œโ”€โ”€ styles.css        # Cyberpunk UI design system
โ”œโ”€โ”€ vercel.json       # Security headers & deployment config
โ”œโ”€โ”€ .gitignore        # Git ignore rules
โ””โ”€โ”€ README.md         # You are here

๐Ÿ’ป Local Development

Prerequisites

  • Node.js (LTS version)
  • A modern browser (Chrome / Edge recommended for best MediaPipe support)
  • A webcam
  • HTTPS or localhost โ€” camera access requires a secure context

Run Locally

# Clone the repo
git clone https://github.com/your-username/realityframes.git
cd realityframes

# Serve locally (no build step needed โ€” pure HTML/JS/CSS)
npx serve .

Then open http://localhost:3000 in your browser.

โš ๏ธ Do not open index.html directly via file:// โ€” the browser will block camera access. Always use a local server.


โ˜๏ธ Deploy to Vercel

Option 1 โ€” GitHub Integration (Recommended)

  1. Push this repo to GitHub
  2. Go to vercel.com โ†’ Add New Project
  3. Import your GitHub repository
  4. Leave all settings as default (no build command needed)
  5. Click Deploy โœ…

Every git push to main will auto-deploy.

Option 2 โ€” Vercel CLI

npm install -g vercel
vercel login
vercel        # first deploy
vercel --prod # subsequent deploys

๐Ÿ”’ Security

This project ships with a hardened vercel.json security config:

  • Content-Security-Policy โ€” strict allowlist for scripts, styles, fonts, media
  • Strict-Transport-Security โ€” HSTS with 2-year max-age and preload
  • X-Frame-Options โ€” DENY (clickjacking protection)
  • X-Content-Type-Options โ€” nosniff
  • Cross-Origin-Opener-Policy โ€” same-origin isolation
  • Cross-Origin-Embedder-Policy โ€” require-corp
  • Permissions-Policy โ€” only camera=(self) allowed; mic, geolocation, payment all blocked

โš ๏ธ Browser Support

Browser Support
Chrome 90+ โœ… Full
Edge 90+ โœ… Full
Firefox โš ๏ธ Partial (MediaPipe may be slower)
Safari โš ๏ธ Limited (WebRTC restrictions on iOS)
Mobile Chrome โœ… Works (use rear/front camera)

๐Ÿ“„ License

MIT License โ€” free to use, modify, and distribute.


ยฉ 2026 Ayyappan M. All rights reserved.

About

๐ŸŒ€ Real-time AR Portal Engine built with MediaPipe Hand Tracking & HTML5 Canvas. Three gesture-controlled modes โ€” Portal Worlds, Ghost Freeze, and AR Painter. No app install needed, runs in the browser.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages