본문으로 건너뛰기
cccskills
무료GitHub에 공개

scroll-scrubbed-word-reveal

Build text that reveals word by word as readers scroll. Preserve inline links, emphasis, and responsive wrapping, while keeping complete text accessible to screen readers and immediately readable when reduced motion is preferred.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

Reveal marked-up text word by word as scroll progress advances, while preserving semantic inline links, emphasis, responsive line wrapping, and reduced-motion readability. Use for headlines, quotes, manifestos, product statements, onboarding messages, or editorial passages where scrolling should pace comprehension rather than simulate typing.

설치 방법 보기

이럴 때 유용합니다

  • Revealing a headline as readers scroll
  • Pacing the reading of a quote or manifesto
  • Adding scroll-based text to product introductions
  • Preserving links and accessibility in animated text

포함된 파일(6)

  • SKILL.md4.0 KB
  • agents/openai.yaml258 B
  • demo/index.html7.4 KB
  • demo/preview.jpg89.8 KB
  • demo/PROMPT.md1.7 KB
  • REFERENCES.md491 B

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Scroll-Scrubbed Word Reveal

Make reading progress visible without replacing real text, breaking inline markup, or depending on a fixed line count.

Prepare the text

  1. Keep one untouched accessible text source in the DOM.
  2. Walk text nodes with TreeWalker; do not flatten the container with textContent or innerHTML.
  3. Skip script, style, form controls, and elements marked with [data-no-split].
  4. Replace only non-whitespace tokens with spans and preserve whitespace nodes exactly.
  5. Mark generated spans aria-hidden="true" only when an equivalent unsplit accessible copy remains available.

Preferred structure:

<p class="reveal" data-reveal>
  Motion should <em>explain</em> the next state, not decorate it.
</p>

Avoid line-based splitting. Browser line wraps must remain free to change with container width, language, zoom, and font loading.

Map scroll to words

Use section progress as the single source of truth:

const reveal = Math.min(1, Math.max(0, progress));
const local = Math.min(1, Math.max(0, reveal * wordCount - index));
word.style.setProperty("--word-progress", local);

Interpolate hidden opacity, blur, and vertical offset from --word-progress. Keep the visible state identical to normal typography.

Use GSAP ScrollTrigger with scrub when precise starts, ends, refresh, or a shared timeline is needed. Use a dependency-free scroll measurement plus requestAnimationFrame for a standalone section.

Set useful defaults

  • Hidden opacity: 0.12–0.3
  • Blur: 4–10px
  • Vertical offset: 0.08–0.22em
  • Reveal span: 120–220% of the viewport for a paragraph
  • Direct word overlap: 10–30%
  • Easing: none for the scroll mapping; ease only the visual interpolation when needed

Expose the values as CSS custom properties. Scale the scroll span from text length rather than assuming one duration fits every passage.

Preserve emphasis

  • Let links, strong, em, marks, and accent spans keep their semantics and styling.
  • Use inherited color by default; style accents on the original element, not on token indexes.
  • Do not reveal essential links only on hover or after the reader has passed them.
  • Re-split only when the source text changes. Responsive wrapping does not require rebuilding tokens.
  • Store enough state to restore the original DOM during cleanup.

Keep it readable

  • Use real document flow; pin only when the copy and evidence justify a short deliberate reading beat.
  • Do not use a typewriter cursor, random delays, or autoplay unless explicitly requested.
  • Under prefers-reduced-motion: reduce, show every word immediately, remove blur and transforms, and remove any pinning.
  • Keep screen-reader output natural and avoid announcing each word.
  • Verify contrast in both the hidden and final states; hidden words may be quiet but the final text must meet the normal reading contract.

Clean up

Kill ScrollTriggers, remove scroll and resize listeners, cancel animation frames, and restore the original marked-up subtree on route change or component unmount. Refresh measurements after fonts load if start or end positions depend on text geometry.

Verify

Test inline links and emphasis, punctuation, repeated spaces, long words, 200% zoom, 390/768/1440 widths, content changes, forward and reverse scrolling, reduced motion, keyboard focus, screen-reader reading order, and teardown. The final DOM must still communicate the complete sentence with JavaScript disabled.

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.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Build woven fabric in Three.js with visible threads, realistic sheen, seams, and thick hems. The skill covers folds that preserve texture proportions, light passing through thin cloth, and variations in dye and wear.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Creating backlit curtains
  • Differentiating linen, silk, and wool
  • Adding hems and stitches for close-up views
MengTo/Skills7천2026년 10월 18일 업데이트

Build falling leaves in Three.js and similar 3D scenes, with visible front, edge, and back views as they tumble and drift. Coordinate wind, scene depth, camera-aware recycling, and performance checks for a convincing autumn effect.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Adding falling autumn leaves to a 3D scene
  • Coordinating leaf tumble, sideways drift, and wind
  • Managing leaves around buildings and camera movement
MengTo/Skills7천2026년 10월 18일 업데이트

Add coordinated seasonal transitions to an existing 3D scene. Blend foliage, lighting, sky, ground, snow, and particles from one shared state while preserving camera controls and interactions, so the same place remains recognizable throughout spring, summer, fall, and winter.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Add a four-season selector to an outdoor 3D scene
  • Show seasonal changes in an architectural walkthrough
  • Coordinate foliage, sunlight, sky, and ground appearance
MengTo/Skills7천2026년 10월 18일 업데이트

Create or integrate detailed 3D models with smooth outlines and believable edges for close-up views. Prepare lower-detail versions for distant viewing, prioritize loading, and measure rendering costs in the actual scene.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Creating a detailed 3D model for close-up views
  • Replacing visibly faceted curves with smoother geometry
  • Preparing detailed architectural assets for rendering
MengTo/Skills7천2026년 10월 18일 업데이트

Prepare detailed 3D materials that remain clear in close-up views. The skill guides texture resolution, physically based material maps, surface mapping, filtering, and progressive loading while checking download size and GPU memory use.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Prepare wood, stone, and fabric materials for close-up views
  • Fix texture seams, grain direction, and normal map orientation
  • Preserve floor and foliage detail at oblique or distant views
MengTo/Skills7천2026년 10월 18일 업데이트

Create realistic metal surfaces in Three.js by combining structured reflections, studio lighting, scratches, fingerprints, and beveled edges. Includes polished, brushed, and aged finishes for objects such as tools, rings, and metal product parts.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Fixing metal that looks like gray plastic
  • Creating polished or brushed metal finishes
  • Adding patina and worn edges
MengTo/Skills7천2026년 10월 18일 업데이트

MengTo의 스킬 모두 보기

이 스킬의 문제 신고