Commit graph

555 commits

Author SHA1 Message Date
Adam
b50062806c Separate svelte node graph rendering 2025-11-17 03:22:38 -08:00
Adam
9bfa58b442 Add invalid type 2025-11-17 03:03:37 -08:00
Adam
ced44310bf Add complete valid types 2025-11-15 10:59:13 -08:00
Keavon Chambers
ca5785bc8f
Show a "Ctrl +" label instead of "Ctrl =" for View > Zoom In (#3377)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
2025-11-13 17:24:04 -08:00
Keavon Chambers
ac74bd9903 Allow the Stroke node to receive "Dash Lengths" values from the node graph
Some checks are pending
Editor: Dev & CI / cargo-deny (push) Waiting to run
Editor: Dev & CI / build (push) Waiting to run
2025-11-12 01:14:17 -08: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
6d669ad734
Add documentation to many nodes (#3338)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
2025-11-03 15:51:50 -08:00
Keavon Chambers
055d543117 Rename the 'Index' node to 'Index Elements'
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
2025-11-03 13:35:56 -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
James Lindsay
7c28a53cd1
Fix the Spline node to maintain stable segment IDs (#3321)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
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)
Some checks failed
Editor: Dev & CI / build (push) Has been cancelled
Editor: Dev & CI / cargo-deny (push) Has been cancelled
* 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)
Some checks failed
Editor: Dev & CI / build (push) Has been cancelled
Editor: Dev & CI / cargo-deny (push) Has been cancelled
* 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
Keavon Chambers
3364059e02
Add tooltip documentation to the graphic flattening nodes and string nodes (#3269)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
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)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
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)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
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
Dennis Kobert
ffc74273cc
Implement Convert trait to convert between CPU and GPU images (#3194)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* 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
Dennis Kobert
4e47b5db93
Restructure gcore/text module and fix memory leak (#3221)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* 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)
Some checks failed
Editor: Dev & CI / build (push) Has been cancelled
Editor: Dev & CI / cargo-deny (push) Has been cancelled
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
Keavon Chambers
4662cbbbc1 Make the 'Count Elements' and 'String Length' nodes return f64 for consistency with 'Instance Index'
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
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 d9e8a71cd0.
2025-09-16 13:41:44 -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)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* 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
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
Keavon Chambers
22aa8c1264 Update UI widget designs to improve color consistency and add a narrow height mode
Some checks failed
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
Website / build (push) Has been cancelled
2025-09-08 21:48:22 -07:00
0SlowPoke0
485152bf8d
Add "Spiral" to the Shape tool and as a new node (#2803)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
Website / build (push) Waiting to run
* 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
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)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* 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
Keavon Chambers
29684dde45
Update Rust dependencies (#3112)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* 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
Priyanshu
9987112cc9
New node: 'Separate Subpaths' to break subpaths into individual vector table rows (#3069)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* 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
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)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* 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)
Some checks failed
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
Website / build (push) Has been cancelled
* 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)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
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
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
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
mTvare
5ed45ead6f
Fix click target not extending to correct limit for aligned strokes (#3065)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
Fixes #3047
2025-08-18 12:30:57 -07:00