Commit Graph
101 Commits
Author SHA1 Message Date
Tanish Manku 5c4b8594b3 chore: merge main into m3/stroke-coverage 2026-11-18 00:34:53 -07:00
Tanish Manku 28fcfd23c6 fix(render): a stroke's coverage is that of one outline, not of overlapping pieces (M3)
The stroker builds each run of segments as its own outline (inner edges cut where they
cross, through the bend's point where they can't) and unites the loops, so the
renderers' sum of signed areas is the stroke's true coverage: no pixel is darker where
pieces overlapped (it was up to about half a pixel at round joins, caps and the joints
of wide curves). The GPU stage draws the oracle's polygons, so it follows.

Fourteen corpus goldens change, all at stroke edges (lighter; the dark knots at
corners go). Measured, median of 80 renders, before -> after: 2,000 stroked shapes at
1080p 9.3 -> 9.0 ms; the demo 2.5 -> 2.6 ms; 300 self-crossing scribbles at 720p
5.9 -> 6.4 ms; edges handed to the rasterizers down 3 to 4 times.
2026-11-17 23:33:55 -07:00
Tanish Manku c23fa96ccd feat(render): layer opacity in the HTML canvas export, with CPU pixel and GPU parity tests (M1) 2026-11-17 23:32:53 -07:00
Tanish Manku 20ac637cc6 feat(doc): an instance's transformation point in tweens, and layer opacity as a fade group (M1) 2026-11-17 23:32:53 -07:00
Tanish Manku c56bd9b61e fix(render): round joins on gentle bends no longer sweep the long way round when zoomed far in (M1)
Zoomed in on a wide dashed or profiled curve (from about 2000 %), the direction
of a join's gap, the difference of two nearly equal unit vectors, was noisier
than the join's sweep, and the join became a whole disc. The gap's middle is now
only consulted where the path nearly turns back; elsewhere the short way between
the two normals is the outside of the bend. Found while checking Convert Lines
to Fills against the stroker's polygons at 2400 %.
2026-11-17 21:21:28 -07:00
Tanish Manku 76942283c2 chore: merge main into fix/outside-batch-core 2026-11-17 16:26:38 -07:00
Tanish Manku c2472cd639 chore: merge main (styled text, mixed armatures) into filter tracks (M5)
Text keeps its filters next to its styled runs. In HTML export, static text in several colours
with filters is one item of pieces (pp), so the pieces share one filtered group as evaluate
draws them; the page's player draws such items piece by piece.
2026-11-17 14:55:39 -07:00
Tanish Manku 51aa436189 Merge outside PR #380: fix(actions): preserve negative zero in Math.round (M6) 2026-11-17 13:32:06 -07:00
Tanish Manku 471049a06c chore: merge main (saved commands, shared crates) into styled text (M5)
The Save As Command and Manage Saved Commands windows open through windows::new, so they stay
below the menu bar like every other floating window.
2026-11-17 13:27:01 -07:00
Dylan M. Taylor 13b34f4095 perf(lottie): flatten mapped stops without intermediate vectors 2026-11-16 23:26:52 -05:00
Dylan M. Taylor 3b42d31964 refactor(lottie): share raw gradient wire assembly before fitting 2026-11-16 23:24:43 -05:00
Dylan M. Taylor 5d63a34aa6 refactor(lottie): share Bezier serialization and preserve stage alpha (#400) 2026-11-16 21:56:32 -05:00
Tanish Manku 2f6e9cc46b feat(export): filters on text in the HTML page and from XFL, with GPU parity (M5)
* The page's player draws text with filters in a filtered group of its own,
  as evaluate does (fx/fm on static text and fields); typed text in an input
  field is the browser's and is reported.
* XFL: a text field's <filters> come in on the text instead of being
  reported as skipped.
* GPU parity on filtered text: max 1/255, mean 0.003-0.005 (RTX 5090, Vulkan).
2026-11-16 19:17:17 -07:00
Tanish Manku 6501af0585 feat(filters): colour and stepped filter tracks, list pairing, built-in presets, filters on text (M5)
Model and commands (ADR 0099):
* FilterParam gains a colour's channels (color, shadow_color, highlight_color,
  stop_<n>; red, green, blue 0-255, alpha in percent, as the tint) and the
  stepped quality, inner, knockout and hide_object, whose keys hold.
* Classic tweens of lists that differ pair the kinds they share in order;
  a filter without a partner fades to or from itself doing nothing.
* TextBlock carries a filter list; evaluate draws text with filters in a
  filtered group, as a movie clip.
* filter.* commands and element.set_filters act on text; motion.set_key
  keys a whole colour; eight built-in presets that can only be hidden
  (filter.preset_hide).
2026-11-16 19:17:17 -07:00
Tanish Manku b4ee8a83d0 feat(render): text colour pieces in the HTML page and links in SVG export (M5) 2026-11-16 18:26:39 -07:00
Tanish Manku 5da16a0fab feat(doc): styled runs, paragraph styles and colour fills on text blocks (M5) 2026-11-16 18:26:38 -07:00
Mex 237fa09126 Refactor trace statements and update expected output
Exercise Math.max/min ties between rounded negative zero and positive zero in both argument orders. Require reciprocal traces Infinity Infinity -Infinity -Infinity through the existing Rust/exported-JavaScript comparison fixture. Not run locally because Rust is unavailable; required hosted workflows await maintainer approval.
2026-11-16 21:21:19 +01:00
Mex 3d595499c2 fix(render): mirror signed-zero min/max ties in HTML (M6)
Keep the HTML player aligned with the Rust evaluator: zero-sign ties select +0 for max and -0 for min in any argument order. Exact helper comparison against native Math.min/max and Object.is passed 1,644 cases; the previous helper mismatched 28. Added integration trace coverage follows in the same PR.
2026-11-16 21:21:06 +01:00
Dylan M. Taylor b566745647 Reuse shared HTML escaping while preserving control policies 2026-11-15 15:09:45 -05:00
Mex 2ce43c9ba8 test(render): cover signed-zero round traces in exports (M6)
Keep Rust and exported HTML reciprocal traces aligned for negative fractions that round to zero.
2026-11-15 20:28:12 +01:00
Mex f0ecb72dbe fix(actions): preserve negative zero in Math.round (M6)
Preserve the sign of negative fractions rounded to zero in the exported HTML player.
2026-11-15 20:25:24 +01:00
Dylan M. Taylor 30aa4374d0 chore: cut over audio, xml, xfl, zip, and raster codecs to craft-libs (#339) 2026-11-14 08:00:38 -05:00
Tanish Manku f7d90f361c feat(engine): filters switch on and off, reorder, copy and paste, and filter presets (M5)
A filter list entry carries an enabled switch (FilterEntry, flattened into the filter's
own object, so older files open unchanged); evaluate and the HTML export leave switched-off
filters out, so every renderer and export draws them as absent. New filter.* commands:
move, enable, remove, copy, paste, and presets (list, save, apply, rename, delete, export,
import) kept in the session like brushes. XFL import keeps disabled filters, switched off.
Classic tweens pair lists that include switched-off filters.
2026-11-13 19:28:15 -07:00
Tanish Manku d97d2bf336 fix(render): report frame-by-frame position only for the keying written (M4) 2026-11-13 17:57:17 -07:00
Tanish Manku b9258b7b27 feat(render): Lottie export with keyframes and Bézier eases (M4)
Animated values are written as Lottie keyframes instead of a hold key per
frame: holds where a value stays, eased keys where an ease of the document
(linear, Classic, Bezier, custom curves, Quad/Cubic/Back/Bounce) draws it,
one key per cubic piece, each span checked at every frame. Artwork that
moves keeps its outline in its own space under an animated group transform
(position, rotation, skew, scale); a track continues across keyframes that
hold their own copy of the object. LottieKeys::Frames keeps the old keying.
2026-11-13 17:50:22 -07:00
Tanish Manku 2423b42533 chore: merge main into m7/bones-spring 2026-11-13 02:22:03 -07:00
Tanish Manku c92093d626 chore: merge main (camera depth, drawing leftovers, Asset Warp) into ease presets (M7) 2026-11-13 00:56:53 -07:00
Tanish Manku 5136eef95b feat(doc): joint translation and bone springs in the armature model (M7) 2026-11-13 00:53:41 -07:00
Tanish Manku c9fdd00fb3 chore: merge main (drawing leftovers, Asset Warp) into camera depth (M7) 2026-11-13 00:26:19 -07:00
Tanish Manku 90d4d9107e feat(tweens): ease presets, custom multi-segment eases and saved eases (M7)
- doc: Classic Ease and nine families (Quad, Cubic, Quart, Quint, Sine, Back,
  Circ, Bounce, Elastic) In/Out/InOut as pure functions of t; CustomEase of
  up to 64 Bezier points, always valid (x monotonic, ends pinned, values
  bounded), with exact split, move, handle, smooth/corner and delete edits;
  saved eases in the document; classic tweens ease position, rotation,
  scale, colour and filters separately; instance filters now tween.
- engine: ease.* commands (info, set, add/move/delete/convert point, move
  handle, separate, save, delete, rename, list, copy, paste); saved eases and
  custom curves in timeline.set_easing and motion.set_ease; plug-in policy.
- xfl: multi-segment and per-property custom eases import exactly; corpus
  gains a per-property layer, goldens and probes updated.
- shell: ease menu with curve thumbnails and saved eases in the timeline,
  Properties and Motion Editor; Custom Ease window (graph, keyboard, typed
  values, save, copy/paste, property groups).
- tests: preset values, fits, monotonic x after random edits, hostile
  curves, fuzz, file round trip, HTML runtime parity, Lottie bake.
2026-11-12 21:06:55 -07:00
Tanish Manku 617c8c6963 feat(camera): layer depth over time in perspective, attaching layers, camera colour effects and editing through the camera (M7) 2026-11-12 20:50:47 -07:00
Tanish Manku 305df586cc docs: ADR 0079 Asset Warp, guide, roadmap, changelog and attribution (M7) 2026-11-12 19:52:46 -07:00
Tanish Manku 1847182a2c feat(render): SVG bakes warped bitmaps as images; HTML reports them (M7) 2026-11-12 19:52:31 -07:00
Tanish Manku 7a89c79d4b feat(render): warped bitmaps drawn through their mesh in the oracle, GPU parity (M7) 2026-11-12 19:52:31 -07:00
Tanish Manku a9e48b1184 feat(doc): warp meshes on shapes and bitmaps, bent by pins (rigid MLS), pins tween (M7) 2026-11-12 19:52:31 -07:00
Tanish Manku 6816f99246 chore: merge main (groups and Combine Objects) into the gradient tools (M1) 2026-11-12 17:50:49 -07:00
Tanish Manku b9c70998c1 Merge remote-tracking branch 'origin/main' into m1/groups-combine
# Conflicts:
#	CHANGELOG.md
#	crates/engine/src/cmds_draw.rs
#	docs/guide/drawing.md
#	docs/guide/reference/commands.md
#	docs/roadmap.md
#	src/main.rs
#	src/stage.rs
2026-11-12 17:14:47 -07:00
Tanish Manku b9b397d878 fix(engine): a gradient drag keeps a raw fill's id; tests for the colour panel, tool and exporters (M1)
paint.transform_fill no longer re-merges a raw fill: re-merging gave the shape
a new id after the first step of a drag, so the Gradient Transform tool lost
it in the editor's default (merge) drawing mode. The stop bar's edits are pure
functions now (add, move, remove, widest gap), tested; the tool's drags run
through real frames for linear, radial and bitmap fills; HTML canvas and SVG
export of spread, focal point, ellipse and linear RGB are checked.
2026-11-12 14:53:13 -07:00
Tanish Manku 48c886e31b test(render): HTML filter tests build gradients with Paint::linear (M1) 2026-11-12 14:25:05 -07:00
Tanish Manku 00b2cba610 feat(render): gradient spread, focal point, ellipses and linear RGB (M1)
Paint::Linear and Paint::Radial gain optional spread (extend/reflect/repeat)
and linear_rgb; radial gradients gain a focal point and a matrix (any
ellipse). All default and are skipped when unset, so older files and plain
gradients are stored as before. The CPU oracle, the GPU stage (and its
emulator), SVG and HTML export, and SVG and XFL import handle them exactly;
Lottie reports what it can't show. Fill frames (Paint::frame/with_frame/
fitted) are the basis of the Gradient Transform tool.
2026-11-12 14:21:34 -07:00
Tanish Manku f2efea8191 feat(doc): groups (Modify › Group, Ungroup), edited in place, and Combine Objects (M1)
A group element kind holding its members as a one-layer, one-frame timeline
(serde default; older files unchanged), evaluated like an instance on its
layer; every walker (Library uses, sounds, player, HTML export, explorer,
clipboard, Library deletion) sees inside groups. symbol.edit opens a group in
place; the editing stack levels are symbols or groups. modify.group (Ctrl+G),
modify.ungroup (Ctrl+Shift+G), Break Apart on groups, and modify.combine
(Union, Intersect, Punch, Crop) on the planar map. Reserves ADR 0073.

Refs #206, #229
2026-11-12 13:53:34 -07:00
Tanish Manku 4f58bc9633 test(render): a type for the filter parity helper's result (M6) 2026-11-12 13:03:17 -07:00
Tanish Manku 329d97e39e chore: merge main (soft masks and text on a path, shape armatures) into HTML filters (M6)
canvas.js combines both: soft-mask artwork draws on the mask's layer, which
has the place and size of the layer it masks (so inside a filtered group it
reaches past the canvas too); the filtering trail records mask modes. New
parity test: filters under and inside alpha and luminance masks against the
oracle's frame (largest difference 4e-7).
2026-11-12 12:58:14 -07:00
Tanish Manku 9c509bbfa6 fix(render): the page carries filters.js, between the player and the page code (M6)
Found in a headless Chrome check of an exported page: the page script lacked
filters.js, so a movie with filters didn't start. The page test now checks
that the script holds all three sources in order.
2026-11-12 00:58:56 -07:00
Tanish Manku df1cf52cd9 feat(render): filters, Subtract and Invert in HTML canvas export (M6)
The page runs every filter as the CPU renderer does: filters.js ports
filters.rs (box-blur passes, shadow, glow, bevel, gradient ramps, colour
matrices, knockout, inner, hide object) over a layer that reaches past the
canvas by the filters' reach, cut to the artwork plus that reach. Subtract
and Invert are composited per pixel with the renderer's formula. Filtered
groups are kept by what was drawn in them, so an unchanged group is
filtered once.

Parity in Boa against the oracle's own layers: 35 filter cases (every kind,
side, knockout and switch, and stacks) at view scales 1, 1.5 and 2, largest
difference 9.3e-4; box widths and offsets equal over 4160 resolutions.

node 24, 1080p: the demo's two filtered groups 3.4 ms a frame when both
change (0 when cached); a full-frame 1920x1080 glow 51 ms, drop shadow and
bevel 92 ms, blur 20 quality 3 146 ms; Subtract over 1080p 6 ms.
2026-11-12 00:56:34 -07:00
Tanish Manku bdb7515e3c feat(engine): text on a path: attach to a shape, move along, flip, release; edits keep it on its path (M4) 2026-11-12 00:53:53 -07:00
Tanish Manku 02842502f7 feat(render): soft masks in the HTML canvas export (M4) 2026-11-12 00:53:52 -07:00
Tanish Manku 27b919f380 feat(render): soft masks in SVG export (mask with mask-type) and Lottie (alpha and luma track mattes) (M4) 2026-11-12 00:53:52 -07:00
Tanish Manku 8cc0384bc1 feat(render): soft masks: mask layers reveal by their artwork's opacity or luminance (M4) 2026-11-12 00:53:52 -07:00
Tanish Manku a578dc510e feat(html): text fields in the HTML canvas export, with native inputs and player parity (M5) 2026-11-11 19:40:51 -07:00