* Port gradient tool overlays
* Fix tests
* Text tool
* Artboard tool and some of select tool
* Port select tool drawing box
* Pen and path tool
* Remove overlays document
* Show the overlay refactor as done on the website roadmap
* Select tool bounds in layer space (first layer)
* Code review and fixes
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Refactor Graphite dependency management
* Remove deprecated future executor
* Code review nits
* Remove unused dependencies
* Update dependencies and make compile with all features
* Replace use of future_executor with wasm-bindgen-futures
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* A few minor lints and docs
* Added required packages to compile on Debian-style linux
* Inlined some format args, and removed some `&` in args (they cause about 6% slowdown that compiler cannot inline)
* a few spelling mistakes
* fix fmt
* Create ValueMapperNode and use it for brightness/contrast
* move spline code into seperate module
* Add GenerateCurvesNode
* add a `LuminanceMut`-trait
* add `lerp` to `Channel`
* Add frontend code to handle the curves widget's inputs
* Rename spline module to curve
* Make messages in CurveInput pass
* Improve curves widget design and fix sizing issue
* Implement proper bezier handling
* Use bezier_rs's intersections function instead of own cubic root solver
* Debounce CurveInput events and change how debouncer works
the first event issued to the debouncer was unneccessarily delayed.
Instead now the debouncer fires it instantaneously but blocks events
that come in until a timeout was reached.
* Make curve editing more user friendly
* Change code to use project terminology
* sample -> manipulator group or manipulator
* marker -> handle
* Fix small documentation mistake in bezier-rs
* Add find_tvalues_for_x function to bezier-rs
also integrate the function into curves node
* Add tests for find_tvalues_for_x in bezier-rs
* Fix formatting
* Revert BrightnessContrastNode changes
* Frontend cleanup
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
* 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>
* 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
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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* Setup tauri component for graphite editor
Integrate graphite into tauri app
Split interpreted-executor out of graph-craft
* Add gpu execution node
* General Cleanup
* 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>
* 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>
* 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>
* 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>
* Convert rotate demo to svg
* Fix bugs in rotate
* Fix bugs in rotate
* Draft of decasteljau to svg
* fixed de casteljau points to_svg impl
* clean up wasm impl for de casteljau points
* Use svg format in wasm for arcs
* Update app.vue
* Fix arcs as svg
Co-authored-by: Linda Zheng <ll2zheng@uwaterloo.ca>
* Remove comments
* Reduce code duplication
Co-authored-by: Thomas Cheng <contact.chengthomas@gmail.com>
Co-authored-by: Hannah Li <hannahli2010@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* 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>
* 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
* 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
* Renamed VectorAnchor, VectorShape and VectorControlPoint. Also fixed other naming inconsistencies.
* Renamed messages relating to vector and updated naming in several tools
* Renamed comments + caught a few areas I had missed.
* Caught a few more incorrect names
* Code review pass
* Review changes
* Fixed warning
* Additional review feedback
Co-authored-by: Keavon Chambers <keavon@keavon.com>