
Biscuit
A High-Performance 60FPS Interactive Canvas Head-Tracking & Web Experience
“Sit. Stay. Judge. Meet Biscuit, a tiny puppy in a red knitted jumper with a lethal side-eye who turns his head to track your cursor in buttery 60FPS across 118 high-res canvas frames.”
What the App Is Built For
Biscuit (originally Scowlby) is an interactive editorial micro-experience built around an adorably unimpressed puppy in a red knit sweater. Rather than embedding a passive video or bulky animated GIF, the project transforms high-resolution video into a real-time reactive head-tracking canvas experience. As visitors glide their cursor across the desktop, swipe on touchscreens, or tilt their mobile device via gyroscope, Biscuit smoothly turns his head to follow their position with judging precision. The application demonstrates high-frame-rate canvas rendering, custom cursor physics, AI-assisted video rotoscoping, and editorial luxury web design.
Architecture, Routing, and State
Built on React 19 and Vite 8, the application maintains an atomic component architecture (Navbar, PuppyCanvas, Hero, SpinBadge, CrewBadge, GrumpyCards, CustomCursor, SplashScreen, LiquidGlassSpec). To ensure silky 60/120 FPS performance, high-frequency motion and head-tracking state are decoupled from React's virtual DOM re-render loop using mutable useRef handles, native event listeners, and requestAnimationFrame. Frame scrubbing coordinates an array of 118 alpha-transparent WebP frames (f_051.webp to f_168.webp), anchored around neutral center frame 59 (f_110.webp). Gaze interpolation is driven by an exponential spring smoothing formula (k = 1 - Math.exp(-dt * EASE)). The canvas dynamically recalibrates its internal draw buffer between 1280×720 on mobile and 2560×1440 on desktop/retina displays, eliminating pixelation and maintaining exact 16:9 aspect ratio proportions.
Feature Surface and Page System
The viewport features a deep crimson radial gradient stage anchored by the interactive canvas puppy. The hero unit pairs bold typographic layout (Syne & DM Sans) with interactive call-to-actions and a real-time Gaze Direction Indicator displaying an animated rail thumb and directional angle readout (CENTER, 34° LEFT, 42° RIGHT). An interactive circular Spin Badge uses shortest-path trigonometric calculations (Math.atan2) inside an animation loop to rotate an arrow that continuously points directly at the user’s cursor. Additional interface elements include frosted glassmorphic navigation pills, a delayed-spring custom cursor ring (CustomCursor), community counter badge (CrewBadge with avatar stacks and +12k members), curated challenge cards (GrumpyCards), and an archive HUD inspection panel (LiquidGlassSpec). A synchronized splash screen monitors frame streaming progress and transitions cleanly once critical threshold assets are cached.
Tools, Persistence, and Implementation Notes
The frontend is engineered with React 19, Vite, and vanilla CSS tokens (--yellow: #f5c84a, --red: #a12626, --ink: #1a0d0d, backdrop blur filters, and clamp-based typography) without external UI libraries. Visual assets were rotoscoped from raw source video (red_angry_doggo.mp4) through a custom automated Python pipeline (remove_bg_all.py) utilizing BiRefNet and ISNet background segmentation with alpha matting erosion, exported as optimized 2K WebP frames with transparent alpha channels. Interaction support spans desktop pointer tracking, mobile touch drags, and DeviceOrientationEvent gyroscope tilt tracking (gamma / 20), complete with prefers-reduced-motion accessibility fallbacks. The site runs entirely client-side with zero latency and instant initial paint thanks to critical center-frame link preloading.
Project Gallery
5 items



Explore More Projects
Swipe or click arrows to see other work
















