motion.add_point splits the nearest segment (shape and timing
unchanged), motion.delete_points refits through the rest and keeps the
ends, motion.convert_point makes an anchor smooth or a corner, and
motion.move_path moves the path, its X/Y keys and the object together.
Point edits on a straight motion make its path the tween's own.
motion.info and the path commands list the anchors.
Path::merge_at replaces the two segments around an anchor with the one
cubic that fits them best (Schneider's least squares on handle lengths,
seeded by the de Casteljau ratio, so deleting a split point gives the
curve back). MotionTween::translate moves the path and every X/Y key.
src/web.rs starts the editor on a page canvas with eframe's WebRunner (WebGL2 via glow) and
provides the browser's services; platform.rs decides when: picked files go to the engine's
in-memory store and the command runs, saves and exports leave as downloads, preferences and
recovery copies live in localStorage, Web Locks tell open tabs from crashed ones, and leaving
with unsaved work asks first. The GPU stage and sound output become build cfgs that are off
on wasm. Video export and plug-in installs are dimmed in the browser with the reason.
scripts/build-web.sh and .ps1 build web/ with the wasm-bindgen CLI pinned to Cargo.lock's
version, from packaging/web/index.html. The web profile (opt-level s, stripped, renderer and
geometry at opt-level 3) gives an 8973 KB module, 3278 KB gzipped, in 41 s.
crates/engine/tests/wasm.rs runs the engine inside WebAssembly in Node (3 tests, 0.6 s).
The Eraser sweeps the brush tip with a live preview in the stage colour, [ and ] size it, and a double-click on its tool button (or Erase Everything in its options) clears the stage at this frame after asking. The Eyedropper picks a fill (solid, gradient, bitmap) or a line into the tool style, applies it to selected shapes, then becomes the Paint Bucket or the Ink Bottle; Shift-click picks into the other swatch. New original icons; --open eraser|erasing|eyedropper for screenshots.
20 frames of the corpus rendered by the CPU oracle at 160x90 and compared
with committed PNGs (a pixel differs past 3 per channel; at most 0.2 %
may), plus hand-worked colour probes, and every package opened with
file.open and round-tripped through .anicraft. UPDATE_GOLDENS=1 rewrites
the goldens; a mismatch writes the render and a diff image and names
them. Rendering and comparing all 20 frames takes about 20 ms.
Every feature the importer claims, in hand-written XFL folders (with
original PNG and JPEG images). Each package has an exact report
expectation and targeted structure checks; 2,963 hostile variants (cut
short, garbled, files missing) import without panicking and evaluate,
in 0.15 s. The golden renders are committed with the packages.
A symbol without symbolType is a movie clip (the format leaves defaults
out). Brightness becomes a tint towards white or black; advanced colour
effects keep alpha and are reported. Movie clip and button instance names
that are identifiers are kept for actions (ADR 0024). Frame comments are
no longer labels. A one-segment custom ease is its cubic Bezier. Reverse
loop modes, non-round caps and joins, gradient strokes, repeating,
reflecting, focal-point, elliptical and linear-RGB gradients and extra
tween spins are reported instead of silently changed.
The eraser sweeps the brush tip (ADR 0033) and goes into the planar merge as a fill whose regions come out empty, placed by the mode: on top (Erase Normal), between fills and lines (Erase Fills), over the lines only (Erase Lines), right above the selected fills or the fill the stroke starts on. Only raw shapes are erased; a stroke that erases nothing leaves no step (exact area and length compare). The Eyedropper picks a fill's paint (solid, gradient or bitmap, in stage space) or a line's colour, width and profile into the tool style; the Paint Bucket and the shape tools use a picked gradient where it is on the stage.
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.
With the GPU the default, app-level tests started its start-up thread; on
CI (lavapipe installed) it was still in the Vulkan driver when the test
process exited, which crashed it (SIGSEGV after all tests passed).
The shell's gpu-stage feature is on by default and Preferences > Stage >
Renderer defaults to Graphics card (GPU), with the CPU drawing whenever
there is no usable card, a tile is past the GPU's limits or anything
fails. The setting is stored under a new key: every earlier build wrote
the old one as Cpu without anyone choosing it. CI installs lavapipe so the
parity tests run on a software adapter.
Measured (release, RTX 5090): 4K filtered sample 3.9 ms on Vulkan and
4.2 ms on DX12 (CPU 31.5 ms); 200 bitmap fills 4.4 / 4.3 ms (CPU 37.2 ms).
Docs: ADR 0031, performance, roadmap, architecture, CHANGELOG.
FXC must unroll loops that index vector components and could not unroll
blend's and adjust's, so the GPU stage never started on a DX12 window.
Both are vector code now, with the same arithmetic order. The parity
suite passes on DX12 as on Vulkan. A software adapter (WARP, llvmpipe)
is refused for the stage, since the CPU oracle is faster;
GpuRenderer::software() opens one for tests. The self-test now compares
against the oracle (bitmap and filtered symbol included) and says where
it went wrong. The benchmark gains a filtered sample and 200 bitmaps.
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.
The selected motion tween's path shows in the motion colour on a dark halo,
with a dot per frame. Selection drags the path to bend it and its ends to
move them; Subselection drags anchors and handles (smooth pairs stay in
line, Alt breaks them). Each drag is one undo step. Properties shows the
path (Straighten) and Orient to path. --open motionpath|motionpoints show
it for screenshots and the accessibility audit.
Auto-key on a path tween: moving the object at the first position key
moves the path's start, at the last its end, in between the path bends
until the object lands where it was put; X/Y keys keep the timing.
motion.info reports the path, orient and where the object is. The
every-command fuzz also runs on an oriented motion path.
A motion tween may carry a cubic motion path in the layer's space. The
registration point travels it by arc length (geom::walk::CurveWalk, exact
points and tangents); the X/Y curves give the timing, leg by leg between
position keys, signed so overshooting eases overshoot along the path. A
straight path reproduces the X/Y curves exactly. Splitting a span cuts the
path where the object is. Files without a path open unchanged.
The GPU stage shares eframe's wgpu device (egui_wgpu::RenderState) and
draws each stage tile into a storage texture the shell registers with
egui as it is. Fallbacks: a headless device with readback (window on
OpenGL), then the CPU oracle. Every call runs in thread-local error
scopes; nothing is installed on the window's device; a work bound per
dispatch guards the driver watchdog.
The engine stays GPU-free: Raster::Native carries an opaque image, cached
under its own 384 MB budget; only the shell downcasts it.
perf, gpu_bench on RTX 5090 (Vulkan), 32 threads:
4K, 1,000 shapes: CPU 16.2-19.6 ms, read-back 8.4, direct 2.1-2.4 ms
4K, 10k shapes: CPU 25.8-28.1 ms, read-back 23.2, stage tiles 10.2 ms
4K, masked 10k: CPU 74.8-80.0 ms, stage tiles 10.9 ms
Binning stays on the CPU (ADR 0029: not the bottleneck as stage tiles).
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.