🚀 avoid drawing cell that are not in the original contribution grid

This commit is contained in:
platane
2020-10-19 23:06:55 +02:00
parent 89e2630eec
commit 2e818ce425
3 changed files with 28 additions and 20 deletions

View File

@@ -1,7 +1,8 @@
import { Grid, Color } from "@snk/compute/grid";
import { drawGrid } from "./drawGrid";
import { Snake } from "@snk/compute/snake";
import { drawSnake, drawSnakeLerp } from "./drawSnake";
import type { Grid, Color } from "@snk/compute/grid";
import type { Point } from "@snk/compute/point";
import type { Snake } from "@snk/compute/snake";
export type Options = {
colorDots: Record<Color, string>;
@@ -11,6 +12,7 @@ export type Options = {
sizeCell: number;
sizeDot: number;
sizeBorderRadius: number;
cells?: Point[];
};
export const drawStack = (