转场
方块转场
由方块组成的转场:一列列方块从底部按整格升起,中间最先,下一个画面从方块中透出,直到铺满画面。
安装
npx @imgcli/cli add block-wipe使用
import { BlockWipe } from "@/components/imgcli/block-wipe";
<BlockWipe />默认参数下以 30 fps 渲染 84 帧(2.8 秒),预览画布为 960 × 540。
Use <BlockWipe before={<SceneA />} after={<SceneB />} /> for 84 frames at 30 fps (BLOCK_WIPE_SECONDS). columns sets the block size; startAt and wipeSeconds time the rise.
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
before | ReactNode | — | The outgoing scene. Defaults to a title card. |
after | ReactNode | — | The incoming scene. Defaults to a title card on the accent. |
beforeTitle | string | — | |
afterTitle | string | — | |
columns | number | — | Columns across the frame. |
wipeSeconds | number | — | Seconds the rise takes from first column to last. |
startAt | number | — | Seconds before the wave starts. |
fontFamily | string | — | A face from the Imgcli font list, or any loaded CSS font stack. |
accentColor | string | — | |
theme | Partial<ImgcliTheme> | — | |
mode | "light" | "dark" | — | |
speed | number | — |
许可
MIT 许可,可免费用于个人及商业项目,保留版权和许可声明。
Copyright (c) 2026 Ricky (Imgcli) <https://imgcli.com>
常见问题
如何在 Remotion 项目中使用方块转场?
运行 npx @imgcli/cli add block-wipe。CLI 会把组件源码复制到项目的 components/imgcli/ 目录并安装依赖,之后可以直接修改源码。
方块转场能做什么?
由方块组成的转场:一列列方块从底部按整格升起,中间最先,下一个画面从方块中透出,直到铺满画面。
使用方块转场前需要准备什么?
准备 Node.js 20.19 或更高版本,以及一个 Remotion 项目。新项目可以用 npx create-video@latest 创建。免费组件采用 MIT 许可证。