본문으로 건너뛰기
Skillpedia
웹사이트 및 UI (프런트엔드)7.2k · #13441

horizontal-scroll-scenes

하는 일

이 스킬은 세로 스크롤이 가로 무대에서 장면을 따라 이야기를 옮기는 웹 페이지를 만들도록 AI 에이전트를 안내합니다. 장별로 나뉜 제품 이야기, 포트폴리오, 전시를 만드는 디자이너를 위한 스킬입니다.

사용하는 경우

  • ✓스크롤할 때마다 장면이 옆으로 넘어가는 장별 이야기를 원할 때.
  • ✓이야기가 계속 흐르기보다 각 장마다 쉬는 지점이 필요할 때.
  • ✓스크롤을 되돌리거나 스크롤바를 끌거나 새로고침해도 올바른 장면에 도착해야 하는 경우.

스킬 링크

https://github.com/MengTo/Skills/blob/main/agent-skills/web-design/horizontal-scroll-scenes/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/MengTo/Skills/blob/main/agent-skills/web-design/horizontal-scroll-scenes/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“네 개의 장이 왼쪽에서 오른쪽으로 미끄러지고, 장면 사이에 와이프 전환과 장 목록이 있는 스크롤 이야기를 만들어 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 스크롤 위치를 읽어 현재 장면과 그 장면을 얼마나 지났는지 계산하는 하나의 함수를 씁니다. 화면의 모든 것이 그 하나의 값에서 그려지므로 어긋날 수 있는 저장 상태가 없습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Horizontal Scroll Scenes

The mechanism: scroll position is the only state. One pure function turns scrollY / (scrollHeight - innerHeight) into {scene, dwell 0→1, move 0→1} every frame, and everything on screen (camera, wipe line, craft clock, text, index) is written from that triple. Nothing remembers where you were, so every beat is a place on the page.

This is what Kibori does, and it is not a translateX slider. Verified by running it: the page is a 1742vh native-scroll track (15,678 px at 1440×900); a fixed stage holds one WebGL world whose camera travels 0 → 49.7 world units left to right through eight stations; between stations a ragged burn line wipes from a frozen frame of the scene being left to the live scene already framed on the next. There is no wheel handler, no snap, no stored "current chapter". Reload at depth, scrollbar drag and anchor jumps work because state is derived, not accumulated.

Reach for scroll-world-storytelling or build-threejs-scroll-worlds for the story and 3D-world side, gsap-scrolltrigger-storytelling for pinned sticky sections, scroll-progress-timeline for a progress line. Reach for this when the deliverable is discrete chapters with a resting beat each, laid along an X axis, and the hard part is making that state machine survive reverse, skip and refresh. The demo is Vanilla JavaScript + DOM/CSS + inline SVG; the source is three.js. The state machine is identical.

The pace: two weights and a track height

Every number lives in DWELL, MOVE and the track height. One unit is one screen of scrolling.

constant value meaning
DWELL 1.15 scroll spent inside a scene while its craft advances (about 1,030 px at 900 tall)
MOVE 0.85 scroll spent crossing to the next scene (about 760 px); the last scene has none
CYC 2.00 one scene per two screens
SPAN N*DWELL + (N-1)*MOVE 8 scenes: 15.15 plus a 1.35 footer = 16.5; demo, 5 scenes: 9.15
track (SPAN + 1) * 100vh so 1 unit ≈ 1 screen; Kibori is 1742vh for 16.5
function travel(sp){                              // sp = scrollY / (scrollHeight - innerHeight)
  const u  = Math.min(SPAN - 1e-5, sp*SPAN);
  const i  = Math.min(N - 1, Math.floor(u/CYC));
  const local = u - i*CYC;
  const dw = Math.min(1, local/DWELL);                        // the scene's own clock
  const f  = i >= N-1 ? 0 : clamp01((local - DWELL)/MOVE);    // the move
  const rc = clamp01((f - 0.01)/0.97);                        // the line's own clock
  return {i, u, dw, f, fe: sstep(0,1,f), L: -0.08 + 1.24*rc,  // L: line, off-frame at both ends
          live: Math.min(N-1, f < 0.39 ? i : i+1)};           // what the index shows
}

Normalise by scrollHeight - innerHeight, never a hard-coded pixel height: a phone's collapsing URL bar changes innerHeight mid-scroll and a px map drifts.

Rules, each with the failure it prevents

  1. Derive, do not accumulate. Never keep currentScene or add wheel deltas. Stored state desyncs on scrollbar drag, Home/End, anchor jumps, back-forward and refresh. Prove it: record a signature of every visible style at 20 u values going forward, then again in reverse, then by jumping straight to each, then after reload() at three depths. All must be equal (the demo run: 0 mismatches of 21, 0 skip, 0 reload).
  2. No wheel hijack, no scroll-snap. Hijacking breaks touch, trackpad momentum, Space/PageDown and find-in-page. Snap fights the dwell, which is already the resting plateau (1.15 screens where nothing moves but the craft). Native scrolling stays 1:1: 2,000 px of wheel gave exactly u = 2000/(scrollHeight - vh)*SPAN.
  3. Pin the craft clock outside its dwell. Scene k's progress is 1 if k < i, dw if k == i, 0 after. Then nothing snaps back behind you and reverse retraces exactly. Write it as --p{k} and eased --e{k} custom properties on the stage; both world copies read them, so it is one write per frame.
  4. A move with nothing moving is dead scroll. Start the line at the frame's edge almost at once (rc = (f-0.01)/0.97); starting it further off made the first eighth of every move do nothing.
  5. The wipe hides the camera. Freeze the outgoing frame ahead of the line and have the live world already standing on the destination behind it. A camera still travelling under the line reads as a double exposure. Demo: layer A at camera i clipped to the far side of the line, layer B at
자주 묻는 질문

방문자가 있던 위치를 저장하나요?

아닙니다. 모든 장면을 스크롤 위치에서 계산하므로, 새로고침하거나 바로 이동해도 올바른 장면에 도착합니다.

단순한 가로 슬라이더인가요?

아닙니다. 이 스킬은 기본 슬라이더가 아니며, 장면 사이에 와이프 전환을 씁니다.

프레임워크가 필요한가요?

데모는 인라인 SVG와 CSS, 일반 JavaScript와 DOM을 써서 특정 프레임워크에 의존하지 않습니다.

상세 정보

작성자의 원본 설명

Build scene-by-scene chapters that advance left to right on one fixed stage while the user scrolls vertically, with native scroll as the only input. One pure function turns scrollY into scene, dwell and move, so forward, reverse, scrollbar drags, fast skips and reload at depth all land on the right frame. Covers dwell versus transition budgets, a burn-wipe or pan between scenes, chapter index and progress UI, glide-to-scene links that skip intermediate scenes, keyboard and reduced-motion behaviour. Use for horizontal scrollytelling, multi-scene product tours, "scroll down to travel sideways",

repo: MengTo/Skills

인기도

GitHub 스타
7.2k
순위
#13441
라이선스
MIT
업데이트
2026. 11. 1.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬