Commit Graph
50 Commits
Author SHA1 Message Date
Tanish Manku b6cfa585c6 chore: merge main (colour effects, ADR 0056) into button sounds; hit-area tint on ColorTransform (M5) 2026-11-11 14:31:13 -07:00
Tanish Manku e60f65e800 feat(html): the page plays sounds on button frames with Web Audio, as Test Movie does (M5) 2026-11-11 14:04:59 -07:00
Tanish Manku 54c27ef0d4 fix(symbol): 9-slice guides switched off are kept and come back when switched on (M5) 2026-11-11 14:00:10 -07:00
Tanish Manku cadfe62913 chore: merge main (9-slice, ActionScript logic, v0.2.0) into colour effects (M2) 2026-11-11 13:55:28 -07:00
Tanish Manku e24a23cd95 chore: merge main (ActionScript logic, v0.2.0) into 9-slice scaling (M2) 2026-11-11 13:43:27 -07:00
Tanish Manku 6c30eb519c test(engine): colour effect commands, tweens, renders, SVG and Lottie; a screenshot state (M2) 2026-11-11 04:56:50 -07:00
Tanish Manku f78ae40e89 feat(doc): colour effect styles as one exact colour transform, rendered, exported and edited everywhere (M2) 2026-11-11 04:50:41 -07:00
Tanish Manku f07a969c15 test: tidy 9-slice tests for clippy (M2) 2026-11-11 04:39:19 -07:00
Tanish Manku 042d8b4daf test(render): the oracle, SVG and Lottie draw 9-sliced instances; HTML reports them (M2) 2026-11-11 04:34:52 -07:00
Tanish Manku 94ad425c71 feat(doc): 9-slice guides on symbols, sliced evaluation and XFL scaleGrid import (M2) 2026-11-11 04:34:14 -07:00
Tanish Manku 9d9377bbf7 docs: ActionScript small logic as ADR 0052 (M6) 2026-11-11 04:33:51 -07:00
Tanish Manku e00b02f7d9 fix(html): seed the page's random numbers from the clock; tidy player.js for the analysers (M6) 2026-11-11 04:33:51 -07:00
Tanish Manku e64a720a8e feat(actions): ActionScript small logic: typed variables, expressions, loops, property reads, enter-frame and key listeners (M6)
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.
2026-11-11 04:33:46 -07:00
Tanish Manku 3b6f59f65b chore: merge main (GPU binning) into Library management (M2) 2026-11-11 00:11:30 -07:00
Tanish Manku 18b07fffe0 feat(render): bitmaps without Allow Smoothing keep hard pixel edges in the oracle, the GPU stage, SVG and HTML (M2) 2026-11-10 23:43:59 -07:00
Tanish Manku 0fbf8c5d0f feat(render): hairlines for outline mode, and integer tile backdrops in the GPU binning (M3)
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.
2026-11-10 20:23:55 -07:00
Tanish Manku f910c67477 perf(render): measure styled strokes (M7)
300 curved strokes, 1280x720, 32 threads, median of 9 (release):
uniform 2.52 ms, taper_both 2.41, bulge 2.63, square+miter 2.18,
dashed 8/4 1.78, dotted 4 1.87, taper_both dashed 2.15.
2026-11-10 18:54:23 -07:00
Tanish Manku fc4d20c24c feat(export): SVG, Lottie and HTML canvas write stroke caps, joins, miter limit and dashes (M7) 2026-11-10 18:48:05 -07:00
Tanish Manku a1482962bc feat(render): stroke caps, joins, miter limit and dashes in the model and the CPU oracle (M7) 2026-11-10 18:41:53 -07:00
Tanish Manku 13620efb8f feat(player): run ActionScript in the subset in Test Movie and the HTML export, with mouse listeners (M6) 2026-11-10 16:34:25 -07:00
FredApps 65233523b4 Report a failed HTML movie start instead of leaving the promise unhandled 2026-11-10 11:15:41 +01:00
Tanish Manku d7c0434a25 chore: merge main (ActionScript tier 1) into sound effects; tests build with Symbol.linkage (M5) 2026-11-10 00:35:46 -07:00
Tanish Manku 4fb0b993fc feat(script): keep frame scripts, linkage and document classes from XFL (M6)
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.
2026-11-10 00:10:27 -07:00
Tanish Manku de38e47aa3 feat(audio): sound effect envelopes, layer volume and mute, sounds inside symbols (M5)
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.
2026-11-10 00:02:17 -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 863e8af60a fix(gpu): tests and bench build with merge drawing's Shape.merge; ADR renumbered to 0032 after merge drawing took 0031 (M3) 2026-11-09 20:45:47 -07:00
Tanish Manku 02c4e1fc13 chore: merge main into the GPU stage third slice (M3) 2026-11-09 20:44:05 -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 0dae2056eb feat(gpu): bitmap fills and filters on the GPU stage (M3)
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.
2026-11-09 19:48:49 -07:00
Tanish Manku d1627efc0c feat(gpu): masks, nested masks, group alpha and blend modes on the GPU stage (M3)
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.
2026-11-09 16:49:09 -07:00
Tanish Manku 0fc73dc9ce feat(render): HTML canvas export with a JS port of the player, tested against it in Boa (M6) 2026-11-09 13:22:19 -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 cce5cb5fff fix(render): cap a filtered group's reach so its buffer fits the renderer (M5)
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.
2026-11-09 05:17:05 -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 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 9173796835 docs: GPU stage ADR is 0019, as assigned by the lead (M3) 2026-11-09 03:44:33 -07:00
Tanish Manku 2f3ab271d9 feat(gpu): wgpu stage renderer over the oracle's fills, with parity tests (M3)
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.
2026-11-09 03:44:28 -07:00
Tanish Manku 7e367c1379 perf(render): measure variable-width stroke cost (M7)
300 curved strokes, 1280x720, 32 threads, release, median of 9:
uniform 2.9-3.2 ms, taper both 2.9-3.2 ms, bulge 3.3-3.4 ms.
2026-11-09 02:02:47 -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 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
Tanish Manku 63b39355ea feat(export): Lottie animation export, frame-accurate (file.export_lottie) 2026-11-06 22:34:03 -07:00
Tanish Manku 9adaf9dd5d perf(render): 1080p back under budget (19.8 -> 15.5 ms): parallel background fill, early edge rejection, deferred frees
Measured with anicraft-cli bench (release, 32 threads), 3 runs each: render_1080p 19.4-20.2 -> 15.3-15.8 ms, render_zoom400 11.6-11.9 -> 9.0-9.3 ms. Output byte-identical.
2026-11-06 22:19:38 -07:00
Tanish Manku 5e15ddd1fb feat(xfl): import bitmaps from Animate documents (PNG/JPEG data), with bitmap fill matrices 2026-11-06 21:45:53 -07:00
Tanish Manku 4a5f9ed549 feat(media): bitmap images: PNG/JPEG import to stage, bitmap fills, stored as PNG 2026-11-06 21:21:31 -07:00
Tanish Manku 71bffd4ed6 feat(render): symbols fade as one: display-list groups composited offscreen per band, SVG <g opacity> 2026-11-06 20:36:59 -07:00
Tanish Manku fa113e182e feat(timeline): motion guides: guided layers follow the guide path by arc length, orient to path, guide artwork never renders; draw.path reads full SVG path data 2026-11-06 20:15:06 -07:00
Tanish Manku 88e1787783 feat(export): SVG frame export (file.export_svg) from the evaluated frame, with gradients, colour effects and masks as clip paths 2026-11-06 00:01:43 -07:00
Tanish Manku e3913afa36 Initial commit v0.1.0 early alpha
AniCraft 0.1.0 (early alpha): milestones M0 and M1. Contributors are credited in AUTHORS.md.
2026-11-05 23:58:25 -07:00