Commit Graph

2783 Commits

Author SHA1 Message Date
Jatin Bharti b1933e3bcb
Fix node graph export sometimes not sticking to right edge of graph (#3852)
fix : Canvas Label Positioning in Node Graph
2026-03-10 10:42:51 +00:00
Keavon Chambers 2910e50b2f
Improve Shape tool arrow mode interactive drawing with angle modifier keys and endpoint gizmos (#3874)
* Make the order of Shape tool shape types consistent

* Add Arrow shape modifier keys and snapping support

* Add endpoint dragging to arrows

* Show the default cursor when hovering line/arrow endpoints

* Reduce duplicated function

* Fix incorrect coordinate spaces

* Improve endpoint dragging clarity
2026-03-10 03:41:35 -07:00
Ayush Amawate e7a2800665
Fix Shape tool type dropdown not persisting selection and not excluding Line/Rectangle/Ellipse (#3731)
* fix Shape tool dropdown resetting to Polygon when switching tools

* add sync for rectangle/ellipse and line

* fix build issues
2026-03-10 08:25:44 +00:00
Keavon Chambers 9f9dd71e91
Fix vector drawing tool transform space handling (#3872)
* Fix vector drawing tool transform space handling

* Review fixes

* Fix test
2026-03-10 00:58:51 -07:00
Ayush Amawate 20501cac96
Fix Shape tool layer creation to not make the Transform node to appear after the Stroke node (#3854)
Fix shape stroke thickness

remove redundant call

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-03-10 01:41:43 +00:00
Timon 4300a885dc
Fix raster export scale factor (#3870)
* fix export scale factor

* export scale increment step 0.5

* fix svg to raster export on web
2026-03-10 01:23:42 +00:00
Dennis Kobert f06983d072
Fix texture cache region size and broken rendering when tilting the viewport (#3867)
* Fix rotation for render cache

* Simplify code and fix zoom not invalidating cache

* Add constant for quantization amount

* fix region size

* print error when splitting oversized region fails

---------

Co-authored-by: Timon <me@timon.zip>
2026-03-09 23:42:38 +00:00
Keavon Chambers 52d2b38a82 Refactor the TypeScript data flow for full type safety and auto-generation of Rust types (#3865)
* Migrate Specta to Tsify to auto-generate messages.ts, working except colors and widgets

* Adopt the generated FillColor/Color/GradientStops

* Fix widget typing

* Separate WidgetGroup enum variants into wrapper structs

* Small rename

* Simplify widgets further

* Clean up message type references

* Switch type imports to the auto-generated file

* Remove lowercase serde rename

* Fix FillChoice deserialization

* Fix small regression from #3837

* Improve type safety

* Make WidgetSpan type-safe

* More cleanup and type safety

* More type safety

* More type safety

* Get the rest to type-check without errors; improve widget builder macro to have optional icons; improve Svelte 5 configs

* Cargo fmt

* Fix imports

* Update outdated readme info

* Fix lint command rename references

* Fix typos

* One more typos fix

* Remove unnecessary dep: prefix from the edited Cargo.toml files

* Remove excess parts from Cargo.toml

* Fix compiling on desktop

* Revert "Remove excess parts from Cargo.toml"

This reverts commit 6b711117b3a5d5d8a3ee20f36a43bc74930b7c82.

* Update dev docs with simpler, more accurate instructions
2026-03-09 16:35:04 -07:00
Ayush Amawate fbd2658148
Replace deprecated criterion::black_box with std::hint::black_box (#3860)
* replace deprecated criterion::black_box with std::hint::black_box

* gemini code review suggestions

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* apply formating

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-03-08 10:40:55 +00:00
Dennis Kobert 3d1491ce92
Add animated GIF file export to Graphene CLI (#3846)
* Add gif file export via graphene cli

* Add check for negative fps numbers
2026-03-08 10:33:40 +00:00
Timon 5d22292072
Replace `npm` build script with new `cargo run` tool (#3832)
* move nix flake to root

* cargo run tool

* use thiserror in third-party-licenses tool

* prefere panic over exit

* Add automatic dependency check to cargo run tool

* Skip dependecies that are not needed for the current task

* Fixup

* Fixup

* fix windows

* Fixup

* improve usage text

* Fix linux bundle

* add graphen-cli

* fix build profile

* fix

* release profile should not include debug infos

* Review

* remove profiling profile

was redundent with release

* rename to cargo-run tool

* improve consistency

* rename deps to requirements

* fix

* return success when showing usage
2026-03-07 13:26:19 +00:00
Dennis Kobert 50ef6e15cb
Use glob syntax for Cargo.toml (#3489)
* Use glob syntax for Cargo.toml

* Readd nested crates to workspace members and reduce the list of default members
2026-03-05 10:20:41 +00:00
Keavon Chambers ead914ec2b
Fix regression where Vello doesn't render new document opened after closing all documents (#3849)
* Fix regression where Vello doesn't render new document opened after closing all documents

* Remove last_svg_canvas and do this logic in the frontend
2026-03-05 09:54:31 +00:00
Keavon Chambers 8a1dfb9d8f
Refactor messages.ts by removing class-transformer and JS classes (#3858)
* Fix gamma correction with HTML-based editable Text tool text

* Migrate simple, undecorated classes to types

* Remove TupleToVec2 transformation

* Remove @Transform from tooltips

* Cleanup: replace value.toString() with String(value) everywhere

* Convert documentId from string to bigint

* Migrate the rest of the easy @Transform/@Type decorations

* Migrate FillChoice

* Migrate WidgetDiffUpdate

* Migrate WidgetInstance

* Migrate away from classes that extend WidgetProps

* Remove class-transformer and all classes in messages.ts

* Migrate UI layout passing

* Remove dead code

* Remove unnecessary export and readonly prefixes

* Remove HSVA type

* Break out Color, Gradient, and FillChoice functions into a utility-functions file

* Move widget helper functions from messages.ts into a new utility-functions file; restructure type imports

* Reduce internal type defs

* Rename JsMessage to FrontendMessage

* Code review fixes

* Fix other usages

* Tidying up
2026-03-05 01:43:21 -08:00
Keavon Chambers f00a15a4c9
Clean up Gradient and Color classes in TS by removing their methods (#3857) 2026-03-04 02:39:07 -08:00
Keavon Chambers 5834ee9ce4
Clean up generic widget handling code in the frontend (#3856)
* Clean up WidgetSpan component code to avoid the giant if-chain for choosing a widget

* Improve typing support
2026-03-04 01:00:09 -08:00
Keavon Chambers 8a75c0c1e1
Add layer locked toggle icon and context menu entry to node graph (#3855)
* Add layer locked toggle icon and context menu entry to node graph

* Simplify logic
2026-03-04 06:30:04 +00:00
Mohan 54a02dedd5
Fix thumbnails not being updated for layers when they become empty (#3624)
* fix: thumbnail render for empty layers

* removed self import

* fix: rename

* Cleanup

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-03-03 06:45:19 +00:00
Keavon Chambers 7cc3097acd
Make the Outline render mode draw with consistent stroke thickness at any viewport zoom (#3848)
* Remove dead code for now-retired SVG implementation

* Implement viewport zoom compensation for thickness
2026-03-02 20:13:05 -08:00
Keavon Chambers a8b5203d6c
Clean up code for drawing overlays to accept sRGB hex codes instead of Color structs (#3839)
* Clean up code for drawing overlays to accept sRGB hex codes instead of Color structs

* Consolidate hex code parsing functions
2026-02-27 14:08:58 -08:00
Keavon Chambers 9ecbfb7110
New nodes: RGBA to Color, HSVA to Color, Hex to Color, and Read Gradient (#3838)
* New nodes: RGBA to Color, HSVA to Color, Hex to Color, and Read Gradient

* Simplify
2026-02-26 18:22:04 -08:00
Keavon Chambers f1cbc4b396
Make the node graph use Table<GradientStops> instead of GradientStops (#3837)
* Switch from GradientStops to Table<GradientStops> in all nodes

* Remove TaggedValue::ColorNotInTable

* Fix bug

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Add migrations

* Fix default gradient on empty table

* Update demo artwork

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-02-26 14:07:31 -08:00
Keavon Chambers 81c73d11ff
Clean up duplicated code used for recursively flattening graphic types (#3836)
* Reduce recusive flattening algorithm duplication

* Generalize further

* Avoid code duplication in the 'Flatten Path' node

* Avoid cloning

* Include intermediate levels of alpha blending composition
2026-02-26 05:36:23 -08:00
Keavon Chambers cde7d5f951
New nodes: Colors to Gradient, Flatten Color, and Flatten Gradient (#3835)
* New nodes: Colors to Gradient, Flatten Color, and Flatten Gradient

* Fix Data panel not showing GradientStops

* Fix wrong category
2026-02-26 03:44:12 -08:00
Timon da7437c023
Reimplement notice file generation for third-party licenses through Rust, now with CEF credits (#3808) 2026-02-26 11:12:28 +00:00
Keavon Chambers 4090f6c980 Tweak short-term roadmap details 2026-02-25 21:40:36 -08:00
Keavon Chambers e62771845f
Add an in-viewport color picker to the Gradient tool when double-clicking a color stop (#3834)
* Hide batched blocked debug print messages

* Implement the color picker on double-clicking stops

* Code review
2026-02-25 21:03:12 -08:00
Keavon Chambers 82cf8eb369
Upgrade Linebender and related dependencies (#3819)
Co-authored-by: Timon <me@timon.zip>
2026-02-25 19:10:57 +00:00
Keavon Chambers 8117ddcdb3
Add Gradient tool control bar buttons, Reverse Stops and Reverse Direction (#3830)
* Add Gradient tool control bar buttons, Reverse Stops and Reverse Direction

* Consolidate reused gradient line updating code
2026-02-25 00:48:21 -08:00
Keavon Chambers b4679b0675
Improve Gradient tool dragging behavior and make hints reactive to current interaction state (#3828)
* Improve Gradient tool dragging behavior and make hints reactive to current interaction state

* Reduce code duplication for drawing stops

* Fix coordinate system issue when PTZ'ing document during drag or autopan
2026-02-24 22:17:29 -08:00
Keavon Chambers 4a6cdffd84
Add draggable diamond midpoint gizmos to the Gradient tool (#3826) 2026-02-24 20:25:15 -08:00
Dennis Kobert 7250b091d5
Fix the UI scaling factor invalidating the render cache (#3818)
* Fix ui scaling messing up render cache

* Review

---------

Co-authored-by: Timon <me@timon.zip>
2026-02-24 12:41:42 +00:00
Dennis Kobert 65ca8610eb
Split CI job to run on dedicated runners for web and native build (#3812)
* Split ci job to run on dedicated runners for web and native build

* Trigger CI

* Update labels

* Update comment text

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-02-24 09:37:00 +00:00
Kulcode 3b91d02fff
Add snapping to endpoints and stops in the Gradient tool (#3732)
* snapping

* Cleanup

* fix

* Fix snapping failing sometimes on newly drawn gradient lines

* Code cleanup

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-02-24 04:48:28 +00:00
Keavon Chambers 691d965bcf
Add support for gradients with midpoints and add draggable diamonds to the color picker dialog (#3813)
* Refactor GradientStops to use struct-of-arrays and include midpoint

* Implement interaction and rendering

* Make color picker saturation-value color picking snap to original position and show both axis lines

Make color picker saturation-value color picking snap to original position and show both axis lines

* Add graphite:midpoint attribute to SVG exports

* Add graphite:midpoint parsing to SVG importer
2026-02-23 19:21:51 -08:00
Dennis Kobert a1c1039ea1
Fix path tool overlays (#3810)
* Add vector data to merge function

Use destructuring to avoid issues like this in the future

* Remove unnecessary explict copying
2026-02-23 09:17:00 +00:00
Keavon Chambers 71b4c98de7 Fix logarithmic spiral not drawing if Inner Radius is 0 2026-02-22 13:48:19 -08:00
Keavon Chambers 9f2c8713ff
Add the SVG Preview render mode in place of the Vello option in the preferences (#3797)
* Remove Vello from preferences

* Add the Render Mode: SVG Preview radio button

* Remove SVG outline renderer

* Add a tooltip explaination when disabled in unsupported browsers

* Fix Eyedropper tool to support Outline render mode

* Use #[allow(clippy::too_many_arguments)] instead of tuple

* Rerun nodegraph when max render area is changed

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2026-02-22 20:27:26 +00:00
Timon a2d3b3f410
Desktop: Make shutdown more robust and fix panic caused by invalid viewport scale (#3783)
* Fix panic caused by invalid viewport scale

* Make shutdown more robust
2026-02-22 17:28:35 +00:00
Jill Chhagnani 9d83998463
Fix missing crash dialog for panics thrown inside requestAnimationFrame loop (#3788)
* add crash dialog in RAF path

* removed panic!()

* removed redundant string allocationa dn duplication between function

* fixed allocation

* removed bloated code
2026-02-22 17:27:23 +00:00
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 5aca75dcbd Simplify breadcrumb trail buttons widget styling 2026-02-20 22:50:05 -08:00
Keavon Chambers 7ca6470656
Rename the repeat nodes to replace "Instance" terminology with "Repeat" (#3794)
* WIP

* Move the Mirror node from the module 'vector' to 'graphic'

* Update demo art

* Fix failing tests

Fix tests
2026-02-20 22:10:59 -08:00
Keavon Chambers 5a1503fc98 New node: Flatten Raster 2026-02-20 13:35:12 -08:00
Dennis Kobert ba177c4c5d
Generalize the 'Map Vector' node as 'Map' with support for all graphical types (#3793)
* Rename Map Vector to Map

* Fix compilation errors

* Move to the Graphic module and add Read {Graphic, Raster, Color} nodes

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-02-20 21:33:02 +00:00
Keavon Chambers bd1c54907d
Rename nodes from "Instance ___" -> "Read ___" and "Instance Map" -> "Map Vector" (#3792)
* Rename nodes from "Instance ___" -> "Read ___" and "Instance Map" -> "Map Vector"

* Update leftover references and demo artwork

* Simplify logic

* Fix test
2026-02-20 08:52:36 +00:00
Keavon Chambers da278e0264 New node: Map Points
Also resolves #3217
2026-02-19 14:37:35 -08:00
Keavon Chambers 258748ec51
Swap the default placement order of Fill and Stroke nodes in layers (#3789) 2026-02-19 13:15:11 -08:00
Timon 3f999bf231
Desktop: Add "Disable UI Acceleration" to preferences (#3774)
* Deskltop: Add Disable UI Accelaration preference

* Fixup

* Fix typo

* Code review and update strings

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-02-19 01:54:01 +00:00
Keavon Chambers 6824f55929 Add hover style to checkboxes when their corresponding labels are hovered 2026-02-18 17:37:34 -08:00