Commit graph

541 commits

Author SHA1 Message Date
mtvare6
208f8e4d84 Add mix node 2025-06-05 06:28:22 +05:30
Dennis Kobert
76ecdc8f1b
Fix the 'Upload Texture' node (#2680)
* Fix upload texture node

* Feature gate gpu node implemenations
2025-05-29 04:35:35 -07:00
mTvare
4d2e1d57fd
Instance table refactor part 6: remove usage of one_instance_* functions (#2672)
* Refactor the spline node

* Refactor the jitter_points node

* Refactor the morph node

* Refactor the merge_by_distance node

* Refactor the area node

* Refactor the centroid node

* Refactor the bevel node

* Refactor the tests

* Code review

* Refactor the morph node

* Refactor the extend_image_to_bounds and sample_image node

* Refactor the dehaze node

* Refactor the blur node

* Refactor the vector_points node

* Refactor the blit node

* Refactor the blend_gpu_image node

* Refactor the path_modify node

* Refactor the image_color_palette

* Fix copy_to_points

* Code review

* Partially make progress toward fixing the Draw Canvas node

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-05-29 03:08:16 -07:00
0SlowPoke0
f6e592da5b
New nodes: 'Point Inside Shape' and 'Close Path' (#2673)
* add point inside shape,close path,and disabled node to layer conversion

* removed the usage one_instance

* code review
2025-05-26 02:15:31 -07:00
Keavon Chambers
2cee9e24cd Refactor some more vector nodes to use loops instead of one_instance, as a start to #1834 part 6 2025-05-24 21:33:58 -07:00
Keavon Chambers
80f38d91c0
Optimize Poisson-disk point sampling by halving the number of line intersection checks with caching (#2661) 2025-05-22 00:07:12 -07:00
Priyanshu
487b17a8d7
Fix 'Scatter Points' node artifacts (#2657)
* fix

* improve variable names

* fix point offsetting.

* Code review

* Update red dress artwork to preserve its look with new seeds

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-05-21 21:22:54 -07:00
Mohamed Osama
66a297df2c
Improve the distribution part of the snapping system (#2626)
* fix distribution snapper visualization going far from layers

* fix bugs

* Remove traces

* remove comment

* Fix tests

* Rename distribution snapper variables from x, y to horizontal, vertical

* Fix tests

* Fix bug where center point and corner point have to be enabled for distribution_snapper to work

* Cleanup

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-05-20 00:15:56 -07:00
Keavon Chambers
f624edb801 Fix running on the native target without the Linux Wayland platform 2025-05-19 14:24:10 -07:00
Dennis Kobert
7a2144e31e
Fix and reenable profiling CI action (#2632)
* Reenable profiling ci action

* Remove deprecated iai feature flag

* Remove unused import

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-05-18 20:31:15 +00:00
Priyanshu
ebf351277d
Refactor and fix append_bezpath() method on vector data (#2649)
* refactor 'append_bezpath' method.

* fix a bug.

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-05-18 13:15:13 -07:00
Keavon Chambers
a8e209e44c
Remove the old node macro and fix/clean up several raster nodes (#2650)
* Fix several broken raster nodes and clean up leftover old node system code

* Migrate Brightness/Contrast to the new node macro, and fix it

* Remove last usages of old_node_fn

* Remove old_node_fn
2025-05-17 21:24:32 -07:00
Keavon Chambers
77f8bfd9ed Improve clarify of type errors and tooltip diagnostics 2025-05-17 16:13:05 -07:00
Priyanshu
54b4ef145c
Refactor the 'Scatter Points' node to use Kurbo instead of Bezier-rs (#2634)
* it works!

* clean up

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-05-13 06:26:43 +00:00
Keavon Chambers
5861e635fb Copy Poisson-disk algorithms from Bezier-rs into gcore vector algorithms 2025-05-12 22:34:37 -07:00
Keavon Chambers
d3b5dc5712
Clean up 'Image' node by removing old 'Cull' node in sub-network (#2643)
* Clean up 'Image' node by removing old 'Cull' node in sub-network

* Fix gamma correction on Decode Image node
2025-05-12 18:40:48 -07:00
Priyanshu
0022680336
Avoid memory allocation when precomputed segments lengths is provided. (#2637)
* Avoid allocating a Vec when precomputed segments lengths is provided.

* improved using option type.

* we don't even need option type as Vec::new() doesn't allocate.

* clean up
2025-05-11 08:21:41 -07:00
Keavon Chambers
db34ac3f53 Refactor some vector nodes to use loops instead of one_instance, as a start to #1834 part 6 2025-05-08 23:56:10 -07:00
Priyanshu
916cca4a63
Fix a comment introduced in the previous commit (#2631)
fix comment
2025-05-06 10:03:31 +00:00
Priyanshu
1427fb93f9
Refactor the 'Sample Points' node to use Kurbo instead of Bezier-rs (#2629)
* fix naming

* refactor sample_points node/function.

* avoid recalculating segments length to find point on bezpath.

* cleanup

* rename few variables

* fix transformation and use precomputed segment lengths

* write comments

* set POSITION_ACCURACY and PERIMETER_ACCURACY to smaller value to get better approximate euclidean position on a path

* fix segment index when t value is 1.0

* Improve comments

* move sampling points code into a separate function

* it works! finding the segment index is linear now!

* small fix and improve variable names & comment

* Naming

* evaluate segment at t as euclidean distance. fix.

* improve comment & variable name

---------

Co-authored-by: indierusty <priyaayadav@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-05-06 09:25:45 +00:00
kythyria
9ef9b205d9
Auto-generate enum type widget boilerplate for radio buttons and dropdown menus (#2589)
* First draft of factoring out the dropdown boilerplate

* Add proc macro for enum boilerplate

* Detect whether to say `crate` or the name

* Clean up the input and naming of the enum macro

* Rename a file

* Do the rename of code too

* Use the attribute-driven selection of radio vs dropdown

* Add a metadata struct and tooltips

* Move the new traits to a better place.

* Use ChoiceType, part 1

* Use ChoiceType, part 2

* Introduce a builder API for choice widgets

* Start using the new new API

* DomainWarpType should be a dropdown still

* Handle the case where a node property can never have a socket

* Rustfmt

* Code review

* Update stable node IDs in test

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-05-01 04:14:26 -07:00
mTvare
9303953cf8
Update #[min/max] node macro attributes to #[soft/hard]_[min/max] and make them clamp their input data (#2464)
* Fix min and max macro not enforcing limits when data flows

* Use trait based clamping

* Remove min/max from testing

* cargo fmt

* Resolve into min, and hard_min

* cargo fmt

* fix traits

* cargo fmt

* fix tests

* rename as soft_x

* Add validation code

* Clean up (not compiling because of DVec2 clamping)

* Avoid needing to add trait bounds to node definitions

* Code review

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-30 23:52:27 -07:00
Priyanshu
d5cb380328
Refactor the 'Position on Path' and 'Tangent on Path' nodes to use the Kurbo API (#2611)
* rough refactor of Position on Path node

* refactor

* refactor 'Tangent on Path' node implementation to use kurbo API

* Code review

---------

Co-authored-by: indierusty <priyaayadav@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-29 21:51:10 -07:00
Calvin
23b2c5bdf2
New node: Blur (#2477)
* Implementation of gaussian blur and box blur with linear/nonlinear colorspace in raster category

* styling/formatting

* Partial code review

* remove image crate, use conversion functions from color.rs

* fix box blur checkmark, fix linear/gamma conversion

* mult/unmult alpha before/after blur

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-30 02:47:46 +00:00
Keavon Chambers
80b8df8d42 FIx the 'Morph' node to not fail on topology changes like holes 2025-04-29 04:49:08 -07:00
Keavon Chambers
471ef87801 Add reference point input to the Mirror node 2025-04-24 05:33:20 -07:00
0SlowPoke0
d39308c048
Add Path tool feature for angle locking upon pressing Ctrl while dragging handle over anchor (#2612)
* almost_fixed

* fix need to refactor

* fixed issed need to refactor

* refactor-done fixed issue

* move function to common_functionality

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-23 20:39:14 -07:00
Mateo
3d37ef79ac
Add shape fill overlays when closing a path (Pen tool) or filling it (Fill tool) (#2521)
* Make the Pen tool show a path being closed by drawing a filled overlay when hovering the endpoint

* Add to_css to color.rs

* Check before unwrapping layer

* Close if in the right place

* Fix typo

* Format code

* Support discontinuous paths for closing preview

* Code review

* Denser fill lines

* Fill tool preview with strip lines only and revert pen shape-closing opacity

* Small adjustments to fill preview

* Fix line width of fill preview

* Use a pattern to preview the fill tool and fix canvas clearing

* Update pattern

* Simplify code

* Format code

* Use secondary color to preview fill if shift is pressed

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-23 18:33:08 -07:00
Keavon Chambers
ac9fb2b02d
Improve instancing nodes (make them output group data, add 'Instance Repeat', fix Flatten Vector Elements click targets, and more) (#2610)
* Improve instancing nodes (make them output group data, add 'Instance Repeat', fix Flatten Vector Elements click targets, and more)

* Fix test?

* Fix more tests?

* Fix moar test??

* Clean up instance method naming
2025-04-22 17:55:57 -07:00
Priyanshu
a29802de36
Refactor the Solidify Stroke node implementation to use the Kurbo API (#2608)
* impl append_bezpath method to push a kurbo bezier path to vector data.

* refactor stroke_bezier_paths method and StrokePathIter iterator implementation

* refactor

* impl VectorData method to get strokes iterator of kurbo bezpath

* impl solidify stroke node

* refactor

* use StrokeOptLevel::Optimized for generation stroke fill

* add miter limit and dashes

* fix naming

---------

Co-authored-by: indierusty <priyaayadav@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-22 08:32:58 +00:00
James Lindsay
704dad4f76
Fix angle logic in the Grid node to allow slanted isometric grids (#2602)
* Fix angles

* Fix hardcoded index

* More information on monitor nodes
2025-04-20 14:16:27 -07:00
Priyanshu
dd1feee734
Replace Bezier-rs use in the 'Offset Path' node with a Kurbo algorithm (#2596)
* minimally replace bezier-rs use in Offset Path node implementation with kurbo's API

* fix kurbo import

* refactor

* Code review

---------

Co-authored-by: indierusty <priyaayadav@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-20 04:04:28 +00:00
Keavon Chambers
a376832480
Fix and improve robustness of node/parameter tooltip plumbing; simplify properties row widget boilerplate (#2600)
* WIP

* WIP2

* Further cleanup
2025-04-19 20:25:36 -07:00
ilya sheprut
adfcff7599
New node: Arc (#2470)
* init

* add closed and slice options

* Make it work beyond -360 to 360 degrees

* Switch "closed" and "slice" to ArcType enum

* Update default ranges

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-18 09:42:07 +00:00
Keavon Chambers
fa21385d2c
New nodes: 'Position on Path' and 'Tangent on Path' (#2588) 2025-04-16 22:50:50 -07:00
James Lindsay
435a6daf25
Add the first field-based nodes: 'Instance on Points', 'Instance Position', 'Instance Index', as well as 'Grid' (#2574)
* Basic fields

* Add 'Extract XY' and 'Split Vector2' nodes

* Add 'Instance Index' node

* Fix test again

* Improve grid generator to support rectangular as well

* Avoid crashing

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-16 11:58:59 +00:00
kythyria
a94354df04
New node: Dimensions (#2576)
* Add node for size of bounding box

* Keep rustfmt happy

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-16 01:07:34 +00:00
Dennis Kobert
9a62c1c089
Fix Poisson-disk sampling with negative space from nested subpaths (#2569)
* Fix poisson disk sampling with nested subpaths

Previously all subpaths were considered independently for the poisson disk sampling evaluation. We now check agains all subpaths which might contain the point to fix shapes with holes such as fonts with letters with holes in them

* Fix wasm demo

* Fix counting overlapping areas twice

* Rename shape variables to subpath variants
2025-04-15 13:37:20 +00:00
Dennis Kobert
9b23c7e2db
Update Tauri to v2 and execute only the node graph in native (#2362)
* Migrate tauri app to v2

* Move flake files to sub directory

* Remove unused plugins

* Backport some of the tauri code

* Implement async node graph execution

Only move node runtime to native code

* Always use gpu feature for tauri

* Fix serialization

* Add logging filters

* Enable native window rendering with vello

* Cleanup

* Remove unused editor instance

* Remove changes from vite config

* Remove warnings

* Remove unused files

* Fix most tests

* Cleanup

* Apply frontend lint

* Readd flake.nix

* Fix tests using --all-features

* Code review

* Enable all backends

* Fix monitor node downcast types

* Change debug log to a warning

* Disable shader passthrough

* Cleanup unused imports

* Remove warning

* Update project setup instructions

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-14 11:43:15 +00:00
mTvare
3e6021fb8f
Fix inability to drag axis-aligned lines (#2561)
* Fix 1 and 3

* Fix 2

* Shape tools refactor

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-13 03:51:40 -07:00
Keavon Chambers
e759e62291 Comment out all remaining active Imaginate code 2025-04-12 17:32:24 -07:00
Keavon Chambers
a8a5a1f3fd New node: Sample Gradient 2025-04-12 04:19:46 -07:00
Keavon Chambers
69069ef723
Fix the 'Repeat', 'Circular Repeat', and 'Mirror' nodes to work on point cloud vector data (#2553)
* Include points in bounding box calculations

* Fix unrelated crash from debug assert when reordering root-level folders

* Fix another unrelated crash from debug assert when GRS scaling to size 0

* Fix several vector nodes to respect and propagate local transform space
2025-04-12 02:18:31 -07:00
kythyria
c137e44b71
Fix the 'Bounding Box' node crashing on empty or single-point vector data input (#2529)
* Make Bounding Box have empty output on empty input

Fixes a crash when using the text tool and the Text node is connected to
a Bounding Box node.

* Use .map().unwrap_or_default()

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-10 02:48:44 -07:00
Utsav Singh
93f7004ece
Make the node catalog, originating from a wire dropped in the graph, filter for valid types (#2423)
* Add InputType based filtering capabilites to NodeCatalog.
Send InputTypes through SendUiMetadata under
odeTypes.
Update NodeCatalog.svelte component to support 	ype based filtering.
Update ContextMenuData to support compatibleType as an input to the searchTerm for the NodeCatalog.
Update Graph.svelte component to support new ContextMenuData enum types.
Send CompatibleType data from rust backend on wire drag and release to NodeCatalog to already show filtered data.

* Add InputType based filtering capabilites to NodeCatalog.
Send InputTypes through SendUiMetadata under
odeTypes.
Update NodeCatalog.svelte component to support 	ype based filtering.
Update ContextMenuData to support compatibleType as an input to the searchTerm for the NodeCatalog.
Update Graph.svelte component to support new ContextMenuData enum types.
Send CompatibleType data from rust backend on wire drag and release to NodeCatalog to already show filtered data.

* Open NodeCatalog on DoubleClick in empty node graph area

* Capture Node implementations and filter out uncatogrised nodes before sending metadata.
Update NodeCatalog Search filter to support single type search alongside name and category search

* Take union of DocumentNodeTypes and registered node implementations, Update missing categories and make sure to remove nodes with empty categories

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-09 01:07:35 -07:00
0SlowPoke0
6a8386d1e9
Improve Pen tool handle dragging with Tab swapping, Ctrl angle locking, and directly dragging the closing endpoint in handle (#2452)
* added handle_types and refactored the handle_adjustments

* anchor move refactor

* code-todo-fix

* removed-draw-mode

* kind of works need to figure out snapping

* some refactoring

* refactor+overlays..need to fix the snapping and dragging

* added docs

* got stuck in space move

* fixed all issues

* comments and small fixes

* completed last issue and refactor

* major fixes and improv

* fixed edge cases

* edge cases fixed

* fix edge cases and add docs

* Code review pass

* rename ,bug fixes

* Add terminology diagram

* Add Ctrl "Lock Angle" hint

* Rename other hint

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-07 23:26:51 -07:00
Ellen Gu
32aee1ebf9
Add Vello support for Outline view mode rendering; add non_scaling to strokes (SVG, not yet Vello) (#2455)
* fix noise pattern parameter issue

* removed the commented out line

* Fix outline mode stroke width not consistent

* add non scaling stroke option

* Fix backward compatibility

* Clean Debug Message

* clean code

* clean code 2

* Add vello outline support

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-07 00:02:11 +00:00
Oliver Davies
81db769737
Minor fixes for 'Round Corners' and 'Mirror' nodes (#2510)
* Fix round corners node not properly maintaing click targets, added keep_original bool to mirror node

* Fixed fix for the theta angle

* Add upgrade script for Mirror node

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-06 02:00:55 -07:00
kythyria
412dfc293a
Make the 'Tangent Inverse' node accept DVec2 in lieu of the separate atan2 node (#2516)
* Make the Tangent Inverse node accept DVec2

If given a DVec2 it will be atan2 instead of normal atan.

* Remove the now-redundant atan2 node

* Doc comment

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-06 01:32:02 -07:00
Dennis Kobert
8d8e2edc5f
Add 'Freeze Real Time' and 'Boundless Footprint' nodes as alternatives to using 'Memoize Impure' (#2509)
* WIP debugging

* Only create parent ref if var args are used in context + Cleanup

* Eval nodes with None instead of relying on MemoImpure

* Remove unused imports

* Show parent in debug output

* Remove TODO comment
2025-04-02 11:31:52 +00:00