Scroll Scrubbed Visual Sequence
Meng ToCommunityCreated by Meng To
- Skill
- Guidelines
- Software development
- MIT
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a robust framework for building interactive visual sequences that respond to user scrolling. It emphasizes using native scroll position as the primary driver for visual state, ensuring that animations are reversible, performant, and accessible. The guide covers renderer selection (video, canvas, SVG, DOM), architectural patterns for sticky stages, and critical considerations for performance, accessibility, and reduced-motion support.
What it does
- Defines a normalized progress-based approach for scroll-controlled animations.
- Provides architectural patterns for sticky-positioned visual stages.
- Outlines criteria for choosing between video, image sequences, canvas, and SVG renderers.
- Establishes best practices for performance, including resource cleanup and frame decoding.
- Ensures accessibility by maintaining semantic HTML and supporting reduced-motion preferences.
- Offers a verification checklist for cross-device and cross-interaction consistency.
When to use it
- When creating hero transformations or product assembly walkthroughs.
- When building interface state visualizations that require precise scroll-based control.
- When implementing object rotations or photo sequences that must move forward and backward.
- When you need to ensure visual sequences remain performant and accessible across different devices.
Advantages
- Ensures consistent visual state regardless of scroll speed or direction.
- Decouples visual rendering from specific input methods.
- Provides clear guidance on handling accessibility and reduced-motion requirements.
- Promotes efficient resource management for complex media sequences.
- Supports a wide range of renderers to match specific project needs.
Usage examples
- “How should I structure a scroll-scrubbed video sequence for a product hero section?”
- The agent will provide a configuration object for the sequence, explain how to use a sticky stage for the video, and detail how to map scroll progress to video currentTime.
- “What are the best practices for handling reduced motion in a scroll-scrubbed animation?”
- The agent will explain how to detect the prefers-reduced-motion media query, disable pinning/scrubbing, and display a static fallback frame instead.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/mengto/scroll-scrubbed-visual-sequence/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip scroll-scrubbed-visual-sequence.zip -d .agents/skills
Documentation by Meng To
Scroll-Scrubbed Visual Sequence
Turn one visual transformation into a responsive scroll instrument. Keep the page usable without motion and keep the renderer replaceable.
Define the sequence
Write the visual states before coding:
const sequence = {
scrollVh: 280,
frameCount: 96,
fit: "contain",
posterFrame: 0,
reducedMotionFrame: 95,
copyStops: [0, 0.42, 0.78]
};Use one normalized value for every renderer:
const progress = Math.min(1, Math.max(0,
(viewportTop - sectionTop) / (sectionHeight - viewportHeight)
));Never make wheel delta, elapsed time, or autoplay the source of truth. Native scroll position must determine the exact visual state in both directions.
Choose the renderer
Use video when the sequence is continuous, photographic, or expensive to render live. Encode frequent keyframes, preload metadata, reserve the aspect ratio, and coalesce
currentTimewrites inrequestAnimationFrame.Use an image sequence when exact art-directed frames matter. Preload the current frame first, then nearby frames; never block first paint on the whole set.
Use canvas for procedural drawing or compositing. Cap device pixel ratio at 2 and redraw only when progress changes.
Use SVG or DOM for diagrams, product cards, interface states, and accessible text. Drive transforms, opacity, clip paths, and CSS variables instead of layout-heavy properties.
Use WebGL only when depth, lighting, or a real 3D camera materially strengthens the idea. Provide a static poster and dispose resources.
Build the scroll stage
Keep the section in normal document flow and set its height from
scrollVh.Put the visual in a
position: stickystage sized to the viewport.Keep copy and controls in a separate layer. Do not bake essential text into frames.
Map progress to the renderer with no implicit easing. Add optional smoothing after correctness is proven.
Refresh measurements after fonts and intrinsic media sizes settle.
Release the sticky stage cleanly before the next section and keep the footer reachable.
Use GSAP ScrollTrigger when the project already uses GSAP or needs exact pin, refresh, and timeline coordination:
ScrollTrigger.create({
trigger: section,
start: "top top",
end: () => `+=${innerHeight * 2.8}`,
pin: stage,
scrub: true,
invalidateOnRefresh: true,
onUpdate: ({ progress }) => render(progress)
});For a dependency-free implementation, measure the section on scroll and resize, then schedule one render per animation frame.
Handle media safely
Keep a poster visible until the first real frame paints.
Clamp frame indexes to
0...frameCount - 1.Cancel stale image requests and never queue every seek during fast scrolling.
Use
object-fitand an explicit focal point so the subject survives mobile crops.Pause decoding, rendering, and observation while the section is offscreen or the document is hidden.
Clean up ScrollTriggers, observers, listeners, animation frames, Blob URLs, and renderer resources on route change or unmount.
Preserve access and control
Keep headings, copy, captions, and the CTA in semantic HTML.
Do not trap scrolling, block keyboard navigation, or require precise pointer input.
Under
prefers-reduced-motion: reduce, remove pinning and scrubbing, render the selected static frame, and restore ordinary document flow.If the sequence communicates ordered information, expose the same states as text or a list.
Tune deliberately
Expose scroll distance, renderer, frame count, poster frame, media fit, focal point, copy stops, overlay strength, smoothing, and reduced-motion state as configuration. Avoid magic numbers distributed across event handlers.
Verify
Check forward and reverse scrolling, fast flicks, resize while active, 390/768/1024/1440 widths, unloaded frames, blocked video, reduced motion, keyboard order, route cleanup, and console errors. The same scroll position must always reproduce the same state.
Use demo/index.html as the working reference and demo/PROMPT.md to recreate or remix it. Keep REFERENCES.md as the links-only implementation source list.
Files
- ATTRIBUTION.mdAdded by AutoGineer884 B
- LICENSELicence file added by AutoGineer1.0 KiB
- REFERENCES.md507 B
- SKILL.md4.5 KiB
- agents/openai.yaml284 B
- demo/PROMPT.md1.9 KiB
- demo/index.html11.0 KiB
- demo/preview.jpg101.7 KiB
SKILL.md
Scroll-Scrubbed Visual Sequence
Turn one visual transformation into a responsive scroll instrument. Keep the page usable without motion and keep the renderer replaceable.
Define the sequence
Write the visual states before coding:
const sequence = {
scrollVh: 280,
frameCount: 96,
fit: "contain",
posterFrame: 0,
reducedMotionFrame: 95,
copyStops: [0, 0.42, 0.78]
};Use one normalized value for every renderer:
const progress = Math.min(1, Math.max(0,
(viewportTop - sectionTop) / (sectionHeight - viewportHeight)
));Never make wheel delta, elapsed time, or autoplay the source of truth. Native scroll position must determine the exact visual state in both directions.
Choose the renderer
Use video when the sequence is continuous, photographic, or expensive to render live. Encode frequent keyframes, preload metadata, reserve the aspect ratio, and coalesce
currentTimewrites inrequestAnimationFrame.Use an image sequence when exact art-directed frames matter. Preload the current frame first, then nearby frames; never block first paint on the whole set.
Use canvas for procedural drawing or compositing. Cap device pixel ratio at 2 and redraw only when progress changes.
Use SVG or DOM for diagrams, product cards, interface states, and accessible text. Drive transforms, opacity, clip paths, and CSS variables instead of layout-heavy properties.
Use WebGL only when depth, lighting, or a real 3D camera materially strengthens the idea. Provide a static poster and dispose resources.
Build the scroll stage
Keep the section in normal document flow and set its height from
scrollVh.Put the visual in a
position: stickystage sized to the viewport.Keep copy and controls in a separate layer. Do not bake essential text into frames.
Map progress to the renderer with no implicit easing. Add optional smoothing after correctness is proven.
Refresh measurements after fonts and intrinsic media sizes settle.
Release the sticky stage cleanly before the next section and keep the footer reachable.
Use GSAP ScrollTrigger when the project already uses GSAP or needs exact pin, refresh, and timeline coordination:
ScrollTrigger.create({
trigger: section,
start: "top top",
end: () => `+=${innerHeight * 2.8}`,
pin: stage,
scrub: true,
invalidateOnRefresh: true,
onUpdate: ({ progress }) => render(progress)
});For a dependency-free implementation, measure the section on scroll and resize, then schedule one render per animation frame.
Handle media safely
Keep a poster visible until the first real frame paints.
Clamp frame indexes to
0...frameCount - 1.Cancel stale image requests and never queue every seek during fast scrolling.
Use
object-fitand an explicit focal point so the subject survives mobile crops.Pause decoding, rendering, and observation while the section is offscreen or the document is hidden.
Clean up ScrollTriggers, observers, listeners, animation frames, Blob URLs, and renderer resources on route change or unmount.
Preserve access and control
Keep headings, copy, captions, and the CTA in semantic HTML.
Do not trap scrolling, block keyboard navigation, or require precise pointer input.
Under
prefers-reduced-motion: reduce, remove pinning and scrubbing, render the selected static frame, and restore ordinary document flow.If the sequence communicates ordered information, expose the same states as text or a list.
Tune deliberately
Expose scroll distance, renderer, frame count, poster frame, media fit, focal point, copy stops, overlay strength, smoothing, and reduced-motion state as configuration. Avoid magic numbers distributed across event handlers.
Verify
Check forward and reverse scrolling, fast flicks, resize while active, 390/768/1024/1440 widths, unloaded frames, blocked video, reduced motion, keyboard order, route cleanup, and console errors. The same scroll position must always reproduce the same state.
Use demo/index.html as the working reference and demo/PROMPT.md to recreate or remix it. Keep REFERENCES.md as the links-only implementation source list.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- Meng To
- Publisher
- Meng To (Community)
- Source
- MengTo/Skills · agent-skills/web-design/scroll-scrubbed-visual-sequence · commit 5ea1661
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Meng To.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download scroll-scrubbed-visual-sequence.zip