* move `trait AsU32` from `gcore::vector::misc` to `gcore`
* move blending and gradient to their own modules
* fix unused warnings
* move `Quad`, `Rect` and `BBox` to `gcore::math`
* extract `ReferencePoint` and transform nodes from `transform`
* move color-related code to `mod color`
* fix unused warning in test code
* move blending-related nodes and code to `mod blending_nodes`
* move ClickTarget code to `mod vector::click_target`
* Prototype document network level into node insertion
* Implement Convert trait / node for places we can't use Into
* Add isize/usize and i128/u128 implementations for Convert trait
* Factor out substitutions into preprocessor crate
* Simplify layer node further
* Code review
* Mark preprocessed networks as generated
* Revert changes to layer node definition
* Skip generated flag for serialization
* Don't expand for tests
* Code review
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Added Count point Radio button to property pannel
* Implemented on Count radio button functionality
* Fixed linting and Title case problem
* Fixing more linting problem
* Instance tables refactor part 8: Make repeater nodes use pivot not bbox and output instance type not group; rename 'Flatten Vector Elements' to 'Flatten Path' and add 'Flatten Vector' (#2697)
Make repeater nodes use pivot not bbox and output instance type not group; rename 'Flatten Vector Elements' to 'Flatten Path' and add 'Flatten Vector'
* Refactor the 'Bounding Box' node to use Kurbo instead of Bezier-rs (#2662)
* use kurbo's default accuracy constant
* fix append_bezpath() method
* refactor bounding box node
* fix append bezpath implementation.
* comments
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Add overlays for free-floating anchors on hovered/selected vector layers (#2630)
* Add selection overlay for free-floating anchors
* Add hover overlay for free-floating anchors
* Refactor outline_free_floating anchor
* Add single-anchor click targets on VectorData
* Modify ClickTarget to adapt for Subpath and PointGroup
* Fix Rust formatting
* Remove debug statements
* Add point groups support in VectorDataTable::add_upstream_click_targets
* Improve overlay for free floating anchors
* Remove datatype for nodes_to_shift
* Fix formatting in select_tool.rs
* Lints
* Code review
* Remove references to point_group
* Refactor ManipulatorGroup for FreePoint in ClickTargetGroup
* Rename ClickTargetGroup to ClickTargetType
* Refactor outline_free_floating_anchors into outline
* Adapt TransformCage to disable dragging and rotating on a single anchor layer
* Fix hover on single points
* Fix comments
* Lints
* Code review pass
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Add anchor sliding along adjacent segments in the Path tool (#2682)
* Improved comments
* Add point sliding with approximate t value
* Add similarity calculation
* Numerical approach to fit the curve
* Reliable point sliding for cubic segments
* Fix formatting and clean comments
* Fix cubic with one handle logic
* Cancel on right click and escape
* Two parameter optimization
* Esc/ Right click cancellation
* Code review
* Fix dynamic hints
* Revert selected_points_counts and fix comments
* Code review
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Fix Sample Points node to avoid duplicating endpoints instead of closing its sampled paths (#2714)
* Skip duplicate endpoint and close sampled paths in Sample Points node
Closes#2713
* Comment
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Implemented on Count radio button functionality
* Fixed linting and Title case problem
* The sample count can now work with adaptive spacing
* Readying for production
* Rename to 'Sample Polyline' and add migration
* Upgrade demo artwork
* Add monomorphization
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: Priyanshu <indierusty@gmail.com>
Co-authored-by: seam0s <153828136+seam0s-dev@users.noreply.github.com>
Co-authored-by: Adesh Gupta <148623820+4adex@users.noreply.github.com>
Co-authored-by: Ezbaze <68749104+Ezbaze@users.noreply.github.com>
* Ignore tauri gen
* Deny warnings on CI
* Fix all warnings in current nightly rustc
* Disable DWARF debug info for development builds
* Fix typo
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* graph-craft: fix direct wasm build
* graph-craft: fix no serde feature failing to compile
* graph-craft: make wgpu-executor properly optional
* workspace: unify `image` formats in workspace
* workspace: turn most dependencies into workspace deps, no actual changes
* workspace: unify dependency features in workspace dep
* refactor: opacity + blend_mode -> blend_style
* Add code for clipping
* Add alt-click masking
* Clip to all colors. Fill option
* Fix undo not working. Fix strokes not being white
* Allow clipped to be grouped or raster
* Switch to alpha mode in mask-type
* add plumbing to know if clipped in frontend and add fill slider
* Attempt at document upgrade code
* Fix fill slider
* Add clipped styling and Alt-click layer border
* Use mask attr judiciously by using clip when possible
* Fix breaking documents and upgrade code
* Fix fixes
* No-op toggle if last child of parent and don't show clip UI if last element
* Fix mouse styles by plumbing clippable to frontend
* Fix Clip detection by disallowed groups as clipPath according to SVG spec doesn't allow <g>
* Add opacity to clippers can_use_clip check
* Fix issue with clipping not working nicely with strokes by using masks
* Add vello code
* cleanup
* Add stroke alignment hacks to SVG renderer
* svg: Fix mask bounds in vector data
* vello: Implement mask hacks to support stroke alignment
* Move around alignment and doc upgrade code
* rename Line X -> X
* An attempt at fixing names not updating
* svg: add stroke order with svg
* vello: add stroke order with by calling one before the other explicitly
* fix merge
* fix svg renderer messing up transform det
* Code review; reorder and rename parameters (TODO: fix tools)
* Fixes to previous
* Formatting
* fix bug 3
* some moving around (not fixed)
* fix issue 1
* fix vello
* Final code review
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Fix several broken raster nodes and clean up leftover old node system code
* Migrate Brightness/Contrast to the new node macro, and fix it
* Remove last usages of old_node_fn
* Remove old_node_fn
* WIP debugging
* Only create parent ref if var args are used in context + Cleanup
* Eval nodes with None instead of relying on MemoImpure
* Remove unused imports
* Show parent in debug output
* Remove TODO comment
* Remove subtyping for () from node graph type system
* Remove special-case in DynAnyNode for downcasting to ()
* Correct input type for CreateGpuSurfaceNode
* Remove unncessary imports
---------
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: hypercube <0hypercube@gmail.com>
* Clean up dyn_any usages
* Migrate ArtboardGroup to ArtboardGroupTable (not yet flattened)
* Reorder graphical data imports
* Flatten and remove ArtboardGroup in favor of ArtboardGroupTable
* Fix test
* Fix domain data structure field plural naming
* Rename method one_item to one_instance
Rename method one_item to one_instance
* Move the Instance<T> methods over to providing an Instance<T>/InstanceMut<T>
Move the Instance<T> methods over to providing an Instance<T>/InstanceMut<T>
* Add transform and alpha_blending fields to Instances<T>
* Finish the refactor (Brush tool is broken though)
* Add test for brush node
* Fix brush node
* Fix default empty images being 1x1 instead of 0x0 as they should be
* Fix tests
* Fix path transform
* Add correct upgrading to move the transform/blending up a level
---------
Co-authored-by: hypercube <0hypercube@gmail.com>
* Implement experimental Context struct and traits
* Add Ctx super trait
* Checkpoint
* Return Any instead of DynAny
* Fix send implementation for inputs with lifetimes
* Port more nodes
* Uncomment nodes
* Port more nodes
* Port vector nodes
* Partial progress (the stuff I'm more sure about)
* Partial progress (the stuff that's not compiling and I'm not sure about)
* Fix more errors
* First pass of fixing errors introduced by rebase
* Port wasm application io
* Fix brush node types
* Add type annotation
* Fix warnings and wasm compilation
* Change types for Document Node definitions
* Improve debugging for footprint not found errors
* Forward context in append artboard node
* Fix thumbnails
* Fix loading most demo artwork
* Wrap output type of all nodes in future
* Encode futures as part of the type
* Fix document node definitions for future types
* Remove Clippy warnings
* Fix more things
* Fix opening demo art with manual composition upgrading
* Set correct type for manual composition
* Fix brush
* Fix tests
* Update docs for deps
* Fix up some node signature issues
* Code review
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: hypercube <0hypercube@gmail.com>
* Use the identity matrix as the default for an image frame
* Fix all usages to be equivalent to their pre-refactor versions, opting to keep ZERO not IDENTITY as the default image size
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Port VectorData to Instances<VectorData>
* Port ImageFrame<P> and TextureFrame to Instances<ImageFrame<P>> and Instances<TextureFrame>
* Avoid mutation with the TransformMut trait
* Port GraphicGroup to Instances<GraphicGroup>
* It compiles!
* Organize debugging
* Document upgrading
* Fix Brush node
* Restore TransformMut in lieu of TransformSet trait
* Fix tests
* Final code review
* 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>
* 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>
* Rework boolean operation node
* Set Boolean Operation name for layer
* Remove memoize
* Update both demo artworks that use booleans
* Delete dead code, rename input connectors
* Remove more dead code
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Get output/input types by iterating to proto node. Fix types when undoing/redoing
* Remove unused code
* Fix types not updating when modified
* Improve code quality
* Improve proto node type lookup
* Nits
* Fix crash when adding Extract
---------
Co-authored-by: dennis@kobert.dev <dennis@kobert.dev>
Co-authored-by: Keavon Chambers <keavon@keavon.com>