* Generalize PenColorType -> ToolColorType
* impl default for ToolColorOptions
* Add stroke color option to the freehand tool
* Consolidate working color update messages
* Update tool working colours when switching tools
* Update working colors on tool activation
* Add stroke color option to line tool
* Add fill color option to freehand tool
* Add tool color options to spline tool
* Fix freehand tool
* Add color options to text
* Add tool color/weight options to rectangle
* Add tool color/weight options to ellipse
* Add tool color/weight options to shape
* Fix spline default fill/stroke
* Reorder widgets and code cleanup
* Add CustomColor icon
* Fix warnings
* Change color defaults to secondary fill, primary stroke
* Fix spacing between brush options number inputs
* Add toolbar color option to brush
* Implement allowNone on color input widget
* Rearrange widget and remove X from brush
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
Implement Infrastructuro to reuse the previous evaluation of the
node graph to blend the new stroke with instead of drawing the
entire trace from scratch.
This does not transition to a blending based approach because that still
caused regressions but allows the brush node to work with input data
natively.
Test Plan:
- Use the brush tool in the editor and check for regressions
- Evaluate the performance
Reviewers: Keavon
Pull Request: https://github.com/GraphiteEditor/Graphite/pull/1190
* Implement download/copy ImageFrame layer output
* Add note about black transparency when copying
* Introspect node graph output type to conditionally disable the download button
---------
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
* Add basic layout - WIP
* Add color input min-width -> 80px
* First pass implementation - WIP
* Allow fill to be None
* Fix null Fill color
* refactor fill and stroke options into struct
* toolbar progress - WIP
* Switch is_working_color bool to PenColorType enum
* Add todo
* Add WorkingColorChanged event
* remove unused import
* Add WorkingColor[Primary/Secondary] icons
* Allow new strokes to have no color
* Set to base color when X is pressed (as per req)
* Improve icons for new UI layout design
* Add radio buttons
* Fix menu bar Edit12px -> Edit
* Add tooltips to radio buttons
* Make the color selector only on custom
* Fix edit icon correctly this time (whoops)
* Fix working colors icons
* Changes to improve the UX
* Remove lines obviated by Default::default()
* Make Eyedropper tool use working_color_changed event
* Fix tests
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
"@parcel/config-default" is needed to run on other package managers like pnpm even though it seems to have worked okay on regular npm.
* Upgrade and fix frontend dependencies
* More dep updates
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Set spline mirror handles to enabled by default
* refactor mirror setting into common function
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
Add the node path to the document node and carry that over to the proto
nodes which are generated from that.
This pr also adds a compiler pass to assign the paths based on the
hierarchical structure of the nodegraph.
Test Plan: - Run units tests which check the path propagation works
Reviewers: Keavon
Reviewed By: Keavon
Pull Request: https://github.com/GraphiteEditor/Graphite/pull/1181
* Initial work towards text to node
* Add the text generate node
* Implement live edit
* Fix merge error
* Cleanup text tool
* Implement text
* Fix transforms
* Fix broken image frame
* Double click to edit text
* Fix rendering text on load
* Moving whilst editing
* Better text properties
* Prevent changing vector when there is a Text node
* Push node api
* Use node fn macro
* Stable ids
* Image module as a seperate file
* Explain check for "Input Frame" node
* Code review
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
Adds a `serialize` function on Node which can be implemented by nodes to
allow introspecting their content. This pr also adds a Monitor Node that
always caches the last value it was evaluated with.
Test Plan: -
Reviewers: 0HyperCube
Reviewed By: 0HyperCube
Pull Request: https://github.com/GraphiteEditor/Graphite/pull/1165
Disables the requirement of merging into master to run the ci.
Test Plan:
- Create a pr against a non master branch and verify the ci runs
- Push to a non master branch and verify the ci runs
Reviewers: Keavon
Reviewed By: Keavon
Pull Request: https://github.com/GraphiteEditor/Graphite/pull/1166
* Migrate webpack to parcel
* Always colour shell output
* Fix typos
* Fix updateImage function having undefined editorInstance
* Readd webpack for deployment builds (licence checker)
* Only use webpack for license generation
* Re add typscript support
* Fix cloudlare deploy
* Bump wasm-pack version
* Update ci script
* Print versions in ci script
* Use optional-dependencies for wasm-pack
* Execute wget after rust install
* Finding wasm-opt version
* Print wasm-opt version
* Revert test?
* Try to revert
* Deploy cloudflare via github actions
* Fix indentation in ci script
* Change project to graphite-dev
* Trigger ci
* Parcel ci (#1152)
* CI Test
* Add write permissions for pr
* Manually add cloudflare ci comment to prs
* Unskip cargo about
* Make compile on new versions of npm
* Add deployment script to rebuild editor.graphite.rs on tag creation
* Remove deploy script
* Comment out unused Svelte props causing warnings
* Many small fixes, including fixing @ imports
---------
Co-authored-by: hypercube <0hypercube@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
Split function into smaller non-inlinable ones
this fixes the issue that rust creates too many wasm locals in non-optimized
builds. That lead to a compile error in such builds.
Co-authored-by: Keavon Chambers <keavon@keavon.com>
Enables optimizations for `interpreted-executor` in debug mode to
circumvent the wasm limit for the number of locals in a single function.
Test Plan:
Add entries to the node registry and verify that it does
still compile
Reviewers: Keavon
Reviewed By: Keavon
Pull Request: https://github.com/GraphiteEditor/Graphite/pull/1158
* Start implementing GpuExecutor for wgpu
* Implement read_output_buffer function
* Implement extraction node in the compiler
* Generate type annotations during shader compilation
* Start adding node wrapprs for graph execution api
* Wrap more of the api in nodes
* Restructure Pipeline to accept arbitrary shader inputs
* Adapt nodes to new trait definitions
* Start implementing gpu-compiler trait
* Adapt shader generation
* Hardstuck on pointer casts
* Pass nodes as references in gpu code to avoid zsts
* Update gcore to compile on the gpu
* Fix color doc tests
* Impl Node for node refs
* Add the Channel Mixer node
* Fix NodeIdentifier not found in Registry
* Add radio toggle for red/green/blue
---------
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
Previously, the duplicated layer would be placed at the top of the stack. It is now inserted one layer above the original.
---------
Co-authored-by: Ollie Dolan <olliedolan10@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Nudging is now based on local pixel dimensions
* Brush tool live preview (#1116)
* Disable vector preview for brush tool
* Fix brush preview
* Fix warping
* Left and right square brackets to change size
* Add linear interpolation
* Modfiy existing selected brush layer
* Resolve warnings
---------
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Duplicating a layer selects only new layer
* Add Ctrl+J duplicate alias hotkey
---------
Co-authored-by: 0HyperCube <78500760+0HyperCube@users.noreply.github.com>
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
Co-authored-by: Keavon Chambers <keavon@keavon.com>