Commit graph

602 commits

Author SHA1 Message Date
Dennis Kobert
3eb98c6d6d
Add path-bool library (#1952)
* Add path-bool library

* Cleanup code

* Cargo format

* Integrate boolean ops into graphite

* Add test for editor crash

* Fix edge sort floating point instability

* Add unit test for red-dress failure

* Backport tests and aux functions

* Use curvature based sorting

* Convert linear cubic splines to line segments

* Deduplicate reversed path segments

* Fix epsilon for empty segments

* Remove parameter based intersection pruning

* Add support for reversed paths

* Add benchmark infrastructure

* Add intersection benchmark

* Add recursion bound

* Implement support for overlapping path segments

* Remove rouge prinln

* Fix sorting for bezier segments with one control point at the start of the segment

* Cleanup log statements

* Directly translate graphite paths to Path segments

* Round data before passing it to path_bool

* Fix flag_faces traversal order

* Add test for white dots in bottom right of painted dreams

* Make rounding configurable

* Update demo artwork to remove manual path modifications

* Convert from path segments to manipulator groups directly

* Remove dead code

* Fix clippy lints

* Replace functions in path segment with methods and add documentation

* Add more documentation

* Close subpaths

* Reorganize files and add README.md

* Add license information

* Code review

* Fix license info

* Adopt new node macro and fix demo artwork

* Close subpaths with Z

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-09-21 02:06:43 -07:00
James Lindsay
2febbfd698
Fix Graphene CLI crash (#1993)
Don't crash on the cli
2024-09-20 23:58:13 +00:00
James Lindsay
0d33a1ae3f
Use overlays to draw artboard names (#1981)
* Artboard label overlay

* Finish artboard overlays

* cargo fmt

* Update font styling

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-09-20 22:04:31 +00:00
Dennis Kobert
32da545a49
Fix blend modes and opacity on raster data (#1996)
* Apply alpha blending to images when using vello

* Fix bounds for image layer

* Fix rendering for non vello images
2024-09-20 20:42:39 +00:00
Dennis Kobert
768ca0c535
Box TaggedValue::VectorModification (#1995) 2024-09-20 12:39:35 -07:00
Elbert Ronnie
d68f91ccca
Raw-rs: run tests in parallel (#1968)
* Run raw-rs tests in parallel

* cargo fmt

* Fix clippy warnings

* Use Fast CompressionType to speed up the tests

* Fix benches

* Use cfg_attr instead of cfg.

---------

Co-authored-by: hypercube <0hypercube@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-09-20 11:09:58 +00:00
Dennis Kobert
e352c7fa71
Refactor the node macro and simply most of the node implementations (#1942)
* Add support structure for new node macro to gcore

* Fix compile issues and code generation

* Implement new node_fn macro

* Implement property translation

* Fix NodeIO type generation

* Start translating math nodes

* Move node implementation to outer scope to allow usage of local imports

* Add expose attribute to allow controlling the parameter exposure

* Add rust analyzer support for #[implementations] attribute

* Migrate logic nodes

* Handle where clause properly

* Implement argument ident pattern preservation

* Implement adjustment layer mapping

* Fix node registry types

* Fix module paths

* Improve demo artwork comptibility

* Improve macro error reporting

* Fix handling of impl node implementations

* Fix nodeio type computation

* Fix opacity node and graph type resolution

* Fix loading of demo artworks

* Fix eslint

* Fix typo in macro test

* Remove node definitions for Adjustment Nodes

* Fix type alias property generation and make adjustments footprint aware

* Convert vector nodes

* Implement path overrides

* Fix stroke node

* Fix painted dreams

* Implement experimental type level specialization

* Fix poisson disk sampling -> all demo artworks should work again

* Port text node + make node macro more robust by implementing lifetime substitution

* Fix vector node tests

* Fix red dress demo + ci

* Fix clippy warnings

* Code review

* Fix primary input issues

* Improve math nodes and audit others

* Set no_properties when no automatic properties are derived

* Port vector generator nodes (could not derive all definitions yet)

* Various QA changes and add min/max/mode_range to number parameters

* Add min and max for f64 and u32

* Convert gpu nodes and clean up unused nodes

* Partially port transform node

* Allow implementations on call arg

* Port path modify node

* Start porting graphic element nodes

* Transform nodes in graphic_element.rs

* Port brush node

* Port nodes in wasm_executior

* Rename node macro

* Fix formatting

* Fix Mandelbrot node

* Formatting

* Fix Load Image and Load Resource nodes, add scope input to node macro

* Remove unnecessary underscores

* Begin attemping to make nodes resolution-aware

* Infer a generic manual compositon type on generic call arg

* Various fixes and work towards merging

* Final changes for merge!

* Fix tests, probably

* More free line removals!

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-09-20 03:50:30 -07:00
adamgerhant
ca0d102296
Fix click targets (in, e.g., the boolean node) by resolving footprints from render output (#1946)
* add NodeId (u64) and Footprint to Graphic Group

* Render Output footprints

* Small bug fixes

* Commented out render output click targets/footprints

* Run graph when deleting

* Switch to node path

* Add upstream clicktargets for boolean operation

* Fix boolean operations

* Fix grouped layers

* Add click targets to vello render

* Add cache to artwork

* Fix demo artwork

* Improve recursion

* Code review

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-09-16 01:26:59 +00:00
James Lindsay
dd4a97b09f
Correctly apply transforms to vector data and strokes (#1977)
* Fix adding a layer to a transformed group

* Fix assorted transform issues

* Default stroke transform

* Fix bench

* Transform gradient

* Gradient fix

* Add gradient reversal buttons to Fill node in the Properties panel

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-09-15 22:26:11 +00:00
Mohamed Osama
0c5bccc2fd
Make the primitive shape tools avoid setting a negative transform scale (#1973)
* Fix transformation for primitive tools, make odd-sided polygons and stars flipped with radius instead of scale

* Extract to function and add comment

* Code review

---------

Co-authored-by: hypercube <0hypercube@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-09-14 23:15:56 +00:00
James Lindsay
514582fd8d
Make the node graph use a document node's default type (#1965)
* Use document node default type

* Refactor getting input

* Clippy

* Fix missing continue

* Fix CI
2024-09-13 01:42:26 -07:00
Bruce Mitchener
507210b961 Fix some typos in the node graph code (#1970) 2024-09-11 02:36:34 -07:00
James Lindsay
06e11b6f46
Fix invalid segment crash when disolving point loop (#1959)
* Fix invalid segment crash

* Further improve robustness
2024-09-05 11:45:14 -07:00
James Lindsay
bf5019db7b Bezier-rs: Fix crash when outlining a small bézier (#1958)
Fix crash when outlining small bézier
2024-09-05 10:48:12 -07:00
James Lindsay
9524835a30
Switch attribute-based vector data from referencing PointIds to indexes in the points table (#1949)
* Index for points

* Code review

* Add todo comment about a possible perf optimization

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-09-04 08:59:55 +00:00
James Lindsay
444929adbf
Fix crash from gradients with bounds of zero (#1950)
Fix zero bound gradient
2024-09-01 16:12:02 -07:00
Dennis Kobert
432385343e
Implement Node Path Insertion at Compile Time (#1947)
* Implement node path insertion at compile time

* Fix ci failure

* Continue instead of returning from the function
2024-08-31 12:11:38 +02:00
Keavon Chambers
d7546fb183 New nodes: Blend Colors, Percentage Value 2024-08-17 07:42:09 -07:00
Keavon Chambers
c39032ab54 Add seed parameters to all nodes with RNG 2024-08-17 07:40:02 -07:00
Keavon Chambers
e647ca9f91 Recategorize the node catalog 2024-08-16 04:24:25 -07:00
adamgerhant
33739b9ad4
Separate the Merge node from the Boolean Operation node (#1933)
* Rework boolean operation node

* Set Boolean Operation name for layer

* Remove memoize

* Update both demo artworks that use booleans

* Delete dead code, rename input connectors

* Remove more dead code

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-08-16 00:36:07 +00:00
Keavon Chambers
fa981a0897
New node: Assign Colors (#1938)
* New node: Assign Colors

* Simplify the Procedural String Lights demo artwork

* Add "Group" node to the node catalog

* Better comment styling in profiling action
2024-08-15 12:52:46 +00:00
Dennis Kobert
12ebc6f972
Add a profiling action to CI which comments on PRs with notable demo art performance variances (#1925)
* Add profile run to ci

* Remove cargo add

* Rename more main to master

* Don't run on master before the pr has been merged

* Fix pr comment step

* Fix comment v2

* Fix v3

* Fix missing features

* Fix string interpolation

* Only post comment on performance diff

* Fix benchmark runner

* Try adding escaping

* Remove escaped quotes

* Use proper master baseline

* Use proper master baseline

* Fix rebase regression

* Remove unused dependency
2024-08-15 13:33:49 +02:00
Keavon Chambers
15d125d8e7
Fix all Clippy warnings (#1936)
* Fix all Clippy warnings

* More fixes

* Bump criterion version

---------

Co-authored-by: dennis@kobert.dev <dennis@kobert.dev>
2024-08-14 17:05:08 +00:00
adamgerhant
2bd213f1aa
Improve layer panel positioning for upstream nodes (#1928)
* Improve layer panel positioning for upstream nodes

* highlight parents

* Final improvements

* Fill for selection box, bug fixes

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-08-14 03:27:42 -07:00
Dennis Kobert
da13f21486
Add profiling metrics for, and speed up, Graphene graph compilation (#1924)
* Add compile time benchmark for the demo artwork

* Implement node input replacement batching

isometric-fountain      time:   [7.4307 ms 7.5072 ms 7.5974 ms]
                        change: [-19.302% -18.136% -16.903%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 10 outliers among 100 measurements (10.00%)
  6 (6.00%) high mild
  4 (4.00%) high severe

painted-dreams          time:   [1.8108 ms 1.8223 ms 1.8350 ms]
                        change: [-12.422% -11.524% -10.650%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 13 outliers among 100 measurements (13.00%)
  5 (5.00%) high mild
  8 (8.00%) high severe

procedural-string-lights
                        time:   [551.65 µs 560.58 µs 571.13 µs]
                        change: [-5.7783% -2.5770% +1.3136%] (p = 0.20 > 0.05)
                        No change in performance detected.
Found 6 outliers among 100 measurements (6.00%)
  1 (1.00%) high mild
  5 (5.00%) high severe

red-dress               time:   [9.7951 ms 9.9006 ms 10.016 ms]
                        change: [-18.812% -17.558% -16.292%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 5 outliers among 100 measurements (5.00%)
  5 (5.00%) high mild

valley-of-spires        time:   [4.7294 ms 4.7837 ms 4.8442 ms]
                        change: [-16.889% -15.712% -14.615%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 16 outliers among 100 measurements (16.00%)
  11 (11.00%) high mild
  5 (5.00%) high severe

* Implement node dependency tracking

isometric-fountain      time:   [6.5695 ms 6.6418 ms 6.7227 ms]
                        change: [-13.426% -12.112% -10.681%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 10 outliers among 100 measurements (10.00%)
  5 (5.00%) high mild
  5 (5.00%) high severe

painted-dreams          time:   [1.7406 ms 1.7566 ms 1.7742 ms]
                        change: [-4.7386% -3.5484% -2.3707%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 11 outliers among 100 measurements (11.00%)
  10 (10.00%) high mild
  1 (1.00%) high severe

procedural-string-lights
                        time:   [585.40 µs 590.98 µs 596.82 µs]
                        change: [-3.7739% +0.7591% +4.6293%] (p = 0.76 > 0.05)
                        No change in performance detected.
Found 3 outliers among 100 measurements (3.00%)
  3 (3.00%) high mild

red-dress               time:   [8.4314 ms 8.5072 ms 8.5899 ms]
                        change: [-26.797% -25.374% -23.958%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 11 outliers among 100 measurements (11.00%)
  5 (5.00%) high mild
  6 (6.00%) high severe

valley-of-spires        time:   [4.3700 ms 4.4118 ms 4.4579 ms]
                        change: [-11.470% -10.198% -8.9826%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 12 outliers among 100 measurements (12.00%)
  7 (7.00%) high mild
  5 (5.00%) high severe

* Remove clone and use rustc hash for storing nodes

isometric-fountain      time:   [5.9220 ms 5.9854 ms 6.0570 ms]
                        change: [-11.974% -10.539% -9.2291%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 12 outliers among 100 measurements (12.00%)
  4 (4.00%) high mild
  8 (8.00%) high severe

painted-dreams          time:   [1.5337 ms 1.5470 ms 1.5618 ms]
                        change: [-11.901% -10.907% -9.9075%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 9 outliers among 100 measurements (9.00%)
  5 (5.00%) high mild
  4 (4.00%) high severe

procedural-string-lights
                        time:   [496.44 µs 501.44 µs 506.33 µs]
                        change: [-20.002% -15.633% -12.213%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 4 outliers among 100 measurements (4.00%)
  3 (3.00%) high mild
  1 (1.00%) high severe

red-dress               time:   [7.7037 ms 7.7871 ms 7.8774 ms]
                        change: [-11.906% -10.576% -9.2560%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 8 outliers among 100 measurements (8.00%)
  7 (7.00%) high mild
  1 (1.00%) high severe

valley-of-spires        time:   [3.9182 ms 3.9501 ms 3.9851 ms]
                        change: [-14.615% -13.075% -11.500%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high severe

* Fix test depending on stable node order

* Simplify flattening

* Remove unused dependant vec size safeguards

* Improve topological sort and make assert debug only

isometric-fountain      time:   [2.9515 ms 2.9971 ms 3.0459 ms]
                        change: [-61.270% -60.533% -59.747%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 11 outliers among 100 measurements (11.00%)
  7 (7.00%) high mild
  4 (4.00%) high severe

Benchmarking painted-dreams: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 8.1s, enable flat sampling, or reduce sample count to 50.
painted-dreams          time:   [1.1134 ms 1.1322 ms 1.1494 ms]
                        change: [-40.991% -37.660% -34.129%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high severe

procedural-string-lights
                        time:   [391.88 µs 397.80 µs 403.84 µs]
                        change: [-19.953% -17.762% -14.930%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 6 outliers among 100 measurements (6.00%)
  3 (3.00%) high mild
  3 (3.00%) high severe

red-dress               time:   [3.0722 ms 3.1179 ms 3.1707 ms]
                        change: [-59.878% -59.168% -58.422%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 12 outliers among 100 measurements (12.00%)
  5 (5.00%) high mild
  7 (7.00%) high severe

valley-of-spires        time:   [2.0234 ms 2.0470 ms 2.0737 ms]
                        change: [-48.994% -47.910% -46.907%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 9 outliers among 100 measurements (9.00%)
  2 (2.00%) high mild
  7 (7.00%) high severe

* Improve id remapping logic by reusing id mapping

isometric-fountain      time:   [2.2464 ms 2.2841 ms 2.3260 ms]
                        change: [-25.693% -23.790% -22.024%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 6 outliers among 100 measurements (6.00%)
  5 (5.00%) high mild
  1 (1.00%) high severe

Benchmarking painted-dreams: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase target time to 7.3s, enable flat sampling, or reduce sample count to 50.
painted-dreams          time:   [869.96 µs 886.99 µs 902.36 µs]
                        change: [-26.928% -19.590% -8.0737%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high severe

procedural-string-lights
                        time:   [291.60 µs 296.60 µs 302.45 µs]
                        change: [-28.175% -25.168% -22.078%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 8 outliers among 100 measurements (8.00%)
  2 (2.00%) high mild
  6 (6.00%) high severe

red-dress               time:   [2.7946 ms 2.8356 ms 2.8800 ms]
                        change: [-10.991% -9.0546% -6.9757%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 7 outliers among 100 measurements (7.00%)
  7 (7.00%) high mild

valley-of-spires        time:   [1.5583 ms 1.5801 ms 1.6039 ms]
                        change: [-24.165% -22.811% -21.213%] (p = 0.00 < 0.05)
                        Performance has improved.
Found 7 outliers among 100 measurements (7.00%)
  7 (7.00%) high mild

* Remove flame graph file
2024-08-12 03:07:36 -07:00
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
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
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
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
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
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
a4a513911d Fix grid overlay color showing as none 2024-07-27 17:25:33 -07:00