Commit graph

2076 commits

Author SHA1 Message Date
Adesh Gupta
3496e22f55
Fix box selection bug in the Path tool where document and viewport space got mixed up (#2671)
* Fix box selection bug

* Fix all layers selected on paste
2025-05-25 16:33:49 -07:00
Keavon Chambers
2cee9e24cd Refactor some more vector nodes to use loops instead of one_instance, as a start to #1834 part 6 2025-05-24 21:33:58 -07:00
Keavon Chambers
63cce26755 Tweak the design of the RadioInput widget 2025-05-24 16:07:01 -07:00
0SlowPoke0
8a8e496058
Implement angle locking when Ctrl is pressed over an adjacent anchor (#2663)
* Implement angle lock from adjacent anchors

* Reset offset state and added comments

* Code review

* fix selecting correct handle to lock

* Update comment

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-05-24 12:09:43 +00:00
Keavon Chambers
c4678336e5
Add support for clicking checkboxes via their labels (#2667) 2025-05-24 04:46:15 -07:00
Keavon Chambers
80f38d91c0
Optimize Poisson-disk point sampling by halving the number of line intersection checks with caching (#2661) 2025-05-22 00:07:12 -07:00
Priyanshu
487b17a8d7
Fix 'Scatter Points' node artifacts (#2657)
* fix

* improve variable names

* fix point offsetting.

* Code review

* Update red dress artwork to preserve its look with new seeds

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-05-21 21:22:54 -07:00
Keavon Chambers
899ed5ad85 Tidy up the Layers panel with a new bottom bar 2025-05-21 04:14:01 -07:00
Mohamed Osama
66a297df2c
Improve the distribution part of the snapping system (#2626)
* 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>
2025-05-20 00:15:56 -07:00
0SlowPoke0
ddb2d744d4
Make the Path tool support multi-point conversion between smooth/sharp on double-click (#2498)
* kinda works

* solved merge conflicts

* implement the multi flip

* nit-picks

* removed extra functions

* Fix inputs not being passed to backend for repeated double-clicks

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-05-19 22:11:38 -07:00
mTvare
9236bfcec0
Transfer pasted layers to the viewport center when outside the current view area (#2306)
* Transfer pasted layers to viewport center when not in viewport

Fixes #2301

* Move a layer as a whole and use change

* Make a bbox and move content according to that

* partial fix

* Only move if none within viewport

* Fix import error

* Fix artboard

* tmp, skip ones being added to ab

* fix stuff

* fix formatting

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-05-20 01:16:06 +00:00
mTvare
6c1ccfb5bb
Fix regression causing last selected layer to not be deselected (#2656)
Fix last selected layer not being deselected because .take() was placed inside if block
2025-05-19 16:58:03 -07:00
Keavon Chambers
f624edb801 Fix running on the native target without the Linux Wayland platform 2025-05-19 14:24:10 -07:00
Keavon Chambers
e57637aab1
Make builds of the editor and the website serve their own local fonts (#2186)
* WIP

* Done?

* Install fonts in CI

* Use absolute path so minified inlined CSS works

* Fix Bezier-rs demo fonts?

* Use opsz

* Revert removal of text balancer

* Pull in the text balancer from our static host
2025-05-19 02:38:29 -07:00
seam0s
ea59f10b50
Fix editor crash due to mismanaged selected points on layers (#2640)
* Add hash sets to hold ignored points in SelectedLayerState

* Fix non selected anchor dragging

* Update selected points when ignoring handles or anchors

* Refactor selected points status logic

* Refactor ignore_handles and ignore_anchors bools to ShapeState

* Add back in ignore_anchors and ignore_handles in SelectedLayerState

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-05-18 21:09:58 +00:00
Dennis Kobert
7a2144e31e
Fix and reenable profiling CI action (#2632)
* Reenable profiling ci action

* Remove deprecated iai feature flag

* Remove unused import

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-05-18 20:31:15 +00:00
Priyanshu
ebf351277d
Refactor and fix append_bezpath() method on vector data (#2649)
* refactor 'append_bezpath' method.

* fix a bug.

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-05-18 13:15:13 -07:00
Sidharth-Singh10
2615d86934
Add PTZ support for flipping the canvas (#2394)
* feat: flip canvas

* move canvas_flipped from NavigationMessageHandler to PTZ

* fix artboard overlay flip

* Code review

* Improvements

---------

Co-authored-by: hypercube <0hypercube@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-05-18 06:16:00 +00:00
Keavon Chambers
a8e209e44c
Remove the old node macro and fix/clean up several raster nodes (#2650)
* 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
2025-05-17 21:24:32 -07:00
Keavon Chambers
77f8bfd9ed Improve clarify of type errors and tooltip diagnostics 2025-05-17 16:13:05 -07:00
0SlowPoke0
6e7f218068
Add Path tool support for Ctrl-dragging to pull out zero-length handles with angle locking (#2620)
* implement check-drag and angle-lock

* track bool

* flip-smooth-sharp

* fixed bugs

* fixed flip-smooth jump bug and random angle locking bug

* ctrl-alt 90 case

* aligned flip-smooth sharp and fixed arbitrary handle-length when flipped

* code-review change

* 0.5 instead of 0.8

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-05-17 13:23:11 -07:00
Priyanshu
54b4ef145c
Refactor the 'Scatter Points' node to use Kurbo instead of Bezier-rs (#2634)
* it works!

* clean up

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-05-13 06:26:43 +00:00
Keavon Chambers
5861e635fb Copy Poisson-disk algorithms from Bezier-rs into gcore vector algorithms 2025-05-12 22:34:37 -07:00
Keavon Chambers
d3b5dc5712
Clean up 'Image' node by removing old 'Cull' node in sub-network (#2643)
* Clean up 'Image' node by removing old 'Cull' node in sub-network

* Fix gamma correction on Decode Image node
2025-05-12 18:40:48 -07:00
Priyanshu
0022680336
Avoid memory allocation when precomputed segments lengths is provided. (#2637)
* 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
2025-05-11 08:21:41 -07:00
mTvare
c9984a8f1a
Make Select tool hover overlay in 'shallow select' mode visualize the next deeper object (#2639)
* Fix overlay behaviour on hovering over a layer

* Add the deepen overlay code

* cleanup
2025-05-11 07:53:38 -07:00
mTvare
4487020efb
Fix skew triangles showing up when transform cage isn't selected (#2638)
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-05-09 00:49:48 -07:00
Keavon Chambers
db34ac3f53 Refactor some vector nodes to use loops instead of one_instance, as a start to #1834 part 6 2025-05-08 23:56:10 -07:00
Keavon Chambers
a6ff221c1e Fix overlay clearing regression from #2521 with high-DPIs
Closes #2628
2025-05-08 16:48:49 -07:00
Priyanshu
916cca4a63
Fix a comment introduced in the previous commit (#2631)
fix comment
2025-05-06 10:03:31 +00:00
Priyanshu
1427fb93f9
Refactor the 'Sample Points' node to use Kurbo instead of Bezier-rs (#2629)
* 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>
2025-05-06 09:25:45 +00:00
kythyria
9ef9b205d9
Auto-generate enum type widget boilerplate for radio buttons and dropdown menus (#2589)
* 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>
2025-05-01 04:14:26 -07:00
mTvare
9303953cf8
Update #[min/max] node macro attributes to #[soft/hard]_[min/max] and make them clamp their input data (#2464)
* 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>
2025-04-30 23:52:27 -07:00
Sidharth-Singh10
2fc4896d01
Add tests for the Freehand tool (#2599)
* Add tests for freehand tool

* add test: line weight affects stroke width

* refactor
2025-04-30 19:53:59 +00:00
seam0s-dev
1a81e45673
Add the settings popover menu for the Overlays toggle (#2523)
* Added granular overlays control based on features

* Added basic support for pivot, path, anchors and handles overlay settings

* Added more overlay checks on anchors and handles

* Add new settings over measurements, hover and selection overlays

* Fix errors introduced while rebasing

* Disable anchors and handles functionality with their overlays, extended selection outline check

* Add check to enable/disable outlines on selected layers

* Toggle handles checkbox in sync with anchors checkbox

* Refactor overlays checks

* Remove debug statements

* Update select_tool.rs to resolve conflict

* Minor fix to reflect anchor checkbox state on the handles

* Minor fix to make anchors checkbox work

* Rearrange menu items, and code review

* Fix pivot dragging

* Add handles overlay check when drawing with pen tool

* Fix constrained dragging when transform cage is disabled

* Fix deselecting user selection when anchors are disabled

* Minor fix for disabling anchors

* Remove All from OverlaysType

* Remove debug statements

* Fix editor crash when selecting other layers with path tool and anchors disabled

* Minor fix on overlays check for all overlays

* Add proper code formatting

* Nits

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-30 04:15:46 -07:00
Adam Gerhant
1f7a9188ba
Improve the speed of SVG importing due to node positioning (#2625)
Fix slow svg import

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-30 03:38:09 -07:00
Mohamed Osama
0a65e570a9
Add snapping for a line's midpoint when it's being drawn (#2594)
* line midpoint snapper

* Add to snap option menu

* remove being_drawn_line_midpoint

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-30 05:12:04 +00:00
Priyanshu
d5cb380328
Refactor the 'Position on Path' and 'Tangent on Path' nodes to use the Kurbo API (#2611)
* 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>
2025-04-29 21:51:10 -07:00
Boyu Dai
12896a2407
Fix node deletion being too greedy (#2619)
fix too greedy node deletion search

Co-authored-by: CaligulaAlucard <caligulaalucard@localhost.localdomain>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-30 04:22:17 +00:00
mTvare
90be1f42c6
Fix 'Shallow Select' mode behavior for selection context transference (#2604)
* Fix ancestor always returning None during shallow select

* Fixes

* fix shift remove on both

* cleanup

* one more cleanup

* final(?) fix

* some cleanup

* more stuff

* make shallow the default

* fixes

* fix

* fix

* fix

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-30 03:24:48 +00:00
Calvin
23b2c5bdf2
New node: Blur (#2477)
* Implementation of gaussian blur and box blur with linear/nonlinear colorspace in raster category

* styling/formatting

* Partial code review

* remove image crate, use conversion functions from color.rs

* fix box blur checkmark, fix linear/gamma conversion

* mult/unmult alpha before/after blur

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-30 02:47:46 +00:00
Adesh Gupta
da38f672ae
Insert point on segment by clicking once (no more sliding) and Alt+click to delete a segment (#2495)
* segment overlay change

* Segment split and delete

* Cleanup

* graceful handling of edge cases

* Moved constants to conts.rs and tuned the threshold

* Remove going into another state

* Insert point mode cleanup

* Linting fix

* Code review

* Added hints

* Added field for delete segment

* Change controls and fix too far logic

* Fixes

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-30 01:03:24 +00:00
Mohamed Osama
478ace3349
Fix a layer's transform being reset when it's reordered within its same parent (#2624)
Fix layer transform reset when being reordered within the same group/parent
2025-04-29 15:48:08 -07:00
Keavon Chambers
80b8df8d42 FIx the 'Morph' node to not fail on topology changes like holes 2025-04-29 04:49:08 -07:00
Sidharth-Singh10
0c3cae2ba5
Add Spline tool tests for drawing within a transformed artboard (#2575)
* Add Spline tool tests for drawing within a transformed artboard

* Refactor spline tool test to use click_tool and add draw_spline helper method

* refactor asserting point positions

* Fix decimal fomat

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-25 14:01:48 +00:00
Keavon Chambers
d445bffe31 Add donation callouts in-app and on the site 2025-04-25 00:13:24 -07:00
Rahat
2dee47a6ee
Add Spline tool test for drawing with PTZ applied to the canvas view (#2573)
* Adding tests for spline PTZ

* Some refactoring

* Feedback applied from James

* Unnecessary changes

* refactor with current merged pr

* Code refactoring based on guidelines

* cli failing
2025-04-24 20:39:33 +01:00
Keavon Chambers
e60a9c36d8 Update the website roadmap 2025-04-24 06:11:37 -07:00
Keavon Chambers
471ef87801 Add reference point input to the Mirror node 2025-04-24 05:33:20 -07:00
0SlowPoke0
d39308c048
Add Path tool feature for angle locking upon pressing Ctrl while dragging handle over anchor (#2612)
* 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>
2025-04-23 20:39:14 -07:00