Commit Graph
65 Commits
Author SHA1 Message Date
Tanish Manku 34fe4603e7 feat(engine): add, delete and convert motion path points, move the whole path (M2)
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.
2026-11-09 23:37:16 -07:00
Tanish Manku a87728ba50 chore: merge main (eraser, eyedropper, XFL corpus) into the web build (M8) 2026-11-09 23:15:49 -07:00
Tanish Manku 2cf35d83d8 chore: merge main (eraser, eyedropper) into the XFL corpus (M4) 2026-11-09 23:02:33 -07:00
Tanish Manku 7dcd01041e feat(shell): web build of the editor: browser entry, file picker and downloads, autosave to browser storage (M8)
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).
2026-11-09 22:36:09 -07:00
Tanish Manku 256ab42370 fix(engine): golden helper walks pixels with as_chunks for the newer clippy (M4) 2026-11-09 22:31:29 -07:00
Tanish Manku e4de73b5ce test(engine): golden renders of the XFL corpus with a reusable golden-image helper (M4)
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.
2026-11-09 22:17:53 -07:00
Tanish Manku 86f76dbc82 feat(engine): draw.erase with Animate's erase modes, the faucet and Erase Everything; paint.pick and paint.apply_style (M7)
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.
2026-11-09 22:13:26 -07:00
Tanish Manku 06c004b294 feat(engine): engine crates build and run on wasm32: vfs file layer, web clocks, single-threaded fallbacks (M8)
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.
2026-11-09 22:12:56 -07:00
Tanish Manku 478c70feb8 feat(shell): Brush tool (B) with tool options, pen pressure, live preview and [ ] sizes (M7) 2026-11-09 21:20:59 -07:00
Tanish Manku 4a5522c4c1 feat(engine): draw.brush paints filled strokes with Paint Normal, Fills and Behind (M7) 2026-11-09 21:12:12 -07:00
BFlat e8bbc45dab Merge drawing, first slice: raw shapes cut and join as in Animate (#92)
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.
2026-11-10 10:08:36 +07:00
Tanish Manku bccb5e4df7 chore: merge main (GPU stage, second slice) into motion paths (M2) 2026-11-09 17:50:15 -07:00
Tanish Manku aa6b0a5565 feat(engine): motion.set_path, motion.clear_path, motion.orient; moving the object reshapes its path (M2)
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.
2026-11-09 17:06:25 -07:00
Tanish Manku 5cc790a379 feat(doc): motion paths for motion tweens, by arc length, with orient to path (M2)
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.
2026-11-09 17:01:25 -07:00
Tanish Manku eb85dd2411 feat(gpu): GPU stage draws into the window's textures, no readback; ADR 0029 (M3)
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).
2026-11-09 16:58:49 -07:00
Tanish Manku a7b3b0f2fa feat(engine): file.export_html, File > Export > Export HTML Canvas; ADR 0028, docs (M6) 2026-11-09 13:22:19 -07:00
Tanish Manku 5b431ec1d3 feat(app): Camera tool, camera frame on the stage, Preview Through Camera and the camera toggle (M7)
The stage draws the camera frame in the camera layer's colour; the Camera tool
(C) pans, turns (round handle) and zooms (wheel), one undo step per drag;
View > Preview Through Camera renders stage tiles through the camera; the
timeline header toggles the camera; Properties gets a Camera section and a
layer Depth row. GPU parity and the accessibility audit cover camera scenes.
2026-11-09 12:50:31 -07:00
Tanish Manku cc4773a3ea feat(doc): camera layer, layer depth and camera commands (M7)
A camera layer kind (at most one per scene, always on top) whose keyframes hold
the camera as an element, so it tweens with classic and motion tweens. The
movie (evaluate, the player, every export) is the stage seen through it; the
editing view stays in stage space. Layer depth gives parallax. Commands:
camera.add/remove/set/info and layer.set_depth (ADR 0027).
2026-11-09 12:40:55 -07:00
Tanish Manku 996d7220a8 chore: merge main (frame scripts, Test Movie) into bevel and gradient filters (M5) 2026-11-09 05:39:38 -07:00
Tanish Manku f18e4c9d4b feat(engine): frame actions, frame scripts on the plug-in host and Test Movie (M6)
Commands: actions.set/clear/list, instance.set_name, control.test_movie
(Ctrl+Enter; headless it plays the movie and reports its output), and
file.new_sample {which: interactive}. Frame-script plug-ins (kind
frame-script, entry points) run on enter-frame with Limits::frame_script:
20 M instructions shared per frame, 100 ms, ops player/action/actions/log,
no commands; plugin.run refuses them.

App: Test Movie window (player at the document frame rate, pointer to
buttons, Output panel, restart/pause/step, snapshot of the document),
Actions panel (F9) with structured action lists for keyframes, movie clip
timelines and button/movie clip events, instance name and events in
Properties, an 'a' mark on keyframes with actions.
2026-11-09 05:18:45 -07:00
Tanish Manku 9c7f65d305 feat(doc): timeline action IR and a pure interactive player (M6)
anicraft-actions (L0): typed actions (stop, play, go to a frame or label in
a scene, next/previous frame and scene, trace, set property), instance-name
target paths, button events, plug-in frame-script references.

anicraft-doc: keyframes carry a FrameScript, symbol instances carry event
handlers (serde defaults, sanitized on load). player::{start, step} steps a
PlayerState (scene, playheads, script-set properties, pointer) with budgets;
evaluate_player draws it; evaluate stays pure and unchanged.
2026-11-09 05:18:14 -07:00
Tanish Manku e3549b9bda fix(filters): review: centred even blurs, inner margins, area-capped reach, SVG region and ramp tables, stable ramp editing (M5)
* 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.
2026-11-09 05:17:39 -07:00
Tanish Manku d28f0446a5 feat(filters): Bevel, Gradient Glow and Gradient Bevel filters (M5)
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.
2026-11-09 05:17:20 -07:00
Tanish Manku 416ce65af8 feat(engine): tween.add_hint, move_hint, remove_hint, clear_hints and hints commands (M2) 2026-11-09 04:42:22 -07:00
Tanish Manku d85e398c4a chore: merge main (GPU stage, SVG clips) into variable-width strokes; GPU parity covers width profiles (M7) 2026-11-09 04:17:57 -07:00
Tanish Manku 3c79f97701 chore: merge main (SVG clips and text) into the GPU stage (M3) 2026-11-09 04:07:01 -07:00
Tanish Manku 6b8e3cb26f chore: merge main (audio, plug-ins, motion tweens) into variable-width strokes; ADR renumbered to 0018; plug-ins may edit stroke widths (M7) 2026-11-09 04:00:33 -07:00
Tanish Manku 244e21527b chore: merge main (audio, plug-ins, motion tweens) into the GPU stage (M3) 2026-11-09 03:58:26 -07:00
Tanish Manku 7e7d3a29d0 chore: merge main (audio, plug-ins, motion tweens) into SVG clips and text; fix an ADR reference (M4) 2026-11-09 03:57:17 -07:00
Tanish Manku de6cd9b164 chore: rebase on main (motion tweens, plug-ins); plug-ins may edit library sounds; licence inventory regenerated (M5) 2026-11-09 03:46:44 -07:00
Tanish Manku 9173796835 docs: GPU stage ADR is 0019, as assigned by the lead (M3) 2026-11-09 03:44:33 -07:00
Tanish Manku 640186669e feat(shell): gpu-stage feature with a Preferences renderer switch and status (M3)
Preferences > Stage > Renderer (and View > Stage Rendering) choose CPU
(reference) or GPU (preview) in builds with --features gpu-stage. The
renderer starts off the UI thread; the status bar says who drew the
visible tiles and why the CPU stepped in. ANICRAFT_STAGE_RENDERER
overrides the preference (also for --screenshot).
2026-11-09 03:44:28 -07:00
Tanish Manku 5a38209b8a feat(engine): pluggable rasterizer in the render service, CPU fallback per job (M3) 2026-11-09 03:44:28 -07:00
Tanish Manku b5f3b5463e docs: audio decision record is ADR 0020, as assigned by the lead (M5) 2026-11-09 03:43:36 -07:00
Tanish Manku cf7e39c251 docs: audio decision record renumbered to ADR 0015 after the XFL text ADR took 0014 (M5) 2026-11-09 03:43:35 -07:00
Tanish Manku 30c121d269 feat(audio): sounds in the library and on keyframes, mixed to WAV and into video export (M5)
New L0 crate anicraft-audio: WAV reader/writer, Ogg Vorbis (lewton) and MP3
(nanomp3) decoding with hard size caps and a panic guard, a pure stereo
mixer (sample-exact at equal rates, Catmull-Rom resampling otherwise),
waveform peaks and a device-independent Player.

Document: Sound library items (the imported bytes, decoded once), a
FrameSound on keyframes (Event/Start/Stop/Stream, repeat, loop), and
sound::voices(), the pure layout of the movie's sounds in time.

Commands: file.import_to_library, Import to Stage for sounds, sound.place/
set/remove/delete/rename, file.export_audio, and the soundtrack in
file.export_video (Opus in WebM, AAC in MP4, by the user's ffmpeg).
2026-11-09 03:42:55 -07:00
Tanish Manku d868758ee2 feat(engine): Import to Stage makes a folder with mask layers for clipped drawings (M4) 2026-11-09 03:34:13 -07:00
Tanish Manku c37bd08afc fix(plugins): plug-ins may call motion tween commands, like other document edits (M6) 2026-11-09 03:33:27 -07:00
Tanish Manku ef624e3761 chore: rebase on main (autosave); plug-ins ADR renumbered to 0017 (M6) 2026-11-09 03:32:06 -07:00
Tanish Manku f10746bc48 feat(plugins): Commands menu with Plug-ins, generated dialog with live preview, Plug-ins window, palette entries (M6) 2026-11-09 03:31:51 -07:00
Tanish Manku b765aa12ec feat(engine): plugin.install/list/run/remove/reload over the command registry, one undo step per run (M6) 2026-11-09 03:31:44 -07:00
Tanish Manku 60712c0b08 chore: rebase on main (autosave, app icon); motion tweens ADR renumbered to 0016 (M2) 2026-11-09 03:25:12 -07:00
Tanish Manku 28a1b1f6ab feat(doc): motion tween spans with property curves, auto-key and motion.* commands (M2)
Keyframe.motion holds a motion tween: one target object, a track of property
keys per property (x, y, scale, rotation, skew, alpha, tint) with a per-segment
ease (any Easing, including a custom cubic Bezier). evaluate stays pure.
Commands: timeline.create_motion_tween, motion.set_key/remove_key/set_ease/info.
Edits made inside a motion span become property keys (auto-key) for every
command, via the session; F6 keys every property; splits keep the motion.
2026-11-09 03:23:05 -07:00
Tanish Manku 83c542b11a docs: renumber the autosave ADR to 0015 after the XFL text ADR took 0014 (M8) 2026-11-09 02:19:42 -07:00
Tanish Manku ade67dcc9a feat(app): background autosave with Restore / Discard / Later on start (M8)
The shell schedules recovery copies (every minute or 25 changes, set in
Preferences > Files > Autosave, with an off switch) on the engine's
Autosaver, waking itself when the interval runs out; the recovery folder
comes from platform::recovery_dir. A non-blocking window offers work left
by crashed sessions; File > Recover Autosaved Documents brings it back.
Clean exits and saves remove the copy. Preferences scroll when taller
than the window. bench measures one autosave.
2026-11-09 02:19:34 -07:00
Tanish Manku 31eebedc3a feat(engine): crash-recovery copies, session locks and a background autosaver (M8)
recovery.rs: atomic recovery copies (temp + fsync + rename) under validated
session ids, an OS file lock per running session so only copies left by
sessions that ended without a clean exit are offered, and an Autosaver
thread that serializes Arc snapshots off the caller's thread, coalescing to
the newest job. Commands: file.recovery_list, file.recover (unsaved, with the
original path unless that file is newer), file.discard_recovery (always
confirms), file.autosave.
2026-11-09 02:19:28 -07:00
Tanish Manku 74a7bbe73a feat(render): variable-width strokes with width profiles and a Width tool (M7)
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).
2026-11-09 02:02:05 -07:00
Tanish Manku 95131360bd feat(xfl): import text fields as text blocks, report missing fonts (M4) 2026-11-09 01:51:06 -07:00
Tanish Manku efcb969c3a feat(render): filters on movie clip and button instances (drop shadow, blur, glow, adjust color) 2026-11-06 23:24:27 -07:00
Tanish Manku 2914644f37 feat(render): blend modes on movie clip and button instances 2026-11-06 23:07:53 -07:00