agentleFS
INERATEINERATE/atelier/skills/anime-js/SKILL.md

anime-js

Skill2 starsChanged 53 days agoMITView on GitHub

Anime.js v4 animation guidance for timelines, SVG motion, draggable interactions, motion paths, scroll effects, staggering, and text splitting.

  • Installs packages

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

Anime.js v4

Modular, tree-shakeable. Import only what you use. In Atelier, reach for it when the effect is timeline-, SVG-, or draggable-heavy; for trigger-driven React UI motion prefer Framer Motion (design-law §4), for continuous card schematics prefer [[living-graphics]]. All motion still obeys the design-law motion system: expo/spring physics, reduced-motion fallback, transform/opacity/canvas only.

Install

npm i animejs · ESM import { animate } from 'animejs' · CDN https://esm.sh/animejs

Core API (import from animejs)

  • animate(targets, params) — CSS/transforms/vars, SVG attrs, JS objects, HTML attrs. Values: numeric, units, relative +=/-=/*=, color, [from, to], or (el,i,total)=> functions. ease:'outExpo', createSpring({stiffness,damping,mass}).
  • createTimeline({defaults}) → .add(t, params, pos) — position '<' (with prev), '-=200', '+=100', ms, or a label.
  • stagger(100, { from:'center', grid:[cols,rows] }) — for delay/values.
  • onScroll({ target, sync:true, enter, leave }) — pass as autoplay to scrub.
  • SVG: morphTo(path), createDrawable('path') + { draw:['0 0','0 1'] }, createMotionPath(path).
  • splitText(el,{chars,words,lines}) → .addEffect() for per-char reveals.
  • createDraggable(el,{ container, releaseEase:createSpring(...) }).
  • Utils: $, get/set, remove, random, clamp, lerp, mapRange.

Patterns

import { animate, createTimeline, stagger, createDrawable } from 'animejs';

animate('.item', { translateY:[16,0], opacity:[0,1],
  delay: stagger(70, { from:'center' }), duration:600, ease:'outExpo' });

createTimeline({ defaults:{ duration:500, ease:'outExpo' } })
  .add('.a',{ x:100 }).add('.b',{ x:100 }, '<').add('.c',{ x:100 }, '-=200');

animate(createDrawable('path'), { draw:['0 0','0 1'], duration:2000, ease:'inOutQuad' });

React — always scope + revert

useEffect(() => {
  const scope = createScope({ root: ref.current })
    .add(() => animate('.box', { rotate:360 }));
  return () => scope.revert();       // cleanup is mandatory
}, []);

Bundle: full ~24.5KB gzip; animation core ~10KB; add draggable/scroll only if used. Docs: https://animejs.com/documentation · easing editor: https://animejs.com/easing-editor

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.