# @foundry-vtt-types/animejs 中文文档

规范地址：https://npmcn.com/package/%40foundry-vtt-types/animejs/

版本：4\.3\.6
npm 元数据更新时间：2026-10-26T04:17:29.080Z
中文译文更新时间：2026-11-16T01:02:51.001Z
软件包许可：MIT

本文由上游 README 翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/%40foundry-vtt-types/animejs
原文对照：https://npmcn.com/package/%40foundry-vtt-types/animejs/?lang=original
项目主页：https://animejs.com/
源码仓库：https://github.com/founry-vtt-types/anime

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：1.8 MB，185 个文件
- 模块格式：ESM + CJS
- TypeScript 类型：包内自带
- 运行依赖：0 个
- 首次发布：2026-10-26T04:16:11.840Z
- 最新版本发布：2026-10-26T04:17:28.908Z
- 近 30 天下载量：1969（2026-10-16 至 2026-11-14，npm 官方下载统计）
- 已发布版本数：2（近 12 个月 2 个）

## 中文简介

JavaScript 动画引擎

## 安装

```sh
npm install @foundry-vtt-types/animejs
```

也可以使用：`pnpm add @foundry-vtt-types/animejs`、`yarn add @foundry-vtt-types/animejs`、`bun add @foundry-vtt-types/animejs`

## README

# 动画.js

![Anime.js V4 logo animation](https://npmcn.com/package/%40foundry-vtt-types/animejs/assets/images/animejs-v4-logo-animation.gif)

**_动画.js_ 是一个快速,多功能和轻量级的JavaScript动画库,具有简单而强大的API.  
它与CSS属性,SVG,DOM属性和JavaScript Objects相配合.**

![NPM Downloads](https://img.shields.io/npm/dm/animejs?style=flat-square&logo=npm) ![jsDelivr hits (npm)](https://img.shields.io/jsdelivr/npm/hm/animejs?style=flat-square&logo=jsdeliver) ![GitHub Sponsors](https://img.shields.io/github/sponsors/juliangarnier?style=flat-square&logo=github)

## 发起人

Anime.js是100%的自由,只有在我们的赞助商的帮助下才有可能实现. 通过赞助我们,帮助项目的可持续性 [GitHub 赞助商](https://github.com/sponsors/juliangarnier)。 。 。 .

### 白金提案国

<table><tbody><tr><td><a href="https://ice.io/?ref=animejs" rel="nofollow noopener noreferrer"><img src="https://npmcn.com/package/%40foundry-vtt-types/animejs/assets/sponsors/ice-open-network-logomark-dark.png?v=200126" width="310" loading="lazy" decoding="async" referrerpolicy="no-referrer"></a></td><td><a href="https://hyperswitch.io/?utm_source=julian&amp;utm_medium=github&amp;utm_campaign=animejs_sponsorship" rel="nofollow noopener noreferrer"><img src="https://npmcn.com/package/%40foundry-vtt-types/animejs/assets/sponsors/juspay-logomark-dark.png?v=200126" width="310" loading="lazy" decoding="async" referrerpolicy="no-referrer"></a></td><td><a href="https://github.com/sponsors/juliangarnier" rel="nofollow noopener noreferrer"><img src="https://npmcn.com/package/%40foundry-vtt-types/animejs/assets/sponsors/placeholder-large.png?v=200126" width="310" loading="lazy" decoding="async" referrerpolicy="no-referrer"></a></td></tr></tbody></table>

### 银牌赞助商

<table><tbody><tr><td><a href="https://www.testmuai.com/?utm_medium=sponsor&amp;utm_source=animejs" rel="nofollow noopener noreferrer"><img src="https://npmcn.com/package/%40foundry-vtt-types/animejs/assets/sponsors/testmu-ai-logomark-dark.png?v=200126" width="141" loading="lazy" decoding="async" referrerpolicy="no-referrer"></a></td><td><a href="https://inspatialapp.com/?ref=animejs" rel="nofollow noopener noreferrer"><img src="https://npmcn.com/package/%40foundry-vtt-types/animejs/assets/sponsors/inspatial-logomark-dark.png?v=200126" width="141" loading="lazy" decoding="async" referrerpolicy="no-referrer"></a></td><td><a href="https://github.com/sponsors/juliangarnier" rel="nofollow noopener noreferrer"><img src="https://npmcn.com/package/%40foundry-vtt-types/animejs/assets/sponsors/placeholder-small.png?v=200126" width="141" loading="lazy" decoding="async" referrerpolicy="no-referrer"></a></td><td><a href="https://github.com/sponsors/juliangarnier" rel="nofollow noopener noreferrer"><img src="https://npmcn.com/package/%40foundry-vtt-types/animejs/assets/sponsors/placeholder-small.png?v=200126" width="141" loading="lazy" decoding="async" referrerpolicy="no-referrer"></a></td><td><a href="https://github.com/sponsors/juliangarnier" rel="nofollow noopener noreferrer"><img src="https://npmcn.com/package/%40foundry-vtt-types/animejs/assets/sponsors/placeholder-small.png?v=200126" width="141" loading="lazy" decoding="async" referrerpolicy="no-referrer"></a></td><td><a href="https://github.com/sponsors/juliangarnier" rel="nofollow noopener noreferrer"><img src="https://npmcn.com/package/%40foundry-vtt-types/animejs/assets/sponsors/placeholder-small.png?v=200126" width="141" loading="lazy" decoding="async" referrerpolicy="no-referrer"></a></td></tr></tbody></table>

通过成为一名 [GitHub 赞助商](https://github.com/sponsors/juliangarnier)。 。 。 .

## 使用量

Anime.js V4通过导入这样的ES模块而工作:

<table><tbody><tr><td><pre><code class="language-javascript">import {
  animate,
  stagger,
} from 'animejs';

animate('.square', {
  x: 320,
  rotate: { from: -180 },
  duration: 1250,
  delay: stagger(65, { from: 'center' }),
  ease: 'inOutQuint',
  loop: true,
  alternate: true
});
</code></pre></td><td><img alt="Anime.js code example" src="https://npmcn.com/package/%40foundry-vtt-types/animejs/assets/images/usage-example-result.gif" loading="lazy" decoding="async" referrerpolicy="no-referrer"></td></tr></tbody></table>

## V4 文档

完整的文件已经提供 [这里](https://animejs.com/documentation)。 。 。 .

## V3 移徙指南

您可以找到 v3 到 v4 迁移指南 [这里](https://github.com/juliangarnier/anime/wiki/Migrating-from-v3-to-v4)。 。 。 .

## 国家预防机制发展脚本

第一,跑开 `npm i` 以安装所有必要的软件包. 然后,执行以下脚本 `npm run <script>`。 。 。 .

| 脚本 | 动作 |
| --- | --- |
| `dev` | 监视在 `src/**/*.js`,将无害环境管理版本捆绑到 `lib/` 并创建类型声明 `types/` |
| `dev:test` | 运行 `dev` 财务报告和审定财务报表 `test:browser` 同时 |
| `build` | 无害环境管理/UMD/CJS/IIFE版本 `lib/` 并创建类型声明 `types/` |
| `test:browser` | 启动本地服务器并运行所有与浏览器相关的测试 |
| `test:node` | 开始节点相关测试 |
| `open:examples` | 启动本地服务器浏览本地示例 |

© [朱利安・加尼耶](http://juliangarnier.com/) | [MIT 许可证](https://npmcn.com/package/%40foundry-vtt-types/animejs/LICENSE.md)

## 常见问题

### @foundry-vtt-types/animejs 是什么？

JavaScript 动画引擎

### 如何安装 @foundry-vtt-types/animejs？

在项目目录运行 npm install @foundry-vtt-types/animejs，或使用 pnpm add / yarn add / bun add。

### @foundry-vtt-types/animejs 支持 TypeScript 吗？

支持。包内自带 TypeScript 类型声明（package\.json 声明了 types 入口），安装后即可获得类型提示，无需再安装 @types 包。

### @foundry-vtt-types/animejs 支持 ESM 还是 CommonJS？

同时提供 ES Module 与 CommonJS 入口，import 和 require\(\) 都可以使用，打包工具会自动选择合适的版本。

### @foundry-vtt-types/animejs 可以商用吗？

@foundry-vtt-types/animejs 使用 MIT 许可。宽松许可：允许商业使用、修改和再分发，通常只需在分发时保留原版权与许可声明。以上为概括，不构成法律意见，请以许可原文为准。

### @foundry-vtt-types/animejs 的下载量有多少？

根据 npm 官方下载统计，@foundry-vtt-types/animejs 在 2026/10/16 – 2026/11/14 这 30 天内被下载 1,969 次，日均约 66 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @foundry-vtt-types/animejs 还在维护吗？

最新版本 4\.3\.6 发布于 2026/10/26（20 天前）；至今共发布 2 个版本，其中过去 12 个月发布了 2 个；首次发布于 2026/10/26。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

