animation-master

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Animation Master

Animation Master

Use this skill to apply the bundled Animation Master CSS effects to a website or app. The CSS files are stored in
assets/css/
and use reusable
.t-*
class names.
使用本技能可将打包好的Animation Master CSS动效应用到网站或应用中。CSS文件存储在
assets/css/
目录下,采用可复用的
.t-*
类名。

Workflow

工作流程

  1. Choose the effect category and file.
    • Read
      references/catalog.md
      when selecting an effect or mapping a request to a CSS file.
    • Prefer copying only the CSS file(s) needed for the requested effect.
  2. Copy CSS into the target project.
    • Use
      scripts/install_motion_css.py --target <directory> <effect-name>
      for selected effects.
    • Use
      scripts/install_motion_css.py --target <directory> --all
      only when the user wants the full library.
  3. Wire the effect in markup.
    • Add the corresponding
      .t-*
      class to the element.
    • Preserve the class names and keyframe names unless the user asks for a naming change.
    • Keep existing
      prefers-reduced-motion
      blocks.
  4. Add state hooks when required.
    • UI transition files commonly use state classes or attributes such as
      .is-open
      ,
      .is-closing
      ,
      .is-previewing
      ,
      .is-animating
      ,
      data-state
      , or
      data-page
      .
    • Text effects use
      .t-text-animation
      , the specific text class, and
      .is-previewing
      .
  5. Verify visually after integration.
    • For local web work, run or reuse the local dev server and inspect the page in the browser.
    • Check that the animation starts, stops, or replays according to the requested interaction.
  1. 选择动效类别和文件。
    • 选择动效或根据需求匹配CSS文件时,请阅读
      references/catalog.md
    • 优先仅复制所需动效对应的CSS文件。
  2. 将CSS复制到目标项目中。
    • 如需安装选定动效,使用命令
      scripts/install_motion_css.py --target <directory> <effect-name>
    • 仅当用户需要完整库时,才使用命令
      scripts/install_motion_css.py --target <directory> --all
  3. 在标记中配置动效。
    • 为元素添加对应的
      .t-*
      类。
    • 除非用户要求修改命名,否则保留类名和关键帧名称。
    • 保留现有的
      prefers-reduced-motion
      代码块。
  4. 按需添加状态钩子。
    • UI过渡文件通常使用状态类或属性,例如
      .is-open
      .is-closing
      .is-previewing
      .is-animating
      data-state
      data-page
    • 文本动效使用
      .t-text-animation
      、特定文本类以及
      .is-previewing
  5. 集成后进行视觉验证。
    • 针对本地Web开发,运行或复用本地开发服务器,并在浏览器中检查页面。
    • 确认动画能根据请求的交互正确启动、停止或重播。

Resources

资源

  • assets/css/
    : packaged CSS effects copied from the Animation Master site.
  • references/catalog.md
    : effect categories, filenames, primary classes, and typical usage.
  • scripts/install_motion_css.py
    : utility to list or copy CSS files into another project.
  • assets/css/
    : 从Animation Master网站复制而来的打包CSS动效文件。
  • references/catalog.md
    : 包含动效类别、文件名、主要类名及典型用法的参考文档。
  • scripts/install_motion_css.py
    : 用于列出或复制CSS文件到其他项目的工具脚本。

Integration Notes

集成注意事项

  • Element effects are usually continuous or one-shot transforms on a single element.
  • UI effects often need wrapper markup and a state toggle.
  • Text effects are split into individual files; do not re-aggregate them unless the user asks.
  • transitions-root.css
    contains shared UI motion tokens and can be copied when a page uses several UI transition effects.
  • 元素动效通常是对单个元素的持续或一次性变换。
  • UI动效通常需要包装标记和状态切换器。
  • 文本动效被拆分为独立文件;除非用户要求,否则请勿重新聚合。
  • transitions-root.css
    包含共享的UI动效令牌,当页面使用多个UI过渡动效时可复制该文件。