Commit Graph

97 Commits

Author SHA1 Message Date
Dennis Kobert 0531769c41
Cache Vello render output as stitchable textures (#3722)
* WIP render caching

* Hook up render cache to render pipeline

* Fixed offsets

* Initial cleanup

* Integrate cache with context invalidation

* Cleanup

* Improve rounding and reduce tile size to fix vello not rendering

* Include pointer position in cache key

* Avoid unwraps and zero sized textures

* Destroy textures after blitting to surface

* Fix context dependencies

* Exclude footprint from render params

* Batch animation frame messages

* Add vello max render size to preference dialogue

* Remove unused import

* Reorder vello preference

* Clean up preferences dialog

* Apply review suggestions

* Cap max render region size

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-02-22 10:12:50 +00:00
Keavon Chambers 5a1503fc98 New node: Flatten Raster 2026-02-20 13:35:12 -08:00
Keavon Chambers 5d5993bcca
Fix opacity not being included in alpha of Fill type when converted from Table<Color> (#3785)
* Fix opacity not being included in alpha of Fill type when converted from Table<Color>

* Avoid unwrap, I guess
2026-02-18 09:21:02 +00:00
Kulcode ed20f4ac9b
Fix outline rendering mode to draw shapes as black or white based on contrast with their artboard's color (#3724)
* contrast

* Update

* error corrected

* changes

* Fix

* fix-2

* cleanup-2

* Formatting

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-02-16 23:38:12 +00:00
Oliver Davies 20e12edd45
New node: Pack Strips (#3246)
* Added basic pack by bounds node

Apply suggestion from @Keavon

Co-authored-by: Keavon Chambers <keavon@keavon.com>

* Add support for choosing rows/columns strip direction

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-02-16 09:07:03 +00:00
Vatsal Kumar 82f7dc7062
Improve the Shape tool's arrow drawing controls (#3650)
* fixed the arrow's parameters

Signed-off-by: krVatsal <kumarvatsal34@gmail.com>

* shifted the arrow's origin to its tail

Signed-off-by: krVatsal <kumarvatsal34@gmail.com>

* modified arrow shapetype fucntion to be like other shapes

* fixed rust formatting

* Remove misleading part of comment referencing the origin

---------

Signed-off-by: krVatsal <kumarvatsal34@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-02-15 21:35:20 +00:00
Timon 8b67840f0c Desktop: Fix Eyedropper tool (#3764) 2026-02-14 16:44:52 +00:00
Ayush Amawate 119a554260
Fix the Path tool adding a Path node but not applying the change until a second attempt due to wrong segment IDs (#3727)
* Fix SegmentIds lost when no Path node exists

* fix import order

* Use Arc<Vector> in vector_data for regression
2026-02-13 14:40:38 -08:00
0SlowPoke0 ea68d62ec4
Add gizmos for interacting with the Spiral node (#2851)
* made spiral node

* number of turns in decimal and arc-angle implementation

* logarithmic spiral

* unified log and arc spiral into spiral node

* add spiral shape in shape tool

* fix min value and degree unit

* make it compile

* impl turns handle gizmo

* chore : Refactoring PR #2851 for current code base with some fixes

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: Annonnymmousss <jatin02012006@gmail.com>
2026-02-12 22:33:40 +00:00
Dennis Kobert 5efa81df85
Store click targets in Arc (#3726) 2026-02-06 12:35:32 +00:00
Timon d04def886d
Ensure non-negative lengths for stroke dash pattern (#3710)
Caused Vello rendering to fail
2026-02-03 17:19:31 +00:00
Keavon Chambers 390004897b
Add "Loop Level" to the Position context reader node (#3679)
* Add "Loop Level" to the Position context reader node

* Remove InjectPosition
2026-01-28 10:52:39 +00:00
Timon 5fd1a24f16
Desktop: Add Eyedropper tool support with native Vello (#3684)
* mostly done

* fix

* kinda works but tilt and flip broken

* fix footprint

Co-authored-by: James Lindsay <78500760+0HyperCube@users.noreply.github.com>

* Code review

* fix cursor hiding

* Remove console.log

---------

Co-authored-by: James Lindsay <78500760+0HyperCube@users.noreply.github.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-01-27 01:24:09 +00:00
Timon b4e9d7b9eb
Desktop: Fix bitmap file export not preserving alpha (#3673)
Fix Export not preserving alpha
2026-01-26 13:51:48 +00:00
Mohammed Afreed baig c07124332b
Fix GPU out-of-memory crash by reusing overlay textures (#3614)
* Refactor TargetTexture into proper abstraction with ensure_size() method

* Remove redundant overlays_texture field, use view() directly

* Use if-let syntax in render_vello_scene_to_target_texture to avoid explicit unwrap

* Implement TargetTexture::new() constructor to avoid dummy textures

* fix compile error

* cleanup

* Avoid cloning texture view

---------

Co-authored-by: Timon <me@timon.zip>
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2026-01-26 12:44:41 +00:00
Keavon Chambers 568831bd2f
Fix regression breaking Into/Convert node type coercion (#3681) 2026-01-25 16:26:05 -08:00
Keavon Chambers 7af60e02a3
Add the auto-generated node catalog to the website's user manual (#3662)
* Generate the MVP node catalog in the manual (with some placeholders)

* Implement nearly the rest of everything

* Move to the tools directory and make it generate nicer default values

* Add category descriptions

* Organize file structure and improve type naming

* Improve book table of contents code

* Add collapsing chapter navigation to the book template

* Add to build workflow

* Clean up site structure
2026-01-20 22:52:03 -08:00
Keavon Chambers 3b55064f44
Add tooltip documentation to the Text node and tidy up node catalog categorization (#3645)
* Add more node doc comments

* Tidy up node categories
2026-01-16 01:27:56 -08:00
Adam Gerhant c60ddcf875
Fix the Text node's Max Width/Height parameters with OptionalF64 losing the value when unticked (#3643)
* WIP

* Fix widget

* Fix migration

* Remove OptionalF64

* Custom attributes for optional f64 widget

* Code review

* Move comments to another PR

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-01-16 06:13:32 +00:00
James Lindsay c46060db44
Add a Select tool overlay for the layer origin (#3471)
* Add blue layer origin cross overlay

* Apply suggestion from @Keavon

* Skip layers without local transforms

* Disable the Custom Pivot by default

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-01-14 01:50:03 -08:00
Keavon Chambers 20a595db39 Fix a bug where Transform nodes would cause a reversal of the 'Instance Index' node's 'Loop Level' counting direction 2026-01-13 23:15:42 -08:00
Adam Gerhant a6052c5819
Replace node definition string-based lookups with DefinitionIdentifier instances (#3451)
* create definition identifier and integrate it

* Bug fixes and code review

* formatting

* Fix migrations

* Fix remove handles migration

* formatting

* Fix test

* Fix tests 2

* fix deserialization

* Code review

* Small fixes

* Consolidate 'Morph' node migrations

* Add old SamplePointsNode name to migrations list

* Fix tests

* Unrelated small fix

* Fix migration crashes

* Fix tests

* Final code review

* fmt

* Add metadata

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-01-12 23:09:43 -08:00
Vatsal Kumar 4fea2b0fe7
Add an arrow to the Shape tool (#3343)
* add arrow shape feature in editor

Signed-off-by: krVatsal <kumarvatsal34@gmail.com>

* fix the arrow tool to show arrow in viewport space

Signed-off-by: krVatsal <kumarvatsal34@gmail.com>

* fix the direction of arrow and make the new arrow node

Signed-off-by: krVatsal <kumarvatsal34@gmail.com>

* updated arrow tool to hae start and end points

Signed-off-by: krVatsal <kumarvatsal34@gmail.com>

* fixed calculate point bug

Signed-off-by: krVatsal <kumarvatsal34@gmail.com>

* fixed some bugs of arrow positioning

Signed-off-by: krVatsal <kumarvatsal34@gmail.com>

* fixed formatting in whole codebase and added fill to arrow

Signed-off-by: krVatsal <kumarvatsal34@gmail.com>

* fix

---------

Signed-off-by: krVatsal <kumarvatsal34@gmail.com>
Co-authored-by: Timon <me@timon.zip>
2026-01-12 00:58:28 +00:00
Keavon Chambers 1b91198b28
Fix 'Regular Polygon' and 'Star' shapes incorrectly having cubic handles, not linear (#3606)
Fix shape nodes creating cubic-curved polylines
2026-01-06 20:58:08 -08:00
Ayush Amawate 42440c0d0b
Fix rasterize node document leakage with hashmap and eq check (#3550)
* fix: rasterize node document leakage with hashmap and eq check

* Use single Hashmap and ignore source id

* use or_insert_with instead of Entry match

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2026-01-04 11:33:18 +00:00
James Lindsay 403ab7ba31
Fix math error affecting the linear segment -> polynomial logic (#3562)
Fix typo in the linear segment -> polynomial code
2026-01-02 10:00:02 +00:00
Keavon Chambers 2fa958aa79 Remove generics from the user-facing name for the Vector data type 2026-01-01 21:26:02 -08:00
Keavon Chambers fa45efa9e2
New node: Pointer Position (#3535)
* New node: Pointer Position

* Fix test
2025-12-27 16:02:23 -08:00
Keavon Chambers 64ed21f694 Clean up code with better naming 2025-12-21 23:35:00 -08:00
Keavon Chambers 123108c813 Promote vector meshes from experimental by removing it from preferences 2025-12-21 19:33:42 -08:00
Nicholas Liu e73e524f3d
Implement proper fill rendering for vector meshes (#3474)
* Implement branching mesh rendering for SVG

* Patch mesh fill for Vello renderer

* Patch tangent_at_start and tangent_at_end

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-12-21 02:59:37 +00:00
Keavon Chambers f1e8ebefc5
Improve tooltip docs with Markdown styling and refined math node explanations (#3488) 2025-12-20 01:05:15 -08:00
Keavon Chambers 2d6d054359
Make font selection show a live preview on hover; move its code to the backend (#3487)
* Remove FontInput.svelte

* Move font picking to the backend

* Fix Text tool font choice style turning to "-" on font that doesn't support previous style
2025-12-19 22:17:28 -08:00
Dennis Kobert a6f83291b4
We now use normal blending instead of using Mix::Clip / the clip_layer (#3454)
* We now use normal blending instead of using Mix::Clip / the clip_layer

* Revert the revert for the clip using SrcOver
2025-12-07 10:26:24 +00:00
Keavon Chambers fb0fab0622 Update links from graphite.rs to graphite.art 2025-12-06 18:10:27 -08:00
Keavon Chambers e8ebcc2c21
Replace text-only tooltips with custom richly styled tooltips (#3436)
* Replace the title attribute with custom FloatingMenu tooltips

* Separate tooltip labels and descriptions into two styled blocks

* Move keyboard shortcut tooltips to a separate section at the bottom

* Update shortcut key styling in tooltips and hints bar

* Fix .to_string()
2025-11-30 13:32:58 -08:00
Dennis Kobert 406f3d93f3
Add tool for visualizing crate hierarchy (#3315)
* Add tool for visualizing crate hierarchy

* Update crate structure

* Restructure crate viz and integrate crate into workspace

* Remove transitive dependency edges

* Move png / svg creation into the rust binary
2025-11-28 15:34:45 +00:00
James Lindsay 8383a3afac
New node: 'Extrude' (#3414)
* Add extrude node

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-11-26 18:50:10 -08:00
James Lindsay 5ebf6d6bc0
Fix StrokePathIter missing some segments (#3413) 2025-11-26 07:03:28 +00:00
Keavon Chambers 9eb8835bd5
Add the 'Blend Shapes' and 'Origins to Polyline' nodes; generalize the 'Morph' node to >2 states (#3405)
* New nodes: 'Morph' and 'Multi-Morph'

* Blend Shapes node

* Add the 'Index Points' node

* Fix failing test
2025-11-25 22:17:55 -08:00
Keavon Chambers d247b81966
Fix regression that reversed indexing of the Loop Level parameter of the 'Instance Index' node (#3421) 2025-11-25 21:32:56 -08:00
Keavon Chambers eb0f019b15
New nodes: 'Reset Transform', 'Replace Transform', 'Count Points', 'Index Points' (#3420)
- Add the 'Reset Transform' and 'Replace Transform' nodes
- Add the 'Count Points' and 'Index Points' nodes
- Make the 'Index Elements' node support negative indexing from the end
- Make the 'Flatten Vector' node's implementation reusable
- Fix crash displaying 0x0 raster image in the Data panel
- Fix the 'Points to Polyline' node not working on two-point objects
2025-11-25 20:41:59 -08:00
Dennis Kobert a932eaedcf
Render artwork at correct resolution when using vello on wasm (#3416)
* Work on fixing rendering for wasm+vello

* Render vello canvas in wasm at the correct resolution

* Cleanup unused surface rendering code

* Remove vector to raster conversion

* Remove desktop changes

* Revert window.rs changes

* Don't round logical coordinates

* Fix desktop compilation + don't round logical coordinates for svg rendering

* Further cleanup

* Compute logical size from acutal physical sizes
2025-11-24 14:23:27 +00:00
Keavon Chambers 6e66c79392
Fix 'Mask' node missing Properties widget; fix crash with 'Brightness/Contrast Classic' node (#3404)
* Fix 'Mask' node missing Properties widget; fix crash with 'Brightness/Contrast Classic' node

Also clean up dead code and improve tooltip for the "-" Properties panel widget fallback.

* format type

---------

Co-authored-by: Adam <adamgerhant@gmail.com>
2025-11-24 09:21:07 +00:00
Timon 548e0df1a1
Desktop: Mac menu workaround (#3398) 2025-11-19 17:13:35 +00:00
Keavon Chambers 6a3b098681
Add automatic type conversion from number to Vec2 by splatting (#3394) 2025-11-18 11:10:33 +00:00
Dennis Kobert 57b0b9c7ed
Restructure node crates (#3384)
* Restructure node-graph folder

* Fix wasm compilation

* Move node definitions out of *-types crates

* Cleanup

* Fix warnings

* Fix warnings

* Start adding migrations

* Add migrations and move memo nodes to gcore

* Move nodes/gsvg-render -> rendering

* Replace some hard coded identifiers and fix automatic conversion

* Fix Vec2Value node migration

* Fix formatting

* Add more migrations

* Cleanup features

* Fix core_types::raster import

* Update demo artwork (to make profile ci work)

* Move *-types to node-graph/libraries folder

* Add missing node migrations

* Migrate more nodes

* Remove impure memo node

* More fixes and remove warning

* Migrate context and add a few missing migrations

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-11-18 10:21:54 +00:00