Design Vault 用途・構成・配色・本文で検索 /
索引 カテゴリ タグ English

一式

設定画の見せ方 61–62 — 人物を回し、各部に注釈を引く

向き別の絵を回して見せるターンテーブルと、人物の各部から拡大窓へ線を引く注釈線の 2 種。キャラクター紹介のページで、立ち絵の次に置く

2 枚

持ち帰る JSON 何枚あっても 1 回で。順に束ねて写すので、貼った先でも並びが残る。 仕様の無い枠は、題名と JSON の場所だけを書く

読む順

  1. 01 動き ターンテーブル ターンテーブル
  2. 02 動き 注釈線 注釈線

この一式について

持ち帰る

コピーして貼るか、ファイルに保存して渡す。ネットにつながらない環境には「全部入り」を 1 つ渡せば足りる。

全部入り

scroll-motion-model-sheet-everything.md

このパネルの中身を、URL の先にあるファイルの中身まで含めて 1 つにまとめた Markdown

依頼文

2.9 KB
# ターンテーブル
ターンテーブル — Scroll-driven character turnaround

キャラクターの向き別の絵 4 枚(正面・斜め・横・背面)を、スクロールに合わせて 1 枚ずつ回して見せる。区画の高さは 400vh、中の箱は 100vh の sticky にする。
--p を 0.04〜0.96 の範囲で 4 等分し、それぞれの区間で 1 枚を見せる。区間の境目の前後 7%(1 枚分の長さに対して)では、絵の横幅を `scaleX` で 1 → 0 → 1 と縮めて広げ、幅が 0 になった瞬間に次の絵へ差し替える。縮み方は sin のなめらかさにする。
左に大きな番号(01 / 04)と向きの名前、下に 4 枚の小さな絵を並べて今の 1 枚に下線を引く。足元には楕円の上に 36 本の目盛りを置き、--p に合わせて 1 周回し、手前の目盛りだけを濃くする。
CSS と素の JavaScript だけで実装し、ライブラリは使わない。

外すと崩れる点:
- 絵の差し替えは幅が 0 の瞬間だけ。半分の幅で替えると、別人が回り込んだように見える
- 向き別の絵は同じキャンバス・同じ足元の高さで描く。足元が揃わないと回る間に人物が上下する
- 動きを減らす設定では、4 枚を横に並べて止める

動く実物(1 ファイルで完結する HTML): https://design-vault.pages.dev/designs/motion-turntable/demo.html

---

# 注釈線
注釈線 — Model-sheet callout lines

設定画のように、人物の全身を左に置き、右に角丸の横長の窓を 4 つ縦に積む。窓は 1 つおきに 8% 右へずらし、各窓の右に「: 01」のような等幅の番号と部位の名前を添える。区画の高さは 300vh、中の箱は 100vh の sticky にする。
窓の中身は同じ人物の絵の一部分で、SVG の `<use>` を窓ごとの viewBox で切り抜き、`preserveAspectRatio="xMidYMid slice"` で窓いっぱいに広げる。
窓 i は --p = 0.06 + 0.18i から 0.18 の間に `clip-path: inset(0 X% 0 0)` で左から開きつつ 48px 右から寄る。その 0.08 後から、人物の上の点(絵に対する 0〜1 の座標)から窓の左端の中央まで、`pathLength="1"` の線を `stroke-dashoffset` で引く。点には差し色の丸を置く。線の両端は描くたびに要素の位置から測り直す。
CSS と素の JavaScript だけで実装し、ライブラリは使わない。

外すと崩れる点:
- 線の端は要素の位置から毎回測る。固定の座標で引くと、幅が変わった画面で窓から外れる
- 窓の拡大は同じ絵の切り抜きにする。別の絵を入れると、線の指す場所と窓の中身が食い違う
- 動きを減らす設定では、窓と線をすべて出した状態で止める

動く実物(1 ファイルで完結する HTML): https://design-vault.pages.dev/designs/motion-callout-lines/demo.html

仕様

171 B
# ターンテーブル
https://design-vault.pages.dev/ai/assets/motion-turntable.json

---

# 注釈線
https://design-vault.pages.dev/ai/assets/motion-callout-lines.json

ファイル

01 motion-turntable/demo.html

15.5 KB

/designs/motion-turntable/demo.html

中身を見る
<!doctype html>
<html lang="ja">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>61 ターンテーブル — Scroll-driven character turnaround</title>
<style>
/* dv-motion-base:start */
:root {
  --ground: #FFFFFF;
  --surface: #F3F5F8;
  --ink: #14181F;
  --muted: #5A6472;
  --accent: #1F5FA8;
  --rule: #D8DDE4;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, var(--ground));
  --accent-mid: color-mix(in srgb, var(--accent) 45%, var(--ground));
  --shade: color-mix(in srgb, var(--ink) 14%, transparent);

  --font: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --t-label: 13px;
  --t-body: 16px;
  --t-lead: 20px;
  --t-h2: 32px;
  --t-h1: clamp(40px, 7vw, 72px);

  --s1: 4px;
  --s2: 8px;
  --s3: 16px;
  --s4: 24px;
  --s5: 40px;
  --s6: 64px;
  --s7: 104px;

  --radius: 12px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur: .7s;
  --measure: 1080px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.7;
  font-feature-settings: "palt";
  overflow-x: hidden;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
.dv-wrap { width: min(100% - 2 * var(--s4), var(--measure)); margin-inline: auto; }
.dv-label {
  min-height: 72vh;
  display: grid;
  align-content: center;
  gap: var(--s3);
  padding-block: var(--s6);
  border-bottom: 1px solid var(--rule);
}
.dv-num { font-family: var(--mono); font-size: var(--t-lead); font-weight: 700; color: var(--accent); letter-spacing: .04em; }
.dv-name { font-size: var(--t-h1); font-weight: 700; line-height: 1.15; letter-spacing: .01em; }
.dv-ai { font-family: var(--mono); font-size: var(--t-lead); color: var(--muted); }
.dv-desc { font-size: var(--t-lead); color: var(--ink); }
.dv-hint { font-size: var(--t-label); color: var(--muted); letter-spacing: .12em; margin-top: var(--s4); }
.dv-stage { padding-block: var(--s7); }
.dv-h2 { font-size: var(--t-h2); font-weight: 700; line-height: 1.3; }
.dv-lead { font-size: var(--t-lead); color: var(--muted); }
.dv-eyebrow { font-family: var(--mono); font-size: var(--t-label); color: var(--accent); letter-spacing: .12em; text-transform: uppercase; }
.dv-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--s4); }
.dv-ph {
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent-soft), var(--accent-mid) 60%, var(--accent));
  aspect-ratio: 16 / 9;
}
.dv-ph--alt { background: linear-gradient(200deg, var(--surface), var(--accent-soft) 55%, var(--accent-mid)); }
.dv-ph--ink { background: linear-gradient(160deg, var(--ink), color-mix(in srgb, var(--ink) 55%, var(--accent))); }
.dv-end {
  min-height: 60vh;
  display: grid;
  place-items: center;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: .12em;
}
/* dv-motion-base:end */

/* ---- この演出だけの CSS。色は var(--…) か color-mix() のみ ---- */
.f-ink { fill: var(--ink); }
.f-face { fill: var(--surface); }
.f-accent { fill: var(--accent); }
.f-arm { stroke: var(--ink); stroke-width: 30; stroke-linecap: round; fill: none; }
.tt-zone { height: 400vh; }
.tt-box {
  position: sticky; top: 0; height: 100vh; display: grid; align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: var(--s4); overflow: clip;
}
.tt-count { font-family: var(--mono); font-weight: 700; line-height: 1; }
.tt-num { font-size: clamp(72px, 16vw, 200px); color: var(--ink); letter-spacing: -.04em; }
.tt-of { font-size: var(--t-lead); color: var(--muted); margin-top: var(--s2); }
.tt-view { font-size: var(--t-h2); font-weight: 700; margin-top: var(--s4); }
.tt-stand { position: relative; height: 82vh; display: grid; justify-items: center; }
.tt-band { position: absolute; inset: 6% 26% 8%; background: var(--accent-soft); border-radius: var(--radius); }
.tt-fig { position: relative; height: 74vh; width: 29.6vh; transform: scaleX(var(--w, 1)); }
.tt-fig svg { width: 100%; height: 100%; display: block; overflow: visible; }
.tt-floor { position: absolute; left: 50%; bottom: 2vh; width: min(36vh, 90%); transform: translateX(-50%); overflow: visible; }
.tt-floor ellipse { fill: none; stroke: var(--rule); stroke-width: 2; }
.tt-floor line { stroke: var(--ink); stroke-width: 2; }
.tt-strip { grid-column: 1 / -1; display: flex; gap: var(--s3); justify-content: center; align-self: end; padding-bottom: var(--s4); }
.tt-thumb { width: 40px; height: 100px; opacity: .3; border-bottom: 4px solid transparent; padding-bottom: var(--s1); }
.tt-thumb svg { width: 100%; height: 100%; display: block; }
.tt-thumb.is-on { opacity: 1; border-color: var(--accent); }
.tt-box { grid-template-rows: 1fr auto; }
@media (max-width: 600px) {
  .tt-box { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
  .tt-stand { height: 64vh; }
  .tt-fig { height: 58vh; width: 23.2vh; }
}
@media (prefers-reduced-motion: reduce) {
  .tt-zone { height: auto; }
  .tt-box { position: static; height: auto; }
  .tt-stand, .tt-count { display: none; }
  .tt-strip { grid-column: 1 / -1; padding-block: var(--s6); gap: var(--s5); }
  .tt-thumb { width: min(18vw, 120px); height: auto; aspect-ratio: 2 / 5; opacity: 1; border-color: transparent; }
  .tt-thumb.is-on { border-color: transparent; }
}
</style>
</head>
<body data-motion-number="61">
<header class="dv-label">
  <div class="dv-wrap">
    <p class="dv-num">61</p>
    <h1 class="dv-name">ターンテーブル</h1>
    <p class="dv-ai">Scroll-driven character turnaround</p>
    <p class="dv-desc">スクロールで人物が回り、正面・斜め・横・背面が入れ替わる</p>
    <p class="dv-hint">SCROLL ↓</p>
  </div>
</header>

<svg width="0" height="0" style="position: absolute" aria-hidden="true">
  <symbol id="fig-front" viewBox="0 0 400 1000">
    <path class="f-ink" d="M128 120 Q120 40 200 34 Q280 40 272 120 L292 430 L108 430 Z"/>
    <rect class="f-ink" x="182" y="210" width="36" height="50"/>
    <ellipse class="f-face" cx="200" cy="150" rx="60" ry="72"/>
    <path class="f-ink" d="M140 118 Q200 60 262 118 L262 96 Q200 40 138 96 Z"/>
    <ellipse class="f-ink" cx="176" cy="158" rx="7" ry="11"/><ellipse class="f-ink" cx="224" cy="158" rx="7" ry="11"/>
    <path class="f-accent" d="M232 70 l40 -26 l6 36 Z M232 70 l-6 -40 l40 16 Z"/>
    <path class="f-ink" d="M128 252 L272 252 L240 520 L160 520 Z"/>
    <path class="f-accent" d="M160 520 L240 520 L296 712 L104 712 Z"/>
    <rect class="f-ink" x="158" y="712" width="30" height="236"/><rect class="f-ink" x="212" y="712" width="30" height="236"/>
    <ellipse class="f-ink" cx="170" cy="956" rx="30" ry="16"/><ellipse class="f-ink" cx="230" cy="956" rx="30" ry="16"/>
    <path class="f-arm" d="M136 262 L104 516"/><path class="f-arm" d="M264 262 L300 496"/>
    <rect class="f-accent" x="282" y="478" width="42" height="58" rx="6"/>
  </symbol>
  <symbol id="fig-34" viewBox="0 0 400 1000">
    <path class="f-ink" d="M136 120 Q132 40 206 34 Q276 42 268 120 L282 430 L116 430 Z"/>
    <rect class="f-ink" x="186" y="210" width="34" height="50"/>
    <ellipse class="f-face" cx="214" cy="150" rx="52" ry="72"/>
    <path class="f-ink" d="M156 116 Q214 62 268 116 L268 94 Q210 42 152 94 Z"/>
    <ellipse class="f-ink" cx="200" cy="158" rx="6" ry="11"/><ellipse class="f-ink" cx="240" cy="158" rx="6" ry="11"/>
    <path class="f-accent" d="M226 70 l36 -24 l6 34 Z M226 70 l-6 -38 l36 14 Z"/>
    <path class="f-ink" d="M140 252 L264 252 L238 520 L166 520 Z"/>
    <path class="f-accent" d="M166 520 L238 520 L286 712 L118 712 Z"/>
    <rect class="f-ink" x="166" y="712" width="28" height="236"/><rect class="f-ink" x="214" y="712" width="28" height="236"/>
    <ellipse class="f-ink" cx="184" cy="956" rx="28" ry="16"/><ellipse class="f-ink" cx="236" cy="956" rx="30" ry="16"/>
    <path class="f-arm" d="M146 262 L122 512"/><path class="f-arm" d="M256 262 L284 496"/>
    <rect class="f-accent" x="266" y="478" width="38" height="58" rx="6"/>
  </symbol>
  <symbol id="fig-side" viewBox="0 0 400 1000">
    <path class="f-ink" d="M150 120 Q150 40 214 36 Q262 44 258 120 L246 420 L150 420 Z"/>
    <path class="f-face" d="M210 92 Q262 96 266 150 L276 170 L264 176 Q262 214 222 222 L206 222 Z"/>
    <ellipse class="f-ink" cx="244" cy="156" rx="5" ry="10"/>
    <path class="f-accent" d="M196 66 l-34 -30 l-6 34 Z"/>
    <rect class="f-ink" x="194" y="214" width="30" height="46"/>
    <path class="f-ink" d="M168 252 L246 252 L236 520 L172 520 Z"/>
    <path class="f-accent" d="M172 520 L236 520 L266 712 L142 712 Z"/>
    <rect class="f-ink" x="186" y="712" width="32" height="236"/>
    <path class="f-ink" d="M186 948 L248 948 Q252 970 230 970 L186 970 Z"/>
    <path class="f-arm" d="M208 266 L222 500"/>
    <rect class="f-accent" x="204" y="484" width="44" height="56" rx="6"/>
  </symbol>
  <symbol id="fig-back" viewBox="0 0 400 1000">
    <path class="f-ink" d="M128 120 Q120 40 200 34 Q280 40 272 120 L292 430 L108 430 Z"/>
    <rect class="f-ink" x="182" y="210" width="36" height="50"/>
    <path class="f-accent" d="M232 70 l40 -26 l6 36 Z M232 70 l-6 -40 l40 16 Z"/>
    <path class="f-ink" d="M128 252 L272 252 L240 520 L160 520 Z"/>
    <path class="f-accent" d="M160 520 L240 520 L296 712 L104 712 Z"/>
    <rect class="f-ink" x="158" y="712" width="30" height="236"/><rect class="f-ink" x="212" y="712" width="30" height="236"/>
    <ellipse class="f-ink" cx="170" cy="956" rx="30" ry="16"/><ellipse class="f-ink" cx="230" cy="956" rx="30" ry="16"/>
    <path class="f-arm" d="M136 262 L104 516"/><path class="f-arm" d="M264 262 L300 496"/>
  </symbol>
</svg>
<main class="dv-stage">
  <div class="dv-wrap">
    <section class="tt-zone" data-progress="pin">
      <div class="tt-box">
        <div class="tt-count">
          <p class="tt-num"><span class="tt-i">01</span></p>
          <p class="tt-of">/ 04</p>
          <p class="tt-view">正面</p>
        </div>
        <div class="tt-stand">
          <div class="tt-band"></div>
          <div class="tt-fig"><svg viewBox="0 0 400 1000" role="img" aria-label="代役の人物"><use href="#fig-front"/></svg></div>
          <svg class="tt-floor" viewBox="-180 -40 360 80" aria-hidden="true"><ellipse rx="170" ry="28"/><g class="tt-ticks"></g></svg>
        </div>
        <div class="tt-strip">
        <figure class="tt-thumb" aria-label="正面"><svg viewBox="0 0 400 1000"><use href="#fig-front"/></svg></figure>
        <figure class="tt-thumb" aria-label="斜め"><svg viewBox="0 0 400 1000"><use href="#fig-34"/></svg></figure>
        <figure class="tt-thumb" aria-label="横"><svg viewBox="0 0 400 1000"><use href="#fig-side"/></svg></figure>
        <figure class="tt-thumb" aria-label="背面"><svg viewBox="0 0 400 1000"><use href="#fig-back"/></svg></figure>
        </div>
      </div>
    </section>
  </div>
</main>

<footer class="dv-end">END — 61 ターンテーブル</footer>

<script>
/* dv-motion-helpers:start */
const dvReduce = matchMedia('(prefers-reduced-motion: reduce)').matches;
document.documentElement.classList.add('js');

/**
 * 画面に入った要素へ .is-in を付ける。
 * data-reveal="repeat" の要素は画面を出たら外す(何度でも再生)。
 */
function dvReveal(selector = '[data-reveal]', { threshold = 0.2, rootMargin = '0px 0px -8% 0px' } = {}) {
  const els = [...document.querySelectorAll(selector)];
  if (dvReduce || !('IntersectionObserver' in window)) {
    els.forEach((el) => el.classList.add('is-in'));
    return;
  }
  const io = new IntersectionObserver((entries) => {
    for (const e of entries) {
      if (e.isIntersecting) {
        e.target.classList.add('is-in');
        if (e.target.dataset.reveal !== 'repeat') io.unobserve(e.target);
      } else if (e.target.dataset.reveal === 'repeat') {
        e.target.classList.remove('is-in');
      }
    }
  }, { threshold, rootMargin });
  els.forEach((el) => io.observe(el));
}

/**
 * スクロール量を 0〜1 にして、各 [data-progress] 要素の CSS 変数 --p に書く。
 *   data-progress="through" : 要素の上端が画面の下端に来たとき 0、下端が画面の上端を抜けたとき 1
 *   data-progress="pin"     : 要素の上端が画面の上端に来たとき 0、下端が画面の下端に来たとき 1
 *                             (中に position: sticky の箱を持つ、背の高い区画用)
 *   data-progress="page"    : ページ全体のスクロール量
 * onUpdate(el, p) を渡すと、値が変わるたびに呼ばれる。
 */
function dvProgress(onUpdate) {
  const els = [...document.querySelectorAll('[data-progress]')];
  const clamp = (n) => Math.min(1, Math.max(0, n));
  let queued = false;
  const measure = () => {
    queued = false;
    const vh = window.innerHeight;
    for (const el of els) {
      const r = el.getBoundingClientRect();
      let p;
      if (el.dataset.progress === 'pin') p = r.height > vh ? -r.top / (r.height - vh) : 0;
      else if (el.dataset.progress === 'page') {
        const max = document.documentElement.scrollHeight - vh;
        p = max > 0 ? window.scrollY / max : 0;
      } else p = (vh - r.top) / (vh + r.height);
      p = clamp(p);
      el.style.setProperty('--p', p.toFixed(4));
      if (onUpdate) onUpdate(el, p);
    }
  };
  const request = () => {
    if (!queued) { queued = true; requestAnimationFrame(measure); }
  };
  addEventListener('scroll', request, { passive: true });
  addEventListener('resize', request);
  measure();
}
/* dv-motion-helpers:end */

/* ---- この演出だけの JS ---- */
// 向き別の絵を、進み p に合わせて 1 枚ずつ回して見せる。境目では幅を 1 → 0 → 1 にし、幅 0 の瞬間に絵を差し替える。
const VIEWS = [['front', '正面'], ['34', '斜め'], ['side', '横'], ['back', '背面']];
const SPAN = [0.04, 0.96], TURN = 0.14;
function turnAt(p, n) {
  const pos = Math.min(n - 1e-9, Math.max(0, ((p - SPAN[0]) / (SPAN[1] - SPAN[0])) * n));
  const i = Math.floor(pos), f = pos - i, half = TURN / 2;
  let w = 1;
  if (i > 0 && f < half) w = f / half;
  else if (i < n - 1 && f > 1 - half) w = (1 - f) / half;
  return { i, w: Math.sin((w * Math.PI) / 2) };
}
const zone = document.querySelector('.tt-zone');
const fig = zone.querySelector('.tt-fig'), use = fig.querySelector('use');
const ticks = zone.querySelector('.tt-ticks');
const NS = 'http://www.w3.org/2000/svg';
const marks = Array.from({ length: 36 }, (_, k) => {
  const l = document.createElementNS(NS, 'line');
  ticks.appendChild(l);
  return l;
});
let shown = -1;
dvProgress((el, p) => {
  const { i, w } = turnAt(dvReduce ? 1 : p, VIEWS.length);
  fig.style.setProperty('--w', w.toFixed(4));
  if (i !== shown) {
    shown = i;
    use.setAttribute('href', `#fig-${VIEWS[i][0]}`);
    zone.querySelector('.tt-i').textContent = String(i + 1).padStart(2, '0');
    zone.querySelector('.tt-view').textContent = VIEWS[i][1];
    zone.querySelectorAll('.tt-thumb').forEach((t, k) => t.classList.toggle('is-on', k === i));
  }
  // 足元の目盛りは p に合わせて 1 周する。手前の目盛りだけを濃くする。
  marks.forEach((l, k) => {
    const a = ((k * 10 + p * 360) * Math.PI) / 180, x = Math.cos(a) * 170, y = Math.sin(a) * 28;
    l.setAttribute('x1', x.toFixed(1)); l.setAttribute('x2', x.toFixed(1));
    l.setAttribute('y1', y.toFixed(1)); l.setAttribute('y2', (y + (k % 3 ? 7 : 13)).toFixed(1));
    l.style.opacity = Math.sin(a) > 0 ? 0.85 : 0.2;
  });
});
</script>
</body>
</html>

02 motion-callout-lines/demo.html

13.5 KB

/designs/motion-callout-lines/demo.html

中身を見る
<!doctype html>
<html lang="ja">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>62 注釈線 — Model-sheet callout lines</title>
<style>
/* dv-motion-base:start */
:root {
  --ground: #FFFFFF;
  --surface: #F3F5F8;
  --ink: #14181F;
  --muted: #5A6472;
  --accent: #1F5FA8;
  --rule: #D8DDE4;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, var(--ground));
  --accent-mid: color-mix(in srgb, var(--accent) 45%, var(--ground));
  --shade: color-mix(in srgb, var(--ink) 14%, transparent);

  --font: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --t-label: 13px;
  --t-body: 16px;
  --t-lead: 20px;
  --t-h2: 32px;
  --t-h1: clamp(40px, 7vw, 72px);

  --s1: 4px;
  --s2: 8px;
  --s3: 16px;
  --s4: 24px;
  --s5: 40px;
  --s6: 64px;
  --s7: 104px;

  --radius: 12px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur: .7s;
  --measure: 1080px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.7;
  font-feature-settings: "palt";
  overflow-x: hidden;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
.dv-wrap { width: min(100% - 2 * var(--s4), var(--measure)); margin-inline: auto; }
.dv-label {
  min-height: 72vh;
  display: grid;
  align-content: center;
  gap: var(--s3);
  padding-block: var(--s6);
  border-bottom: 1px solid var(--rule);
}
.dv-num { font-family: var(--mono); font-size: var(--t-lead); font-weight: 700; color: var(--accent); letter-spacing: .04em; }
.dv-name { font-size: var(--t-h1); font-weight: 700; line-height: 1.15; letter-spacing: .01em; }
.dv-ai { font-family: var(--mono); font-size: var(--t-lead); color: var(--muted); }
.dv-desc { font-size: var(--t-lead); color: var(--ink); }
.dv-hint { font-size: var(--t-label); color: var(--muted); letter-spacing: .12em; margin-top: var(--s4); }
.dv-stage { padding-block: var(--s7); }
.dv-h2 { font-size: var(--t-h2); font-weight: 700; line-height: 1.3; }
.dv-lead { font-size: var(--t-lead); color: var(--muted); }
.dv-eyebrow { font-family: var(--mono); font-size: var(--t-label); color: var(--accent); letter-spacing: .12em; text-transform: uppercase; }
.dv-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--s4); }
.dv-ph {
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent-soft), var(--accent-mid) 60%, var(--accent));
  aspect-ratio: 16 / 9;
}
.dv-ph--alt { background: linear-gradient(200deg, var(--surface), var(--accent-soft) 55%, var(--accent-mid)); }
.dv-ph--ink { background: linear-gradient(160deg, var(--ink), color-mix(in srgb, var(--ink) 55%, var(--accent))); }
.dv-end {
  min-height: 60vh;
  display: grid;
  place-items: center;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: .12em;
}
/* dv-motion-base:end */

/* ---- この演出だけの CSS。色は var(--…) か color-mix() のみ ---- */
.f-ink { fill: var(--ink); }
.f-face { fill: var(--surface); }
.f-accent { fill: var(--accent); }
.f-arm { stroke: var(--ink); stroke-width: 30; stroke-linecap: round; fill: none; }
.cl-zone { height: 300vh; }
.cl-box {
  position: sticky; top: 0; height: 100vh; display: grid; align-items: center;
  grid-template-columns: minmax(0, .7fr) minmax(0, 1.6fr); gap: var(--s5); overflow: clip;
}
.cl-fig { height: 86vh; width: 34.4vh; max-width: 100%; justify-self: center; }
.cl-fig svg { width: 100%; height: 100%; display: block; }
.cl-list { display: grid; gap: var(--s4); }
.cl-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s4); }
.cl-item:nth-child(even) { margin-left: 8%; }
.cl-win {
  height: clamp(64px, 15vh, 150px); border-radius: var(--radius); overflow: hidden;
  background: var(--surface); box-shadow: inset 0 0 0 2px var(--ink);
}
.cl-win svg { width: 100%; height: 100%; display: block; }
.cl-tag { font-family: var(--mono); line-height: 1.1; }
.cl-no { font-size: var(--t-h2); font-weight: 700; color: var(--accent); }
.cl-name { font-family: var(--font); font-size: var(--t-lead); font-weight: 700; }
.cl-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.cl-lines path { fill: none; stroke: var(--ink); stroke-width: 2; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--t, 0)); }
.cl-lines circle { fill: var(--accent); stroke: var(--ink); stroke-width: 2; opacity: var(--t, 0); }
.js .cl-item { opacity: var(--o, 0); }
.js .cl-win { clip-path: inset(0 calc((1 - var(--s, 0)) * 100%) 0 0 round var(--radius)); transform: translateX(calc((1 - var(--s, 0)) * 48px)); }
.cl-box { position: sticky; }
@media (max-width: 600px) {
  .cl-box { grid-template-columns: minmax(0, .55fr) minmax(0, 1.45fr); gap: var(--s3); }
  .cl-item { grid-template-columns: minmax(0, 1fr); gap: var(--s1); }
  .cl-item:nth-child(even) { margin-left: 0; }
  .cl-list { gap: var(--s3); }
  .cl-win { height: 10vh; }
  .cl-no { font-size: var(--t-lead); }
  .cl-name { font-size: var(--t-body); }
  .cl-fig { height: 70vh; width: 28vh; }
}
@media (prefers-reduced-motion: reduce) {
  .js .cl-item { opacity: 1; }
  .js .cl-win { clip-path: none; transform: none; }
}
</style>
</head>
<body data-motion-number="62">
<header class="dv-label">
  <div class="dv-wrap">
    <p class="dv-num">62</p>
    <h1 class="dv-name">注釈線</h1>
    <p class="dv-ai">Model-sheet callout lines</p>
    <p class="dv-desc">人物の各部から線が伸び、番号つきの拡大窓につながる</p>
    <p class="dv-hint">SCROLL ↓</p>
  </div>
</header>

<svg width="0" height="0" style="position: absolute" aria-hidden="true">
  <symbol id="fig-front" viewBox="0 0 400 1000">
    <path class="f-ink" d="M128 120 Q120 40 200 34 Q280 40 272 120 L292 430 L108 430 Z"/>
    <rect class="f-ink" x="182" y="210" width="36" height="50"/>
    <ellipse class="f-face" cx="200" cy="150" rx="60" ry="72"/>
    <path class="f-ink" d="M140 118 Q200 60 262 118 L262 96 Q200 40 138 96 Z"/>
    <ellipse class="f-ink" cx="176" cy="158" rx="7" ry="11"/><ellipse class="f-ink" cx="224" cy="158" rx="7" ry="11"/>
    <path class="f-accent" d="M232 70 l40 -26 l6 36 Z M232 70 l-6 -40 l40 16 Z"/>
    <path class="f-ink" d="M128 252 L272 252 L240 520 L160 520 Z"/>
    <path class="f-accent" d="M160 520 L240 520 L296 712 L104 712 Z"/>
    <rect class="f-ink" x="158" y="712" width="30" height="236"/><rect class="f-ink" x="212" y="712" width="30" height="236"/>
    <ellipse class="f-ink" cx="170" cy="956" rx="30" ry="16"/><ellipse class="f-ink" cx="230" cy="956" rx="30" ry="16"/>
    <path class="f-arm" d="M136 262 L104 516"/><path class="f-arm" d="M264 262 L300 496"/>
    <rect class="f-accent" x="282" y="478" width="42" height="58" rx="6"/>
  </symbol>
</svg>
<main class="dv-stage">
  <div class="dv-wrap">
    <section class="cl-zone" data-progress="pin">
      <div class="cl-box">
        <div class="cl-fig"><svg viewBox="0 0 400 1000" role="img" aria-label="代役の人物"><use href="#fig-front"/></svg></div>
        <ol class="cl-list">
          <li class="cl-item">
            <div class="cl-win"><svg viewBox="216 26 72 64" preserveAspectRatio="xMidYMid slice" aria-hidden="true"><use href="#fig-front" width="400" height="1000"/></svg></div>
            <p class="cl-tag"><span class="cl-no">: 01</span><br><span class="cl-name">髪飾り</span></p>
          </li>
          <li class="cl-item">
            <div class="cl-win"><svg viewBox="150 128 100 60" preserveAspectRatio="xMidYMid slice" aria-hidden="true"><use href="#fig-front" width="400" height="1000"/></svg></div>
            <p class="cl-tag"><span class="cl-no">: 02</span><br><span class="cl-name">目元</span></p>
          </li>
          <li class="cl-item">
            <div class="cl-win"><svg viewBox="270 470 66 74" preserveAspectRatio="xMidYMid slice" aria-hidden="true"><use href="#fig-front" width="400" height="1000"/></svg></div>
            <p class="cl-tag"><span class="cl-no">: 03</span><br><span class="cl-name">持ち物</span></p>
          </li>
          <li class="cl-item">
            <div class="cl-win"><svg viewBox="128 930 144 46" preserveAspectRatio="xMidYMid slice" aria-hidden="true"><use href="#fig-front" width="400" height="1000"/></svg></div>
            <p class="cl-tag"><span class="cl-no">: 04</span><br><span class="cl-name">靴</span></p>
          </li>
        </ol>
        <svg class="cl-lines" aria-hidden="true"></svg>
      </div>
    </section>
  </div>
</main>

<footer class="dv-end">END — 62 注釈線</footer>

<script>
/* dv-motion-helpers:start */
const dvReduce = matchMedia('(prefers-reduced-motion: reduce)').matches;
document.documentElement.classList.add('js');

/**
 * 画面に入った要素へ .is-in を付ける。
 * data-reveal="repeat" の要素は画面を出たら外す(何度でも再生)。
 */
function dvReveal(selector = '[data-reveal]', { threshold = 0.2, rootMargin = '0px 0px -8% 0px' } = {}) {
  const els = [...document.querySelectorAll(selector)];
  if (dvReduce || !('IntersectionObserver' in window)) {
    els.forEach((el) => el.classList.add('is-in'));
    return;
  }
  const io = new IntersectionObserver((entries) => {
    for (const e of entries) {
      if (e.isIntersecting) {
        e.target.classList.add('is-in');
        if (e.target.dataset.reveal !== 'repeat') io.unobserve(e.target);
      } else if (e.target.dataset.reveal === 'repeat') {
        e.target.classList.remove('is-in');
      }
    }
  }, { threshold, rootMargin });
  els.forEach((el) => io.observe(el));
}

/**
 * スクロール量を 0〜1 にして、各 [data-progress] 要素の CSS 変数 --p に書く。
 *   data-progress="through" : 要素の上端が画面の下端に来たとき 0、下端が画面の上端を抜けたとき 1
 *   data-progress="pin"     : 要素の上端が画面の上端に来たとき 0、下端が画面の下端に来たとき 1
 *                             (中に position: sticky の箱を持つ、背の高い区画用)
 *   data-progress="page"    : ページ全体のスクロール量
 * onUpdate(el, p) を渡すと、値が変わるたびに呼ばれる。
 */
function dvProgress(onUpdate) {
  const els = [...document.querySelectorAll('[data-progress]')];
  const clamp = (n) => Math.min(1, Math.max(0, n));
  let queued = false;
  const measure = () => {
    queued = false;
    const vh = window.innerHeight;
    for (const el of els) {
      const r = el.getBoundingClientRect();
      let p;
      if (el.dataset.progress === 'pin') p = r.height > vh ? -r.top / (r.height - vh) : 0;
      else if (el.dataset.progress === 'page') {
        const max = document.documentElement.scrollHeight - vh;
        p = max > 0 ? window.scrollY / max : 0;
      } else p = (vh - r.top) / (vh + r.height);
      p = clamp(p);
      el.style.setProperty('--p', p.toFixed(4));
      if (onUpdate) onUpdate(el, p);
    }
  };
  const request = () => {
    if (!queued) { queued = true; requestAnimationFrame(measure); }
  };
  addEventListener('scroll', request, { passive: true });
  addEventListener('resize', request);
  measure();
}
/* dv-motion-helpers:end */

/* ---- この演出だけの JS ---- */
// 設定画の注釈。窓が 1 つずつ入り、人物の上の点から窓へ線が引かれる。線の両端は描くたびに測り直す。
const POINTS = [[0.63, 0.06], [0.5, 0.158], [0.76, 0.507], [0.43, 0.956]]; // 人物の絵の上の点(0〜1)
const box = document.querySelector('.cl-box'), figEl = box.querySelector('.cl-fig svg');
const items = [...box.querySelectorAll('.cl-item')], lines = box.querySelector('.cl-lines');
const NS = 'http://www.w3.org/2000/svg';
const parts = items.map(() => {
  const g = document.createElementNS(NS, 'g'), path = document.createElementNS(NS, 'path'), dot = document.createElementNS(NS, 'circle');
  path.setAttribute('pathLength', '1'); dot.setAttribute('r', '6');
  g.append(path, dot); lines.appendChild(g);
  return g;
});
const clamp = (n) => Math.min(1, Math.max(0, n));
const ease = (t) => 1 - Math.pow(1 - t, 3);
dvProgress((el, p) => {
  const b = box.getBoundingClientRect(), f = figEl.getBoundingClientRect();
  lines.setAttribute('viewBox', `0 0 ${b.width} ${b.height}`);
  items.forEach((item, i) => {
    // 窓 i は p = 0.06 + 0.18i から入り、線はその少し後から引かれる。最後の窓も p = 0.9 までに揃う。
    const a = 0.06 + i * 0.18;
    const s = dvReduce ? 1 : ease(clamp((p - a) / 0.18));
    const t = dvReduce ? 1 : clamp((p - a - 0.08) / 0.18);
    item.style.setProperty('--o', s > 0 ? 1 : 0);
    item.style.setProperty('--s', s.toFixed(4));
    const w = item.querySelector('.cl-win').getBoundingClientRect();
    // 人物の絵は箱の中に縦横比を保って収まる(meet)ので、描かれた範囲を出してから点を置く。
    const k = Math.min(f.width / 400, f.height / 1000), dx = (f.width - 400 * k) / 2, dy = (f.height - 1000 * k) / 2;
    const x1 = f.left - b.left + dx + POINTS[i][0] * 400 * k, y1 = f.top - b.top + dy + POINTS[i][1] * 1000 * k;
    const x2 = w.left - b.left, y2 = w.top - b.top + w.height / 2;
    const [path, dot] = parts[i].children;
    path.setAttribute('d', `M${x1.toFixed(1)} ${y1.toFixed(1)} L${x2.toFixed(1)} ${y2.toFixed(1)}`);
    dot.setAttribute('cx', x1.toFixed(1)); dot.setAttribute('cy', y1.toFixed(1));
    parts[i].style.setProperty('--t', t.toFixed(4));
  });
});
</script>
</body>
</html>