Skip to main content

@remotion/lottie

此包提供了一个在 Remotion 中显示 Lottie 动画的组件。

🌐 This package provides a component for displaying Lottie animations in Remotion.

安装

🌐 Installation

安装 @remotion/lottie 以及 lottie-web

🌐 Install, @remotion/lottie as well as lottie-web.

npm i @remotion/lottie lottie-web

你现在可以在你的 Remotion 项目中开始使用 <Lottie> 组件。

🌐 You can now start using the <Lottie> component in your Remotion project.

支持的功能

🌐 Supported features

  • 使用 lottie-web 播放 Lottie 动画
  • 改变动画的速度
  • 正向和反向播放动画
  • 播放远程文件
  • 确定 Lottie 动画的尺寸和持续时间

不受支持的功能

🌐 Unsupported features

  • 在其他渲染器上显示为 svg
  • setSubFrame(), setLocationHref()
  • 表达式支持有限:Remotion 使用来自 lottie-web.goToAndStop() 方法来在 Lottie 文件中进行搜索。根据表达式的不同,帧可能无法确定性地渲染,从而在 Remotion 输出中导致 闪烁。在不修改上游 lottie-web 的情况下,Remotion 无法解决此问题。你需要根据具体情况评估你使用的表达式是否被 Remotion 支持。
note

如果你想请求当前不支持的功能,请提交问题

目录

🌐 Table of contents

许可证

🌐 License

Remotion 许可证