Interactive 3D mascots in React, without Three.js or Spline.
Adding a living character to an AI workspace, onboarding flow or empty state usually means shipping a 400 KB 3D runtime or pre-baked Lottie files that can’t track a pointer or deform when poked. Here is how signed-distance-field shaders in raw WebGL2 deliver Plush, Clay and Jelly physics at 60 fps with zero dependencies.
- 3D runtime dependencies
- 0 KB
- shared WebGL2 context
- 1
- real-time tactile materials
- 3
- at 4× CPU throttle
- 60 fps
Updated December 1, 2026. Benchmarks verified in Chromium at 4× CPU slowdown.
01Live studio
Touch real-time Plush, Clay and Jelly shaders
Switch characters, materials and moods below—then rub across the fur, click clay to leave a healing thumbprint dent, or drag and fling jelly.
Pet fur · Click clay to dent · Drag to fling
Character
Material shader
Reactive mood
<Mascot character="cat" material="plush" mood="idle" />Open full 8-character studio02Trade-offs
Lottie / Rive vs. Spline / Three.js vs. raw WebGL2 SDF
Every approach has a place. Choose based on whether you need custom artwork, imported 3D scenes, or lightweight reactive UI physics.
03Architecture
How to keep 10 live mascots smooth at 60 fps
Four engineering choices prevent shader-compile freezes on Windows Chrome and keep GPU cost near zero on mobile.
- Precomputed 3D noise volume. Instead of evaluating 16-tap procedural 3D Worley and value noise per raymarch step, compute one seamless 32×32×32
TEXTURE_3D(~128 KB) once per page load and sample it in a single hardware trilinear tap. - Per-material split shaders + dynamic loop bounds. Compiling Plush, Clay and Jelly as separate small programs with
min(uShape, 0)stops Windows ANGLE/D3D11 FXC from unrolling SDF loops into massive HLSL blobs. - Single shared WebGL2 context. Every mascot blits its rendered viewport slice onto one 2D canvas, halving DOM canvases and bypassing the browser 8-context cap.
04Where it works
Six product moments where a mascot beats static UI
Mascots earn their keep when they turn invisible system state into immediate physical intuition.
- AI context window & token compaction
Instead of a flat progress bar, Munch physically inflates as prompt tokens mount, flattens against the glass at 90%, and squeezes down when you hit Compact.
- AI voice & chat header
Tracks cursor gaze while idle, furrows brows while thinking, pulses to real microphone or TTS amplitude while speaking, and relaxes when finished.
- Upgrade & annual billing toggle
Switches from calm idle to star-eyed confetti celebration when toggled to Yearly—and pouts playfully when the pointer hovers over "Later".
- Empty states & deploy recovery
Turns a dead blank screen into a napping translucent ghost that wakes up on error and celebrates once the first deploy turns green.
- Habit streaks & growth milestones
Gives daily check-ins physical emotional payoff without downloading multi-megabyte animation packs.
- Local-first sync & support check-ins
Communicates syncing, offline queues, and CSAT feedback at a glance with clear micro-expressions and subtle particles.
05Start free
Install Munch under MIT in 30 seconds
Try the free starter in any React or shadcn/ui repo first; unlock all 8 characters and 3 materials once when you want the full cast.
Want all 8 characters, Stop-Motion Clay, Translucent Jelly and live microphone reactivity? Explore Hairline Mascots ($49 one-time, or included free with Hairline All-Access).
06Questions
Before you install
Why does a shared WebGL2 context matter when showing several mascots?
Desktop and mobile browsers enforce a hard cap of roughly 8 to 16 active WebGL contexts per page, and creating a new context compiles the shader program from scratch. Sharing one offscreen WebGL2 context and blitting onto a single 2D canvas per mascot eliminates context loss and keeps scroll-to-paint under a frame.
How does it avoid draining laptop or phone batteries?
Every mascot observes visibility with IntersectionObserver and listens to document.hidden: the GPU loop stops completely when scrolled off screen or in a background tab, caps pixel density on coarse touch screens, and renders a single crisp static frame under prefers-reduced-motion.
Can I start with a free mascot before buying the full 8-character pack?
Yes. Munch the Plush Cat (@hairline/mascot) is completely free under the MIT license with 6 moods, cursor tracking, fur combing, 4× poke annoyance and fling physics. The Full Pack (@hairline-pro/mascots) unlocks all 8 characters, Plush/Clay/Jelly materials, 9 moods and live audio reactivity for $49 once—or free with Hairline All-Access.
Does it require Next.js, or can I use Vite and plain React?
There are zero Next.js imports in the mascot component or shader engine. Install via shadcn CLI or paste the TypeScript source straight into Next.js, Vite, Remix or any React 18/19 app.
07Keep going
Where to go next
Play with all 8 characters in the Hairline Mascots studio, inspect the live Context window component, read our AI chat components guide and zero-dependency React springs guide, or pair them with Hairline Icons.