Utsav Singh
1b6d45ad30
Respect 'Clip' on Artboards when exporting "All Artworks". ( #1916 )
...
* Add constraint_bounds function to Quad implementation
* Respect Clip property when exporting All Artworks and centering document using the ctrl + 0 hotkey.
Calculate artboard_clip_bounds and then constraint the all_layer_bounds to respect the bounds of the Clipped Artboards.
* Use parent_artboard to find ancestor artboards of each layer and constrain bounds if artboard is clipped
* Remove redundant comments
2024-08-10 23:29:34 -07:00
adamgerhant
193f757c45
Add grid snapping to graph imports/exports; improve layer panel drag into/between insertion; better preserve graph space on reordering ( #1911 )
...
* Fix disconnecting root node when previewing
* Final previewing fixes
* Improve positioning when moving layer to stack
* Improve layer panel
* Import/Export edge grid snapping
* Fix layer ordering and positioning
* Small bug fixes and improvements
* Fix copy and paste position
* Nit
* Align imports/edges when using scrolling
* Fix misaligned exports in demo artwork
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-08-11 00:30:14 +00:00
adamgerhant
60707c0369
Add colors to all nodes in a graph, even if disconnected, and properly display hidden network imports ( #1921 )
...
* Get output/input types by iterating to proto node. Fix types when undoing/redoing
* Remove unused code
* Fix types not updating when modified
* Improve code quality
* Improve proto node type lookup
* Nits
* Fix crash when adding Extract
---------
Co-authored-by: dennis@kobert.dev <dennis@kobert.dev>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-08-10 15:27:15 -07:00
James Lindsay
1f278799d6
Add quick measure overlays with Alt pressed ( #1894 )
...
* Measure with alt
* Code review
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-08-10 04:56:02 -07:00
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
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
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
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
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
Keavon Chambers
6ecb173c1c
Add caching to boolean operations
2024-07-25 00:32:19 -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
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
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
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
adamgerhant
9d749c49fb
Add a stack-based Boolean Operation layer node ( #1813 )
...
* Multiple boolean operation node
* Change boolean operation ordering
* Complete layer boolean operation node
* Automatically insert new boolean operation node
* Remove divide operation
* Fix subtract operations
* Remove stack data from boolean operation properties
* Fix images and custom vectors
* Code cleanup
* Use slice instead of iter to avoid infinite type recursion
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-07-10 02:12:55 -07:00
adamgerhant
f4e3e5ab2a
Add draggable upstream nodes feature ( #1812 )
...
* drag upstream nodes, fix node deselection
* Ignore bottom layer inputs
* Fix amplified movement
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-07-09 12:16:50 +00:00
Raminder Singh
62f73df048
Fix a lot of Clippy warnings ( #1808 )
...
* fix a lot of clippy warnings
* fix more clippy warnings
* fix yet more clippy warnings
* bump msrv to 1.70.0 to silence warnings
* fix a lot of clippy warnings
* fix more clippy warnings
* fix yet more clippy warnings
* fix a few more warnings
* fix a clippy warning
* remove a commented out line
* silense too many arguments error
* fix more clippy warnings
* prefix underscore to unused vars/functions to fix warnings
* use filter instead of map
* move raw-rs-tests feature flat to module level to fix unused imports warnings
* fix a couple of unused result warnings
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-07-09 05:02:52 -07:00
Keavon Chambers
f7ada701e5
Reorganize cargo dependencies and upgrade most of them ( #1815 )
...
* Reorganize cargo dependencies and upgrade most
* cargo update
* Attempt 2
* Polishing changes
* Comment out specta typescript flag-dependent code
* Fix test
2024-07-09 04:08:28 -07:00
James Lindsay
97616e8019
Fix Pen and Freehand tool path extension ( #1809 )
...
Improve path tool extend
2024-07-07 17:23:44 -07:00
Raminder Singh
4cd11448a0
Fix 'Zoom with Scroll' not working after a page refresh ( #1807 )
...
* Fix 'Zoom with Scroll' not working after a page refresh
* Add semicolon
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-07-07 00:55:09 -07:00
Keavon Chambers
84d72621e5
Fix bug causing some node outputs to fail connecting wires to other inputs
2024-07-06 23:38:25 -07:00
Keavon Chambers
621f469a15
Restore backwards compatibility broken with #1750 to prepare next release
2024-07-06 01:02:40 -07:00
Sahil gill
e66620dc5c
Add basic artboard snapping ( #1734 )
...
* Initial vector modify node
* Initial extraction of data from monitor nodes
* Migrate to point id
* Start converting to modify node
* Non destructive spline tool (tout le reste est cassé)
* Fix unconnected modify node
* Fix freehand tool
* Pen tool
* Migrate demo art
* Select points
* Fix the demo artwork
* Fix the X and Y inputs for path tool
* G1 continous toggle
* Delete points
* Fix test
* Insert point
* Improve robustness of handles
* Fix GRS shortcuts on path
* Dragging points
* Fix build
* Preserve opposing handle lengths
* Update demo art and snapping
* Fix polygon tool
* Double click end anchor
* Improve dragging
* Fix text shifting
* Select only connected verts
* Colinear alt
* Cleanup
* Fix imports
* first commit
* changes in SnapData::ignore()
* Bug fixes and cleanup
* Code review
---------
Co-authored-by: 0hypercube <0hypercube@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-07-05 16:14:47 -07:00
Umer Khan
176ce314c7
Fix rulers showing in the wrong spot when initially opening a document ( #1801 )
...
* Added RenderRulers
* Update dispatcher.rs to remove debug statement
I should really check each file carefully....
---------
Co-authored-by: PersonOOO <82835562+PersonOOO@users.noreply.github.com>
2024-07-05 14:01:59 -07:00
James Lindsay
1652c713a6
Add nondestructive vector editing ( #1676 )
...
* Initial vector modify node
* Initial extraction of data from monitor nodes
* Migrate to point id
* Start converting to modify node
* Non destructive spline tool (tout le reste est cassé)
* Fix unconnected modify node
* Fix freehand tool
* Pen tool
* Migrate demo art
* Select points
* Fix the demo artwork
* Fix the X and Y inputs for path tool
* G1 continous toggle
* Delete points
* Fix test
* Insert point
* Improve robustness of handles
* Fix GRS shortcuts on path
* Dragging points
* Fix build
* Preserve opposing handle lengths
* Update demo art and snapping
* Fix polygon tool
* Double click end anchor
* Improve dragging
* Fix text shifting
* Select only connected verts
* Colinear alt
* Cleanup
* Fix imports
* Improve pen tool avoiding handle placement
* Improve disolve
* Remove pivot widget from Transform node properties
* Fix demo art
* Fix bugs
* Re-save demo artwork
* Code review
* Serialize hashmap as tuple vec to enable deserialize_inputs
* Fix migrate
* Add document upgrade function to editor_api.rs
* Finalize document upgrading
* Rename to the Path node
* Remove smoothing from Freehand tool
* Upgrade demo artwork
* Propertly disable raw-rs tests
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: Adam <adamgerhant@gmail.com>
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2024-07-05 13:42:40 -07:00
Dennis Kobert
c9a33e44bd
New node: Rasterize ( #1755 )
...
* Add RasterizeVector node
* Add document node definition for RasterizeVectorNode
* Add dummy node properties
* Add prototype of footprint widget
* Fix types
* Fix footprint widget to use document space
* Fix aspect ratio issues by making resolution a multiplier
* Fix rebase errors
* Fix rasterization bounds and node definition
* UI and bug fixes but still issues with scaling in the frame
* Rename node to Raster
* Fix RasterizeNode
* Reenable resolution multiplier
* Remove unused variable
* UI fixes
* Fix Footprint default and resolution updates
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-06-27 01:24:09 -07:00