Commit graph

633 commits

Author SHA1 Message Date
mtvare6
1358d1b16c Merge 2025-07-23 14:29:59 +05:30
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
mtvare6
9f3a19f648 add: vello luminance based clipping 2025-07-15 14:11:06 +05:30
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
mtvare6
89d6c970d4 fix: replace alpha with luminance 2025-07-12 04:13:09 +05:30
mtvare6
382b1e35d4 add: mask to raster data 2025-07-12 03:03:59 +05:30
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
mtvare6
a022d654d2 cargo: fmt 2025-07-10 13:22:30 +05:30
mtvare6
27cc7a0e8e Merge branch 'master' into masking 2025-07-10 13:11:30 +05:30
mtvare6
13a4807940 fix: vello vector data 2025-07-09 19:55:43 +05:30
mtvare6
9c0847f3fd add: masking to vector data 2025-07-09 19:20:10 +05:30
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
mtvare6
8002e7ccc1 merge 2025-07-07 07:01:15 +05:30
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
mtvare6
5d8180305a merge 2025-07-01 08:47:00 +05:30
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