Commit graph

2382 commits

Author SHA1 Message Date
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
Ayush Chauhan
337b8bad13
Improve issues with selection history (#2138)
* Selection history when creating a new layer

* fixed selection history

* cleaned up the code, removed duplicate network_metadata calls

* re: fixed selection history
Added a default value for selection_undo_history to make sure its never actually empty.
2024-12-20 13:56:33 -08:00
Keavon Chambers
ed119ad3d7 Add Freehand tool drawing new subpaths on an existing layer with Shift held 2024-12-17 22:01:42 -08:00
Jacin Yan
3423c8ec13
New node: Math (#2121)
* 2115 IP

* Initial implementation of Expression node

* Register Expression Node

* Add Expression DocumentNode Definition

* DocumentNodeImplementation::Expresssion in guess_type_from_node

* Move expression.rs to graphene-core

* WIP: Investigating 'exposed' & 'value_source' params for Expression property

* Node graph render debug IP

* Single input can change node properties; complex debug IP

* Fix epsilon in test

* Handle invalid expressions in expression_node by returning 0.0

* Run cargo fmt

* Set the default expression to "1 + 1"

* Hardcode the A and B inputs at Keavon's request

* Rename and clean up UX

* Move into ops.rs

---------

Co-authored-by: hypercube <0hypercube@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-12-17 07:08:14 +00:00
Gulshan1-3
79b4f4df7b
Add dot product node (#2126)
* dot product node

* dot product node

* cross product node

* formatting n deleted comments

* name changed

* name changed

* cross product removed

* Minor code style changes

---------

Co-authored-by: hypercube <0hypercube@gmail.com>
2024-12-16 20:17:51 +00:00
Keavon Chambers
1264ea8246 Tidy up the UI with clearer Layers panel selection marks and removal of most "coming soon" UI elements 2024-12-14 20:49:21 -08:00
Paul Fornage
287ef26f64
Fix SVG viewBox capitalization in renderer (#2131)
fix `viewBox` capitalization
2024-12-12 20:42:41 +00:00
James Lindsay
fc0cf604df
Update some dependencies (#2134)
* Update some dependencies

* Update to action v2

* Fix for v2
2024-12-12 18:28:49 +00:00
0SlowPoke0
d97b02506e
Fixes shortcut key not showed in File->Close (#2135)
removed_the_dead_code_from_the_commit
2024-12-07 18:06:16 +00:00
James Lindsay
99ac7238fc
Fix bitmap bounding box (#2122) 2024-12-04 21:28:40 +00:00
James Lindsay
b21b1cbfc7
Simplify the implementation of the message buffering (#2123)
* Simplify the implementation of the message buffering

* Add assert to ensure list is empty
2024-12-02 20:48:33 +00:00
James Lindsay
e3bb11ec1b
Fix clippy lints (#2119) 2024-11-29 22:58:49 +00:00
0SlowPoke0
00629571f2
Disabling colinear state when both the handles are selected and moved (#2120)
* disable collinear state

* Add comment

---------

Co-authored-by: hypercube <0hypercube@gmail.com>
2024-11-29 22:58:28 +00:00
Pratik Agrawal
2cf33e45bd
Remove Double-Click Behavior for Switching to Path Tool on Non-Path Layers (#2116)
* Remove double-click behavior for switching to Path tool on non-Path layers

* removed the else-if block

* removed the path tool activation from shallowm mode

---------

Co-authored-by: Pratik Agrawal <patrik@Pratiks-MacBook-Air.local>
2024-11-26 16:33:14 +00:00
urisinger
9fb494764c
Add math-parser library (#2033)
* start of parser

* ops forgot

* reorder files and work on executer

* start of parser

* ops forgot

* reorder files and work on executer

* Cleanup and fix tests

* Integrate into the editor

* added unit checking at parse time

* fix tests

* fix issues

* fix editor intergration

* update pest grammer to support units

* units should be working, need to set up tests to know

* make unit type store exponants as i32

* remove scale, insted just multiply the literal by the scale

* unit now contains empty unit,remove options

* add more tests and implement almost all unary operators

* add evaluation context and variables

* function calling, api might be refined later

* add constants, change function call to not be as built into the parser
and add tests

* add function definitions

* remove meval

* remove raw-rs from workspace

* add support for numberless units

* fix unit handleing logic, add some "unit" tests(haha)

* make it so units cant do implcit mul with idents

* add bench and better tests

* fix editor api

* remove old test

* change hashmap context to use deref

* change constants to use hashmap instad of function

---------

Co-authored-by: hypercube <0hypercube@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-11-21 10:24:01 -08:00
James Lindsay
51ce51ea8c
Refactor collection of snap targets (#2114)
* Collect snap targets cleanup

* Make Clippy happy

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-11-20 22:27:49 -08:00
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