Compare commits

..

No commits in common. "6215550ff5f458d25c53d50dce18bb1b92ea061a" and "9cd0537717e4a96e7d6e446a1fc771619c4b6c46" have entirely different histories.

4 changed files with 7 additions and 6 deletions

View File

@ -2,8 +2,6 @@
Explore 1D and 2D cellular automata, with a few bells and whistles. Explore 1D and 2D cellular automata, with a few bells and whistles.
![rules73](./example.png)
## Project setup ## Project setup
``` ```

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

View File

@ -10,6 +10,9 @@
</template> </template>
<script> <script>
import { mapWritableState } from "pinia";
import { globalStore } from "../stores/index.js";
export default { export default {
name: "MenuRow", name: "MenuRow",
props: { props: {
@ -18,10 +21,9 @@
default: "", default: "",
}, },
}, },
data() { computed: {
return { // TODO: should be passed as a props/slot, not in a store
activeMenu: "", ...mapWritableState(globalStore, ["activeMenu"]),
};
}, },
methods: { methods: {
updateActiveMenu(event) { updateActiveMenu(event) {

View File

@ -27,6 +27,7 @@ export const globalStore = defineStore("globalStore", {
boardHeight: 0, boardHeight: 0,
refreshRate: 300, refreshRate: 300,
initial1dState: "onecell", initial1dState: "onecell",
activeMenu: "",
drawingDirection: "y", drawingDirection: "y",
lastBoard: {}, lastBoard: {},
draw1d: false, draw1d: false,