Commit Graph

889 Commits

Author SHA1 Message Date
Keavon Chambers 5774ec215d Replace deprecated row/cell/instance terminology with "item" and "value" terms (#4075) 2026-04-28 19:12:59 -07:00
Keavon Chambers 6b11b47753 Improve the Data panel with type-specific detail pages and nested-layer support (#4070)
* Improve the Data panel with more type-specific detail pages

* Add network_path to SetDisplayName so renames target any network depth

* Track nested layers via full editor:layer paths and rename parent_layer to path_of_subgraph

* Polish the data panel NodeId leaf page with an editable name field

* Make lock and visibility toggles work for layers in nested subgraphs

* Fix formatting

* Fix connected_to_output running in the wrong network for nested-layer toggles
2026-04-28 15:37:07 -07:00
Keavon Chambers 84fb901b5a Add useful attributes to the JSON and Regex nodes (#4069)
* Add useful attributes to the JSON and Regex nodes

* Code review fix
2026-04-28 14:11:34 -07:00
Keavon Chambers b396d17211 Migrate remaining node graph data types from Vec to Table (#4067)
* Move Vec<String> to Table<String>

* Remove old VecDVec2

* Move Vec<u8> to Table<u8>

* Move Vec<f64> to Table<f64>

* Move [f64; 4] to Table<f64>

* Move Vec<NodeId> to Table<NodeId>

* Tidy up the TaggedValue variants

* Move Vec<BrushStroke> to Table<BrushStroke>

* Add missing type implementations

* Fix tests

---------
2026-04-28 13:44:25 -07:00
Keavon Chambers df8c2125d9 Migrate 'Scatter Points' and 'Boolean Operation' from subgraphs to memoized proto nodes (#4066) 2026-04-28 12:40:03 -07:00
Dennis Kobert e0368435b9 Add the "memoize" attribute to the node macro (#4065)
* Add memoization attribute to node macro

* Fix memoization insertion for networks without conversion nodes
2026-04-28 11:55:38 +00:00
Keavon Chambers 3eba762135 Migrate 'Sample Polylines' from a subgraph to a proto node (#4063) 2026-04-28 04:20:47 -07:00
Keavon Chambers 881784ba66 Make the Data panel show type-driven widgets for attributes (#4062) 2026-04-28 03:52:04 -07:00
Keavon Chambers afc2c9178e Move source_node_id to "editor:layer" and Vector<Upstream> to "editor:merged_layers", backed by a new 'Write Attribute' node (#4061)
* Fix click target propagation with the Rasterize node

* Add the 'Write Attribute' node

* Remove tag_layer in favor of the new Write Attribute node, prune redundant attribute writes

* Replace the Vector<Upstream> type argument with the "editor:merged_layers" attribute
2026-04-28 03:28:31 -07:00
Keavon Chambers 76938eb69a Implement dynamic table attributes to generalize the graphic-specific Table type (#4050)
* Feature-gate serde derives behind cfg_attr in all runtime node graph type crates

* Refactor Table to move its hard-coded fields into an attributes field

* Encapsulate TableRow/TableRowRef/TableRowMut attribute fields behind accessor methods

* Remove TaggedValue::GraphicUnused

* Refactor Table<T> to use dynamic attributes instead fixed names

* Fix code review soundness concerns

* Add todo work

* Replace row-oriented Table<T> API with column-oriented access

* Fix attribute propagation bugs

---------
2026-04-28 03:25:16 -07:00
Timon 324b9e664c
Desktop: Update CEF (#4048)
* Update CEF to version 147

* Fix fmt

* Move CEF package

* Fix nix package

* Improve

* Cleanup

* Fix
2026-04-28 02:25:39 +02:00
Firestar99 824d1162eb
Update rust-gpu to `0.10.0-alpha.1` (#4033)
* rust-gpu alpha.1: update nix flake

* rust-gpu alpha.1: disable non-working mold shell hook

* rust-gpu alpha.1: update rust-gpu to `0.10.0-alpha.1` on crates

* Review

* Fix gpu nodes

* Reduce wasm size

---------

Co-authored-by: Timon <me@timon.zip>
2026-04-27 23:53:49 +00:00
Dennis Kobert 3d84e63ef9
Migrate usage of the Hash trait for cache invalidation to the dedicated CacheHash trait (#4051)
* WIP start migrating usages of hash for cache invalidadion to dedicated trait

* Finish migrating usages

* Code review

* Add comments clearifying the reasoning for using random ids in the VectorModification cach hash impl

* Fix some remaining hash violations

* Finish migration and fix compilation

* Fix import ordering

* Cleanup

* Fix code review stuff

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-04-27 05:18:47 +00:00
Keavon Chambers 7bb01c9651
Fix dropdown menus spawning offset in scrolled panels, a regression from upgrading to Svelte 5.54 (#4047)
* Fix dropdown menus spawning offset in scrolled panels, a regression from upgrading to Svelte 5.54

Regression introduced in #3933 by upgrading from Svelte 5.47.1 to 5.54.1

* Code review

* Fix unrelated typo

* Add assets build size to build link comment
2026-04-24 12:17:27 -07:00
Keavon Chambers c9c76df40c
New nodes: 'Regex Contains', 'Regex Replace', 'Regex Find', 'Regex Find All', and 'Regex Split' (#4045)
* Add a family of 5 regex nodes for string processing

* Fix unstaged change
2026-04-24 00:55:24 -07:00
Keavon Chambers c32c808d5b
New nodes: 'Format JSON', 'Query JSON', and 'Query JSON All', replacing the 'JSON Get' node (#4044)
* New nodes: 'Format JSON', 'Query JSON', and 'Query JSON All', replacing the 'JSON Get' node

* Fix bugs
2026-04-24 00:26:29 -07:00
Keavon Chambers 6c0af72053
Add a family of 14 new string processing nodes (#4010)
* Add new string processing nodes

* Remove the IntegerCount = u32 type alias

* Add the 'Format Number' node

* Add "Up To" parameter to the 'String Pad' node

* Fix 'String Capitalization' behavior

* Add 'Map String' and 'Read String' nodes

* Add separator_escaping to 'String Repeat'

* Add 'Regex Replace'

* Add 'Regex Match' node

* Regex Find and Regex Find All

* Code review

* Add the 'Escape String' node

* Improve implementations

* Move nodes from logic.rs to text/src/lib.rs

* Clean up migrations

* Fix #[{hard, soft}_{min, max}(...)] node macro attribute

* Improve Data panel number and text display

* Add the 'Query JSON' and 'Query JSON All' nodes

* Add the 'Lorem Ipsum' node and Ipsum library

* Add the 14 nodes back in their final state

* Add handling for fixed decimal places in number formatting

* Code review fixes
2026-04-23 22:46:20 -07:00
Keavon Chambers 328c4f272b
New node: 'String Capitalization' (#4043)
* New node: 'String Capitalization'

* Clarify comment
2026-04-23 19:12:00 -07:00
Keavon Chambers a59fed9d1c
Move the "Text" category nodes from gcore/src/logic.rs to text/src/lib.rs (#4042)
Move the String category nodes from gcore/src/logic.rs to text/src/lib.rs
2026-04-23 18:12:28 -07:00
Keavon Chambers f42d12da9e
Improve type handling for ints/floats with the #[hard/soft_min/max(...)] node macro parameter attributes (#4041) 2026-04-23 15:49:30 -07:00
Keavon Chambers d3f36a95cf
Rename 'Image Value' node to 'Image' and have its input value be an image not a raster table (#4037)
* Rename 'Image Value' node to 'Image' and have its input value be Image<Color> not Table<Raster<CPU>>

* Add a Properties panel widget labeling "width x height" for images in the Image node

* Add Image<Color> node registry entry for MonitorNode

* Code review
2026-04-22 16:00:03 -07:00
Keavon Chambers c2e1208d82
Add Path node differential edit summary widget, and store imported SVG content in that VectorModification struct (#4036)
* Make paste/import SVG store as the Path node's VectorModification not Table<Vector>

* Add a migration from Table<Vector> to VectorModification for existing documents

* Add a VectorModification widget to visualize change counts

* Refactor VectorModification to compute per-category counts for additions, removals, and modifications
2026-04-22 12:08:53 -07:00
YohYamasaki 79d778a535
Add support for setting the spread method for gradient fills (#3953)
* Add spread method support for gradients

* Add GradientSpreadMethod enum (Pad, Repeat, Reflect) to vector-types

* Add radio buttons to gradient tool and fill properties panel

* Convert spread method when importing SVGs via usvg

* Sync backup gradient input when changing spread method

* Table<GradientStops> rendering is not yet updated for spread method

* Sync gradient tool options with layer's gradient

* Sync gradient_type and spread_method from the selected
  layer's existing gradient to the tool options bar when
  switching to the gradient tool

* Refactor has_gradient_on_selected_layers
  to reuse a new get_gradient_on_selected_layer helper

* Swap Reflect and Repeat order in UI radio buttons

* Fix alignment of the radio buttons in right panel

* Fix the position of the radio buttons in the tool

* Rename SpreadMethod to SetSpreadMethod

* Move default spread method omission logic
2026-04-14 08:09:57 +00:00
Keavon Chambers da45ab2f87
Add a checkered background to transparent artboards and the infinite canvas (#4022)
* Add checkered transparency rendering to infinite canvas and artboards

* Enable artboard clipping by default

* Make new infinite canvas documents begin with a white background layer

* Remove the export dialog's transparency option now that it's redundant

* Make exporting transparent JPGs use white not black

* Code review
2026-04-10 03:21:21 -07:00
Timon 661e8bc569
Remove surface and window from ApplicationIo (#3941)
* Remove surface and window from ApplicationIo

* Seperate Wasm and Native ApplicationIo

* Fix warnings

* Fix tests

* Remove redundant PlatformApplicationIo::new_offscreen

* Fixup

* Remove unused From implementaitions for ApplicationIo
2026-04-09 20:12:53 +00:00
Dennis Kobert 19aaeb374b
Remove sample based image hashing to avoid false equalities (#3980)
* Remove sample based image hashing to avoid false equalities

This was originally introduced to improve the performance of working with
image data, but since the memo hash wrapper got introduced this should no
longer be really necessary.

* Fix todo comment
2026-04-04 11:46:08 +00:00
Keavon Chambers 4360359d60
Finalize and unify the design of the 'Morph' and 'Blend' nodes (#3974)
* Fix Morph node transform interpolation and preservation in the table

* Fix click target positions for Morph's nested layers by pre-compensating upstream_data transforms

* Redesign Morph node (v3) with control path input and uniformly spaced progression, and fix Stroke::lerp interpolation weights

* Add migration from Morph node v2 to v3

* Redesign the 'Blend Shapes' node behavior and subgraph definition

* Add the Layer > Blend menu entry to easily set up a blend

* Optimize the Morph node

* Refactor the Morph node to remove the roundtrip through BezPath

* Fine-tune Morph node Bezier order promotion and handle interpolation

* Add the Layer > Morph menu bar entry

* Fix NaN and guard against other potential NaN bugs breaking the editor

* Add InterpolationDistribution parameter to Morph with weighted progression, swap parameter orders, and rename shear to skew

* Add the Reverse parameter to the Morph node

* Update the order of the inputs to Blend Shapes for consistency with Morph

* Make Layer > Morph create the Morph Path control layer

* Fix migrations

* Move 10 to a constant

* Avoid division by 0 in the Blend Shapes node internals

* Rename nodes 'Blend' -> 'Mix' and 'Blend Shapes' to 'Blend'

* Fix a crash encountered while testing

* Final code review

* Make domain push dupe checks debug-only and use push_unchecked in the Morph node

* Pre-allocate for pushes to the vector domains

* Add fast path at t=0

* Inline reserve()

* Set up the control path layer above not below, and starting collapsed

* Review fixes

---------

Co-authored-by: Timon <me@timon.zip>
2026-04-03 20:45:58 -07:00
Keavon Chambers 662691f32a New node: 'Offset Points' 2026-04-01 23:02:59 -07:00
Keavon Chambers 1543d974ac
Fix 'Jitter Points' and 'Sample Polylines' working incorrectly with X or Y scale of 0 content (#3984)
* Fix NaN points produced by Sample Polylines on 0-scaled input

* Fix Jitter Points inverse transform for zero-scale axes and stop resetting stroke transform

* Remove a couple confusing Debug nodes

* Fix edge case

* Update demo art

* Fix order change in Jitter Points causing different results from earlier

* Fix bug in bisect tool

* Break out functionality into helper functions
2026-04-01 22:51:48 -07:00
Keavon Chambers 79bf1ab688 Fix preprocessor crash when document nodes have outdated input counts 2026-04-01 19:39:12 -07:00
Keavon Chambers 211b9113a1
Add the "Along Normals" parameter to the 'Jitter Points' node (#3983)
* Add the "Along Normals" parameter to the 'Jitter Points' node

* Fix the edge case of a self-loops
2026-04-01 05:18:56 -07:00
Keavon Chambers 86e41a110a
Make the node macro include doc comments when hovering a node's function (#3979) 2026-03-31 02:55:27 -07:00
Keavon Chambers a3ea6ab0af
Refactor transform decomposition API with skew support, add 'Decompose Skew' node, and fix stroke transform interpolation (#3973)
* Refactor transform decomposition API with skew support, add Decompose Skew node, and fix stroke transform interpolation

* Fix bug in master with skew changing Area node calculated value

* Code review simplification

* More code review fixes

* Rename cases where "shear" terminology was used in place of "skew"
2026-03-28 20:47:32 -07:00
Keavon Chambers e2a142333f
Fix the Auto-Tangents node for linear polylines, and track colinear handles in manipulator data (#3972)
* Fix the Auto-Tangents node for linear polylines, and track colinear handles in manipulator data

* Simplify
2026-03-28 18:26:08 -07:00
Keavon Chambers 71ff4c937f
Update 'Solidify Stroke' to preserve the original fill (#3971)
* Update 'Solidify Stroke' to preserve the original fill

* Efficiency improvements
2026-03-28 18:11:26 -07:00
Keavon Chambers 50a618ad12
New node: Path is Closed (#3970)
Add the 'Path is Closed' node
2026-03-28 17:37:50 -07:00
Keavon Chambers 6388a32ac5
Fix an assortment of small bugs (#3968)
* Fix an assertion failure bug when scaling a line in the transform cage

* Fix missing defaults on node gradient inputs

* Fix Blend Shapes path input wire not updating to show in the UI after Layer > Blend

* Fix assertion failure due to browser non-monotonic timestamp

* Fix SVG renderer drawing 1px strokes as half-width when using stroke alignment

* Fix incorrect appearance of the ColorInput widget when set to "none" and "disabled"

* Fix lerp function in Fill enum to handle None cases correctly

* Fix stroke alignment bug
2026-03-28 17:12:13 -07:00
Keavon Chambers 865e9713ad
Refactor eval_pathseg_euclidean() to use kurbo's faster/more accurate inv_arclen() (#3969) 2026-03-28 16:30:26 -07:00
Keavon Chambers e529f74495
Fix click target metadata not propagating through intermediate wrapper table rows (#3967) 2026-03-28 15:39:27 -07:00
Timon 5b1e1cb2fb
Fix artboards not exporting with transparency using Vello (#3921)
* Fix hide artboard for raster render mode

* Desktop: Fix transparent viewport blending

* Fix vello render using wrong color space conversion for background

* Review
2026-03-23 01:20:54 +00:00
Keavon Chambers 17da9ec099
New nodes: 'Decimate' and 'Simplify' (#3851)
* New node: Decimate

* Use preallocated stack to reduce number of allocations and fix double endpoints on closed paths

* Use Kurbo implementation of path-to-polyline sampling

* Add the 'Simplify' node
2026-03-21 17:08:18 -07:00
Keavon Chambers d5d10fe548
Rename /frontend/wasm -> /frontend/wrapper (#3927) 2026-03-21 03:46:47 -07:00
Dennis Kobert eb30ee78bc
Fix Grapene CLI compilation (#3892)
* Fix grapene-cli compilation

* Improve cargo features to reduce recompiles
2026-03-13 11:28:34 +01:00
Timon a18b7ff79d
Desktop: Add an 'Enable V-Sync' preference on Mac (#3887)
* add vsync pref

* account for physical scale in pixel preview passthru check

* change allow to expect attr

* Update user-facing v-sync text

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-03-11 21:32:37 +00:00
Dennis Kobert 116a4106c4
Add texture pool to render cache node (#3804)
* Add texture pool to render cache node

* Use direct texture copy instead of bitter and fix graphene_cli

* Remove warnings

* Fix wgpu import path

* Code review fixes
2026-03-11 09:44:21 +00:00
Keavon Chambers 2ac82a10b5
Add a workaround for flickering vector mesh rendering produced by the Boolean Operation node (#3884)
* Add a workaround for flickering vector mesh rendering produced by the Boolean Operation node

* Code review feedback
2026-03-11 08:55:15 +01:00
Dennis Kobert 90533e656f
Remove the path-bool library (#3882) 2026-03-11 08:55:03 +01:00
jneem 58aae4f87b
Replace the Boolean Operations node's algorithm with the Linesweeper library (#2670)
* Attempt one-shot n-ary ops

* Make it not crash

* Try to remove more path_bool

* Add quantization

* Update to latest

* Nits

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-03-10 22:00:49 -07:00
Timon 095c2a6d47
Add the Pixel Preview render mode (#3881)
* Add pixel preview render mode

* Fix fmt

* Remove unused sampler

* Remove unnecessary mutex

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-03-11 02:44:00 +00:00
YohYamasaki 8e52309bb0
Render raster images as outlines in Outline mode (#3831)
* Render raster images as outlines in Outline mode

* Draw a transformed unit-rectangle stroke instead of raster pixels

* Skip creating blend layers for a raster image in Outline mode
  when only blend mode would trigger them

* Rename variable names

* Minor refactor to reduce nesting

* Extract shared outline drawing helper

* Update node-graph/libraries/rendering/src/renderer.rs

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2026-03-10 11:23:48 +00:00