scroll-scrubbed-visual-sequence
Что он делает
Этот скилл связывает визуальное изменение, например сборку продукта или поворот объекта, с положением прокрутки страницы. Он нужен дизайнерам и разработчикам, которым нужна история, управляемая прокруткой, с надёжным запасным вариантом.
Когда использовать
- ✓Когда вы хотите, чтобы продукт собирался или поворачивался, пока читатель прокручивает страницу вниз.
- ✓Когда первый экран должен меняться в зависимости от того, насколько далеко прокручена страница.
- ✓Когда нужна схема или последовательность фото, которая двигается в обе стороны при обычной прокрутке.
Ссылка на скилл
https://github.com/MengTo/Skills/blob/main/agent-skills/web-design/scroll-scrubbed-visual-sequence/SKILL.mdСкопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.
Как использовать
Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.
Готовое сообщение для вставки
Для Claude Code, Codex или Cursor: запустите в папке проекта, и скилл установится.
Скачайте SKILL.md и положите его в папку скиллов вашего агента.
Пример запроса к вашему ИИ
“Хочу, чтобы видео продукта на моей странице проигрывалось вперёд, когда люди прокручивают вниз, и назад, когда прокручивают вверх.”
5 новых скиллов в неделю. 1 минута чтения.
Как это работает
Агент задаёт одно значение прогресса по положению прокрутки и использует его, чтобы управлять выбранным отрисовщиком: видео, изображениями, холстом или SVG. Прокрутка выбирает точный кадр, поэтому таймеры и колесо мыши не определяют состояние.
Технический текст (оригинальный SKILL.md)
Оригинальный текст автора на английском, прямо с GitHub.
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.
Частые вопросы
Какой отрисовщик выбрать?
Скилл советует видео для плавных фотографических последовательностей, изображения для точных кадров, холст для рисования и SVG или DOM для схем и текста.
Перехватывает ли он прокрутку?
Нет. Он использует родную прокрутку страницы, поэтому страница остаётся удобной и без движения.
Загружаются ли все кадры сразу?
Нет. Последовательности изображений сначала загружают текущий кадр, затем соседние.
Подробности
Оригинальное описание автора
Build reversible scroll-controlled visual transformations with a pinned or sticky stage, normalized progress, and video, image-sequence, canvas, SVG, or DOM renderers. Use for hero transformations, product assembly, interface state walkthroughs, object rotation, diagrams, or photo sequences that must move forward and backward with native scrolling.
repo: MengTo/Skills
Популярность
- Звёзды на GitHub
- 7.2k
- Место в рейтинге
- #13463
- Лицензия
- MIT
- Обновлён
- 01.11.2026
Комментарии
- …
Другие скиллы из этого репозитория
3d-cloth-material
7.2kПомогает агенту создавать реалистичную тканую ткань в Three.js: переплетение нитей, мягкий блеск, естественные складки, подгибы и швы.
3d-falling-leaves
7.2kПомогает агенту добавить в трёхмерную сцену реалистичные падающие листья, которые кувыркаются, уносятся ветром и переиспользуются при движении камеры.
3d-four-seasons
7.2kПомогает агенту добавить в трёхмерную сцену весну, лето, осень и зиму, меняя растительность, свет, небо и снег без перестройки сцены.
3d-high-poly-models
7.2kПомогает агенту создавать детализированные трёхмерные модели с гладкими формами и правдоподобными краями, а затем готовить более лёгкие версии, которые хорошо работают в вебе.
Похожие скиллы
blender-motion-state-inspection
280kПозволяет изучать детали 3D-анимаций: проверять позы, движения и выравнивание персонажей.
manim-video
280kАгент создаёт анимированные объясняющие видео, генерируя с Manim понятные графики и схемы для технических понятий.
remotion-video-creation
280kПомогает агенту создавать видео на React с библиотекой Remotion: анимации, звук, субтитры и другие элементы.