# 创建文字动画

这个教程用一个文字 clip 做出一个最简单、最常用的标题入场动画。

## 1. 完整示例

```json
{
  "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. 常见变体

换成缩放入场：

```json
{
  "animations": [
    {
      "type": "zoomIn",
      "duration": 0.5,
      "easing": "easeOutBack"
    }
  ]
}
```

入场后做循环脉冲：

```json
{
  "animations": [
    {
      "type": "scale",
      "from": 1,
      "to": 1.05,
      "duration": 0.6,
      "loop": true,
      "easing": "easeInOutSine"
    }
  ]
}
```

## 4. 继续阅读

- 文字字段：看 [Text 元素](https://renderingvideo.com/docs/elements/text.md)
- 动画规则：看 [动画、关键帧、转场](https://renderingvideo.com/docs/animation-and-timing.md)