Commit Graph

1727 Commits

Author SHA1 Message Date
James Lindsay 26d66298cf
Give the current snapping target layer(s) an outline (#2224)
* Outline layer when snapping

* Outline layers when snapping to anchors
2025-01-25 13:00:01 -08:00
Keavon Chambers eada1eba54 Update content on the website hoe page, roadmap, and donate page 2025-01-25 04:29:40 -08:00
Priyanshu f7b7f6b9f4
Implement extending, joining, and creating new subpaths with the Spline tool (#2203)
* visualize spline end points using overlays

* implement for spline tool to extend path by draging end points

* allow holding Shift to begin drawing a new spline subpath in the same layer

* implement spline tool to join two endpoints

* fix naming

* refactor spline tool

* impl spline tool snapping and overlays

* fix joining path and refactor

* improve join_path comment

* fix snapping overlays flickering by ignoring snapping in current layer

* fix inserting single point on aborting spline tool

* add snapping for endpoint even when regular snapping is disabled

* fix extending

* fix inserting new point instead of extending and Add hint for Shift to append

* fix grammatical errors and code style

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-01-25 11:24:08 +00:00
Andy Day 33ac141fb8
Fix blurry overlay rendering when the pixel display ratio isn't 100% (#2204)
* support hi dpi overlay rendering

* Code review and make scaling ratio dynamic

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-01-25 09:37:49 +00:00
mTvare 9954e49530
Make the document auto-save system initially restore the last-viewed tab before loading the rest (#2194)
* Fixes last tab being opened instead of last active tab

Fixes https://discord.com/channels/731730685944922173/881073965047636018/937518022548131891

* Defers node initialisation to SelectDocument message instead of load_document

* Fix warning regarding attempt to load closed document

* Defer loading resources and running nodes to selection time

* Make last active tab load before others

* Load last active saved document instead of last autosaved doc

* Fix failing tests

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-01-25 06:41:47 +00:00
mTvare de36d4967d
Add visualization overlays to G/R/S (#2195)
* Make HintInfo label use Cow<'static, str> instead of String

Fixes https://discord.com/channels/731730685944922173/881073965047636018/931942323644928040

tmp, will amend later

* Replaces dynamic hint used by transform layer with overlays

* Adds a scaling factor accounting for document and viewport scales

Also moves whole code to single unit

* Make overlays relative to viewport rather than document

* Add visualization overlays to G/R/S in the Select tool

* Prevents quick measurements from showing up when resizing bounds

Fixes https://discord.com/channels/731730685944922173/881073965047636018/1328282633456713762

* Add local axes which activates on double constraints.

* Handle the bounding box of a collection of layers as select tool does

* Replaced hard coded transparent color and removed debug! which slipped in

* Make rotation axes start along local axis

* Fix typed distance being in doc space and negatives

* Fix missing undo transactions for some actions

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-01-24 23:31:55 +00:00
Sidharth-Singh10 3048466e86
Remove errant line following cursor in snap overlays during constrained line drawing (#2206)
* fix(line-tool): disable snap overlays during constrained drawing

* Update editor/src/messages/tool/tool_messages/line_tool.rs

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-01-24 14:10:01 -08:00
Ayush Chauhan 6effb2d6e6
In Path tool when dragging a handle, make Alt recover the opposing handle if it's not cubic rather than zero-length (#2196)
* follow up for PR #2160

* now `alt` restores zero-length handles

* Update editor/src/messages/tool/tool_messages/path_tool.rs

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-01-24 08:49:43 +00:00
mTvare 37db9b1392
Retain transforms of layers when transferred between transformed groups (#2212)
* Retain position of layers when transfered between artboards.

Fixes #861

* Apply same fixes to grouped layers
2025-01-23 13:22:41 -08:00
Keavon Chambers 8505ed3f10
Improve older document upgrading compatibility and make node type errors clearer (#2201)
* Improve older document upgrading compatibility and make node type errors clearer

Misc.

* Fixes

* Avoid unwrap
2025-01-21 01:40:43 -08:00
Adam Gerhant eec0ef761c
Polish user-created subgraph nodes: imports in the Properties panel; reorder/delete/rename imports/exports (#2105)
* Remove imports/exports

* WIP: Autogenerated properties

* WIP: Input based properties

* WIP: Hashmap based input overrides

* Migrate noise pattern node to input properties

* Reorder exports

* Continue migrating properties

* WIP: Improve reorder exports

* Automatically populate all input properties for sub networks

* Complete reorder import and export

* Add widget override to node macro

* Migrate assign colors to input based properties

* WIP: Full node property override

* Node based properties override for proto nodes

* Migrate all node properties to be input based

* Rename imports/exports

* improve UI

* Protonode input valid implementations

* Valid type list

* Small formatting fixes

* Polishing small issues

* Document upgrade

* fix tests

* Upgrade noise pattern node

* remove console log

* Fix upgrade script for Noise Pattern

* Improve the Properties panel representation for graphical data

* Re-export demo art

* Code review

* code review improvements

* Cleanup for node properties overrides

* Reexport demo art

* Fix clippy lints

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-01-20 21:13:14 -08:00
mTvare ad68b1e5c8
Restore Pen tool undo/redo and fix incorrect triggering of undo when changing tools (#2193)
Fixes ghost anchors, and allows undo in pentool

Fixes https://discord.com/channels/731730685944922173/881073965047636018/1267365764231598186.
Fixes https://discord.com/channels/731730685944922173/881073965047636018/1327376421034922045.
Fixes #2152.

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-01-18 23:46:28 -08:00
Keavon Chambers 9a25555732 Add marbled mandelbrot as unpublished demo art 2025-01-18 20:00:06 -08:00
Keavon Chambers b36521e588 Improve readability of the donation page 2025-01-18 01:29:01 -08:00
Keavon Chambers ab724d8b00 Add the 2024 yearly report to the blog 2025-01-17 16:03:43 -08:00
Keavon Chambers b7907bc96f Add Stipe donations to the website and polish other pages 2025-01-17 15:21:57 -08:00
0SlowPoke0 5aedda0ce8
Add handle visualization during point insertion in the Path tool (#2197)
* added_handle_overlays

* changed color to yellow

* Rename color parameter

* Change the color to blue

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-01-15 10:39:41 +00:00
Priyanshu 0a496ee452
Change Spline tool behavior to use Path and Spline from Points nodes instead of legacy Spline node (#2200)
* use Path and Splines from Points node to build spline replacing Spline node

* fix point being added on drag start event in spline tool
2025-01-15 01:38:21 -08:00
0SlowPoke0 2e4fb95dea
Add Path tool support for G/R/S rotation and scaling with a single selected handle (#2180)
* grab_scale_path and backspace for pen

* minor improvements and fixes

* code-review changes

* Avoid more nesting, and other code cleanup

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-01-15 08:37:02 +00:00
Keavon Chambers 9ad6c31483
Remove blob URL dead code and clean up more frontend code (#2199) 2025-01-14 13:08:47 -08:00
Keavon Chambers 1e62af88cd Remove trailing zeros in rendered SVG path output 2025-01-13 02:56:33 -08:00
mTvare 8dfdc2b98f
Update the bounding box snapping modes to use Align with Edges for edges and alignment (#2185)
* Fix snapping to respect rotation of bounding box

Fixes snapping behaviour which defaulted to X and Y axes.

* Remove redundant align along edges

* Code review

* Update manual

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-01-13 10:53:32 +00:00
mTvare d692538736
Make the Text tool delete empty text layers when clicking away wth LMB (#2192)
Fix additions of layers when using left click

Fixes: https://discord.com/channels/731730685944922173/881073965047636018/1327376421034922045
2025-01-12 18:17:44 -08:00
Keavon Chambers 3582126ded Remove the Pen tool's anchor square under the cursor when drawing a not-yet-placed segment 2025-01-10 13:12:51 -08:00
Priyanshu bf6ffbddeb Bezier-rs: Add method to check subpath insideness (#2183)
* add function to calculate if a subpath is inside polygon

* make is_subpath_inside_polygon() flexible

* obtimize is_subpath_inside_polygon function

* move is_inside_subpath function to Subpath struct method

* add interactive demo for subpath insideness

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-01-10 00:37:40 -08:00
Keavon Chambers 51d1c4eeac Fix drawing new layers not being put next to nested selected layers
A regression introduced in #2110
2025-01-09 20:37:49 -08:00
Keavon Chambers 07601a5c6c Improve snapping with better snap target names, tooltips, cleaner overlay labels, code cleanup 2025-01-09 19:03:14 -08:00
Keavon Chambers ae2637e08e More website loading speed and code improvements 2025-01-08 20:49:42 -08:00
Keavon Chambers 68e6bec9b5 Reduce website loading times and related code cleanup 2025-01-08 18:29:54 -08:00
Keavon Chambers 93a60daa24 Comprehensively update user manual and contributor guide, add Adam to core team 2025-01-08 03:52:11 -08:00
Keavon Chambers 9eb544df74 Rename "options/top bar" terminology to "control bar" and update comments 2025-01-07 17:33:45 -08:00
Keavon Chambers 1c880daea2 Fix isometric dotted grid and avoid antialiasing on dashed line overlays 2025-01-07 17:27:35 -08:00
Nitish Choudhary 66357540bb
Add max width/height to text layers and draggable text boxes to the Text tool (#2118)
* Make progress in text tool

* Add line_width to gcore and gstd

* minor fix

* Dragging sets line_width correctly

* Get draw overlay to work

* Typo fix

* Make progress in text tool

* Add line_width to gcore and gstd

* minor fix

* Dragging sets line_width correctly

* Get draw overlay to work

* Typo fix

* Improve text bounding box

* Add toggle for editing line width

* Take absolute value of drag

* Fix optional properties

* Code review

* Attempt to add box height and abort with keys

* Attempt to add key modifiers and snap manager

* Use resize for improved dragging

* Refactor typesetting configuration into a struct

* Fix missing px unit in frontend

* Remove lines on rendered text

* Fix backwards compatibility

* Refactor lenient slection as an associate function in tool data

* Add dashed quad to text nodes

* Use correct names for max height and width

* Additional renames and reorder

* ReResolve conflict

* Code review and improvements

---------

Co-authored-by: hypercube <0hypercube@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-12-31 20:50:47 -08:00
Sidharth-Singh10 f225756655
Fix text layer getting deselected after clicking out of Text tool interactive editing (#2144)
* properties panel remains active when user edits text layer

* Keep text layers selected after editing

* Update editor/src/messages/portfolio/document/document_message_handler.rs

* Delete Empty Text Layer on Escape or Right Click

* Fix: delete empty text layer on right click

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-12-31 14:28:56 -08:00
Ayush Chauhan 39a7b76ade
Add snap and lock angle modifiers for handle dragging to the Path tool (#2160)
* added snap and lock angle to path tool

* fixed breakage of `tab` and `space` functionality
- Previous implementation broke functionality of using Tab to swap the being-dragged handle to its opposing handle, Now fixed.
- Previous implementation broke functionality of using space to drag the manipulator group (anchor + handles) while dragging a handle, Now fixed.

* fixed the angle snapping and locking when used together
Now, if `shift` is used to snap to a 15° increment, then `ctrl` is used to preserve the angle, releasing the `shift` key will still preserve the angle.

* Fix snapping angle logic

* Improve transforms

* added functionality for `alt` key
Now, temporarily converts selected handles to colinear if they are not already colinear.

* Revert "added functionality for `alt` key"

This reverts commit f12ba6fdbf261291ced0e042a2dfe12cddd2f9e8.

* Code review

---------

Co-authored-by: hypercube <0hypercube@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-12-31 19:48:14 +00:00
Pratik Agrawal 606be8a74b
Make the Artboard tool shift its contents if resizing from the top/left so artwork is stationary (#2166)
* added fetch child layerfunction

* Simplify

---------

Co-authored-by: Pratik Agrawal <patrik@Pratiks-MacBook-Air.local>
Co-authored-by: hypercube <0hypercube@gmail.com>
2024-12-31 18:52:05 +00:00
Keavon Chambers 54926d5474 We reached 10k stars on GitHub! 2024-12-31 10:14:33 -08:00
Keavon Chambers 740fcb73cc Remove the hexagon shape from the above-the-fold part of the website homepage 2024-12-30 20:26:05 -08:00
Keavon Chambers ce0cd39c9b
Update the readme 2024-12-30 03:17:39 -08:00
Nitish Choudhary 2293da7d98
Improve Text tool click targets on text layers to use the text box (#2145)
* Fix text selection

* Remove old implementation

* minor change

* Use inbuilt function instead of helper

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-12-28 22:11:27 +00:00
Dennis Kobert 1639a2afba
Parse doc comments on node parameters (#2163)
Parse doc comments from node arguments

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-12-28 12:15:49 +00:00
0SlowPoke0 6c3c2e8529
Add selection removal to the Select tool's box select (Ctrl+Shift modifier) (#2162)
* select parent-node,remove deselect all layers message

* Comment nits

* implement negative selection box

* moved comment and formatting

* Apply suggestions from code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-12-28 11:43:29 +00:00
Utsav Singh 6d737f15ee
Improve quick measurement overlays with better number alignment and decimal rounding (#2155)
* Tidy up number text alignment and decimal precision for quick measurement overlays

* Tidy up number text alignment and decimal precision for quick measurement overlays

* Tidy up number text alignment and decimal precision for quick measurement overlays

* Tidy up number text alignment and decimal precision for quick measurement overlays

* Tidy up number text alignment and decimal precision for quick measurement overlays

* Tidy up number text alignment and decimal precision for quick measurement overlays

* Tidy up number text alignment and decimal precision for quick measurement overlays

* Tidy up number text alignment and decimal precision for quick measurement overlays

* Formatting changes

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-12-28 00:45:26 -08:00
Keavon Chambers b81f48385a Fix several bugged vector-related nodes 2024-12-26 16:36:45 -08:00
Keavon Chambers feba87449b Add more actions to the Layer menu bar entries 2024-12-26 16:31:13 -08:00
0SlowPoke0 a6676e4abd
Fix Select tool's box selection not being able to extend a selection with shift (#2157)
* select parent-node,remove deselect all layers message

* Comment nits

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-12-24 23:10:43 -08:00
0SlowPoke0 77936c44b0
Make Path tool deselect all points on single-click, and select all on double-click, of shape's fill (#2148)
* Implement deselect on single-click and select all anchors on double-click

* fixed the single_click_behaviour

* fix flipSmoothSharp when doubleclick and drag

* Cleanup and Clippy fixes

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-12-22 21:59:59 -08:00
Utsav Singh a1dc9556af
Improve quick measurement overlays across all possible arrangement scenarios (#2147)
* setup single edge crossing handling for quick measure tool

* Setup quick measure functionality for intersecting objects and handle centerline cases for non intersecting objects.

* setup single edge crossing handling for quick measure tool

* Setup quick measure functionality for intersecting objects and handle centerline cases for non intersecting objects.

* Setup quick measure functionality for intersecting objects and handle centerline cases for non intersecting objects.

* Setup quick measure functionality for intersecting objects and handle centerline cases for non intersecting objects.

* Setup quick measure functionality for intersecting objects and handle centerline cases for non intersecting objects. Add a dashed_line_with_pattern function that gives more granular control over dash_width and gap_width.

* Setup quick measure functionality for intersecting objects and handle centerline cases for non intersecting objects. Add a dashed_line_with_pattern function that gives more granular control over dash_width and gap_width.

* Setup quick measure functionality for intersecting objects and handle centerline cases for non intersecting objects. Add a dashed_line_with_pattern function that gives more granular control over dash_width and gap_width.

* Setup quick measure functionality for intersecting objects and handle centerline cases for non intersecting objects. Add a dashed_line_with_pattern function that gives more granular control over dash_width and gap_width.

* Nit picks

* Define wrapper for Overlay_context line method

* Comments and consolidating lines of code

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-12-22 19:20:03 -08:00
Utsav Singh bc47d06139
Fix transform cage rotation abort causing broken state upon next transformation (#2149)
Fix abort functionality on Right Click when performing transformations using select tool
2024-12-22 01:54:30 -08:00
James Ryans 3be7505faf
Automatically place layers into the artboard they're drawn inside of (#2110)
* place new layer from basic tools within an artboard bounds

Signed-off-by: James Ryans <james.ryans2012@gmail.com>

* add for Text Tool

Signed-off-by: James Ryans <james.ryans2012@gmail.com>

* use click_xray function

Signed-off-by: James Ryans <james.ryans2012@gmail.com>

* support for freehand tool

Signed-off-by: James Ryans <james.ryans2012@gmail.com>

* support spline tool

Signed-off-by: James Ryans <james.ryans2012@gmail.com>

---------

Signed-off-by: James Ryans <james.ryans2012@gmail.com>
2024-12-20 19:02:00 -08:00