Commit Graph

1268 Commits

Author SHA1 Message Date
Dennis Kobert ad5d8fcd37
Optimize rendering by caching intermediate render results when panning/zooming (#3147)
* Add svg render node

WIP

Fix error in context nullificaton node insertion

Correctly translate metadata

Fix warning

* Cleanup

* Remove color / gradient check and fix svg defs

* Implement viewport filling transform modification for vello

* Cleanup and comments

* Code review
2025-09-11 11:35:33 +02:00
Adesh Gupta 09ece9424d
Fix undo/redo history related issues with the Path tool (#3111)
* Fix transactions

* A little cleanup

* Fix bug in delete

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-09-11 05:02:45 +00:00
Keavon Chambers 9a32e79853
Rename `NodeInput::Network` to `NodeInput::Import` (#3163) 2025-09-10 20:50:15 -07:00
Adam Gerhant 332088bce1
Make the Transform node use angles in degrees instead of radians for Rotation and Skew (#3160)
* Make the Transform node use degrees not radians

* Migration script

* Migrate skew value input to store degrees

* Add comments

* Fix migrations to account for the old deprecated "Pivot" parameter

* Fix tooling interactions with degrees-based transforms

* Upgrade demo art

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-09-11 00:19:10 +00:00
Timon 50be13522b
Desktop: Move preferences persistence to native (#3138)
* Move preference persistence to native

* Pass preferences as struct instead of serialized to string
2025-09-09 16:22:25 +00:00
Dennis Kobert 1808bea2cf
Fix editor build script always being rerun (#3156) 2025-09-09 10:21:58 +00:00
Keavon Chambers 22aa8c1264 Update UI widget designs to improve color consistency and add a narrow height mode 2025-09-08 21:48:22 -07:00
0SlowPoke0 485152bf8d
Add "Spiral" to the Shape tool and as a new node (#2803)
* 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

* updated the api

* changed the function_name

* [/] to update the turns widget in shape tool

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-09-08 14:37:43 -07:00
Dennis Kobert ee586be381
Fix exporting an image failing because it is ignored while playing an animation (#3151)
Fix export not working while playing an animation
2025-09-08 09:32:07 +00:00
Dennis Kobert a1e05754e5
Revert real time playback being enabled by default (#3150) 2025-09-08 02:15:59 -07:00
Priyanshu 84470b6b6d
Fix a regression with duplicating or pasting vector geometry in the Path tool (#3142)
* fix path tool duplication

* fix copy and paste

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-09-08 05:11:15 +00:00
0SlowPoke0 3e50d177b7
Add "Grid" to the Shape tool along with row/column gizmos (#2921)
* integrated grid shape in shape-tool

* add overlays,detection,transform for gizmo

* fix compile issues

* handle negative correctly,fix undo redo and abort

* fix missed merge conflicts

* fixed mouse cursor,correctly translatiing

* cleanup

* fix click-target area inside rect and spacing

* add 10px closer to gizmo line

* resolved conflicts

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-09-07 17:53:37 -07:00
Priyanshu 65171a5b8e
Fix Path tool box selection not selecting enclosed segments, only intersected (#3141)
fix path tool box selection not selecting the enclosed segment

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-09-07 22:08:56 +00:00
Adam Gerhant 7686edd47b
Add a cancel transaction message to the history system (#3121)
Add cancel transaction

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-09-07 14:00:42 -07:00
Adesh Gupta 57111cff92
Fix undo history getting stuck when the Select tool clicks the background to deselect (#3143)
Remove unnecessary start transaction messages

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-09-07 19:55:12 +00:00
Keavon Chambers a2c0693038
Fix most known issues with migrations failing to open documents from the past year (#3148) 2025-09-07 11:10:03 -07:00
Keavon Chambers 89c9cf1352 Fix infinite recursion introduced in #2795 that occurs in old document migrations 2025-09-05 14:04:10 -07:00
Dennis Kobert acd7ba38cc
Graphene: Fine-grained context caching (#2500)
* RFC: Fine Grained Context Caching

* Fix typos

* Fix label

* Add description of inject traits

* Explicitly support context modification

* Start implementation of context invalidation

* Add inject trait variants
* Route Extract / Inject traits to the proto nodes

* Implement context dependency analysis

* Implement context modification node insertion

* Fix erronous force graph run message

* Fix Extract* Inject* annotations in the nodes

* Require Hash implementation for VarArgs

* Fix nullification node insertion

* Cross of done items unresolved questions section

* Update Cargo.lock

* Fix context features propagation

* Update demo artwork

* Remove BondlessFootprint and FreezeRealTime nodes

* Fix migration

* Add migrations for adding context features to old networks

* Always update real time regardless of animation state

* Cargo fmt

* Fix tests

* Readd sed command to hopefully fix profile result parsing

* Add debug output to profiling pr

* Use new totals instead of summaries for for iai results

* Even more debugging

* Use correct debug metrics (hopefully)

* Add more MemoNode implementations

* Add context features annotation to shader node macro

* Cleanup

* Time -> RealTime

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-09-05 11:44:26 +00:00
Timon c081d0a9de
Allow the release info build script to work without requiring Git to be installed (#3105)
* Prevent panic if env GRAPHITE_GIT_COMMIT_HASH is less than 8 chars long

* Improve release info build script

* Nits

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-09-05 09:09:29 +00:00
Timon 083dfa5f49
Clean up autosave persistence (#3115)
* Set auto save state to false on document rename

* Update open document list on transaction commit and aboard

* Use current network to compute hash

Was using the last element in undo
Before artworks where not auto saved when the had no undo history

* Refactor persistence
2025-09-02 13:27:38 +00:00
Keavon Chambers 29684dde45
Update Rust dependencies (#3112)
* Update Rust dependencies

* Bump versions

* Try older ctor
2025-08-30 20:06:56 -07:00
Meet Zalavadiya 0a153150f5
Add quick measurement support to the Artboard tool for distances between artboard edges (#3102)
* logic added for artboard

* fixed measurement logic

* fix linting issues

* removed unused code

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-08-29 21:27:29 +00:00
Adam Gerhant f1a1275601
Add support for adding/removing a graph's primary imports/exports separately from the secondary (#3089)
* Primary Import/Export

* Primary Import/Export

* Complete import exports

* Final changes

* Improve line width

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-08-29 20:57:15 +00:00
Firestar99 ce1cd1706b
Disable `proc-macros` crate from being tested due to cargo bug (#3103)
* cargo: remove unused `editor/ron` feature

* cargo: add wgpu-executor as a member, sort list

* cargo: test every crate by default

* cargo: disable testing of `graphite-proc-macros`
2025-08-29 12:25:35 +02:00
Firestar99 95ef8a5343
Change `Table<Color>` node inputs to `Color` where only one value is used so GPU nodes work (#3096)
* graster-nodes: change `Table<Color>` params to `Color` where only one value is used

* Re-add support for Color and Option<Color>

* Add warning when a default value isn't parsed

---------

Co-authored-by: hypercube <0hypercube@gmail.com>
2025-08-28 15:16:56 +02:00
Priyanshu 9987112cc9
New node: 'Separate Subpaths' to break subpaths into individual vector table rows (#3069)
* impl separate paths node

* rename

* refactor

* Rename nodes 'Split Segments' -> 'Cut Segments' and 'Split Path' -> 'Cut Path'

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-08-28 06:07:09 +00:00
Firestar99 82784b46a0
Add node input type support for `f32` to enable usage on GPU (#3095)
* update Cargo.lock

* f32: switch to f32 params

* f32: more f32 params, remove f32 casts

* f32: property support for f32

* f32: fix test `stable_node_id_generation`

* Fix f32 properties

* Fix f32 frontend data types

* Rename TaggedValue::Vec2 to ::FVec2 and ::Affine2 to ::FAffine2

---------

Co-authored-by: hypercube <0hypercube@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-08-27 20:08:45 -07:00
Adesh Gupta 34b52bcc54
Clean up Path tool related code and fix bugs in several cases (#3070)
* Fix regressions related to path tool

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-08-27 23:42:04 +00:00
Timon c5991c6f61
Desktop: show platform specific window buttons (#3078)
Implement app window button functionality and set platform
2025-08-25 14:15:31 +00:00
Dennis Kobert d9cbf975ff
Deprecate automatic composition (#3088)
* Make manual_compositon non optional and rename to call_argument

* Fix clippy warnings

* Remove automatic composition compiler infrastructure

* Implement document migration

* Fix tests

* Fix compilation on web

* Fix doble number test

* Remove extra parens

* Cleanup

* Update demo artwork

* Remove last compose node mention

* Remove last mention of manual composition
2025-08-24 08:34:59 +00:00
Dennis Kobert 354bf93364
Store document node inputs in Arc to reduce memory consumption (#3086)
Store values in memo hash contanier in arc
2025-08-23 17:24:41 +02:00
Dennis Kobert 469f0a6c30
Remove lambda node inputs since they are no longer used (#3084)
* Remove lambda node inputs as they are now unused

* Fix warnings

* Fix tests

* Fix clippy warning
2025-08-23 12:16:49 +02:00
Dennis Kobert 7377871106
Fix clippy warnings (#3085)
* Run clippy fix

* Clippy v2

* Make const item static

* Cargo fmt
2025-08-23 11:45:47 +02:00
Keavon Chambers 0e467907e2
Improve font import; replace Inconsolata with Source Code Pro; show third-party licenses in editor dialog (#3079)
* Improve font import; replace Inconsolata with Source Code Pro; show third-party licenses in editor dialog

* Code review
2025-08-21 11:57:04 -07:00
Timon e70862b399
Desktop: Add File > Save As… (#3034)
* Make file name and document name identical

* Add save as action

* Fix test errors

* Add missing save as action

* Desktop fix drop file open document file message

* Address review comments

* Replace file save suffix with file extension

* Add comment specifying that the upload function takes a html input accept string

* Fix remove file extension in web

* Use let

* Don't show save as menu entry in web

* Don't add SaveDocumentAs in web

* Remove file extension on all open document file calls

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2025-08-20 10:09:01 +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
Priyanshu 615c035683
Fix a Path tool regression where selection depends on box winding direction (#3062)
fix path tool selection

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-08-19 04:36:18 +00:00
Mohd Mohsin 17d70dc60e
Add struct field visualization to the editor message hierarchy tree visualization on the website (#2917)
* Fix Message Tree: Enforce Structure and Visibility

* Code review

* fix the erroreous ouputs

* error handling for MessageHandler

* Fix website visualization HTML generation

* error handling for tuple-style message enum variant

* cleanup

* Update messages

* Normalize BroadcastEvent

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-08-18 21:04:29 -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
Vineet Puranik 0a4a822837
Fix Alt-based quick measurement to show document space coordinates instead of viewport space (#2995)
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-08-18 06:33:09 +00:00
Meet Zalavadiya 4da732dcc3
Fix artboard labels not reappearing once the node graph is closed to return to the viewport (#3061)
Closes #3045
2025-08-18 05:49:21 +00:00
Adesh Gupta 52174fa4c2
Remap Path tool point sliding to G G (#2913)
* 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
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
Adesh Gupta 99984fc2d6
Fix regression in shallow select (#3050)
* Add defer message for shallow select

* Fixed infinite loop
2025-08-15 12:55:05 +02:00
Keavon Chambers bdc029c692
Add Table<Gradient> as a graphical type (#3051) 2025-08-13 01:42:51 -07:00
Keavon Chambers 1b351aca76
Replace the Color type with Table<Color> everywhere (#3048) 2025-08-12 00:38:23 -07:00
Dennis Kobert 437fc70500
Desktop: Fix Node Graph Overlay (#3042)
Replace usize::MAX with u32::MAX as a marker value which can be used on both native and wasm
2025-08-11 13:23:12 +00:00
Timon fa2167dd7f
Desktop: Drag and drop file to open/import functionality (#3035)
* Desktop app add drop file functionality

* Add x11 libs to flake

* Restructure extension matching to remove nesting

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2025-08-11 11:48:10 +00:00
Keavon Chambers 2bb4509647
Replace the Spreadsheet panel with an improved Data panel (#3037)
* 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