reset files to before desktop config, added more ui cleanup, store classes, examples

This commit is contained in:
Daniel Ledda
2021-07-05 19:21:43 +02:00
parent 0f3696b497
commit c415641d39
29 changed files with 2008 additions and 518 deletions

View File

@@ -0,0 +1,47 @@
<script lang="ts">
import CubeInput from "./CubeInput.svelte";
import {polycubes, somaDimX, somaDimY, somaDimZ} 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">
{#each {length: numCubes} as _, cubeNo}
<div class="cube-input">
<div class="padder">
<CubeInput
cubeNo={cubeNo}
/>
</div>
</div>
{/each}
</div>
<style>
.padder {
padding: 1em;
}
.cube-input {
margin: auto;
}
.container {
flex: 1 1 auto;
overflow-x: scroll;
display: flex;
flex-flow: row;
margin: auto;
}
</style>