Commit Graph

1348 Commits

Author SHA1 Message Date
Keavon Chambers 15931d06b1 Hacky performance fix for caching slow nodes in demo artwork until #1607 is done 2024-02-15 16:33:04 -08:00
Keavon Chambers fc8b41914b
Fix anti-aliasing in overlays by aligning everything with the pixel grid (#1603) 2024-02-13 20:47:16 -08:00
Keavon Chambers b18822b1b4 Improve clarity of some complex CSS logic 2024-02-13 16:48:42 -08:00
Keavon Chambers 7453fe01a3 Finalize GSoC 2024 project idea list 2024-02-11 21:20:00 -08:00
Keavon Chambers 1bf62d92c2 Automatically include all demo artwork in test 2024-02-08 01:15:32 -08:00
Keavon Chambers 9edd9233db Update website and add student project info 2024-02-06 09:22:26 -08:00
Keavon Chambers 12e16b9a4e Add Red Dress demo artwork 2024-02-05 14:41:07 -08:00
zhiyuan e1735ddf84 Fix Select tool's broken undo (#1597)
Fix select tool undo
2024-02-05 14:40:27 -08:00
Keavon Chambers 7e5069f638 Copy to Points node: Add "Random Scale Bias" parameter 2024-02-05 05:31:28 -08:00
zhiyuan 9530e55ace
Split widget callbacks into update and commit so only the latter adds a history state (#1584)
* feat: split commit and update layout

* feat: add on_commit callback

* Code review

* fix: refactor

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-02-05 01:32:15 -08:00
Nikita-str f25038067e
Path tool: sliding point insertion (#1581)
* #1578 sliding point works(1st approx)

TODO:
* don't move too close to the side points
* double click works incorrect?
* do we need to jump from segment to segment?

* #1578 disallow move slide point too close to side points

* fix double click + ctrl insertion

* #1578 select insertion point (except `ctrl` case)

* #1578 far depends on line width & more accurate seg finding

* #1578 insert point on most top suitable selected layer

* #1581 draw insertion point by overlay  + `Esc` abort

* #1581 sharp stay unchanged on double click

* #1581 fix incorrect handle of scaling

* #1581 `square` selection point & too close in px(instead of magic)

* #1581 bug fix: insertion point on unselection

* #1581 use `color: Option` instead of `SelectionType`

* Some code review, still need to review shape_editor.rs

* #1581 insert sharp point on a straight segment

Also correct insertion on quadratic segments

`ManipulatorGroup::have_handle` have such form because `handle = Some(self.anchor)` often used instead of `handle = None`

* Final code review pass

* Code review pass

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-02-05 08:45:25 +00:00
zhiyuan a412a77062
Support for deleting points to break path (#1593)
* feat: break closed curve

* feat: update hotkeys and handles

* feat: break an open path

* feat: elegantly handle breaking at multi points in a subpath

* feat: handle break at end points

* feat: ctrl+delete to remove segments and break path

* fix: rm unused

* First code review pass

* fix: closed eclipse handles after breaking path

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-02-04 21:02:09 -08:00
zhiyuan a4a2680ac4
Freehand tool: Allow extension of existing paths (#1594)
* feat: extend freehand path

* fix: rm logs

* fix: rename variable
2024-02-04 13:36:25 -08:00
zhiyuan 05b4582cd7
Properly handle pen tool undo and redo (#1587)
feat: properly handle pen tool undo and redo
2024-02-04 19:23:48 +00:00
0HyperCube aed30d78b8
Fix floating point error with Poisson-disk points being sampled outside shape (#1596)
* Check opposite corner

* Commets and test

* Fix compiling

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-02-04 17:16:16 +00:00
0HyperCube 5f72a6a8a1
Bezier-rs: Use nonzero winding order for Poisson-disk insideness test (#1590)
* Proper winding order for poisson dist

* More robust cubic solving

* Fix test expecting roots in a different order

* Manual sort impl

* Code review nits

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-02-04 06:05:26 +00:00
Dennis Kobert 349ec5da72
Add MemoizeImpure node and cache image base64 in graph (#1595)
* Cache base64 representation of images when converting to graphic group

* Fix build

* Fix build again

* Actually fix it this time

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-02-03 23:16:03 +01:00
Keavon Chambers 8fa46ba63a
Copy to Points node: add scale/rotation randomization parameters (#1592)
* WIP, transforms broken with rot/scale

* Transform around bounding box centre

* Add units and tooltips

---------

Co-authored-by: 0hypercube <0hypercube@gmail.com>
2024-02-01 12:20:35 -08:00
Keavon Chambers 51d6d4d30e Remove Cull node from demo artwork, follow-on to #1538 2024-01-28 23:52:01 -08:00
Keavon Chambers 8a6854e55b Fix long crash stack traces breaking the GitHub URL 2024-01-28 19:25:27 -08:00
Keavon Chambers 6b6accfb91
Add Poisson-disk sampling node and Bezier-rs 0.4 release (#1586)
* Add Poisson-disk sampling node and Bezier-rs 0.4 release

* Additional optimizations

* More performance optimizations with help from 0Hypercube

* Add comments
2024-01-28 02:25:46 -08:00
Keavon Chambers a7bf6e2459 Fix triple graph evaluation on Windows by removing hash-based ExecutionRequest dedupe 2024-01-27 16:58:15 -08:00
Keavon Chambers 99c199a8f6 Add dev container configuration 2024-01-24 23:04:00 +00:00
Keavon Chambers 63cf31d7d8 Expand website with better proceduralism explanation and documentation 2024-01-20 04:09:53 -08:00
0HyperCube 208e907fa4
Restore select tool functionality and shallow select mode (#1583)
* Restore select tool functionality

* UI tweak

* Change all of the things

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-01-18 22:28:45 +00:00
Keavon Chambers 5c9d3c5d75 UI refinements for radio buttons and the Snapping/Grid popovers 2024-01-18 05:03:43 -08:00
0HyperCube 2df329fc0e Remove old subpath code (#1582) 2024-01-17 20:42:38 -08:00
Keavon Chambers 3f76526d6d Update dependencies and reuse the same usvg version 2024-01-17 20:33:07 -08:00
Keavon Chambers b4dccb8655 Add a workaround for a Safari rendering bug with floating menus 2024-01-17 00:58:07 -08:00
0HyperCube 002151d9c0
SVG import (#1579)
* SVG import

* Fix error

* Transforms

* Code review nits

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-01-16 17:42:48 -08:00
Keavon Chambers 8eef96511e Improve document tilt and reset 2024-01-15 04:05:36 -08:00
Keavon Chambers d602603d46 Remove unused DocumentIsDirty 2024-01-15 02:51:40 -08:00
0HyperCube 8df59be1d5
Display graph errors in the viewport (#1577)
* Display graph errors in the viewport

* Polish up the styling

* Clear click targets while graph can't be rendered

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-01-15 06:18:08 +00:00
0HyperCube 484acbcde3
New node: Morph (#1576)
* Add morph node

* Range slider time parameter, better lerping

* Lerp more fill and stroke parameters

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-01-13 23:35:40 -08:00
0HyperCube 768bbe820d
Preserve group IDs in the Spline from Points node (#1574) 2024-01-14 00:49:52 +00:00
0HyperCube c777d4d430
Work around the weird treatment of the primary input (#1575)
* Work around the weird treatment of the primary input

* take2
2024-01-14 00:35:45 +00:00
0HyperCube e242ce26a0
Fix circular repeat node without bounding box (#1571) 2024-01-14 00:23:13 +00:00
0HyperCube e868bf9532
Fix path tool neighbours for normal snapping (#1570) 2024-01-13 16:08:34 -08:00
0HyperCube 47b3355950
Remove FillType::None for the fill node (#1572)
* Remove FillType::None for the fill node

* Fix demo art
2024-01-13 15:52:10 -08:00
0HyperCube e0adf1040f
Fix graph UI not rerendering (#1568) 2024-01-13 16:25:08 +00:00
0HyperCube 1ac7b92b45
Fix inferred types memory leak (#1566) 2024-01-13 16:22:35 +00:00
0HyperCube bf0ec2c9c8
Snapping improvements (#1567) 2024-01-13 08:10:24 -08:00
0HyperCube 456ca170a4
Layer and grid snapping systems (#1521)
* Grid overlays

* Rectangle tool basic snapping

* Fix bezier demos

* Fix bézier crate tests

* Constrained snapping for circle & shape tool

* Line tool snapping

* Pen tool snapping

* Path tool snapping

* Snapping whilst dragging layers (not constrained)

* Constrained drag

* Resize snapping

* Normal and tangent

* Cleanup

* Grid snapping

* Grid snapping

* Fix imports

* Fix bug in artboard tool

* Fix hang on 0 size grid spacing

* Fix NaN when scaling

* Polishing

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-01-13 14:32:10 +00:00
Keavon Chambers 78a1bb17cd Move selected node list from DocumentMetadata to the document (#1565) 2024-01-13 04:52:47 -08:00
Keavon Chambers aab0fcf84c
Update graph UI and improve simplicity and robustness of sending graph and layer panel updates (#1564)
* WIP

* Fix loading the structure of layers

* Fix broken indents

* Remove debugging stuff

* Fix displaying errors and node graph UI fixes/improvements

* Fix compilation failure

---------

Co-authored-by: 0hypercube <0hypercube@gmail.com>
2024-01-13 04:15:36 -08:00
0HyperCube 83116aa744
Fix selecting upsidedown layers (#1560) 2024-01-12 02:27:08 -08:00
Keavon Chambers 45de49fa03 Show off procedural generation on the website 2024-01-08 10:49:25 -08:00
Keavon Chambers 1727694dfc Fix a couple frontend rendering flaws 2024-01-07 07:36:36 -08:00
0HyperCube 6a10bcc3fc Bezier-rs: add Tangents/Normals to Point functions (#1547)
* Add tangent/normal to point to bézier-rs

* Add license information and general cleanup

* Bump version

* Add iframe demos

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2024-01-07 06:33:06 -08:00
0HyperCube c14c6fbe93
Fix text tool broken by #1543 (#1555)
Text tool setting font as f32
2024-01-07 13:45:32 +00:00