Skip to content

andyhuo520/vibe-knowledge / skills/ai-teardown

ai-teardown

Unverified

「AI 拆机课」系列课工作室:输入一个主题(AI 产品、开源项目/书、人物历史、软件教程),产出由浅入深、每句话有出处的中文讲解视频系列 + 每节互动版 + 课程总页。流水线:收集资料 → 确认对象与课时 → 大纲 → 逐节旁白(MiMo 克隆音色 + 逐字对齐)→ scenes.json 画面编排(Notion 极简手绘引擎 / 马卡龙模板引擎,IconPark 图标与插画、Noto 动态 emoji、AntV X6 流程图、像素讲解小人、截图圈注、终端录屏)或 film.js 代码成片(cine 引擎:Three.js、粒子、着色器、真片段叠加、曲库配乐)→ Hyperframes / 无头 GPU 逐帧 1080p 渲染 → Artifact 发布 → 课程总页 + 导学视频。触发:做系列课 / 做课程视频 / 把某本书或某个开源项目做成课 / 科普讲解视频 / 教学视频 / 课程地图 / 导学视频 / 互动课件 / 「拆机课」「上手课」「实战课」「编排课」/ 王炸讲解片 / 用真实会话和成片教人做视频。不用于:单支宣传片(用 promo-video)、单张信息图、纯文章写作。

FileKindSize
SKILL.mdskill md8.9 KB
engine/assets/fonts/Geist-VF.ttfbinary165.1 KB
engine/assets/fonts/GeistMono-VF.ttfbinary167.9 KB
engine/assets/fonts/LXGWWenKai-Medium.ttfbinary24.2 MB
engine/assets/fonts/LXGWWenKai-Regular.ttfbinary24.4 MB
engine/assets/fonts/NotoSansSC-VF.ttfbinary16.9 MB
engine/assets/iconsets/README.mdmarkdown834 B
engine/assets/iconsets/icon-park-outline.jsonconfig984.1 KB
engine/assets/iconsets/icon-park-solid.jsonconfig946.0 KB
engine/assets/iconsets/icon-park-twotone.jsonconfig991.3 KB
engine/assets/iconsets/icon-park.jsonconfig1.5 MB
engine/assets/iconsets/iconoir.jsonconfig648.2 KB
engine/assets/iconsets/lucide.jsonconfig563.5 KB
engine/assets/iconsets/tabler.jsonconfig2.0 MB
engine/assets/illustrations/iconpark/_sheet.htmlother9.8 KB
engine/assets/illustrations/iconpark/a1-1.svgother7.7 KB
engine/assets/illustrations/iconpark/a1-2.svgother5.7 KB
engine/assets/illustrations/iconpark/a1-3.svgother12.8 KB
engine/assets/illustrations/iconpark/a1-4.svgother7.8 KB
engine/assets/illustrations/iconpark/a10-120.svgother18.7 KB
engine/assets/illustrations/iconpark/a10-121.svgother19.6 KB
engine/assets/illustrations/iconpark/a10-122.svgother28.3 KB
engine/assets/illustrations/iconpark/a10-123.svgother33.1 KB
engine/assets/illustrations/iconpark/a11-136.svgother7.9 KB
engine/assets/illustrations/iconpark/a11-137.svgother5.2 KB
engine/assets/illustrations/iconpark/a11-138.svgother6.5 KB
engine/assets/illustrations/iconpark/a11-139.svgother7.8 KB
engine/assets/illustrations/iconpark/a12-152.svgother12.7 KB
engine/assets/illustrations/iconpark/a12-153.svgother13.7 KB
engine/assets/illustrations/iconpark/a12-154.svgother21.2 KB
engine/assets/illustrations/iconpark/a12-155.svgother9.3 KB
engine/assets/illustrations/iconpark/a13-167.svgother5.0 KB
engine/assets/illustrations/iconpark/a13-168.svgother5.0 KB
engine/assets/illustrations/iconpark/a13-169.svgother3.5 KB
engine/assets/illustrations/iconpark/a13-170.svgother4.6 KB
engine/assets/illustrations/iconpark/a14-184.svgother17.4 KB
engine/assets/illustrations/iconpark/a14-185.svgother27.5 KB
engine/assets/illustrations/iconpark/a14-186.svgother35.2 KB
engine/assets/illustrations/iconpark/a14-187.svgother34.1 KB
engine/assets/illustrations/iconpark/a15-200.svgother19.8 KB
engine/assets/illustrations/iconpark/a15-201.svgother20.3 KB
engine/assets/illustrations/iconpark/a15-202.svgother19.2 KB
engine/assets/illustrations/iconpark/a15-203.svgother24.3 KB
engine/assets/illustrations/iconpark/a16-215.svgother10.1 KB
engine/assets/illustrations/iconpark/a16-216.svgother16.5 KB
engine/assets/illustrations/iconpark/a16-217.svgother10.2 KB
engine/assets/illustrations/iconpark/a16-218.svgother15.2 KB
engine/assets/illustrations/iconpark/a17-230.svgother7.0 KB
engine/assets/illustrations/iconpark/a17-231.svgother6.8 KB
engine/assets/illustrations/iconpark/a17-232.svgother8.6 KB
engine/assets/illustrations/iconpark/a17-233.svgother5.5 KB
engine/assets/illustrations/iconpark/a18-245.svgother15.2 KB
engine/assets/illustrations/iconpark/a18-246.svgother14.1 KB
engine/assets/illustrations/iconpark/a18-247.svgother8.9 KB
engine/assets/illustrations/iconpark/a18-248.svgother8.7 KB
engine/assets/illustrations/iconpark/a19-265.svgother9.4 KB
engine/assets/illustrations/iconpark/a19-266.svgother11.5 KB
engine/assets/illustrations/iconpark/a19-267.svgother6.6 KB
engine/assets/illustrations/iconpark/a19-268.svgother5.5 KB
engine/assets/illustrations/iconpark/a2-11.svgother8.8 KB
engine/assets/illustrations/iconpark/a2-12.svgother10.7 KB
engine/assets/illustrations/iconpark/a2-13.svgother116.5 KB
engine/assets/illustrations/iconpark/a2-14.svgother35.3 KB
engine/assets/illustrations/iconpark/a20-280.svgother10.4 KB
engine/assets/illustrations/iconpark/a20-281.svgother17.7 KB
engine/assets/illustrations/iconpark/a20-282.svgother12.5 KB
engine/assets/illustrations/iconpark/a20-283.svgother13.1 KB
engine/assets/illustrations/iconpark/a21-295.svgother10.4 KB
engine/assets/illustrations/iconpark/a21-296.svgother21.2 KB
engine/assets/illustrations/iconpark/a21-297.svgother8.3 KB
engine/assets/illustrations/iconpark/a21-298.svgother17.5 KB
engine/assets/illustrations/iconpark/a22-327.svgother10.6 KB
engine/assets/illustrations/iconpark/a22-328.svgother12.4 KB
engine/assets/illustrations/iconpark/a22-329.svgother5.4 KB
engine/assets/illustrations/iconpark/a22-330.svgother10.5 KB
engine/assets/illustrations/iconpark/a3-19.svgother8.0 KB
engine/assets/illustrations/iconpark/a3-20.svgother8.4 KB
engine/assets/illustrations/iconpark/a3-21.svgother10.1 KB
engine/assets/illustrations/iconpark/a3-22.svgother10.4 KB
engine/assets/illustrations/iconpark/a4-31.svgother2.7 KB
engine/assets/illustrations/iconpark/a4-32.svgother1.7 KB
engine/assets/illustrations/iconpark/a4-33.svgother1.7 KB
engine/assets/illustrations/iconpark/a4-34.svgother1.5 KB
engine/assets/illustrations/iconpark/a5-46.svgother21.5 KB
engine/assets/illustrations/iconpark/a5-47.svgother15.0 KB
engine/assets/illustrations/iconpark/a5-48.svgother11.8 KB
engine/assets/illustrations/iconpark/a5-49.svgother19.8 KB
engine/assets/illustrations/iconpark/a6-52.svgother15.5 KB
engine/assets/illustrations/iconpark/a6-53.svgother2.9 KB
engine/assets/illustrations/iconpark/a6-54.svgother3.6 KB
engine/assets/illustrations/iconpark/a6-55.svgother4.1 KB
engine/assets/illustrations/iconpark/a7-67.svgother6.0 KB
engine/assets/illustrations/iconpark/a7-68.svgother14.1 KB
engine/assets/illustrations/iconpark/a7-71.svgother10.8 KB
engine/assets/illustrations/iconpark/a7-72.svgother21.6 KB
engine/assets/illustrations/iconpark/a8-87.svgother3.3 KB
engine/assets/illustrations/iconpark/a8-88.svgother2.6 KB
engine/assets/illustrations/iconpark/a8-89.svgother2.6 KB
engine/assets/illustrations/iconpark/a8-90.svgother2.5 KB
engine/assets/illustrations/iconpark/a9-101.svgother4.7 KB
engine/assets/illustrations/iconpark/a9-102.svgother5.3 KB
engine/assets/illustrations/iconpark/a9-103.svgother5.2 KB
engine/assets/illustrations/iconpark/a9-104.svgother8.9 KB
engine/assets/illustrations/iconpark/catalog.jsonconfig19.7 KB
engine/cine/audio/sfx/README.mdmarkdown404 B
engine/cine/audio/sfx/key-1.wavbinary14.7 KB
engine/cine/audio/sfx/key-2.wavbinary14.7 KB
engine/cine/audio/sfx/key-3.wavbinary14.7 KB
engine/cine/audio/sfx/key-4.wavbinary14.7 KB
engine/cine/audio/sfx/key-5.wavbinary14.7 KB
engine/cine/audio/sfx/key-6.wavbinary14.7 KB
engine/cine/audio/sfx/key-7.wavbinary14.7 KB
engine/cine/audio/sfx/key-8.wavbinary14.7 KB
engine/cine/audio/sfx/key-space.wavbinary14.7 KB
engine/cine/audio/timeline.jsonconfig38.4 KB
engine/cine/audio/tools/bed.pyscript37.0 KB
engine/cine/audio/tools/score.pyscript93.0 KB
engine/cine/engine/core.jsscript4.4 KB
engine/cine/engine/glsl.jsscript2.6 KB
engine/cine/engine/narr.jsscript2.7 KB
engine/cine/engine/post.jsscript7.4 KB
engine/cine/engine/scenes/bars.jsscript4.8 KB
engine/cine/engine/scenes/clock.jsscript8.2 KB
engine/cine/engine/scenes/liquid.jsscript4.1 KB
engine/cine/engine/scenes/particles.jsscript9.5 KB
engine/cine/engine/scenes/showroom.jsscript5.0 KB
engine/cine/engine/scenes/tunnel.jsscript4.3 KB
engine/cine/engine/ui.jsscript9.2 KB
engine/cine/engine/util.jsscript2.8 KB
engine/cine/index.htmlother1.4 KB
engine/cine/tools/browser.pyscript802 B
engine/cine/tools/clips.pyscript3.1 KB
engine/cine/tools/deliver.shexecutablescript1.3 KB
engine/cine/tools/finish.pyscript9.3 KB
engine/cine/tools/loopbed.pyscript2.3 KB
engine/cine/tools/queue.shexecutablescript1.7 KB
engine/cine/tools/record.pyscript2.8 KB
engine/cine/tools/retail.pyscript1.8 KB
engine/cine/tools/stills.pyscript2.4 KB
engine/primitives/cards.jsscript13.5 KB
engine/primitives/floaties.jsscript2.5 KB
engine/primitives/loop.jsscript8.2 KB
engine/primitives/mascot.jsscript6.8 KB
engine/primitives/mindmap.jsscript6.7 KB
engine/primitives/morph.jsscript9.2 KB
engine/primitives/motion.jsscript22.5 KB
engine/primitives/portrait.jsscript4.9 KB
engine/primitives/practice.jsscript8.6 KB
engine/primitives/sandbox.jsscript7.4 KB
engine/primitives/scribble.jsscript6.7 KB
engine/primitives/sketch.jsscript23.1 KB
engine/primitives/story.jsscript21.9 KB
engine/primitives/systemmap.jsscript11.4 KB
engine/primitives/terminal.jsscript8.5 KB
engine/primitives/timeline.jsscript7.1 KB
engine/primitives/typer.jsscript9.9 KB
engine/runtime/dom.jsscript4.1 KB
engine/runtime/ease.jsscript2.1 KB
engine/runtime/hosts/player.jsscript11.4 KB
engine/runtime/iconify.jsscript3.1 KB
engine/runtime/lesson.jsscript25.6 KB
engine/runtime/overlays.jsscript13.6 KB
engine/runtime/sketch.jsscript60.8 KB
engine/runtime/spring.jsscript2.8 KB
engine/runtime/stage.jsscript6.6 KB
engine/runtime/theme.jsscript6.5 KB
engine/runtime/typing.jsscript4.4 KB
engine/schemas/brief.schema.jsonconfig2.8 KB
engine/schemas/concepts.schema.jsonconfig3.8 KB
engine/schemas/facts.schema.jsonconfig2.4 KB
engine/schemas/lesson.schema.jsonconfig7.0 KB
engine/schemas/sources.schema.jsonconfig1.8 KB
engine/scripts/check.pyscript13.7 KB
engine/scripts/check_scenes.pyscript3.7 KB
engine/scripts/course_page.pyscript24.5 KB
engine/scripts/emoji.pyscript2.5 KB
engine/scripts/export_cues.pyscript975 B
engine/scripts/facts_js.pyscript1.6 KB
engine/scripts/fetch_images.pyscript4.6 KB
engine/scripts/fx_render.pyscript7.8 KB
engine/scripts/hf_host.pyscript4.8 KB
engine/scripts/icons.pyscript1.7 KB
engine/scripts/illus.pyscript852 B
engine/scripts/ledger.pyscript1.1 KB
engine/scripts/make_lesson.pyscript11.5 KB
engine/scripts/mark_live.pyscript1.0 KB
engine/scripts/mix.pyscript4.4 KB
engine/scripts/new_series.pyscript5.1 KB
engine/scripts/noto_emoji.pyscript3.2 KB
engine/scripts/outline.pyscript4.4 KB
engine/scripts/publish_lesson.pyscript6.3 KB
engine/scripts/rec_scan.pyscript1.2 KB
engine/scripts/render_queue.shexecutablescript770 B
engine/scripts/review_page.pyscript6.9 KB
engine/scripts/serve_range.pyscript1.4 KB
engine/scripts/sketch_publish_files.pyscript2.1 KB
engine/scripts/speed.pyscript1.8 KB
engine/scripts/stills.pyscript2.2 KB
engine/scripts/term_cut.pyscript1.1 KB
engine/scripts/term_frames.pyscript7.8 KB

engine/runtime/hosts/player.js

View on GitHub
/**
 * 互动课件宿主(V1 同步课件):页面里实时渲染同一个舞台,<audio> 是主时钟。
 * 功能:播放 / 暂停、进度条(带章节刻度)、逐步前后(原语的 beats)、章节、字幕稿点击跳转、
 * 暂停时「点图看出处」(原语的 hotspots → 事实账本)。
 * 这里可以用 requestAnimationFrame——它只驱动交互播放,不参与出片。
 */
const CSS = `
.pl{--pl-bg:#0B1122;--pl-panel:#111A31;--pl-line:#24324F;--pl-ink:#EAF0FF;--pl-ink2:#A9B5D6;--pl-ink3:#6F7CA3;--pl-acc:#5B8CFF;--pl-hl:#FFD84D;
  --pl-hover:rgba(255,255,255,.04);--pl-cur:rgba(91,140,255,.14);
  display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:18px;color:var(--pl-ink);font:15px/1.6 "Geist","Noto Sans SC","PingFang SC",sans-serif}
/* 浅色(马卡龙系列课):mountPlayer(..., {light: true}) */
.pl.light{--pl-bg:#FFF8F2;--pl-panel:#FFFFFF;--pl-line:#EEDFD5;--pl-ink:#2F2A45;--pl-ink2:#5B5573;--pl-ink3:#7A7390;--pl-acc:#6548CC;--pl-hl:#C98A00;
  --pl-hover:rgba(101,72,204,.06);--pl-cur:rgba(101,72,204,.12)}
.pl.light .pl-screen{background:#FFF8F2;box-shadow:0 14px 36px rgba(94,72,130,.12)}
@media (max-width:980px){.pl{grid-template-columns:minmax(0,1fr)}}
.pl-main{min-width:0}
.pl-screen{position:relative;width:100%;aspect-ratio:16/9;background:#000;border-radius:14px;overflow:hidden}
.pl-fit{position:absolute;left:0;top:0;transform-origin:0 0}
.pl-hot{position:absolute;inset:0;pointer-events:none}
.pl-hot button{position:absolute;pointer-events:auto;border:2px dashed var(--pl-hl);background:rgba(255,216,77,.08);border-radius:10px;cursor:pointer;padding:0}
.pl-hot button:focus-visible{outline:3px solid var(--pl-hl);outline-offset:2px}
.pl-bar{display:flex;align-items:center;gap:10px;margin-top:10px;flex-wrap:wrap}
.pl-btn{appearance:none;border:1px solid var(--pl-line);background:var(--pl-panel);color:var(--pl-ink);border-radius:10px;height:38px;min-width:38px;padding:0 12px;
  font:inherit;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:6px}
.pl-btn:hover{border-color:var(--pl-ink3)} .pl-btn:focus-visible{outline:2px solid var(--pl-acc);outline-offset:2px}
.pl-time{font-variant-numeric:tabular-nums;color:var(--pl-ink2);min-width:96px;text-align:center}
.pl-track{position:relative;flex:1;min-width:180px;height:38px;display:flex;align-items:center}
.pl-track input{width:100%;accent-color:var(--pl-acc)}
.pl-tick{position:absolute;top:4px;width:2px;height:8px;background:var(--pl-ink3);pointer-events:none}
.pl-side{background:var(--pl-panel);border:1px solid var(--pl-line);border-radius:14px;padding:14px;display:flex;flex-direction:column;gap:14px;min-height:0;max-height:640px}
.pl-side h3{margin:0;font-size:12px;letter-spacing:.14em;color:var(--pl-ink3);font-weight:500}
.pl-chap,.pl-lines{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}
.pl-lines{overflow:auto;min-height:0}
.pl-chap button,.pl-lines button{all:unset;display:block;width:100%;box-sizing:border-box;padding:6px 10px;border-radius:8px;cursor:pointer;color:var(--pl-ink2)}
.pl-chap button:hover,.pl-lines button:hover{background:var(--pl-hover)}
.pl-chap button[aria-current=true],.pl-lines button[aria-current=true]{color:var(--pl-ink);background:var(--pl-cur)}
.pl-chap small{color:var(--pl-ink3);font-variant-numeric:tabular-nums;margin-right:8px}
.pl-pop{position:absolute;max-width:360px;background:var(--pl-panel);border:1px solid var(--pl-line);border-radius:12px;padding:12px 14px;
  box-shadow:0 18px 50px rgba(0,0,0,.45);font-size:14px;z-index:5}
.pl-pop h4{margin:0 0 6px;font-size:14px}
.pl-pop p{margin:0 0 8px;color:var(--pl-ink2)}
.pl-pop .src{font-size:12px;color:var(--pl-ink3)}
.pl-hint{font-size:12.5px;color:var(--pl-ink3)}
`;

const fmt = (t) => `${Math.floor(t / 60)}:${String(Math.floor(t % 60)).padStart(2, "0")}`;
const el = (tag, attrs = {}, ...kids) => {
  const e = document.createElement(tag);
  for (const [k, v] of Object.entries(attrs)) {
    if (k === "text") e.textContent = v;
    else if (k.startsWith("on")) e.addEventListener(k.slice(2), v);
    else e.setAttribute(k, v);
  }
  e.append(...kids);
  return e;
};

export function mountPlayer(host, { stage, audio, chapters = [], captions = [], facts = {}, sources = {}, light = false }) {
  if (!document.getElementById("pl-css")) document.head.append(el("style", { id: "pl-css", text: CSS }));
  const root = el("div", { class: light ? "pl light" : "pl" });
  const screen = el("div", { class: "pl-screen" });
  const fit = el("div", { class: "pl-fit" });
  const hot = el("div", { class: "pl-hot" });
  stage.el.parentElement?.removeChild(stage.el);
  fit.append(stage.el);
  screen.append(fit, hot);

  const dur = stage.duration;
  const play = el("button", { class: "pl-btn", "aria-label": "播放", text: "▶" });
  const prev = el("button", { class: "pl-btn", "aria-label": "上一步", text: "‹ 上一步" });
  const next = el("button", { class: "pl-btn", "aria-label": "下一步", text: "下一步 ›" });
  const time = el("span", { class: "pl-time", text: `0:00 / ${fmt(dur)}` });
  const range = el("input", { type: "range", min: "0", max: String(dur), step: "0.01", value: "0", "aria-label": "进度" });
  const track = el("div", { class: "pl-track" }, range);
  for (const c of chapters) track.append(el("span", { class: "pl-tick", style: `left:calc(${(c.t / dur) * 100}% - 1px)` }));
  const speed = el("button", { class: "pl-btn", "aria-label": "倍速", text: "1×" });
  const bar = el("div", { class: "pl-bar" }, play, prev, next, track, time, speed);
  const hint = el("p", { class: "pl-hint", text: "空格播放 / 暂停,← → 逐步。暂停时,画面上带虚线框的元素可以点开看出处。" });
  const main = el("div", { class: "pl-main" }, screen, bar, hint);

  const chapList = el("ol", { class: "pl-chap" });
  const chapBtns = chapters.map((c) => {
    const b = el("button", { onclick: () => seekTo(c.t + 0.01, true) }, el("small", { text: fmt(c.t) }), c.title);
    chapList.append(el("li", {}, b));
    return b;
  });
  const lineList = el("ol", { class: "pl-lines" });
  const lineBtns = captions.map((c) => {
    const b = el("button", { onclick: () => seekTo(c.start + 0.01, true), text: c.text });
    lineList.append(el("li", {}, b));
    return b;
  });
  const side = el("aside", { class: "pl-side" }, el("h3", { text: "章节" }), chapList, el("h3", { text: "讲稿" }), lineList);
  root.append(main, side);
  host.append(root);

  // ---- fit the 1920×1080 stage into the screen box ----
  const resize = () => {
    const s = screen.clientWidth / stage.W;
    fit.style.transform = `scale(${s})`;
    drawHotspots();
  };
  new ResizeObserver(resize).observe(screen);

  // ---- clock ----
  let raf = 0;
  const now = () => audio.currentTime;
  const sync = (t) => {
    stage.seek(t);
    range.value = String(t);
    time.textContent = `${fmt(t)} / ${fmt(dur)}`;
    const ci = chapters.findLastIndex((c) => t >= c.t - 0.01);
    chapBtns.forEach((b, i) => b.setAttribute("aria-current", String(i === ci)));
    const li = captions.findIndex((c) => t >= c.start - 0.04 && t < c.end);
    lineBtns.forEach((b, i) => b.setAttribute("aria-current", String(i === li)));
    if (li >= 0 && !audio.paused) lineBtns[li].scrollIntoView({ block: "nearest" });
  };
  const loop = () => {
    sync(now());
    if (!audio.paused) raf = requestAnimationFrame(loop);
  };
  const seekTo = (t, pause = false) => {
    t = Math.max(0, Math.min(dur, t));
    if (pause) audio.pause();
    audio.currentTime = t;
    sync(t);
    drawHotspots();
  };
  audio.addEventListener("play", () => {
    play.textContent = "❚❚";
    play.setAttribute("aria-label", "暂停");
    hot.replaceChildren();
    closePop();
    raf = requestAnimationFrame(loop);
  });
  audio.addEventListener("pause", () => {
    play.textContent = "▶";
    play.setAttribute("aria-label", "播放");
    cancelAnimationFrame(raf);
    sync(now());
    drawHotspots();
  });
  play.addEventListener("click", () => (audio.paused ? audio.play() : audio.pause()));
  range.addEventListener("input", () => seekTo(parseFloat(range.value), true));
  const rates = [1, 1.25, 0.75];
  speed.addEventListener("click", () => {
    const r = rates[(rates.indexOf(audio.playbackRate) + 1) % rates.length];
    audio.playbackRate = r;
    speed.textContent = `${r}×`;
  });

  // ---- steps: primitive beats + chapter starts, landing a moment after each change ----
  const points = [...new Set([...stage.beats().map((b) => b.t), ...chapters.map((c) => c.t)].map((t) => +t.toFixed(2)))].sort((a, b) => a - b);
  // 每个逐步点落在变化完成之后(+0.7 秒),但不越过下一个点
  const settle = 0.7;
  const targets = points.map((p, i) => Math.min(p + settle, (points[i + 1] ?? dur) - 0.02));
  const stepTo = (dir) => {
    const t = now();
    const i = dir > 0 ? targets.findIndex((x) => x > t + 0.01) : targets.findLastIndex((x) => x < t - 0.01);
    if (i >= 0) seekTo(targets[i], true);
  };
  prev.addEventListener("click", () => stepTo(-1));
  next.addEventListener("click", () => stepTo(1));
  root.tabIndex = 0;
  root.addEventListener("keydown", (e) => {
    if (e.target instanceof HTMLInputElement && e.key !== " ") return;
    if (e.key === " ") (e.preventDefault(), audio.paused ? audio.play() : audio.pause());
    if (e.key === "ArrowRight") (e.preventDefault(), stepTo(1));
    if (e.key === "ArrowLeft") (e.preventDefault(), stepTo(-1));
  });

  // ---- 点图看出处 ----
  let pop = null;
  const closePop = () => (pop?.remove(), (pop = null));
  function drawHotspots() {
    hot.replaceChildren();
    if (!audio.paused) return;
    const box = screen.getBoundingClientRect();
    // 看不见的元素(淡出的、被「打开」的节点)不给热点
    const seen = (node) => {
      let o = 1;
      for (let n = node; n && n !== stage.el; n = n.parentElement) {
        const cs = getComputedStyle(n);
        if (cs.visibility === "hidden" || cs.display === "none") return 0;
        o *= parseFloat(cs.opacity);
      }
      return o;
    };
    for (const hs of stage.hotspots()) {
      if (seen(hs.el) < 0.35) continue;
      const r = hs.el.getBoundingClientRect();
      if (r.width < 4 || r.right < box.left || r.left > box.right || r.bottom < box.top || r.top > box.bottom) continue;
      const b = el("button", {
        "aria-label": `查看出处:${hs.label}`,
        style: `left:${r.left - box.left - 6}px;top:${r.top - box.top - 6}px;width:${r.width + 12}px;height:${r.height + 12}px`,
        onclick: (e) => {
          e.stopPropagation();
          closePop();
          pop = el("div", { class: "pl-pop", role: "dialog", "aria-label": hs.label });
          pop.append(el("h4", { text: hs.label }));
          for (const fid of hs.facts) {
            const f = facts[fid];
            pop.append(el("p", { text: f ? f.claim : `${fid}(事实待核实)` }));
            if (f?.status === "undisclosed") pop.append(el("div", { class: "src", text: "官方未披露 · 画面上用雾化方块表示" }));
            for (const ev of f?.evidence ?? []) {
              const s = sources[ev.source];
              pop.append(el("div", { class: "src", text: s ? `来源 · ${s.publisher}:${s.title}` : ev.source }));
            }
          }
          pop.style.left = `${Math.min(r.left - box.left, box.width - 370)}px`;
          pop.style.top = `${r.bottom - box.top + 10}px`;
          screen.append(pop);
        },
      });
      hot.append(b);
    }
  }
  screen.addEventListener("click", closePop);

  resize();
  sync(0);
  return { seekTo, root };
}
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall