本文へ移動
cccskills
無料GitHub で公開

scroll-scrubbed-visual-sequence

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.

インストール方法を見る

含まれるファイル(6)

  • SKILL.md4.5 KB
  • agents/openai.yaml284 B
  • demo/index.html11.0 KB
  • demo/preview.jpg101.7 KB
  • demo/PROMPT.md1.9 KB
  • REFERENCES.md507 B

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 currentTime writes in requestAnimationFrame.
  • 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

  1. Keep the section in normal document flow and set its height from scrollVh.
  2. Put the visual in a position: sticky stage sized to the viewport.
  3. Keep copy and controls in a separate layer. Do not bake essential text into frames.
  4. Map progress to the renderer with no implicit easing. Add optional smoothing after correctness is proven.
  5. Refresh measurements after fonts and intrinsic media sizes settle.
  6. 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-fit and 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.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Build convincing woven cloth in Three.js, with a thread-level weave normal map, sheen and anisotropic highlights, folds that never stretch the texture, hems with thickness, stitches, seams, frayed edges, fold occlusion, dye and wear variation, and light passing through thin fabric. Use for linen, silk, wool, canvas, curtains, banners, cloaks, tablecloths, tapestries or any 3D drape that currently looks like a plastic sheet, a stretched texture, or a flat coloured plane.

日本語の概要は準備中です。原文の説明を表示しています。

MengTo/Skills6,7132026年10月6日 更新

Build recognizable falling leaves in world space using instanced geometry, independent tumble, coupled sideways drift, shared wind, scene occlusion, and camera-aware recycling. Use for 3D autumn leaves or drifting foliage in Three.js and similar scenes; use falling-leaves for a 2D canvas overlay.

日本語の概要は準備中です。原文の説明を表示しています。

MengTo/Skills6,7132026年10月6日 更新

Add coordinated spring, summer, fall, and winter states to a 3D scene, blending foliage, sunlight, sky, ground materials, snow, and particles without rebuilding the world. Use for seasonal controls, architectural walkthroughs, and outdoor scenes with four-season transitions.

日本語の概要は準備中です。原文の説明を表示しています。

MengTo/Skills6,7132026年10月6日 更新

Create or integrate highly detailed 3D models with smooth silhouettes, shaped surfaces, believable bevels, and close-up geometry, then prepare suitable runtime LODs and loading. Use when a user requests high polygon counts, ultra-realistic models, detailed architectural assets, or removal of visibly faceted geometry.

日本語の概要は準備中です。原文の説明を表示しています。

MengTo/Skills6,7132026年10月6日 更新

Build sharp, physically coherent high-resolution materials for 3D rendering with appropriate PBR maps, texel density, UV direction, mipmaps, anisotropic filtering, and progressive asset delivery. Use for detailed wood, stone, fabric, foliage, and architectural close-ups without excessive download or GPU memory costs.

日本語の概要は準備中です。原文の説明を表示しています。

MengTo/Skills6,7132026年10月6日 更新

Build hyperrealistic PBR metal in Three.js: steel, brass, gold, copper and iron as true conductors (metalness 1, measured F0 tint, no albedo) with roughness-varied finishes (polished, brushed anisotropic, aged with patina and worn edges) lit by a dark HDR studio of real bright window cards prefiltered with PMREM. Use when metal looks like grey plastic, a dull blur, or a black hole; when blades, tools, rings, ingots, hardware or product metal need reflections with edges and structure; or when a finish needs scratches, streaks, fingerprints and bevels that catch light.

日本語の概要は準備中です。原文の説明を表示しています。

MengTo/Skills6,7132026年10月6日 更新

MengTo のスキルをすべて見る

このスキルの問題を報告する