Tanish Manku b475c4bac8 Merge pull request #17 from storytold/feat/svg-import
feat(import): Import to Stage for SVG drawings
2026-11-06 14:56:21 -07:00
2026-11-05 23:58:25 -07:00
2026-11-05 23:58:25 -07:00
2026-11-05 23:58:25 -07:00
2026-11-05 23:58:25 -07:00
2026-11-05 23:58:25 -07:00
2026-11-05 23:58:25 -07:00
2026-11-05 23:58:25 -07:00
2026-11-05 23:58:25 -07:00

AniCraft

An open-source, native 2D vector animation studio in the class of Adobe Animate, written in Rust. It's a clean-room implementation, part of the {Function}Craft family (PhotoCraft, LightCraft, WordCraft, …).

  • Solid architecture: layered crates (geom → doc → render → engine → cli → shell). The document is plain data, and the picture at a frame is a pure function evaluate(doc, frame).
  • Own renderer: a deterministic CPU oracle with analytic anti-aliasing (signed-area coverage accumulation), non-zero/even-odd fills, gradients, round-join strokes and rayon row parallelism.
  • Headless first: every action is an engine command. The UI, the CLI and the JSON-lines agent channel all dispatch the same ids.
  • egui shell: stage, tools, timeline (layers, keyframes, classic tweens with easing, onion skin), properties and library.

Build and run

cargo build                       # whole workspace
cargo run                         # desktop app with the sample animation
cargo run -- --screenshot shots/now.png   # draw ~120 frames, save the window, exit
cargo test                        # all crates

Headless / agents

cargo run -p anicraft-cli -- info --sample
cargo run -p anicraft-cli -- render --sample --frame 12 --out frame12.png
cargo run -p anicraft-cli -- render-seq --sample --out-dir frames --scale 0.5
cargo run -p anicraft-cli -- commands                 # the registry as JSON
cargo run -p anicraft-cli -- exec --sample draw.rect '{"x":10,"y":10,"w":80,"h":40}' --save out.anicraft
cargo run -p anicraft-cli -- serve --sample           # JSON-lines on stdin/stdout

The serve protocol takes one request per line, {"id":1,"cmd":"timeline.insert_keyframe","params":{"frame":10}}, and answers {"id":1,"ok":true,"result":{…},"revision":7,"frame":0}. Send {"cmd":"quit"} to stop.

Documents

License

Licensed under either of MIT or Apache-2.0 at your option, like the sibling app PhotoCraft. Third-party notices are in NOTICE and ATTRIBUTION.md. The dependency and asset compliance policy and audit (cargo deny) are in docs/legal/compliance.md. The sample animation and all UI icons are original and generated in code.

AniCraft is an independent clean-room project. It is not affiliated with or endorsed by Adobe. Adobe, Animate and Flash are trademarks of Adobe Inc.

S
Description
AniCraft: An open-source 2D animation editor written from scratch in pure Rust.
Readme
25 MiB
0 Stars 1 Watchers 0 Forks
Languages
Rust 95%
JavaScript 1.7%
Python 1%
Shell 1%
PowerShell 0.8%
Other 0.4%