Commit Graph

837 Commits

Author SHA1 Message Date
Keavon Chambers
dcc3eadf44 Port frontend from Vue to Svelte (WIP in separate folder, many bugs) (#964)
* Make `tauri build` just work

* Move folder: frontend/wasm -> wasm

* Create SvelteKit project with 'npx create-svelte'

* Move wasm-communication into seperate npm package

* Use wasm-pack directly and pack package.json

* Got it to work

* Add primitive build script for wasm npm module

* Fix wasm build script (python)

* Clean up glue code

* Rewrite wasm build script in node.js

* Add serde-reflection to trace types

* Add traced types

* Generate typescript (.d.ts) from Rust types

* Update .d.ts

* Finalize TS types

* Add script to update .d.ts

* Add watch command to build wasm-bindgen

* Make wasm work again

* Add sass; fix build script for windows

* Describe requirement for wasm-pack

* Add license

* Copy and reorganize vue components

* translate LayoutCol.vue

* Split app.scss into pieces

* Translate LayoutRow.svelte

* Rename scss files

* Fix compile issues on Windows

* WIP port TitleBar

* Support classes for LayoutCol/Row

* Restructure based on Vue codebase

* Port all components in window folder

* Port FloatingMenu

* Port Document panel component

* Update readme after folder move

* Update typegen: print discriminant by default

* Update typegen: Merge from branch 'tailwind' 4f14fedb

Fixes bigint & bytes

* Made Vue/webpack/eslint to accept wasm package at new location

This is quite a hack.

Those two packages are both named the same. Yes, it's an npm package inside another npm package.

- frontend/src/wasm-communication/
- frontend-svelte/glue/

'wasm/pkg/index.js' imports the correct one registered when linking.

* Port LayerTree

* Port NodeGraph

* Port Properties

* Port components in /floating-menus

* Finish porting all Vue -> Svelte components

* Change import prefix

* Revert type generation

* Revert moved wasm folder

* Revert all of @locriacyber's work on this branch

- Remove Vite and restore Webpack
- Remove SvelteKit
- Remove everything except the components I ported to Svelte
- Restore all frontend files from Vue code, now altered for Svelte

* Convert Vue's 'reactive' and 'provide' to Svelte's stores and contexts

* Fix event emitting and bi-di data flow

* Undo removal of 'update:' events

* Fix 'update:' event dispatching

* Fix usage in parent of bi-di component props

* Fix component typing, more progress towards no errors

* The page builds and opens!

* Add loading spinner and remove postcss dependency

* Make the basics of document editing work

* Fix rebase history

Co-authored-by: Locria Cyber <74560659+locriacyber@users.noreply.github.com>
2023-01-13 01:05:20 -08:00
Rob Nadal
2f7c45771e Bezier-rs: Refactor interactive demo to remove Vue (#959)
* Converted bezier example to vanilla js component

* Indent with tabs

* Add sliders

* Converted bezier example pane to vanilla js

* Implement the radio buttons + fixes

* Converted SubpathExample to vanilla js

* Converted SubpathExamplePane to vanilla js

* Removed vue components

* Remove App.vue

* Remove vue and other dependencies

* Minor fix in main.ts

* Added insert to subpath features

* Entry point tweaks

* Rename "example" to "demo"

* Kebab-case file names (except classes)

Co-authored-by: Hannah Li <hannahli2010@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-01-13 01:04:39 -08:00
Hannah Li
05a2cd32a5 Bezier-rs: Insert function for subpath (#876)
* Add manipulator

* Add manipulator group

* Add UI

* Address comments and rebase

* Renamed add_manipulator_group to insert

Co-authored-by: Rob Nadal <robnadal44@gmail.com>
2023-01-12 18:26:25 -08:00
0HyperCube
23b4306eab Pen tool redraw overlays on selection change (#960)
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-01-12 13:55:08 -08:00
Dennis Kobert
613f2d208e Update package chache before install (#962) 2023-01-12 09:43:50 +01:00
kadir
a80cc04cfd Fix hints not closing when all documents are closed (#954)
* Fixes issue of hints not closing when all documents are closed

* Fix whitespace and rewrite comment

* Close tool hints when you close all documents by doing File->Close All
2023-01-10 01:20:06 -08:00
0HyperCube
68a1ab5297 Hide handle overlays too close to the parent anchor (#951)
Hide handle overlay

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-01-08 19:32:26 -08:00
0HyperCube
5a34b3a966 Fix boolean crash with self intersecting shape (#952) 2023-01-08 18:25:06 -08:00
0HyperCube
04059f55b9 Use builder pattern for widgets (#941)
* Use builder pattern for widgets

* Arguments to new function
2023-01-08 14:34:24 +00:00
locriacyber
e5fcf5f2da Remove direct dependency on ttf_parser (#947)
Because ttf_parser updated, rustybuzz was using an older version.
2023-01-07 16:40:59 +00:00
0hypercube
caf9c12832 Fix accidental 'not' when checking for redraw 2023-01-03 18:25:59 +00:00
0HyperCube
645c9a2405 Don't show the blue outline when bloburl is set (#937) 2023-01-03 02:05:46 -08:00
Keavon Chambers
83eca77087 Fix build scripts so a failure returns a nonzero exit code 2023-01-03 01:05:09 -08:00
Dennis Kobert
2decabcda5 Manually install packages instead of using github action (#943)
Fixes the fact that CI randomly stopped working on existing code in master that already passed CI
2023-01-03 01:04:42 -08:00
0HyperCube
79078e469a Fix viewport culling with nested layers (#939)
* Fix viewport culling with nested layers

* Clean up naming
2023-01-02 15:27:11 +00:00
0HyperCube
6fca25c213 Fix dragging nodes (#936) 2023-01-02 14:38:43 +00:00
0HyperCube
2b071437ac 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 14:02:44 -08:00
0HyperCube
4f0843d2bc Fix a derivative causing NaNs in boolean ops (#934)
* Fix a derivative causing NaNs

* Better error messages around boolean ops

* Tweak error dialog wording

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2023-01-01 00:54:10 -08:00
Dennis Kobert
bf39a1dbe0 Implement the Gaussian Blur node (#933) 2022-12-31 17:30:22 -08:00
Dennis Kobert
8968e531a3 Quantization node (#887)
Add basic quantization node
2022-12-31 17:30:22 -08:00
Dennis Kobert
a492e7a4bb Restructure GPU compilation execution pipeline (#903)
* Restructure gpu compilation execution pipeline

* Add compilation server/client infrastructure

* Add wgpu executor
2022-12-31 02:52:04 +01:00
mfish33
5a4ef40d24 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 14:30:47 -08:00
Rob Nadal
664a418aaa Bezier-rs: Add project function for Subpaths (#914)
* Added subpath project function

* Set appropriate project default in single manipulator group case

* Lint

* Return optional from subpath project + stylistic changes per review

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-12-29 15:32:22 -08:00
0HyperCube
8423723e98 Gradient tool improvements (#927)
* Reuse existing gradient

* Double click to insert gradient stop

* Add history states to the gradient tool

* Do trig in viewport space so it is actually perpendicular

* Sync tool options with active gradient

* Deleting points with delete key

* More tolerance on inserting points
2022-12-29 12:00:58 -08:00
0HyperCube
98176177d3 Fix setting the position and rotation in the Properties panel (#928)
Fix setting the position and rotation in the properties panel
2022-12-29 03:29:06 -08:00
0HyperCube
904f38fa1b 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 15:21:03 -08:00
0HyperCube
df74f6f562 Only open the node graph panel after drawing a new frame to avoid layout shift interruption (#924)
* Store drag start as document position

* Don't open graph whilst drawing

* Rename to is_drawing_node_graph_frame

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-12-28 13:07:10 -08:00
0HyperCube
f51dda5149 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 13:02:03 -08:00
0HyperCube
e62526a321 Fix stuck outline overlay (#925)
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-12-28 12:21:13 -08:00
0HyperCube
cf10d04827 Allow the user to force clear any stuck overlays (#922)
Force clear overlays

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-12-28 12:19:50 -08:00
0HyperCube
c229883780 Make copying/duplicating nodes not preserve the incoming connection (#917)
* Remove wires to nodes outside of copy

* Fix logic error

* Shift pasted nodes

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-12-28 12:00:53 -08:00
0HyperCube
b660df84ba 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 11:38:35 -08:00
0HyperCube
d969a4d797 Clear properties panel and layer tree on close (#920)
* Clear properties panel and layer tree on close

* Fix on close all documents

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-12-28 14:44:11 +00:00
0HyperCube
22866acefb Round document alignment in viewport to avoid AA induced by a shift after zooming in and panning (#921) 2022-12-28 04:06:06 -08:00
Keavon Chambers
d66f09da08 Rename some Imaginate parameters 2022-12-27 14:30:54 -08:00
0HyperCube
36b2eff319 Save the layouts, even when in the welcome screen (#916) 2022-12-27 13:24:18 -08:00
0HyperCube
694890642e 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 10:56:35 -08:00
0HyperCube
01931939ff 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 02:28:18 -08:00
Keavon Chambers
6535ffeeb6 Minor logging code cleanup 2022-12-24 14:21:30 -08:00
0HyperCube
d4fe6601c1 Avoid deprecated into_serde() (#906) 2022-12-23 11:16:23 -08:00
Keavon Chambers
748c0ff7c0 Fix some paper cuts 2022-12-22 23:53:36 -08:00
Keavon Chambers
d9101533f2 Make Properties panel radio buttons full width 2022-12-22 17:55:39 -08:00
0HyperCube
1f69b0f35f Pasting and duplicating nodes (#902)
* Pasting and duplicating nodes

* Rebind duplication

* Update selection on duplicate
2022-12-22 21:47:48 +00:00
0HyperCube
537dbf266a 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
Keavon Chambers
5c6679ab98 Rename the legacy Graphene crate to document-legacy (#899)
* Rename /graphene to /document-legacy

* Update names in code
2022-12-22 02:12:05 -08:00
0HyperCube
55d5dbaf52 Better downcast panics (#898) 2022-12-22 09:27:55 +00:00
Rob Nadal
14cccc581e Bezier-rs: Added function to find intersections between a bezier and a rectangle (#897)
* added function to find intersections for a rectangle

* Added is_contained_within function
2022-12-21 18:31:21 -08:00
0HyperCube
9973e17479 Node code cleanup for vector data, and add node creation guide (#895)
* Cleanup Vector Nodes

* Add the creating nodes guide

* Rename guide as readme so GitHub shows it by default

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-12-21 11:50:40 -08:00
0HyperCube
5e95090504 Drag out links to disconnect nodes (#894)
* Disconnecting Links

* Fix bug if nodeid is 0
2022-12-21 11:19:24 -08:00
0HyperCube
4f637ee18b Show all nodes with no selection (#893)
* Show all nodes with no selection

* Slight text tweaks

* Rename to artwork

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2022-12-21 11:12:33 +00:00