-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: use a
PatternView
class to synchronize the pattern state …
…and its view (#58) * create a `PatternView` class to synchronize the pattern state and its view * use `PatternView` in the store * improve rendering performance * remove `pixi-cull` * don't store `Pattern` in the `PatternView` * make viewport control better * improve particle container event handling * extend Pixi plugins * store beads textures * return special stitches rendering * add map tests * fix back stitch drawing * fix the palette item selection * enchance back stitch drawing
- Loading branch information
Showing
24 changed files
with
2,606 additions
and
1,743 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import { invoke } from "@tauri-apps/api/core"; | ||
import type { PatternKey, Stitch } from "#/schemas/pattern"; | ||
|
||
export const addStitch = (patternKey: PatternKey, stitch: Stitch) => invoke<void>("add_stitch", { patternKey, stitch }); | ||
export const addStitch = (patternKey: PatternKey, stitch: Stitch) => | ||
invoke<boolean>("add_stitch", { patternKey, stitch }); | ||
export const removeStitch = (patternKey: PatternKey, stitch: Stitch) => | ||
invoke<void>("remove_stitch", { patternKey, stitch }); | ||
invoke<boolean>("remove_stitch", { patternKey, stitch }); |
Oops, something went wrong.