# juliangarnier/anime architecture

> Architecture diagram of the GitHub repository juliangarnier/anime, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/juliangarnier/anime
- Repository: https://github.com/juliangarnier/anime

## Overview

Anime.js is a JavaScript animation library. A user calls its public API to configure an animation or timeline, which is advanced by the engine and rendered onto CSS, SVG, DOM attributes, or JavaScript-object targets. The tree and README establish additional capabilities such as easing, dragging, text splitting, SVG motion paths, WAAPI, layout, scopes, and Three.js adapters. Sampled source confirms the engine’s tick loop and easing parser; links among other unsampled subsystems are shown only where the public capability or exports support them.

Main entry points: [`src/index.js`](https://github.com/juliangarnier/anime/blob/master/src/index.js) (Public API), [`src/core/render.js`](https://github.com/juliangarnier/anime/blob/master/src/core/render.js) (Value rendering), [`src/engine/engine.js`](https://github.com/juliangarnier/anime/blob/master/src/engine/engine.js) (Engine), [`src/animation/index.js`](https://github.com/juliangarnier/anime/blob/master/src/animation/index.js) (Animation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Animation API"]
  node_public["Public API<br/>[index.js]"]
  node_animation["Animation<br/>[index.js]"]
  node_timeline["Timeline<br/>[index.js]"]
  node_animatable["Animatable<br/>[index.js]"]
end

subgraph group_runtime["Timing Runtime"]
  node_timer["Timer<br/>[index.js]"]
  node_engine["Engine<br/>[engine.js]"]
  node_easing["Easing functions<br/>[index.js]"]
end

subgraph group_rendering["Rendering Targets"]
  node_render["Value rendering<br/>[render.js]"]
  node_core["Core value handling<br/>[values.js]"]
  node_targets["Target resolution<br/>[targets.js]"]
  node_three["Three.js adapter<br/>[index.js]"]
end

subgraph group_interaction["Interaction Tools"]
  node_draggable["Draggable<br/>[index.js]"]
  node_events["Scroll events<br/>[index.js]"]
  node_scope["Animation scopes<br/>[index.js]"]
  node_layout["Auto layout<br/>[index.js]"]
end

subgraph group_extensions["Animation Extensions"]
  node_svg["SVG tools<br/>[index.js]"]
  node_text["Text tools<br/>[index.js]"]
  node_waapi["WAAPI<br/>[index.js]"]
end

node_user(("Library user"))
node_dom(("DOM and JS targets"))
node_threeobjects(("Three.js objects"))

node_user -->|"calls"| node_public
node_public -->|"exports"| node_animation
node_public -->|"exports"| node_timeline
node_public -->|"exports"| node_animatable
node_public -->|"exports"| node_timer
node_public -->|"exports"| node_draggable
node_public -->|"exports"| node_events
node_public -->|"exports"| node_scope
node_public -->|"exports"| node_layout
node_public -->|"exports"| node_easing
node_public -->|"exports"| node_svg
node_public -->|"exports"| node_text
node_public -->|"exports"| node_waapi
node_animation -->|"scheduled by"| node_engine
node_timeline -->|"scheduled by"| node_engine
node_timer -->|"scheduled by"| node_engine
node_engine -->|"ticks"| node_render
node_render -->|"computes values"| node_core
node_render -->|"resolves targets"| node_targets
node_targets -->|"selects"| node_dom
node_render -->|"uses easing"| node_easing
node_three -.->|"adapts"| node_threeobjects
node_draggable -->|"animates"| node_animatable
node_svg -->|"operates on"| node_dom
node_text -->|"transforms"| node_dom
node_waapi -->|"animates"| node_dom

click node_public "https://github.com/juliangarnier/anime/blob/master/src/index.js"
click node_animation "https://github.com/juliangarnier/anime/blob/master/src/animation/index.js"
click node_timeline "https://github.com/juliangarnier/anime/blob/master/src/timeline/index.js"
click node_animatable "https://github.com/juliangarnier/anime/blob/master/src/animatable/index.js"
click node_timer "https://github.com/juliangarnier/anime/blob/master/src/timer/index.js"
click node_engine "https://github.com/juliangarnier/anime/blob/master/src/engine/engine.js"
click node_easing "https://github.com/juliangarnier/anime/blob/master/src/easings/index.js"
click node_render "https://github.com/juliangarnier/anime/blob/master/src/core/render.js"
click node_core "https://github.com/juliangarnier/anime/blob/master/src/core/values.js"
click node_targets "https://github.com/juliangarnier/anime/blob/master/src/core/targets.js"
click node_three "https://github.com/juliangarnier/anime/blob/master/src/adapters/three/index.js"
click node_draggable "https://github.com/juliangarnier/anime/blob/master/src/draggable/index.js"
click node_events "https://github.com/juliangarnier/anime/blob/master/src/events/index.js"
click node_scope "https://github.com/juliangarnier/anime/blob/master/src/scope/index.js"
click node_layout "https://github.com/juliangarnier/anime/blob/master/src/layout/index.js"
click node_svg "https://github.com/juliangarnier/anime/blob/master/src/svg/index.js"
click node_text "https://github.com/juliangarnier/anime/blob/master/src/text/index.js"
click node_waapi "https://github.com/juliangarnier/anime/blob/master/src/waapi/index.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_public,node_animation,node_timeline,node_animatable,node_user toneBlue
class node_timer,node_engine,node_easing toneAmber
class node_render,node_core,node_targets,node_three toneMint
class node_draggable,node_events,node_scope,node_layout toneRose
class node_svg,node_text,node_waapi,node_dom,node_threeobjects toneIndigo
```

## Components

### Animation API

- [Public API](https://github.com/juliangarnier/anime/blob/master/src/index.js): `src/index.js`
- [Animation](https://github.com/juliangarnier/anime/blob/master/src/animation/index.js): `src/animation/index.js`
- [Timeline](https://github.com/juliangarnier/anime/blob/master/src/timeline/index.js): `src/timeline/index.js`
- [Animatable](https://github.com/juliangarnier/anime/blob/master/src/animatable/index.js): `src/animatable/index.js`

### Timing Runtime

- [Timer](https://github.com/juliangarnier/anime/blob/master/src/timer/index.js): `src/timer/index.js`
- [Engine](https://github.com/juliangarnier/anime/blob/master/src/engine/engine.js): `src/engine/engine.js`
- [Easing functions](https://github.com/juliangarnier/anime/blob/master/src/easings/index.js): `src/easings/index.js`

### Rendering Targets

- [Value rendering](https://github.com/juliangarnier/anime/blob/master/src/core/render.js): `src/core/render.js`
- [Core value handling](https://github.com/juliangarnier/anime/blob/master/src/core/values.js): `src/core/values.js`
- [Target resolution](https://github.com/juliangarnier/anime/blob/master/src/core/targets.js): `src/core/targets.js`
- [Three.js adapter](https://github.com/juliangarnier/anime/blob/master/src/adapters/three/index.js): `src/adapters/three/index.js`

### Interaction Tools

- [Draggable](https://github.com/juliangarnier/anime/blob/master/src/draggable/index.js): `src/draggable/index.js`
- [Scroll events](https://github.com/juliangarnier/anime/blob/master/src/events/index.js): `src/events/index.js`
- [Animation scopes](https://github.com/juliangarnier/anime/blob/master/src/scope/index.js): `src/scope/index.js`
- [Auto layout](https://github.com/juliangarnier/anime/blob/master/src/layout/index.js): `src/layout/index.js`

### Animation Extensions

- [SVG tools](https://github.com/juliangarnier/anime/blob/master/src/svg/index.js): `src/svg/index.js`
- [Text tools](https://github.com/juliangarnier/anime/blob/master/src/text/index.js): `src/text/index.js`
- [WAAPI](https://github.com/juliangarnier/anime/blob/master/src/waapi/index.js): `src/waapi/index.js`

### Other components

- **Library user**
- **DOM and JS targets**
- **Three.js objects**

## Connections

- Library user → Public API: calls
- Public API → Animation: exports
- Public API → Timeline: exports
- Public API → Animatable: exports
- Public API → Timer: exports
- Public API → Draggable: exports
- Public API → Scroll events: exports
- Public API → Animation scopes: exports
- Public API → Auto layout: exports
- Public API → Easing functions: exports
- Public API → SVG tools: exports
- Public API → Text tools: exports
- Public API → WAAPI: exports
- Animation → Engine: scheduled by
- Timeline → Engine: scheduled by
- Timer → Engine: scheduled by
- Engine → Value rendering: ticks
- Value rendering → Core value handling: computes values
- Value rendering → Target resolution: resolves targets
- Target resolution → DOM and JS targets: selects
- Value rendering → Easing functions: uses easing
- Three.js adapter → Three.js objects: adapts
- Draggable → Animatable: animates
- SVG tools → DOM and JS targets: operates on
- Text tools → DOM and JS targets: transforms
- WAAPI → DOM and JS targets: animates
