Commit graph

1489 commits

Author SHA1 Message Date
Keavon Chambers
aa902efb56
Finish removing GraphicElement::Artboard started in #1824 (#1830) 2024-07-14 01:50:25 -07:00
James Lindsay
203be63374
Insert transform node on groups (#1829)
Insert transform on group
2024-07-13 21:48:56 -07:00
James Lindsay
0c2e3361ab
Remove artboard from graphic element (#1824)
* Remove artboard from graphic element

* Fix transform bug
2024-07-13 21:10:29 -07:00
James Lindsay
027d3f4e60
Apply the graphic group transform in the boolean node (#1825) 2024-07-13 19:49:40 -07:00
James Lindsay
dba0433100
Fix snapping bug where snapped-together shapes couldn't be moved (#1818)
* Fixup dragging snap

* Reenable snapping by default on some demo art files

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-07-12 15:04:14 -07:00
Dennis Kobert
3657b37574
Deprecate LetNodes in favor of new scope API (#1814)
* WIP

* Start deprecating let nodes

* Replace WasmEditorApi network imports with new Scope input

* Add missing unwrap

* Add #[serde(default)] to scope_injections

* Restructure WasmEditorApi definition to be available as a TaggedValue

* Fix text node

* Use stable toolchain in nix shell again

* Code review

* FIx text node and remove all remaining warnings

* Require executor input to be 'static

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-07-10 14:18:21 +02:00
Keavon Chambers
a17ed68008 Disable snapping by default as a bug mitigation, and assorted cleanup 2024-07-10 02:34:37 -07:00
adamgerhant
9d749c49fb
Add a stack-based Boolean Operation layer node (#1813)
* Multiple boolean operation node

* Change boolean operation ordering

* Complete layer boolean operation node

* Automatically insert new boolean operation node

* Remove divide operation

* Fix subtract operations

* Remove stack data from boolean operation properties

* Fix images and custom vectors

* Code cleanup

* Use slice instead of iter to avoid infinite type recursion

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-07-10 02:12:55 -07:00
adamgerhant
f4e3e5ab2a
Add draggable upstream nodes feature (#1812)
* drag upstream nodes, fix node deselection

* Ignore bottom layer inputs

* Fix amplified movement

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-07-09 12:16:50 +00:00
Raminder Singh
62f73df048
Fix a lot of Clippy warnings (#1808)
* fix a lot of clippy warnings

* fix more clippy warnings

* fix yet more clippy warnings

* bump msrv to 1.70.0 to silence warnings

* fix a lot of clippy warnings

* fix more clippy warnings

* fix yet more clippy warnings

* fix a few more warnings

* fix a clippy warning

* remove a commented out line

* silense too many arguments error

* fix more clippy warnings

* prefix underscore to unused vars/functions to fix warnings

* use filter instead of map

* move raw-rs-tests feature flat to module level to fix unused imports warnings

* fix a couple of unused result warnings

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-07-09 05:02:52 -07:00
Keavon Chambers
f7ada701e5
Reorganize cargo dependencies and upgrade most of them (#1815)
* Reorganize cargo dependencies and upgrade most

* cargo update

* Attempt 2

* Polishing changes

* Comment out specta typescript flag-dependent code

* Fix test
2024-07-09 04:08:28 -07:00
James Lindsay
97616e8019
Fix Pen and Freehand tool path extension (#1809)
Improve path tool extend
2024-07-07 17:23:44 -07:00
Raminder Singh
4cd11448a0
Fix 'Zoom with Scroll' not working after a page refresh (#1807)
* Fix 'Zoom with Scroll' not working after a page refresh

* Add semicolon

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-07-07 00:55:09 -07:00
Keavon Chambers
84d72621e5 Fix bug causing some node outputs to fail connecting wires to other inputs 2024-07-06 23:38:25 -07:00
James Lindsay
7a82a75d2c
Fix multi-subpath boolean operations (#1804)
Fix multi subpath boolean operations
2024-07-06 01:26:00 -07:00
Keavon Chambers
621f469a15 Restore backwards compatibility broken with #1750 to prepare next release 2024-07-06 01:02:40 -07:00
Sahil gill
e66620dc5c
Add basic artboard snapping (#1734)
* Initial vector modify node

* Initial extraction of data from monitor nodes

* Migrate to point id

* Start converting to modify node

* Non destructive spline tool (tout le reste est cassé)

* Fix unconnected modify node

* Fix freehand tool

* Pen tool

* Migrate demo art

* Select points

* Fix the demo artwork

* Fix the X and Y inputs for path tool

* G1 continous toggle

* Delete points

* Fix test

* Insert point

* Improve robustness of handles

* Fix GRS shortcuts on path

* Dragging points

* Fix build

* Preserve opposing handle lengths

* Update demo art and snapping

* Fix polygon tool

* Double click end anchor

* Improve dragging

* Fix text shifting

* Select only connected verts

* Colinear alt

* Cleanup

* Fix imports

* first commit

* changes in SnapData::ignore()

* Bug fixes and cleanup

* Code review

---------

Co-authored-by: 0hypercube <0hypercube@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-07-05 16:14:47 -07:00
Umer Khan
176ce314c7
Fix rulers showing in the wrong spot when initially opening a document (#1801)
* Added RenderRulers

* Update dispatcher.rs to remove debug statement

I should really check each file carefully....

---------

Co-authored-by: PersonOOO <82835562+PersonOOO@users.noreply.github.com>
2024-07-05 14:01:59 -07:00
James Lindsay
1652c713a6
Add nondestructive vector editing (#1676)
* Initial vector modify node

* Initial extraction of data from monitor nodes

* Migrate to point id

* Start converting to modify node

* Non destructive spline tool (tout le reste est cassé)

* Fix unconnected modify node

* Fix freehand tool

* Pen tool

* Migrate demo art

* Select points

* Fix the demo artwork

* Fix the X and Y inputs for path tool

* G1 continous toggle

* Delete points

* Fix test

* Insert point

* Improve robustness of handles

* Fix GRS shortcuts on path

* Dragging points

* Fix build

* Preserve opposing handle lengths

* Update demo art and snapping

* Fix polygon tool

* Double click end anchor

* Improve dragging

* Fix text shifting

* Select only connected verts

* Colinear alt

* Cleanup

* Fix imports

* Improve pen tool avoiding handle placement

* Improve disolve

* Remove pivot widget from Transform node properties

* Fix demo art

* Fix bugs

* Re-save demo artwork

* Code review

* Serialize hashmap as tuple vec to enable deserialize_inputs

* Fix migrate

* Add document upgrade function to editor_api.rs

* Finalize document upgrading

* Rename to the Path node

* Remove smoothing from Freehand tool

* Upgrade demo artwork

* Propertly disable raw-rs tests

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: Adam <adamgerhant@gmail.com>
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2024-07-05 13:42:40 -07:00
Elbert Ronnie
fd3613018a
Raw-rs: make decoder for ARW1 and ARW2 formats (#1775)
* convert Tag into a trait

* Create ARW 1 decoder

* add decoder for sony tone curve table

* create decoder for arw 2.1 format

* add windsock.arw to the tests

* create derive macro for Tag and use it in decoders

* add license to tag-derive

* add code to identify model

* impl Display for Ifd

* Code review

* Fix type variable name

* Fix compilation

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-06-28 03:23:05 -07:00
Dennis Kobert
c9a33e44bd
New node: Rasterize (#1755)
* Add RasterizeVector node

* Add document node definition for RasterizeVectorNode

* Add dummy node properties

* Add prototype of footprint widget

* Fix types

* Fix footprint widget to use document space

* Fix aspect ratio issues by making resolution a multiplier

* Fix rebase errors

* Fix rasterization bounds and node definition

* UI and bug fixes but still issues with scaling in the frame

* Rename node to Raster

* Fix RasterizeNode

* Reenable resolution multiplier

* Remove unused variable

* UI fixes

* Fix Footprint default and resolution updates

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-06-27 01:24:09 -07:00
Tayfun Yaşar
cf496668fb
Add artboard displayed names in the viewport (#1795)
* possible location of the change is decided.

* fix for issue #1774

* possible location of the change is decided.

* fix for issue #1774

* fix for #1706

* fix for #1706, code reformatted

* fix for #1706, Label input removed from Properties

* fix for #1706

* deleted the comment
2024-06-22 01:10:52 -07:00
Luke Franceschini
5ed5f55dfb
Fix bounding boxes of VectorData with rotations in several nodes (#1792)
The VectorData::bounding_box() function does not apply the VectorData's
transform, and bounding_box_with_transform() must be used instead of
applying the transform to the computed bounding box. It may make sense
in the future to move the current version of bounding_box to a private
method bounding_box_no_transform() and have the public bounding_box call
bounding_box_with_transform so that external code doesn't need to know
about how the VectorData stores it's data.

This fixes the following nodes:
- Repeat
- Circular Repeat
- Bounding Box

Also add a test to the bounding box node for this situation.
2024-06-20 23:45:57 -07:00
adamgerhant
84ac2e274e
Code cleanup after migrating node graph interaction to the backend (#1790)
* Cleanup transforms and click targets

* Improve click target caching

* Fix click target bugs

* Add auto panning

* update_modified_click_targets

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-06-20 23:11:41 -07:00
Luke Franceschini
6fd5b76430
Fix PathStyle::clear_fill() doctest in style.rs (#1791) 2024-06-18 11:29:29 -07:00
0HyperCube
68a6065f2b
Arrange layers in top level (#1786) 2024-06-17 11:56:31 +01:00
Tayfun Yaşar
5b6a2518e4
Fix clicking a selected anchor not deselecting all other selected points (#1782)
* possible location of the change is decided.

* fix for issue #1774
2024-06-16 04:02:09 +00:00
adamgerhant
d8973ec8da
Fix Poisson-Disk Points node transform of input shape (#1784)
Fix poisson-disk, node gap spacing
2024-06-15 15:16:12 -07:00
adamgerhant
02360c7bc8
Migrate node graph UI interaction from frontend to backend (#1768)
* Click node using click targets based

* Display graph transform based on state stored in Rust, fix zoom and pan.

* Migrate node selection logic

* Move click targets and transform to NodeNetwork

* Keep click targets in sync with changes to node shape

* Click targets for import/export, add dragging

* Basic wire dragging

* complete wire dragging

* Add node selection box when dragging

* Fix zoom operations and dragging nodes

* Remove click targets from serialized data, fix EnterNestedNetwork

* WIP: Auto connect node when dragged on wire

* Finish auto connect node when dragged on wire

* Add context menus

* Improve layer width calculations and state

* Improve context menu state, various other improvements

* Close menu on escape

* Cleanup Graph.svelte

* Fix lock/hide tool tip shortcuts

* Clean up editor_api.rs, fix lock/hide layers

* Start transferring network and node metadata from NodeNetwork to the editor

* Transfer click targets to NodeGraphMessageHandler

* Fix infinite canvas

* Fix undo/redo, scrollbars, and fix warnings

* Unicode-3.0 license and code cleanup

* License fix

* formatting issue

* Enable DomRect

* Fix layer move crash

* Remove tests

* Ignore test

* formatting

* remove white dot

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-06-15 08:55:33 -07:00
0hypercube
cf01f522a8 Fix bug with Path tool point insertion often not working 2024-06-13 03:08:03 -07:00
Elbert Ronnie
52d2047ca6
Run Raw-rs tests only on CI (#1776)
run raw-rs tests only on CI
2024-06-11 01:26:54 -07:00
Keavon Chambers
a9a4b5cd19
Move gradient picking into the color picker (#1778)
* Gradient picker

* Fix up color picker layout CSS problems

* Begin hooking up SpectrumInput for gradient in the ColorPicker

* Working gradient picking on the frontend only

* Plumb FillColorChoice into the backend

* Hook everything else up, just with a weird bug remaining

* Fix some svelty reactivity issues

* Add and remove stops

* Cleanup

* Rename type

* Fill node document format upgrading

* Fix lint

* Polish the color picker UX and fix a bug

---------

Co-authored-by: 0hypercube <0hypercube@gmail.com>
2024-06-09 22:55:13 -07:00
Keavon Chambers
449729f1e1
Fix crash and clean up frontend -> backend input handling code (#1770) 2024-06-03 01:09:22 -07:00
Elbert Ronnie
72ccba09af
Create new library Raw-rs including a basic TIFF decoder (#1757)
* add a basic tiff decoder in raw-rs

* cargo fmt

* add readme and license files

* add warning about being in-progress

* add testing framework for raw-rs

* add new type IFD and rename tag

* remove test_each and merge into single test

* cargo fmt

* make sure images folder stays in git

* rename image_length with image_height

* change name of test file

* Readme changes

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-06-02 04:58:06 -07:00
adamgerhant
6d74abb4de
Node network subgraph editing (#1750)
* Breadcrumb visualization, nested network consistency, create definitions for Merge internal nodes

* Add index to network inputs, remove imports usage from flatten network

* Replace NodeOutput with NodeInput::Node

* Fully remove imports field, remove unnecessary identity nodes, move Output node to encapsulating network

* Replace previous_outputs with root_node, fix adding artboard/layer to empty network

* Import/Export UI nodes

* Display input/output types dynamically from compiled network

* Add LayerNodeIdentifer::ROOT_PARENT

* Prevent .to_node() on ROOT_PARENT

* Separate NodeGraphMessage and GraphOperationMessage

* General bug fixes with nested networks

* Change layer color, various bug fixes and improvements

* Fix disconnect and set node input for proto nodes and UI export node

* Dashed line to export for previewed node

* Fix deleting proto nodes and nodes that feed into export

* Allow modifications to nodes outside of nested network

* Get network from Node Id parameter

* Change root_node to previous_root_node

* Get TaggedValue from proto node implementation type when disconnecting

* Improve preview functionality and state

* Artboard position and delete children fix

* Name inputs/outputs based on DocumentNodeDefinition or type, fix new artboard/layer insertion

* replace "Link" with "Wire", adjust previewing

* Various bug fixes and improvements

* Modify Sample and Poisson-Disk points, fix incorrect input index and deleting currently viewed node

* Open demo artwork

* Fix opening already upgraded documents and refactor FrontendGraphDataType usages

* Fix deleting within network and other bugs

* Get default node input from compiled network when copying, fix previews, tests, demo artwork

* Code cleanup

* Hide EditorApi and add a comment describing unresolved Import node input types

* Code review

* Replace placeholder ROOT_PARENT NodeId with std::u64::MAX

* Breadcrumb padding

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-06-02 08:01:56 +00:00
Keavon Chambers
e4d3faa52a Update website roadmap 2024-06-01 02:38:38 -07:00
0HyperCube
61292500e6
Fix tool drawing start point offset when an artboard has a transform (#1763)
* Fix offset artboard

* Multiply in transform sometimes
2024-05-28 01:09:48 -07:00
Keavon Chambers
d40fb6caad
Add boolean operations (#1759) 2024-05-25 22:02:00 -07:00
0HyperCube
c80de41d28
Always update source node in borrow tree (#1758) 2024-05-25 21:35:53 -07:00
Elbert Ronnie
5a1c171fc3
Add Area and Centroid nodes (#1749)
* initial attempt for area node

* allow node preview for more types

* make AreaNode sync and add CentroidNode

* cargo fmt

* preview of DVec2

* make the nodes async again

* use segment domain instead of region domain

* modify the check for linearity

* create a limit for area in centroid calculation

* cargo fmt

* reverse unnecessary changes

* add threshold to area calculation too.

* handle zero area edge case

* add todo comment

* implement 1D centroid and use it as fallback

* formatting floats to skip last zero

* add Centroid Type radio button to Centroid Node

* rename docs to use area and perimeter centroid

* add web demos for perimeter centroid

* add tests for perimeter centroid

* add fallback to use average of points

* Fix for broken area

* missing fixes

* Code review and rename Perimeter Centroid to Length Centroid

* Use dummy footprint in Area and Centroid nodes

* add doc and todo to clarify when `is_linear` fails

* use epsilon instead of zero

---------

Co-authored-by: 0hypercube <0hypercube@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2024-05-22 13:11:11 -07:00
Elbert Ronnie
4587457bfa
Fix primitive tool shapes appearing at document origin before dragging; fix Ctrl+0 recenter shifting (#1751)
* fix ghost shape when starting to draw

* fix indeterminate recenter

* fix typo infinate

* cargo fmt

* Code review and add to Line tool

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-05-22 09:31:26 +00:00
0HyperCube
af6dae29fc
Fix off by one subpath and unrelated crash (#1754)
* Fix off by one in subpath code

* Fix crash with selected handles and anchor

* Sort the correct way I have no idea why the origional code was so overly verbose but it has caused significant confusion and wasted effort
2024-05-20 14:44:24 -07:00
Keavon Chambers
e39539fa08 Update the website layout with narrower default width and better typography (#1753)
- Reduces the default width from 1600px to 1200px of the web page and reduce the size of various elements and text. This fixes the problem that I designed the website assuming everyone is viewing from the same 2560px wide screen as I used to design it, which is a bad assumption. Most websites are around the 1200px mark.
- Removes the use of the EB Garamond font, replacing more headers with a bold Inter instead, leaving only Bona Nova for h1 headers at the tops of pages (except the home page, which might have further revamp soon).
- Adds nice flavor graphics to a redesigned volunteer page.
- Cleans up and organizes the Zola templating code and CSS style sheets.
- Improves image carousel to fade out images when dragged past the start or end.
2024-05-18 12:31:41 -07:00
Spenser Black
377b8977b4
Update Git Attributes for JSON syntax highlighting in *.graphite files (#1752)
* Update Git Attributes for `*.graphite`

Adds syntax highlighting on GitHub and treats the files as generated/binary.

* Mark test Graphite files as *not* generated
2024-05-13 22:35:32 +00:00
Keavon Chambers
d0c493cdb6 Fix and refactor website meta tags for better SEO and social media previews 2024-05-10 04:17:44 -07:00
0HyperCube
0c50d91516 Blog post: Graphite progress report (Q1 2024) (#1700)
* Draft for quarterly update blog post

* Complete post

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-05-09 15:33:19 -07:00
adamgerhant
cce1bc644e
Fix artboards not being included in Export menu's bounds list (#1748)
Show artboards when exporting
2024-05-09 05:08:02 +00:00
Keavon Chambers
6b0822d318 Add Isometric Fountain demo artwork 2024-05-08 19:00:31 -07:00
Keavon Chambers
de84e39c4e Improve backwards compatability robustness of serde-based document format 2024-05-08 17:45:31 -07:00
adamgerhant
bc33eabc3c
Add grid color customization and choice to display as dots (#1743)
* dot grid

* fix warning: unreachable pattern

* grid color select

* add color for all grid types

* Dot grid checkbox and remove prefixed Color functions

* Display dot grid as grid aligned pixels

* Dashed line comment

* Code review and UI design widget placement updates

* Isometric dotted grid

* Early return when cos = 0

* Add spacing, x offset, and color to dot grids

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-05-08 21:36:15 +00:00