anime README

README проекта с github.com/juliangarnier/anime. Одним файлом markdown: README.md.

Anime.js

The Anime.js v5 logo animation in the Anime.js editor

Anime.js is a fast, versatile and lightweight animation engine for the web, with a simple yet powerful API and a visual editor.
It works with CSS, SVG, HTML, WebGL, WebGPU and Canvas2D objects.

NPM Downloads jsDelivr hits (npm) GitHub Sponsors

Sponsors

Anime.js is 100% free and is only made possible with the help of our sponsors. Help the project become sustainable by sponsoring us on GitHub Sponsors.

Platinum sponsors

Silver sponsors

Get featured here by becoming a GitHub Sponsor.

Usage

Anime.js works by importing ES modules like so:

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
});
Anime.js code example

Documentation

The full documentation is available here.

Migration guides

Coming from V4, the breaking changes are listed in the V5 release notes. Coming from V3, follow the v3 to v4 migration guide here first.

NPM development scripts

First, run npm i to install all the necessary packages. Then, execute the following scripts with npm run <script>.

script action
dev Watches for changes in src/**/*.js, builds the ESM and CJS modules to dist/modules/ and creates type declarations next to them
build Builds the ESM and CJS modules to dist/modules/, the ESM and UMD bundles to dist/bundles/, and creates type declarations in dist/modules/
test Builds, then runs the type checks and the Node and browser test suites
test:browser Starts a local server and runs all browser-related tests
test:headless Runs the browser test suite in headless Chrome and reports pass / fail
test:node Starts Node-related tests
typecheck Checks the types of the source, the tests and the examples
open:examples Serves the examples with an index of all pages. They run dist/modules/, so run dev beside it
open:examples:editor Serves the examples with the Anime.js editor
open:playground Serves the test playground pages with an index of all pages, run dev beside it
open:playground:editor Serves the test playground pages with the Anime.js editor

© Julian Garnier | MIT License

anime (juliangarnier/anime)

Ищем в базе…

74.9K ·GitHub
Что это такое?Anime.js — это быстрая, многофункциональная и лёгкая JavaScript-библиотека анимаций с простым, но мощным API для анимации всего на веб-страницах.
Это библиотека, которую я подключаю в свой код, или готовое приложение?Это библиотека: anime.js V4 подключается импортом её ES-модулей в ваш собственный проект, а не как отдельная программа, которую запускают сама по себе.
Как добавить её в проект?Установите npm-пакет и импортируйте его модули в своём коде; в README есть ссылка на полную документацию V4 с пошаговым описанием использования.
Подтягивает ли anime.js другие библиотеки?Нет — в пакете ноль runtime-зависимостей, поэтому вместе с ним ничего дополнительно не устанавливается.
Я использовал anime.js v3 — будет ли мой старый код работать на v4?В V4 API изменился по сравнению с v3, и в репозитории есть официальное руководство по миграции с v3 на v4 для переноса существующего кода.
Что с его помощью можно анимировать?CSS-свойства, SVG, атрибуты DOM и обычные JavaScript-объекты — то есть стили, векторную графику и даже произвольные значения объектов.
Он работает вне браузера, например в Node?Он создан для браузера (CSS, SVG, DOM), но в репозитории есть тесты под Node и публикуются CJS-сборки, так что анимация обычных объектов работает и в Node.
Есть ли в комплекте типы для TypeScript?Да — сборка генерирует файлы объявлений типов вместе с бандлами ESM, UMD, CJS и IIFE, а сам репозиторий проверяет свой код и примеры через tsc.
Какие есть похожие проекты?GSAP, jquery, ascii-reveal, svg.js, snabbdom, classnames, pretext, lottie-web
Автор
juliangarnier
Размер
181.4 MB
Звёзды
74.9K
Возраст
10 г
Коммиты · 90 дней