← 返回 Skills 市场
lucas-kay8

Lottie

作者 Lucas-Kay8 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ pending
35
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install lottie
功能描述
Lottie and dotLottie adapter patterns for HyperFrames. Use when embedding lottie-web JSON animations, .lottie files, @lottiefiles/dotlottie-web players, regi...
使用说明 (SKILL.md)

Lottie for HyperFrames

HyperFrames can seek both lottie-web and dotLottie players through its lottie runtime adapter. Lottie is a strong fit because the animation timeline is already encoded in the asset; HyperFrames only needs a player object it can seek.

Contract

  • Load assets from local project files, usually under assets/.
  • Set autoplay: false.
  • Prefer loop: false unless the user explicitly wants a loop.
  • Register every returned animation or player on window.__hfLottie.
  • Keep the Lottie container dimensions stable with CSS.

The adapter seeks lottie-web with goToAndStop(timeMs, false) and dotLottie with frame or percentage APIs depending on player shape.

lottie-web Pattern

\x3Cdiv id="logo-lottie" class="lottie-layer">\x3C/div>
\x3Cscript src="https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.12.2/lottie.min.js">\x3C/script>
\x3Cscript>
  const anim = lottie.loadAnimation({
    container: document.getElementById("logo-lottie"),
    renderer: "svg",
    loop: false,
    autoplay: false,
    path: "assets/logo-reveal.json",
  });

  window.__hfLottie = window.__hfLottie || [];
  window.__hfLottie.push(anim);
\x3C/script>
.lottie-layer {
  width: 100%;
  height: 100%;
}

dotLottie Pattern

\x3Ccanvas id="product-lottie" class="lottie-canvas">\x3C/canvas>
\x3Cscript src="https://unpkg.com/@lottiefiles/dotlottie-web">\x3C/script>
\x3Cscript>
  const player = new DotLottie({
    canvas: document.getElementById("product-lottie"),
    src: "assets/product-flow.lottie",
    autoplay: false,
    loop: false,
  });

  window.__hfLottie = window.__hfLottie || [];
  window.__hfLottie.push(player);
\x3C/script>
.lottie-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

Multiple Animations

Push each player into the same registry:

window.__hfLottie = window.__hfLottie || [];
window.__hfLottie.push(backgroundAnim);
window.__hfLottie.push(iconAnim);
window.__hfLottie.push(confettiAnim);

HyperFrames seeks them all to the same composition time.

Good Uses

  • After Effects exports that are already known to render correctly in lottie-web.
  • Logo reveals, icon loops, decorative accents, and product UI motion.
  • Translating Remotion Lottie usage into plain HyperFrames HTML.

Avoid

  • Relying on remote path URLs at render time.
  • Starting playback with play().
  • Assuming unsupported After Effects effects will survive export. Test the JSON or .lottie file in a browser first.
  • Loading a player asynchronously and registering it after HyperFrames validation has already inspected the page.

Validation

After editing a Lottie composition:

npx hyperframes lint
npx hyperframes validate

Credits And References

如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install lottie
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /lottie 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Lottie 1.0.0 introduces HyperFrames support for Lottie and dotLottie animations. - Provides adapter patterns for embedding lottie-web JSON and .lottie files into HyperFrames. - Defines a standard contract for loading, configuring, and registering animations with `window.__hfLottie`. - Documents usage examples for both lottie-web and dotLottie players. - Offers guidance on best practices, validation, and known limitations when integrating Lottie animations.
元数据
Slug lottie
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Lottie 是什么?

Lottie and dotLottie adapter patterns for HyperFrames. Use when embedding lottie-web JSON animations, .lottie files, @lottiefiles/dotlottie-web players, regi... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 35 次。

如何安装 Lottie?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install lottie」即可一键安装,无需额外配置。

Lottie 是免费的吗?

是的,Lottie 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Lottie 支持哪些平台?

Lottie 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Lottie?

由 Lucas-Kay8(@lucas-kay8)开发并维护,当前版本 v1.0.0。

💬 留言讨论