Commit Graph

712 Commits

Author SHA1 Message Date
Keavon Chambers
f2db20f061 Remake Eyedropper tool to sample pixel colors from viewport canvas (#801)
* Remake Eyedropper tool to sample pixel colors from viewport canvas

* Bug fixes

* Reorder export buttons

* Remove the larger primary/secondary ring

* Add aborting with Escape
2022-10-21 01:50:02 -07:00
Keavon Chambers
30719bdc72 Integrate Stable Diffusion with the Imaginate layer (#784)
* Add AI Artist layer

* WIP add a button to download the rendered folder under an AI Artist layer

* Successfully download the correct image

* Break out image downloading JS into helper function

* Change file download from using data URLs to blob URLs

* WIP rasterize to blob

* Remove dimensions from AI Artist layer

* Successfully draw rasterized image on layer after calculation

* Working txt2img generation based on user prompt

* Add img2img and the main parameters

* Fix ability to rasterize multi-depth documents with blob URL images by switching them to base64

* Fix test

* Rasterize with artboard background color

* Allow aspect ratio stretch of AI Artist images

* Add automatic resolution choosing

* Add a terminate button, and make the lifecycle more robust

* Add negative prompt

* Add range bounds for parameter inputs

* Add seed

* Add tiling and restore faces

* Add server status check, server hostname customization, and resizing layer to fit AI Artist resolution

* Fix background color of infinite canvas rasterization

* Escape prompt text sent in the JSON

* Revoke blob URLs when cleared/replaced to reduce memory leak

* Fix welcome screen logo color

* Add PreferencesMessageHandler

* Add persistent storage of preferences

* Fix crash introduced in previous commit when moving mouse on page load

* Add tooltips to the AI Artist layer properties

* Integrate AI Artist tool into the raster section of the tool shelf

* Add a refresh button to the connection status

* Fix crash when generating and switching to a different document tab

* Add persistent image storage to AI Artist layers and fix duplication bugs

* Add a generate with random seed button

* Simplify and standardize message names

* Majorly improve robustness of networking code

* Fix race condition causing default server hostname to show disconnected when app loads with AI Artist layer selected (probably, not confirmed fixed)

* Clean up messages and function calls by changing arguments into structs

* Update API to more recent server commit

* Add support for picking the sampling method

* Add machinery for filtering selected layers with type

* Replace placeholder button icons

* Improve the random icon by tilting the dice

* Use selected_layers() instead of repeating that code

* Fix borrow error

* Change message flow in progress towards fixing #797

* Allow loading image on non-active document (fixes #797)

* Reduce code duplication with rasterization

* Add AI Artist tool and layer icons, and remove ugly node layer icon style

* Rename "AI Artist" codename to "Imaginate" feature name

Co-authored-by: otdavies <oliver@psyfer.io>
Co-authored-by: 0hypercube <0hypercube@gmail.com>
2022-10-18 22:33:27 -07:00
TrueDoctor
06acd45a81 Rework DynAnyNode design to work with the borrow stack (#796) 2022-10-15 03:02:58 +02:00
0hypercube
99d92ef887 Some initial testing on dynamic nodes and composition
* Test use of borrow stack
2022-10-15 02:45:02 +02:00
TrueDoctor
e3237b2c4e Implement the initial Document Nodes system (#795)
* Add testcase for flattening graph

* Implement equality for Values

* Implement input resolution
2022-10-15 02:02:50 +02:00
Keavon Chambers
9f96d80bea Add building instructions to the website contribute page 2022-10-14 10:09:37 -07:00
Brian Wo
a0165e27cc Fix view mode affecting result of image export (#790) 2022-10-10 13:03:28 -07:00
Brian Wo
b57100e177 Fix wrong hyperlink on website home page (#785)
Fix wrong url path in website
2022-10-08 15:44:04 -07:00
Keavon Chambers
2ee57df709 Break apart and improve the JS for rasterizing SVGs and downloading files (#786)
It now uses a blob URL instead of a data URL in the download process, which is cleaner and better performance.
2022-10-08 11:34:31 -07:00
Thomas Cheng
7291edeef5 Convert reduce() and offset() Bezier-rs wasm demo functions to render as SVG (#783)
* convert reduce and offset wasm func to return svg

* address comments
2022-10-05 23:54:02 -04:00
Hannah Li
273f1a38f3 Bezier-rs: continue converting demos from canvas to SVG (#779)
* Convert constructor to use svg

* Convert the through_points functions to svg

* Convert length, lut, derivative, and tangent from canvas to svg

* Fixed bug when t1 == t2 in split

* Converted split and trim to use svg representation, and swapped slider options default to use quadratic options

* Convert normal and curvature to use svg representation in bezier-rs-demos

* Convert the project function to use svg representation in bezier-rs-demos

* Convert the local_extrema, bbox, and inflections to use svgs

* Add text offset constants

* Fix typo

Co-authored-by: Robert Nadal <Robnadal44@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-09-27 17:37:30 -07:00
Hannah Li
aff454ec77 Bezier-rs: Convert from canvas to svg for constructors (#776)
* Convert constructor to use svg

* Convert the through_points functions to svg

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-09-26 19:14:27 -07:00
Keavon Chambers
6e12651c56 Add website link prompting to subscribe to the newsletter 2022-09-25 01:45:59 -07:00
0HyperCube
ac4b33f9f5 Fix image importing due to incorrect variable name (#781) 2022-09-23 10:53:03 -07:00
Keavon Chambers
461064c81d Improve the website and readme with details and cleanup 2022-09-16 01:29:33 -07:00
Boutillier
74624bb531 Fix crashes related to 0-scale shapes (#777)
* Fix crashes when dragging the bounding box/transform cage of a 0-scale shape.

* Fix crashes when dragging the pivot point of a 0-scale shape

* Fix rotation computation on DAffine2 when scale.x is 0, avoids Nan display

* remove remaining log::info that I introduced in earlier commit

* Fix crash when updating the scale of a transform that was already 0.

* Fix NumberInput behaviour when the requested value changed is does not happen.

* Fix rotation computation when Scale X and Scale Y are both 0. Display 0. This also fixes crashes when modifying the rotation in such case
2022-09-12 01:46:11 -07:00
0HyperCube
74737bc13d #[macro_use] the log crate (#775) 2022-09-08 13:14:01 -07:00
Keavon Chambers
242a242809 Improve wording on the website home page; add a volunteer icon 2022-09-04 14:31:08 -07:00
Hannah Li
0a1665b87d Refactor bezier-rs' to_svg functionality (#758)
* Change Bezier to_svg to include handles and endpoints

* Move params into brackets of format macro, remove unused comment

* Use write macro instead of format

* Fix path for watched directory

* Refactor functions to remove ToSVGOptions
2022-09-01 23:13:39 -04:00
0HyperCube
131f24300a Add a pivot widget to selected layer(s) to control the origin(s) (#772)
* Add pivot

* Add dragging pivot

* Cleanup

* Remove tabs

* Fix multiplication order

* Restyle pivot

* Add move cursor icon

* Update pivot size

* Code review tweaks

* Fix alt with non-centred pivot

* Comment for add one

* Pivot sets layer panel origin

* Tweek alt centre thing

* Fix division by zero case

* Add pivot dots to properties

* FIx some typos

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-08-30 14:36:33 -07:00
Keavon Chambers
1e723b8c86 Add the Pivot Assist widget
Part of #525
2022-08-29 00:08:01 -07:00
0HyperCube
440a9a6dd6 Fix transformation cage centered-scaling to use the center as its pivot (#769)
* Add centre of transformation

* Add alt support

* New breaking file format version

* Spelling

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-08-28 17:30:45 -07:00
0HyperCube
a6bdabcbaa Add Alt-dragging to duplicate layers (#762)
* Add alt drag to duplicate

* Allow duplicating whilst dragging

* Remove unused variable

* Clearer names for functions

* Better renaming of functions

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-08-28 13:33:21 -07:00
0HyperCube
7ca45c25e1 Use .then() instead of .after() for sequencing nodes (#760)
* Add .then() for sequencing nodes

* Remove all uses af after

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-08-28 12:52:46 -07:00
0HyperCube
cac92ad9a2 Fix fast drag with path tool eating handles (#763)
* Fix fast drag with path tool eating handles

* Remove extra space

* Import ordering

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-08-27 18:19:20 -07:00
0HyperCube
3c2bc04c3c Stop dragging after deselecting point with Shift key (#764)
Stop dragging after deselecting point with shift

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-08-27 17:38:45 -07:00
0HyperCube
9b67a96adf Prevent using G/R/S without any layers selected (#761)
Stop users from using g/r/s without selected layers

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-08-27 15:21:26 -07:00
0HyperCube
f18acd055e Fix licenses (#765) 2022-08-27 13:49:19 -07:00
Keavon Chambers
8f59289c5d Remove usage of 'null' in favor of 'undefined' 2022-08-26 00:24:20 -07:00
Keavon Chambers
078cc4373f Enable some TS consistency lints 2022-08-26 00:24:10 -07:00
Keavon Chambers
33e790dc86 Prefix all type imports with the 'type' keyword where appropriate 2022-08-26 00:10:41 -07:00
Keavon Chambers
7848391f6e Clean up MenuList types and fix many Vue and Clippy warnings
Also remove hard-coded-in-Vue Graphite logo in the menu bar in favor of a Rust definition.
2022-08-26 00:10:41 -07:00
Keavon Chambers
5ad76bec6e Clean up camelCase and snake_case in frontend code 2022-08-26 00:10:15 -07:00
Dennis
d566ba852d Impl DynNode 2022-08-23 14:02:50 -07:00
Keavon Chambers
5531fc690f Add grayscale sample image for its node graph test 2022-08-23 14:00:17 -07:00
0hypercube
9548c30a93 Fix cargo-deny 2022-08-23 14:00:17 -07:00
Dennis
ce9e02f36d Make node trait consume self 2022-08-23 14:00:17 -07:00
Dennis
fa0b896825 Implement image loding test 2022-08-23 14:00:17 -07:00
Dennis
7eb050092c Add tests for op nodes 2022-08-23 14:00:17 -07:00
Dennis
abf04753e2 Implement cons node 2022-08-23 14:00:17 -07:00
Dennis
a6a41c4b97 Add test for gray scale node
# Conflicts:
#	node-graph/gcore/src/raster.rs
2022-08-23 14:00:17 -07:00
Dennis
6b45927a60 Reintroduce input for the node trait
# Conflicts:
#	node-graph/gcore/src/raster.rs
2022-08-23 14:00:17 -07:00
0HyperCube
3775aedab1 Add point insertion to the Path tool (#754)
* Messaging cleanup

* Add bezier iter

* Add splitting

* Use bezier_rs bounding box

* Cleanup

* Fix comments

* Fix typo

* Code review tweaks

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-08-21 14:43:24 -07:00
0HyperCube
d8b4055bcb Add path closing and segment extension to the Pen tool (#753)
* Close paths with pen tool

* Issue Z command always at end of path

* Small code review style changes

* Extending paths

* Fix mirror on extend path

* Code review tweaks

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-08-20 16:36:17 -07:00
Daniel Childs
a40b6a0aa1 Nudge selected artboard with arrow keys (#701) (#756) 2022-08-20 13:13:22 -07:00
Hannah Li
d8424fc0af Divide the large Bezier-rs implementation file into smaller ones (#751)
* Refactor bezier lib file into a separate folder

* Add better implementation comments

* Update import of Subpath from bezier-rs

* Add comment to describe compare.rs

* Remove printlns and adjust spacing
2022-08-18 15:47:36 -07:00
0HyperCube
dd3d33e523 Fix images and text again (#752)
* Images and text now work again

* Fix crash on load images
2022-08-18 13:40:34 +01:00
0HyperCube
3dc36297d0 Fix a new non-infinite document getting a NaN zoom (#750) 2022-08-15 11:11:06 -07:00
Keavon Chambers
763cdbb100 Move bezier-rs into libraries folder and deploy its interactive docs 2022-08-15 00:17:31 -07:00
Keavon Chambers
44eb83c9b3 Fix logic bug in key internationalization for A-Z keys in alternate layouts 2022-08-14 13:57:01 -07:00