The ActionScript subset compiles to a small typed script IR (statements and
expressions) that the player evaluates with a fuel budget, instead of a flat
action list. Timeline variables live per instance; functions and variables
link across the frames of one timeline; Math.random() is seeded. The HTML
canvas player mirrors the evaluator and the parity tests run both.
Outline mode (an outlined layer, onion skin's outlines) draws hairlines straight from
the flattened path: coverage 1 - the distance to the nearest segment, one edge per
segment where a stroked hairline was four plus a disc at every bend. Exact for axis-
aligned lines, no darkening at overlaps and joins. The GPU stage computes the same.
The binning's per-row float backdrops become one integer per tile plus a piece on the
tile's left edge wherever the outline crosses it (Vello's backdrops and y-edges), which
lets the GPU compute the same lists without float atomics. Parity unchanged.
ADR 0013 tier 1: a keyframe can keep a script verbatim (FrameScript::Source,
text and language) beside actions and plug-in frame scripts; symbols keep a
linkage class and the document a document class, as text. The XFL importer
reads <Actionscript> frame scripts in scenes and symbols, linkage attributes
and the publish profile's language and document class, and reports them as
kept, not run. script.set/clear/list/set_class commands; nothing runs them.
New corpus package 'scripts' with golden renders.
Frame sounds get Animate's Effect presets and Custom envelopes (up to 16
points per channel, seconds from the sound's start), shaped over the time
the sound is heard. Layers get a volume and Mute, multiplied down through
symbols. Graphic symbols play their sounds on their own frames mapped to
the parent's time (streams join mid-way), movie clips on a loop from when
the instance appeared; the interactive player reports entered sounds so
Test Movie plays them, following the audio clock. The mixer applies
per-channel envelopes and start offsets sample-exactly. HTML canvas
export carries envelopes, volumes and graphic sounds. Edit Envelope
window, timeline mute toggle, waveform shaped by the envelope.
Commands read and write files through engine::vfs: std::fs on the desktop, an in-memory
store in the browser that the web shell fills from the file picker and empties into
downloads (ADR 0036). file.open opens .fla bytes through it and gains unsaved?: true for
restored copies. Instant/SystemTime come from web-time; rayon's deferred drops run inline
on wasm; the GPU crate plans layers in turn where wgpu handles aren't Sync; video export
says why it can't run in a browser; system font discovery is native-only.
Part of #42. ADR 0031: raw shapes cut and join on the layer (exact Bezier planar merge), Object Drawing (J), dot-pattern selection, double-click connected, drop on move, screen-pixel nudge.
The oracle now hands filtered groups to other renderers as layers
(prepare_scene: Scene::layers, Fill::layer) and resolves each filter into
the exact steps it runs (filters::resolve); apply runs those same steps.
The GPU stage samples bitmaps from textures uploaded once per image
(bilinear by hand, the oracle's colour effect and repeat rules) and draws
each filtered layer, runs its filters as compute passes and composites it
like any fill. Parity: bitmaps byte-identical, filters max 1/255.
render::prepare_scene hands the oracle's prepared fills with their clips
(artwork, cleaned parents, bounds) and groups (chains, sanitized alpha,
blend) to the GPU. The binning emits per-tile streams with clip-level and
group open/close entries; fine.wgsl keeps a per-pixel group stack and clip
coverage and blends with the oracle's separable W3C formulas. Parity on
the RTX 5090: max 1/255, mean <= 0.0011/255 on every new scene.
Also a texture entry point (main_texture) and GpuRenderer::shared for the
window's device; render_texture draws without readback.
* Box blurs of an even width were half a pixel off centre: now centred (one more
pixel each side at half weight), so bevels stay symmetric.
* Inner effects blur the transparency around the artwork, so every side gets the
full margin (inner Glow and Drop Shadow came out weak near the buffer edge).
* The reach past the surface is capped by area, keeping the padding around the
artwork on wide surfaces (a 4096 px surface clipped shadows to the artwork).
* SVG: filter regions are the stage grown by the reach in user space; ramp tables
have the CPU's 257 samples.
* Ramps: one pinned stop, others step aside (sanitize is idempotent); XFL ramps
use one ratio scale; the panel edits sanitized filters, keeps moved stops between
their neighbours and clear of the pin, and adds a stop from the keyboard.
Model (FilterSide inner/outer/full, ramps with a pinned transparent rest stop),
CPU oracle (signed offset-difference field of the blurred opacity; ramp table),
SVG export with standard primitives, element.set_filters with hex colours and
ramp stops, XFL import of BevelFilter, GradientGlowFilter and
GradientBevelFilter, and Properties > Filters rows with a compact ramp editor.
Per 400x300 buffer, blur 16, quality Medium (release): Glow 0.87 ms, Bevel
1.33 ms, Gradient Glow 1.66 ms, Gradient Bevel 2.42 ms.
A filtered group's buffer allowed 64 M pixels but render() refuses more than
4096 x 4096, so filters reaching far enough (a 1000 px drop shadow, or several
large filters summed) failed the whole frame. The reach past the surface is now
capped so the buffer always fits; anything further is cut well off the surface.
New crate anicraft-gpu (L3): the CPU oracle prepares the fills
(render::plain_fills: flattening, strokes, shaders and gradient tables,
culling), binning sorts edge pieces into 16x16 tiles with per-row
backdrops, and one compute pass computes each pixel's exact area coverage
and composites in display-list order. Masks, groups and bitmaps are
handed back (NeedsFull) for the CPU to draw.
Parity on an RTX 5090 (Vulkan): max 1/255, mean < 0.0001/255 on the
sample and stress scenes; tests skip with a message without an adapter.
Strokes carry an optional width profile (width points: position by arc
length, left/right factors of the nominal width; monotone cubic between
points). The CPU oracle outlines them as positive trapezoids, outer-side
round joins and cross-section caps; SVG and Lottie write the same polygons
as filled outlines. stroke.* commands, a profile picker in Properties and
the tools' options, the Width tool (U) on stage, shape tweens blend
profiles. Also fixes Rect::transformed leaving flat rects untransformed
(horizontal lines missed bounds checks).