Commit graph

381 commits

Author SHA1 Message Date
Keavon Chambers
5748d9bff4 Assorted code file cleanup following Svelte switch 2023-03-10 15:48:04 -08:00
Keavon Chambers
74d761dc84 Remove all references to Vue 2023-03-10 04:02:02 -08:00
Keavon Chambers
6e20ea538b Replace the Vue frontend with Svelte 2023-03-10 03:54:39 -08:00
Keavon Chambers
e539e43483 Rename .vue files to .svelte for diffing 2023-03-10 03:53:15 -08:00
Keavon Chambers
2327524690 Move JS script to the top of each Vue file 2023-03-10 03:44:49 -08:00
Keavon Chambers
c8a7e58bd5 Add double click input hint icons 2023-03-05 17:49:47 -08:00
Dennis Kobert
b55e233fff Update GPU execution and quantization to new node system (#1070)
* Update GPU and quantization to new node system

Squashed commit of the following:

commit 3b69bdafed79f0bb1279609537a8eeead3f06830
Author: Dennis Kobert <dennis@kobert.dev>
Date:   Sun Mar 5 11:37:17 2023 +0100

    Disable dev tools by default

commit dbbbedd68e48d1162442574ad8877c9922d40e4a
Merge: b1018eb5 a8f6e11e
Author: Dennis Kobert <dennis@kobert.dev>
Date:   Sun Mar 5 10:45:00 2023 +0100

    Merge branch 'vite' into tauri-restructure-lite

commit b1018eb5ee56c2d23f9d5a4f034608ec684bd746
Merge: 3195833e 0512cb24
Author: Dennis Kobert <dennis@kobert.dev>
Date:   Fri Mar 3 17:06:21 2023 +0100

    Merge branch 'master' into tauri-restructure-lite

commit 3195833e4088a4ed7984955c72617b27b7e39bfc
Author: Dennis Kobert <dennis@kobert.dev>
Date:   Fri Mar 3 17:06:02 2023 +0100

    Bump number of samples

commit 3e57e1e3280759cf4f75726635e31d2b8e9387f9
Author: Dennis Kobert <dennis@kobert.dev>
Date:   Fri Mar 3 16:55:52 2023 +0100

    Move part of quantization code to gcore

commit 10c15b0bc6ffb51e2bf2d94cd4eb0e24d761fb6f
Merge: 2b3db45a 8fe8896c
Author: Dennis Kobert <dennis@kobert.dev>
Date:   Fri Mar 3 14:28:56 2023 +0100

    Merge remote-tracking branch 'origin/master' into tauri-restructure-lite

commit 2b3db45aee44a20660f0b1204666bb81e5a7e4b6
Author: Dennis Kobert <dennis@kobert.dev>
Date:   Fri Mar 3 14:17:11 2023 +0100

    Fix types in node registry

commit 9122f35c0ba9a86255709680d744a48d3c7dcac4
Merge: 26eefc43 2cf4ee0f
Author: Dennis Kobert <dennis@kobert.dev>
Date:   Fri Mar 3 01:04:55 2023 +0100

    Merge remote-tracking branch 'origin/master' into tauri-restructure-lite

commit 26eefc437eaad873f8d38fdb1fae0a1e3ec189e4
Author: Dennis Kobert <dennis@kobert.dev>
Date:   Thu Mar 2 23:05:53 2023 +0100

    Add Quantize node to document_node_types

commit 3f7606a91329200b2c025010d4a0cffee840a11c
Author: Dennis Kobert <dennis@kobert.dev>
Date:   Thu Mar 2 17:47:51 2023 +0100

    Add quantization nodes to node registry

commit 22d8e477ef79eef5b57b1dc9805e41bbf81cae43
Author: Dennis Kobert <dennis@kobert.dev>
Date:   Thu Mar 2 17:13:28 2023 +0100

    Introduce scopes (#1053)

    * Implement let binding

    * Add lambda inputs

    * Fix tests

    * Fix proto network formatting

    * Generate a template Scoped network by default

    * Add comment to explain the lambda parameter

    * Move binding wrapping out of the template

    * Fix errors cause by image frames

commit 9e0c29d92a164d4a4063e93480e1e289ef5243fe
Author: Alexandru Ică <alexandru@seyhanlee.com>
Date:   Thu Mar 2 15:55:10 2023 +0200

    Make use of ImageFrame in the node system more extensively (#1055) (#1062)

    Make the node system use ImageFrame more extensively (#1055)

commit 5912ef9a1a807917eeb90c1f4835bd8a5de9c821
Author: Dennis Kobert <dennis@kobert.dev>
Date:   Wed Mar 1 16:15:21 2023 +0100

    Split quantization into multiple nodes

commit 285d7b76c176b3e2679ea24eecb38ef867a79f3b
Author: Dennis Kobert <dennis@kobert.dev>
Date:   Mon Feb 27 12:35:57 2023 +0100

    Fix gpu support

commit e0b6327eebba8caf7545c4fedc6670abc4c3652e
Author: Dennis Kobert <dennis@kobert.dev>
Date:   Thu Feb 16 22:08:53 2023 +0100

    Don't watch frontend files when using tauri

commit 58ae146f6da935cfd37afbd25e1c331b615252da
Author: Dennis Kobert <dennis@kobert.dev>
Date:   Thu Feb 16 21:48:54 2023 +0100

    Migrate vue code base to vite

commit f996390cc312618a60f98ccb9cd515f1bae5006d
Author: Dennis Kobert <dennis@kobert.dev>
Date:   Thu Feb 16 19:34:33 2023 +0100

    Start migrating vue to use vite

commit 29d752f47cfd1c74ee51fac6f3d75557a378471c
Author: Dennis Kobert <dennis@kobert.dev>
Date:   Thu Feb 16 19:00:53 2023 +0100

    Kill cargo watch process automatically

commit 4d1c76b07acadbf609dbab7d57d9a7769b81d4b5
Author: Dennis Kobert <dennis@kobert.dev>
Date:   Thu Feb 16 17:37:27 2023 +0100

    Start playing around with vite infrastructure

commit 8494f5e9227aa433fd5ca75b268a6a96b2706b36
Author: Locria Cyber <74560659+locriacyber@users.noreply.github.com>
Date:   Thu Jan 19 18:40:46 2023 +0000

    Fix import style and eslint rules

commit 92490f7774a7351bb40091bcec78f79c28704768
Author: Locria Cyber <74560659+locriacyber@users.noreply.github.com>
Date:   Thu Jan 19 18:25:09 2023 +0000

    Fix icons

commit dc67821abad87f8ff780b12ae96668af2f7bb355
Author: Locria Cyber <74560659+locriacyber@users.noreply.github.com>
Date:   Thu Jan 19 18:20:48 2023 +0000

    Add license generator with rollup

commit 441e339d31b76dac4f91321d39a39900b5a79bc1
Author: Locria Cyber <74560659+locriacyber@users.noreply.github.com>
Date:   Thu Jan 19 18:14:22 2023 +0000

    Use eslint --fix to fix TS-in-svelte type imports. Now it compiles.

commit 2e847d339e7dcd51ed4c4677ed337c1e20636724
Author: Locria Cyber <74560659+locriacyber@users.noreply.github.com>
Date:   Thu Jan 19 17:31:49 2023 +0000

    Remove webpack and plugins

commit 3adab1b7f40ff17b91163e7ca47a403ef3c02fbc
Author: Dennis Kobert <dennis@kobert.dev>
Date:   Thu Mar 2 16:10:19 2023 +0100

    Fix errors cause by image frames

commit 4e5f838995e213b4696225a473b9c56c0084e7a8
Author: Alexandru Ică <alexandru@seyhanlee.com>
Date:   Thu Mar 2 15:55:10 2023 +0200

    Make use of ImageFrame in the node system more extensively (#1055) (#1062)

    Make the node system use ImageFrame more extensively (#1055)

commit 1d4b0e29c693a53c068f1a30f0e857a9c1a59587
Author: Dennis Kobert <dennis@kobert.dev>
Date:   Wed Mar 1 15:13:51 2023 +0100

    Update node graph guide readme with new syntax (#1061)

commit 6735d8c61f5709e22d2b22abd037bab417e868d6
Author: Rob Nadal <Robnadal44@gmail.com>
Date:   Tue Feb 28 18:59:06 2023 -0500

    Bezier-rs: Add function to smoothly join bezier curves (#1037)

    * Added bezier join

    * Stylistic changes per review

commit cd1d7aa7fbcce39fbbf7762d131ee16ad9cb46dd
Author: Dennis Kobert <dennis@kobert.dev>
Date:   Wed Feb 22 23:42:32 2023 +0100

    Implement let binding

    Add lambda inputs

    Fix tests

    Fix proto network formatting

    Generate a template Scoped network by default

    Add comment to explain the lambda parameter

    Move binding wrapping out of the template

* Update package-lock.json

* Regenerate package-lock.json and fix lint errors

* Readd git keep dir

* Revert change to panic.ts

* Fix clippy warnings

* Apply code review

* Clean up node_registry

* Fix test / spriv -> spirv typos
2023-03-05 13:22:14 +01:00
Keavon Chambers
6139e807d0 Fix graph scrolling bug from #1021
And replicate those changes to the Svelte version.
2023-03-03 02:28:52 -08:00
multisn8
7a52e50a94 Add 'Zoom with Scroll' input navigation scheme to preferences (#1021)
* Add use_scroll_as_zoom field to preference handler

* Add {Create,Delete}Mapping variants to message

* Revert "Add {Create,Delete}Mapping variants to message"

This reverts commit 0ba74754c9fb0c78d0b590c96e1d4fe2cfdd13e7.

* Revert "Add use_scroll_as_zoom field to preference handler"

This reverts commit d30f7c9edfa6d6e156939ca07f4db81f288975fd.

* Add basic scroll_as_zoom mapping

* Create overengineered mapping patch abstraction

* Add (for now passthrough) input layout manager

* Actually handle ModifyLayout messages (untested)

* Add backend preferences <-> layout manager comms

* Add scroll-as-zoom to actual preferences UI

* Rename LayoutManager -> KeyMapping

* Add Input section to preferences and title case

* Add scrollAsZoom frontend handling code (untested)

* Handle frontend <-> preferences comms

* (broken) Move scrollAsZoom persistence into state

* Fix scrollAsZoom having no effect on node graph

* Remove debugging helpers

* Fix confusion between horizontal and vertical

* Rename feature

* Move new message handler into folder

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-02-24 07:18:04 +01:00
Keavon Chambers
33b5c0f5f4 Svelte: Fix FontInput component infinite loop 2023-02-12 01:01:40 -08:00
0HyperCube
1b0e1b9bdf Update Imaginate to output bitmap data to the graph via Image Frame node (#1001)
* Multiple node outputs

* Add new nodes

* gcore use std by default to allow for testing

* Allow multiple node outputs

* Multiple outputs to frontend

* Add ImageFrameNode to node registry

* Minor cleanup

* Basic transform implementation

* Add some logging to image encoding

* Fix ImageFrameNode

* Add transform input to Imaginate node (#1014)

* Add transform input to imaginate node

* Force the resolution to be edited with no transform

* Add transform to imaginate generation

* Fix compilation

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>

* Add labels to node outputs

* Fix seed; disable mask when transform is disconnected; add Imaginate tooltips

* Rename 'Input Multiple' node to 'Input'

* Code review

* Replicate to Svelte

* Show only the primary input chain in the Properties panel

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-02-11 08:56:31 +00:00
Keavon Chambers
d456640bb8 Fix regressions in previous PR 2023-02-09 11:53:14 -08:00
locriacyber
bf21cbf3ce Fix text overflow in text/radio buttons (#1004)
* [frontend] Clip button text, show ellipsis on overflow

* Fix CSS rules, replicate to Vue

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-02-09 09:16:54 +00:00
0HyperCube
64e62699fc Replace the image layer type with an Image node (#948)
* Use builder pattern for widgets

* Arguments to new function

* Add node graph when dragging in image

* Fix duplicate import

* Skip processing under node graph frame if unused

* Reduce node graph rerenders

* DUPLICATE ALL frontend changes into other frontend

* DUPLICATE more changes to another frontend

* Code review

* Allow importing SVG files as bitmaps

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-01-27 10:01:09 +00:00
0HyperCube
df44e8d978 Fix dragging nodes (#936) 2023-01-02 14:38:43 +00:00
0HyperCube
2bcc3d3baf Improve history states (#932)
* Add some more history states

* Fix undo whilst drawing

* Paste image history

* Toggle output and preview history

* Code review nits

* Remove extra '{'

* Fix typo

* Fix about.toml

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-01-01 22:02:44 +00:00
mfish33
be32f7949f Ability to debounce inputs going to the backend (#913)
added debouncer to slow updates to the backend

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-12-30 17:30:47 -05:00
0HyperCube
750ef06cba Add a 'Preserve Aspect Ratio' checkbox to Properties panel (#923)
* Add the link button

* Transform around pivot

* Remove log

* Fix tests

* Add a hacky two-line layout for the checkbox

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-12-28 23:21:03 +00:00
0HyperCube
dbd6a032f7 Add a button to refresh the input (#926)
* Add a button to refresh the input

* Align left of refresh button

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-12-28 21:02:03 +00:00
0HyperCube
c552edd525 Node 'Disable' and 'Preview' UX improvements (#918)
* Don't allow disabling input or output nodes

* Shortcuts to show and preview node

* Update preview tooltip and label

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-12-28 19:38:35 +00:00
Keavon Chambers
0c9f457866 Rename some Imaginate parameters 2022-12-27 14:30:54 -08:00
0HyperCube
559c05f2a9 Save the layouts, even when in the welcome screen (#916) 2022-12-27 21:24:18 +00:00
0HyperCube
d742b05d3a Diff simple layout changes to avoid excessive DOM replacements (#910)
* Add UI diffs to rust

* Clean up some js

* Fix lints

* Fix test

* Remove one unnecessary keyword

* Rename to widget path

* Rename new_val to new_value

* Rename newVal to layoutGroup in createLayoutGroup

* Extract get_widget_path to a function

* Base skipping on the layout rather than the target

* Rename to ResendActiveWidget

* Switch info to trace

* Add a link to the documentation about Object.assign

* knitpick js changes

* Add more comments to diff functions

Co-authored-by: mfish33 <maxmfishernj@gmail.com>
2022-12-25 18:56:35 +00:00
0HyperCube
8d7e6c530e Add preview and disable buttons for nodes (#905)
* Add preview and disable button

* Fix tests

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-12-25 10:28:18 +00:00
Keavon Chambers
54f438642b Fix some paper cuts 2022-12-22 23:53:36 -08:00
Keavon Chambers
efd4da616d Make Properties panel radio buttons full width 2022-12-22 17:55:39 -08:00
0HyperCube
af001f8db6 Pasting and duplicating nodes (#902)
* Pasting and duplicating nodes

* Rebind duplication

* Update selection on duplicate
2022-12-22 21:47:48 +00:00
0HyperCube
8f4f7b3cf1 Add drag to connect nodes (#901)
* Add drag to connect nodes

* Clean up node graph code

* Close node list with escape or click

* Check if line is contained within box

* Shift the nodes

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-12-22 21:14:21 +00:00
0HyperCube
49b1770c34 Drag out links to disconnect nodes (#894)
* Disconnecting Links

* Fix bug if nodeid is 0
2022-12-21 19:19:24 +00:00
0HyperCube
2732492307 Make Imaginate into a node (#878)
* Simplify document node input defenitions

* Remove imaginate layer

* Imaginate node properties

* Fix serde feature gate

* Add Proc Macro for Protonode implementation

* Fix incorrect type

* Add cargo.toml metadata

* Send imaginate params to frontend

* Fix image_creativity range

* Finish imaginate implementation

* Fix the imaginate draw tool

* Remove node-graph/rpco-macro

* Cargo fmt

* Fix missing workspace member

* Changes to the resolution

* Add checkbox for Imaginate auto resolution; improve Properties panel layouts

And fix bugs in panel resizing

* Implement the Rescale button

* Reorder imports

* Update Rust deps

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-12-20 22:51:38 +00:00
0HyperCube
9d40539dc7 Nested networks UI (#885)
* Initial UI for nested nodes

* Clean up deleting nodes

* Print address of nested network

* Add exiting network message

* Implement the breadcrumb trail

* Remove whitespace

* Fix double click not registering in Chromium

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-12-17 15:38:29 +00:00
Keavon Chambers
52117d642c Add breadcrumb trail widget (#884) 2022-12-12 09:16:40 -08:00
TrueDoctor
7d8f94462a Bundle Graphite using Tauri (#873)
* Setup tauri component for graphite editor

Integrate graphite into tauri app

Split interpreted-executor out of graph-craft

* Add gpu execution node

* General Cleanup
2022-12-07 12:49:34 +01:00
Keavon Chambers
33d5db76c0 Improve naming of nodes and 'add' menu styling 2022-12-03 23:29:55 -08:00
0HyperCube
eb9848365f Add some additional image effect nodes (#869)
* Move the Subpath type to graphene-std

* Add the transform subpath node

* Delete selected nodes

* Inserting node list on right click

* Add several bitmap manipulator nodes

* Convert add node to use f64

* Add posterize node

* Rename names randomly

* Fix naming

* Exposure node

* Fix typo

* Adjust exposure node range

* Comment out vector nodes

* Adjust exposure range again

* Posterise as ints

* Rename input

* Use >= in the to hsl function
2022-12-03 22:29:45 +00:00
0HyperCube
3dd9e88655 Add support for exposing node parameter inputs (#866)
* Add exposing inputs to graph

* Use uuids and better node positioning

* Fix accidentally refering to the wrong grid spacing

* Secondary input without primary input

* Cleanup document node types

* Rename to input and addend
2022-11-22 19:57:08 +00:00
0HyperCube
0a78ebda25 Add secondary inputs to nodes UI (#863)
* Add secondary inputs to UI

* Fix add node

* Dragging nodes

* Add ParameterExposeButton component

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-11-22 17:36:19 +00:00
0HyperCube
9d80defa14 Add inpainting and outpainting to Imaginate (#864)
* Do not select layer immediatly on drag

* Add LayerReferenceInput MVP widget

* Properties Panel

* Fix dragging marker flicker

* Change mask shape to outline

* Add mask rendering

* Simplify select code

* Remove colours

* Fix inpaint/outpaint and rearrage widget UX

* Add mask blur and mask starting fill parameters

* Guard for the case when the layer is missing

* Add icon to LayerReferenceInput to finalize its UI

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-11-21 07:00:38 +00:00
Keavon Chambers
5bf7b9fdf8 Prevent modifier key repeat from bogging down the app on WIndows
Closes #767
2022-11-20 14:02:59 -08:00
0HyperCube
2994afa6b8 Node graph improvements (#855)
* Selecting multiple nodes

* Improve logs

* Log bad types in dyn any

* Add (broken) node links

* New topological sort

* Fix reorder ids function

* Input and output node

* Add nodes that operate on images

* Fixups

* Show node parameters together with layer properties

* New nodes don't crash editor

* Fix tests

* Node positions backend

* Generate node graph on value change

* Add expose input message

* Fix tests

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-11-17 23:36:23 +00:00
Keavon Chambers
c2219527b8 Fix compilation after upgrading TypeScript 2022-11-16 20:50:53 -08:00
0HyperCube
504136b61b Add a basic API and rudimentary frontend for node graph layers (#846)
* Node graph API stub

* Rename and fix SetInputValue

* Get list of links from network

* Test populating node graph UI

* Node properties

* Fix viewport bounds

* Slightly change promise usage

* A tiny bit of cleanup I did while reading code

* Cleanup and work towards hooking up node links in Vue template

* Add the brighten colour node

* Run cargo fmt

* Add to and from hsla

* GrayscaleImage node with small perf improvement

* Fix gutter panel resizing

* Display node links from backend

* Add support for connecting node links

* Use existing message

* Fix formatting error

* Add a (currently crashing) brighten node

* Replace brighten node with proto node implementation

* Add support for connecting node links

* Update watch dirs

* Add hue shift node

* Add create_node function to editor api

* Basic insert node UI

* Fix broken names

* Add log

* Fix positioning

* Set connector index to 0

* Add properties for Heu shift / brighten

* Allow deselecting nodes

* Redesign Properties panel collapsible sections

Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2022-11-12 21:23:28 +00:00
Keavon Chambers
e8256dd350 Fix color picker alpha slider range 2022-11-12 09:11:25 -08:00
Keavon Chambers
4c16efb33d Fix several CSS compatibility issues in Safari (#841)
* Fix button margin default for Safari compatibility

* Add Safari vendor prefixes that are somehow still necessary

* Add workaround for Safari not rendering text selection

* Replace <h3> and <p> placeholder labels in floating menus with <TextLabel>

* Replace <span> elements with <TextLabel> and set its cursor for Safari
2022-11-06 00:50:45 -07:00
Keavon Chambers
3f98d1c896 Add rotation custom cursor icon for the transform cage 2022-11-05 23:02:21 -07:00
Keavon Chambers
782f528279 Add the range slider design to the NumberInput widget (#839)
* Add range slider to NumberInput

* Cleanup

* Fix event ordering causing bug in Firefox

* Polish the code

* Switch number input modes to range in relevant places
2022-11-05 22:57:19 -07:00
0HyperCube
18507b78ac Integrate the node graph as a Node Graph Frame layer type (#812)
* Add node graph frame tool

* Add a brighten

* Use the node graph

* Fix topological_sort

* Update UI

* Add icons for the tool and layer type

* Avoid serde & use bitmaps to improve performance

* Allow serialising a node graph

* Fix missing ..Default::default()

* Fix incorrect comments

* Cache node graph output image

* Suppress no-cycle import warning

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-11-05 21:38:14 +00:00
0HyperCube
1462d2b662 Add control over gradient stops (#834)
* Add gradient stops

* Better step adding

* Steps can be dragged past each other

* Swapping and switching gradient/fill

* Fix convert to gradient

* Skip non finite transforms for overlays

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-11-05 13:30:48 +00:00
Keavon Chambers
a1e061fa14 Add suffix widget non-rounding; add disabled state to many widgets 2022-11-04 15:03:22 -07:00
Keavon Chambers
ff75e0eae9 Revamp UI styling to remove accent color; improve tab navigation 2022-11-04 05:56:33 -07:00