Commit graph

2382 commits

Author SHA1 Message Date
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
f46f113b93 Fix incorrect wasm mime type (#879) 2022-12-12 11:13:54 +01: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
Thomas Cheng
52cc770a1e Bezier-rs: Add parametric evaluate and line intersect to subpath (#852)
* add slider to subpath component + change evaluate to take an enum

Co-authored-by: Rob Nadal <RobNadal@users.noreply.github.com>

wip - add intersect to subpath, TODO fix bug

Co-authored-by: Rob Nadal <RobNadal@users.noreply.github.com>

add unit tests to subpath intersections

stress, testing

Co-authored-by: Hannah Li <hannahli2010@gmail.com>

* add parametric eval impl to subpath

* add line intersection to subpath

* Uncomment and #[ignore] disabled tests

* Reorder a few imports

* change subpath:eval slider to radio button

* fixed bug with solve_cubic, fixed unit tests, improved intersection accuracy

* fix failing test

Co-authored-by: Hannah Li <hannahli2010@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-12-11 00:41:02 -05:00
0HyperCube
9a4af4f87a Fix inability to expose the Add node's parameter (#877)
* Fix add node

* Simplify document node input defenitions
2022-12-10 23:54:14 +00:00
TrueDoctor
57a1f653e1 Implement node graph gpu execution via vulkano and rust gpu (#870)
* Add Executor abstraction

* Resolve inputs for proto nodes by adding compose nodes

* Add infrastructure for compiling gpu code

* Integrate nodegraph gpu execution into graph-crafter

* Extract graphene core path from env vars

* Make Color struct usable for gpu code
2022-12-05 12:56:36 +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
59b638e4e4 Fix Crashing on Smoothing Vertex (#868)
Fix occasional crashing on smoothing a vertex in a path by double clicking.
2022-11-27 18:57:15 +00:00
0HyperCube
89a431e084 Fix Smoothing on Close Path (#867) 2022-11-24 22:22:13 +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
Keavon Chambers
d46658e189 Fix Imaginate generation with base image but no mask 2022-11-21 11:21:43 -08: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
ccdfdd3015 Add double clicking a node frame to open the graph panel (#862)
Double Click to Open Node UI
2022-11-19 21:27:44 +00:00
Hannah Li
01a9724389 Bezier-rs: Add Euclidean parameterization to Bezier::evaluate (#828)
* Add enum to evaluate for differenciating compute type

* Add euclidean parameterization and update styling in the UI

Co-authored-by: Rob Nadal <robnadal44@gmail.com>

* Update usage of evaluate in graphite

* Add description

* Code review changes

* Update tests

* Improve ComputeType ergonomics

* Large code review/cleanup pass

Co-authored-by: Rob Nadal <robnadal44@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-11-18 20:37:52 -08:00
Rob Nadal
a220bfa759 Bezier-rs: Remove unused legacy drawing components and structs (#853)
* Removed unused legacy drawing components

* Removed Point abstraction from frontend code

* Code review fixes

* Helper lambdas to functions

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-11-18 00:34:52 -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
bbe98d3fe3 Add GitHub Sponsors link for core team 2022-11-17 11:53:28 -08:00
Keavon Chambers
c2219527b8 Fix compilation after upgrading TypeScript 2022-11-16 20:50:53 -08:00
Keavon Chambers
c93ad3eb0d Update frontend node.js packages 2022-11-16 18:36:34 -08:00
Keavon Chambers
14e0582494 Update bezier-rs interactive demos node.js packages 2022-11-16 18:31:21 -08:00
Keavon Chambers
cece6de2a9 Bump MSRV to 1.65.0 for let-else syntax
Closes #857
2022-11-16 18:04:04 -08:00
Rob Nadal
00c8fa83c2 Bezier-rs: Convert to_svg used in subpaths to match style used in beziers (#854)
Converted subpath::to_svg to Bezier style
2022-11-14 22:37:06 -08:00
Keavon Chambers
9c87658ae4 Change Imaginate image creativity to a percentage 2022-11-12 14:36:12 -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
0HyperCube
9d27781c37 Reduce history system's excessive memory usage from storing copies of images each step (#845)
* Limit saved undo history

* Do not commit path every mouse move event

* Reference count images in history system instead of cloning the image data

* Increase history storage step limit to 100

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-11-11 19:44:43 +00:00
0HyperCube
a756a2dd3b Fix disappearing path when it is closed with the Pen tool by drawing from its start point (#844) 2022-11-09 21:57:06 +00:00
Keavon Chambers
06791cc197 Fix opacity slider range bug 2022-11-08 16:25:55 -08:00
Keavon Chambers
c4d14eed16 Update frontend and bezier-rs demo npm dependencies 2022-11-08 15:11:53 -08:00
Keavon Chambers
ac091e5769 Fix swapped boolean subtract modes 2022-11-08 01:09:51 -08:00
Keavon Chambers
916dc8277a Add new sampling methods to Imaginate 2022-11-07 00:37:17 -08:00
Rob Nadal
56060b8e5f Bezier-rs: Added curve outline functions (#789)
* Implement offset and reverse

Co-authored-by: Rob Nadal <robnadal44@gmail.com>

* Initial work on graduated outline

Co-authored-by: Rob Nadal <robnadal44@gmail.com>

* Handle linear case for graduated scale

* Added skewed outline, fixed graduated scale hourglass bug

* Removed test code

* Update comments

* Fix linting issue

* Improve comments

* Comment fixes

Co-authored-by: Hannah Li <hannahli2010@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-11-06 21:25:00 -08:00
Hannah Li
a695584d36 Bezier-rs: Add a pivot point to the 'rotate' function (#792)
* Add function to rotate around a point

* Update svg

* Improve rotation line-to-center styling

* Add second angle of lines

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-11-06 20:52:58 -08:00
Linda Zheng
9eb2b9f6a3 Bezier-rs: Convert 'arcs' wasm function from canvas to SVG rendering (#833)
* Convert rotate demo to svg

* Fix bugs in rotate

* Fix bugs in rotate

* Draft of decasteljau to svg

* fixed de casteljau points to_svg impl

* clean up wasm impl for de casteljau points

* Use svg format in wasm for arcs

* Update app.vue

* Fix arcs as svg

Co-authored-by: Linda Zheng <ll2zheng@uwaterloo.ca>

* Remove comments

* Reduce code duplication

Co-authored-by: Thomas Cheng <contact.chengthomas@gmail.com>
Co-authored-by: Hannah Li <hannahli2010@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-11-06 23:04:30 -05:00
Linda Zheng
398f6618e4 Bezier-rs: Convert 'rotate' and 'de casteljau' wasm functions from canvas to SVG rendering (#793)
* Convert rotate demo to svg

* Fix bugs in rotate

* Fix bugs in rotate

* Draft of decasteljau to svg

* fixed de casteljau points to_svg impl

* clean up wasm impl for de casteljau points

* Address Hannah's comments

* Nits

Co-authored-by: Thomas Cheng <contact.chengthomas@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-11-06 21:34:53 -05:00
Jackie Chen
4483e98f21 Bezier-rs: Convert intersection functions to SVG (#791)
* Break handle of path being drawn by placing anchor on previous anchor with Pen tool (#814)

* Break path by placing anchor on previous one

* Fix offset on click without dragging

* Fix bug where ids reassigned from saved document

* Fix stuck overlay

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

* convert intersection functions to svg

* fixed nits

Co-authored-by: 0HyperCube <78500760+0HyperCube@users.noreply.github.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-11-06 18:14:44 -08:00
Keavon Chambers
16afe91944 Change favicon/app manifest theme color to white 2022-11-06 01:55:48 -07: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
Keavon Chambers
f7fd1d94eb Move browser incompatibility check outside the JS bundle 2022-11-02 18:01:38 -07:00
Keavon Chambers
5be59f7fce Update the Imaginate image generation API (#836)
* Update the Imaginate feature server API

* Change connection status strategy to prevent console errors

* Possible CORS fix? Maybe revert.

* Update to the final API and fix bugs
2022-11-02 17:20:29 -07:00