Commit Graph

2322 Commits

Author SHA1 Message Date
James Lindsay 23eb5998db
Fix pen tool (#3002) 2025-08-05 11:41:59 +00:00
Keavon Chambers 6dd17f76c1 Fix pointer offset from viewport position 2025-08-05 03:26:09 -07:00
Dennis Kobert 8b4adf4330
Desktop: Fix Vello rendering colors with doubly-applied gamma by converting to linear in the shader (#2998)
* Fix gamma issue by applying tone mapping in the shader

Vello renders it's values to an RgbaUnorm texture
but if we try to use this in the main rendering
pipeline which renders to an Srgb surface gamma
mapping is applied twice.

* Add comment explaining why we do this to the shader

* Rename variables
2025-08-05 10:08:14 +00:00
Keavon Chambers 2e1396462c
Eliminate bare Graphic and Artboard graph data by making Merge and Artboard nodes internally use tables (#2996)
* Eliminate bare Graphic and Artboard graph data by making Merge and Artboard nodes internally use tables

* Make the Extend node user-facing
2025-08-05 02:24:12 -07:00
Dennis Kobert 836a110c72
Fix broken animations by removing deadlock (#2993)
* Fix animations not working by removing deadlock

* Remove log
2025-08-04 22:51:39 +00:00
Keavon Chambers 4b11dced48 Make Table<T> implement the IntoIterator trait 2025-08-04 15:20:48 -07:00
Timon 7cb42b9523
Desktop: Add native file dialogs (#2939)
* Add native open file dialog

* Add native save file dialog

* Fix integer underflow in defer message handler

* Update nix flake

* Cleanup

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2025-08-04 13:58:33 +00:00
Keavon Chambers c98477d8ed
Rename graphic subtypes to remove their "data" and "group" suffixes (#2990)
* 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
Timon 853c26cbc1
Desktop: Viewport bounds from viewport container (#2989)
* Remove build script because it created more issues that it solved

* Get viewport bounds from viewport container
2025-08-04 11:14:34 +00:00
0SlowPoke0 fd66f29853
Fix Shape tools bugs with stars/polygons with negative radii and circle radius click detection when viewport is zoomed (#2986)
* fixed spacing,click detection in radius gizmo fix drag in start point radiius gizmo

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-08-04 01:14:28 +00:00
Keavon Chambers 5637f01845
Rename GraphicElement -> Graphic and trait GraphicElementRendered -> Render (#2987) 2025-08-03 16:15:02 -07:00
Keavon Chambers 9a4a7dee80 Make auto-saving happen once per second 2025-08-03 15:20:30 -07:00
Timon 8fad295e36
Make checkboxes not use interior mutability (#2976)
* Make checkboxes not use interior mutability

* Use copy instead of cloning

* Fix

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-08-03 15:16:21 -07:00
Dennis Kobert 7fcdad1f88
Remove message deferral for text creation (#2978)
* Remove message deferral for text creation

* Restructure Trigger Navigation ready to not hijack the PTZ Update
2025-08-03 16:06:30 +02:00
Keavon Chambers a0ce56d9b6
Rename Instances<T> to Table<T> and the "instance" terminology to "TableRow" and "element" (#2981)
* 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
James Lindsay 1e3c3da3fe
Fix the Path tool erroneously showing editable geometry overlays belonging to hidden Path nodes (#2932)
* Ignore hidden path nodes

* Use correct path node vector modification

* Break test

* Better fix for test

* Fix rustfmt

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-08-02 22:53:05 +00:00
Adesh Gupta c42011f8e2
Partly fix when the "Make Path Editable" button is shown as enabled (#2968)
* Fix add path node button enable

* Fix add path node button enable

* Refactor code

* Fix formatting

* Clean up logic

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-08-02 21:55:04 +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)
* 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)
* 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
Adesh Gupta 668acd3c30
Improve the Path tool's segment editing mode and make hovering manipulators react contextually (#2860)
* Improve path editing mode

* Code review

* Tidy up UI

* Update path selection behaviour

* Fix linting

* Remove frozen flag

* Code review

* Fix segment split

* Fix deleting segments

* Add requred methods in vello overlay context

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-08-01 23:58:35 -07:00
0SlowPoke0 523132da17
Add 'Circle' to the Shape tool and its associated gizmos (#2914)
* merged with circle and impl inner radius gizmo for arc

* impl radius-gizmo for arc

* fix only one gizmo shown at a time

* Code review

* make hints update when changing shape,add default behaviour when dragging to make circle earlier fixed to from center

* fixed arc-radius hover threshold and show arc-endpoint when hover over arc-radius gizmo

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-08-01 22:23:21 -07:00
Dennis Kobert 97bd0ebac4
Fix Vello rendering on wasm 2025-08-01 13:13:25 +02:00
Priyanshu 2306e9866e
Refactor the 'Offset Path' node to use Kurbo entirely (#2946)
* 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
Dennis Kobert f15023ef58
Fix regression with double-click in the Path tool not working (#2963)
* Fix double click in path tool not working

* Remove debug line

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-07-31 21:53:28 +00:00
Dennis Kobert 08ec1d08f6
Desktop: Execute editor and node graph natively (#2955)
* Desktop: Execute editor and node graph natively

* Remove decouple execution feature

* Disable feature gate for native communication functions

* Avoid ininite message loop on an infinite canvas

* Add any lint exception

* Build evaluation loop

* Fix texture passing message

* Cleanup

* More cleanup

---------

Co-authored-by: Timon Schelling <me@timon.zip>
2025-07-31 10:26:36 +00:00
Keavon Chambers 07802204f2
Fix ~1 second delay opening new document in Chrome by correctly setting willReadFrequently (#2962)
* Fix ~1 second delay opening new document in Chrome by correctly setting willReadFrequently

* Use willReadFrequently in a couple more places
2025-07-31 02:49:16 -07:00
Keavon Chambers abab145d65 Fix the Rasterize node to not ignore raster graphical data 2025-07-31 01:21:32 -07:00
0SlowPoke0 7e0a274bd1
Fix Shape tool arc gizmo snap visualization and pointer cursor icon when hovering or dragging (#2957)
* fixed cursor,arc bugs

* Update cursor icon

* send pointer-move only when required

* make it compile

* Code review

* remove repeated modifier key

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-07-31 00:04:08 -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 2025-07-29 15:17:41 -07:00
Dennis Kobert 00cfa073b8
Stub vello based overlay implementation (#2956)
* Stub vello based overlay implementation

* Fix warnings

* Don't panic on non implemented functions to allow the tests to pass

* Don't draw overlays for tests
2025-07-29 22:06:45 +02:00
Keavon Chambers b348fabfd2 Remove the unsupported Brush tool warning dialog now that raster performance is improved 2025-07-28 17:03:48 -07:00
Dennis Kobert 35ab266bbb
Add handler for deferred execution of messages (#2951)
* Add Handler for defered execution of messages

* Cleanup

* Track graph execution id to associate messages with their corresponding execution id

* Rename ViewportReady -> NavigationReady

* Defer layer deselection
2025-07-29 01:57:11 +02: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
Timon 6119dea58c
Desktop add viewport texture (#2953)
* Allow rendering viewport texture beneath ui texture

* Add viewport scale

* Update desktop/src/render/fullscreen_texture.wgsl

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2025-07-28 17:10:27 +00:00
Timon 83d39fb320
Desktop: Cleaner CEF bidirectional message implementation (#2950)
* Rename CEF implementations to match the process they are called in

* Rename CEF implementations to match the process they are called in

* Implement ipc abstraction

* Call js function `receiveNativeMessage` for all SendToJS ipc messages

* Allow js to call `sendNativeMessage` for sending messages to the browser process

Co-authored-by: Adam <adamgerhant@gmail.com>
Co-authored-by: Dennis Kobert <dennis@kobert.dev>

* Fix missing safety consideration

---------

Co-authored-by: Adam <adamgerhant@gmail.com>
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2025-07-28 13:04:15 +00:00
Timon 7bdf1670b5
Desktop: Have CEF use Wayland if available (#2945)
tell cef to use wayland if available

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-07-28 10:30:36 +00:00
mTvare 516e612b4a
Fix regression in flipping/turning selected-but-not-locked objects (#2948)
Fix boolean contradiction in

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-07-28 09:59:09 +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
Keavon Chambers d9de1a1c73 Update the website's development roadmap 2025-07-27 03:17:44 -07:00
Adesh Gupta 75614eb9d4
Fix vector mesh editing behavior in various edge cases (#2943)
* 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
James Lindsay a1796dbc08
Fix a single layer twice selected hiding the properties (#2911)
* Fix a single layer twice selected hiding the properties

* Comment that the same node appears several times

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-07-26 05:28:02 +00: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
Timon 91156d295c
Desktop: Handle another instance is already running (#2938)
Handle another instance is already running
2025-07-25 21:38:54 +00: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) 2025-07-25 16:15:21 +00:00
Dennis Kobert a52ee70e4c
Desktop: Directly upload frame buffer (#2930)
* Upload frame buffer directly to gpu texture

* Disable cef GPU acceleration to prevent crashes

* Cleanup code

* Address review comments

---------

Co-authored-by: Timon Schelling <me@timon.zip>
2025-07-25 14:04:46 +02:00