I have created a Funhouse Mirror Web Application featuring WebGL distortion modes, real-time morphing, mirror frame styling, and sound/voice effects.
What Was Built:
-
High-Performance WebGL Distortion Engine:
- Bulge & Pinch: Sphere magnifying glass lens with adjustable diameter, positive bulge inflation, and negative pinch suction.
- Stretch Mode: Independent horizontal & vertical non-linear parabolic stretch sliders (e.g., Giraffe Neck).
- Squeeze Mode: Hourglass waist shrink and pinhead skull squeeze controls.
- Wave & Ripple: Dynamic sine/cosine liquid water waving matrix with speed, frequency, and amplitude sliders.
- Vortex Swirl / Twister: Angular spiral hypnosis swirl center.
- Gravity Melt: Liquid teardrop drip effect sliding features downward.
- Kaleidoscope: Multi-mirror polar geometry (4x, 6x, 8x, 12x symmetries).
- Chromatic Prism Fringe & Glare Overlay: Realistic mirror glass specular light reflections and prism fringe.
- Interactive Pointer/Touch Poke Warps: Touch or drag directly on the mirror glass to distort anywhere on the mirror.
-
Real-Time Morphing:
- Automated morph mode driven by sine oscillators smoothly transitioning parameters over time with an adjustable speed multiplier.
-
6 Mirror Frame Architecture Styles:
- Circus Marquee Lights: Vintage carnival border with chasing lightbulbs around the perimeter.
- Victorian Gold Gilt: Carved gold baroque ornamentation and metallic brass tones.
- Cyber Neon RGB: Pulsating cyberpunk gradient neon tubes.
- Gothic Haunted Stone: Dark carved stone texture with subtle atmospheric purple fog.
- Boardwalk Fairground Wood: Classic red & yellow carnival striped wooden border with brass rivets.
- Beveled Glass: Minimalist glass bevel with crystal glare reflections.
-
Media Feed Inputs:
- Live Webcam Feed with horizontal mirroring toggle.
- Sample Media Gallery (humorous portrait photos, goofy faces, playful pets).
- Motion Video Loop.
- Custom Upload: Upload any photo (.jpg, .png) or video file (.mp4, .webm).
-
Circus Sound Synthesizer & Voice Pitch Modulator (Web Audio API):
- Web Audio API cartoon "boing" and slide whistle sound effects.
- Procedural carnival background tune toggle.
- Live Microphone Voice Warp: Microphone pitch shifter (Helium Clown, Deep Giant, Arcade Robot, Cosmic Alien, Cave Echo).
-
Snapshot Sticker Studio & App Gallery:
- Snapshot capture with interactive drag/resize stickers (Clown hat, Giant glasses, Mustache, Red nose, Star shades, Custom caption overlays).
- Confetti celebration and instant
.PNG image downloading.
- Built-in saved snapshot gallery with preview lightboxes.
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