I have built a Funhouse Mirror Application with WebGL distortion shaders, mirror frame styling, real-time morphing, and interactive audio/voice effects.
What Was Created:
-
WebGL Distortion Optics Engine:
- Stretch Mode: Horizontal & Vertical parabolic stretch curves ("Giraffe Neck").
- Squeeze Mode: Hourglass waist shrink and Pinhead skull compression.
- Wave & Ripple: Dynamic animated sine/cosine water & carnival glass ripple.
- Bulge & Pinch: Curved sphere magnifying lens or inverse black hole suction.
- Vortex Swirl: Angular hypnosis spiral twister.
- Liquid Melt: Teardrop gravity drip sliding.
- Kaleidoscope: 4-way, 6-way, 8-way, and 12-way symmetry reflection matrix.
- Full Matrix Mode: Combine bulge, wave, twist, melt, and stretch all at once.
- Chromatic Aberration & Pop Art Filters: Glass prism fringe, Comic Pop Art posterization, Retro Carnival, Neon Disco, Cyber Glitch, Vintage Sepia, and Thermal Heat Map.
-
Real-Time Morphing:
- Smooth sine wave oscillators dynamically animating distortion parameters live over time with customizable speed settings.
-
Interactive Touch & Poke:
- Click or drag directly on the mirror canvas to position distortion anchors or poke interactive warps onto the screen in real-time at 60 FPS.
-
Detailed Mirror Frames:
- Circus Marquee Lights: Animated chasing marquee lightbulbs with a carnival arch badge.
- Victorian Gold Gilt: Ornate metallic gold carved baroque mirror with deep inner bevel shadows.
- Cyber Neon RGB: Cyberpunk pulsating rainbow neon tube frame.
- Haunted Gothic Stone: Dark carved stone with cracks and atmospheric lighting.
- Boardwalk Carnival Wood: Red & yellow fairground striped wooden frame with brass rivets.
- Modern Beveled Glass: Crystal frameless glass with realistic glare reflections.
-
Live Feed & Media Options:
- Live Webcam Input (with horizontal mirroring and instant feed toggle).
- Sample Photo Gallery: High quality funny portraits, laughing faces, cute pets, and winking characters.
- Custom Uploads: Supports local image files and video files.
- Motion Video Loop: Test real-time video distortion feeds without requiring a camera.
-
Web Audio Sound Effects & Live Microphone Pitch Shifter:
- Procedural Circus Organ Background Music synth player.
- Funny cartoon boing and slide whistle sounds on touch.
- Live Microphone Pitch Shift: Change your voice live to Helium Clown, Deep Giant, Arcade Robot, Cosmic Alien, or Cave Echo.
-
Snapshot Sticker Studio & Gallery:
- Take full-resolution snapshots of your funhouse mirror reflection.
- Add draggable, rotatable, and resizable stickers (Red Clown Nose, Party Hat, Giant Glasses, Mustache, Star Shades, Cat Ears, and Custom Text Captions).
- Confetti celebration explosion, instant PNG download, and saved local gallery with lightbox preview!
Files built: index.html, src/types/funhouse.ts, src/utils/presets.ts, src/utils/audio.ts, src/utils/webglShaders.ts, src/components/MirrorFrame.tsx, src/components/FunhouseCanvas.tsx, src/components/ControlsPanel.tsx, src/components/MediaSourceSelector.tsx, src/components/AudioVoicePanel.tsx, src/components/SnapshotStickerModal.tsx, src/components/SnapshotGallery.tsx, src/components/ComparisonSlider.tsx, src/App.tsx