change options, drop svg_out_path in favor of outputs list

This commit is contained in:
Platane
2022-04-11 23:19:33 +02:00
committed by GitHub
parent 579bcf1afe
commit 6b320a1ac4
25 changed files with 296 additions and 154 deletions

View File

@@ -6,7 +6,7 @@ import type { Snake } from "@snk/types/snake";
import {
drawLerpWorld,
getCanvasWorldSize,
Options,
Options as DrawOptions,
} from "@snk/draw/drawWorld";
import { userContributionToGrid } from "@snk/action/userContributionToGrid";
import { createSvg } from "@snk/svg-creator";
@@ -120,7 +120,7 @@ const createViewer = ({
}: {
grid0: Grid;
chain: Snake[];
drawOptions: Options;
drawOptions: DrawOptions;
}) => {
//
// canvas
@@ -229,11 +229,11 @@ const onSubmit = async (userName: string) => {
);
const { cells, colorScheme } = (await res.json()) as Res;
const drawOptions = {
sizeBorderRadius: 2,
const drawOptions: DrawOptions = {
sizeDotBorderRadius: 2,
sizeCell: 16,
sizeDot: 12,
colorBorder: "#1b1f230a",
colorDotBorder: "#1b1f230a",
colorDots: colorScheme as any,
colorEmpty: colorScheme[0],
colorSnake: "purple",