Merge main into fix/text-bidi

This commit is contained in:
SoldierPePe committed 2026-11-09 03:14:26 +03:00
commit f889d50d62
7 files changed
+130 -6

No files matched your search

+5
View File
@@ -2,6 +2,11 @@
## Unreleased
* **ActionScript on the roadmap** (ADR 0013, low priority, M6): first keep the scripts in
imported Animate files, with an Actions panel, then play the common timeline controls (stop,
play, go to a frame or label, button clicks) in Test Movie and HTML canvas export. Until
then, opening an Animate document now says how many frame scripts it left out instead of
dropping them silently.
* **Filters** (Properties › Filters, on movie clip and button instances as in Animate): **Drop
Shadow**, **Blur**, **Glow** and **Adjust Color**, in any order and combination, with blur
X/Y, quality (Low, Medium, High), strength, colour, angle and distance, and inner, knockout
+4
View File
@@ -335,6 +335,10 @@ impl<'a> Builder<'a> {
Some("motion object") => self.report.skip("motion tweens (kept as keyframes)"),
_ => {}
}
// Frame scripts aren't kept yet (ADR 0013); say so instead of dropping them quietly.
if f.child("Actionscript").is_some() {
self.report.skip("frame scripts (ActionScript isn't supported yet)");
}
let mut els = Vec::new();
self.elements(f.list("elements"), &Affine::IDENTITY, &mut els, 0);
k.elements = els;
+4 -1
View File
@@ -21,6 +21,7 @@ const DOC: &str = r##"<DOMDocument xmlns="http://ns.adobe.com/xfl/2008/" width="
</elements>
</DOMFrame>
<DOMFrame index="10" duration="5">
<Actionscript><script><![CDATA[stop();]]></script></Actionscript>
<elements>
<DOMSymbolInstance libraryItemName="Characters/Ball"><matrix><Matrix a="2" d="2" tx="300" ty="50"/></matrix></DOMSymbolInstance>
</elements>
@@ -56,7 +57,7 @@ const DOC: &str = r##"<DOMDocument xmlns="http://ns.adobe.com/xfl/2008/" width="
</DOMDocument>"##;
const BALL: &str = r##"<DOMSymbolItem name="Characters/Ball" symbolType="movie clip">
<timeline><DOMTimeline name="Ball"><layers><DOMLayer name="Layer 1"><frames><DOMFrame index="0" duration="4"><elements>
<timeline><DOMTimeline name="Ball"><layers><DOMLayer name="Layer 1"><frames><DOMFrame index="0" duration="4"><Actionscript><script><![CDATA[gotoAndPlay(2);]]></script></Actionscript><elements>
<DOMOvalObject x="-10" y="-10" objectWidth="20" objectHeight="20"><fill><SolidColor color="#FF0000"/></fill></DOMOvalObject>
</elements></DOMFrame></frames></DOMLayer></layers></DOMTimeline></timeline>
</DOMSymbolItem>"##;
@@ -92,6 +93,8 @@ fn stage_layers_frames_and_tweens() {
assert_eq!(report.skipped.get("text fields"), Some(&1));
assert_eq!(report.skipped.get("instances of missing bitmaps"), Some(&1));
assert_eq!(report.skipped.get("missing library files"), Some(&1));
// Frame scripts, on the scene's frames and inside symbols, are counted (ADR 0013).
assert_eq!(report.skipped.get("frame scripts (ActionScript isn't supported yet)"), Some(&2));
// Every scene comes across, in order.
assert_eq!(doc.scenes.iter().map(|s| s.name.as_str()).collect::<Vec<_>>(), ["Scene 1", "Scene 2"]);
assert_eq!(doc.timeline(1).layers.len(), 1, "an empty scene gets a layer to draw on");
+108
View File
@@ -0,0 +1,108 @@
# ADR 0013: ActionScript compatibility
* Status: accepted (2026-11-08) as scope and placement; the parts are built later (roadmap M6)
* Relates to: requirements U2 (scripting surface), roadmap M6, ADR 0009 (XFL import),
`docs/legal/compliance.md`
## Context
The project lead asked for ActionScript on the roadmap if it fits our constraints, at low
priority, since it serves a smaller group of users. U2 already settled AniCraft's own scripting:
the Craft-family WebAssembly plug-ins, with frame scripts on the same sandbox. The ActionScript
question is about compatibility for people who bring Animate projects with code in them.
What those users have, in order of how common it is:
1. **Timeline control in frame scripts**: `stop()`, `play()`, `gotoAndPlay`/`gotoAndStop` by
frame number or label, `nextFrame`/`prevFrame`, the same calls on a named instance
(`hero_mc.gotoAndStop("run")`), and button clicks wired to those calls with
`addEventListener(MouseEvent.CLICK, …)`. Most animation and e-learning work only uses this.
2. **Small logic**: variables, `if`, loops, `trace`, setting instance properties
(`x`, `alpha`, `visible`), simple functions.
3. **Applications and games**: classes in packages, the document class, linked symbol classes,
the full `flash.*` platform API (display list, events, networking, sound, text), compiled
to bytecode for a player.
Current Animate documents run ActionScript 3.0 only; ActionScript 1 and 2 live only in old
files. Today the XFL importer drops frame scripts without a word.
Our constraints: Rust only, no unsafe, never crash on hostile input, everything is a command,
time is a function (`evaluate` is pure), clean room (public documents and observation only),
permissive dependencies from crates.io, and Adobe names used only nominatively.
## Decision
ActionScript fits as a **compatibility front end in three tiers**, built in order, each one
useful alone. Only the first two are planned. It stays low priority: in M6 after the
WebAssembly plug-ins, frame scripts and HTML canvas export, and it may slip past M8 without
blocking anything else.
1. **Keep (tier 1).** Scripts are content and are never lost.
* The document model gets `Keyframe.script: Option<Arc<Script>>`, where `Script` holds the
source text verbatim and its language (`ActionScript3`, `ActionScript1or2`, `Other`), plus
symbol linkage and document class names as plain strings. Saved in `.anicraft` (a minor
format version with `#[serde(default)]`, so older files open unchanged).
* The XFL importer reads `<Actionscript><script>` on frames (scenes and symbols) and the
linkage attributes. The import report counts them as kept, not run. *As of this ADR it
reports them as skipped; that line moves when tier 1 lands.*
* An **Actions** panel (the generic name, see Legal) shows and edits a keyframe's script
in a monospace editor with line numbers. Keyframes with a script get a small marker in
the timeline. Commands: `script.set`, `script.clear`, `script.list`, so agents and the
CLI can read and write scripts too.
* Rendering and every export ignore scripts. Tier 1 runs nothing.
2. **Run the timeline subset (tier 2).** The common case from item 1, plus a little of item 2.
* New crate `anicraft-script` (layer 0; it knows the language, not the document): a hand-written
lexer and recursive-descent parser for an ActionScript 3 subset, with bounded nesting
depth, source length and token count. It lowers what it accepts to a small, typed
**timeline action IR** (stop, play, go to frame or label (optionally in a scene), next
and previous frame or scene, target an instance by its name path, a button event
handler for click, over, out, press and release, `trace` output, and a few instance
properties). Anything outside the subset is reported with line and column; the script
is kept and not run. Nothing is half-run.
* **The IR is the shared vocabulary.** WebAssembly frame scripts (U2) call the host with
the same actions, and the HTML canvas exporter writes the same actions out as
JavaScript. One runtime, many front ends; ActionScript is not a second engine.
* **Time stays a function.** Scripts never change the document. Interactive playback is a
separate, pure player in `anicraft-doc`: `PlayerState` (each timeline's playhead and playing flag) is
stepped by `step(doc, &state, &events) -> state` and drawn by evaluating the document
at that state. The authoring stage and every export stay script-free and
deterministic; a **Test Movie** preview window and the HTML canvas export use the player.
Fuel limits a step's work, so a bad loop can't hang the app.
* `navigateToURL` and other effects outside the movie are ignored in preview (reported in
its output), so opening a file can't make AniCraft do things outside the document.
3. **Not planned: the full language and platform (tier 3).** Classes, packages, the
`flash.*` API, a bytecode virtual machine and SWF export with compiled code. That is a
second product (a player), and open-source players for old content already exist. We
revisit only if users ask for it. If we ever do, SWF export first: its specification is
public (see compliance §4), and the tier-2 IR compiles down to it.
## Why this fits the constraints
* **Rust only, no unsafe, no new licences.** Tiers 1 and 2 are our own code; tier 1 needs no
dependency at all. No embedded JavaScript or Flash engine.
* **Never crash.** The parser is bounded and fuzzed with the other importers; the player is
fuel-limited; unsupported code is reported, not guessed.
* **Everything is a command** (`script.*`), so it works headless and over MCP.
* **Clean room.** The language is learned from public documents: the ECMAScript 3rd edition
standard (ECMA-262) that ActionScript 3 builds on, Adobe's public ActionScript 3.0 language
and component reference and its "Learning ActionScript 3.0" guide, and observing what
self-authored files do. No Adobe code, SDKs, compilers or player internals. The XFL
`<Actionscript>` element comes from the same public format descriptions and self-authored
files as the rest of ADR 0009. Sources get a row in `ATTRIBUTION.md` when the code lands.
* **Legal.** "ActionScript" is an Adobe trademark. Docs and compatibility messages use it
nominatively to say which language a script is written in (as import messages already name
Animate). Feature names stay generic: the **Actions** panel, **frame scripts**, **Test
Movie**. A programming language itself isn't protected by copyright; counsel review
covers this together with XFL (compliance §7).
## Consequences
* Animate users keep their code when they open their files, and simple interactive pieces
(menus, "click to continue", looping characters with stops) play in preview and in HTML
canvas exports without being rewritten.
* Documents with scripts look the same in every export as before, because exports render
the authored timeline, not a played session. That matches Animate's own video export.
* Games and applications written in ActionScript don't run in AniCraft and won't in this
plan. Their artwork and timelines still come across, and their scripts are kept.
* The subset is a moving line. It grows from user reports of the "not run" messages, never
by guessing what unsupported code would have done.
+5 -1
View File
@@ -79,6 +79,7 @@ cargo deny check advisories # RustSec security advisories (needs ne
| PNG, GIF, SVG, WebP | Royalty-free (GIF's LZW patents expired in 2003–2004). | OK to implement. |
| **Video export** | H.264/HEVC/AAC are covered by patent pools. VP9, AV1 and Opus are royalty-free. | **Never bundle encoders for patent-pool codecs.** MP4/H.264 only by piping to a user-installed ffmpeg. Default to WebM (VP9/AV1). **As built** (`file.export_video`): AniCraft starts the user's ffmpeg (found via a parameter, `ANICRAFT_FFMPEG` or the PATH) with an argument list, never a shell, writes raw RGBA frames to its stdin, and ships no codec code; the default file type is `.webm` (VP9). |
| **XFL / FLA import** (M4) | Adobe's proprietary formats, without a public specification. | Clean room: work only from files users or we author, public community docs and observation. Never use Adobe code, SDKs or decompiled software. Interoperability-focused (generally protected in EU Software Directive art. 6 and US DMCA §1201(f)); **confirm with counsel before shipping**. |
| **ActionScript compatibility** (M6, ADR 0013) | A programming language; no known patent pool. Implemented from ECMA-262 (3rd edition) and Adobe's public ActionScript 3.0 references. | Clean room as for XFL: public documents and self-authored files only; never Adobe compilers, SDKs or player code. Keep and run a timeline subset only; no bytecode VM. |
| SWF export (optional) | Adobe published the SWF specification and lifted its use restrictions in 2009 (Open Screen Project). | Allowed, low priority. |
| Lottie | Open specification (Lottie Animation Community, Linux Foundation). | Allowed. |
@@ -88,6 +89,9 @@ cargo deny check advisories # RustSec security advisories (needs ne
("compatible with…", "competitor to…") and in the non-affiliation disclaimer of the legal
notices (`NOTICE`, Help › Licenses & Notices). Never in the product name, feature UI, icons
or marketing imagery, and never implying endorsement.
* "ActionScript" is also an Adobe trademark. Docs and compatibility messages (import reports,
the language a kept script is written in) name it nominatively; the features themselves have
generic names (Actions panel, frame scripts, Test Movie). See ADR 0013.
* "AniCraft": a trademark clearance search has not been done yet (open item below).
## 6. Release checklist (before any public binary)
@@ -104,7 +108,7 @@ cargo deny check advisories # RustSec security advisories (needs ne
| Item | Status |
|---|---|
| Counsel review of this document (patents, XFL interoperability) | Open, before the first public release |
| Counsel review of this document (patents, XFL interoperability, ActionScript compatibility and naming) | Open, before the first public release |
| "AniCraft" trademark clearance | Open |
| Freedom-to-operate patent search for core animation features | Open (recommended before 1.0) |
| Full licence-text bundle generation (`cargo about`) in the release pipeline | Open (M8) |
+2 -2
View File
@@ -37,7 +37,7 @@ Priority: **P0** = M0–M2 skeleton must have, **P1** = parity core, **P2** = lo
| Bones / IK | Bone tool, armature poses. | P2 |
| Audio | Import WAV/OGG/MP3, stream vs event sync, waveform on timeline, scrub audio. | P1 |
| Filters / blend | Blend modes, drop shadow, blur, glow, bevel, colour adjust on Movie Clips. | P1 |
| Scripting | Frame scripts and automation (see open question U2 below). | P2 |
| Scripting | Frame scripts and automation (see open question U2 below). ActionScript compatibility for imported Animate projects: keep scripts, then run the ActionScript 3 timeline subset (ADR 0013). | P2 |
| Import | SVG, PNG/JPEG sequences, **XFL (uncompressed FLA XML)**, then binary FLA as a stretch goal. | P1 |
| Export | PNG / PNG sequence, animated GIF, sprite sheet + JSON, SVG (static frame), **Lottie JSON**, HTML canvas, MP4/WebM via a system encoder (ffmpeg pipe), optionally SWF. | P0 (PNG) / P1 |
| History | Unlimited undo/redo, named history entries, history is per document. | P0 |
@@ -100,5 +100,5 @@ Priority: **P0** = M0–M2 skeleton must have, **P1** = parity core, **P2** = lo
| Id | Question | Current decision (until settled) |
|---|---|---|
| U1 | Which interchange format first? | Own `.anicraft` + PNG/GIF first (headless verification needs it), then **XFL import** (migration path for existing projects), then Lottie/SVG export. Chosen by the builder in auto mode. |
| U2 | Scripting surface replacing ActionScript/JSFL? | **Settled by the project lead: use the sibling apps' plug-in system.** As in PhotoCraft (`docs/plugins.md` there): sandboxed WebAssembly plug-ins run by `wasmi` (pure Rust, MIT OR Apache-2.0, works in the web build), with no host imports, fuel/memory/time limits, `plugin.install/list/run/remove/reload` commands, and one undo step per run. AniCraft's ABI targets vector/timeline work (shape generators, selection transforms, easing presets, exporters) and calls the same command registry. Commands-only scripting (CLI/JSON-lines) stays available. |
| U2 | Scripting surface replacing ActionScript/JSFL? | **Settled by the project lead: use the sibling apps' plug-in system.** As in PhotoCraft (`docs/plugins.md` there): sandboxed WebAssembly plug-ins run by `wasmi` (pure Rust, MIT OR Apache-2.0, works in the web build), with no host imports, fuel/memory/time limits, `plugin.install/list/run/remove/reload` commands, and one undo step per run. AniCraft's ABI targets vector/timeline work (shape generators, selection transforms, easing presets, exporters) and calls the same command registry. Commands-only scripting (CLI/JSON-lines) stays available. **ActionScript** (asked for by the project lead, low priority) is a compatibility front end on top, not a second engine: ADR 0013. |
| U3 | When does the GPU renderer become primary on stage? | CPU oracle drives the stage until the GPU renderer passes golden parity tests (M3). |
+2 -2
View File
@@ -13,7 +13,7 @@ milestone ends with a green tree: build, tests, clippy, a `--screenshot` check a
| Timeline | **Frame selection**: click, Shift-click or drag across frames and layers; F5/Shift+F5, F6/F7 and Shift+F6 (keys, buttons and right-click menu) act on the whole selection; drag selected keyframes left or right to move them, and up or down onto other layers (the source keeps empty frames, as in Animate) (with a drop outline; one undo step; keys they land on are replaced, and spans fill the frames left behind); removing or clearing selected frames that hold artwork asks first. **Cut/Copy/Paste Frames** (Ctrl+Alt+X/C/V, and plain Ctrl+X/C/V after clicking the timeline): own clipboard, copies cut exactly at the selection edges (mid-tween state kept), paste inserts like Animate, several layers paste onto the layers below (missing ones are created), fresh element ids, symbols travel with them. **Span length by dragging its end** (resize cursor, live outline with the length in frames and seconds; later frames move with it). Headless: `layers`/`count` on the frame commands, `timeline.move_keyframes`, `timeline.cut_frames/copy_frames/paste_frames`. Layers (show/lock/outline), keyframes, blank keyframes, insert/remove frames, classic tweens with 8 easing presets + curve preview, **shape tweens** (morph between any two shapes: segments made cubic, subpaths paired by size and grown from or shrunk to a point when counts differ, segment counts equalized by subdivision, windings matched and start points aligned; amber spans; classic ⇄ shape keeps the easing), auto-key when editing inside a tween, frame labels, symbol nesting: graphics keep step with their timeline (loop, play once, single frame, first frame; set in Properties), movie clips loop their own timeline from when the instance appears (continuous across keyframes holding the same instance), buttons show their Up frame, onion skin (±2 frames), looping playback. **Mask layers**: right-click a layer › Mask turns it into a mask over the layer below (Masked adds more layers to it); masked layers are indented under a stencil icon; the mask applies on the stage and in every export alike, and while the mask layer is unlocked its edge shows in the layer colour so it can be picked and reshaped; masked-away parts cannot be picked; layers moved in under a mask join it, moved out leave it, and a mask moves with its whole group; masks inside symbols nest. Headless: `layer.toggle_mask`, `layer.set_type`. **Scenes** (ADR 0011): the movie is an ordered list of scenes, each its own timeline, edited one at a time (scene menu on the edit bar, Insert › Scene, Modify › Scene, Shift+PageUp/PageDown); add, duplicate (fresh ids), rename, reorder and remove (asks when the scene has artwork; undoable); PNG-sequence and GIF exports play every scene in order. **Layer folders**: nestable folders (depth ≤ 16) holding layers and masks through `Layer.parent`, one invariant (`Timeline::repair_masks`: a child sits below its parent inside the parent's unbroken run; broken links fall back to the nearest valid ancestor); hiding or locking a folder hides or locks its contents (rendering, picking, drawing); folders open and close on the timeline (view state); layers move in and out with Up/Down, a folder moves with its contents; deleting a folder deletes its contents (asks first). No motion editor yet; **motion guides**: guided layers (children of a guide through `Layer.parent`) have their classic tweens follow the guide's first path by arc length, from the point nearest each start keyframe to the point nearest its end (`geom::walk::PathWalk`), optionally orienting to the path; guide artwork is listed for picking and editing, drawn on the stage as a line, and never rendered or exported. |
| Drawing | Selection (click, shift-add, marquee, drag-move, arrow nudge), **Free Transform (Q)**: scale from corner/edge handles (Shift proportional, Alt from centre), rotate outside corners (Shift snaps 15°), move; one undo step per drag. Rectangle (corner radius), oval, PolyStar, line (45° snap), hand, zoom. **Pen (P)**: click for corners, drag for smooth handles (Alt breaks them), close on the first point, Enter/Esc/last-point click finishes, Backspace takes back a point; one undo step per path. **Pencil (Shift+Y)**: Smooth (Schneider curve fitting with corner detection), Straighten and Ink modes, smoothing relative to the screen. **Subselection (A)**: anchors and handles on selected shapes, drag points/handles (anchors bring their handles; one undo step per drag), point marquee, double-click an edge to add a point, Delete removes points, right-click Make Smooth/Corner; closed shapes' start point and closing edge edit like any other. **Cut/Copy/Paste in Center/Paste in Place** (the clipboard carries symbols across documents). **Rotate 90° CW/CCW, Flip H/V. Align** left/centre/right/top/middle/bottom (Ctrl+Alt+1…6; a single element aligns to the stage) and distribute. Convert to symbol / break apart; arrange; duplicate. Headless: `draw.path`, `draw.freehand`, `path.move_points/add_point/delete_points/convert_point`. **Paint Bucket (K)**: click a fill to recolour it, or inside an outline (one shape or several) to fill the enclosed area; gap size None/Small/Medium/Large closes openings; the fill is traced and curve-fitted into a new shape placed under its lines; open areas say so instead of flooding. **Ink Bottle (S)**: gives the clicked shape the current stroke. Headless: `paint.bucket`, `paint.ink`. Tool options show first in Properties while a drawing tool is active. **Text (T)** (ADR 0012): click to type on the stage, click or double-click text to edit it; font (installed families, plus the embedded Inter), size, colour, bold, italic, alignment, letter/line spacing, wrap width; the last style is kept for new text; laid out by `anicraft-text` (`fontdb` discovery, `harfrust` shaping, `skrifa` outlines) and stored as outlines with the source, so rendering never needs the font; Break Apart makes a shape. No brush or merge drawing yet. |
| Headless | CLI: info, render, render-seq, **gif**, commands, exec, run, serve (JSON-lines). **MCP server** (`anicraft-cli mcp`, `docs/mcp.md`): stdio JSON-RPC, protocol 2025-06-18 (and 2025-03-26, 2024-11-05); five tools over the command registry (list, run, run a script, describe the document, render a frame as a PNG picture); confirmation tiers and undo apply as in the app. |
| Files | `.anicraft` JSON load/save (v3, with scenes; v1 and v2 files open as one scene), PNG frame and sequence export, **animated GIF export** (parallel render and quantize, exact frame timing, looping), **SVG frame export** (from the same evaluated frame as the renderer: stage-space paths, renderer-matched stroke widths, gradients under `gradientTransform`, colour effects baked in, masks as nested `clipPath`s). **Opens Animate documents** (`.fla`, `.xfl`, XFL folders; ADR 0009): stage, first scene, layers, keyframes, labels, classic tweens with ease, shapes (solid/linear/radial fills, strokes), groups, primitives, symbol instances (matrix, alpha, tint, loop), library symbols, **shape tweens**, **layer folders** and **mask layers** (masks inside folders too); imported files are untitled so Save never overwrites them; what isn't supported yet is reported after opening. Every scene comes across. **Bitmaps**: library items whose image is in the package as PNG or JPEG (the original in `LIBRARY/`, else the `bin/` data file when it is PNG or JPEG), instances, and bitmap fills with their matrix (twips scale removed; repeating unless clipped); Animate's own bitmap encodings are not public and are reported, not decoded. No text, motion tweens or shape hints from XFL yet; **Import to Stage (Ctrl+R) for SVG drawings**: editable shapes on a new layer at the playhead, with groups, use and symbols, transforms, viewBox, styles, opacity and gradients; unsupported parts are reported. **Sprite sheet export**: movie frames on one PNG grid (parallel render, columns/padding/scale, transparent or stage background) with a "JSON hash" frame map (rectangles, sizes, per-frame durations). **Video export**: WebM (VP9) or MP4 (H.264) by streaming raw frames, in order and rendered in parallel batches, to the user's own ffmpeg (no encoder bundled; ffmpeg from a parameter, `ANICRAFT_FFMPEG` or the PATH; argument lists, never a shell). **Lottie export** (`file.export_lottie`): frame-accurate rather than re-keyed: each frame is evaluated, artwork that persists (same layer, element, occurrence and path structure) becomes one shape layer with outlines baked to stage space, and whatever changes (outlines, colours, gradient points, stroke width, opacity, masks as layer masks) is written as hold keyframes where it changes; one layer order consistent with every frame (topological); checked against the reference web player (matches the renderer). Reported, not exported: bitmap fills, nested masks (innermost kept), group fades (per shape), stretched radial gradients (circles). |
| Files | `.anicraft` JSON load/save (v3, with scenes; v1 and v2 files open as one scene), PNG frame and sequence export, **animated GIF export** (parallel render and quantize, exact frame timing, looping), **SVG frame export** (from the same evaluated frame as the renderer: stage-space paths, renderer-matched stroke widths, gradients under `gradientTransform`, colour effects baked in, masks as nested `clipPath`s). **Opens Animate documents** (`.fla`, `.xfl`, XFL folders; ADR 0009): stage, first scene, layers, keyframes, labels, classic tweens with ease, shapes (solid/linear/radial fills, strokes), groups, primitives, symbol instances (matrix, alpha, tint, loop), library symbols, **shape tweens**, **layer folders** and **mask layers** (masks inside folders too); imported files are untitled so Save never overwrites them; what isn't supported yet is reported after opening. Every scene comes across. **Bitmaps**: library items whose image is in the package as PNG or JPEG (the original in `LIBRARY/`, else the `bin/` data file when it is PNG or JPEG), instances, and bitmap fills with their matrix (twips scale removed; repeating unless clipped); Animate's own bitmap encodings are not public and are reported, not decoded. No text, motion tweens or shape hints from XFL yet; frame scripts are counted in the import report but not kept yet (ADR 0013); **Import to Stage (Ctrl+R) for SVG drawings**: editable shapes on a new layer at the playhead, with groups, use and symbols, transforms, viewBox, styles, opacity and gradients; unsupported parts are reported. **Sprite sheet export**: movie frames on one PNG grid (parallel render, columns/padding/scale, transparent or stage background) with a "JSON hash" frame map (rectangles, sizes, per-frame durations). **Video export**: WebM (VP9) or MP4 (H.264) by streaming raw frames, in order and rendered in parallel batches, to the user's own ffmpeg (no encoder bundled; ffmpeg from a parameter, `ANICRAFT_FFMPEG` or the PATH; argument lists, never a shell). **Lottie export** (`file.export_lottie`): frame-accurate rather than re-keyed: each frame is evaluated, artwork that persists (same layer, element, occurrence and path structure) becomes one shape layer with outlines baked to stage space, and whatever changes (outlines, colours, gradient points, stroke width, opacity, masks as layer masks) is written as hold keyframes where it changes; one layer order consistent with every frame (topological); checked against the reference web player (matches the renderer). Reported, not exported: bitmap fills, nested masks (innermost kept), group fades (per shape), stretched radial gradients (circles). |
| Tests | 133 tests (adds point editing, closed-path anchors, curve fitting, pen/pencil/subselection commands, the Pen's path data, frame ranges, keyframe moves, range confirmations, frame selection and the frame clipboard): unit, analytic render, band/determinism, robustness fuzz over all commands, round trip (v1 and v2 files), structural sharing and history budget, render-service equivalence, confirmations, clipboard, transforms and align, GIF decode and timing, free-transform maths, UI-guideline enforcement, CLI. |
| Ease of use & safety | **Visual language** (ADR 0008, revised): graphite palette, corners by role (square structure, softened controls, rounder menus and dialogs with soft depth), borders only between layout regions, flat buttons with a visible focus ring, vibrant timeline blocks (mint artwork, violet tweens), sentence-case headings, **collapsible sections with rules** (Preferences, Properties, dock, shortcut sheet), **Lucide icons** stroked as vectors via a new full SVG path reader; click targets ≥ 28 px (tools 40, rows 28, toggles 24); palette contrast, target sizes and "no raw colours or radii" are enforced by tests. Product principles written (`docs/product-principles.md`). Tiered destructive-action confirmations, enforced in the engine (ADR 0004). Unsaved-changes guard on close/new/open. Overwrite checks for saves and exports. "Ctrl+Z to undo" hints. Command palette (Ctrl+K). Shortcut sheet (F1). Right-click menus on stage, frames and layers. Save As (Ctrl+Shift+S). **Shortcut editor** (F1): every menu command, tool and view key can be rebound, given extra keys or unbound; recording asks before taking a key from another action, reserved keys (palette, editor, Preferences, quit, play, Esc, Space, Tab) stay fixed, per-action and global reset; only the changes are saved in preferences, so untouched actions follow new defaults; menus, tooltips and the palette show the keys in effect. |
| Platforms & preferences | ADR 0006 platform layer: ⌘ shortcut labels and an AniCraft app menu with a unified title bar on macOS; Exit and Preferences (Ctrl+U) on Windows and Linux; native file dialogs (XDG portal on Linux, with a fallback switch); wgpu with automatic OpenGL fallback; per-OS settings folder. **Preferences** window: interface and data fonts (bundled default or any installed font), interface scale, stage render mode, file dialogs, reset confirmations. Edits render live (fixed the missing-repaint bug). Not yet: native macOS NSMenu, macOS/Linux CI runners. Verified on Windows only so far. |
@@ -30,7 +30,7 @@ milestone ends with a green tree: build, tests, clippy, a `--screenshot` check a
| **M3** | GPU stage | wgpu renderer (sparse-strip coverage, tile binning, gradient ramps in a texture atlas) behind a feature flag; per-pixel parity tests vs the CPU oracle; becomes the default stage renderer once parity ≤ 1/255 mean error; 4K playback at 60 fps for 1,000 shapes. |
| **M4** | Interchange *(in progress)* | **XFL import** (DOMDocument.xml, symbols, edges/fill styles decoded from the public format descriptions) with a corpus of self-authored files: first slice ✅ (see Files above); ~~SVG import (Import to Stage)~~ ✅, ~~SVG frame export~~ ✅; ~~Lottie export~~ ✅ (frame-accurate; easing curves instead of per-frame keys later); ~~sprite sheet + JSON~~ ✅; ~~MP4/WebM via ffmpeg pipe~~ ✅. |
| **M5** | Rich media | ~~Text engine~~ ✅ first slice (ADR 0012: `harfrust` shaping, `skrifa` outlines, line wrapping, mixed directions through the Unicode bidi algorithm, outlines stored with the text; per-character styles, text on a path and input fields later); ~~bitmap import and bitmap fills~~ ✅; audio layers (symphonia + cpal), waveform display, stream sync; ~~filters (blur, drop shadow, glow, colour matrix)~~ ✅ and ~~blend modes~~ ✅ on Movie Clips (bevel and gradient filters later). |
| **M6** | Interactivity & extensibility | **Plug-ins: the Craft-family WebAssembly system** (same host model as PhotoCraft: `wasmi` sandbox, `plugin.*` commands; AniCraft ABI for vector/timeline operations and exporters); frame scripts on the same sandbox; HTML canvas runtime export; button states in test-movie preview; command macros. |
| **M6** | Interactivity & extensibility | **Plug-ins: the Craft-family WebAssembly system** (same host model as PhotoCraft: `wasmi` sandbox, `plugin.*` commands; AniCraft ABI for vector/timeline operations and exporters); frame scripts on the same sandbox; HTML canvas runtime export; button states in test-movie preview; command macros. **ActionScript compatibility, low priority** (ADR 0013), last in M6 and free to slip past M8: tier 1 keeps scripts (XFL frame scripts and class names stored verbatim, Actions panel, `script.*` commands); tier 2 runs the ActionScript 3 timeline subset (stop, play, go to frame or label, named instances, button events) in Test Movie and HTML canvas export through the same action IR as WebAssembly frame scripts. The full language, the `flash.*` API and SWF bytecode are not planned. |
| **M7** | Advanced animation | Bone/IK tool; camera layer with depth; variable-width strokes and brush library; asset warp; graph-based easing presets library. |
| **M8** | Release quality | Installers and signing for Windows/macOS/Linux; web build (wasm) of the editor; localisation; accessibility audit; crash-recovery autosave; documentation book. |