psychedelicious
9b8db06349
refactor(ui): update size/prompts state
2024-09-06 21:27:34 +10:00
psychedelicious
d0cde66e92
refactor(ui): canvas v2 (wip)
...
fix entity count select
2024-09-06 21:27:34 +10:00
psychedelicious
f636c0eb88
refactor(ui): canvas v2 (wip)
...
delete unused file
2024-09-06 21:27:34 +10:00
psychedelicious
5760d3180e
refactor(ui): canvas v2 (wip)
...
merge all canvas state reducers into one big slice (but with the logic split across files so it's not hell)
2024-09-06 21:27:34 +10:00
psychedelicious
8c4f98131b
refactor(ui): canvas v2 (wip)
...
Fix a few more components
2024-09-06 21:27:34 +10:00
psychedelicious
959a433e61
refactor(ui): canvas v2 (wip)
...
missed a spot
2024-09-06 21:27:34 +10:00
psychedelicious
f72845a1b4
refactor(ui): canvas v2 (wip)
...
Redo all UI components for different canvas entity types
2024-09-06 21:27:34 +10:00
psychedelicious
254f4ba574
refactor(ui): canvas v2 (wip)
2024-09-06 21:27:34 +10:00
psychedelicious
d6f3b1b85f
refactor(ui): canvas v2 (wip)
2024-09-06 21:27:34 +10:00
psychedelicious
47b5b7c4b4
refactor(ui): canvas v2 (wip)
2024-09-06 21:27:34 +10:00
psychedelicious
bcfdae62e3
refactor(ui): canvas v2 (wip)
2024-09-06 21:27:34 +10:00
psychedelicious
c60f1c0031
feat(ui): bbox tool
2024-09-06 21:27:34 +10:00
psychedelicious
d76802f563
fix(ui): rect tool preview
2024-09-06 21:27:34 +10:00
psychedelicious
7b39b31f6c
fix(ui): multiple stages
2024-09-06 21:27:34 +10:00
psychedelicious
a2585a8bb1
feat(ui): decouple konva logic from nanostores
2024-09-06 21:27:34 +10:00
psychedelicious
fe0c4767c7
feat(ui): store all stage attrs in nanostores
2024-09-06 21:27:34 +10:00
psychedelicious
e0b8b82a15
feat(ui): round stage scale
2024-09-06 21:27:34 +10:00
psychedelicious
6d5b4e4471
feat(ui): generation bbox transformation working
...
whew
2024-09-06 21:27:34 +10:00
psychedelicious
1172a33117
feat(ui): wip generation bbox
2024-09-06 21:27:34 +10:00
psychedelicious
8530f8ddcc
feat(ui): wip generation bbox
2024-09-06 21:27:34 +10:00
psychedelicious
e66e4fefed
feat(ui): CL zoom and pan, some rendering optimizations
2024-09-06 21:27:34 +10:00
psychedelicious
1237e839ca
Revert "feat(ui): add x,y,scaleX,scaleY,rotation to objects"
...
This reverts commit 53318b396c967c72326a7e4dea09667b2ab20bdd.
2024-09-06 21:27:34 +10:00
psychedelicious
8ec08063f4
feat(ui): layers manage their own bbox
2024-09-06 21:27:34 +10:00
psychedelicious
0d0004018b
docs(ui): konva image object docstrings
2024-09-06 21:27:34 +10:00
psychedelicious
9124604dc4
feat(ui): add x,y,scaleX,scaleY,rotation to objects
2024-09-06 21:27:34 +10:00
psychedelicious
4f05a7b8d0
fix(ui): show color picker when using rect tool
2024-09-06 21:27:34 +10:00
psychedelicious
db766bd9ae
feat(ui): image loading fallback for raster layers
2024-09-06 21:27:34 +10:00
psychedelicious
557603d2ae
feat(ui): bbox calc for raster layers
2024-09-06 21:27:34 +10:00
psychedelicious
b46ca55c7d
feat(ui): do not fill brush preview when drawing
2024-09-06 21:27:33 +10:00
psychedelicious
4788172206
fix(ui): brush spacing handling
2024-09-06 21:27:33 +10:00
psychedelicious
6a118f172e
fix(ui): jank when starting a shape when not already focused on stage
2024-09-06 21:27:33 +10:00
psychedelicious
d5abdfa3b0
feat(ui): wip raster layers
...
I meant to split this up into smaller commits and undo some of it, but I committed afterwards and it's tedious to undo.
2024-09-06 21:27:33 +10:00
psychedelicious
1d24cb94b4
feat(ui): support image objects on raster layers
...
Just the UI and internal state, not rendering yet.
2024-09-06 21:27:33 +10:00
psychedelicious
86e7f24238
tidy(ui): clean up event handlers
...
Separate logic for each tool in preparation for ellipse and polygon tools.
2024-09-06 21:27:33 +10:00
psychedelicious
0356f970f3
feat(ui): raster layer reset, object group util
2024-09-06 21:27:33 +10:00
psychedelicious
d340038f48
feat(ui): rect shape preview now has fill
2024-09-06 21:27:33 +10:00
psychedelicious
1d5e8e07c6
feat(ui): cancel shape drawing on esc
2024-09-06 21:27:33 +10:00
psychedelicious
24f17479de
feat(ui): temp disable history on CL
2024-09-06 21:27:33 +10:00
psychedelicious
84b8096cc9
feat(ui): raster layer logic
...
- Deduplicate shared logic
- Split up giant renderers file into separate cohesive files
- Tons of cleanup
- Progress on raster layer functionality
2024-09-06 21:27:33 +10:00
psychedelicious
5c38241e33
feat(ui): add raster layer rendering and interaction (WIP)
2024-09-06 21:27:33 +10:00
psychedelicious
b590c73c08
feat(ui): scaffold out raster layers
...
Raster layers may have images, lines and shapes. These will replace initial image layers and provide sketching functionality like we have on canvas.
2024-09-06 21:27:33 +10:00
psychedelicious
68fcf9d2df
refactor(ui): revise types for line and rect objects
...
- Create separate object types for brush and eraser lines, instead of a single type that has a `tool` field.
- Create new object type for rect shapes.
- Add logic to schemas to migrate old object types to new.
- Update renderers & reducers.
2024-09-06 21:27:33 +10:00
blessedcoolant
13fb2d1f49
fix: Add Depth Anything V2 as a new option
...
It is also now the default in the UI replacing Depth Anything V1 small
2024-07-31 23:29:43 +05:30
psychedelicious
6dcdc87eb1
fix(ui): control adapter image preview
2024-06-27 13:48:40 +10:00
Mary Hipp
f01df49128
lint fix
2024-06-27 13:48:40 +10:00
Mary Hipp
98c77a3ed1
pull in spencers work
2024-06-27 13:48:40 +10:00
psychedelicious
6d067e56f2
fix(ui): on page load, if CA processed image no longer exists, re-process it
2024-06-07 10:32:28 +10:00
psychedelicious
1c5c3cdbd6
tidy(ui): organize control layers konva logic
...
- More comments, docstrings
- Move things into saner, less-coupled locations
2024-06-06 07:45:13 +10:00
psychedelicious
3db69af220
refactor(ui): generalize stage event handlers
...
Create intermediary nanostores for values required by the event handlers. This allows the event handlers to be purely imperative, with no reactivity: instead of recreating/setting the handlers when a dependent piece of state changes, we use nanostores' imperative API to access dependent state.
For example, some handlers depend on brush size. If we used the standard declarative `useSelector` API, we'd need to recreate the event handler callback each time the brush size changed. This can be costly.
An intermediate `$brushSize` nanostore is set in a `useLayoutEffect()`, which responds to changes to the redux store. Then, in the event handler, we use the imperative API to access the brush size: `$brushSize.get()`.
This change allows the event handler logic to be shared with the pending canvas v2, and also more easily tested. It's a noticeable perf improvement, too, especially when changing brush size.
2024-06-06 07:45:13 +10:00
psychedelicious
1823e446ac
fix(ui): conditionally render CL preview
...
This fixes an issue where it sometimes gets out of sync, and fixes some konva errors.
2024-06-06 07:45:13 +10:00