Commit graph

2032 commits

Author SHA1 Message Date
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
Keavon Chambers
59bb3194ca Fix website donation page to work with responsive design 2025-06-23 03:55:32 -07:00
Firestar99
2d62d01fd4
Make wasm only depend on gstd, not gcore (#2745)
make `wasm` only depend on `gstd`, not `gcore`
2025-06-23 10:30:41 +00: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
Keavon Chambers
c1b15fcfdf Fix Ctrl+Space not closing the graph after opening the node creation menu 2025-06-22 03:29:41 -07:00
Keavon Chambers
dc0ae74cab Fix double-click event firing when dragging number input fields in Chromium 2025-06-22 03:11:57 -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
0SlowPoke0
8e5abf65cb
Add star/polygon gizmos and refactor the separate shape drawing tools into a unified Shape tool (#2683)
* no trait ,not to fix line

* add hints

* line modification even when other shapes are selected

* added transform and anchor overlays

* removed old code

* fixed transform added hints need to fix modifier keys use

* refactored select-tool

* add point-handle-gizmo

* fix rotate bug

* implement angle snapping gizmo , fix overlay and refactor the code

* implement snapping for point-handle gizmo and implement no of point gizmo need to refactor

* implemented the gizmo for polygon, added tests , brackets to increase sides

* formatting-fix

* small nit-picks

* Make it compile

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-06-22 00:53:49 -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
Keavon Chambers
301368a0df Add basic donation statistics to the website 2025-06-20 04:51:06 -07: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
6b69a75391 Bulk rename gcore -> gstd in editor (#2729)
* remove `gcore` dependency from `editor`

* editor: bulk rename `gcore` -> `gstd`, cargo fmt
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
Adesh Gupta
579bedd9ff Fix editor crash when anchor sliding, followup to #2682 (#2726)
Fix editor crash due to unwrap
2025-06-19 19:11:13 -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
Timur Gainullin
8a3f133140 Fix undo bug returning to drawing a Pen tool rubber-band curve on prior parts of a previously drawn shape (#2710)
fix: add cleanup after pen path is closed

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-06-19 19:02:58 -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
Adesh Gupta
f3720bf6f2 Add Pen tool support for starting and ending segment drawing on existing path edges for vector meshes (#2692)
* Start on segment

* Path tool ending on segment

* Overlays for feature

* Fixed merge build

* Fix overlays

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-06-19 19:01:07 -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
Adesh Gupta
781271782c 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>
2025-06-19 18:59:22 -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
Adesh Gupta
f72263f4f8 Add molding segments to the Path tool (#2660)
* Moulding of cubic bezier

* Implemented falloff with interpolation

* remove conflict

* Move falloff to consts

* Spelling

* Refine falloff param and bug fix

* Code review

* Add colinear disable modes to molding degment feat

* Clean comments and unused code

* Code refactor

* Fix error

* Change colinear toggle behaviour

* Code review

* Remove KeyC feat + Fix overlay

* Dynamic hints in path tool

* Revamp molding logic

* Code review

* Remove unused Bezier algorithms (maybe useful for future reference)

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-06-19 18:55:57 -07:00
Priyanshu
4696004dc9 Refactor the 'Spline' node to use Kurbo instead of Bezier-rs (#2701)
* copy and refactor spline algorithm from Bezier-rs

* add comments

* refactor spline node

* fix spline when path is closed

* use refactored version of spline algorithm

* revert changes to 'Spline' node funtion

* use manipulator groups instead of bezpath

* Fix comment

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-06-19 18:55:11 -07:00
mTvare
4dfeafd65e Improve the click targets for the skew triangles of the transform cage (#2703)
Extend the bounding box over triangle to extend beyond the triangle
2025-06-19 18:54:13 -07:00
Adesh Gupta
33a31b4f17 Fix the Path tool's segment insertion line overlay having hysteresis with distance away from the cursor (#2677)
* Fix hysteresis in segment insertion

* Update editor/src/messages/tool/common_functionality/shape_editor.rs

* Update editor/src/messages/tool/common_functionality/shape_editor.rs

* Fix insert point overlay

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-06-19 18:53:14 -07:00
mTvare
04d7adb867 Fix grid overlay values getting wiped when switching between isometric/rectangular and back (#2702)
* Retain values present in previous git overlay state

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-06-19 18:51:56 -07:00
mTvare
a1d85779ba Fix inability to deselect nodes, and nodes not being selected when pasted (#2691)
* Deselect on shift/alt click and paste selects multiple mode

* Grid values persistance

* reset

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-06-19 18:50:57 -07:00
seam0s
878f5d3bf7 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>
2025-06-19 18:50:53 -07:00
Priyanshu
477a3f6670 Refactor the 'Morph' node to use Kurbo instead of Bezier-rs (#2696)
* fix morph node

* it worked!

* cleanup

* add comments

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-06-19 18:44:52 -07:00
Priyanshu
b0384adabc 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>
2025-06-19 18:43:38 -07:00
James Lindsay
bf7caef6fb Instance tables refactor part 8: Output the type of the input data with the Mirror node as well (#2699)
* Flatten output of mirror node

* Enable reflection based on pivot, not just bounds

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-06-19 18:42:01 -07:00
James Lindsay
57bf2f873e Temporarily fix the Pen/Freehand/Spline tools by making vector modify apply to row 1 only (#2700) 2025-06-19 18:38:14 -07:00
Keavon Chambers
cea1a1c6a8 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'
2025-06-19 18:37:40 -07:00
Keavon Chambers
523cc27523 Improve the spreadsheet visualization details for VectorData 2025-06-19 18:37:39 -07:00
Keavon Chambers
6111440afd Instance tables refactor part 7: Remove RasterDataType and add Raster<CPU>/Raster<GPU> 2025-06-19 18:37:13 -07:00
Keavon Chambers
5cacab2e39 Instance tables refactor part 7: Rename "ImageFrame" -> "RasterData", "ImageFrameTable" -> "RasterDataType", and "RasterFrame" -> "RasterDataType" 2025-06-19 18:23:53 -07:00
Keavon Chambers
2696abc6b3
Replace Instances<T>::empty() with Instances<T>::default() and make it return an empty table for vector data instead of one empty row (#2689)
Make Instances<T>::default() return an empty table for everything, even vector, and replace ::empty() with ::default()
2025-06-04 21:00:21 -07:00