🚿 refactor + clean up

This commit is contained in:
platane
2020-10-20 16:53:42 +02:00
parent 2e818ce425
commit a5c9eed6cc
34 changed files with 141 additions and 250 deletions

View File

@@ -1,6 +1,6 @@
import { Color, Grid } from "@snk/compute/grid";
import { Color, Grid } from "@snk/types/grid";
import { drawLerpWorld, drawWorld } from "@snk/draw/drawWorld";
import { Snake } from "@snk/compute/snake";
import { Snake } from "@snk/types/snake";
export const drawOptions = {
sizeBorderRadius: 2,

View File

@@ -1,10 +1,10 @@
import { createCanvas } from "./canvas";
import { snakeToCells } from "@snk/compute/snake";
import { snakeToCells } from "@snk/types/snake";
import { GUI } from "dat.gui";
import { grid, snake } from "./sample";
import { getAvailableRoutes } from "@snk/compute/getAvailableRoutes";
import type { Point } from "@snk/compute/point";
import type { Snake } from "@snk/compute/snake";
import type { Point } from "@snk/types/point";
import type { Snake } from "@snk/types/snake";
//
// compute

View File

@@ -1,6 +1,6 @@
import { createCanvas } from "./canvas";
import { getBestRoute } from "@snk/compute/getBestRoute";
import { Color, copyGrid } from "../compute/grid";
import { Color, copyGrid } from "@snk/types/grid";
import { grid, snake } from "./sample";
import { step } from "@snk/compute/step";
import { isStableAndBound, stepSpring } from "./springUtils";

View File

@@ -1,4 +1,4 @@
import * as grid from "@snk/compute/__fixtures__/grid";
import * as grid from "@snk/types/__fixtures__/grid";
const container = document.createElement("div");
container.style.fontFamily = "helvetica";

View File

@@ -1,5 +1,5 @@
import { createCanvas } from "./canvas";
import { Color, copyGrid } from "../compute/grid";
import { Color, copyGrid } from "@snk/types/grid";
import { grid, snake } from "./sample";
import { pruneLayer } from "@snk/compute/pruneLayer";

View File

@@ -1,7 +1,7 @@
import { Grid } from "@snk/compute/grid";
import { Snake } from "@snk/compute/snake";
import * as grids from "@snk/compute/__fixtures__/grid";
import * as snakes from "@snk/compute/__fixtures__/snake";
import * as grids from "@snk/types/__fixtures__/grid";
import * as snakes from "@snk/types/__fixtures__/snake";
import type { Snake } from "@snk/types/snake";
import type { Grid } from "@snk/types/grid";
const sp = new URLSearchParams(window.location.search);

View File

@@ -28,11 +28,10 @@ const config: Configuration = {
test: /\.ts$/,
loader: "ts-loader",
options: {
transpileOnly: true,
compilerOptions: {
lib: ["dom", "es2020"],
target: "es2020",
module: "es2020",
moduleResolution: "node",
target: "es5",
},
},
},