Commit Graph

1799 Commits

Author SHA1 Message Date
Keavon Chambers ddb0c8c249 Reorganize the menu bar and add additional commands to it 2025-03-01 13:44:28 -08:00
Dennis Kobert fd81d043a2
Fix wrong node parameter widgets, attempt 3 at #2323 (#2334)
* WIP, for TrueDoctor to continue

* Expose first implementation type as default type in field metadata

* Cleanup

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-03-01 13:26:21 -08:00
Keavon Chambers e41471c088 Fix wrong node parameter widgets, attempt 2 at #2323 2025-03-01 04:34:12 -08:00
Dennis Kobert 8d0c5d305d
Remove checks from append_subpath to improve vector editing performance (#2190)
Remove checks from append_subpath

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-03-01 11:45:49 +00:00
mTvare 1510ad820c
Add draggable skew triangles to the transform cage (#2300)
* Add triangle handles to transform cage for skew transform

Fixes #2299

* Add skew triangles

* Fix conflicts which github didn't show

* cargo fmt

* Fix needed

* remove unreachable

* use the trap and rect logic

* fix quad checks

* cursor fix; no triangles if already dragging and not skewing

* cargo fmt

* Resolve Clippy lints

* Add min length for triangle visibility

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-03-01 10:24:56 +00:00
Keavon Chambers bc6e76208d Fix bug introduced in #2276 causing number inputs to abort on any keyboard input, not just Esc 2025-03-01 01:28:27 -08:00
mTvare 37b4e3d410
Make it easier to resize short/narrow edges of the transform cage without corners taking precedence (#2320)
* Add threshold beyond which the corner point is valid

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

* Add missing delimeters

* Code review

* Widen the constant

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-03-01 08:39:47 +00:00
0SlowPoke0 1b59a9414a
Fix several minor Pen and Path tool bugs (#2327)
* code-todo-fixes

* small typo

* fixed bent_case when drawn from start point

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-03-01 08:14:29 +00:00
Adesh Gupta 3a7d1938b6
Make Ctrl+D duplication interleave each layer like Alt+drag duplication already does (#2328)
Fixed order of layers on Ctrl D

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-02-28 23:44:13 -08:00
Priyanshu 778f589918
Add a workaround to prevent nudge resizing from giving lines a NaN scale (#2331)
* fix nudging the transform of 0 scaled object to `Nan` value by avoid division by zero vec2

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

---------

Co-authored-by: indierusty <priyaayadav@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-03-01 07:18:01 +00:00
prathmesh703 17215ea66f
Add the Select Parent command (#2329)
* Select-Parent-Layer-Button

* check fail fixed

* check fail

* Add hotkey, fix top-level layers getting deselected, code review

---------

Co-authored-by: doxe-2611 <kolpe2611@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-03-01 03:43:24 +00:00
Adesh Gupta b6cdcba9e8
Fix duplicates not all being selected after Ctrl+D (#2324)
Fixed selecting all duplicates on Ctrl+D

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-02-27 22:29:26 -08:00
Oliver Davies effadcf6a6
Add feature for switching existing boolean ops to another type in the Select tool (#2322)
* Add feature for toggling an existing boolean to another type in Select tool

* Code simplifications and comments

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-02-28 05:39:21 +00:00
Adam Gerhant cbb535b6b5
Fix incorrect Properties panel widget types for proto nodes (#2323)
Fix incorrect property types for protonodes
2025-02-27 21:22:02 -08:00
Priyanshu c3b01605c4
Fix Spline tool so its merging endpoints with other layers happens immediately, not after canceling (#2319)
merge endpoints on point insert

Co-authored-by: indierusty <priyaayadav@gmail.com>
2025-02-27 02:53:55 -08:00
Keavon Chambers 390574d5c6 Limit the Sample to Points node's spacing value to prevent freezing when 0 2025-02-25 00:45:54 -08:00
Priyanshu 674db97dc4
Implement merging pairs of {paths, splines} with the Pen and Spline tools (#2292)
* refactor

* impl find_spline function

* impl merge_layers() to merge two spline layer to one spline layer

* impl merging spline to another spline which are not in the same layer

* impl merging of spline with path

* impl merge spline start endpoint and last endpoint

* fix naming

* fix handle transformation

* refactor

* fix merging with path with only one segment

* refactor

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-02-21 17:43:49 -08:00
Keavon Chambers fb13d58767 Declare the start of the Alpha 4 release series 2025-02-21 13:52:05 -08:00
Keavon Chambers 5115a05c5b Make grid-aligned node graph wires an experimental feature disabled by default 2025-02-21 13:27:30 -08:00
Keavon Chambers 2c88bee0ee Update some UI components to polish the frontend 2025-02-21 12:58:05 -08:00
mTvare 0004bbb14b
Fix transform cage bug where aborted resize/rotate after drag is used for next resize/rotate (#2308)
* Fix the said issues

* Replace numbers with consts

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-02-20 23:32:40 +00:00
Adesh Gupta cf2a071fb9
Make the Pen tool extend an endpoint by starting with a colinear, equidistant handle (#2295)
* Fixed Pen extension having collienar handles

* Reformat a little

* handles being colinear for GRS

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-02-20 13:42:10 +00:00
mTvare 38e542e6c0
Fix regressions introduced in #2282 with the compass rose feature (#2298)
* Fix mouse states and priority order of operation

* Add metadata for tampered transform

* Add comments explaining details

* Improve comments

* Move out of bounds checks into rotate check

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-02-20 03:04:41 -08:00
mTvare 90a8036c47
Fix self-chaining of transforms; fix compass rose getting offset when rotating a layer (#2296)
* Fix self-chaining of transforms and compass rose under single layer

https://discord.com/channels/731730685944922173/931942323644928040/1340632846863175702
https://discord.com/channels/731730685944922173/931942323644928040/1340608972071243906

* When not invertible transformation, do nothing

* Fix overlays and compass control when can't be visible

* Simplify selection logic in compass states

* Show compass only if it was possible that it could be seen before dragging

* Prevent resizing line objects

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-02-17 04:28:33 -08:00
0SlowPoke0 e444785301
Make the Pen tool use Ctrl to lock the angle of handles such that they maintain colinearity (#2284)
* pen tool feature and other minor fixes

* ctrl done,need to improve handle_modifications

* completes collinear and ctrl for all cases,need to refactor

* more bug fix need to refactor

* fixed minor issues and refactor done

* Code review

* minor bug fixes

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-02-16 23:41:55 -08:00
mTvare 687744d999
Improve grab/rotate/scale handling of pan/tilt/zoom (#2285)
* Fix P and G

* Fix (R, S) x (P, Z)

* Fix (G, Z)

* Fix R overlays

* Fix S overlays

* Fix (G, T)

* Fix last 2 fixes

* Fix mouse issues

* Cleanup

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-02-16 10:58:58 +00:00
Adesh Gupta 4fe3462af5
Fixed minor issues related to frontier selection visibility in the Pen/Path tools (#2291)
* Fixed issues

* Get back selection when abort

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-02-15 01:23:48 -08:00
Adam Gerhant 419a95e73b
Fix unresolved types in graph wires when repeatedly undoing and redoing (#2283)
fix unresolved types when repeatedly undoing and redoing
2025-02-15 06:47:48 +00:00
mTvare 70b4beab49
Add the compass rose translation gizmo to the transform cage (#2277)
* Rotate pivot and squares to orient along quad

* Add compass rose UI

* Add compass rose functionality

* Refactor code and polish things

* Fix UI

* Fix crash

* More polish

* Rework arrow to use different selection method

* Adjust for rotated layer and show when within cage

* Don't show when other modes are possible

* Fix glitchy compass

* fixes

* fixes

* WIP separate pivot and compass rose (not compiling)

* Complete file moving fixes

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-02-14 22:29:32 -08:00
Sidharth-Singh10 e44c460cf8
Implement initial infrastructure for the Spline tool to join itself with other splines and paths (#2269)
* merge 2 spline layers

* merge path layers with spline_tool

* merge path and spline path with spline_tool

* handle line layers

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-02-13 02:43:00 -08:00
Nitish Itankar 26fa8d967e
Add the style of right-angle grid-aligned wires in the graph (#2182)
* Verticle and horizontal lines achieved(#2170)

* vertical lines alligned with grid dots

* fixed vertical lines positioning

* Deals with cases 5 and 6

* Fixed case 5 and other problematic zones

* edge cases solved

* edge cases fixed: HorizontalOut & HorizontalIn

* added comments

* Changed midX and midY

* Clean up if/else statements

* Consolidate code

* Consolidate further

* Add preference for wire style

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-02-13 07:58:43 +00:00
Priyanshu 2d90bb0cbf
Add upgrade script to convert "Spline" node to "Path" -> "Spline from Points" (#2274)
* write document upgrade code to transfrom Spline node into Path -> Spline from Points

* fix only connecting to single output

* shift position of newly inserted Path -> Spline from Points node

* refactor

* remove all old Spline node code

* rename Spline from Points node to Spline

* Code cleanup

* Update the demo art to natively use the new Spline node

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-02-12 23:45:30 +00:00
Nitish Choudhary 95bbc95606
Fix scale transform being applied when drawing shapes while zoomed in (#2286)
* Nothing works a.k.a. init commit

* Everything works a.k.a. final commit

* Minor change

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-02-12 13:06:15 -08:00
Keavon Chambers 7bbbf7fa7c Add icons and tooltips for the previous commit's feature 2025-02-12 01:54:30 -08:00
Adesh Gupta 20a5f71bda
Add Pen and Path tool modes to avoid showing all handles (#2264)
* Path tool only show frontier overlays

* Implemented all modes for pen and path tool

* Fixed formatting issue

* Changes in selection behaviour of handles

* Selection toggle only on drag not click

* Changed comment

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-02-12 01:30:15 -08:00
Keavon Chambers 1700c3a650 Update website with improved student project details 2025-02-11 17:18:57 -08:00
James Lindsay f410efb8a8
Fix crash when ungrouping a direct child of the root in debug mode (#2241)
Fix crash when ungrouping a child of the root in debug mode
2025-02-11 10:45:08 +00:00
Tarun Prabhu bf3b05070c
Add a "Reverse" command to the "Order" menu (#2273)
* addded reverse for layer ordering

* added reverse to layer odering

* fixed indentation and spacing

* added reverse for layer ordering

* Added Reverse to layer ordering

* Update document_message_handler.rs

* Update document_message_handler.rs

* Cleanup, fix compiling, fix history bug

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-02-11 09:36:56 +00:00
Keavon Chambers ec8c8d6485
Polish and add aborting to several input widgets: no Esc closing parent menus; color picker axis align; repeat on arrow buttons (#2276)
* Remove color input outline; reduce antialiasing compositing artifacts in color widgets

* Rename ColorButton to ColorInput

* Add features and aborting to several other widgets

- Prevent Esc from closing parent floating menus when aborting
- Fix missing icon regression
- Gutter resizing abort
- Color picker aborts, Shift axis alignment, improve click/drag behavior for gradient spectrum
- Scrollbar abort, repeat when held, fix directional arrows when viewport is zoomed
- Number input abort, repeat when held

* Move ColorInput into the inputs folder

* Fix tiny logo
2025-02-10 05:46:41 -08:00
Keavon Chambers 0037f5158c Add new icons to all menu bar entries 2025-02-07 19:08:06 -08:00
Keavon Chambers 0ec91bfe01 Add pin and cut icons; improve menu bar shortcut labels to choose shortest 2025-02-05 18:30:10 -08:00
Keavon Chambers f13efd2d06 Standardize increment snapping to use the Shift key 2025-02-05 03:23:47 -08:00
mTvare 4de65c292a
Further polishing of G/R/S visualization and features (#2243)
* Further polishing of G/R/S visualisation and features

Followup to #2229.

* Begin typing only if constrained or not in G

* Prevent adding empty group in R mode. Order fn alphabetically as was before

* Always show typing hints unless can't begin typing

* Fix one frame bug

* Add cancel and confirm groups for GRS hints

* Fix inconsistency in call increments, snaps

* Use top/bottom left/right methods with quads where more readable

* Fix inconsistent use of narrow/flat

* Add hints to transform cage

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

* Rename some hints

* Fix scale radial behaviour, grab constraints and local edge orientation

* Fix not being able to remove the whole selection with delete modifier

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

* Fix compiling

* Fix crash when single point bbox

Fixes #2267

* Fix the same crash in scale and use better name for bbox

* cargo fmt

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-02-05 02:57:47 -08:00
Nitish Choudhary da752e5324
Make primitive shape tools no longer draw transformed unit shapes (#2236)
* Line tool pt.1

* Line tool complete

* Fix hints

* Rectangle tool

* Fix bad naming

* Ellipse tool but cant get id

* Fix line tool

* Polygon tool

* Revert unrequested Line tool keybind change; code review cleanup

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-02-05 02:25:07 -08:00
prathmesh703 0865605f74
Fix some number input widgets becoming selected after dragging left/right in Firefox (#2250)
* fixes drag

* Cleanup

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-02-05 07:44:58 +00:00
Sidharth-Singh10 b60af758a9
Make joining path endpoints across layers work to merge the two layers (#2245)
* move merge_layers function to graph_modification_utils

* merge_layer before segment insertion

* Tidying up

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-02-05 07:25:54 +00:00
Adesh Gupta 12cd0c33a3
Fix copied/duplicated selected layers getting misordered (#2257)
* fixed duplicates ordering issues on alt drag

* Maintain order while copying

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-02-05 06:59:11 +00:00
James Lindsay 1f836cd2a1
Add support for skewing the transform cage by Ctrl-dragging its edges (#2251)
* Skew select bounds with ctrl

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-02-05 06:11:59 +00:00
Priyanshu 99a141c2e1
Fix shallow select mode not allowing a Ctrl-click select deepest if the target's ancestor is already selected (#2247)
* Fix deepselect with control key not working when shallow select mode set.

* refactor

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-02-04 21:39:40 -08:00
Utsav Singh 0f03762cff
Make the Select tool avoid updating hints just when clicking but not dragging (#2248)
* make Fsm update_hints function borrow tool_data and update individual tool implementations accordingly, use tool_data in select_tool update_hints function as well as add a UpdateHints response when the pointer moves after the change from  DragStart to Dragging state

* Also add for selection box drawing

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-02-05 04:45:57 +00:00