Commit graph

1611 commits

Author SHA1 Message Date
Keavon Chambers
c3d5b810fc Fix issue from timeout 2024-10-02 16:19:02 -07:00
Keavon Chambers
fc406c4f65 Bar 2024-10-02 16:07:43 -07:00
Keavon Chambers
cb5a0b4a2d Foo 2024-10-02 15:44:06 -07:00
Keavon Chambers
e1352617e8 Debug 2024-10-02 15:22:15 -07:00
Keavon Chambers
78f2147d06 Next try 2024-10-02 14:29:25 -07:00
Keavon Chambers
15385d4bb2 Next try 2024-10-02 14:02:43 -07:00
Keavon Chambers
40a0096a5d Next attempt 2024-10-02 13:46:46 -07:00
Keavon Chambers
f4f60579c2 Next attempt 2024-10-02 13:43:27 -07:00
Keavon Chambers
5853d388e8 apt update 2024-10-02 12:50:53 -07:00
Keavon Chambers
01d27c134e Replace self-hosted runner with GH-provided runner 2024-10-02 12:41:18 -07:00
Keavon Chambers
2d86fb24ab
Add line height and character spacing to the Text node (#2016) 2024-10-01 12:28:27 -07:00
Keavon Chambers
904cf09c79
Add drag-and-drop and copy-paste file importing/opening throughout the UI (#2012)
* Add file importing by dragging and dropping throughout the UI

* Disable comment-profiling-changes.yaml

* Fix CI
2024-09-28 00:19:43 -07:00
adamgerhant
20470b566b
Fix many regressions introduced mostly in #1946 (#1986)
* Fix text tool

* Implement buffering to fix freehand tool

* Fix tools

* Fix clippy lints

* Small fixes

* Move vector modify back to Monitor nodes

* Code review

* Fix abort

* Fix svg import

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-09-26 15:37:03 -07:00
Keavon Chambers
c738b4a1f9 Replace terminology "primary" with "call argument" and "parameter" with "secondary input" 2024-09-25 20:05:00 -07:00
Dennis Kobert
f8c7ada572
Add manually-runnable benchmarks for runtime profiling (#2005)
* Split benches into two files

* Implement executor update bench

* Restructure benchmarks

* Unify usages of wrap network in scope

* Remove unused imports

* Fix oom bug

* Remove bounding box impl
2024-09-25 10:52:41 +02:00
nznznz42
c5454af48b
New node: Dehaze (#1882)
* feat: Implemented Dehaze Node

* Update Cargo.toml

* Remove unecessary image conversions

* Code review

* Further fixes

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-09-24 20:44:48 -07:00
Keavon Chambers
0b0169a415 Remove serde from Bezier-rs web demos to reduce Wasm size 2024-09-24 01:33:15 -07:00
Keavon Chambers
aa03dc8278 Upgrade web dependencies 2024-09-24 01:33:12 -07:00
Keavon Chambers
1ee5ffbbe8 Clean up web code errors and make CI enforce them 2024-09-24 01:33:02 -07:00
Keavon Chambers
14de67c5a7 Upgrade the third-party library license generation 2024-09-24 01:20:57 -07:00
Utsav Singh
b57c53a427
Fix broken Opacity slider in Layers panel (#2004)
Fix Opacity slider in Layers panel adding Transactions on_update and add Transactions when on_commit
2024-09-23 13:36:28 -07:00
Dennis Kobert
8a1089938e
Path Bool library code cleanup (#2000)
* Remove log statements

* Add feature gates to functions in path.rs

* Fix infinite parsing loop and add new test

* License tweaks

* Remove trailing zero in whole number floats

* Flatten visual-tests directory

* Code review

* Clean up printlines

* Add error handling to path parsing

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-09-23 12:16:31 +02:00
Keavon Chambers
3ddc052538
Improve type compatibility and clean up new node macro usages (#2002)
* Improve type compatibility

* More
2024-09-22 01:44:18 -07:00
James Lindsay
33df58eda9
Fix compilation on nightly (#2001)
Fix nightly compile
2024-09-21 13:48:33 -07:00
Dennis Kobert
cd4124a596
Improve node macro and add more diagnostics (#1999)
* Improve node macro ergonomics

* Fix type error in stub import

* Fix wasm nodes

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-09-21 19:57:45 +00:00
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
Dennis Kobert
664e7f89b5
Update Cargo.lock to fix CI (#1994) 2024-09-20 18:31:25 +02: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
ef007736f5
Fix types of inputs to nodes with a nested network implementation (#1978)
Fix types into nested networks
2024-09-15 22:49:43 +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
James Lindsay
2fa8773092
Improve select tool click targets (#1976)
* Improve select tool click targets

* Improve spellings
2024-09-15 00:02:48 +00:00
James Lindsay
6c8a4fe5b3
Nudge only the shallowest selected layers to avoid amplified translation (#1975)
* Nudge only the shallowest selected layers

* Remove (inadvertent?) settings.json change

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-09-14 23:39:20 +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
Keavon Chambers
426f3b2cb4
Make CI collapse previous PR comments with profiling benchmark deltas (#1974)
CI change again

CI collapse by default
2024-09-13 22:54:33 -07: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
Laith Bahodi
f17f8ddf61
Set integer ruler intervals when zoomed in (#1966)
* modify interval calculation

* modify progression and add powers of 10

* Some small tweaks

* Prevent the graph view from subdividing below 1

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-09-09 22:56:37 -07:00
Keavon Chambers
a93dcb2776 Make the Clippy Check CI action not comment on draft PRs 2024-09-09 13:56:08 -07:00
Elbert Ronnie
d9ae01bf90
Raw-rs: Flip and rotate image based on camera orientation (#1954)
* add Orientation tag

* fix errors

* Apply the transformation to the image

* Fix BASE_PATH in raw-rs tests

* Create output folder if it doesn't exist

* Nit

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-09-05 15:18:58 -07:00
adamgerhant
70dacac474
Refactor navigation metadata (#1956)
* Fix path tool select

* Refactor rounded edge distance

* comment

* Fix demo artwork

* Fix comments

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-09-05 19:53:37 +00: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
adamgerhant
19541c9684
Fix broken SVG importing and crash when exporting (#1953)
* Fix importing SVG and crash when exporting

* Code improvements, prevent entering network after drag
2024-09-03 06:54:51 +00:00