Commit graph

2249 commits

Author SHA1 Message Date
firestar99
f82f3e6484 shader-rt: properly cfg out the gpu node 2025-08-25 11:49:27 +02:00
firestar99
5fc325acbd shader-rt: replace gpu node's args and ret types with Raster<GPU> 2025-08-25 11:49:27 +02:00
firestar99
802db70d5b shader-rt: fix recursion when generating shader node 2025-08-25 11:49:27 +02:00
firestar99
5a34d62048 shader-rt: initial 2025-08-25 11:49:27 +02:00
firestar99
236dbf8f2b shaders: fix node-macro tests 2025-08-25 11:49:27 +02:00
firestar99
e4561f44d0 shaders: add lint ignores from rust-gpu 2025-08-25 11:49:27 +02:00
firestar99
1ed33dcc80 shaders: #[repr(u32)] some enums 2025-08-25 11:49:27 +02:00
firestar99
7f6a7d0995 HACK shaders: switch to f32 params 2025-08-25 11:49:27 +02:00
firestar99
800922e6f2 shaders: disable nodes needing bool 2025-08-25 11:49:27 +02:00
firestar99
23a5a57ba5 shaders: codegen for per_pixel_adjust shader nodes 2025-08-25 11:49:27 +02:00
Timon Schelling
bc8c146212 nix: use rustc_codegen_spirv.so from nix 2025-08-25 11:49:27 +02:00
firestar99
7fb04b7ddd shaders: shader compilation setup 2025-08-25 11:49:27 +02:00
Timon Schelling
b87ce2f9a8 Add exec with rust-gpu env script to flake 2025-08-25 11:49:27 +02:00
Timon Schelling
17c27eee26 Try providing cargo-rust-gpu to nix devs 2025-08-25 11:49:27 +02:00
Timon Schelling
227c9fce24 Try providing cargo-rust-gpu to nix devs 2025-08-25 11:49:27 +02:00
firestar99
3f5d3ca302 graster-nodes: replace glam reexport with normal dep 2025-08-25 11:48:20 +02:00
firestar99
cc6b637a57 graster-nodes: make kurbo std-only 2025-08-25 11:48:20 +02:00
firestar99
ef51034b49 gcore-shaders: remove explicit fn pointer 2025-08-25 11:48:20 +02:00
firestar99
b74aef6f57 graster-nodes: remove async from shader nodes not needing it 2025-08-25 11:48:20 +02:00
firestar99
2ab80804b6 shaders: use unchecked Color constructors 2025-08-25 11:48:20 +02:00
firestar99
47747e6a0a graster-nodes: change Table<Color> params to Color, nodes color_overlay and black_and_white 2025-08-25 11:48:20 +02:00
firestar99
95ee3858dc graster-nodes: fix missing cfg on use statements 2025-08-25 11:48:19 +02:00
firestar99
c568540bf9 gcore-shaders: fix missing num-traits/libm features 2025-08-25 11:48:19 +02:00
Dennis Kobert
d9cbf975ff
Deprecate automatic composition (#3088)
Some checks failed
Website / build (push) Has been cancelled
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* 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
bb364c92ad
Fix automatic Into node insertion (#3087)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
Fix automatic into node insertion
2025-08-23 18:21:54 +02: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)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* 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
Timon
c6ec3a27ca
Desktop: Buffer web messages until connection is initialized (#3082)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
Buffer web messages until connection is initialized
2025-08-22 15:15:17 +00:00
Dennis Kobert
a4ec50d8ba
Improve robustness and performance of the boolean operation algorithm (#2191)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* Improve perf of path bool lib

* Use swap remove

* Use outer/inner bounding box for inclusion testing

* Reuse allocations for hit testing

* Use direct root finding for inclusion testing

* Reuse bounding box

* Use faster hash and specify capacities

* Use hashmap based approach for find vertices

* Unroll find_vertecies loop and use 32 bit positions

* Tune initial vec capacities

* Remove unused bounding boxes

* Use smallvec for storing outgoing edges

* Improve allocations for compute_minor

* Use approximate bounding box for edge finding

* Transition aabb to use glam vecs

* Make find vertecies use 64 bit again this is slower but less likely to cause issues

* Improve intersection candidate finding

* Remove loop check in bit vec iter

* Special case cubic line intersections

* Optimize grid rounding and add debug output

* Remove file write

* Remove faulty line intersection

* Fix grid rounding

* Improve robustness and cleanaup code

* Make elided lifetime explicit

* Fix tests

* Fix a boolean ops crash

* Add comment

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-08-21 23:15:36 +00:00
Dennis Kobert
e4dd3ce806
Desktop: Use multithreaded CEF event loop on Windows and Linux (#3076)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* Prototype multi threaded event loop

* Fix input event dispatch

* Remove dead code

* Reenable do_message_loop_work for macos targets

* Cleanup

* Review cleanup

* Remove outdated comment

* Attempt to fix texture import errors

---------

Co-authored-by: Timon Schelling <me@timon.zip>
2025-08-21 19:46:13 +00: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
Dennis Kobert
e56f858ced Desktop: Implement GPU accelerated offscreen rendering and improve rendering efficency (#3056)
* WIP accelerade offscreen canvas implementation

* Implement vulkan dmabuf import

* Add fps printing

* Add feature gates

* Forgot to add file

* Experimental windows support

* Cast ptr to isize

* Remove testing chrome://flags url

* Experimental macos support for texture import

* Cleanup code and improve latency / frame pacing

* Add path for importing textures on windows through dx12

* Update doc comment

* Import textures through metal on macos

* Review cleanup

---------

Co-authored-by: Timon Schelling <me@timon.zip>
2025-08-21 10:09:38 -07:00
Dennis Kobert
97978c2491 Desktop: Change feature guard to Linux instead of Unix for Wayland 2025-08-21 10:08:29 -07:00
Timon
2c8913416d
Desktop: Move wrapper to separate crate (#3073)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
Move desktop wrapper to separate crate
2025-08-20 15:41:34 +00:00
Timon
30e5d66105
Desktop: Implement desktop wrapper module (#3039)
* Prototyping desktop wrapper api

* Separate into multiple modules

* Some fixup

* Reimplement most functionality with editor api

* Fix texture life time crashes

* Fix scale

* Implement editor wrapper message queue

* Improve performance

* Handle native messages directly without submitting to event loop

* Fix overlay latency

* Move editor message execution to executor allows no shared state in editor wrapper

* Small clean up

* Small cleanup

* Some renames

* Cleaning up desktop wrapper interface

* Fix formatting

* Fix naming

* Move node graph execution result handling to app

* Fix FrontendMessage RenderOverlays usage

* Reimplement file drop and clean up file import and open messages

* Remove dbg

* Post merge fix

* Review changes
2025-08-20 13:27:36 +00:00
Dennis Kobert
a70c48f69a
Use lyon_geom for intersection calculation of bezier segments (#3071)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* Add lyon_geom for cubic cubic intersections in he path bool crate

* Remove cubic line intersection for now
2025-08-20 13:59:11 +02: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
Firestar99
b44a4fba1e
node-macro: cleanup ParsedField struct (#3064)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* node-macro: cleanup `ParsedField` struct

* node-macro: fixup tests
2025-08-19 09:25:58 +00:00
Ciftci
36a1453d03
Add workaround for a Safari bug where our number input fields can't be released from click-and-drag (#3053)
Added fallback for Safari to trigger a pointerLockChange in case it doesnt fire automatically

Co-authored-by: seabeeberry <seri@Mac.fritz.box>
2025-08-18 22:30:18 -07: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)
Some checks failed
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
Website / build (push) Has been cancelled
* 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
mTvare
5ed45ead6f
Fix click target not extending to correct limit for aligned strokes (#3065)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
Fixes #3047
2025-08-18 12:30:57 -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)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
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)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* 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
Keavon Chambers
3bcec37493
Remove the deprecated/archived Bezier-rs library from the repo (#3058)
Some checks failed
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
Website / build (push) Has been cancelled
Remove the Bezier-rs library from the repo
2025-08-16 17:29:00 -07: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