remotion
一个包含在 Remotion 中表达视频所需基本构建模块的包。
🌐 A package containing the essential building blocks of expressing videos in Remotion.
一些纯函数,例如 interpolate() 和 interpolateColors(),也可以在 Remotion 之外使用。
🌐 Some pure functions such as interpolate() and interpolateColors() can also be used outside of Remotion.
安装
🌐 Installation
- npm
- bun
- pnpm
- yarn
npm i remotionbun i remotionpnpm i remotionyarn add remotion应用编程接口
🌐 API
以下功能和组件已公开:
🌐 The following functions and components are exposed:
<Composition>
定义视频
<Still>
定义蒸馏器
<Folder>
在工作室侧边栏中整理作品
registerRoot()
初始化一个 Remotion 项目
useCurrentFrame()
获取当前时间
useVideoConfig()
获取合成的时长、尺寸和帧率
interpolate()
将一系列值映射到另一个范围
spring()
基于物理的动画原语
interpolateColors()
将一系列数值映射到颜色
measureSpring()
确定弹簧的持续时间
Easing
自定义
interpolate() 的动画曲线<Img>
渲染一个
<img> 标签并等待它加载<Html5Video>
将
<video> 与 Remotion 的时间同步<Html5Audio>
将
<audio> 与 Remotion 的时间同步<OffthreadVideo>
<Html5Video> 的替代方案<AnimatedImage>
显示 GIF、AVIF 或动画 WebP 图片
<IFrame>
渲染一个
<iframe> 标签并等待它加载<Sequence>
时间转移了它的子级
<Series>
在另一个之后显示内容
<Freeze>
将一些内容冻结在时间中
<Loop>
重复播放一些内容
delayRender()
阻止渲染继续
continueRender()
取消阻塞渲染
cancelRender()
中止错误
getInputProps()
接收用户定义的输入数据
getRemotionEnvironment()
确定你当前是在预览还是渲染
staticFile()
从
public/ 文件夹访问文件<AbsoluteFill>
将内容绝对定位并设置为全尺寸
VERSION
获取 Remotion 的当前版本
许可证
🌐 License