Commit graph

55 commits

Author SHA1 Message Date
Mateo
497758c273
Desktop: Add simple cli interface (#3059)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* Open document from cli and add some files to .gitignore

* Revert .gitignore

* Revert .gitignore

* Implement cli properly

* Add ui-accelerated-painting option

* Format code

* Revert changes in .vscode folder

* Don't use global variables for cli

* Apply suggested changes

* Make ready for merge

* Improve names

* remove comment

---------

Co-authored-by: Timon <me@timon.zip>
2025-10-13 21:09:40 +00:00
Timon
e366e4d64e
Desktop: Update CEF to v140 (#3277)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* update cef to v140

* fix build

* update flake
2025-10-13 04:56:56 +00:00
Timon
48ac24da14
Desktop: Fix frontend message response dispatch (#3247)
* One annoying debugging session later

Discovered that the editor handles frontend messages differently from other messages.
It requires all frontend messages to be fully processed before dispatching any resulting messages.

In the web frontend, this behavior happened implicitly because message dispatch is queued at the current end of the JavaScript execution queue.
For the desktop frontend, I added a vector to collect all responses until the entire batch of frontend messages is handled, and then dispatch them afterwards.

* Fix double click travel
2025-10-06 20:04:24 +00:00
Timon
4bb1d05fc3
Desktop: Add taskbar icon on Windows (#3225)
* include icon as resource on windows

* load icon
2025-09-26 14:30:01 +02:00
Timon
d06c8164e1
Desktop: Forward multi-clicks (double/triple/etc.-clicks) to CEF correctly (#3224)
* fix multiclick

* Revert "fix multiclick"

This reverts commit c4130d12ee.

* try another way

* use copy

* Use struct initializer syntax fror click tracker (#3226)

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2025-09-26 14:29:56 +02:00
Timon
ed22e6a63d
Desktop: Add rudimentary support for custom WGPU adapter selection (#3201)
* rudimentary custom wgpu adapter selection

* WgpuContextBuilder

* wasm fix

* fix wasm warnings

* Clean up

* Review suggestions

* fix
2025-09-25 14:38:26 +00:00
Timon
d595089bb0
Desktop: Fix maximized window extending outside the screen on Windows (#3210)
Desktop: Fix window extending outside the screen on windows when maximized
2025-09-25 15:22:05 +02:00
Timon
04a2452333
Desktop: Support cursor icon change (#3223)
* browser console message forwarding

* replace target to make it easy to identify browser console messages

* use warn as per review comment

* cursor icon change

* fix win build
2025-09-25 11:23:19 +00:00
Timon
b4be616de0
Desktop: Browser console message forwarding (#3193)
* browser console message forwarding

* replace target to make it easy to identify browser console messages

* use warn as per review comment
2025-09-25 10:42:07 +00:00
Timon
d15f63f4fd
Ensure the LoadPreferences message is dispatched with None when no preferences exist (#3198)
Some checks failed
Editor: Dev & CI / build (push) Has been cancelled
Editor: Dev & CI / cargo-deny (push) Has been cancelled
* preference load message on default load

* review fixup
2025-09-23 20:19:16 +00:00
Timon
21f34ab19a
Desktop: Enable window resize controls on Wayland compositors (#3183)
Some checks failed
Editor: Dev & CI / build (push) Has been cancelled
Editor: Dev & CI / cargo-deny (push) Has been cancelled
wayland client side decorations
2025-09-21 12:17:05 +00:00
Timon
09bc891ab2
Desktop: Forward the pointer leave event to CEF (#3197)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* pointer leave

* make one-liner
2025-09-21 10:23:51 +00:00
Timon
46d5928724
Desktop: Fix window maximize and minimize (#3200)
Some checks are pending
Editor: Dev & CI / cargo-deny (push) Waiting to run
Editor: Dev & CI / build (push) Waiting to run
Fix window maximize and minimize state
2025-09-20 23:48:47 +00:00
Timon
3fe7c477e9
Desktop: Switch to the latest unreleased version of Winit (#3177)
Some checks failed
Editor: Dev & CI / build (push) Has been cancelled
Editor: Dev & CI / cargo-deny (push) Has been cancelled
* Use unstable winit

* Improve

* Remove unnecessary heap indirection
2025-09-17 16:40:43 +02:00
Timon
ab55b3225d
Desktop: Window resize handling on Windows (#3167)
Some checks failed
Editor: Dev & CI / build (push) Has been cancelled
Editor: Dev & CI / cargo-deny (push) Has been cancelled
* Native window resize on windows

* Fix linux build

* Fix windows build

* try clean up

* clean up

* Add module comment

* FIx

* Review improvements

* Improve
2025-09-15 12:15:31 +00:00
Timon
da330b6dd0
Desktop: Run CEF in incognito mode and delete root cache path on exit (#3137)
Some checks failed
Editor: Dev & CI / build (push) Has been cancelled
Editor: Dev & CI / cargo-deny (push) Has been cancelled
* Try

* Run cef in non persistence mode
2025-09-13 22:19:45 +00:00
Timon
944a6eeea2
Desktop: Hook up native window controls (#3161)
* Implement window controls

* Fix drag target size

* Maximize with drag area double click
2025-09-13 20:15:52 +00:00
Timon
e97d5520e8
Desktop: Support receiving double click inputs (#3168)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* input support double clicks and clean up

* Review improvements
2025-09-13 12:40:31 +00:00
Timon
c51967384f
Desktop: Fix keyboard shortcuts on windows (#3139)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* Try to fix shortcuts on windows

* Fix
2025-09-10 10:51:15 +00:00
Timon
50be13522b
Desktop: Move preferences persistence to native (#3138)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* Move preference persistence to native

* Pass preferences as struct instead of serialized to string
2025-09-09 16:22:25 +00:00
Timon
4261b7dad1
Desktop: Move autosave persistence to native (#3134)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* Move autosave persistence to native 1

* Move autosave persistence to native 2

* Reimplement quirky behavior of the web frontend

* Code revew

* Use select_after_open

* fix fmt

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-09-09 11:27:54 +00:00
Dennis Kobert
acd7ba38cc
Graphene: Fine-grained context caching (#2500)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* 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
Firestar99
be3de511f2
Desktop: Pin CEF version (#3113)
Some checks failed
Editor: Dev & CI / build (push) Has been cancelled
Editor: Dev & CI / cargo-deny (push) Has been cancelled
Fixed CEF cargo dependency so `cargo update` does not update it
2025-08-31 10:22:34 +00:00
Firestar99
ce1cd1706b
Disable proc-macros crate from being tested due to cargo bug (#3103)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* 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
Timon
1d4d1026d4
Desktop: Make embedded resources optional (#3094)
* Make embedding resources optional

* Move remaining cef rc to internal module

* Move embedded resources to separate crate

* Review fixup

* Fix

* Fix read

* Add read error
2025-08-28 17:18:18 +00:00
Timon
c5991c6f61
Desktop: show platform specific window buttons (#3078)
Some checks failed
Editor: Dev & CI / build (push) Has been cancelled
Editor: Dev & CI / cargo-deny (push) Has been cancelled
Implement app window button functionality and set platform
2025-08-25 14:15:31 +00:00
Timon
508606cdba
Desktop: add missing txt file mime type mapping (#3091)
add missing txt file extension to mime type mapping

missing mapping caused license dialog that loads txt file to fail and report no network connection
2025-08-25 15:51:59 +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
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
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
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
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
Timon
67a7b98f4f
Desktop: Fix UI and viewport blending (#3052)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* Tell the GPU that the UI texture is in sRGB format so that it is converted to linear before sampling

* Do blending in srgb

* Revert "Tell the GPU that the UI texture is in sRGB format so that it is converted to linear before sampling"

* Remove unnecessary srgb linear conversions

* Blend overlays and viewport in linear and return early when ui is fully transparent
2025-08-14 11:42:55 +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
Timon
96a1b12a05
Desktop: Unify save file handling and add file dialog for export (#3008)
* Prepare save file unification

* Desktop add save file dialog
2025-08-06 16:07:53 +00:00
Timon
5f2432cacf
Desktop: Open links in default browser and prevent popups (#3006)
* Deny all browser popups

* Open links with default browser

* Fix review comments
2025-08-06 15:28:10 +00:00
Timon
0462d0ea2f
Desktop: Linux improve desktop integration (#3003)
* Move consts to extra module

* Add desktop icons

* Add xdg desktop file

* Improve window attributes

* Make icon background white
2025-08-06 15:05:38 +00:00
Timon
1742e6000a
Desktop: Add some missing key codes (#3011)
Add some missing key codes
2025-08-06 15:33:13 +02: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
Timon
7cb42b9523
Desktop: Add native file dialogs (#2939)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* 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
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
Timon
34a8b9b6f1
Desktop: Render overlays with vello (#2965)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* 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
Dennis Kobert
08ec1d08f6
Desktop: Execute editor and node graph natively (#2955)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* 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
Timon
6119dea58c
Desktop add viewport texture (#2953)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
* 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
Timon
91156d295c
Desktop: Handle another instance is already running (#2938)
Some checks are pending
Editor: Dev & CI / build (push) Waiting to run
Editor: Dev & CI / cargo-deny (push) Waiting to run
Handle another instance is already running
2025-07-25 21:38:54 +00:00