Commit graph

572 commits

Author SHA1 Message Date
Keavon Chambers
41fe46591a Update the parameter expose button in the Properties panel and fix undo history when it's clicked 2025-04-17 06:29:38 -07:00
Keavon Chambers
eca5d0d105
Add node description tooltips in the Properties panel and on secondary inputs in the graph (#2590)
Add tooltips to secondary inputs in graph/Properties panel, and to nodes in Properties panel
2025-04-17 00:59:46 -07:00
Dennis Kobert
9b23c7e2db
Update Tauri to v2 and execute only the node graph in native (#2362)
* Migrate tauri app to v2

* Move flake files to sub directory

* Remove unused plugins

* Backport some of the tauri code

* Implement async node graph execution

Only move node runtime to native code

* Always use gpu feature for tauri

* Fix serialization

* Add logging filters

* Enable native window rendering with vello

* Cleanup

* Remove unused editor instance

* Remove changes from vite config

* Remove warnings

* Remove unused files

* Fix most tests

* Cleanup

* Apply frontend lint

* Readd flake.nix

* Fix tests using --all-features

* Code review

* Enable all backends

* Fix monitor node downcast types

* Change debug log to a warning

* Disable shader passthrough

* Cleanup unused imports

* Remove warning

* Update project setup instructions

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-14 11:43:15 +00:00
Mateo
c2a36ce981
Restore auto-panning that #2443 had broken (#2562)
* Fix auto panning

* Clean up comments

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-13 22:19:08 +00:00
Utsav Singh
93f7004ece
Make the node catalog, originating from a wire dropped in the graph, filter for valid types (#2423)
* Add InputType based filtering capabilites to NodeCatalog.
Send InputTypes through SendUiMetadata under
odeTypes.
Update NodeCatalog.svelte component to support 	ype based filtering.
Update ContextMenuData to support compatibleType as an input to the searchTerm for the NodeCatalog.
Update Graph.svelte component to support new ContextMenuData enum types.
Send CompatibleType data from rust backend on wire drag and release to NodeCatalog to already show filtered data.

* Add InputType based filtering capabilites to NodeCatalog.
Send InputTypes through SendUiMetadata under
odeTypes.
Update NodeCatalog.svelte component to support 	ype based filtering.
Update ContextMenuData to support compatibleType as an input to the searchTerm for the NodeCatalog.
Update Graph.svelte component to support new ContextMenuData enum types.
Send CompatibleType data from rust backend on wire drag and release to NodeCatalog to already show filtered data.

* Open NodeCatalog on DoubleClick in empty node graph area

* Capture Node implementations and filter out uncatogrised nodes before sending metadata.
Update NodeCatalog Search filter to support single type search alongside name and category search

* Take union of DocumentNodeTypes and registered node implementations, Update missing categories and make sure to remove nodes with empty categories

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-04-09 01:07:35 -07:00
Keavon Chambers
cdf896bf79 New demo artwork: "Parametric Dunescape" 2025-04-01 23:20:34 -07:00
Keavon Chambers
4e418bbfe1 Fix device pixel ratio being tied to the document by moving it from overlays to portfolio 2025-03-21 10:13:08 -07:00
Keavon Chambers
08a4b69948 Add animation control buttons to document bar 2025-03-19 02:15:40 -07:00
Dennis Kobert
44694ff8d6
Experimental animation support (#2443)
* Implement experimental time routing to the node graph

* Allow toggling live preview with SHIFT + SPACE

* Add animation message handler

* Fix hotkeys

* Fix milisecond node

* Adevertize set frame index action

* Fix frame index

* Fix year calculation

* Add comment for why month and day are not exposed

* Combine animation nodes and fix animation time implementation

* Fix animation time interaction with playback

* Add set animation time mode message

* Captalize UTC

* Fix compiling

* Fix crash and add text nodes

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-03-19 01:19:49 -07:00
James Lindsay
43275b7a1e
Add the Spreadsheet panel to inspect node output data (#2442)
* Inspect node ouput stub

* Fix compile error in tests

* Create a table

* Clickable tables

* Add vector data support

* Checkbox to enable the panel

* Remove Instances table ID column; style the spreadsheet

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-03-18 23:06:05 -07:00
Keavon Chambers
6292dea103
Refactor many usages of Color to natively store linear not gamma (#2457) 2025-03-18 05:37:20 -07:00
James Lindsay
056020a56c
Avoid crashing when a document can't be loaded (#2453)
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-03-18 08:26:07 +00:00
mTvare
2d18378823
Fix autosaved document ID being incorrectly added to browser storage at the wrong time without its document data (#2426)
* Remove deleted document instead of fetching documents in portfolio

* npm run lint-fix

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-03-13 00:54:52 +00:00
Dennis Kobert
beb1c6ae64
Upgrade to the Rust 2024 edition (#2367)
* Update to rust 2024 edition

* Fixes

* Clean up imports

* Cargo fmt again

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-03-12 17:29:12 -07:00
Nitish Choudhary
c0d3eb8072
Add sizing gizmos to the Text tool's text area (#2176)
* Fix abortion while dragging

* Create function for text bounding box

* Reorder arms of text tool FSM

* add transform cage to textbox pt.1

* add transform cage pt.2

* Fix minor issue after merge

* Get bounding box working in place without action keys

* Add max_height and disable pivot drag

* Cleanup code and write doco for new utility function

* Minor change due to merge

* Add bottom overlay

* Get modifier keys to work pt.1

* Code cleanup

* cleanup

* Fix transform

* Minor improvements

* Undo debug statement!

* Add comments and keep original layer transformation

* Alt from centre

* Fix merge conflict

* Minor code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: hypercube <0hypercube@gmail.com>
Co-authored-by: James Lindsay <78500760+0HyperCube@users.noreply.github.com>
2025-03-12 10:07:10 +00:00
Keavon Chambers
a696aae044
Instance tables refactor part 5: unwrap GraphicGroup as multi-row Instance<GraphicElement> tables and move up transforms (#2363)
* Just group

* Partly working but without transforms

* Remove Transform/TransformMut from GraphicElement and GraphicGroupTable

* Fix layers and flattening

* Fix transform group handling on the remaining nodes

* Change collect metadata

* Add transform on vector data. TODO: Remove duplicate transform

* Small code tidying-up

* Add concatenate node?

* Remove ignore_modifications which is always false

* Improve transforms

* Mostly fix the nested transform cage angle (except leaf layers and skew)

* WIP attempt to integrate skew

* Fix nesting bounding box

* Avoid setting the transform

* Fix stroke transforms

* Renderer cleanup

* Fix tests for repeated elements not given unique point IDs

* Suppress cargo-deny warning

* Fix upgrade code for graphic group data

* Work around rendering issue in Isometric Fountain

---------

Co-authored-by: Adam <adamgerhant@gmail.com>
Co-authored-by: hypercube <0hypercube@gmail.com>
2025-03-12 01:38:36 -07:00
0SlowPoke0
d2fc919ba6
Add recursive folder expand/collapse to the Layers panel (#2419)
* added_recursion_fix

* Add tooltip and tidy up color visibility

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-03-10 21:01:00 +00:00
Keavon Chambers
381dcbf17f
Update dependencies throughout the project (#2401)
* Update dependencies

* Update stable node ID hashes again, for some reason?
2025-03-07 21:32:52 -08:00
Keavon Chambers
c4cf47703a
Tidy up NodeNetworkInterface, replacing &[] root network arguments with methods for the document network (#2393)
* Replace `.selected_nodes(&[])` with `.selected_nodes_in_nested_network()` and `.selected_nodes()`

* Replace `.network(&[])` with `.document_network()` and `.nested_network()`

* Replace `.network_metadata(&[])` with `.document_network_metadata()`
2025-03-07 01:33:24 -08:00
Keavon Chambers
ddb0c8c249 Reorganize the menu bar and add additional commands to it 2025-03-01 13:44:28 -08: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
Keavon Chambers
2c88bee0ee Update some UI components to polish the frontend 2025-02-21 12:58:05 -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
Keavon Chambers
7bbbf7fa7c Add icons and tooltips for the previous commit's feature 2025-02-12 01:54:30 -08:00
Keavon Chambers
1700c3a650 Update website with improved student project details 2025-02-11 17:18:57 -08: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
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
Keavon Chambers
303c1d45f8 Avoid adding an unnecessary Transform node with the TransformChange message 2025-01-30 03:17:31 -08:00
Mohamed Osama
618190d6e4
Fix Document > Clear Artboards so it doesn't also clear everything else (#2177)
* Clear Artboards, Closes #2015

* Memory optmization

* - Fix transactions
- Fix node positions
- Optimize nodes' deletion

* no message

* Fix layers shift to wrong positions

* fix bugs

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-01-30 01:29:24 -08:00
mTvare
a0f8f89e71
Make the transform cage show/hide resize grips as space allows (#2209)
* Changes rotation handles to be around overlay squares

Fixes 1330785941

* Fix zero width objects not being selected by slightly nudging the transform

* Follow the categorical limits to render overlay quads

As discussed here: 1331166336

* Replace area based calculations with edge based calculations

* Fix 3rd category vis

* Code review

* Add missing powi(2)

* Fixes to handle logic

* Remove single axis prioritisation

* Explicitly check for distance to find nearest handle

* Replace threshold check based on corner vis bounds

* Fix discrepancy at h=12px

* Allow grab when box is too small by disabling resizing within bounds

* Replace inside resize pixel limit

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-01-30 01:10:40 +00:00
Pratik Agrawal
96c57605b7
Add an editor preference for touched/enclosed/directional based selection (#2156)
* implemented left selection logic

* added logic for right ward selection

* removed the logs code

* corrected capitalization error

* corrected capitalization error

* added radio buttons for selection_mode

* fixed multiple selection of checkboxes

* adapted to the RadioEntryData

* State management bug

* integrated message system to selection_mode

* updated

* updated

* added selection mode to transition arms

* removed from portfolio message and added preference in ToolMessageData

* removed dead code of selection_mode from frontend logic

* removed dead code for zoomWithScroll

* Cleanup

* Rename, simplify, use dashed box, and highlight only outlines of layers that'll get selected

* More code review

---------

Co-authored-by: Pratik Agrawal <patrik@Pratiks-MacBook-Air.local>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-01-26 06:34:37 +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 9375180225

* 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
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
Keavon Chambers
9ad6c31483
Remove blob URL dead code and clean up more frontend code (#2199) 2025-01-14 13:08:47 -08: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: 1327376421
2025-01-12 18:17:44 -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
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
Keavon Chambers
feba87449b Add more actions to the Layer menu bar entries 2024-12-26 16:31:13 -08: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
James Lindsay
e3bb11ec1b
Fix clippy lints (#2119) 2024-11-29 22:58:49 +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
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
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