scroll-experiences

Compose scroll-driven experiences with fixed background scenes, pinned sections, and WebGL fallbacks.

Updated Aug 12, 2026
One-click install
npx skills add https://github.com/brunoolf/frontend-craft --skill scroll-experiences-brunoolf
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: scroll-experiences
Source: https://github.com/brunoolf/frontend-craft/tree/main/skills/scroll-experiences
Command: npx skills add https://github.com/brunoolf/frontend-craft --skill scroll-experiences-brunoolf

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Scroll-driven pages break in predictable ways: scenes disappear behind content, scroll feels jittery, WebGL bundles block first paint, and mobile devices overheat. This Skill provides the architecture that connects scroll, scene, and content so these experiences work across devices and accessibility settings. ## Core Features & Use Cases - Category Decision Framework: Classifies requests into reveal-on-scroll, parallax, pinned sections, persistent background scenes, or scrollytelling, each with a different architecture and cost. - Scene Architecture Patterns: Defines the fixed-canvas-plus-scrolling-content structure, a single damped progress value fed by ScrollTrigger, and one requestAnimationFrame loop per page. - Loading, Fallbacks, and Performance Budgets: Covers dynamic imports after first paint, static fallbacks for no-WebGL and prefers-reduced-motion, pixelRatio caps, offscreen pausing, and GPU memory cleanup. - Use Case: A user asks for a 3D background scene that reacts while the page scrolls on a landing page. The Skill guides building the fixed canvas layer, syncing camera position to smoothed scroll progress, lazy-loading the Three.js bundle, and shipping a static gradient fallback for reduced-motion users. ## Quick Start Build a scroll-driven background scene for my landing page where a 3D canvas stays fixed behind the content and reacts to scroll progress, with proper fallbacks for mobile and reduced motion.

Frequently Asked Questions about scroll-experiences

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a scroll-driven 3D background scene on a webpage?▼

Place the canvas in a fixed-position container at z-index 0 with pointer-events none, and scroll content in a relative container above it. Feed a single normalized progress value from ScrollTrigger into your render loop, damping it with lerp so camera motion stays smooth.

How to sync Three.js camera movement with scroll position?▼

Never read scrollY inside the render loop since it forces synchronous reflow. Instead, update a target progress value via ScrollTrigger onUpdate, then interpolate toward it each frame with a factor like 0.08 before positioning the camera.

Should I use parallax or a full WebGL scene for scroll effects?▼

Choose the lowest category that achieves the effect: CSS scroll-driven parallax handles most requests at trivial cost. Reserve persistent WebGL scenes for cases where the background genuinely needs 3D, since they add megabytes of bundle and battery drain.

Does scroll-driven animation work with prefers-reduced-motion?▼

Yes, but the scene must degrade to a static representative frame or plain background, and the WebGL bundle should not load at all. The narrative content and order remain identical; only the motion is removed.

Why does my scroll animation stutter on mobile devices?▼

Common causes are multiple competing requestAnimationFrame loops, reading scrollY per frame, missing damping on touch inertia, and rendering at native 3x pixelRatio. Cap pixelRatio at 2, use one loop, and strengthen the lerp damping for touch scroll.

When should I avoid scroll-jacking on a website?▼

Avoid hijacking scroll whenever possible because it breaks keyboard navigation, screen readers, and user expectations. If unavoidable, provide an exit path and equivalent keyboard navigation, and ensure pinned sections remain reachable by Tab in the correct order.