diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 0000000..8b797b3
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,9 @@
+repos:
+ - repo: https://github.com/pre-commit/mirrors-eslint
+ rev: "v8.28.0"
+ hooks:
+ - id: eslint
+ - repo: https://github.com/pre-commit/mirrors-prettier
+ rev: "v2.7.1"
+ hooks:
+ - id: prettier
diff --git a/.prettierrc.json b/.prettierrc.json
index 0967ef4..2589fad 100644
--- a/.prettierrc.json
+++ b/.prettierrc.json
@@ -1 +1,3 @@
-{}
+{
+ "vueIndentScriptAndStyle": true
+}
diff --git a/README.md b/README.md
index e7a8642..34b63fe 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,8 @@
Explore 1D and 2D cellular automata, with a few bells and whistles.
+![rules73](./example.png)
+
## Project setup
```
@@ -11,7 +13,7 @@ npm install
### Compiles and hot-reloads for development
```
-npm run serve
+npm run dev
```
### Compiles and minifies for production
@@ -26,9 +28,15 @@ npm run build
npm run lint
```
+### Format files
+
+```
+npm run format
+```
+
### Customize configuration
-See [Configuration Reference](https://cli.vuejs.org/config/).
+See [Configuration Reference](https://vitejs.dev/guide/).
### References
diff --git a/example.png b/example.png
new file mode 100644
index 0000000..f42f4e1
Binary files /dev/null and b/example.png differ
diff --git a/package-lock.json b/package-lock.json
index 3b9c46f..931d38d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10,9 +10,9 @@
"dependencies": {
"@vitejs/plugin-vue": "^3.2.0",
"install": "^0.13.0",
+ "pinia": "^2.0.27",
"vite": "^3.2.4",
- "vue": "3.2",
- "vuex": "4.1"
+ "vue": "3.2"
},
"devDependencies": {
"eslint": "^8.28.0",
@@ -1548,6 +1548,56 @@
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
"integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="
},
+ "node_modules/pinia": {
+ "version": "2.0.27",
+ "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.0.27.tgz",
+ "integrity": "sha512-nOnXP0OFeL8R4WjAHsterU+11vptda643gH02xKNtSCDPiRzVfRYodOLihLDoa0gL1KKuQKV+KOzEgdt3YvqEw==",
+ "dependencies": {
+ "@vue/devtools-api": "^6.4.5",
+ "vue-demi": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/posva"
+ },
+ "peerDependencies": {
+ "@vue/composition-api": "^1.4.0",
+ "typescript": ">=4.4.4",
+ "vue": "^2.6.14 || ^3.2.0"
+ },
+ "peerDependenciesMeta": {
+ "@vue/composition-api": {
+ "optional": true
+ },
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/pinia/node_modules/vue-demi": {
+ "version": "0.13.11",
+ "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.13.11.tgz",
+ "integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==",
+ "hasInstallScript": true,
+ "bin": {
+ "vue-demi-fix": "bin/vue-demi-fix.js",
+ "vue-demi-switch": "bin/vue-demi-switch.js"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/antfu"
+ },
+ "peerDependencies": {
+ "@vue/composition-api": "^1.0.0-rc.1",
+ "vue": "^3.0.0-0 || ^2.6.0"
+ },
+ "peerDependenciesMeta": {
+ "@vue/composition-api": {
+ "optional": true
+ }
+ }
+ },
"node_modules/postcss": {
"version": "8.4.19",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.19.tgz",
@@ -1969,17 +2019,6 @@
"eslint": ">=6.0.0"
}
},
- "node_modules/vuex": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/vuex/-/vuex-4.1.0.tgz",
- "integrity": "sha512-hmV6UerDrPcgbSy9ORAtNXDr9M4wlNP4pEFKye4ujJF8oqgFFuxDCdOLS3eNoRTtq5O3hoBDh9Doj1bQMYHRbQ==",
- "dependencies": {
- "@vue/devtools-api": "^6.0.0-beta.11"
- },
- "peerDependencies": {
- "vue": "^3.2.0"
- }
- },
"node_modules/which": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
@@ -3083,6 +3122,23 @@
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
"integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="
},
+ "pinia": {
+ "version": "2.0.27",
+ "resolved": "https://registry.npmjs.org/pinia/-/pinia-2.0.27.tgz",
+ "integrity": "sha512-nOnXP0OFeL8R4WjAHsterU+11vptda643gH02xKNtSCDPiRzVfRYodOLihLDoa0gL1KKuQKV+KOzEgdt3YvqEw==",
+ "requires": {
+ "@vue/devtools-api": "^6.4.5",
+ "vue-demi": "*"
+ },
+ "dependencies": {
+ "vue-demi": {
+ "version": "0.13.11",
+ "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.13.11.tgz",
+ "integrity": "sha512-IR8HoEEGM65YY3ZJYAjMlKygDQn25D5ajNFNoKh9RSDMQtlzCxtfQjdQgv9jjK+m3377SsJXY8ysq8kLCZL25A==",
+ "requires": {}
+ }
+ }
+ },
"postcss": {
"version": "8.4.19",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.19.tgz",
@@ -3324,14 +3380,6 @@
"semver": "^7.3.6"
}
},
- "vuex": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/vuex/-/vuex-4.1.0.tgz",
- "integrity": "sha512-hmV6UerDrPcgbSy9ORAtNXDr9M4wlNP4pEFKye4ujJF8oqgFFuxDCdOLS3eNoRTtq5O3hoBDh9Doj1bQMYHRbQ==",
- "requires": {
- "@vue/devtools-api": "^6.0.0-beta.11"
- }
- },
"which": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
diff --git a/package.json b/package.json
index 8590f1b..0788df7 100644
--- a/package.json
+++ b/package.json
@@ -12,9 +12,9 @@
"dependencies": {
"@vitejs/plugin-vue": "^3.2.0",
"install": "^0.13.0",
+ "pinia": "^2.0.27",
"vite": "^3.2.4",
- "vue": "3.2",
- "vuex": "4.1"
+ "vue": "3.2"
},
"devDependencies": {
"eslint": "^8.28.0",
diff --git a/src/App.vue b/src/App.vue
index 1519d90..b86443a 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,66 +1,153 @@
-
Cellular Automata Explorer
+
+ {{
+ mainMenu == true ? "▼" : "☰"
+ }}
+ Cellular Automata Explorer
+
-
+
+
-
diff --git a/src/components/CanvasBoard.vue b/src/components/CanvasBoard.vue
index a7edc56..f0a9129 100644
--- a/src/components/CanvasBoard.vue
+++ b/src/components/CanvasBoard.vue
@@ -1,146 +1,149 @@
-
-
-
+
diff --git a/src/components/MainMenu.vue b/src/components/MainMenu.vue
index 86166fd..a1c3488 100644
--- a/src/components/MainMenu.vue
+++ b/src/components/MainMenu.vue
@@ -1,5 +1,5 @@
-