RenderingVideo 文档
创建文字动画
用 v2 协议制作基础标题动画的实战教程
创建文字动画
这个教程用一个文字 clip 做出一个最简单、最常用的标题入场动画。
1. 完整示例
{
"meta": {
"version": "2.0.0",
"width": 1920,
"height": 1080,
"fps": 30,
"background": "#101828"
},
"tracks": [
{
"id": "main",
"clips": [
{
"id": "headline",
"type": "text",
"start": 0,
"duration": 4,
"text": "Launch Faster",
"transform": {
"x": "50%",
"y": "50%"
},
"style": {
"fontSize": 92,
"fontWeight": 800,
"fill": "#ffffff",
"textAlign": "center",
"shadowColor": "#000000",
"shadowBlur": 20
},
"animations": [
{
"type": "fadeIn",
"duration": 0.4
},
{
"type": "slideIn",
"direction": "up",
"distance": 100,
"duration": 0.6,
"easing": "easeOutCubic"
}
]
}
]
}
]
}
2. 这个写法为什么可靠
- 先只用一个 clip,最容易验证
fadeIn和slideIn会同时执行- 用中心坐标,分辨率变化时更稳定
3. 常见变体
换成缩放入场:
{
"animations": [
{
"type": "zoomIn",
"duration": 0.5,
"easing": "easeOutBack"
}
]
}
入场后做循环脉冲:
{
"animations": [
{
"type": "scale",
"from": 1,
"to": 1.05,
"duration": 0.6,
"loop": true,
"easing": "easeInOutSine"
}
]
}