Commit Graph

893 Commits

Author SHA1 Message Date
Keavon Chambers 390004897b
Add "Loop Level" to the Position context reader node (#3679)
* Add "Loop Level" to the Position context reader node

* Remove InjectPosition
2026-01-28 10:52:39 +00:00
Timon 5fd1a24f16
Desktop: Add Eyedropper tool support with native Vello (#3684)
* mostly done

* fix

* kinda works but tilt and flip broken

* fix footprint

Co-authored-by: James Lindsay <78500760+0HyperCube@users.noreply.github.com>

* Code review

* fix cursor hiding

* Remove console.log

---------

Co-authored-by: James Lindsay <78500760+0HyperCube@users.noreply.github.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-01-27 01:24:09 +00:00
Keavon Chambers 19e9af3d43
Fix 'Apply Transform' node applying only to anchors but not also handles (#3687) 2026-01-26 12:32:17 -08:00
Timon b4e9d7b9eb
Desktop: Fix bitmap file export not preserving alpha (#3673)
Fix Export not preserving alpha
2026-01-26 13:51:48 +00:00
Mohammed Afreed baig c07124332b
Fix GPU out-of-memory crash by reusing overlay textures (#3614)
* Refactor TargetTexture into proper abstraction with ensure_size() method

* Remove redundant overlays_texture field, use view() directly

* Use if-let syntax in render_vello_scene_to_target_texture to avoid explicit unwrap

* Implement TargetTexture::new() constructor to avoid dummy textures

* fix compile error

* cleanup

* Avoid cloning texture view

---------

Co-authored-by: Timon <me@timon.zip>
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2026-01-26 12:44:41 +00:00
Keavon Chambers a88342b8da
Add the "Rate" multiplier parameter to the Animation Time node (#3685) 2026-01-26 00:37:15 -08:00
Keavon Chambers 568831bd2f
Fix regression breaking Into/Convert node type coercion (#3681) 2026-01-25 16:26:05 -08:00
Keavon Chambers 7af60e02a3
Add the auto-generated node catalog to the website's user manual (#3662)
* Generate the MVP node catalog in the manual (with some placeholders)

* Implement nearly the rest of everything

* Move to the tools directory and make it generate nicer default values

* Add category descriptions

* Organize file structure and improve type naming

* Improve book table of contents code

* Add collapsing chapter navigation to the book template

* Add to build workflow

* Clean up site structure
2026-01-20 22:52:03 -08:00
Keavon Chambers 5543afd44b
Clean up old website code and files (#3658) 2026-01-19 22:09:51 -08:00
Keavon Chambers 3b55064f44
Add tooltip documentation to the Text node and tidy up node catalog categorization (#3645)
* Add more node doc comments

* Tidy up node categories
2026-01-16 01:27:56 -08:00
Adam Gerhant c60ddcf875
Fix the Text node's Max Width/Height parameters with OptionalF64 losing the value when unticked (#3643)
* WIP

* Fix widget

* Fix migration

* Remove OptionalF64

* Custom attributes for optional f64 widget

* Code review

* Move comments to another PR

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-01-16 06:13:32 +00:00
James Lindsay aadc989134
Include path endpoints as extrema in the Extrude node (#3469)
* Include single connected points as extrema in the extrude node

* Update styling of loading indicator

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-01-14 02:31:18 -08:00
James Lindsay c46060db44
Add a Select tool overlay for the layer origin (#3471)
* Add blue layer origin cross overlay

* Apply suggestion from @Keavon

* Skip layers without local transforms

* Disable the Custom Pivot by default

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-01-14 01:50:03 -08:00
Keavon Chambers 20a595db39 Fix a bug where Transform nodes would cause a reversal of the 'Instance Index' node's 'Loop Level' counting direction 2026-01-13 23:15:42 -08:00
Jo e3ad59ad9c
Add tooltip documentation to web request and brush related nodes (#3427)
* Add tooltip documentation to web request, text, and brush nodes

  - Add descriptive tooltips to web request nodes (GET/POST, string/image conversion, resource loading, image decoding)
  - Add tooltip to GPU rasterization node explaining footprint usage
  - Improve text node tooltip with clearer per_glyph_instances parameter explanation
  - Add tooltips to brush stamp generator and blit operations explaining their internal roles
  - Fix typos in tooltip and variable names (it's→its, perview→preview, instnace→instance)

* Fixed 2 issues with previous changes. Reversed order of documentation about per_glyph_instances. Can it be 3 lines?

* Improve post_request node documentation

Change doc comment to describe the node's purpose rather than focusing
only on the "Discard Result" parameter. Now clearly states this is an
HTTP POST operation with optional async behavior.

* Fix post_request documentation error

Corrected doc comment to say "HTTP POST" instead of "HTTP GET" since
this function performs POST requests with binary data.

* Review changes

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-01-13 08:35:14 +00:00
Adam Gerhant a6052c5819
Replace node definition string-based lookups with DefinitionIdentifier instances (#3451)
* create definition identifier and integrate it

* Bug fixes and code review

* formatting

* Fix migrations

* Fix remove handles migration

* formatting

* Fix test

* Fix tests 2

* fix deserialization

* Code review

* Small fixes

* Consolidate 'Morph' node migrations

* Add old SamplePointsNode name to migrations list

* Fix tests

* Unrelated small fix

* Fix migration crashes

* Fix tests

* Final code review

* fmt

* Add metadata

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-01-12 23:09:43 -08:00
Vatsal Kumar 4fea2b0fe7
Add an arrow to the Shape tool (#3343)
* add arrow shape feature in editor

Signed-off-by: krVatsal <kumarvatsal34@gmail.com>

* fix the arrow tool to show arrow in viewport space

Signed-off-by: krVatsal <kumarvatsal34@gmail.com>

* fix the direction of arrow and make the new arrow node

Signed-off-by: krVatsal <kumarvatsal34@gmail.com>

* updated arrow tool to hae start and end points

Signed-off-by: krVatsal <kumarvatsal34@gmail.com>

* fixed calculate point bug

Signed-off-by: krVatsal <kumarvatsal34@gmail.com>

* fixed some bugs of arrow positioning

Signed-off-by: krVatsal <kumarvatsal34@gmail.com>

* fixed formatting in whole codebase and added fill to arrow

Signed-off-by: krVatsal <kumarvatsal34@gmail.com>

* fix

---------

Signed-off-by: krVatsal <kumarvatsal34@gmail.com>
Co-authored-by: Timon <me@timon.zip>
2026-01-12 00:58:28 +00:00
Kulcode 479688d86b
Fix integer underflow in Index Points node (#3623)
Fix: Prevent integer underflow in Index Points node
2026-01-11 23:51:55 +00:00
Keavon Chambers 1b91198b28
Fix 'Regular Polygon' and 'Star' shapes incorrectly having cubic handles, not linear (#3606)
Fix shape nodes creating cubic-curved polylines
2026-01-06 20:58:08 -08:00
Youssef Ahmed Hassan Elzedy 9cb856eee4
Feature: Add median filter option to blur node (#3196)
* Add median filter option to blur node:

- Add median parameter to blur function for noise reduction
- Implement median_filter_algorithm with efficient quickselect
- Support gamma space calculations for median filtering
- Preserve edges while removing noise, complementing existing blur options

Feature in Issue: #912

* Optimize median filter algorithm by reusing buffers and improving pixel neighborhood collection

* Add median filter option to blur node:

- Add median parameter to blur function for noise reduction
- Implement median_filter_algorithm with efficient quickselect
- Support gamma space calculations for median filtering
- Preserve edges while removing noise, complementing existing blur options

Feature in Issue: #912

* Optimize median filter algorithm by reusing buffers and improving pixel neighborhood collection

* Improve median filter's NaN handling by using total_cmp for safe comparisons

* Add median filter node for noise reduction

- Create dedicated median_filter node separate from blur functionality
- Implement median_filter_algorithm with efficient quickselect
- Support gamma space calculations for consistency
- Use safe NaN handling with f32::total_cmp to prevent panics
- Optimize performance with memory reuse and O(n) median selection

* Refactor median filter to remove gamma handling and simplify algorithm

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2026-01-06 14:22:11 +01:00
Dennis Kobert e88db022af
Exclude node registry functions from desktop frontend builds (#3584)
* Exclude node registry functions from desktop frontend builds

This reduces compile times and file sizes

* Use early return

* Fix branch name in build-linux pipeline
2026-01-06 12:34:15 +00:00
Timon c2a29470c3
Desktop: Fix serde-based document migrations not being applied in non-Wasm environments (#3580)
Desktop: Fix serde based migrations not beeing applied
2026-01-05 23:45:31 +00:00
Dennis Kobert fafc687d84
Migrate memo nodes to node macro and make implementing other persistent nodes easier (#3552)
* Add #[data] and #[serialize] attributes to node macro

- Add #[data] attribute for struct fields that aren't node parameters
  - Data fields are initialized with Default::default()
  - Passed as references to the underlying function
  - Excluded from registry metadata (internal state)
  - Generic types in data fields allowed without #[implementations]

- Add #[serialize] attribute for custom Node::serialize() implementation
  - Receives references to all data fields
  - Generates serialize() method in Node trait impl

- Conditional derives based on data field presence
  - With data fields: Debug, Clone only
  - Without data fields: Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash

* Refactor Memo and Monitor Node to use node macro

* Move Complex type into type alias

* Fix format

* Update node-graph/nodes/gcore/src/memo.rs

Co-authored-by: Keavon Chambers <keavon@keavon.com>

* Update node-graph/nodes/gcore/src/memo.rs

Co-authored-by: Keavon Chambers <keavon@keavon.com>

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-01-05 22:28:02 +01:00
Ayush Amawate 42440c0d0b
Fix rasterize node document leakage with hashmap and eq check (#3550)
* fix: rasterize node document leakage with hashmap and eq check

* Use single Hashmap and ignore source id

* use or_insert_with instead of Entry match

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2026-01-04 11:33:18 +00:00
James Lindsay 403ab7ba31
Fix math error affecting the linear segment -> polynomial logic (#3562)
Fix typo in the linear segment -> polynomial code
2026-01-02 10:00:02 +00:00
Keavon Chambers 2fa958aa79 Remove generics from the user-facing name for the Vector data type 2026-01-01 21:26:02 -08:00
Keavon Chambers fa45efa9e2
New node: Pointer Position (#3535)
* New node: Pointer Position

* Fix test
2025-12-27 16:02:23 -08:00
Keavon Chambers 9f25c50ca1 Prep for the RC1 release of the desktop app 2025-12-24 22:45:08 -08:00
Keavon Chambers 64ed21f694 Clean up code with better naming 2025-12-21 23:35:00 -08:00
Keavon Chambers 123108c813 Promote vector meshes from experimental by removing it from preferences 2025-12-21 19:33:42 -08:00
Nicholas Liu e73e524f3d
Implement proper fill rendering for vector meshes (#3474)
* Implement branching mesh rendering for SVG

* Patch mesh fill for Vello renderer

* Patch tangent_at_start and tangent_at_end

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-12-21 02:59:37 +00:00
Keavon Chambers 3000519a10 New nodes: 'Reciprocal', 'Angle Between', and 'Angle To' 2025-12-20 02:36:43 -08:00
Keavon Chambers f1e8ebefc5
Improve tooltip docs with Markdown styling and refined math node explanations (#3488) 2025-12-20 01:05:15 -08:00
Keavon Chambers 2d6d054359
Make font selection show a live preview on hover; move its code to the backend (#3487)
* Remove FontInput.svelte

* Move font picking to the backend

* Fix Text tool font choice style turning to "-" on font that doesn't support previous style
2025-12-19 22:17:28 -08:00
Adam Gerhant 6733a24e47
Use more specific node input indexing when displaying invalid input errors (#3415)
* Reduce displayed invalid inputs

* Correct error offset for convert node

* Apply suggestions from code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-12-18 10:48:25 +00:00
Dennis Kobert a6f83291b4
We now use normal blending instead of using Mix::Clip / the clip_layer (#3454)
* We now use normal blending instead of using Mix::Clip / the clip_layer

* Revert the revert for the clip using SrcOver
2025-12-07 10:26:24 +00:00
Keavon Chambers fb0fab0622 Update links from graphite.rs to graphite.art 2025-12-06 18:10:27 -08:00
Keavon Chambers e8ebcc2c21
Replace text-only tooltips with custom richly styled tooltips (#3436)
* Replace the title attribute with custom FloatingMenu tooltips

* Separate tooltip labels and descriptions into two styled blocks

* Move keyboard shortcut tooltips to a separate section at the bottom

* Update shortcut key styling in tooltips and hints bar

* Fix .to_string()
2025-11-30 13:32:58 -08:00
Dennis Kobert 406f3d93f3
Add tool for visualizing crate hierarchy (#3315)
* Add tool for visualizing crate hierarchy

* Update crate structure

* Restructure crate viz and integrate crate into workspace

* Remove transitive dependency edges

* Move png / svg creation into the rust binary
2025-11-28 15:34:45 +00:00
James Lindsay 8383a3afac
New node: 'Extrude' (#3414)
* Add extrude node

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-11-26 18:50:10 -08:00
James Lindsay 5ebf6d6bc0
Fix StrokePathIter missing some segments (#3413) 2025-11-26 07:03:28 +00:00
Keavon Chambers 9eb8835bd5
Add the 'Blend Shapes' and 'Origins to Polyline' nodes; generalize the 'Morph' node to >2 states (#3405)
* New nodes: 'Morph' and 'Multi-Morph'

* Blend Shapes node

* Add the 'Index Points' node

* Fix failing test
2025-11-25 22:17:55 -08:00
Keavon Chambers d247b81966
Fix regression that reversed indexing of the Loop Level parameter of the 'Instance Index' node (#3421) 2025-11-25 21:32:56 -08:00
Keavon Chambers eb0f019b15
New nodes: 'Reset Transform', 'Replace Transform', 'Count Points', 'Index Points' (#3420)
- Add the 'Reset Transform' and 'Replace Transform' nodes
- Add the 'Count Points' and 'Index Points' nodes
- Make the 'Index Elements' node support negative indexing from the end
- Make the 'Flatten Vector' node's implementation reusable
- Fix crash displaying 0x0 raster image in the Data panel
- Fix the 'Points to Polyline' node not working on two-point objects
2025-11-25 20:41:59 -08:00
Dennis Kobert a932eaedcf
Render artwork at correct resolution when using vello on wasm (#3416)
* Work on fixing rendering for wasm+vello

* Render vello canvas in wasm at the correct resolution

* Cleanup unused surface rendering code

* Remove vector to raster conversion

* Remove desktop changes

* Revert window.rs changes

* Don't round logical coordinates

* Fix desktop compilation + don't round logical coordinates for svg rendering

* Further cleanup

* Compute logical size from acutal physical sizes
2025-11-24 14:23:27 +00:00
Keavon Chambers 6e66c79392
Fix 'Mask' node missing Properties widget; fix crash with 'Brightness/Contrast Classic' node (#3404)
* Fix 'Mask' node missing Properties widget; fix crash with 'Brightness/Contrast Classic' node

Also clean up dead code and improve tooltip for the "-" Properties panel widget fallback.

* format type

---------

Co-authored-by: Adam <adamgerhant@gmail.com>
2025-11-24 09:21:07 +00:00
Timon 548e0df1a1
Desktop: Mac menu workaround (#3398) 2025-11-19 17:13:35 +00:00
Dennis Kobert 788e82a7d0
Add export command to Graphene CLI (#3400)
* Add export command to cli

* Fix format
2025-11-19 17:39:48 +01:00
Dennis Kobert f61aebb777
Add a command to Graphene CLI for listing protonode identifiers (#3399)
* Add proto node name printing

* Add subcommand for printing proto node identifiers

* Address review comments

* Cargo fmt
2025-11-19 11:59:27 +01:00
Adam Gerhant 06484ef4e0
Show red connectors on a type-erroring node and accurate connector colors upstream of it (#3110)
* Refactor TypeSource

* Add complete valid types

* Add invalid type

* Improve valid/complete types and disconnecting

* Code review

* Return types on error

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-11-19 03:00:32 +00:00
Timon 7d739c4542
Post refactor fixup (#3395)
* fixup

* fix feature deps for native
2025-11-18 15:48:45 +00:00
Keavon Chambers 6a3b098681
Add automatic type conversion from number to Vec2 by splatting (#3394) 2025-11-18 11:10:33 +00:00
Dennis Kobert 57b0b9c7ed
Restructure node crates (#3384)
* Restructure node-graph folder

* Fix wasm compilation

* Move node definitions out of *-types crates

* Cleanup

* Fix warnings

* Fix warnings

* Start adding migrations

* Add migrations and move memo nodes to gcore

* Move nodes/gsvg-render -> rendering

* Replace some hard coded identifiers and fix automatic conversion

* Fix Vec2Value node migration

* Fix formatting

* Add more migrations

* Cleanup features

* Fix core_types::raster import

* Update demo artwork (to make profile ci work)

* Move *-types to node-graph/libraries folder

* Add missing node migrations

* Migrate more nodes

* Remove impure memo node

* More fixes and remove warning

* Migrate context and add a few missing migrations

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-11-18 10:21:54 +00:00
Dennis Kobert 181c30bc0a
Fix assorted Clippy lints (#3390) 2025-11-17 07:58:31 +00:00
Keavon Chambers ca5785bc8f
Show a "Ctrl +" label instead of "Ctrl =" for View > Zoom In (#3377) 2025-11-13 17:24:04 -08:00
Ashish Mohapatra 2835fbc73d
Fix Vello renderer crash when element has no stroke (#3373) 2025-11-13 00:01:02 -08:00
Keavon Chambers ac74bd9903 Allow the Stroke node to receive "Dash Lengths" values from the node graph 2025-11-12 01:14:17 -08:00
Ashish Mohapatra 0298f9a5ad
Fix Vello rendering bug with stroke alignment cropped by parent transformations (#3329)
Fix element transform for aligned stroke masks
2025-11-10 20:41:04 -08:00
Timon 9be207f4c5
Desktop: Update CEF to 141 (#3352)
update cef to 141
2025-11-08 11:59:02 +00:00
Timon f02f834097
Desktop: Add support for UI scaling (#3310)
* desktop support ui scaling

* fix some warnings

* use browser zoom if needed

* fix infinite footprint size

* fix web canvas scale

* always set zoom

* use only zoom for scaling

* prevent user zoom

* remove mouse position scaling
2025-11-08 12:32:04 +01:00
Dennis Kobert 7254c470ef
Exclude procedural-string-lights from cached execution CI benchmarks (#3351)
Exclude procedural-string-lights from cached execution benchmarks

This benchmark seem to have been really flaky in our CI so we remove it
2025-11-08 10:44:22 +01:00
Timon 881ec0b193
Split out viewport handling into its own message handler (#3331)
* extract viewport handeling

* fix web overlays

* some cleanup

* remove some physical conversions

* fix resize snapping

* fixup

* apply some review feedback

* make viewport api more ergonomic

* fix

* fix web overlay canvas clear size

* clear workaround for canvas

* rename trigger message

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2025-11-08 08:59:38 +00:00
Dennis Kobert 68e67055d8
Update Linebender-related dependencies (#3349)
* Updates crates from linebender ecosystem

* Remove usages of decprecated Clip mix mode
2025-11-08 08:59:00 +01:00
Keavon Chambers 96d73a8570 Remove the application title from the header bar 2025-11-06 09:20:51 -08:00
Keavon Chambers 6d669ad734
Add documentation to many nodes (#3338) 2025-11-03 15:51:50 -08:00
Keavon Chambers 055d543117 Rename the 'Index' node to 'Index Elements' 2025-11-03 13:35:56 -08:00
Keavon Chambers 0998abdaf3 Add support for visualizing Vec<String> in the Data panel 2025-11-03 13:13:54 -08:00
Daniil Loban 0d8c521fbe
New node: String Split (#3304)
* Add two nodes for substring

* fix: number convention

* Remove unnecessay allocations and add support for \n in patterns

* Make split node return Vec<String> and remove count_elements node

* Add Cache implementations for Vec<String>

* Code review

---------

Co-authored-by: daniil.loban <daniil.loban@gmail.com>
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-11-03 21:02:12 +00:00
skearya c4bbb7e880
Reduce editor message size by 67% and fix simple clippy warnings (#3327)
Reduce message size and fix some clippy issues
2025-11-02 08:50:29 +01:00
James Lindsay 7c28a53cd1
Fix the Spline node to maintain stable segment IDs (#3321)
Stable segment ids in the spline node
2025-10-31 18:28:27 +01:00
Dennis Kobert e5f40a3316
Add 'Instance Map' and 'Instance Vector' nodes (#3229)
* Add map instance and extract vector nodes

* Cleanup

* Inject index in map node

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-10-27 15:56:08 +01:00
Dennis Kobert f102801059
Fix incorrect implementations of the Hash and PartialEq traits on Table<T> (#3306)
Fix incorrect implementations of the Hash and PartialEq traits on Table
2025-10-27 15:55:36 +01:00
Ashish Mohapatra 6ca25e4ea9
Fix capacity overflow in offset path node (#3308)
* Fix capacity overflow in offset path node

* Reverted accuracy to 1e-3

* Refactor offset path segment check

* Add squared distance for degenerate cubic bezier curves
2025-10-27 12:33:38 +00:00
jneem 3a80560a68
Move from poly-cool to polycool (#3309) 2025-10-24 22:12:01 +00:00
Dennis Kobert e8f18b0ac0
Cache calculation of bounding boxes with transforms (#3287)
* Cache calculation of bounding boxes with transforms

* Reuse bounding boxes across for the same rotation

* Cleanup code and add documentation

* Add tests
2025-10-17 10:20:55 +00:00
snskar 34d0b76333
Fix drawing over erased Brush tool paths (#3262)
fix draw over erased behaviour

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-10-14 14:30:57 -07:00
Timon e39fbb8903
Desktop: Fix non-Vello render mode (#3259)
* fix non vello render mode

* move export overide desision from reneder node to node runtime

* fix

* cleanup

* Fix typo and cleanup export logic

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2025-10-09 11:31:35 +02:00
Keavon Chambers 3364059e02
Add tooltip documentation to the graphic flattening nodes and string nodes (#3269) 2025-10-07 16:50:18 +02:00
Keavon Chambers 55a64064b0
Make the 'Decompose Rotation' node return degrees not radians; add tooltip documentation to transform nodes (#3268)
Make the 'Decompose Rotation' node return degrees not radians, and add tooltip documentation to transformation nodes
2025-10-07 09:36:35 +00:00
Keavon Chambers 91b08f4b4f Add tooltip documentation for animation-focused nodes (#3267) 2025-10-07 07:00:27 +00:00
Keavon Chambers fc9afce504
Add tooltip documentation for blending-focused nodes (#3266) 2025-10-07 00:23:50 +00:00
Keavon Chambers 6c033a2cd6
Tidy up tooltip documentation for several assorted nodes (#3265) 2025-10-07 01:28:03 +02:00
Firestar99 074a33f58f
Enable debug logging for cargo-gpu (#3207)
debug cargo-gpu: debug logging
2025-10-05 11:19:21 +00:00
Oliver Davies 3cfacccc61
New node: Remap (#3245)
* Added Remap node

* Addressed feedback for mapping range

* Removed extra defaults

* Apply suggestion from @Keavon

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-10-03 05:51:01 +00:00
Timon 7e8c6cc432
Desktop: Native export (#3188)
* Testing native export with raster convert implementation

* Jpg export

* Fix transparent export

* move texture conversion to runtime

* fixup

* move image encoding into editor export  function

* remove unused frontend message

* remove unused type
2025-10-01 21:13:40 +02:00
Dennis Kobert 84e44810d2
Run preprocessing on benchmarks and fix deadlock (#3230) 2025-09-27 12:36:29 +02:00
Dennis Kobert ffc74273cc
Implement Convert trait to convert between CPU and GPU images (#3194)
* Add upload texture trait

* Make convert trait use explicit converter

* Add gpu texture download implementation

* Add footprint to convert trait

* Cleanup texture upload / download

* Download wgpu textures aligned

* abstract texture download into converter helper

* rename module

not only doing uploads anymore
conversion looks like a ok name

* Remove into_iter call and intermediate vector allocation

---------

Co-authored-by: Timon Schelling <me@timon.zip>
2025-09-26 14:30:01 +02:00
Timon ed22e6a63d
Desktop: Add rudimentary support for custom WGPU adapter selection (#3201)
* rudimentary custom wgpu adapter selection

* WgpuContextBuilder

* wasm fix

* fix wasm warnings

* Clean up

* Review suggestions

* fix
2025-09-25 14:38:26 +00:00
Dennis Kobert 4e47b5db93
Restructure gcore/text module and fix memory leak (#3221)
* Restructure gcore/text module and fix memory leak

* Remove unused import

* Fix default font fallback causing wrong caching and rename to TextContext

* Upgrade demo art
2025-09-25 15:29:07 +02:00
Salman Abuhaimed edc018d7b4
Fix Text node regression where font styles within a family are not being applied (#3186)
Fix text node styles not being applied
2025-09-18 19:11:50 -07:00
Keavon Chambers 9d15e56ce1 Fix and clean up typing-related flaws with the Math category of nodes 2025-09-18 16:37:01 -07:00
Keavon Chambers 7e3ab78ea4 Fix more flaws with 'Transform' node rad-to-deg migration; make 'Tangent on Path' also use degrees by default 2025-09-18 14:09:10 -07:00
Timon 3fe7c477e9
Desktop: Switch to the latest unreleased version of Winit (#3177)
* Use unstable winit

* Improve

* Remove unnecessary heap indirection
2025-09-17 16:40:43 +02:00
Keavon Chambers 4662cbbbc1 Make the 'Count Elements' and 'String Length' nodes return f64 for consistency with 'Instance Index' 2025-09-16 16:08:03 -07:00
Dennis Kobert e4d2805115
Add workaround for cache context nullification breaking nested loop indexes (#3178)
* Disable caching for the instance repeat etc. nodes

* Add usize implementation for caching and monitor nodes

* Change return type of instance index node back to f64

* Cleanup while loop

* Remove stray usize changes

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-09-16 21:59:43 +00:00
Dennis Kobert 390ce023ea
Fix regression when rotating a group, resulting in an incorrect transform cage bounding box (#3184)
Revert "Reuse click target bounding boxes for document bounds"

This reverts commit d9e8a71cd095971008b2e24fe90bbab9d6467115.
2025-09-16 13:41:44 -07:00
Keavon Chambers a1df16bc9e Switch infinite color/gradient rendering to a more robust approach 2025-09-13 14:03:11 -07:00
Salman Abuhaimed 3cc2aa8d89
Fix text node thread locals not being updated (#3173) 2025-09-13 11:33:00 +00:00
Dennis Kobert 5836416632
Optimize editor performance for node selection, click target bounds, and batched messages (#3162)
* Don't clone messages during batch processing

* Improve selected nodes perf and memoize network hash computation

* Reuse click target bounding boxes for document bounds

* Early terminate computing the connected count

* Cleanup
2025-09-11 10:08:26 +00:00
Dennis Kobert ad5d8fcd37
Optimize rendering by caching intermediate render results when panning/zooming (#3147)
* Add svg render node

WIP

Fix error in context nullificaton node insertion

Correctly translate metadata

Fix warning

* Cleanup

* Remove color / gradient check and fix svg defs

* Implement viewport filling transform modification for vello

* Cleanup and comments

* Code review
2025-09-11 11:35:33 +02:00
Keavon Chambers 9a32e79853
Rename `NodeInput::Network` to `NodeInput::Import` (#3163) 2025-09-10 20:50:15 -07:00
Adam Gerhant 332088bce1
Make the Transform node use angles in degrees instead of radians for Rotation and Skew (#3160)
* Make the Transform node use degrees not radians

* Migration script

* Migrate skew value input to store degrees

* Add comments

* Fix migrations to account for the old deprecated "Pivot" parameter

* Fix tooling interactions with degrees-based transforms

* Upgrade demo art

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-09-11 00:19:10 +00:00
Timon 9411612d7f
Move shader entrypoints to separate crate (#3157) 2025-09-10 10:20:45 +00:00
Keavon Chambers 22aa8c1264 Update UI widget designs to improve color consistency and add a narrow height mode 2025-09-08 21:48:22 -07:00
0SlowPoke0 485152bf8d
Add "Spiral" to the Shape tool and as a new node (#2803)
* made spiral node

* number of turns in decimal and arc-angle implementation

* logarithmic spiral

* unified log and arc spiral into spiral node

* add spiral shape in shape tool

* fix min value and degree unit

* make it compile

* updated the api

* changed the function_name

* [/] to update the turns widget in shape tool

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-09-08 14:37:43 -07:00
Priyanshu c384175910
Improve stability of the 'Sample Points' node (#3119)
improve perimeter calculation of the path bezier segments when it is very close to linear bezier curve

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-09-08 04:20:46 +00:00
0SlowPoke0 3e50d177b7
Add "Grid" to the Shape tool along with row/column gizmos (#2921)
* integrated grid shape in shape-tool

* add overlays,detection,transform for gizmo

* fix compile issues

* handle negative correctly,fix undo redo and abort

* fix missed merge conflicts

* fixed mouse cursor,correctly translatiing

* cleanup

* fix click-target area inside rect and spacing

* add 10px closer to gizmo line

* resolved conflicts

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-09-07 17:53:37 -07:00
Keavon Chambers a2c0693038
Fix most known issues with migrations failing to open documents from the past year (#3148) 2025-09-07 11:10:03 -07:00
Firestar99 ad99c14b29
Shaders: Provide WgpuExecutor via Scope (#3144)
shaders: automatically connect wgpu-executor
2025-09-05 18:51:17 +00:00
Firestar99 f12b4da549
Shaders: add `BufferStruct` to support bool and enums (#3109)
* node-macro: modernize `node` macro

* node-macro: add `CrateIdent` struct containing resolved crate paths

* shaders: add trait `BufferStruct` and derive macro

* shaders: `gamma_correction` and `channel_mixer` gpu nodes

* shaders: `selective_color` gpu node

* shaders: `brightness_contrast_classic` gpu node

* shaders: append GPU to display name

* node-macro: fixup doc links

* shaders: consistently append " GPU" to all shader node names
2025-09-05 16:32:41 +00:00
Dennis Kobert acd7ba38cc
Graphene: Fine-grained context caching (#2500)
* RFC: Fine Grained Context Caching

* Fix typos

* Fix label

* Add description of inject traits

* Explicitly support context modification

* Start implementation of context invalidation

* Add inject trait variants
* Route Extract / Inject traits to the proto nodes

* Implement context dependency analysis

* Implement context modification node insertion

* Fix erronous force graph run message

* Fix Extract* Inject* annotations in the nodes

* Require Hash implementation for VarArgs

* Fix nullification node insertion

* Cross of done items unresolved questions section

* Update Cargo.lock

* Fix context features propagation

* Update demo artwork

* Remove BondlessFootprint and FreezeRealTime nodes

* Fix migration

* Add migrations for adding context features to old networks

* Always update real time regardless of animation state

* Cargo fmt

* Fix tests

* Readd sed command to hopefully fix profile result parsing

* Add debug output to profiling pr

* Use new totals instead of summaries for for iai results

* Even more debugging

* Use correct debug metrics (hopefully)

* Add more MemoNode implementations

* Add context features annotation to shader node macro

* Cleanup

* Time -> RealTime

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-09-05 11:44:26 +00:00
Firestar99 5d441c2e18
Shaders: runtime and shader node codegen (#2985)
* shader-rt: initial

* shader-rt: fix recursion when generating shader node

* shader-rt: replace gpu node's args and ret types with `Raster<GPU>`

* shader-rt: properly cfg out the gpu node

* shader-rt: fix `impl Context` in the wrong places

* shader-rt: disable gpu blend node, needs two images

* shader-rt: connect shader runtime

* shader-rt: pass WgpuExecutor by reference

* shader-rt: correct bindings with derpy arg buffer

* shader-rt: manual pipeline layout, fixing errors when bindings got DCE'd

* shader-rt: correct RT format, working invert gpu node

* shader-rt: cleanup codegen with common sym struct

* shader-rt: correct arg buffer handling

* shader-nodes feature: put shader nodes behind feature gate

* shader-nodes feature: rename any `gpu_node` to `shader-node`

* shaders-rt: fix wgpu label name

* shaders-rt: explain fullscreen_vertex coordinates with a drawing
2025-09-05 08:33:53 +02:00
Firestar99 a10103311e
Shaders: rust-gpu integration to compile shader nodes to WGSL (#3097)
* shaders: shader compilation setup

* nix: use rustc_codegen_spirv.so from nix

* shaders: codegen for per_pixel_adjust shader nodes

* shaders: disable nodes needing bool

* shaders: `#[repr(u32)]` some enums

* shaders: add lint ignores from rust-gpu

* shaders: fix node-macro tests

* gcore-shaders: toml cleanup

* shader-nodes feature: put rust-gpu to wgsl compile behind feature gate

* shaders: fix use TokenStream2

* shaders: allow providing shader externally

* Update iai runner in workflow

---------

Co-authored-by: Timon Schelling <me@timon.zip>
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2025-09-02 14:10:32 +00:00
Keavon Chambers b5ebe78f5e
Update all frontend npm dependencies except Svelte and Vite (#3120)
* Upgrade node dependencies except Svelte 5 and its peer deps

* Fix lint errors

* Fix previous Rust deps upgrade breakage

* Fix demo artwork

* Allow profiling CI workflow to fail
2025-09-01 17:22:30 -07:00
Keavon Chambers 29684dde45
Update Rust dependencies (#3112)
* Update Rust dependencies

* Bump versions

* Try older ctor
2025-08-30 20:06:56 -07:00
Adam Gerhant f1a1275601
Add support for adding/removing a graph's primary imports/exports separately from the secondary (#3089)
* Primary Import/Export

* Primary Import/Export

* Complete import exports

* Final changes

* Improve line width

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-08-29 20:57:15 +00:00
mTvare c14e67ec28
Fix outside stroke alignment not using masks when transparent (#3060)
* Fix outside stroke alignment not using masks when transparent

* Fix for vello

* fix fixes

* cargo fmt

* scale stroke by align type

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-08-28 13:28:51 -07:00
Firestar99 95ef8a5343
Change `Table<Color>` node inputs to `Color` where only one value is used so GPU nodes work (#3096)
* graster-nodes: change `Table<Color>` params to `Color` where only one value is used

* Re-add support for Color and Option<Color>

* Add warning when a default value isn't parsed

---------

Co-authored-by: hypercube <0hypercube@gmail.com>
2025-08-28 15:16:56 +02:00
Priyanshu 9987112cc9
New node: 'Separate Subpaths' to break subpaths into individual vector table rows (#3069)
* impl separate paths node

* rename

* refactor

* Rename nodes 'Split Segments' -> 'Cut Segments' and 'Split Path' -> 'Cut Path'

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-08-28 06:07:09 +00:00
Firestar99 82784b46a0
Add node input type support for `f32` to enable usage on GPU (#3095)
* update Cargo.lock

* f32: switch to f32 params

* f32: more f32 params, remove f32 casts

* f32: property support for f32

* f32: fix test `stable_node_id_generation`

* Fix f32 properties

* Fix f32 frontend data types

* Rename TaggedValue::Vec2 to ::FVec2 and ::Affine2 to ::FAffine2

---------

Co-authored-by: hypercube <0hypercube@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-08-27 20:08:45 -07:00
Priyanshu 57853f755b
Fix box selection regression where only intersected, not contained, objects get selected (#3093)
* fix insideness checking

* fix selection insideness checking

* Revert changes to comments

* Revert unneed rename

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-08-27 21:22:13 +00:00
Firestar99 a744499f4f
Shaders: more `graster-nodes` no-std fixups (#3090)
* gcore-shaders: fix missing `num-traits/libm` features

* graster-nodes: fix missing cfg on use statements

* shaders: use unchecked Color constructors

* graster-nodes: remove async from shader nodes not needing it

* gcore-shaders: remove explicit fn pointer

* graster-nodes: make kurbo std-only

* graster-nodes: replace glam reexport with normal dep

* gcore: impl Display for ProtoNodeIdentifier

* unify glam workspace dep
2025-08-26 18:25:05 +00:00
Dennis Kobert d9cbf975ff
Deprecate automatic composition (#3088)
* Make manual_compositon non optional and rename to call_argument

* Fix clippy warnings

* Remove automatic composition compiler infrastructure

* Implement document migration

* Fix tests

* Fix compilation on web

* Fix doble number test

* Remove extra parens

* Cleanup

* Update demo artwork

* Remove last compose node mention

* Remove last mention of manual composition
2025-08-24 08:34:59 +00:00
Dennis Kobert bb364c92ad
Fix automatic Into node insertion (#3087)
Fix automatic into node insertion
2025-08-23 18:21:54 +02:00
Dennis Kobert 354bf93364
Store document node inputs in Arc to reduce memory consumption (#3086)
Store values in memo hash contanier in arc
2025-08-23 17:24:41 +02:00
Dennis Kobert 469f0a6c30
Remove lambda node inputs since they are no longer used (#3084)
* Remove lambda node inputs as they are now unused

* Fix warnings

* Fix tests

* Fix clippy warning
2025-08-23 12:16:49 +02:00
Dennis Kobert 7377871106
Fix clippy warnings (#3085)
* Run clippy fix

* Clippy v2

* Make const item static

* Cargo fmt
2025-08-23 11:45:47 +02:00
Dennis Kobert a4ec50d8ba
Improve robustness and performance of the boolean operation algorithm (#2191)
* Improve perf of path bool lib

* Use swap remove

* Use outer/inner bounding box for inclusion testing

* Reuse allocations for hit testing

* Use direct root finding for inclusion testing

* Reuse bounding box

* Use faster hash and specify capacities

* Use hashmap based approach for find vertices

* Unroll find_vertecies loop and use 32 bit positions

* Tune initial vec capacities

* Remove unused bounding boxes

* Use smallvec for storing outgoing edges

* Improve allocations for compute_minor

* Use approximate bounding box for edge finding

* Transition aabb to use glam vecs

* Make find vertecies use 64 bit again this is slower but less likely to cause issues

* Improve intersection candidate finding

* Remove loop check in bit vec iter

* Special case cubic line intersections

* Optimize grid rounding and add debug output

* Remove file write

* Remove faulty line intersection

* Fix grid rounding

* Improve robustness and cleanaup code

* Make elided lifetime explicit

* Fix tests

* Fix a boolean ops crash

* Add comment

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-08-21 23:15:36 +00:00
Timon 30e5d66105
Desktop: Implement desktop wrapper module (#3039)
* Prototyping desktop wrapper api

* Separate into multiple modules

* Some fixup

* Reimplement most functionality with editor api

* Fix texture life time crashes

* Fix scale

* Implement editor wrapper message queue

* Improve performance

* Handle native messages directly without submitting to event loop

* Fix overlay latency

* Move editor message execution to executor allows no shared state in editor wrapper

* Small clean up

* Small cleanup

* Some renames

* Cleaning up desktop wrapper interface

* Fix formatting

* Fix naming

* Move node graph execution result handling to app

* Fix FrontendMessage RenderOverlays usage

* Reimplement file drop and clean up file import and open messages

* Remove dbg

* Post merge fix

* Review changes
2025-08-20 13:27:36 +00:00
Dennis Kobert 7c30f6168b
Improve snapping performance (#3067)
* Use lyon_geom for intersection calculation of bezier segments

* Implement approximate nearest point calculation and loosen bounding boxes

* Add algorithm explanation

* Update editor/src/messages/tool/common_functionality/snapping/layer_snapper.rs

Co-authored-by: Keavon Chambers <keavon@keavon.com>

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-08-20 10:47:58 +02:00
Firestar99 b44a4fba1e
node-macro: cleanup `ParsedField` struct (#3064)
* node-macro: cleanup `ParsedField` struct

* node-macro: fixup tests
2025-08-19 09:25:58 +00:00
mTvare 5ed45ead6f
Fix click target not extending to correct limit for aligned strokes (#3065)
Fixes #3047
2025-08-18 12:30:57 -07:00
Firestar99 0a53eae4e0
Remove unused cargo dependencies (#3063)
* cargo shear

* fix warnings on master

* fix docs needing dev-dependency
2025-08-18 11:26:44 -07:00
Adesh Gupta 52174fa4c2
Remap Path tool point sliding to G G (#2913)
* Feat: Point sliding on G G

* Code cleanup

* Fix gg sliding behaviour

* Fix build after merge conflict resolution

* Fix slide point and add hints

* Fix history in segment insertion

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-08-17 03:39:38 +00:00
Keavon Chambers 3bcec37493
Remove the deprecated/archived Bezier-rs library from the repo (#3058)
Remove the Bezier-rs library from the repo
2025-08-16 17:29:00 -07:00
Priyanshu d22b2ca927
Refactor the Centroid node and `Subpath` struct and methods to use Kurbo, eliminating all remaining usages of Bezier-rs (#3036)
* define Subpath struct in gcore and refactor node-graph

* Refactor few methods

* refactoring worked!

* refactor centoid area and length

* remove unused

* cleanup

* fix pathseg_points function

* fix tranforming segments

* fix segment intersection

* refactor to_path_segments fn in gpath-bool crate

* refactor gcraft

* add bezier-rs dep

* Code review the editor directory

* use path-bool for solving roots

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-08-16 13:39:25 -07:00
Keavon Chambers bdc029c692
Add Table<Gradient> as a graphical type (#3051) 2025-08-13 01:42:51 -07:00
Keavon Chambers 1b351aca76
Replace the Color type with Table<Color> everywhere (#3048) 2025-08-12 00:38:23 -07:00
Keavon Chambers 2bb4509647
Replace the Spreadsheet panel with an improved Data panel (#3037)
* Improve the table data panel

* Add the "Window" menu bar section and polish everything
2025-08-10 07:46:42 -07:00
Keavon Chambers 2f4aef34e5
Add Table<Color> as a graphical type (#3033)
* Reduce code duplication in bounding box impls on Table

* Working Table<Color> rendering in the graph

* Implement color and fix other rendering with Vello and polish
2025-08-10 01:34:33 -07:00
Dennis Kobert d2ddf94bd0
Include graph runtime benchmarks in CI perf regression runs (#2780)
* Include graph runtime benchmarks in ci regression run

* Update benchmarking workflow

* Add render slowdown

* Fix baseline cache

* Remove benchmark compilation validation run

* Include render node in runtime benchmarks

* Collapse sections without changes

* Readd rulers between the sections

* Add review suggestions

* Rulers rule

* Fix whitespace
2025-08-07 14:32:19 +02:00
Dennis Kobert 9b8935d201
Add iai versions of the runtime benchmarks (#3016)
* Include graph runtime benchmarks in ci regression run

* Update benchmarking workflow

* Remove ci script changes
2025-08-07 00:48:25 +02:00
Firestar99 caa228a1ec
Shaders: `graster-nodes` no-std fixups (#2984)
* wgpu-executor: remove useless features

* wgpu-executor: cleanup copy-pasted code

* gcore-shaders: no_std fixups
2025-08-06 14:10:08 +00:00
Priyanshu b1f2cf706e
Refactor the node graph UI wires to render using Kurbo (#2994)
* impl function to check bezpath insideness

* refactor network interface wires to use kurbo

* refactor

* refactor

* fix adding MoveTo instead of LineTo to the grid aligned wire bezpath

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-08-06 02:17:00 -07:00
Keavon Chambers 0f638314dc
Rename the Group type to Graphic everywhere (#3009) 2025-08-05 20:55:15 -07:00
Keavon Chambers 2e1396462c
Eliminate bare Graphic and Artboard graph data by making Merge and Artboard nodes internally use tables (#2996)
* Eliminate bare Graphic and Artboard graph data by making Merge and Artboard nodes internally use tables

* Make the Extend node user-facing
2025-08-05 02:24:12 -07:00
Keavon Chambers 4b11dced48 Make Table<T> implement the IntoIterator trait 2025-08-04 15:20:48 -07:00
Keavon Chambers c98477d8ed
Rename graphic subtypes to remove their "data" and "group" suffixes (#2990)
* Rename VectorData to Vector

* Rename other VectorData* types to Vector*

* Move assorted data types out of vector_data.rs into misc.rs

* Rename vector_data.rs to vector_types.rs and remove the vector_types module folder

* Rename other references to "vector data"

* Remove label widgets for raster/vector/group to use "-" instead

* Rename RasterData to Raster

* Rename GraphicGroup to Group

* Fix migrations and rename graphic_element.rs -> graphic.rs

* Rename TaggedValue::ArtboardGroup -> TaggedValue::Artboard
2025-08-04 04:53:25 -07:00
Keavon Chambers 5637f01845
Rename GraphicElement -> Graphic and trait GraphicElementRendered -> Render (#2987) 2025-08-03 16:15:02 -07:00
Keavon Chambers a0ce56d9b6
Rename Instances<T> to Table<T> and the "instance" terminology to "TableRow" and "element" (#2981)
* Instances -> Table

* instances.rs -> table.rs

* Rename occurrances of the word "instances"

* .instance -> .element

* Instance* -> TableRow*

* Rename Table and TableRow methods to not say "instance"

* Remove presumed unused serde defaults now that tables default to length 0 not 1

* Rename occurences of the word "instance"

* Un-alias the RasterDataTable<Storage>, VectorDataTable, GraphicGroupTable, ArtboardGroupTable typedefs

* Move artboard type and node code out of graphic_element.rs to a new artboard.rs

* Organize the TaggedValues

* Fix tests

* Fix prior regression with Image Value node not upgrading
2025-08-03 04:12:18 -07:00