Commit graph

674 commits

Author SHA1 Message Date
Keavon Chambers
00fc430174 Merge branch 'master' into fix-stroke-alignment-outside 2025-08-21 10:17:45 -07:00
Timon
30e5d66105
Desktop: Implement desktop wrapper module (#3039)
* Prototyping desktop wrapper api

* Separate into multiple modules

* Some fixup

* Reimplement most functionality with editor api

* Fix texture life time crashes

* Fix scale

* Implement editor wrapper message queue

* Improve performance

* Handle native messages directly without submitting to event loop

* Fix overlay latency

* Move editor message execution to executor allows no shared state in editor wrapper

* Small clean up

* Small cleanup

* Some renames

* Cleaning up desktop wrapper interface

* Fix formatting

* Fix naming

* Move node graph execution result handling to app

* Fix FrontendMessage RenderOverlays usage

* Reimplement file drop and clean up file import and open messages

* Remove dbg

* Post merge fix

* Review changes
2025-08-20 13:27:36 +00: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
54e7ea33e9
Merge branch 'master' into fix-stroke-alignment-outside 2025-08-20 01:11:13 +05:30
Firestar99
b44a4fba1e
node-macro: cleanup ParsedField struct (#3064)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* node-macro: cleanup `ParsedField` struct

* node-macro: fixup tests
2025-08-19 09:25:58 +00:00
mtvare6
ed901ac401 scale stroke by align type 2025-08-19 11:03:52 +05:30
mTvare
ac93b41ad9
Merge branch 'master' into fix-stroke-alignment-outside 2025-08-19 08:08:07 +05:30
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
Firestar99
0a53eae4e0
Remove unused cargo dependencies (#3063)
* cargo shear

* fix warnings on master

* fix docs needing dev-dependency
2025-08-18 11:26:44 -07:00
mtvare6
49340dcddd cargo fmt 2025-08-18 23:41:48 +05:30
mtvare6
a73dec33ff fix fixes 2025-08-18 23:14:53 +05:30
mTvare
76c9f1c894
Merge branch 'master' into fix-stroke-alignment-outside 2025-08-18 09:29:01 +05:30
mtvare6
8f1bda9170 Fix for vello 2025-08-17 16:43:19 +05:30
Adesh Gupta
52174fa4c2
Remap Path tool point sliding to G G (#2913)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* Feat: Point sliding on G G

* Code cleanup

* Fix gg sliding behaviour

* Fix build after merge conflict resolution

* Fix slide point and add hints

* Fix history in segment insertion

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-08-17 03:39:38 +00:00
Keavon Chambers
3bcec37493
Remove the deprecated/archived Bezier-rs library from the repo (#3058)
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
Remove the Bezier-rs library from the repo
2025-08-16 17:29:00 -07:00
Priyanshu
d22b2ca927
Refactor the Centroid node and Subpath struct and methods to use Kurbo, eliminating all remaining usages of Bezier-rs (#3036)
* define Subpath struct in gcore and refactor node-graph

* Refactor few methods

* refactoring worked!

* refactor centoid area and length

* remove unused

* cleanup

* fix pathseg_points function

* fix tranforming segments

* fix segment intersection

* refactor to_path_segments fn in gpath-bool crate

* refactor gcraft

* add bezier-rs dep

* Code review the editor directory

* use path-bool for solving roots

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-08-16 13:39:25 -07:00
mtvare6
d3ffaedf91 Fix outside stroke alignment not using masks when transparent 2025-08-17 00:30:08 +05:30
Keavon Chambers
bdc029c692
Add Table<Gradient> as a graphical type (#3051)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
2025-08-13 01:42:51 -07:00
Keavon Chambers
1b351aca76
Replace the Color type with Table<Color> everywhere (#3048)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
2025-08-12 00:38:23 -07:00
Keavon Chambers
2bb4509647
Replace the Spreadsheet panel with an improved Data panel (#3037)
Some checks failed
Editor: Dev & CI / build (push) Has been cancelled
Editor: Dev & CI / cargo-deny (push) Has been cancelled
* Improve the table data panel

* Add the "Window" menu bar section and polish everything
2025-08-10 07:46:42 -07:00
Keavon Chambers
2f4aef34e5
Add Table<Color> as a graphical type (#3033)
* Reduce code duplication in bounding box impls on Table

* Working Table<Color> rendering in the graph

* Implement color and fix other rendering with Vello and polish
2025-08-10 01:34:33 -07:00
Dennis Kobert
d2ddf94bd0
Include graph runtime benchmarks in CI perf regression runs (#2780)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* Include graph runtime benchmarks in ci regression run

* Update benchmarking workflow

* Add render slowdown

* Fix baseline cache

* Remove benchmark compilation validation run

* Include render node in runtime benchmarks

* Collapse sections without changes

* Readd rulers between the sections

* Add review suggestions

* Rulers rule

* Fix whitespace
2025-08-07 14:32:19 +02:00
Dennis Kobert
9b8935d201
Add iai versions of the runtime benchmarks (#3016)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* Include graph runtime benchmarks in ci regression run

* Update benchmarking workflow

* Remove ci script changes
2025-08-07 00:48:25 +02:00
Firestar99
caa228a1ec
Shaders: graster-nodes no-std fixups (#2984)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* wgpu-executor: remove useless features

* wgpu-executor: cleanup copy-pasted code

* gcore-shaders: no_std fixups
2025-08-06 14:10:08 +00:00
Priyanshu
b1f2cf706e
Refactor the node graph UI wires to render using Kurbo (#2994)
* impl function to check bezpath insideness

* refactor network interface wires to use kurbo

* refactor

* refactor

* fix adding MoveTo instead of LineTo to the grid aligned wire bezpath

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-08-06 02:17:00 -07:00
Keavon Chambers
0f638314dc
Rename the Group type to Graphic everywhere (#3009)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
2025-08-05 20:55:15 -07:00
Keavon Chambers
2e1396462c
Eliminate bare Graphic and Artboard graph data by making Merge and Artboard nodes internally use tables (#2996)
* Eliminate bare Graphic and Artboard graph data by making Merge and Artboard nodes internally use tables

* Make the Extend node user-facing
2025-08-05 02:24:12 -07:00
Keavon Chambers
4b11dced48 Make Table<T> implement the IntoIterator trait 2025-08-04 15:20:48 -07:00
Keavon Chambers
c98477d8ed
Rename graphic subtypes to remove their "data" and "group" suffixes (#2990)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* Rename VectorData to Vector

* Rename other VectorData* types to Vector*

* Move assorted data types out of vector_data.rs into misc.rs

* Rename vector_data.rs to vector_types.rs and remove the vector_types module folder

* Rename other references to "vector data"

* Remove label widgets for raster/vector/group to use "-" instead

* Rename RasterData to Raster

* Rename GraphicGroup to Group

* Fix migrations and rename graphic_element.rs -> graphic.rs

* Rename TaggedValue::ArtboardGroup -> TaggedValue::Artboard
2025-08-04 04:53:25 -07:00
Keavon Chambers
5637f01845
Rename GraphicElement -> Graphic and trait GraphicElementRendered -> Render (#2987) 2025-08-03 16:15:02 -07:00
Keavon Chambers
a0ce56d9b6
Rename Instances<T> to Table<T> and the "instance" terminology to "TableRow" and "element" (#2981)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* Instances -> Table

* instances.rs -> table.rs

* Rename occurrances of the word "instances"

* .instance -> .element

* Instance* -> TableRow*

* Rename Table and TableRow methods to not say "instance"

* Remove presumed unused serde defaults now that tables default to length 0 not 1

* Rename occurences of the word "instance"

* Un-alias the RasterDataTable<Storage>, VectorDataTable, GraphicGroupTable, ArtboardGroupTable typedefs

* Move artboard type and node code out of graphic_element.rs to a new artboard.rs

* Organize the TaggedValues

* Fix tests

* Fix prior regression with Image Value node not upgrading
2025-08-03 04:12:18 -07:00
Timon
67123f55dc
Use target family insted of target arch (#2975)
* Replace cfg target_arch wasm32 with target_family wasm

* Fix warnings in test builds from previous pr
2025-08-03 10:28:53 +00:00
Adesh Gupta
b9a1b2e951
Add copy/cut/paste/duplicate functionality for path geometry (#2812)
* Copy and Paste for paths

* Fix merge

* Implement Copy, Cut and Duplicate

* Fix selection of segments

* Fix formatting

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-08-02 21:15:01 +00:00
Timon
34a8b9b6f1
Desktop: Render overlays with vello (#2965)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* Render overlays with vello

* Fix nix flake comments

* Rendering refactor with better names and code location

* Remove unnecessary overlay renders

* Post rebase fix
2025-08-02 14:27:24 +00:00
Priyanshu
037bcb6b26
Refactor the 'Round Corners' and 'Auto-Tangents' nodes and vector node unit tests to use Kurbo (#2964)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* add todo

* impl function to convert a bezpath to manipulator groups

* refactor few node impls

* refactor vector nodes test and few methods on VectorData struct

* refactor tests

* remove unused import

* simplify and fix morph node test

* rename vars and comment

* refactor bezpath_to_parametric function

* Code review

* fix bezpath_to_manipulator_groups function

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-08-02 07:44:01 +00:00
Priyanshu
2306e9866e
Refactor the 'Offset Path' node to use Kurbo entirely (#2946)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* impl function for segment intersections

* fix and improve segment intersections

* copy and refactor related segment intersection methods

* copy and refactor tests for segment intersection from bezier-rs

* impl intersection with bezpaths

* copy and refactor tests

* rename few variables in the tests module

* rename position_on_bezpath to evaluate_bezpath

* copy and refactor function to clip two intersecting simple bezpaths

* refactor comments

* copy and refactor functions for milter join

* copy and refactor milter and round join functions from bezier-rs

* it worked! refactor offset path node impl

* fix few bugs

* improve vars names and add comments

* Code review

* fmt

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-07-31 17:44:27 -07:00
Keavon Chambers
abab145d65 Fix the Rasterize node to not ignore raster graphical data 2025-07-31 01:21:32 -07:00
Keavon Chambers
3cc9dd79fb
Rename the Coordinate data type to Vec2 (#2959) 2025-07-30 22:53:36 -07:00
Keavon Chambers
4391f88d03 Update references to the latest tech stack plans
Some checks failed
Editor: Dev & CI / build (push) Has been cancelled
Editor: Dev & CI / cargo-deny (push) Has been cancelled
Website / build (push) Has been cancelled
2025-07-29 15:17:41 -07:00
Dennis Kobert
2247dd9818
Desktop: Ready runtime and render node for desktop (#2952)
* Desktop: Ready runtime and render node for desktop

* Address review comments
2025-07-28 23:23:35 +00:00
Keavon Chambers
66cd7a3b76
Desktop: Add the transparent viewport hole punch and hook up window button plumbing (#2949) 2025-07-28 02:13:32 -07:00
Adesh Gupta
75614eb9d4
Fix vector mesh editing behavior in various edge cases (#2943)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* Fix colinear switch behaviour

* Fix Tab to switch handles

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-07-27 00:20:39 +00:00
0SlowPoke0
3a8c1b6f97
Add Arc drawing mode to the Shape tool and the associated angle gizmos (#2757)
* implement arc gizmo handler

* fixed wrapping need to fix snapping and overlays

* fixed all the issues

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-07-26 14:55:38 -07:00
Salman Abuhaimed
85021fd9e0
Add text alignment to the Text node (#2920)
* Add text alignment to Text node

* Lots of renames and improvements

* Add text alignment to the Text tool

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-07-25 22:04:12 -07:00
Firestar99
4fec24893e
Shaders: add gcore-shaders and make graster-nodes no-std (#2925)
* gcore-shaders: add crate, move `color` and `blending` from gcore

* gcore-shaders: move `AsU32`

* gcore-shaders: move `ChoiceType`, switch `Cow` for `&str`, adjust node macro

* gcore-shaders: move `registry::types`

* gcore-shaders: move `context::Ctx`

* raster-nodes: make it `no_std` with `std` feature

* gcore-shaders: fix doctest
2025-07-25 17:53:26 +00:00
Firestar99
4d5a1a6ff1
remove inner enum from raster types (#2929)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
2025-07-25 16:15:21 +00:00
mTvare
e6f1ad96b3
Fix inside stroke alignment not working in the Vello renderer (#2936)
* Fix inside stroke alignment not working in vello

* cargo: fmt
2025-07-25 00:15:05 -07:00
mTvare
72f1047a27
Display images in the SVG viewport renderer via canvases instead of base64 PNGs (#2903)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* add: move images as rendered canvases to node_graph_executor

* add: added the frontend message

* fix: bytemuck stuff

* fix: canvas element breaking

* fix: width issues

* fix: remove the old message

* npm: run lint-fix

* fix

* works finally

* fix transforms

* Fix self closing tag

* fix: reuse id

* fix: have it working with repeat instance

* cargo: fmt

* fix

* Avoid "canvas" prefix to IDs

* fix

* fix: vello issue from 6111440

* fix: gpu stuff

* fix: vello bbox

* Code review

---------

Co-authored-by: hypercube <0hypercube@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-07-24 17:14:38 -07:00
Firestar99
e7b8b5a3b6
Shaders: graster-nodes no-std prep (#2924)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* raster-nodes: remove commented out index node

* raster-nodes: move `CubicSplines` to separate mod

* raster-nodes: create `mod blending_nodes` and move assoc nodes

* raster-nodes: move node `gradient_map` to its own mod
2025-07-24 13:32:10 +00:00
Firestar99
59f3835c5d
Shaders: node macro (#2923)
* node_macro: cleanup attr parsing

* node_macro: add `cfg()` attr to feature gate node impl

* node_macro: add `shader_nodes` option

* node_macro: fixup tests
2025-07-24 12:58:30 +00:00