> For the complete documentation index, see [llms.txt](https://docs.superiormc.cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.superiormc.cn/tab-wiki/functions/dong-hua.md).

# 动画

## 创建一个动画

动画可以在 **animations.yml** 文件中被创建。\
最开始，你需要复制其中已有的动画或者修改已有的动画。\
让我们直接看它作为示例:

```
Welcome:  #this is name of the animation
  change-interval: 400  #this is refresh interval of the animation in milliseconds
  texts:  #the frames of animation
    - "&7&lW_"  
    - "&7&lW_"  
    - "&7&lWe_"  
    - "&7&lWel_"  
    - "&7&lWelc_"  
    - "&7&lWelco_"  
    - "&7&lWelcom_"  
    - "&7&lWelcome_"  
    - "&7&lWelcome_"  
    - "&7&lWelcome_"  
    - "&7&lWelcome_"  
    - "&7&lWelcom_"  
    - "&7&lWelco_"  
    - "&7&lWelc_"  
    - "&7&lWel_"  
    - "&7&lWe_"  
    - "&7&lW_"  
    - "&7&lW_"
```

这是一个名为 `Welcome` 且 `change-interval` （切换频率）为 `400` 毫秒的动画，也就是说每秒刷新 2.5 次。 `Texts` 则是动画实际显示的文本。

## 使用一个动画

要使用一个动画，你需要使用 `%animation:<名称>%` 格式，例如上面的示例就是 `%animation:Welcome%`。动画可以在 TAB 中的任何地方使用。

## 提示

* 动画不需要太快。你可以将它们用于切换文本的工具。仔细查看默认的 "ping-tps" 动画，它只每 5 秒刷新一次。在 Boss 条使用动画也是很不错的注意。
* 从短文本逐渐变成长文本是很不错的动画效果。上面的示例就是这样。

## 额外工具

如果你觉得自己手动制作动画太累了，不如试试下面的几个网站:\
<https://rgb.birdflop.com/>\
<https://www.simplymc.art/AnimTAB/>\
<https://starve-l.github.io/tab-animation.html>
