Commit graph

646 commits

Author SHA1 Message Date
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
Firestar99
2d11d96b4a
Re-add upload texture (#2915)
* vello: code cleanup of resource overwrites

* upload_texture: upload cpu textures as SRGBA8

* vello: fix wgpu::Texture leak within vello's `context.resource_overrides` HashMap

* fix missing feature gate
2025-07-24 10:51:03 +00:00
Timon
30abc92900
Implement basic desktop app with chromium embeded framework (#2874)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* Remove tauri based desktop app

* Allow bzip-1.0.6 license

* Implement basic cef based desktop app

* Cleanup build setup

* Use wait until and execute cef loop more frequently

* Remove custom do browser work event

* Move WinitApp into its own module

* Cleanup event handling

* Cleanup + Scheudule cef message loop work

* Fix cpu overheating on idle: https://xkcd.com/1172/

* Use tracing crate for logging instead of println

* Rebase to main

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2025-07-23 20:27:55 +02:00
Firestar99
890da6a3c3
Clean up code by using Iterator::collect() when constructing instance tables (#2918)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* instances: `Iterator::collect()` instances

* instances: adjust nodes to use iterators

* fix warnings on master

* Bump MSRV

* Port the remaining usages

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-07-23 05:51:40 +00:00
mTvare
032f9bdf72
Upgrade vello to version 0.5.0 and wgpu to version 25 (#2890)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* update: vello

* fix compile errors

* create target texture lazily

* fix TextureBlitter texture format mismatch

* use `futures:🔒:Mutex` instead of std Mutex

---------

Co-authored-by: Firestar99 <firestar99@sydow.cloud>
2025-07-22 19:51:02 +02:00
Priyanshu
30e5567ff2
Fix collision detection for node drag-and-drop onto a wire (#2910)
Some checks failed
Editor: Dev & CI / build (push) Has been cancelled
Editor: Dev & CI / cargo-deny (push) Has been cancelled
* refactor

* check if the wire is inside the node itself
2025-07-19 07:38:46 -07:00
Salman Abuhaimed
7ef9e5a3e8
Fix Text node glyph duplication and wrong tilt calculation with per-glyph instances (#2907)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* fix: text node subpaths duplication

* fix: text node tilt calculation for per-glyph instaces
2025-07-18 11:00:24 -07:00
Keavon Chambers
6f46f21e21
Improve the HTTP request nodes and add new related nodes (#2896)
* Improve the network request nodes and add new ones to process data

* Use Content-Type: application/octet-stream

* Add 'Gamma Correction' node
2025-07-18 05:03:50 -07:00
Keavon Chambers
561b671f8d
Add transform-related nodes to improve transformation abilities (#2893)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* Improve transformation abilities with transform-related nodes

* Fix Transform -> Merge and Transform -> Artboard connections
2025-07-17 11:58:57 -07:00
Keavon Chambers
8f26c5c2ad
Remove the UVec2 and IVec2 graph data types and have Artboard use DVec2 (#2894)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
2025-07-16 18:45:10 -07:00
Keavon Chambers
99966d848d Fix text per-glyph instance overlays and click target issues
Some checks failed
Editor: Dev & CI / build (push) Has been cancelled
Editor: Dev & CI / cargo-deny (push) Has been cancelled
2025-07-14 14:47:01 -07:00
Keavon Chambers
112efe88c2 Add multi-level loop indexing with the 'Instance Repeat' node
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
2025-07-14 02:55:44 -07:00
Keavon Chambers
88ac275e47 New nodes: 'Greatest Common Divisor' and 'Least Common Multiple'
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
2025-07-13 19:43:28 -07:00
Salman Abuhaimed
166eb00c9c
Separate the Text node's generated glyphs into separate vector table rows (#2821)
* Separate glyphs into Vector data rows

* Fix `String Length` node

- Properly count characters with
`str.chars().count()` instead of bytes `str.len()`
- Change `String Length` node's output to `u32`

* Apply transform on instance instead of applying it when drawing the glyph

* Add checkbox to enable/disable per-glyph instances

* Tooltips

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-07-13 18:06:41 -07:00
Mohd Mohsin
c5800aa96e
Fix the Bevel node so it applies a consistent bevel size regardless of angle (#2293)
* feat: update the bevel algorithm for same bevel length

* Fix: Resolves issue in bevel algorithm

* fix bevel algorithm

* Feat : update the bevel algorithm for bezier curve

* Feat: Add support for rounded and inward-rounded Bevel options

* fix bevel algo for curves

* Nits

* refactor area node

* refactor close path node

* small refactor of 'check_point_inside_shape' method

* copy is_linear function from bezier-rs lib

* refactor bevel node implementation

* cleanup

* refactor bevel implementation

* fix transformation

* cleanup

* update the bevel algorithm

* Code review

* Clean up setup logic for failing test

* update tests to reflect new algorithm

* Decimal integer nits

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: indierusty <indierusty@gmail.com>
2025-07-13 21:45:51 +00:00
Keavon Chambers
765092fbe9
Rename the message system's 'data' argument to 'context' (#2872) 2025-07-12 22:50:59 -07:00
Firestar99
4c75ddf936
Refactor node migration to be less susceptible to forgetting outdated strings (#2853)
Some checks failed
Editor: Dev & CI / build (push) Has been cancelled
Editor: Dev & CI / cargo-deny (push) Has been cancelled
* migration: make document migration use ProtoNodeIdentifier

* migration: NodeReplacement struct for better formatting

* migration: test for duplicates and fix them
2025-07-10 17:40:54 -07:00
James Lindsay
13ad814639
Add a complexity limit on displaying layer thumbnails to improve performance (#2828)
* Skip complex layer thumbnails

* Set Raster<GPU> to have usize::MAX render complexity

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-07-10 07:57:45 +00:00
mTvare
a40de58c7c
Fix brush bounding boxes by making BrushCacheImpl's hash not shared between different instances (#2845)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* fix: add cache to each layer

* fix: warning

* fix: tests

* Clean up code

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-07-09 06:45:41 +00:00
mTvare
8a68683a93
Add pivot type selection with Custom Pivot, Origin (Average Point), and Origin (Active Object) to the Select tool (#2730)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* add origin

* cleanup pivot

* a lot of stuff

* reset pivot

* fix transform with pivot issues

* fixes

* some more cleanup

* fixes

* finally works

* origin fixes

* fix spaces

* fix using dragged_layers

* simplify pivot logic

* fix bugs

* fix the final bug

* fix in select_tool

* fix updates

* some more refactors to fix misunderstanding and refactor

* add checkboxes

* fix labels

* fix stuff which broke at merge

* update

* cargo fmt

* fix serde crash

* fix pivot not updating on move

* fix pivot not becoming last active refernce

* fix redraw issues

* add: active pivot

* cargo fmt

* fix pivot showing up in default mode

* add: pivot pin

* fix: use pin icons

* cargo: cargo lock update?

* fix: use checkbox instead of Overlays

* refactor: add dot to path_tool

* add: active origins

* UI tweaks

* add: add all of the stuff for path tool

* remove: unused layer

* fix: pivot pinning and origin angle

* fix: pin only if moved in first place

* cargo: fmt

* fix: pivot use disabled method

* fix: remove redudant NoOp

* fix: 3 stuff

* fix: select from elsewhere

* fix: compass rose wobbling around

* add: move pivot on grab

* add: move pivot on nudge

* add: move pivot on Grab

* Code review and tooltips

* fixes

* fixes

* fixes

* fix: skipping artboard on bounds calculation

* fix: by default have origin

* Fix prior fix

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-07-08 09:24:54 +00:00
Firestar99
69ed80b79b
Add ::IDENTITY to node macro to return a ProtoNodeIdentifier that is always a &'static str (#2842)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* fix warnings on master

* make the `ProtoNodeIdentifier` of a Node be accessible and always a borrowed `&'static str`

* always generate `node_name::identifier()`, even with `skip_impl`

* make `FrontendNodeType` use Cow

* remove broken `DocumentNodeDefinition`s for old GPU nodes

* don't reexport `graphic_element` in it's entirety, only data structures

* adjust everything to use the new `node_name::identifier()`

* fixup imports for wasm

* turn identifier fn into a constant
2025-07-07 16:29:59 -07:00
James Lindsay
4a83067081
Fix Path tool's Path node transform calculation by skipping local transform based on first instance source ID (#2843)
* First instance source id

* Set source node id and migrations
2025-07-07 22:09:21 +00:00
celyk
88c059a607
Add Normalize and Length nodes (#2837)
* Add vector length node

* Add normalize node

* Add comments

* Make normalize node safer for the user
2025-07-07 21:48:22 +00:00
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