Commit graph

1862 commits

Author SHA1 Message Date
Keavon Chambers
d7a271f675 Update the website roadmap and other details 2024-11-20 10:31:25 -08:00
Sidharth-Singh10
3b503ccde2
Bezier-rs: Make rectangle constructor produce linear segments (#2109)
* fix(bezier-rs): new_rect constructor create linear segments

* refactor
2024-11-18 21:10:08 +00:00
Keavon Chambers
99cf8f0c4f Clean up editor preferences dialog 2024-11-15 18:47:50 -08:00
Adam Gerhant
4250f291ab
Add merging nodes into a subgraph with Ctrl+M and basic subgraph signature customization (#2097)
* Merge nodes

* Fix bugs/crashes

* WIP: Debugging

* Fix bugs, add button

* Add imports/exports

* Improve button

* Fix breadcrumbs

* Fix lints and change shortcut key

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-11-12 14:27:42 -08:00
Keavon Chambers
4c4d559d97 Fix crash when upgrading a document with a Modulo node from 3 commits ago 2024-11-12 13:55:03 -08:00
James Ryans
ee2d4a03db
Make Pen tool always snap to endpoint anchors, even when snapping is off (#2107)
* pen should always snap on last anchor

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

* snap anchor on every single connected points

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

---------

Signed-off-by: James Ryans <james.ryans2012@gmail.com>
2024-11-12 13:53:55 -08:00
James Lindsay
3ce1317053
Make the Pen tool only append new paths when Shift is held (#2102)
* Append to a path with shift

* Fixup transforms

* Revert unnecessary transform change

* Fix delete node button transaction

* Prevent artboard from being selected after making a new document

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-11-11 15:14:32 -08:00
Keavon Chambers
d649052255 Upgrade and document the math operation nodes 2024-11-09 23:23:25 -08:00
Keavon Chambers
de366f9514 Add Brush tool warning; move font list loading to document creation time 2024-11-09 12:27:09 -08:00
Keavon Chambers
457619794b
Improve nudging when tilted and add Artboard tool nudge resizing; disable menu bar entries when no layer is selected (#2098)
* Make nudging follow a tilted viewport

* Add artboard nudge resizing
2024-11-08 16:16:20 -08:00
James Lindsay
320d030c08
Fix the spline node algorithm to be continuous across start/end points (#2092)
* Simplify spline node implementation using stroke_bezier_paths

* Improve closed splines

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-11-07 00:46:45 -08:00
James Lindsay
c3b526a46f
Fix Bevel node crash with zero-length segments (#2096)
Fix bevel with zero length segment
2024-11-07 00:08:09 -08:00
November-6
b3a196c0b6
Fix point nudging to work in document space (#2095)
* Modified Path tool Behaviour

* Make the code simpler and more self-descriptive

* Make it work for transformed layers

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-11-05 22:27:31 -08:00
Keavon Chambers
f1b0d8fa87
Improve the node graph with revamped top bar and disabling tools when graph is open (#2093)
* Add "Fade Artwork" slider and disable tools when graph is open

* Add navigation and layer/node management buttons to graph top bar

* Reduce code duplication
2024-11-04 20:41:53 +00:00
Keavon Chambers
12ca06035c Hide the left border notch in layers when a wire isn't entering from the layer's left 2024-11-03 15:33:29 -08:00
Dennis Kobert
35f7cfac80
Parse description from node doc comments (#2089)
* Parse description from node doc comments

* Add node description tooltips

* Code review

---------

Co-authored-by: Adam G <adamgerhant@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-11-03 14:57:20 -08:00
Elbert Ronnie
8fdecaa487
Rename Raw-rs to Rawkit (#2088)
* Rename within files

* Rename in CI

* Rename the folder and file names

* Rename raw_rs to rawkit

* Add example to README

* Add initial documentation

* Small API changes and extra documentation

* Bump versions and stuff

* Readme improvements

* Merge proc-macro crates into one

* Add README to rawkit-proc-macros

* Remove keywords and categories

* Add licenses to rawkit-proc-macros

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-11-03 08:10:39 +00:00
Keavon Chambers
8d3da83606 Avoid sometimes breaking the selected layer upon switching away from the Select tool 2024-11-02 18:55:57 -07:00
Keavon Chambers
7d86bf4abf New node: Jitter Points 2024-11-02 16:37:27 -07:00
Keavon Chambers
4c9ab2d50b
New nodes: "Clamp", "To U32", and "To U64" (#2087)
* New nodes: "Clamp", "To U32", and "To U64"

* Add name
2024-11-02 03:20:02 -07:00
Keavon Chambers
3f17e83e80
Improve Sample Points, Scatter Points, and Splines from Points to include segments and work with subpaths (#2085) 2024-11-01 12:44:05 -07:00
adamgerhant
c7b08246c2
Allow the Pen tool to connect layers by their endpoints, merging into a single layer (#2076)
* Merge vector data layers

* Fix early return

* Fix layer space multiplication error

* Recalculate positions when changing layer space

* Add transform node

* Remove pen tool layer state
2024-11-01 12:19:46 -07:00
Daragh
018e9839f8
Add Path tool support for the Tab key swapping to dragging the opposite handle (#2058)
* feat: tab alternates between handles

* fix: handle hints, remove anchor to handle switch
Added specific handle hints,
Can no longer switch to handle if just anchor is selected
typo fix

* fix: no longer deselect on esc/rclick

* feat: hides cursor when switching
A pointerlock implementation would be ideal in the future to keep the screen from panning,

* fix: tidy up dynamic tool hints
switch colinear to V

* fix: can no longer hide cursor if anchor selected
remove debug statement

* fix: clippy

* Solve some issues and remap V to C to toggle colinear

* Cleanup + change equidistant key from Shift to Alt

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-10-30 02:48:20 -07:00
Elbert Ronnie
b7ba2c3637
Raw-rs: Remove fortuples dependency (#2082)
Remove fortuples from Raw-rs
2024-10-28 16:23:22 +00:00
Keavon Chambers
4df780391c Fix Bezier-rs web demos failing to run wasm-opt in CI 2024-10-27 15:06:22 -07:00
James Lindsay
9eeefaad90
Fix NumberInput widget not being reactive to changes to the unit (#2080)
Svelte watch unit
2024-10-26 20:40:35 +00:00
James Lindsay
c27d8dc5dc
Fix layer name text input (#2081) 2024-10-26 13:25:51 -07:00
adamgerhant
ff8fec6eca
Allow the Path tool to edit an upstream path even if there's a type conversion midway (#2055)
Remove type check when iterating upstream

Convert to doc comment
2024-10-26 18:39:48 +00:00
Daragh
b1399af5cd
In the Path tool, make Space shift the anchor while dragging handles (#2065)
* in progress:

* cherry-pick

* works kinda, fails when holding down space

* seems to be working

* naming

* fix :clippy

* fix: put back in newline

* fix: add overlay draw message

will now visibly select points when pressing space instantly as opposed
to when its moved

* cleanup + rename

* refactor to use refresh keys

* fix: naming

* add back in todo

* :)

* fix: Small bugs relating to space handle selection

If release mouse before space, reselect previous points and unselects points
selected by space.
If only anchor is selected it will not select handles.
Removed comment as its now clear what its doing / where its coming from
2024-10-26 09:20:08 +00:00
James Lindsay
5aa6716910
Add a node insertion button and layer renaming from the Properties panel (#2072)
* Add node button

* Improve css a bit

* Add layer renaming to the Properties panel and move New Layer to that, plus add unpinning to properties sections

* Add tooltip

* Re-add layer itself in listing

* Final code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-10-25 23:58:34 -07:00
Mohamed Osama
3c839ffd2b
Clean up old usages of NodeId(generate_uuid()) by replacing it with NodeId::new() (#2009)
Replace all `NodeId(generate_uuid())` with `NodeId::new()`
2024-10-25 19:43:46 -07:00
James Lindsay
dae6b2f239
New node: Bevel (#2067)
* Bevel node

* Fix clippy lints

* Prevent negative values

* Rename flipped() -> reversed()

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-10-25 19:25:41 -07:00
RyanRothweiler
63d44f22e3
Fix Text tool clearing text when hitting Escape by changing it to commit the edit instead (#2052)
* Text tool escape sends commit message

* Improve hint text

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-10-25 18:12:54 -07:00
James Lindsay
79408fc0cc
Fix alignment snapping not preserving aspect ratio when Shift is held (#2062)
Fix align with a diagonal constraint
2024-10-25 17:34:23 -07:00
James Lindsay
7fc0a593c8
Fix gradient render transforms with Vello (#2059)
Fix vello gradient transform
2024-10-26 00:12:24 +00:00
adamgerhant
fd20d51e85
Fix various crashes and bugs (#2075)
* Fix offset brush tool

* Fixes
2024-10-25 16:54:37 -07:00
Dennis Kobert
3e0178a032
Add switch node and fix log to console node (#2064)
* Add switch node and fix log to console node

* Formatting

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-10-25 16:30:02 -07:00
adamgerhant
6b1356fe13
Allow multiple top output wires to come from layers (#2049)
* Allow multiple outputs from layer

* Stable Ids for Flatten Vector Elements

* Clippy
2024-10-25 22:32:31 +00:00
Elbert Ronnie
9d13a8f73b
Raw-rs: Remove from workspace (#2066)
* Remove raw-rs from workspace

* Add feature blocking to reqwest

* Use release build to run the tests

* Split Raw-rs CI into a seperate workflow

* Fix cargo-deny check for Raw-rs

* Only run the CI if Raw-rs changes

* Enable clippy check for Raw-rs

* Add newline in clippy check

* Fixups

* Use ubuntu-latest

* Remove mold

* Install sccache

* Attempt 2

* Attempt 3

* Add emoji for consistency

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-10-25 14:44:45 -07:00
Elbert Ronnie
36fe9bf31b
Raw-rs: Fix naming convention of matrices (#2071)
Fix naming convention of matrices
2024-10-25 19:09:07 +00:00
Elbert Ronnie
442937c13f
Raw-rs: Refactor to run multiple steps in a single loop (#1972)
* Prevent extra allocation in convert to RGB step

* Run preprocessing steps in a single loop

* Create new API to call steps in pipeline

* Include transform and gamma correction step

* cargo fmt

* Split scale colors into two steps

* Code relocations

* cargo fmt

* Implement transform traits for all tuples

* Replace Captures trick with the new `use` keyword
2024-10-25 11:52:35 -07:00
Keavon Chambers
a395fbf063 Fix/suppress new Clippy warnings introduced in Rust 1.82 2024-10-25 11:14:51 -07:00
James Lindsay
c3a3c4c907
Allow the Fill and Stroke nodes to work on groups (#2046)
* Add the apply style trait for generalised application of styles

* Fix Clippy warn

* Use existing trait

* Remove unnecessary lifetimes

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-10-16 16:06:53 -07:00
James Lindsay
9f7b3936f4
Fix brush tool broken by #2011 (#2045)
Brush tool fix
2024-10-16 20:04:33 +00:00
Keavon Chambers
f892687576 Update the screenshots on the website home page carousel 2024-10-15 22:32:07 -07:00
James Lindsay
47a5cc5535 Blog post: Graphite progress report (Q3 2024) (#2013)
* Q3 blog

* WIP

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-10-15 15:45:08 -07:00
adamgerhant
e09f5ecaec
Make Copy to Points and (Circular) Repeat and nodes output group data, and add flattening nodes (#2011)
* Output group from repeat, add flatten vector elements

* Fix tests

* Fix demo artwork

* Output group from copy to points, add repeat for graphic groups, fix editor freeze on render fail

* Restore painted dreams

* WIP: Fix demo artwork

* Fix demo artwork, add ungroup node

* Incorrect scaling

* fix test

* Fix demo art

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-10-14 12:39:28 -07:00
James Lindsay
b028bbb8cc
Fix crash from empty document with no artboards introduced in #2028 (#2036)
* Fix me crashing the editor due to not paying attention

* Swap two lines for consistency

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-10-14 18:24:51 +00:00
James Lindsay
a761e7803e
Improve text overlay styling and fix artboard label positioning bug (#2032)
* Improve text overlays

* I can't test code
2024-10-13 21:35:50 +00:00
fiveeyy
5c98378c7a
Fix Ctrl+H layer hiding and Ctrl+L layer locking only working with the graph open (#2029)
* Add DocumentMessage::ToggleSelectedVisibility

* Add DocumentMessage::ToggleSelectedLocked

* Update editor/src/messages/input_mapper/input_mappings.rs

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-10-13 14:19:46 -07:00