* copy and refactor spline algorithm from Bezier-rs
* add comments
* refactor spline node
* fix spline when path is closed
* use refactored version of spline algorithm
* revert changes to 'Spline' node funtion
* use manipulator groups instead of bezpath
* Fix comment
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Start refactoring the boolean operations code
* Switch to iterators in the boolean operations code
* Make boolean operations work on rows of a table, not Vecs of single-row tables
* Remove more .transform()
* Simplify brush code
* Attempt to remove .transform() by using Instance<Image<Color>> in brush code, but a regression is introduced
* Improve blend_image_closure
* Simplify
* Remove leading underscore from type arguments
* Remove .transform() from ImageFrameTable<P> and fix Mask node behavior on stencils not fully overlapping its target image
* Remove more .one_instance_ref()
* Fully remove .one_instance_ref() and improve the 'Combine Channels' node robustness
* Fully remove .once_instance_mut()
* Fix tests
* Remove .one_empty_image()
* Make Instances<T>::default() return an empty table for images, but still not yet vector
---------
Co-authored-by: hypercube <0hypercube@gmail.com>
* fix distribution snapper visualization going far from layers
* fix bugs
* Remove traces
* remove comment
* Fix tests
* Rename distribution snapper variables from x, y to horizontal, vertical
* Fix tests
* Fix bug where center point and corner point have to be enabled for distribution_snapper to work
* Cleanup
---------
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
* Avoid allocating a Vec when precomputed segments lengths is provided.
* improved using option type.
* we don't even need option type as Vec::new() doesn't allocate.
* clean up
* fix naming
* refactor sample_points node/function.
* avoid recalculating segments length to find point on bezpath.
* cleanup
* rename few variables
* fix transformation and use precomputed segment lengths
* write comments
* set POSITION_ACCURACY and PERIMETER_ACCURACY to smaller value to get better approximate euclidean position on a path
* fix segment index when t value is 1.0
* Improve comments
* move sampling points code into a separate function
* it works! finding the segment index is linear now!
* small fix and improve variable names & comment
* Naming
* evaluate segment at t as euclidean distance. fix.
* improve comment & variable name
---------
Co-authored-by: indierusty <priyaayadav@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* First draft of factoring out the dropdown boilerplate
* Add proc macro for enum boilerplate
* Detect whether to say `crate` or the name
* Clean up the input and naming of the enum macro
* Rename a file
* Do the rename of code too
* Use the attribute-driven selection of radio vs dropdown
* Add a metadata struct and tooltips
* Move the new traits to a better place.
* Use ChoiceType, part 1
* Use ChoiceType, part 2
* Introduce a builder API for choice widgets
* Start using the new new API
* DomainWarpType should be a dropdown still
* Handle the case where a node property can never have a socket
* Rustfmt
* Code review
* Update stable node IDs in test
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Fix min and max macro not enforcing limits when data flows
* Use trait based clamping
* Remove min/max from testing
* cargo fmt
* Resolve into min, and hard_min
* cargo fmt
* fix traits
* cargo fmt
* fix tests
* rename as soft_x
* Add validation code
* Clean up (not compiling because of DVec2 clamping)
* Avoid needing to add trait bounds to node definitions
* Code review
---------
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* rough refactor of Position on Path node
* refactor
* refactor 'Tangent on Path' node implementation to use kurbo API
* Code review
---------
Co-authored-by: indierusty <priyaayadav@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* almost_fixed
* fix need to refactor
* fixed issed need to refactor
* refactor-done fixed issue
* move function to common_functionality
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Make the Pen tool show a path being closed by drawing a filled overlay when hovering the endpoint
* Add to_css to color.rs
* Check before unwrapping layer
* Close if in the right place
* Fix typo
* Format code
* Support discontinuous paths for closing preview
* Code review
* Denser fill lines
* Fill tool preview with strip lines only and revert pen shape-closing opacity
* Small adjustments to fill preview
* Fix line width of fill preview
* Use a pattern to preview the fill tool and fix canvas clearing
* Update pattern
* Simplify code
* Format code
* Use secondary color to preview fill if shift is pressed
* Code review
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* init
* add closed and slice options
* Make it work beyond -360 to 360 degrees
* Switch "closed" and "slice" to ArcType enum
* Update default ranges
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Fix poisson disk sampling with nested subpaths
Previously all subpaths were considered independently for the poisson disk sampling evaluation. We now check agains all subpaths which might contain the point to fix shapes with holes such as fonts with letters with holes in them
* Fix wasm demo
* Fix counting overlapping areas twice
* Rename shape variables to subpath variants