Commit Graph

964 Commits

Author SHA1 Message Date
0HyperCube
4a39a94534 Add cache clearing to stop the memory leak (#1106)
* Add cache clearing

* Add TODO comment

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-04-09 22:30:57 +00:00
isiko
8677981ceb Add the Mask node (#1080)
* Add MaskImageNode

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2023-04-08 19:56:44 -07:00
Keavon Chambers
9e8ac42a82 Fix crash upon setting stroke color to none 2023-04-06 18:11:45 -07:00
Keavon Chambers
3878132dbe Fix some fatal failures related to rendered frame memory size limits 2023-04-06 17:01:55 -07:00
Keavon Chambers
05e5be3200 Prevent rendering when transforming frame layer
Reduces confusion from rendering lag and lessens the opportunity to build up leaked memory from the present lack of node graph cache eviction
2023-04-06 16:59:10 -07:00
Keavon Chambers
0d6d498480 Update the website with some new content 2023-04-05 02:34:16 -07:00
Keavon Chambers
c22fa8dcae Prevent browser extensions from recoloring the UI 2023-04-04 18:32:27 -07:00
Keavon Chambers
8512bc1271 Change the edit icon used in Imaginate 2023-04-03 14:16:46 -07:00
Keavon Chambers
65d705abc7 Polish node graph frames and rename them for clarity (#1104)
* Polish layer panel UI and layer type icons/text

* Assorted UI text and comment cleanup

* Insert Transform node before Imaginate node via tool

* Rename "Node Graph Frame" to Layer type and Frame tool

* Rename "Node Graph Frame" to "Frame" tool

* Update Node Graph Frame -> Frame tool icon

* Fix lint warnings
2023-04-03 01:52:25 -07:00
0HyperCube
14cf7bef31 Fix regressions introduced in the vector nodes migration (#1100)
* Fix double click to enter path tool

* Fix error

* Fix transform bug

* Fix squaring scale on images

* Shift node position and refresh graph

* Downscale node seperate

* Fix mirror

* Remove duplicate transform

* Always show node graph

* Correctly set freehand and spline tool positions

* Run cargo format

* Maybe fix the scale

* Downscaled image is always smaller than origional

* Fix one crash

* Don't show node graph on welcome screen

* Reduce default graph panel height

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-03-31 13:15:49 -07:00
Keavon Chambers
78116f305e Bezier-rs: Replace Vue-CLI with Webpack bundler 2023-03-29 18:24:22 -07:00
Keavon Chambers
93bd17e747 Bezier-rs: Fix visualizing negative curvature on demo site 2023-03-28 17:54:11 -07:00
Keavon Chambers
adb7eea065 Bezier-rs: Release version 0.2 2023-03-28 13:04:51 -07:00
isiko
7d1a8860ff Add Range parameter to the Threshold node (#1079)
* Add Range

* Naming, order, and defaults

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-03-28 00:06:24 -07:00
Hannah Li
d1630c73de Bezier-rs: Implement miter-limit (#1096)
* Implement miter-limit approximation

* Refactor to use Join enum and address other comments

* Rustdocs improvements

* Tweaks

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-03-27 19:58:35 -07:00
Linda Zheng
f49e62a51c Bezier-rs: Add lookup table function for subpath and make it support euclidean parameterization (#1082)
* Add euclidean option for lut

* Add lut for subpath

* Fix rust formatting

* Fixed breakages caused by UI updates

* Code cleanup

* Make ProjectionOptions optional

---------

Co-authored-by: Rob Nadal <robnadal44@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-03-27 18:05:00 -07:00
Linda Zheng
508726d73f Bezier-rs: Add curvature and rotate functions to subpath (#1081)
* Add rotate and curvature

* Fix comments

* Fix case where curve is linear

* Address comments

* Fixed breakages caused by UI updates

* Scootch rotation point to center in frame

* Code review

* Visualize t value point when segment is linear

---------

Co-authored-by: Rob Nadal <robnadal44@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-03-27 16:35:57 -07:00
Rob Nadal
e24b5251f7 Revert @graphite/ path imports in website (#1095)
Reverted @graphite path imports
2023-03-27 13:39:48 -07:00
Hannah Li
93821f3e3b Bezier-rs: Add joins and caps to offsets and outlines (#1083)
* Intial work

* Improve miter and add round join

* Get arcs to go opposite direction

* Add cap and other refactors

* Rename joint to join, fix some bugs

* Fix single point issue

* Clean up

* Fix iframe sizes and update UI

* Address comments and handle single point outline

* Rename variables, fix branches in outline

* Address comments
2023-03-27 16:25:08 -04:00
Keavon Chambers
2291442186 Update readme and Task Board links 2023-03-27 11:13:53 -07:00
Sahra Zhou
71173341df Fix crash when scaling something with 0 width or height (#1078)
* resolve NaN value when trying to change scale value from zero to other numbers

* resolve NaN value when trying to change scale value from zero to other numbers

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-03-26 15:20:00 -07:00
Keavon Chambers
eac301d6f0 Code review previous commit, and improve G/R/S hints 2023-03-26 11:50:00 -07:00
0HyperCube
ac49519fa9 Migrate vector data and tools to use nodes (#1065)
* Add rendering to vector nodes

* Add line, shape, rectange and freehand tool

* Fix transforms, strokes and fills

* Migrate spline tool

* Remove blank lines

* Fix test

* Fix fill in properties

* Select layers when filling

* Properties panel transform around pivot

* Fix select tool outlines

* Select tool modifies node graph pivot

* Add the pivot assist to the properties

* Improve setting non existant fill UX

* Cleanup hash function

* Path and pen tools

* Bug fixes

* Disable boolean ops

* Fix default handle smoothing on ellipses

* Fix test and warnings

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-03-26 00:03:51 -07:00
Andre Roelofs
5759600f95 Replace TS relative @ import path (#1087)
Migrated the import shortcut used in Svelte from @ to @graphite for better future package compatibility

Co-authored-by: Andre Roelofs <andreroelofsai@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-03-25 17:39:38 -07:00
Keavon Chambers
f910b45a5b Upgrade cargo dependencies (#1090) 2023-03-25 17:29:49 -07:00
Keavon Chambers
7aa355f62f Add Imaginate help docs link to UI 2023-03-25 01:04:58 -07:00
Keavon Chambers
ae2369ef77 Update website mockup images 2023-03-22 09:35:32 -07:00
Keavon Chambers
4645cdf3f0 Skip showing auto-save document old version error 2023-03-21 09:18:28 -07:00
Keavon Chambers
2e7c0274bd Remove leftover debug logs 2023-03-21 00:41:56 -07:00
Rob Nadal
90853ab7e2 Bezier-rs: Update interactive demo site UI/UX (#1085)
* wip - change demo iframe styling

* fix typo

* change tVariant select from radio buttons to dropdown

* Added iframe styling

* fix linting errors

* Integrated tvariant picker as input options

* Updated points in demos

* Lint

* Clean up CSS

---------

Co-authored-by: Thomas Cheng <contact.chengthomas@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-03-20 22:23:02 -07:00
Keavon Chambers
dfa0d54761 Fix remaining known Svelte UI regressions
Closes #1040
2023-03-20 21:26:33 -07:00
0HyperCube
4d96e22437 Imaginate node fixes (#1084) 2023-03-18 20:34:42 +00:00
Dennis Kobert
d8de17b96f Downscale Images to document resolution (#1077)
* Add DownscaleNode

* Add lambda (call argument) input type + fix caching

* Add comment explaining Lambda input

* Automatically insert cache node after downscale node

* Implement sparse hashing of images
2023-03-15 11:49:56 +00:00
Alexandru Ică
a14af91031 Take the transform of the ImageFrame into account when blending (#1072)
* Take the transform of the ImageFrame into account when blending

The implementation computes the axis-aligned bounding box after we transform
the corners of the source image, and then iterates through that box
and computes the inverse of the affine transform of the source image.
The samples are taken based on the u/v coordinates, so that the differences
in size/aspect ratio between the images don't matter.

This makes for a much simpler implementation, and gives us the flexibility
to add different filtering methods in the future, for example.

Signed-off-by: Ică Alexandru-Gabriel <alexandru@seyhanlee.com>

* Name the parameters for the blend node properly

This avoids confusion between which one of the images is the `source`
image and which one is the `destination`.

Signed-off-by: Ică Alexandru-Gabriel <alexandru@seyhanlee.com>

* Remove rendundant computation for u/v coordinates

Signed-off-by: Ică Alexandru-Gabriel <alexandru@seyhanlee.com>

* Rewrite the sampling/clamping logic

* Add image frame transform node

* Move transform node to transform module

* Fix a few issues with our transformation logic

* Fix math + do cleanup

---------

Signed-off-by: Ică Alexandru-Gabriel <alexandru@seyhanlee.com>
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2023-03-15 12:48:13 +02:00
0HyperCube
72e4593e31 Make image downscaling have a configurable factor (#1044)
Remove downscaling
2023-03-12 06:42:44 +00:00
Keavon Chambers
0c7c689126 Fix Eyedropper tool and make Svelte's bind:this more robust 2023-03-11 12:32:01 -08:00
Christopher Mendoza
6b85eb9a43 Add Deepest and Shallowest selection to the Select tool (#1016)
* Single-clicking shape now selects the parent folder

* Added Ratio Button for Layer/Group. Task 1 Done

* All 3 bullet points been checked.Needs refactoring

* Refactored Code + Added descriptive comments

* Reduced code, removed comments, moved/renamed enum

* Hints now change based on selection behavior

* refactored updating hints based on layer behavior

* Updated hints and shift click for shallow select

* fixed cargo check warnings

* shift deselect works. Checking for edge cases

* Fixed the first 5 bullet points suggestions.

* Fixed double click issue

* Double click on shape switches to path tool

* updated deepest select and its hints

* Reworked logic for single click for shallow select

* Fixed CargoCheck warnings + Hypercube suggestions.

* Fix append -> push

* Break out two functions

* Split out big code blocks into functions

* Edit hint text

* Assorted code quality cleanup

* Combine duplicate impl blocks

* Add todo for future code cleanup

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-03-11 02:29:20 -08:00
Keavon Chambers
bc9b7c0178 Fix import being lost when running 'cargo fix' due to feature flag 2023-03-11 01:49:00 -08:00
Keavon Chambers
dd458deb32 Assorted code file cleanup following Svelte switch 2023-03-10 15:48:04 -08:00
0HyperCube
0c8df9bf51 Move G/R/S to tools folder (#1076)
* Move G/R/S to tools folder

* Fix bad cache

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-03-10 15:06:31 -08:00
Keavon Chambers
6febdea3c3 Remove all references to Vue 2023-03-10 14:14:34 -08:00
Keavon Chambers
b4a265a512 Delete the separate Svelte frontend folder 2023-03-10 14:14:34 -08:00
Keavon Chambers
14a0fc2847 Replace the Vue frontend with Svelte 2023-03-10 14:14:34 -08:00
Keavon Chambers
70428633c3 Rename .vue files to .svelte for diffing 2023-03-10 14:14:34 -08:00
Keavon Chambers
3370a0a33d Svelte bug fixes and code cleanup (#1074)
* Fix middle click tab close

* Fix swapping colors in the ColorPicker

* Cleanup

* Fix field inputs

* Fix tab key-based navigation

* Fix ColorPicker reseting Initial color when opened

* Prevent backend fighting with user dragging NumberInput

* Remaining fixes and comment cleanup
2023-03-10 03:47:06 -08:00
Keavon Chambers
baf6dfbd32 Move JS script to the top of each Vue file 2023-03-10 03:44:49 -08:00
Dennis Kobert
625ddc23df Replace hashing algorithm and disable debug logging for improved performance 2023-03-09 18:49:13 +01:00
Keavon Chambers
ff603f7d80 Fix FieldInput and several other Svelte bugs 2023-03-08 01:35:22 -08:00
Rob Nadal
72134f35f5 Bezier-rs: Made wasm imports async in demos (#1071)
* Made wasm imports async in demos

* remove hidden characters to pass linting

* Swapped import to use async / await

---------

Co-authored-by: Thomas Cheng <contact.chengthomas@gmail.com>
2023-03-07 03:08:41 +00:00
Keavon Chambers
fc56a6063e Add double click input hint icons 2023-03-05 17:49:47 -08:00