Commit graph

2382 commits

Author SHA1 Message Date
Keavon Chambers
501b562d0f Add 'Gradient Map' adjustment node 2024-08-09 23:19:22 -07:00
Dennis Kobert
f6ffa45a81
Fix node graph type errors not being shown (#1917)
* Fix node graph type errors not being shown

* Add newline

* Remove unnecessary memo node implementation

---------

Co-authored-by: hypercube <0hypercube@gmail.com>
2024-08-09 12:12:31 -07:00
Dennis Kobert
f89a8447a6
Fix render disappearing while panning when using Vello (#1915)
Fix render disappearing while panning when using vello
2024-08-09 12:34:33 +02:00
Dennis Kobert
c5dde18fd6
Make noise generation resolution aware (#1909)
* Make noise generation resolution aware

* Invert "Scale" so it's not "Frequency"; make "Clipping" 100x100 not 1x1

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-08-09 12:03:06 +02:00
Dennis Kobert
0dfddd529b
Refactor document node type lookup function to fix performance degradation over time (#1878)
* Refactor document_node_types function

* Fix node introspection

* Implement diff based type updates

* Fix missing monitor nodes

* Improve docs and fix warings

* Fix wrongful removal of node paths

* Remove code examples for non pub methodsü

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-08-08 17:37:28 -07:00
Dennis Kobert
06a409f1c5
Restore the Imaginate node with the full node graph architecture (but a flaky deadlock remains) (#1908)
* Rework imaginate trigger mechanism

* Fix imaginate generation
2024-08-07 03:23:00 -07:00
adamgerhant
8041b1237c
Fix regressions from network interface PR (#1906)
* Fix regressions

* Remove unnecessary graph render in box selection

* Improve stack positioning

* Store layer stacks as absolute position

* Improve automatically creating chains

* Improve group selection

* Increase horizontal layer spacing by 1

* Fix export crash and demo artwork

* Improve inserting node onto wire, fix spline crash

* Remove comment
2024-08-07 01:03:12 -07:00
Dennis Kobert
e46af89708
Integrate raw WGPU textures into Vello rendering pipeline (#1897)
* WIP

* Introduce `Raster` enum and plumb texture injection to vello

* Use correct texture formas for usage in vello

* Add missing cache implementations

* Update vello image override api

* Use git version of vello

* Fix type for upload texture node

* Improve crash resiliance

* Fix warnings

* Remove unused node impls
2024-08-06 10:58:22 +00:00
Dennis Kobert
25a82d100f
Set Vello to render an explicit background color behind artboards (#1902)
* Set explicit background color

* Add todo comment for chrome bug
2024-08-06 02:33:39 -07:00
Dennis Kobert
00864e274f
Correctly set the dimensions of the SVG foreignObject container for the Vello canvas (#1907)
* Correctly set the dimensons of the forgein object element

* Remove dead code

* Fix missing default impl

* Set correct default for not wasm32 targets as well
2024-08-06 08:41:56 +00:00
Dennis Kobert
f21c8c1b17
Restructure window state management and fix Vello canvas not resizing with viewport (#1900)
* Restructure window state management

* Disable window creation on ci

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-08-06 06:18:04 +00:00
Dennis Kobert
5474a22b2e
Make Vello render groups with a blending stack only when necessary (#1905)
Only use group blends when necessary
2024-08-06 05:31:13 +00:00
Dennis Kobert
ed841803ce
Switch to MSAA for Vello rendering for better anti-aliasing (#1899)
Switch to MSAA for vello rendering
2024-08-05 22:12:37 -07:00
James Lindsay
cdd179cf10
Add snapping targets for b-box edges and multi-layer spacing distribution (#1793)
* Initial work on aligning bounding boxes

* Work in progress distribution

* Distribution snapping

* Distribution overlays

* Align points and clean up

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-08-04 22:12:20 -07:00
adamgerhant
0dbbabe73e
Add layer node chains, import/export edge connectors, and refactor graph editing to go thru a NodeNetworkInterface (#1794)
* WIP: NodeNetworkInterface

* Organize ModifyInputsContext to use network interface

* Improve ClickTarget and Position state

* Rework ClickTarget state

* Continue fixing NodeGraphMessageHandler

* Restructure network_metadata

* Final(?) NodeNetworkInterface struct

* Final(??) NodeNetworkInterface

* Final(???) NodeNetworkInterface. Separated persistent and transient data

* Final NodeNetworkInterface data structure. Implemented all basic getters

* Continue migrating functionality to network interface

* Migrate all NodeGraphMessage's to use network interface

* Fix all helper functions in NodeGraphMessageHandler

* Move document metadata to network interface, remove various cached fields

* Move all editor only NodeNetwork implementations to NodeNetworkInterface

* Fix all DocumentNodeDefinitions

* Rework and migrate GraphOperationMessages to network interface

* Continue migration to NodeNetworkInterface

* Save point before merging master

* Fix all errors in network_interface

* 850 -> 160 errors

* Fix all errors :D

* Render default document

* Visualize click targets

* merge conflicts

* Cache transient metadata separately, store entire interface in document history

* Start migration to storing selected nodes for each network

* Remove selected nodes from document message handler

* Move outward wires and all nodes bounding box to transient metadata

* Fix connecting/disconnecting nodes

* Layer stack organization for disconnecting/connecting nodes

* Basic chain locking

* Improve chain positioning

* Add copy/pasting

* Move upstream nodes on shift+drag

* merge conflict fixes

* Improve Graph.svelte code quality

* Final improvements to Graph.svelte

* Fix layer panel

* Performance optimizations

* Bug fixes and derived PTZ

* Chain organization improvement and bug fixes

* Bug fixes, remove all warnings

* Automatic file upgrade

* Final code review

* Fix editor tests

* Fix compile errors

* Remove select tool intersection check when panning

* WIP: Import/Exports

* Fix JS issues

* Finish simplified import/export UI

* Import/Export viewport edge UI

* Remove minimum y bound on import/export ports

* Improve performance while panning graph

* cargo fmt

* Fix CI code build

* Format the demo artwork graph with chains

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: dennis@kobert.dev <dennis@kobert.dev>
2024-08-04 06:47:13 -07:00
James Lindsay
ea44d1440a
Use a coarse bounding box to avoid a detailed check for intersection when clicking artwork (#1887)
* Add bounding box check for intersection

* Cache the bounding box

* private subpath
2024-08-03 15:10:04 +01:00
James Lindsay
32f5fba3e3 Blog post: Graphite progress report (Q2 2024) (#1805)
* Q2 blogpost

* WIP

* WIP 2

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-08-02 06:14:29 -07:00
Dennis Kobert
390e643558
Apply correct stroke styling with Vello (#1875)
* Apply correct stroke styling in vello

* Account for line end caps in clipmask size

* apply properties panel improvements

* Account for miter limit in Bbox calculation

* Fix bounding box for individual layers
2024-08-02 05:39:59 -07:00
Keavon Chambers
80cf486790 Add "Painted Dreams" demo artwork (and retire Just a Potted Cactus) 2024-08-02 05:20:01 -07:00
Keavon Chambers
4d3e459f1f Add artboard names to the export dialog and make it recall its last settings
Closes #1883, closes #1884
2024-08-02 05:19:40 -07:00
Dennis Kobert
a6af5d4831
Memoize hashing (#1876)
* Implement memoization wrapper for hashing

* Fix pattern matching errors

* Revert proper point modification hash calculiton

* Remove unused hashing code

* Code review and bug fixes

* Improve pattern matching

* Fix tests

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-08-01 04:42:15 -07:00
Keavon Chambers
44ffb635e9
Improve rendered SVG output syntax for better compatibility and terseness (#1880)
* Improve rendered SVG output syntax for better compatibility and terseness

* Fix CI failing on boolean operations without wasm32?

* Attempt 2
2024-07-30 08:28:49 -07:00
Dennis Kobert
22ebe9a2cb
Apply opacity and blend modes to individual layers in Vello (#1874)
Apply blending to individual layers
2024-07-29 17:56:21 -07:00
Dennis Kobert
5087a2b0f8
Fix Vello rendering of transforms for nested graphic groups (#1871)
Fix transforms for nested graphic groups
2024-07-29 05:49:48 -07:00
Dennis Kobert
5b1d3a0ae4
Sandbox node graph execution on native targets and attempt recovery from panics on Wasm (#1846)
* Test out wasm unwinding

* Implement panic catching for native targets

* Hack in support for recovering panics in wasm

* Keep debug info in release builds

* Check for DynAnyNode in Backtrace because that can't be inlined as well

* Improve error dialog

* Use a mutex for storing the frontend state instead of a RefCell

* Code review

* Update crash text

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-07-28 16:46:44 -07:00
Keavon Chambers
06177597ae Fix viewport bounds getting out of sync at times, like when toggling rulers 2024-07-28 05:42:27 -07:00
Keavon Chambers
a4a513911d Fix grid overlay color showing as none 2024-07-27 17:25:33 -07:00
Dennis Kobert
d6dad92659
Fix non-default gradient rendering with Vello (#1865)
* Fix linear and radial gradients

* Fix Rendering of shapes without a stroke

* Simplify

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-07-27 01:47:29 -07:00
Dennis Kobert
93b473abcd
Serialize documents with images in linear space instead of sRGB (#1856)
Serialize Images in linear space instead of srgb
2024-07-25 04:39:41 -07:00
Dennis Kobert
a36491d6f1
Fix rendering of non closed paths and improve bbox calculation (#1859)
Fix rendering of non closed paths and improve bbox calculiton
2024-07-25 12:49:22 +02:00
Keavon Chambers
6ecb173c1c Add caching to boolean operations 2024-07-25 00:32:19 -07:00
renshuncui
9712f9b037
Fix spelling in several code comments (#1860)
Signed-off-by: renshuncui <renshun@111.com>
2024-07-25 07:17:32 +00:00
Keavon Chambers
e1df23c28e Fix, document, and update npm dependencies and tooling; fix Bezier-rs demos not building (#1857)
Fix, document, and update npm dependencies; fix Bezier-rs demos not building

Closes #1853
2024-07-24 18:05:01 -07:00
Dennis Kobert
ab8748627d
Fix Layers panel UI not updating on selection change and expand/collapsing (#1847)
Also fixes a panic on empty layer.

* Fix layer properties updete on layer change + fix panic on empty layer

* Fix Layers panel expand/collapse

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-07-23 23:44:57 +00:00
Dennis Kobert
fad289804a
Disable Vello renderer checkbox in preferences if browser doesn't support WebGPU (#1844)
* Disable vello checkbox if no wgpu support is available

* Fix compile error

* Check wgpu status on every diagogue open

* Execute graph on settings change

* Remove tooltip and disabled status from settings category

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-07-23 16:19:44 -07:00
Dennis Kobert
0893ac49a6
Fix graph not being resent after Ctrl+D node duplication (#1852)
Update node graph after node duplication
2024-07-23 15:53:35 -07:00
Umer Khan
3a591dac6a
Fix breakage of shallow select mode in the Select tool (#1843)
* fixed bug with shallow selecting ROOT_PARENT

* fixed formatting

---------

Co-authored-by: PersonOOO <82835562+PersonOOO@users.noreply.github.com>
2024-07-22 03:39:39 -07:00
James Lindsay
fa1535d0bb
Update dependencies and lock files (#1841)
* Bump lock files

* Fix glam mismatch version

* Add tokio feature

* Update all deps

* Fix gpu-compiler not able to reference the root workspace

* Bump a few more deps

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-07-22 02:56:29 -07:00
Dennis Kobert
ab71d26d84
Integrate Vello for vector rendering (#1802)
* Start integrating vello into render pipeline

Cache vello render creation

Implement viewport navigation

Close vello path

Add transform parameter to vello render pass

* Fix render node types

* Fix a bunch of bugs in the path translation

* Avoid panic on empty document

* Fix rendering of holes

* Implement image rendering

* Implement graph recompilation afer editor api change

* Implement preferences toggle for using vello as the renderer

* Make surface creation optional

* Feature gate vello usages

* Implement skeleton for radial gradient

* Rename vello preference

* Fix some gradients

* Only update monitor nodes on graph recompile

* Fix warnings + remove dead code

* Update everything except for thumbnails after a node graph evaluation

* Fix missing click targets for Image frames

* Improve perfamance by removing unecessary widget updates

* Fix node graph paning

* Fix thumbnail loading

* Implement proper hash for vector modification

* Fix test and warnings

* Code review

* Fix dep

* Remove warning

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-07-22 01:56:29 -07:00
Keavon Chambers
8e774efe9d Move graph breadcrumb trail button into the top bar 2024-07-15 20:03:10 -07:00
Keavon Chambers
857bc772de Fix Rust-Analyzer conflicts with build targets and other compile speed issues 2024-07-15 15:55:04 -07:00
Dennis Kobert
212f08c6c8
Restore functionality of GPU infrastructure (#1797)
* Update gpu nodes to compile again

Restructure `gpu-executor` and `wgpu-executor`

And libssl to nix shell

Fix graphene-cli and add half percision color format

Fix texture scaling

Remove vulkan executor

Fix compile errors

Improve execution request deduplication

* Fix warnings

* Fix graph compile issues

* Code review

* Remove test file

* Fix lint

* Wip make node futures send

* Make futures Send on non wasm targets

* Fix warnings

* Fix nested use of block_on

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-07-15 13:14:48 +00:00
James Lindsay
59a943f42f
Simplify build process by auto-installing npm packages and simplify the contributor guide (#1799)
* Clarify some of the contributing building instructions

* Bump wasm-bindgen version

* Simplify build process and improve docs

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-07-14 20:16:02 -07:00
Keavon Chambers
aa902efb56
Finish removing GraphicElement::Artboard started in #1824 (#1830) 2024-07-14 01:50:25 -07:00
James Lindsay
203be63374
Insert transform node on groups (#1829)
Insert transform on group
2024-07-13 21:48:56 -07:00
James Lindsay
0c2e3361ab
Remove artboard from graphic element (#1824)
* Remove artboard from graphic element

* Fix transform bug
2024-07-13 21:10:29 -07:00
James Lindsay
027d3f4e60
Apply the graphic group transform in the boolean node (#1825) 2024-07-13 19:49:40 -07:00
James Lindsay
dba0433100
Fix snapping bug where snapped-together shapes couldn't be moved (#1818)
* Fixup dragging snap

* Reenable snapping by default on some demo art files

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-07-12 15:04:14 -07:00
Dennis Kobert
3657b37574
Deprecate LetNodes in favor of new scope API (#1814)
* WIP

* Start deprecating let nodes

* Replace WasmEditorApi network imports with new Scope input

* Add missing unwrap

* Add #[serde(default)] to scope_injections

* Restructure WasmEditorApi definition to be available as a TaggedValue

* Fix text node

* Use stable toolchain in nix shell again

* Code review

* FIx text node and remove all remaining warnings

* Require executor input to be 'static

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-07-10 14:18:21 +02:00
Keavon Chambers
a17ed68008 Disable snapping by default as a bug mitigation, and assorted cleanup 2024-07-10 02:34:37 -07:00