Commit graph

381 commits

Author SHA1 Message Date
Keavon Chambers
c7fd9cfc21 New demo artwork: Procedural String Lights 2024-01-05 15:16:48 -08:00
0HyperCube
947a131a4b
Add graph type error diagnostics to the UI (#1535)
* Fontend input types

* Fix index of errors / types

* Bug fixes, styling improvements, and code review

* Improvements to the error box

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-12-29 08:38:45 +00:00
Keavon Chambers
96b5d7b520
Many subtle improvements to the UI design system (#1537) 2023-12-28 04:35:20 -08:00
Keavon Chambers
7bfe0ce55b
Retire layer paths used throughout the code (#1531)
* Part 1

* Part 2

* Part 3

* Part 4

* Part 5

* Part 6

* Part 7

* Part 8
2023-12-21 19:32:46 -08:00
Keavon Chambers
92203f3576
Remove the whole document-legacy crate (#1524)
Remove the whole document-legacy crate

Closes #1520
2023-12-20 05:45:54 -08:00
Keavon Chambers
dcd38f2e4c Remove all references to legacy layers (#1523)
* Remove visible field from LegacyLayer

* Remove LegacyLayer wrapper around LegacyLayerType

* Remove FolderLegacyLayer and LayerLegacyLayer wrappers around their data

* Remove legacy layers
2023-12-19 20:50:45 -08:00
Keavon Chambers
9a7d7de8fa Remove most of document-legacy (#1519)
* Remove boolean ops and unused doc-legacy Operations

* Remove Shape legacy layers

* Remove legacy layer Properties panel code

* Remove additional unused doc-legacy Operations

* Removed unused rendering-related legacy-layer code

* Upgrade dep so CI builds

* Remove various additional unused functions and messages

* Remove the LayerData trait

* Remove RenderData struct and usages

* Banish the Operations system

* Further removals
2023-12-19 04:36:19 -08:00
0HyperCube
c42d030f18 New overlay system (#1516)
* Port gradient tool overlays

* Fix tests

* Text tool

* Artboard tool and some of select tool

* Port select tool drawing box

* Pen and path tool

* Remove overlays document

* Show the overlay refactor as done on the website roadmap

* Select tool bounds in layer space (first layer)

* Code review and fixes

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-12-18 11:17:43 +00:00
Keavon Chambers
9f0ea35d9b New node: Noise Pattern (#1518)
Add the Noise Pattern node

Closes #1517
2023-12-17 02:06:25 -08:00
Keavon Chambers
83af879a7c
Fix the Imaginate node from crashing (#1512)
* Allow generic node input for type inference

* Make imaginate resolution picking depend on the image resolution instead of the transform

* Remove dead code

* Fix console spam after crash

* Fix crash when disconnecting Imaginate node input

* Update Imaginate tool tooltip

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2023-12-12 22:39:33 -08:00
0HyperCube
29222700f4
Fix the blend mode and opacity widgets of the Layers panel (#1506)
* Fix blend mode and opacity

* Cleanup and bug fixes

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-12-12 09:27:23 +00:00
0HyperCube
af4c793f43
Serve the demo artwork in each build (#1494)
* Serve local demo artwork

* Disable restricted import lint

* Revert

* Switch approach to vite-multiple-assets plugin

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-12-11 01:06:00 -08:00
0HyperCube
99823e952a
Fix layers insert mark disappearing (#1493)
* Fix layers insert mark disappearing

* Move insertion line up 1px

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-12-09 13:34:15 +00:00
Keavon Chambers
5a6815dd91 Rename Raster to Bitmap 2023-12-08 16:18:56 -08:00
Keavon Chambers
c5ed54cbd2 Rename several node graph structs/fields 2023-12-08 15:30:00 -08:00
Keavon Chambers
747dae3bb6 Improve auto-linking of layers dragged onto links 2023-12-07 16:17:25 -08:00
Keavon Chambers
60a9c27bf1
Add viewing/editing layer names, add Blend Mode node, and clean up Layer node (#1489) 2023-12-07 15:10:47 -08:00
Keavon Chambers
01499de8e7 Make the tool shelf adapt to multiple columns and improve panel scrollbars
Closes #176
2023-12-06 02:10:40 -08:00
Keavon Chambers
9c83d054cf Redesign the Layers panel 2023-12-06 01:52:02 -08:00
Keavon Chambers
3e35abd377 Clean up .graphite file serde encoding 2023-12-06 01:51:48 -08:00
Keavon Chambers
8f9371dad0 Improve navigation footer bar hints 2023-12-06 01:51:30 -08:00
Dennis Kobert
b7fe38cf31
Fix how transforms work with footprints and remove a redundant transforms field (#1484)
* Prune unused thumbnails in node graph executor

* Fix transform downcasting failure for GraphicElementData

* Remove more warnings

* Revert upstream transform calculation change

* Use footprint to calculate layer transforms

* Fix artboards

* Move artwork with artboard

* Remove Keavon's warnings

* Prevent misordered FrontendMessages failing to reach JS handlers

---------

Co-authored-by: 0hypercube <0hypercube@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-12-03 14:17:28 -08:00
0HyperCube
1093aabc88
Fix graph UI links getting tangled when switching document tabs (#1483)
Fix corrupt graph UI
2023-12-03 10:19:09 +00:00
Bijay Shrestha
4fead6e7ec
Add option to toggle ruler visibility (#1479)
* Sending Toggle Ruler message and setting visibility. Text and markers not working

* Added resize on mount for Ruler Input

* Set default for rulers_visible to pass test

* Ruler Visibility portfolio wide instead of document

* Sending Toggle Ruler message and setting visibility. Text and markers not working

* Ruler Visibility portfolio wide instead of document

* Cleanup

* Reorganize the View menu bar; add toggle rulers hotkey

* Remove non-working redundant bools, and make rulers set per-document

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-11-28 03:34:23 -08:00
Keavon Chambers
4fdf8410cf Clean up comments left over from the port to Svelte 2023-11-27 04:50:09 -08:00
Keavon Chambers
32fb142b62 Redesign the ColorButton widget style 2023-11-27 04:48:16 -08:00
0HyperCube
b2ca643e6e
Fix transforms, Brush tool, and G/R/S (#1473)
* Transform fixes

* Fix the desert artwork

* Change artboard icon

* Better handling when transforming brush strokes

* Code review pass

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-11-26 20:54:06 -08:00
0HyperCube
ee95dac74e
Speed up graph view frontend by removing a querySelectorAll hot path (#1475)
* Reduce query selector all that was slowing perf

* Speed up double iteration of filter map with flatMap

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-11-25 23:25:58 +00:00
Keavon Chambers
2515620a77
Add math expression evaluation to NumberInput boxes (#1472)
* Add math expression parsing to NumberInput boxes

* Prevent NaN results

* Add support for implicit multiplication in expressions
2023-11-25 22:37:54 +00:00
Keavon Chambers
ab3410cffe
Consolidate MenuListButton into TextButton (#1470) 2023-11-25 01:56:05 -08:00
Keavon Chambers
34c6c0431b
Improve NumberInput with dragging to change value and escape/right-click to abort (#1469)
* Improve NumberInput with dragging to change value and escape to abort

Closes #1468

* Fix slowing with Shift and integer mode
2023-11-21 17:26:28 -08:00
0HyperCube
8a1cf3ad5d Migrate demo artwork and fix all failing CI tests (#1459)
* Initial work on fixing tests

* Fix formatting

* Remove dead code to satisfy rustc warnings

* Insert into an artboard

* Load updated artwork in editor

* Remove popup when importing image

* Fix up demo art

* Change transform app[lication method

* Reduce number of enums called BlendMode

* Finalize the demo artwork upgrade

* Code review pass

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-11-19 23:06:21 -08:00
Keavon Chambers
719c96ecd8
Rename and reorganize several widgets (#1462)
* Rename SwatchPairInput -> WorkingColorsButton

* Remove unnecessary Svelte each-loop keys

* Rename (and migrate) MenuBarInput -> MenuListButton

* Rename PivotAssist -> PivotInput

* Rename PersistentScrollbar -> ScrollbarInput and CanvasRuler -> RulerInput

* Rename DIalogModal -> Dialog

* Rename WidgetRow -> WidgetSpan
2023-11-18 04:34:30 -08:00
Keavon Chambers
e3f5e7001f Redesign ColorInput widget and rename it to ColorButton 2023-11-16 18:38:39 -08:00
Keavon Chambers
a6ca43bb2d
Restore ESLint and Prettier auto-formatting and CI linting (#1457)
* Restore ESLint and Prettier autoformatting

* Fix formatting and lints in web files

* Hacky fix to eslint crash

* Fix remaining lints

* Add lint-fix script

---------

Co-authored-by: 0hypercube <0hypercube@gmail.com>
2023-11-16 13:12:47 -08:00
Keavon Chambers
f4ec76f35e Replace license generator web infra to use Vite 2023-11-13 03:38:36 -08:00
Matthew Donoughe
f6d104265a
Switch build system to Vite (#1444)
Switch Parcel to Vite
2023-11-05 03:12:03 -08:00
Keavon Chambers
09743dcdc4 Rename DocumentNodeType to DocumentNodeBlueprint for clarity 2023-11-05 01:24:53 -08:00
Keavon Chambers
e54a2e2fc6 Remove the Frame tool 2023-11-04 03:04:26 -07:00
0HyperCube
2feef62f23
Fix the Eyedropper tool (#1440)
* Fix eyedropper

* Remove dead code

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-10-25 17:18:15 +01:00
Keavon Chambers
c4bea2b400 Clean up code for optional node inputs/outputs
This removes the unused Split Channels node's primary output
2023-10-24 22:26:34 -07:00
Keavon Chambers
ee08938bb0 Rename 'Grayscale' node to 'Black & White' 2023-10-24 21:22:22 -07:00
0HyperCube
6ff958d6ae
Create node by dragging link into empty space (#1438)
* Create node by dragging into empty space

* Prevent add menu when disconnecting a link

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-10-24 13:22:41 -07:00
0HyperCube
5827e989dc Migrate the Select tool to the document graph (#1433)
* function for accessing document metadata

* Better select tool

* Fix render

* Fix transforms

* Fix loading saved documents

* Populate graph UI when loading autosave

* Multiple transform nodes

* Fix deep select

* Graph tooltips

* Fix flip axis icon

* Show disabled widgets

* Stop select tool from selecting artboards

* Disable (not hide) the pivot widget; remove Deep/Shallow select for now

* Code review changes

* Fix pivot position with select tool

* Fix incorrectly selected layers when shift clicking

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-10-17 11:09:32 -07:00
Dennis Kobert
833f41bccb Insert pasted images as layers in document graph (#1418)
Changes:

Graph is evaluated on every viewport change
move all navigation logic into the viewport
reduce the number of js roundtrips
add canvas rendering
enable image pasting
various cleanups
Fix cache nodes being reset every evaluation
2023-10-17 11:02:07 -07:00
hypercube
40aab0332a Fix eyedropper tool 2023-10-17 11:02:06 -07:00
0hypercube
4cd72edb64 Initial work migrating vector layers to document graph
* Fix pen tool (except overlays)
* Thumbnail of only the layer and not the composite
* Fix occasional transform breakages
* Constrain size of thumbnail
* Insert new layers at the top
* Broken layer tree
* Fix crash when drawing
* Reduce calls to send graph
* Reduce calls to updating properties
* Store cached transforms upon the document
* Fix missing node UI updates
* Fix fill tool and clean up imports and indentation
* Error on overide existing layer
* Fix pen tool (partially)
* Fix some lints
2023-10-17 11:02:06 -07:00
mobile-bungalow
9667e5173b
Allow toggling smooth/sharp angle from the path tool options bar (#1415)
* menu in option

* smoothing controls work

* fixed type error

* fix flipping behavior

* silence warning

* consolidate selection state

* update positions options

* blinking logic fixed, smoothing logic implemented

* fixed arbitrary looping when flipping from sharp to smooth

* remove warning

* Tidying up

* refactor manipulator smoothing code, remove bitflags, rename

* Make the point smooth/sharp support mixed better

* Code review tweaks

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-09-11 17:36:08 -07:00
Keavon Chambers
88bdf9580f Make RadioInput accept optional selected_index 2023-09-11 15:40:05 -07:00
Keavon Chambers
ee1a228bfd Fix regression blocking inputs in the graph 2023-09-02 00:19:03 -07:00