Commit graph

2052 commits

Author SHA1 Message Date
Dennis Kobert
0d7fb5c71c
Update demo artwork to newest version 2025-06-28 09:34:33 +02: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
James Lindsay
cf8496b5a0
Fix Shape tool custom color picker using gamma not linear space (#2773)
Fix colour space for options
2025-06-27 18:32:14 -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
9cf8d2cd05
Run CI for non master branches (#2763)
* ci: run CI on PRs not targeting master

* fix warnings when compiling tests
2025-06-27 14:40:54 +02: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
c797877763
Fix regression in previous commit where node parameter updates didn't refresh the render (#2761)
fix changes in propeties panel not updating
2025-06-27 01:42:10 -07: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
Keavon Chambers
1a4d7aa23c Refactor the document upgrading code into a separate migrations file 2025-06-26 18:10:29 -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
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