* add arrow shape feature in editor
Signed-off-by: krVatsal <kumarvatsal34@gmail.com>
* fix the arrow tool to show arrow in viewport space
Signed-off-by: krVatsal <kumarvatsal34@gmail.com>
* fix the direction of arrow and make the new arrow node
Signed-off-by: krVatsal <kumarvatsal34@gmail.com>
* updated arrow tool to hae start and end points
Signed-off-by: krVatsal <kumarvatsal34@gmail.com>
* fixed calculate point bug
Signed-off-by: krVatsal <kumarvatsal34@gmail.com>
* fixed some bugs of arrow positioning
Signed-off-by: krVatsal <kumarvatsal34@gmail.com>
* fixed formatting in whole codebase and added fill to arrow
Signed-off-by: krVatsal <kumarvatsal34@gmail.com>
* fix
---------
Signed-off-by: krVatsal <kumarvatsal34@gmail.com>
Co-authored-by: Timon <me@timon.zip>
* Add median filter option to blur node:
- Add median parameter to blur function for noise reduction
- Implement median_filter_algorithm with efficient quickselect
- Support gamma space calculations for median filtering
- Preserve edges while removing noise, complementing existing blur options
Feature in Issue: #912
* Optimize median filter algorithm by reusing buffers and improving pixel neighborhood collection
* Add median filter option to blur node:
- Add median parameter to blur function for noise reduction
- Implement median_filter_algorithm with efficient quickselect
- Support gamma space calculations for median filtering
- Preserve edges while removing noise, complementing existing blur options
Feature in Issue: #912
* Optimize median filter algorithm by reusing buffers and improving pixel neighborhood collection
* Improve median filter's NaN handling by using total_cmp for safe comparisons
* Add median filter node for noise reduction
- Create dedicated median_filter node separate from blur functionality
- Implement median_filter_algorithm with efficient quickselect
- Support gamma space calculations for consistency
- Use safe NaN handling with f32::total_cmp to prevent panics
- Optimize performance with memory reuse and O(n) median selection
* Refactor median filter to remove gamma handling and simplify algorithm
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
* Exclude node registry functions from desktop frontend builds
This reduces compile times and file sizes
* Use early return
* Fix branch name in build-linux pipeline
* Add #[data] and #[serialize] attributes to node macro
- Add #[data] attribute for struct fields that aren't node parameters
- Data fields are initialized with Default::default()
- Passed as references to the underlying function
- Excluded from registry metadata (internal state)
- Generic types in data fields allowed without #[implementations]
- Add #[serialize] attribute for custom Node::serialize() implementation
- Receives references to all data fields
- Generates serialize() method in Node trait impl
- Conditional derives based on data field presence
- With data fields: Debug, Clone only
- Without data fields: Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash
* Refactor Memo and Monitor Node to use node macro
* Move Complex type into type alias
* Fix format
* Update node-graph/nodes/gcore/src/memo.rs
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Update node-graph/nodes/gcore/src/memo.rs
Co-authored-by: Keavon Chambers <keavon@keavon.com>
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* fix: rasterize node document leakage with hashmap and eq check
* Use single Hashmap and ignore source id
* use or_insert_with instead of Entry match
---------
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
* Implement branching mesh rendering for SVG
* Patch mesh fill for Vello renderer
* Patch tangent_at_start and tangent_at_end
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Remove FontInput.svelte
* Move font picking to the backend
* Fix Text tool font choice style turning to "-" on font that doesn't support previous style
* Replace the title attribute with custom FloatingMenu tooltips
* Separate tooltip labels and descriptions into two styled blocks
* Move keyboard shortcut tooltips to a separate section at the bottom
* Update shortcut key styling in tooltips and hints bar
* Fix .to_string()
- Add the 'Reset Transform' and 'Replace Transform' nodes
- Add the 'Count Points' and 'Index Points' nodes
- Make the 'Index Elements' node support negative indexing from the end
- Make the 'Flatten Vector' node's implementation reusable
- Fix crash displaying 0x0 raster image in the Data panel
- Fix the 'Points to Polyline' node not working on two-point objects
* Fix 'Mask' node missing Properties widget; fix crash with 'Brightness/Contrast Classic' node
Also clean up dead code and improve tooltip for the "-" Properties panel widget fallback.
* format type
---------
Co-authored-by: Adam <adamgerhant@gmail.com>
* desktop support ui scaling
* fix some warnings
* use browser zoom if needed
* fix infinite footprint size
* fix web canvas scale
* always set zoom
* use only zoom for scaling
* prevent user zoom
* remove mouse position scaling
* Add two nodes for substring
* fix: number convention
* Remove unnecessay allocations and add support for \n in patterns
* Make split node return Vec<String> and remove count_elements node
* Add Cache implementations for Vec<String>
* Code review
---------
Co-authored-by: daniil.loban <daniil.loban@gmail.com>
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Cache calculation of bounding boxes with transforms
* Reuse bounding boxes across for the same rotation
* Cleanup code and add documentation
* Add tests
* Disable caching for the instance repeat etc. nodes
* Add usize implementation for caching and monitor nodes
* Change return type of instance index node back to f64
* Cleanup while loop
* Remove stray usize changes
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Make the Transform node use degrees not radians
* Migration script
* Migrate skew value input to store degrees
* Add comments
* Fix migrations to account for the old deprecated "Pivot" parameter
* Fix tooling interactions with degrees-based transforms
* Upgrade demo art
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* made spiral node
* number of turns in decimal and arc-angle implementation
* logarithmic spiral
* unified log and arc spiral into spiral node
* add spiral shape in shape tool
* fix min value and degree unit
* make it compile
* updated the api
* changed the function_name
* [/] to update the turns widget in shape tool
* Code review
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
improve perimeter calculation of the path bezier segments when it is very close to linear bezier curve
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Fix outside stroke alignment not using masks when transparent
* Fix for vello
* fix fixes
* cargo fmt
* scale stroke by align type
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* graster-nodes: change `Table<Color>` params to `Color` where only one value is used
* Re-add support for Color and Option<Color>
* Add warning when a default value isn't parsed
---------
Co-authored-by: hypercube <0hypercube@gmail.com>
* gcore-shaders: fix missing `num-traits/libm` features
* graster-nodes: fix missing cfg on use statements
* shaders: use unchecked Color constructors
* graster-nodes: remove async from shader nodes not needing it
* gcore-shaders: remove explicit fn pointer
* graster-nodes: make kurbo std-only
* graster-nodes: replace glam reexport with normal dep
* gcore: impl Display for ProtoNodeIdentifier
* unify glam workspace dep
* Make manual_compositon non optional and rename to call_argument
* Fix clippy warnings
* Remove automatic composition compiler infrastructure
* Implement document migration
* Fix tests
* Fix compilation on web
* Fix doble number test
* Remove extra parens
* Cleanup
* Update demo artwork
* Remove last compose node mention
* Remove last mention of manual composition
* Improve perf of path bool lib
* Use swap remove
* Use outer/inner bounding box for inclusion testing
* Reuse allocations for hit testing
* Use direct root finding for inclusion testing
* Reuse bounding box
* Use faster hash and specify capacities
* Use hashmap based approach for find vertices
* Unroll find_vertecies loop and use 32 bit positions
* Tune initial vec capacities
* Remove unused bounding boxes
* Use smallvec for storing outgoing edges
* Improve allocations for compute_minor
* Use approximate bounding box for edge finding
* Transition aabb to use glam vecs
* Make find vertecies use 64 bit again this is slower but less likely to cause issues
* Improve intersection candidate finding
* Remove loop check in bit vec iter
* Special case cubic line intersections
* Optimize grid rounding and add debug output
* Remove file write
* Remove faulty line intersection
* Fix grid rounding
* Improve robustness and cleanaup code
* Make elided lifetime explicit
* Fix tests
* Fix a boolean ops crash
* Add comment
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Prototyping desktop wrapper api
* Separate into multiple modules
* Some fixup
* Reimplement most functionality with editor api
* Fix texture life time crashes
* Fix scale
* Implement editor wrapper message queue
* Improve performance
* Handle native messages directly without submitting to event loop
* Fix overlay latency
* Move editor message execution to executor allows no shared state in editor wrapper
* Small clean up
* Small cleanup
* Some renames
* Cleaning up desktop wrapper interface
* Fix formatting
* Fix naming
* Move node graph execution result handling to app
* Fix FrontendMessage RenderOverlays usage
* Reimplement file drop and clean up file import and open messages
* Remove dbg
* Post merge fix
* Review changes
* Feat: Point sliding on G G
* Code cleanup
* Fix gg sliding behaviour
* Fix build after merge conflict resolution
* Fix slide point and add hints
* Fix history in segment insertion
* Code review
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Reduce code duplication in bounding box impls on Table
* Working Table<Color> rendering in the graph
* Implement color and fix other rendering with Vello and polish
* Rename VectorData to Vector
* Rename other VectorData* types to Vector*
* Move assorted data types out of vector_data.rs into misc.rs
* Rename vector_data.rs to vector_types.rs and remove the vector_types module folder
* Rename other references to "vector data"
* Remove label widgets for raster/vector/group to use "-" instead
* Rename RasterData to Raster
* Rename GraphicGroup to Group
* Fix migrations and rename graphic_element.rs -> graphic.rs
* Rename TaggedValue::ArtboardGroup -> TaggedValue::Artboard
* Instances -> Table
* instances.rs -> table.rs
* Rename occurrances of the word "instances"
* .instance -> .element
* Instance* -> TableRow*
* Rename Table and TableRow methods to not say "instance"
* Remove presumed unused serde defaults now that tables default to length 0 not 1
* Rename occurences of the word "instance"
* Un-alias the RasterDataTable<Storage>, VectorDataTable, GraphicGroupTable, ArtboardGroupTable typedefs
* Move artboard type and node code out of graphic_element.rs to a new artboard.rs
* Organize the TaggedValues
* Fix tests
* Fix prior regression with Image Value node not upgrading
* Render overlays with vello
* Fix nix flake comments
* Rendering refactor with better names and code location
* Remove unnecessary overlay renders
* Post rebase fix
* add todo
* impl function to convert a bezpath to manipulator groups
* refactor few node impls
* refactor vector nodes test and few methods on VectorData struct
* refactor tests
* remove unused import
* simplify and fix morph node test
* rename vars and comment
* refactor bezpath_to_parametric function
* Code review
* fix bezpath_to_manipulator_groups function
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* impl function for segment intersections
* fix and improve segment intersections
* copy and refactor related segment intersection methods
* copy and refactor tests for segment intersection from bezier-rs
* impl intersection with bezpaths
* copy and refactor tests
* rename few variables in the tests module
* rename position_on_bezpath to evaluate_bezpath
* copy and refactor function to clip two intersecting simple bezpaths
* refactor comments
* copy and refactor functions for milter join
* copy and refactor milter and round join functions from bezier-rs
* it worked! refactor offset path node impl
* fix few bugs
* improve vars names and add comments
* Code review
* fmt
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Add text alignment to Text node
* Lots of renames and improvements
* Add text alignment to the Text tool
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>