Commit Graph

31 Commits

Author SHA1 Message Date
Hannah Li
05a2cd32a5 Bezier-rs: Insert function for subpath (#876)
* Add manipulator

* Add manipulator group

* Add UI

* Address comments and rebase

* Renamed add_manipulator_group to insert

Co-authored-by: Rob Nadal <robnadal44@gmail.com>
2023-01-12 18:26:25 -08:00
Rob Nadal
664a418aaa Bezier-rs: Add project function for Subpaths (#914)
* Added subpath project function

* Set appropriate project default in single manipulator group case

* Lint

* Return optional from subpath project + stylistic changes per review

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-12-29 15:32:22 -08:00
0HyperCube
55d5dbaf52 Better downcast panics (#898) 2022-12-22 09:27:55 +00:00
Rob Nadal
14cccc581e Bezier-rs: Added function to find intersections between a bezier and a rectangle (#897)
* added function to find intersections for a rectangle

* Added is_contained_within function
2022-12-21 18:31:21 -08:00
0HyperCube
4f637ee18b Show all nodes with no selection (#893)
* Show all nodes with no selection

* Slight text tweaks

* Rename to artwork

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-12-21 11:12:33 +00:00
0HyperCube
d374e400ed Automatic graph popup on Node Graph Frame layer (#890)
Automatic Node Graph Frame Popup
2022-12-21 10:04:58 +00:00
Keavon Chambers
f7317aa6b4 Prepare Bezier-rs for publishing 2022-12-17 22:14:56 -08:00
TrueDoctor
f1b7abede7 Bundle Graphite using Tauri (#873)
* Setup tauri component for graphite editor

Integrate graphite into tauri app

Split interpreted-executor out of graph-craft

* Add gpu execution node

* General Cleanup
2022-12-11 12:46:55 -08:00
Thomas Cheng
a2043bcb7c Bezier-rs: Add parametric evaluate and line intersect to subpath (#852)
* add slider to subpath component + change evaluate to take an enum

Co-authored-by: Rob Nadal <RobNadal@users.noreply.github.com>

wip - add intersect to subpath, TODO fix bug

Co-authored-by: Rob Nadal <RobNadal@users.noreply.github.com>

add unit tests to subpath intersections

stress, testing

Co-authored-by: Hannah Li <hannahli2010@gmail.com>

* add parametric eval impl to subpath

* add line intersection to subpath

* Uncomment and #[ignore] disabled tests

* Reorder a few imports

* change subpath:eval slider to radio button

* fixed bug with solve_cubic, fixed unit tests, improved intersection accuracy

* fix failing test

Co-authored-by: Hannah Li <hannahli2010@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-12-10 21:41:02 -08:00
0HyperCube
f9d772070b Add some additional image effect nodes (#869)
* Move the Subpath type to graphene-std

* Add the transform subpath node

* Delete selected nodes

* Inserting node list on right click

* Add several bitmap manipulator nodes

* Convert add node to use f64

* Add posterize node

* Rename names randomly

* Fix naming

* Exposure node

* Fix typo

* Adjust exposure node range

* Comment out vector nodes

* Adjust exposure range again

* Posterise as ints

* Rename input

* Use >= in the to hsl function
2022-12-03 14:29:45 -08:00
Hannah Li
647e555487 Bezier-rs: Add Euclidean parameterization to Bezier::evaluate (#828)
* Add enum to evaluate for differenciating compute type

* Add euclidean parameterization and update styling in the UI

Co-authored-by: Rob Nadal <robnadal44@gmail.com>

* Update usage of evaluate in graphite

* Add description

* Code review changes

* Update tests

* Improve ComputeType ergonomics

* Large code review/cleanup pass

Co-authored-by: Rob Nadal <robnadal44@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-11-18 20:37:52 -08:00
0HyperCube
6cd0dbdcd0 Node graph improvements (#855)
* Selecting multiple nodes

* Improve logs

* Log bad types in dyn any

* Add (broken) node links

* New topological sort

* Fix reorder ids function

* Input and output node

* Add nodes that operate on images

* Fixups

* Show node parameters together with layer properties

* New nodes don't crash editor

* Fix tests

* Node positions backend

* Generate node graph on value change

* Add expose input message

* Fix tests

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-11-17 15:36:23 -08:00
Keavon Chambers
f918745b73 Bump MSRV to 1.65.0 for let-else syntax
Closes #857
2022-11-16 18:04:13 -08:00
Rob Nadal
28f8802142 Bezier-rs: Convert to_svg used in subpaths to match style used in beziers (#854)
Converted subpath::to_svg to Bezier style
2022-11-14 22:37:06 -08:00
Rob Nadal
bb2dd5a259 Bezier-rs: Added curve outline functions (#789)
* Implement offset and reverse

Co-authored-by: Rob Nadal <robnadal44@gmail.com>

* Initial work on graduated outline

Co-authored-by: Rob Nadal <robnadal44@gmail.com>

* Handle linear case for graduated scale

* Added skewed outline, fixed graduated scale hourglass bug

* Removed test code

* Update comments

* Fix linting issue

* Improve comments

* Comment fixes

Co-authored-by: Hannah Li <hannahli2010@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-11-06 21:25:00 -08:00
Hannah Li
b7ed54a336 Bezier-rs: Add a pivot point to the 'rotate' function (#792)
* Add function to rotate around a point

* Update svg

* Improve rotation line-to-center styling

* Add second angle of lines

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-11-06 20:52:58 -08:00
TrueDoctor
52048cb0d2 Implement Upcasting without nightly support (#825) 2022-10-25 16:37:18 -07:00
TrueDoctor
06acd45a81 Rework DynAnyNode design to work with the borrow stack (#796) 2022-10-15 03:02:58 +02:00
0hypercube
99d92ef887 Some initial testing on dynamic nodes and composition
* Test use of borrow stack
2022-10-15 02:45:02 +02:00
Thomas Cheng
7291edeef5 Convert reduce() and offset() Bezier-rs wasm demo functions to render as SVG (#783)
* convert reduce and offset wasm func to return svg

* address comments
2022-10-05 23:54:02 -04:00
Hannah Li
273f1a38f3 Bezier-rs: continue converting demos from canvas to SVG (#779)
* Convert constructor to use svg

* Convert the through_points functions to svg

* Convert length, lut, derivative, and tangent from canvas to svg

* Fixed bug when t1 == t2 in split

* Converted split and trim to use svg representation, and swapped slider options default to use quadratic options

* Convert normal and curvature to use svg representation in bezier-rs-demos

* Convert the project function to use svg representation in bezier-rs-demos

* Convert the local_extrema, bbox, and inflections to use svgs

* Add text offset constants

* Fix typo

Co-authored-by: Robert Nadal <Robnadal44@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-09-27 17:37:30 -07:00
Hannah Li
aff454ec77 Bezier-rs: Convert from canvas to svg for constructors (#776)
* Convert constructor to use svg

* Convert the through_points functions to svg

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-09-26 19:14:27 -07:00
Hannah Li
0a1665b87d Refactor bezier-rs' to_svg functionality (#758)
* Change Bezier to_svg to include handles and endpoints

* Move params into brackets of format macro, remove unused comment

* Use write macro instead of format

* Fix path for watched directory

* Refactor functions to remove ToSVGOptions
2022-09-01 23:13:39 -04:00
Keavon Chambers
7848391f6e Clean up MenuList types and fix many Vue and Clippy warnings
Also remove hard-coded-in-Vue Graphite logo in the menu bar in favor of a Rust definition.
2022-08-26 00:10:41 -07:00
Dennis
d566ba852d Impl DynNode 2022-08-23 14:02:50 -07:00
Hannah Li
d8424fc0af Divide the large Bezier-rs implementation file into smaller ones (#751)
* Refactor bezier lib file into a separate folder

* Add better implementation comments

* Update import of Subpath from bezier-rs

* Add comment to describe compare.rs

* Remove printlns and adjust spacing
2022-08-18 15:47:36 -07:00
Keavon Chambers
763cdbb100 Move bezier-rs into libraries folder and deploy its interactive docs 2022-08-15 00:17:31 -07:00
Dennis
9e1f4eb46d Add license information for node_graph crates 2022-08-04 11:47:38 +02:00
Keavon Chambers
0c7870c5b0 Fix formatting of previous commit 2022-08-04 00:18:42 -07:00
Dennis
5e9545322e Bump dyn-any version + format code 2022-08-04 09:08:48 +02:00
Dennis
30af1ba8db Integrate dyn-any into the main graphite repo 2022-08-04 09:05:19 +02:00