added examples, begun work on saves

This commit is contained in:
Daniel Ledda
2021-07-05 23:29:25 +02:00
parent c415641d39
commit 97cb0bc550
8 changed files with 176 additions and 89 deletions

View File

@@ -1,21 +1,9 @@
<script lang="ts">
import CubeInput from "./CubeInput.svelte";
import {polycubes, somaDimX, somaDimY, somaDimZ} from "../store";
import {polycubes} from "../store";
export let numCubes;
$: numCubes = $polycubes.length;
window.addEventListener("keypress", () => {
for (const cube of $polycubes) {
console.log({
name: "",
dimX: $somaDimX,
dimY: $somaDimY,
dimZ: $somaDimZ,
cubes: $polycubes.map(cube => ({space: cube.getRaw(), color: cube.getColor()})),
});
}
});
</script>
<div class="container">