Commit graph

92 commits

Author SHA1 Message Date
Dennis Kobert
1020eb6835 Implement the Brush without relying on a stamp texture
Test Plan: Test the BrushNode in the editor

Reviewers: Keavon

Reviewed By: Keavon

Pull Request: https://github.com/GraphiteEditor/Graphite/pull/1184
2023-04-29 01:31:14 +02:00
Keavon Chambers
d8dfcb28ac Add cargo-watch installation to build instructions on website 2023-04-25 23:35:12 -07:00
Keavon Chambers
4bdb026d9a Update the website with some new content 2023-04-05 02:34:16 -07:00
Keavon Chambers
92fe0bea50 Bezier-rs: Replace Vue-CLI with Webpack bundler 2023-03-29 16:58:51 -07:00
Keavon Chambers
c770cd906e Bezier-rs: Fix visualizing negative curvature on demo site 2023-03-28 17:54:11 -07:00
Keavon Chambers
3cf955e5bb Bezier-rs: Release version 0.2 2023-03-28 12:37:52 -07:00
Hannah Li
97be83c404 Bezier-rs: Implement miter-limit (#1096)
* Implement miter-limit approximation

* Refactor to use Join enum and address other comments

* Rustdocs improvements

* Tweaks

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-03-27 22:58:35 -04:00
Linda Zheng
3733804d18 Bezier-rs: Add lookup table function for subpath and make it support euclidean parameterization (#1082)
* Add euclidean option for lut

* Add lut for subpath

* Fix rust formatting

* Fixed breakages caused by UI updates

* Code cleanup

* Make ProjectionOptions optional

---------

Co-authored-by: Rob Nadal <robnadal44@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-03-27 21:05:00 -04:00
Linda Zheng
d0ac86b713 Bezier-rs: Add curvature and rotate functions to subpath (#1081)
* Add rotate and curvature

* Fix comments

* Fix case where curve is linear

* Address comments

* Fixed breakages caused by UI updates

* Scootch rotation point to center in frame

* Code review

* Visualize t value point when segment is linear

---------

Co-authored-by: Rob Nadal <robnadal44@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-03-27 19:35:57 -04:00
Rob Nadal
3f8adbafba Revert @graphite/ path imports in website (#1095)
Reverted @graphite path imports
2023-03-27 16:39:48 -04:00
Hannah Li
c0576ab4e0 Bezier-rs: Add joins and caps to offsets and outlines (#1083)
* Intial work

* Improve miter and add round join

* Get arcs to go opposite direction

* Add cap and other refactors

* Rename joint to join, fix some bugs

* Fix single point issue

* Clean up

* Fix iframe sizes and update UI

* Address comments and handle single point outline

* Rename variables, fix branches in outline

* Address comments
2023-03-27 16:25:08 -04:00
Keavon Chambers
7e124c8035 Update readme and Task Board links 2023-03-27 11:13:53 -07:00
Andre Roelofs
639a24d8ad Replace TS relative @ import path (#1087)
Migrated the import shortcut used in Svelte from @ to @graphite for better future package compatibility

Co-authored-by: Andre Roelofs <andreroelofsai@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-03-26 01:39:38 +01:00
Keavon Chambers
6438a2a403 Update website mockup images 2023-03-22 09:35:32 -07:00
Rob Nadal
834cb1a227 Bezier-rs: Update interactive demo site UI/UX (#1085)
* wip - change demo iframe styling

* fix typo

* change tVariant select from radio buttons to dropdown

* Added iframe styling

* fix linting errors

* Integrated tvariant picker as input options

* Updated points in demos

* Lint

* Clean up CSS

---------

Co-authored-by: Thomas Cheng <contact.chengthomas@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-03-21 01:23:02 -04:00
Keavon Chambers
5748d9bff4 Assorted code file cleanup following Svelte switch 2023-03-10 15:48:04 -08:00
Rob Nadal
2e3495aa0e Bezier-rs: Made wasm imports async in demos (#1071)
* Made wasm imports async in demos

* remove hidden characters to pass linting

* Swapped import to use async / await

---------

Co-authored-by: Thomas Cheng <contact.chengthomas@gmail.com>
2023-03-06 22:08:41 -05:00
Rob Nadal
ccb698ffa8 Bezier-rs: Subpath offset and bezier offset improvements (#1039)
* Added subpath offset

* Enhanced offset to produce smooth curves

* Lots of outline bugfixes

* Fixed failing unit tests

* Added subpath outline

* Refactor bezier offset and outline to return Subpaths

* Fix outline bug due to smooth joining and removed reduce optimization that causes jumping approximations

* Bugfix when subpath angle is acute but doesn't intersect

* Stylistic changes per review

* Stylistic changes per review and updated doc comments

---------

Co-authored-by: Hannah Li <hannahli2010@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-03-03 14:21:21 -05:00
0HyperCube
66ec85a3c9 Bézier-rs: Add utils to subpath (#1058)
* Add utils to bezier-rs subpath

* Apply code review changes

* Remove tan from constant

* Fix compile

* Fix tests
2023-03-02 16:48:09 +00:00
Rob Nadal
8bc290fde9 Bezier-rs: Add function to smoothly join bezier curves (#1037)
* Added bezier join

* Stylistic changes per review
2023-02-28 18:59:06 -05:00
Hannah Li
8d3daeae78 Bezier-rs: Add trim for Subpath (#1006)
* Move compare.rs

* Update traits for Subpath and ManipulatorGroup

* Implement trim

* UI adjustments and more tests

* Add reverse, refactor code, rename variables

* Improve comments

* Comment nits

* Address comments

* Update trim behavior

* Update doc comment for trim

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-02-26 18:41:11 -05:00
0HyperCube
08b2782917 Bézier-rs: Add ids to manipulator groups (#1054)
* Add ids to manipulator groups

* Fix tests

* Rename trait from ManipulatorGroupId to Identifier

* Rename EmptyManipulatorGroupId to EmptyId
2023-02-25 16:23:58 +00:00
timblah
48dcc2774b Fix file paths mentioned in website's Contribute page (#1052)
* Updated paths for frontend / backend communication section of contribute page to reflect current project structure

* Added starting / for consistency with other paths on the page

* Mapping actually happens in subscription router

* Changed path to show code that dispatches FrontendMessage rather than the type def

* Missing / at start of path

* Fix files

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-02-23 02:40:28 -05:00
Thomas Cheng
f2d35f50de Bezier-rs: Add self_intersection to subpath (#1035)
* add self-intersection to subpath, rebased old work onto master

* fix interactive website after rebase

* fix rustdoc iframe placement

* remove double comment

* address comments

* revert evaluate change

* address comment + fix assert statement bug

* update function comments
2023-02-21 17:08:55 -05:00
Linda Zheng
37775eb9e9 Bezier-rs: Add bounding box, extrema, and inflection functions for subpath (#953)
* Create bbox function for subpath

* Create extrema and inflection function for subpath

* Address comments

* Prevent selecting text in SVG demo boxes

* Address Keavon's comments

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-02-20 13:40:38 -05:00
Hannah Li
98f172414a Bezier-rs: Add iframes to rustdoc (#1036)
* Add iframes examples

* Move TValue selection to bottom

* Remove spaces

* Add background, adjust heights

* Minor lint fix
2023-02-17 19:09:36 -05:00
Rob Nadal
9a52cae9b9 Bezier-rs: Add SubpathTValue and euclidean parameterization for subpaths (#1027)
* Added SubpathTValue and euclidean parameterization for subpaths

* Small fix

* Added bounds checking to get_segment

* Code review

* code review nit for clarity

---------

Co-authored-by: Hannah Li <hannahli2010@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-02-17 15:33:52 -05:00
Rob Nadal
a64c856ec4 Bezier-rs: Updated Bezier function signatures to accept TValue (#967)
* Create helper for converting d to t values

* Add euclidean option for tangent and normal

* Modified bezier functions signatures to accept ComputeType

* Stylistic changes per review

* Added ComputeType documentation

* Renamed ComputeType to TValue

* Fixed comments

* Fixed failing unit tests

* Code review

* Fix comments in code review

* Renamed compute_type_to_parametric to t_value_to_parametric

---------

Co-authored-by: Linda Zheng <thelindazheng@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-02-13 12:31:51 -05:00
Hannah Li
ff51098c11 Bezier-rs: Add hash URLs for individual API examples (#968)
* Handle displaying single demos

* Address comments

* Update eslintrc

* Add hash links

* Use hash instead of pathname

* Address small nits

* Change url format

* CSS improvements

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-02-08 23:32:28 -05:00
Hannah Li
a328e7d3ef Bezier-rs: Add split for Subpath (#988)
* Add subpath split

* Update comment and colors

* Address comments

* Improve visualization clarity

* Code review

---------

Co-authored-by: Rob Nadal <Robnadal44@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-01-31 03:17:20 -05:00
Jackie Chen
511a8aa164 Bezier-rs: Add normal and tangent to subpath (#1003)
tangent and normal for subpath

Co-authored-by: Rob Nadal <Robnadal44@gmail.com>
2023-01-31 00:15:37 -05:00
Keavon Chambers
66e8325362 Update project readme and MSRV 2023-01-24 01:33:30 -08:00
Keavon Chambers
d2219cec36 Fix website RSS feed title 2023-01-22 00:59:26 -08:00
Rob Nadal
01853fe4b7 Bezier-rs: Refactor interactive demo to remove Vue (#959)
* Converted bezier example to vanilla js component

* Indent with tabs

* Add sliders

* Converted bezier example pane to vanilla js

* Implement the radio buttons + fixes

* Converted SubpathExample to vanilla js

* Converted SubpathExamplePane to vanilla js

* Removed vue components

* Remove App.vue

* Remove vue and other dependencies

* Minor fix in main.ts

* Added insert to subpath features

* Entry point tweaks

* Rename "example" to "demo"

* Kebab-case file names (except classes)

Co-authored-by: Hannah Li <hannahli2010@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-01-13 04:04:39 -05:00
Hannah Li
758f757783 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
72cd204c64 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 18:32:22 -05:00
0HyperCube
11401f8692 Avoid deprecated into_serde() (#906) 2022-12-23 19:16:23 +00:00
Keavon Chambers
49b9b8cfec Rename the legacy Graphene crate to document-legacy (#899)
* Rename /graphene to /document-legacy

* Update names in code
2022-12-22 02:12:05 -08:00
Rob Nadal
ef99c91226 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 14:44:11 -08:00
Keavon Chambers
2f2daa25e9 Simplify website template code 2022-12-18 21:35:46 -08:00
Keavon Chambers
1bdbcfd9e7 Prepare Bezier-rs for publishing 2022-12-17 22:14:56 -08:00
TrueDoctor
7d8f94462a 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-07 12:49:34 +01:00
Thomas Cheng
52cc770a1e 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-11 00:41:02 -05:00
Hannah Li
01a9724389 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
Rob Nadal
a220bfa759 Bezier-rs: Remove unused legacy drawing components and structs (#853)
* Removed unused legacy drawing components

* Removed Point abstraction from frontend code

* Code review fixes

* Helper lambdas to functions

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-11-18 00:34:52 -08:00
Keavon Chambers
14e0582494 Update bezier-rs interactive demos node.js packages 2022-11-16 18:31:21 -08:00
Keavon Chambers
cece6de2a9 Bump MSRV to 1.65.0 for let-else syntax
Closes #857
2022-11-16 18:04:04 -08:00
Rob Nadal
00c8fa83c2 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
Keavon Chambers
c4d14eed16 Update frontend and bezier-rs demo npm dependencies 2022-11-08 15:11:53 -08:00
Rob Nadal
56060b8e5f 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