1仕組みと動作原理
カクつき(jank)の原因をブラウザのレンダリングパイプラインに帰属させる:width/height/top/left/margin/box-shadow/filter のアニメーションは毎フレーム layout/paint を再実行するが、transform と opacity のみコンポジタスレッドで処理される
Eliminate the #1 cause of janky web animation: animating properties that force the browser to recalculate layout (reflow) or repaint on every frame. … Animating **`transform`** and **`opacity`** runs entirely on the compositor (often the GPU), skipping layout and paint, which is what makes animation smooth at 60/120fps.
高コストな各プロパティに低コストな代替手段をマッピングし、即座にコピー可能なコードを提示:シャドウは疑似要素の opacity に変更、実際の寸法/移動は FLIP を使用、height:auto には grid 0fr→1fr または interpolate-size を採用
| `box-shadow` | Paint | Animate `opacity` of a pseudo-element holding the shadow |
一括読み取り→一括書き込みの順序で layout thrashing を排除し、will-change の即時付与/解除ルールを定めてコンポジット層の急増による性能低下を防ぐ
For frame-synced work, read in a `requestAnimationFrame` callback and apply writes; libraries like fastdom formalize this read/write scheduling.
パフォーマンスを検証可能な事実へと変換:フリーズフレームのスクリーンショットで視覚的正しさを確認し、DevTools Performance または CDP tracing で毎フレーム Layout/Paint が発生していないことをアサート
Or headless trace: `npx playwright screenshot` for the visual, plus a CDP/`tracing` capture, and assert no `Layout`/`Paint` events fire during the animation window.
2コア機能
3外部依存関係
| Kind | Dependency / Endpoint |
|---|---|
| cli | npx / Playwright(宿主侧截图工具;SKILL.md 在 verify 段示范,非 skill 自带) |
| cli | scripts/seek-shot.sh + scripts/contact-sheet.sh(仓库根打包助手;9 个 skill 的 SKILL.md 都点名) |
| cli | ffmpeg(contact-sheet.sh 用 hstack 拼接触表) |
| api | 浏览器原生 API:Web Animations `element.animate()`、`getBoundingClientRect`、`interpolate-size`/`calc-size()`、DevTools Performance、CDP tracing |
| network | 无第三方库;正文只允许 deps via CDN if any(未点名任何域;产物期引用不判级) |
4推奨統制措置と判定根拠
- 本地工作目录: ファイル I/O と成果物出力:本 skill ディレクトリ内へのディスク書き込みはゼロ。agent は出力規約に従い、ユーザープロジェクト内に自己完結型 .html 成果物を1つ書き出します
5二重目の独立検証
- [ok] 只动 transform/opacity 这条中心主张是否在源码内可执行为判据 — SKILL.md 给映射表 + 完整可抄代码 + layout/paint/composite 三阶段推理,并给 DevTools Perf 与 CDP tracing 两种可复核手段;references 的成本表逐属性标注触发阶段,主张与代码一致。
- [unlocatable] Chrome 129+ 的 interpolate-size 支持声明 — SKILL.md 写 interpolate-size: allow-keywords 为 Modern (Chrome 129+/supporting browsers),但源码内无版本依据、无 caniuse 数据、无测试;只读侦查不运行浏览器,故按文档声明记录,不当作已核事实(正文同时给了 grid 0fr→1fr 的跨浏览器兜底,风险被降级)。
- [discrepancy] Packaged helper 的相对路径是否真的落在本 skill 目录内 — SKILL.md 的 verify 段写 scripts/seek-shot.sh anim.html 0 1.5 3,但 scripts/ 位于仓库根(/var/ytdown/skills-portal/spy-repos/iart-web-animation-skills/scripts/),skills/60fps-animation/ 内没有 scripts/ 目录。以 skill 目录为 cwd 照抄该命令会找不到文件;需按仓库根(或安装后的 pack 根)执行。对 pin commit 有效。
- [ok] 60fps/120fps 之外的量化主张是否有支撑 — 正文把 60/120fps 表述为合成器路径带来的结果,并把核对交给 DevTools 的 Frame Rendering Stats,未给出伪造基准数字;未发现夸大声明。
6結論
f8ffc2c3bcd223d0…