Commit graph

602 commits

Author SHA1 Message Date
Ezbaze
5b5b369dcd
Make selected Text category nodes show a multi-line text area instead of one-line text field (#2816)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* Make String Value node input a TextArea

Signed-off-by: ezbaze <68749104+Ezbaze@users.noreply.github.com>

* Replace link to Tauri

Signed-off-by: ezbaze <68749104+Ezbaze@users.noreply.github.com>

* Make String Concatenate node & Replace String node inputs into a TextArea

Signed-off-by: ezbaze <68749104+Ezbaze@users.noreply.github.com>

---------

Signed-off-by: ezbaze <68749104+Ezbaze@users.noreply.github.com>
2025-07-05 11:34:35 +00:00
Adam Gerhant
f57163c795
Port node graph wires to the backend and improve graph UI performance (#2795)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* Improve node graph performance

* Fix wire bugs, add type default for properties.

* Grid aligned wire paths

* remove type source

* node from exposed input

* Refresh wires on preference change

* merge fixes

* Code review

* Fix names

* Code review

* Fix wires on redo/undo

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-07-04 22:53:37 -07:00
Firestar99
8a0241f0fa
Fix running tests locally; fix migrations for relocated nodes (#2805)
* fix `BoundingBox for Raster<GPU>` when `wgpu` feature is disabled

* fix `tinyvec` crate not being `std` by default

* fixup migration for `CoordinateValueNode`

* fixup migration for raster nodes
2025-07-04 02:56:22 -07:00
Firestar99
a182a7347e
Extract gbrush (#2784)
Some checks failed
Editor: Dev & CI / build (push) Has been cancelled
Editor: Dev & CI / cargo-deny (push) Has been cancelled
2025-07-01 18:38:47 +00:00
Firestar99
602d7e8bd1
Extract graster-nodes (#2783) 2025-07-01 18:12:12 +00:00
Firestar99
8e2c206a01
node macro: copy visibility from node function (#2782) 2025-07-01 15:29:00 +00:00
Keavon Chambers
8c5accc069
Clean up node catalog by adding missing units, more tooltips; fix 'Line' node missing parameters (#2813)
* Fix unit usages

* Add node and parameter doc comments

* Fix the parameters panel for the 'Line' node when added from the graph

* Clean up nodes

* Fix tests

* Update the demo artwork
2025-07-01 07:47:54 -07:00
Keavon Chambers
c671705945 New node: 'Index' 2025-07-01 05:25:33 -07:00
Salman Abuhaimed
83773baa00
Replace Rustybuzz with Parley for text layout, and add text tilt parameter (#2739)
* replace rustybuzz with parley for text layout handling

change text input direction based on text direction

* Code review

* change default character spacing to 0

* add shear to text node

this also adds migration code for documents that don't have shear

* shear migration for text node

- add shear property
- set character spacing to 0

* use old max_width and max_height in text migration if available

* Final code review pass

* Add units to the parameters

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-07-01 02:23:17 -07:00
Dennis Kobert
0c376d1f9b
Disable preprocessor insertion of IntoNodes in the graph to avoid intermittent math node type errors (#2802)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
Disable insertion of into nodes into the graph
2025-06-30 03:07:09 -07:00
0SlowPoke0
71ddae9028
Fix Path tool multi-point handle scaling behavior and double-click smooth/sharp conversion on rectangles (#2765)
* fixed double-click on anchor connected to linear segments

* fix when scaling when anchor

* Nit

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-06-30 07:56:22 +00:00
Adesh Gupta
391ed34a30
Add segment editing mode to the Path tool (#2712)
* Segment select mode upto dragging

* Lasso select for segment editing

* Formatting

* Compatibility with point selection mode

* Add delete segment support and drawing from inside of shape

* Add GRS support for selected segments

* Cleanup and add dynamic hints

* Fix double click behaviour and overlays

* Format code

* Fix merge

* Fix Lint

* Fix formatting

* Fix lasso bug

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-06-29 23:19:54 -07:00
James Lindsay
532e913017
Fix DropdownInput widget not reactively updating when its content changes (#2770)
* Improve reactivity of DropdownInput.svelte

* Fix formatting lint

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-06-28 02:59:03 +00:00
James Lindsay
62c7f88f5b
Fix incorrectly calculating nonzero-area bounding boxes for empty raster images (#2772)
No bounding box for empty rasters

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-06-27 19:37:37 -07:00
Dennis Kobert
357e77077d
Only compute bounding box for layers being rendered by Vello when actually used (#2771)
Only compute bounding box for vello when it is actually used

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-06-27 19:06:52 -07:00
Firestar99
ecd7999ca7
Extract gmath_nodes from gcore::ops, create mods debug and extract_xy (#2764) 2025-06-28 00:04:24 +02:00
Firestar99
9c4ab34a58
Extract gsvg_renderer from gcore, remove gcore/vello feature (#2760)
Extract `gsvg_renderer` from `gcore`, remove `gcore/vello` feature
2025-06-27 13:47:46 +00:00
Firestar99
ffc6c5532b
Extract gpath_bool from mod gstd::ops path_bool-related nodes (#2762)
* cargo shear

* Extract `gpath_bool` from `mod gstd::ops` path_bool-related nodes
2025-06-27 13:12:08 +00:00
Firestar99
d581319ee8
Prep gcore splitup 2: Vector extension traits (#2759)
* extension trait for `MergeByDistance::merge_by_distance_*`

* extension trait for `VectorData::append_bezpath`

* extension trait for `HandleId::set_relative_position`

* remove unreferenced rust files
2025-06-27 12:30:12 +02:00
Firestar99
2ddae98bcf
Prep gcore splitup: move various symbols into their own modules (#2746)
* move `trait AsU32` from `gcore::vector::misc` to `gcore`

* move blending and gradient to their own modules

* fix unused warnings

* move `Quad`, `Rect` and `BBox` to `gcore::math`

* extract `ReferencePoint` and transform nodes from `transform`

* move color-related code to `mod color`

* fix unused warning in test code

* move blending-related nodes and code to `mod blending_nodes`

* move ClickTarget code to `mod vector::click_target`
2025-06-27 09:54:34 +00:00
0SlowPoke0
d8d2a51926
Refactor shape gizmo interactivity to support future shape tools (#2748)
* impl GizmoHandlerTrait,Gizmo-manager and add comments

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-06-26 22:34:36 -07:00
Keavon Chambers
1875779b0a Remove dead code for Imaginate 2025-06-26 18:46:46 -07:00
Dennis Kobert
a40a760f27
Add automatic type conversion and the node graph preprocessor (#2478)
* Prototype document network level into node insertion

* Implement Convert trait / node for places we can't use Into

* Add isize/usize and i128/u128 implementations for Convert trait

* Factor out substitutions into preprocessor crate

* Simplify layer node further

* Code review

* Mark preprocessed networks as generated

* Revert changes to layer node definition

* Skip generated flag for serialization

* Don't expand for tests

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-06-26 16:10:14 -07:00
Priyanshu
86da69e33f
Fix 'Morph' node lerping the target paths to its end point instead of start point (#2754)
* fix lerping the target paths to the point at the end of path instead of the start.

* comment

* append a MoveTo element first if the bezpath is empty

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-06-26 07:44:22 +00:00
Keavon Chambers
02afd08c80 Fix 'Scatter Points' node double transformation of points and remove segments connecting the points 2025-06-26 00:19:49 -07:00
Ahmed Moharram
504af4e68d
Rename 'Sample Points' node to 'Sample Polyline' and add a parameter spacing based on separation or quantity (#2727)
* Added Count point Radio button to property pannel

* Implemented on Count radio button functionality

* Fixed linting and Title case problem

* Fixing more linting problem

* Instance tables refactor part 8: Make repeater nodes use pivot not bbox and output instance type not group; rename 'Flatten Vector Elements' to 'Flatten Path' and add 'Flatten Vector' (#2697)

Make repeater nodes use pivot not bbox and output instance type not group; rename 'Flatten Vector Elements' to 'Flatten Path' and add 'Flatten Vector'

* Refactor the 'Bounding Box' node to use Kurbo instead of Bezier-rs (#2662)

* use kurbo's default accuracy constant

* fix append_bezpath() method

* refactor bounding box node

* fix append bezpath implementation.

* comments

---------

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

* Add overlays for free-floating anchors on hovered/selected vector layers (#2630)

* Add selection overlay for free-floating anchors

* Add hover overlay for free-floating anchors

* Refactor outline_free_floating anchor

* Add single-anchor click targets on VectorData

* Modify ClickTarget to adapt for Subpath and PointGroup

* Fix Rust formatting

* Remove debug statements

* Add point groups support in VectorDataTable::add_upstream_click_targets

* Improve overlay for free floating anchors

* Remove datatype for nodes_to_shift

* Fix formatting in select_tool.rs

* Lints

* Code review

* Remove references to point_group

* Refactor ManipulatorGroup for FreePoint in ClickTargetGroup

* Rename ClickTargetGroup to ClickTargetType

* Refactor outline_free_floating_anchors into outline

* Adapt TransformCage to disable dragging and rotating on a single anchor layer

* Fix hover on single points

* Fix comments

* Lints

* Code review pass

---------

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

* Add anchor sliding along adjacent segments in the Path tool (#2682)

* Improved comments

* Add point sliding with approximate t value

* Add similarity calculation

* Numerical approach to fit the curve

* Reliable point sliding for cubic segments

* Fix formatting and clean comments

* Fix cubic with one handle logic

* Cancel on right click and escape

* Two parameter optimization

* Esc/ Right click cancellation

* Code review

* Fix dynamic hints

* Revert selected_points_counts and fix comments

* Code review

---------

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

* Fix Sample Points node to avoid duplicating endpoints instead of closing its sampled paths (#2714)

* Skip duplicate endpoint and close sampled paths in Sample Points node
Closes #2713

* Comment

---------

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

* Implemented on Count radio button functionality

* Fixed linting and Title case problem

* The sample count can now work with adaptive spacing

* Readying for production

* Rename to 'Sample Polyline' and add migration

* Upgrade demo artwork

* Add monomorphization

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: Priyanshu <indierusty@gmail.com>
Co-authored-by: seam0s <153828136+seam0s-dev@users.noreply.github.com>
Co-authored-by: Adesh Gupta <148623820+4adex@users.noreply.github.com>
Co-authored-by: Ezbaze <68749104+Ezbaze@users.noreply.github.com>
2025-06-25 20:14:08 -07:00
Keavon Chambers
4a65ad290c Fix 'Boolean Operation' node merge-by-distance post-processing
Fixes #2750
2025-06-24 18:23:09 -07:00
Keavon Chambers
11ba2cc0fe New node: 'Split Segments' 2025-06-24 04:55:27 -07:00
Keavon Chambers
fdb09e334b Improve the categorization across many nodes 2025-06-23 18:52:05 -07:00
Ezbaze
2ec0ff38f3
Improve node creation menu and categorization (#2719)
* Change node categories

Signed-off-by: ezbaze <rybitwamateusz3@gmail.com>

* Restore Ezbaze's other work that was lost in the rebase

---------

Signed-off-by: ezbaze <rybitwamateusz3@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-06-23 18:51:16 -07:00
Firestar99
0e8eb481bf
Extract gapplication_io from gcore (#2742)
move `gcore::application_io` into the new crate `gapplication-io`, remove features `wasm` and `wgpu` from `gcore`
2025-06-23 11:35:14 +02:00
Keavon Chambers
ae88f4a3de Replace all hard-coded magic number node input indices with *Input::INDEX constants 2025-06-22 23:18:34 -07:00
Priyanshu
930278128d
New nodes: 'Path Length', 'Count', and 'Split Path' (#2731)
* impl path length node

* test 'Path Length' node implementation

* improve test

* impl 'Count' node to return the number of instance in a VectorDataTable instances

* impl 'Split Path' node

* don't split if t is close of 0 or 1 or the bezpath is empty

* write comments

* preserve the style on vector data in 'Split Path' node implementation

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-06-23 04:59:25 +00:00
Keavon Chambers
b5975e92b2 Combine 'Merge by Distance' nodes with a choice of algorithm; clean up 'Boolean Operation' node result with merge-by-distance 2025-06-22 04:22:39 -07:00
James Lindsay
4344f28909
Reduce development environment warnings and remove DWARF debug symbols (#2741)
* Ignore tauri gen

* Deny warnings on CI

* Fix all warnings in current nightly rustc

* Disable DWARF debug info for development builds

* Fix typo

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-06-22 03:10:25 -07:00
Firestar99
e520c21b66
Remove the serde feature and instead just always require it (#2737)
workspace: remove feature `serde`, always require it instead
2025-06-21 16:52:47 -07:00
Firestar99
ca5ca863cc
Unify feature dependencies with workspace dependencies (#2736)
* graph-craft: fix direct wasm build

* graph-craft: fix no serde feature failing to compile

* graph-craft: make wgpu-executor properly optional

* workspace: unify `image` formats in workspace

* workspace: turn most dependencies into workspace deps, no actual changes

* workspace: unify dependency features in workspace dep
2025-06-21 16:26:25 -07:00
Firestar99
990d5b37cf
Bulk gcore cleanup, replace core and alloc with std (#2735)
* gcore: replace `core` and `alloc` paths with `std`

* node-graph: remove unnecessary path prefix

* gcore: remove most `#[cfg(target_arch = "spirv")]`, keep some potentially useful ones

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-06-21 23:08:33 +00:00
Firestar99
34dced38ba Make gcore a std library and remove std, alloc, and more unused features (#2724)
* gcore: remove features `std`, `alloc`, `gpu` and `reflections`, now always available

* gcore: remove non-working features `kurbo` and `log`
2025-06-19 20:28:17 -07:00
Firestar99
13226f7049 Re-export all of gcore in gstd and rename 'Image' node to 'Image Value' (#2733)
* rename `image` node to `image_value`

* reexport the entirety of `gcore` in `gstd`
2025-06-19 20:28:17 -07:00
Firestar99
68985868fa Fix profiling CI action failing (#2734) 2025-06-19 20:28:17 -07:00
Firestar99
14d90195ad Remove unused dependencies from the Cargo.toml files via cargo shear (#2723)
* cargo shear ignore rules

* cargo shear

* cargo shear manual dependency removal

* cargo shear: ignore editor in proc-macros
2025-06-19 20:28:17 -07:00
Firestar99
3489f9ddb1 Bulk remove old code for legacy GPU node implementations (#2722)
* fix warning in node-macro

* remove crates `gpu-executor`, `gpu-compiler`, `compilation-client` and `compilation-server`

* remove `wgpu-executor::executor`

* .gitignore .idea/
2025-06-19 20:28:17 -07:00
Priyanshu
d721bca85f Fix 'Solidify Stroke' node not appending elements in the BezPath after the first ClosePath element (#2732)
Issue:
Previously the `AppendBezpath::append_bezpath()` method didn't append the elements after the first `ClosePath` element in the given BezPath, but the Bezpath can contain more than one path. The 'Solidify Stroke' node creates at least two paths, but the `append_bezpath` method only appends the first path, and hence 'Solidify Stroke' didn't work correctly.

Fix:
Now `AppendBezpath::append_bezpath()` appends all the paths in the given BezPath, which also fixes the 'Solidify Stroke' node.
2025-06-19 20:28:11 -07:00
Firestar99
006209c5d0 Put all #[test] in a mod tests (#2728)
workspace: put all `#[test]` in a `mod tests`
2025-06-19 20:25:58 -07:00
mTvare
e238753a35 Implement clipping masks, stroke align, and stroke paint order (#2644)
* refactor: opacity + blend_mode -> blend_style

* Add code for clipping

* Add alt-click masking

* Clip to all colors. Fill option

* Fix undo not working. Fix strokes not being white

* Allow clipped to be grouped or raster

* Switch to alpha mode in mask-type

* add plumbing to know if clipped in frontend and add fill slider

* Attempt at document upgrade code

* Fix fill slider

* Add clipped styling and Alt-click layer border

* Use mask attr judiciously by using clip when possible

* Fix breaking documents and upgrade code

* Fix fixes

* No-op toggle if last child of parent and don't show clip UI if last element

* Fix mouse styles by plumbing clippable to frontend

* Fix Clip detection by disallowed groups as clipPath according to SVG spec doesn't allow <g>

* Add opacity to clippers can_use_clip check

* Fix issue with clipping not working nicely with strokes by using masks

* Add vello code

* cleanup

* Add stroke alignment hacks to SVG renderer

* svg: Fix mask bounds in vector data

* vello: Implement mask hacks to support stroke alignment

* Move around alignment and doc upgrade code

* rename Line X -> X

* An attempt at fixing names not updating

* svg: add stroke order with svg

* vello: add stroke order with by calling one before the other explicitly

* fix merge

* fix svg renderer messing up transform det

* Code review; reorder and rename parameters (TODO: fix tools)

* Fixes to previous

* Formatting

* fix bug 3

* some moving around (not fixed)

* fix issue 1

* fix vello

* Final code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-06-19 19:11:01 -07:00
Albar
643d7b4432 Add the unit, display_decimal_places, and step parameter widget macro attributes (#2706)
* UI working for spacing enum.

* Implementations.

* UI working for spacing enum.

* Undo all changes.

* unit, display_decimal_places, and step macro implementation.

* Fixing tests.

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-06-19 19:01:58 -07:00
Ezbaze
aa3c214bf7 Fix Sample Points node to avoid duplicating endpoints instead of closing its sampled paths (#2714)
* Skip duplicate endpoint and close sampled paths in Sample Points node
Closes #2713

* Comment

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-06-19 19:00:28 -07:00
Keavon Chambers
eda858b6e2 Add support for the 'Boolean Operation' node to accept vector tables, not just groups 2025-06-19 18:58:19 -07:00
Keavon Chambers
96a0dada92 Replace 'Generate Handles' and 'Remove Handles' nodes with 'Auto-Tangents' node; rename vector2 data type to coordinate 2025-06-19 18:56:57 -07:00