From 6c4fd5d6be21ad8f71bb85863e129e239796e64b Mon Sep 17 00:00:00 2001 From: Tanish Manku Date: Mon, 9 Nov 2026 23:48:54 -0700 Subject: [PATCH] docs: ActionScript tier 1 built (ADR 0013), roadmap, changelog (M6) --- ATTRIBUTION.md | 2 +- CHANGELOG.md | 20 ++++++++++++ docs/adr/0009-xfl-import.md | 2 +- docs/adr/0013-actionscript.md | 59 ++++++++++++++++++++++++++++++++++- docs/architecture.md | 2 +- docs/legal/compliance.md | 2 +- docs/roadmap.md | 10 +++--- docs/ui-guidelines.md | 2 +- 8 files changed, 88 insertions(+), 11 deletions(-) diff --git a/ATTRIBUTION.md b/ATTRIBUTION.md index 128c5ea7..568dfebd 100644 --- a/ATTRIBUTION.md +++ b/ATTRIBUTION.md @@ -43,7 +43,7 @@ shaders or SDK code). | File | Use | Author | Source | Licence | |---|---|---|---|---| -| `crates/xfl/tests/corpus/` (11 XFL packages: XML, `.xfl` proxies, `bitmaps/LIBRARY/art/checker.png` and `sunset.jpg`) | XFL import corpus (never shipped in the app) | AniCraft contributors | Original work, written by hand from the public description of the XFL format; the two images made for it (a 16×16 checker drawn in a script, and a 32×16 ramp encoded to JPEG with ffmpeg) | MIT OR Apache-2.0 | +| `crates/xfl/tests/corpus/` (12 XFL packages: XML, `.xfl` proxies, a publish-settings file in `scripts/`, `bitmaps/LIBRARY/art/checker.png` and `sunset.jpg`) | XFL import corpus (never shipped in the app) | AniCraft contributors | Original work, written by hand from the public description of the XFL format; the two images made for it (a 16×16 checker drawn in a script, and a 32×16 ramp encoded to JPEG with ffmpeg) | MIT OR Apache-2.0 | | `crates/xfl/tests/corpus/*/golden/*.png` (20 frames, 160×90) | Golden renders of the corpus | AniCraft contributors | Original work: AniCraft's own CPU renders of the corpus (`UPDATE_GOLDENS=1`) | MIT OR Apache-2.0 | | `crates/audio/tests/data/tone.ogg`, `tone.mp3` | Decoder tests (never shipped in the app) | AniCraft contributors | Generated for these tests: half a second of a 440 Hz sine made by ffmpeg's `sine` source, encoded with libvorbis and libmp3lame | MIT OR Apache-2.0 | diff --git a/CHANGELOG.md b/CHANGELOG.md index a0f94d58..ad824a66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,26 @@ ## Unreleased +* **Scripts in Animate documents are kept** (ADR 0013 tier 1). Opening an `.fla` or XFL + file used to drop its frame scripts. Now they come across as they were written, together + with symbol linkage classes and the document class. Nothing runs them yet. + * The scripts are frame scripts in scenes and in every symbol, in the language the + document's publish settings name (ActionScript 3.0 unless they say otherwise). The + import report lists them as "kept, not run". Scripts on instances, from older documents, + are reported as left out. + * Actions panel (F9): a keyframe's *Type* is Actions, Plug-in or **Script**. The Script view + shows the code in a monospace editor with line numbers, shows its language, and edits it + live. A burst of typing undoes in one step. Keyframes with a script get the same "a" on + the timeline as keyframes with actions. + * Properties shows a symbol's linkage *Class* and the document *Class* in documents that use + scripts. Test Movie says how many kept scripts don't run, and the HTML canvas export + lists them in its report. + * Headless: `script.set`, `script.clear`, `script.list` and `script.set_class`. Plug-ins may + call them too. Saved in `.anicraft` without a format change, so older files open as + before. + * A new XFL corpus package, `scripts`, has frame scripts in a scene and a movie clip, a + linkage class and a document class, checked byte for byte and against golden renders. + * **Motion path points and moving the whole path** (ADR 0038, the second slice of motion paths). With the Subselection tool, double-click a motion path to add a point (the curve and the motion don't change), and Shift-click to select several anchors. Delete removes them: the diff --git a/docs/adr/0009-xfl-import.md b/docs/adr/0009-xfl-import.md index 1ab28451..a98fef37 100644 --- a/docs/adr/0009-xfl-import.md +++ b/docs/adr/0009-xfl-import.md @@ -53,7 +53,7 @@ own timelines, nested to any depth. * Unit tests on inline snippets in `crates/xfl/src/tests.rs`, `text_tests.rs` and `edges.rs` pin single behaviours (edge decoding, fill rebuilding, each mapping). -* **The corpus** (ADR 0035): eleven self-authored XFL packages in `crates/xfl/tests/corpus/` +* **The corpus** (ADR 0035): twelve self-authored XFL packages in `crates/xfl/tests/corpus/` that together use every feature the importer claims. Each has an exact report expectation, structural checks and about 270 hostile variants (cut short, garbled, files missing) that must never panic (`crates/xfl/tests/corpus.rs`), and golden renders of chosen frames by the diff --git a/docs/adr/0013-actionscript.md b/docs/adr/0013-actionscript.md index adefd4f4..97ce71b7 100644 --- a/docs/adr/0013-actionscript.md +++ b/docs/adr/0013-actionscript.md @@ -1,6 +1,7 @@ # ADR 0013: ActionScript compatibility -* Status: accepted (2026-11-08) as scope and placement; the parts are built later (roadmap M6) +* Status: accepted (2026-11-08) as scope and placement. **Tier 1 built** (2026-11-09, see + "Tier 1 as built" below); tier 2 is a later PR (roadmap M6) * Relates to: requirements U2 (scripting surface), roadmap M6, ADR 0009 (XFL import), `docs/legal/compliance.md` @@ -106,3 +107,59 @@ blocking anything else. 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. + +## Tier 1 as built (2026-11-09) + +Tier 1 follows the decision above. Where the build refines it: + +* **Where scripts live.** A kept script is a third variant of the frame-script enum ADR 0024 + put on keyframes: `Keyframe.script: Option` with + `FrameScript::Source(Arc)` beside `Actions` and `Plugin`. `SourceScript` (in + `anicraft-actions`, L0, so the tier-2 parser can read it) holds `language` (`actionscript3`, + `actionscript1or2`, `other`) and `text`, byte for byte. A separate field would have allowed a + keyframe to hold actions *and* a script, and then nobody could say which one runs once tier 2 + lowers scripts to actions. One field keeps "one of them" true by construction. Setting + actions on a keyframe with a script replaces it (undo restores it), as switching between + actions and plug-ins already did. The `Arc` means copying a keyframe, taking an undo + snapshot or handing the document to the render thread never copies the text. +* **Class names.** `Symbol.linkage: Option` and + `Document.document_class: String`, as dotted identifiers (at most 256 characters). An older + document's `linkageIdentifier` is stored as `class`. All of these fields are + `#[serde(default)]` and are left out of the file when empty, so the format stays version 3, + as it did for ADR 0024's fields, and older files open unchanged. +* **Limits and repair.** A script is at most 1 MiB. Loading drops a script that is empty or + too long *whole*, because cutting code would change it, and drops class names that aren't + names. The XFL importer reports dropped scripts the same way. +* **XFL.** `