序列
<Sequence> 是 Remotion 中的一个内置组件,它:
- 绝对定位内容
- 允许你对元素进行时间偏移
可以把它看作是 After Effects 或 Photoshop 中的“图层”的等价物。
不要将其与 <Composition> 混淆。
🌐 Think of it as the equivalent of a "layer" in After Effects or Photoshop.
Not to be confused with <Composition>.
布局
🌐 Layouting
默认情况下,<Sequence> 在 DOM 中也将被绝对定位,因此你可以使用它将元素叠加在一起。
🌐 A <Sequence> by default will also be absolutely positioned in the DOM, so you can use it to overlay elements on top of each other.
时移
🌐 Time-shifting
考虑一个从第0帧开始动画的元素。 如果你想延迟动画,而不是重构动画,你可以将其封装在 <Sequence> 中,并使用 from 属性定义延迟。
🌐 Consider an element which starts animating at frame 0.
If you would like to delay the animation, rather than refactoring the animation, you can wrap it in a <Sequence> and define a delay using the from prop.
使用序列,你也可以通过传递 durationInFrames 属性来修剪动画的开始和结束。
🌐 Using a sequence, you can also trim the start and end of an animation by passing the durationInFrames prop.