* Keep a removed layer's offset on the layer replacing it
* Move a layer's chain and stack when dragging with Ctrl
* Follow the wire's route with its center line
* Only write a node's layer flag when it changes
* Place chains and stacks by relative offsets instead of their own placements
* Lay out the editor's node graph with the graph-layout crate
* Store chains and stacks as relative positions and migrate documents to them
* Trim comments
* Convert read nodes to relative positions in the format step
* Re-save the demo artwork with relative positions
* Append the position conversion to history as one interaction
* Address review comments on the position migration
* Format let chains as CI's rustfmt does
* Keep the dragged node's owners in place when a drag starts
* Keep absolute positions in documents with pending edits
* Rename 'Math f(x)' and 'Math f(…)' to 'Math Function' and 'Math Formula'
* Move the lone operator mode of 'Math Formula' into a new 'Math Aggregate' node
* New node: 'Math Running'
* Switch rendering from Vello's classic compute renderer to Vello GPU
* Render the web build with WebGL2 rather than WebGPU
* Expand each shared geometry's strokes once and skip vector items outside the rendered area
* Create the WebGL2 viewport canvas in the canvas utilities instead of storing it on the wgpu context
* Restrict the raw wgpu surface accessor to wasm
---------
Co-authored-by: Dennis Kobert <[email protected]>
* Snap the shape gizmos' angles, radii, and turns through the snapping session as one-value gestures
* Fix gizmo snapping on stretched shapes and keep trimmed arcs and spirals in place
* Land arrow-key nudges on the next grid line when grid snapping is on
* Give the grid its own visibility switch, subdivisions, an angle, and an origin that can follow the active artboard
* Regroup the snapping options into two columns of points, curves, alignment, spacing, grid, and angles, with an angle step every tool shares
* Lay out the Overlays popover in two columns, with the Select tool's choices beside the general and Pen and Path tools' ones
* Transfer hover between floating menus when the pointer is over a spawner's icon
* Keep artboard nudges level without grid snapping, and show the grid in documents that snapped to it
* Add stretching, turning, and skewing motions to the snapping library, with finders for even spacing and equal sizes
* Rank snaps by how far the pointer must travel to them, preferring the pointer's own feature among equals
* Center overlay text on its anchor for a vertical Middle pivot, as the native overlays already do
* Let the snapping session move and stretch boxes: a grip to hold them by, even spacing, equal sizes, and the boxes beside them awake unasked
* Move the Select tool's layer dragging onto the snapping session
* Draw evened-out gaps beside the box where it lands after another snap carries it across
* Record in the document metadata the view each render was made with and a generation that changes whenever its layer data does
* Add a snapping session shared by the tools, which mirrors the document into the snapping library's scene
* Draw overlays in the order their providers were added, so the snapping overlay drawn last stays on top
* Move the Line and Arrow shapes' snapping onto the snapping session
* Stop auto-panning once a Shape tool drag has ended outside the viewport
* Wake snapping targets by resting the pointer on them, so they offer alignment, extensions, and tangents from afar
* Fix snapping session review findings in options, crossings, labels, and handoffs
* Add a snapping library crate with its curve, track, and view geometry
* Add a spatial index of the scene's snappable geometry to the snapping library
* Add the snapping library's solver, which ranks spots, tracks, and their crossings with hysteresis and lands on the grid
* Add the snapping library's candidate finders, awake-target constructions, and gesture entry points
* Stop held crossings from jumping elsewhere and harden snapping library edge cases
* Update glam
* More work to avoid panics
* Clean up with new FallibleVec2Operations extension trait
* Fix compile error
* Fix typo
* Fix Nix compiling rust-gpu (#4621)
* Add a warning icon to Math node expressions with errors as tooltips
* Point at a parse error with carets under a repeat of the expression, as a compiler does
* Render fenced code blocks in tooltips and put the parse error snippet in one
* Quote tokens as code in chumsky's parse messages and in custom parser errors
* Report the parse error past an operator rather than the operator itself
* Add matrices to the math expression parser as a second sort beside values
* Add Transform input and output to the Math f(x) node
* Add ranges and boxes to the math expression parser with inside, clamp, and remap over them
* Add Transform lists to the Math f(…) node with reducers composing, averaging, and counting them
* Lex a number's trailing e as Euler's number unless an exponent's digits follow it
* Fix matrix inversion scaling, exact matrix powers, infinite shears, matrix means, kept axes, and the Transform default
* Make shared box parts flat, give composed regions their inner map's axes, and fix lone logic items, spaced ranges, and the Math f(…) tooltip
* Transpose across spaces, name fractional matrix powers, check matrix builtin arities when parsing, read range literals by their corners, and let host functions shadow matrix builtins
* Make inside and clamp hold a region's uncovered parts at zero, so a box contains only the points between its corners
* Require hosts to declare the functions they provide, name the region functions' syntax node after its builtin, and remap onto ranges with equal infinite corners
* Apply a matrix to the whole product after it, so M 2 v is M (2 v)
* Pin prefix NOT's precedence above products, comparisons, and AND with tests
* Rename inside to within, since a range's ends count and the geometry predicates with a point first use that name
* Keep a range's corners as written, so clamp orders an integer past the reals' limit exactly
* Give within a tolerance of a billionth of the region's scale, so a point a float error off an edge or a flat side counts
* Write a unit part as its basis alone, so the identity displays as [1;i;j;k]
* Add tests for product folds, mixed chains, remap, and rejected inputs
* Evaluate matrix operands, builder arguments, regions, and comparison chains on the stack instead of the heap
* Build the expression parsers once per thread, since building the combinator tree cost as much as parsing a short expression
* Compare a chain reducer's items by their order directly, and reject an item with no order rather than reading it as false
* Send a host-built list of builder arguments or regions past the stack buffers to the heap instead of rejecting it
* Fix the math expression parser giving a valid direction between multiple infinite vector parts
* Replace the math expression parser's if() with piecewise cases like {a if x > 0, b otherwise}
* Fix the math expression parser's error spans starting before whitespace and infinities displaying as inf
* Extend the math expression parser's value ladder past complex numbers to quaternions
* Add a vector function family (dot, cross, rotate, slerp, and more) to the math expression parser
* Let hosts read a math expression result as a 1D to 3D vector or weighted particle
* Let the 'Math f(x)' and 'Math f(…)' nodes take and output Vec2 values
* Remove unfulfillable dead_code expectations from methods reached only through replay
Add magnitude bars to the math expression parser, with abs() acting on each part
Magnitude bars `|x|` give the magnitude on every rung, with `|`
opening where an operand is expected and closing where an operator is,
and `||` reading as Or unless two magnitudes are open, while `abs()`
stays the absolute value of each part. The `real()`, `imag()`, and
`arg()` functions are removed in favor of the matrix literals and
`angle()` the specification defines for those readings.
Make math expression results climb into the complex plane instead of ever producing NaN
Every value is a quaternion in principle, so narrower storage is never
observable: a result whose imaginary part is zero is the real number,
`-0` is `0`, and a real input whose answer leaves the real line climbs
into the complex plane (`sqrt(-4)` is `2i`, `ln(-1)` is `iπ`, `asin(2)`
its complex value) instead of producing NaN. No operation returns NaN
at all: an indeterminate form like `0/0` or `∞ - ∞` is an evaluation
error, as is a NaN arriving through a host binding at its point of use.
Shadow the constants behind case-sensitive bindings, with the `\` prefix reaching the builtin
Constants resolve at evaluation time, after the environment, so a
binding of any spelling, word or typeset symbol, shadows the builtin of
exactly that spelling, and a host-supplied function likewise shadows a
builtin function. The `\` prefix, in LaTeX's habit, names the language's
own constant or function regardless of bindings (`\pi`, `\e`, `\sin`),
and is an error when no builtin has that name.
Lex the math expression parser's identifiers as Unicode identifiers
Names follow the `XID_Start XID_Continue*` rule of UAX #31, the same
one Rust spells, so letters from every script name a variable and
combining marks extend a name: a decomposed `é` is one name rather
than the constant `e` beside a stray mark. Digits of any script, lone
marks, invisible formatting characters like the right-to-left
override, and symbols including emoji can no longer begin a name,
which also leaves `#`, `$`, `~`, and `@` free to become namespace
prefixes once a host scope needs them. Rust's special case admitting a
leading underscore is deliberately not adopted.
Reads the character classes from unicode-ident, the table crate the
proc-macro stack already builds with, rather than hand-rolling the
ranges.
* Standardize on the 'nonzero' spelling in comments
* Fill small gaps in the math expression parser
Adds the unary plus operator, the `true` and `false` constants, the
`choose` and `pick` combinatorics functions, base-suffixed `logN`/
`rootN` function names with optional underscores and fractional bases
like `log3.25`, the typeset operator spellings (`−`, `×`, `⋅`, `÷`,
`∧`, `∨`, `¬`), and `Value` accessors reading results as `f32` and the
standard integer types. Constants match their lowercase spelling
exactly, since uppercase-initial names are reserved for matrices. The
`¬` spelling is the prefix logical not alone, never the postfix
factorial that `!` also spells, and punctuation never begins a name,
which leaves `#`, `$`, `~`, and `@` free to become namespace prefixes
once a host scope needs them.
Retires the `√` prefix operator, which is untypeable and duplicates
`sqrt()`, and removes the undocumented unitless `G` constant: its
9.80665 is the value of lowercase-g standard gravity under capital-G's
name, and gravity's proper home is the future unit system's `g`
acceleration unit.
Also covers the previously untested interaction between implicit
multiplication and unary minus with parenthesized operands (`2 (-3)`,
`-3(2)`) in the test suite.
* Fix parsing regressions, make parsing 2.5x faster than the old pest parser, and clean up the math-parser rewrite
* Fix review findings: whitespace-juxtaposed numbers, mixed real/complex logic, correctly rounded literals, unified NaN truthiness, and gcd/lcm range checks