Commit Graph

66 Commits

Author SHA1 Message Date
Keavon Chambers
ca615fd6fc Rename the 'Sample Gradient' node to 'Evaluate Gradient' (#4422)
* Rename the 'Sample Gradient' node to 'Evaluate Gradient'

* Let the Evaluate Gradient node's position reach the out-of-range values its spread modes handle
2026-09-15 14:40:09 +02:00
Keavon Chambers
9181a62e99 Add a gradient interpolation attribute with Stepped, Linear (existing), and Smooth modes (#4418)
* Delete dead code function

* Add a Gradient Interpolation axis with Stepped, Linear, and Smooth paths through the stops

* Keep the gradient interpolation attached when dragging stops in the picker

* Give the gradient popover's dropdowns the same tooltips as their row labels

* Order the gradient popover with Intrp. above Space

* Hold gradient stops in place when the cyclic flag is toggled

* Fix wrong Smooth gradient colors around stops sitting on the ramp boundaries

* Consolidate gradient settings plumbing and fix bugs

* Bundle whole-ramp gradient settings into GradientSettings across the editor plumbing

* Name the Smooth gradient interpolation's spline type in its tooltip

* Linearize the gamma hex stop colors recovered from imported Graphite SVGs

* Code review

* Aim the Smooth bake's seam subdivision at the copied boundary color

* Add GradientEvaluator to build gradient sampling state once per loop instead of per sample

* Correct the gradient evaluator's documented setup cost to O(n log n)
2026-09-15 14:39:52 +02:00
Keavon Chambers
c00eb21a7f Add a "Cyclic" gradient option that closes the ramp into a seamless loop (#4416)
* Add a Cyclic gradient attribute that wraps the stop list through the 1|0 boundary back to the first stop

* Show the wrap segment's midpoint diamond in the color picker spectrum strip when cyclic

* Keep the wrap midpoint diamond tracking the pointer by a wrapped strip width when dragged past the ends

* Give the Gradient tool's viewport overlay the same cyclic wrap midpoint diamond and drag behavior

* Correct the docs claiming the final stop's midpoint is always ignored now that cyclic uses it

* Move the gradient cyclic toggle onto the Ends row as a Link icon checkbox

* Update labels

* Register GradientHueDirection with the Data panel so its attribute column renders

* Reword wrap segment to wrapped interval and stray segment usages to interval

* Clean up comments

* Fix the color picker write-back losing default position elision and the blend path guessing the cyclic flag
2026-09-15 14:39:48 +02:00
Keavon Chambers
be42a0aada Add the "Perceptual" and "Classic" families of gradient spaces with OkLab as the new default (#4415)
* Add an OkLab gradient interpolation space and make it the new default

* Fix the Properties panel fill row resetting the gradient interpolation space to the default

* Add OkLch, Lab, LCh, and HSL gradient interpolation spaces

* Add a hue direction attribute and picker choice for polar gradient interpolation spaces

* Add an HSV gradient interpolation space

* Rename the sRGB Linear and sRGB Gamma gradient spaces to RGB Linear and RGB Gamma

* Divide the gradient interpolation dropdown between absolute and relative color spaces

* Rename the OkLch gradient interpolation space to OkLCh for channel-notation capitalization

* Shorten the color picker popover's hue direction row label to Arc

* Call the Gradient Interpolation node's parameter Space and extend the picker tooltip title to match

* Rename the gradient interpolation attribute and type family to gradient space

* Rename the gradient tool's gradient space transform to gradient to viewport transform

* Add serde aliases and a node replacement covering the gradient space renames

* Give the gradient space choices artist-facing labels and reorder the dropdown sections

* Add a Gradient Hue Direction node and its attribute read node

* Say interpolate instead of blend for gradient stop color traversal in docs and tooltips

* Label the polar perceptual gradient spaces as Perceptual Hue and group the dropdown sections by geometry

* Add a migration alias covering the gradient space attribute reader rename

* Carry the gradient hue direction attribute through boolean operations

* Register GradientHueDirection wire types in the node registry
2026-09-15 14:39:44 +02:00
Keavon Chambers
11436cfc80 Make gradient evaluation follow the ramp's interpolation space attribute (#4414) 2026-09-15 14:39:40 +02:00
Keavon Chambers
a1dfe52b70 Add a gradient interpolation space attribute with sRGB Gamma (existing) and sRGB Linear (new) (#4412)
* Build dropdown menu entries from choice type metadata

* Add a gradient interpolation color space attribute, blending stops in linear light by default

* Add a Space interpolation dropdown to the color picker popover

* Stamp legacy gradient ramps with their implicit gamma interpolation during deserialization

* Resolve color-interpolation from SVG style blocks and fix cascade order among repeated declarations
2026-09-15 14:39:32 +02:00
Keavon Chambers
e54b348166 Add a Clear gradient spread that cuts off to transparency beyond the ends (#4410) 2026-09-15 14:39:24 +02:00
Keavon Chambers
b9a8065eb8 Rename gradient type to gradient form (#4405)
* Rename gradient type to gradient form

* Update the demo art for the gradient form rename

* Say form not type in the Gradient Form node's doc comment
2026-09-15 14:39:04 +02:00
Keavon Chambers
d5e31c23bb Rename spread method to gradient spread so it matches the other gradient attribute names (#4404)
* Rename spread method to gradient spread so it matches the other gradient attribute names

* Keep the legacy gradient struct's spread method field name matching its on-disk key
2026-09-15 14:38:59 +02:00
Keavon Chambers
8d4f1346a1 Move the gradient-focused nodes from the Color category to a new Gradient category (#4403) 2026-09-15 14:38:53 +02:00
Keavon Chambers
f6b4ce71e6 Rework Gradient into a newtype of List<Color> with optional position and midpoint attributes (#4397)
* Rework Gradient into a newtype of List<Color> with optional position and midpoint attributes

* Fix Vello stopless-gradient fallback coverage, empty legacy gradient tables, the node docs gradient swatch, NaN position elision, and wired setter input overwrites
2026-09-15 14:38:29 +02:00
urisinger
860174c08e Move the math expression parser from Pest to Chumsky and add more features (#2685)
Rewrite the math-parser library using a chumsky-based lexer and parser, adding functions, comparisons, logic, and conditionals
2026-09-15 14:38:00 +02:00
Keavon Chambers
77f7e654e8 Make the 'Angle Between' node report the signed angle and fix its zero-vector output (#4362) 2026-09-15 14:36:33 +02:00
Keavon Chambers
dfec7c9e4b New nodes: 'Sign', 'Distance', 'Cross Product', and 'Lerp' (#4361) 2026-09-15 14:36:28 +02:00
Keavon Chambers
7aec563210 Add Vec2 support to the scalar math operator nodes (#4360)
* Add Vec2 support to the scalar math operator nodes

* Support the scalar-with-Vec2 operand order in the Exponent, Root, Logarithm, Min, Max, and Clamp nodes

* Detect an f32 base of e in the Logarithm node despite inexact widening to f64
2026-09-15 14:36:18 +02:00
Keavon Chambers
7add2adea6 Fix the 'Divide' node dividing partially-zero Vec2 denominators and the 'Logarithm' node misdetecting base e (#4359) 2026-09-15 14:36:09 +02:00
Keavon Chambers
4f49c000e8 Rename the nodes 'Length' -> 'Magnitude', 'Flatten Path' -> 'Combine Paths', 'Vec2 Value' -> 'Combine Vec2', and add a new 'Vec2 Value' node (#4349)
* Rename the node 'Length' -> 'Magnitude'

* Rename the node 'Flatten Path' -> 'Combine Paths'

* Replace the node 'Vec2 Value' with 'Combine Vec2' and add a new 'Vec2 Value' that's actually a vec2

* Update demo artwork
2026-09-15 14:35:48 +02:00
Keavon Chambers
20eb5ccb8a New nodes: Sum, Average, Minimum, Maximum, Any, All (#4344)
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2026-09-15 14:35:27 +02:00
Keavon Chambers
04d6c0d5cf Convert the node catalog to rank-polymorphic kernels, materialize stored values as ranked wires, and display wire rank in the graph
Co-authored-by:    Dennis Kobert <dennis@kobert.dev>
2026-09-15 14:35:20 +02:00
Keavon Chambers
9dd1e2bdf9 Rename GradientStops to Gradient and the legacy Gradient/Fill structs to LegacyGradient/LegacyFill 2026-09-15 14:34:59 +02:00
Dennis Kobert
6e22d6a412 Serve a declared name's census default on an absent read
An absent read of a name the census declares now serves that name's own
default rather than its value type's, which is the rule for a declared
name. The census stages it exactly as it fills any absent field, as the
declared default's bytes, so the read reuses the census's own mechanism
instead of a second one; the compiler takes them when the name folds and
`set_layout` installs them beside the offset.

A name the census does not declare keeps the value type's default, which
is that case's own rule. One name carries one value type, checked when
the name folds, so the row's value type and width agree with the read's.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-09 11:13:41 +00:00
Dennis Kobert
5eb80721dd Resolve a named read's offset when the graph compiles
The fold already holds the name and the read input's finished layout, so
the offset falls out there rather than at construction: `RecordLayout`
carries the resolved numbers and `set_layout` copies them into the read
slots. Constructors are untouched, and census-marker reads keep their
current installation.

A read meets the value type the name was written at, so a disagreement
between a read here and a write upstream is the same graph error as two
writes disagreeing; the one-name-one-type check now spans reads and
writes together. An absent attribute stays absent and the read serves
the forced default rather than reporting it.

`read_attribute` is the catalog's get half, typed and never `Option` at
the kernel boundary, with the name declared exactly as the write side
declares it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-09 10:50:08 +00:00
Dennis Kobert
37c0d0852d Carry the new layout fields through the hand-built fixtures
The record fixtures spell their metas and resolved layouts out in full,
so the name-from-input fields reach them as empty. `named_value!`'s
example moves to `ignore`: its `for T` arm implements a core-types trait
on the value type, which only core-types itself may do.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-09 09:43:52 +00:00
Dennis Kobert
33f7257e47 Rename record_edge_type to record_source_type 2026-09-06 16:27:11 +00:00
Dennis Kobert
1e91511f93 Rename record_value_edge to record_value_source 2026-09-06 16:26:49 +00:00
Dennis Kobert
9d3abe385f Sweep the data-flow wire and edge wording to input and source 2026-09-06 15:14:55 +00:00
Dennis Kobert
8f7d3936f8 Rename serve_edge to serve_input 2026-09-06 15:12:46 +00:00
Dennis Kobert
97bc10e4c3 Pass frame space by argument and delete the record stack 2026-08-29 18:33:23 +00:00
Dennis Kobert
3af6834d3c Flip the Node trait from eval onto the frame claim's serve 2026-08-29 12:26:46 +00:00
Dennis Kobert
aef750153b Claim the node frame once and close every exit through its drop 2026-08-28 19:11:38 +00:00
Dennis Kobert
f4d37524c8 Structure record stack rewinds as scope guards and make reserve unsafe 2026-08-28 18:02:50 +00:00
Dennis Kobert
c6b669fc88 Key the element glue on static type projections 2026-08-28 13:30:05 +00:00
Dennis Kobert
027218f16c Declare which index levels a node reads and nullify the rest 2026-08-24 17:06:07 +00:00
Dennis Kobert
a4d01bfd11 Route the whole record through switch and drop its fifteen typed rows 2026-08-24 08:51:12 +00:00
Dennis Kobert
7c4b029d76 Convert the math color and gradient family to element and marker kernels 2026-08-23 17:22:46 +00:00
Dennis Kobert
e76dcb15aa Convert mix and gradient value to element kernels 2026-08-22 22:15:03 +00:00
Dennis Kobert
a8d257e7d6 Move the downstream-typed attribute markers to their value types' crates 2026-08-22 09:34:24 +00:00
Dennis Kobert
e68254eff3 Carry an extent hint on batch returns 2026-08-21 12:32:57 +00:00
Dennis Kobert
ac40f1838f Store record batches in caller-owned frame buffers instead of aliased stack pointers 2026-08-16 11:29:20 +00:00
Dennis Kobert
9055a5f3d5 Drop the stale layout unwraps in the math wire tests 2026-08-16 11:28:33 +00:00
Dennis Kobert
fb94d99807 Port the stale math-nodes and raster-nodes tests onto record wires 2026-08-11 09:54:48 +00:00
Dennis Kobert
264601c5f7 Return records from eval_batch through a RecordBatch view 2026-08-11 09:26:36 +00:00
Dennis Kobert
c30054579f Adapt the cutover to the reviewed core-types API 2026-07-31 23:39:39 +02:00
Dennis Kobert
81a319430b Cut over to the graphene execution model 2026-07-31 23:19:42 +02:00
Keavon Chambers
34e0fd7757 Replace the 'Vec2 to Point' node with automatic conversion machinery (#4236)
* Replace the 'Vec2 to Point' node with an 'As Vector' node and automatic conversion

* Accept a Vec2 as content for the Wrap Graphic node

* Rename the type-assertion nodes from 'To' to 'As'

* Fix the Transform node reversing a Vec2 input's direction

* Fix text migration bug
2026-06-14 21:44:08 -07:00
Keavon Chambers
a56746c6bf Deprecate all usages of the Color struct representing gamma space values, fixing round-trip precision bugs (#4149)
* Deprecate all usages of the Color struct representing gamma space values, fixing round-trip precision bugs

* Code review fixes
2026-05-14 22:48:33 -07:00
Keavon Chambers
a28b9437aa Rename the "Table" type to "List" everywhere (#4133)
* Rename the "Table" type to "List" everywhere

* Fix a few missed ones

* Re-save demo artwork
2026-05-09 01:33:39 -07:00
Keavon Chambers
a0d5f418d9 Replace Table<Table<Graphic>> with Table<Artboard> where Artboard is a type boundary newtype (#4093)
Replace Table<Table<Graphic>> with Table<Artboard> with Artboard as a type boundary newtype
2026-05-01 21:57:50 -07:00
Keavon Chambers
4b2430290c New nodes: 'Gradient Type' and 'Spread Method', and add Gradient tool support for controlling these nodes (#4084)
* Use 'Transform', 'Gradient Type', and 'Spread Method' nodes for table gradients

* Add gradient widget to the tool's control bar and update where the two swap buttons go

* Fix gradient rendering

* Format

* Code review
2026-04-29 19:27:44 -07:00
Keavon Chambers
ba63c26c62 Replace the Artboard struct with a Table<Table<Graphic>> shape (#4077)
* Replace the Artboard struct with a Table<Table<Graphic>> shape

* Remove the never-functional, seemingly unneeded migrate_type_descriptor_names due to typo

* Allow negative artboard sizes
2026-04-28 22:58:33 -07:00