diff --git a/src/modules/heightmap-generator.ts b/src/modules/heightmap-generator.ts index 75a24618..eb48f9f4 100644 --- a/src/modules/heightmap-generator.ts +++ b/src/modules/heightmap-generator.ts @@ -1,6 +1,6 @@ import Alea from "alea"; import { range as d3Range, leastIndex, mean } from "d3"; -import { createTypedArray, byId,findGridCell,getNumberInRange,lim,minmax,P,rand } from "../utils"; +import { createTypedArray, byId, findGridCell, getNumberInRange, lim, minmax, P, rand } from "../utils"; declare global { interface Window { @@ -546,7 +546,7 @@ class HeightmapGenerator { fromPrecreated(graph: any, id: string): Promise { return new Promise(resolve => { - // create canvas where 1px corresponts to a cell + // create canvas where 1px corresponds to a cell const canvas = document.createElement("canvas"); const ctx = canvas.getContext("2d") as CanvasRenderingContext2D; const {cellsX, cellsY} = graph; diff --git a/src/utils/graphUtils.ts b/src/utils/graphUtils.ts index 198a1e99..875445fb 100644 --- a/src/utils/graphUtils.ts +++ b/src/utils/graphUtils.ts @@ -139,7 +139,7 @@ export const calculateVoronoi = (points: Point[], boundary: Point[]): {cells: Ce const voronoi = new Voronoi(delaunay, allPoints, points.length); const cells = voronoi.cells; - cells.i = createTypedArray({maxValue: points.length, length: points.length}).map((_, i) => i) as Uint32Array; // array of indexes + cells.i = createTypedArray({maxValue: points.length, length: points.length}).map((_, i) => i) as Uint32Array; // array of indexes const vertices = voronoi.vertices; TIME && console.timeEnd("calculateVoronoi");