diff --git a/src/components/map/MapDrawing.js b/src/components/map/MapDrawing.js index 54e1234..ccce9fd 100644 --- a/src/components/map/MapDrawing.js +++ b/src/components/map/MapDrawing.js @@ -119,8 +119,7 @@ function MapDrawing({ } const simplified = simplifyPoints( [...prevPoints, brushPosition], - gridCellNormalizedSize, - stageScale + 1 / 1000 / stageScale ); return { ...prevShape, diff --git a/src/components/map/MapFog.js b/src/components/map/MapFog.js index 8c97149..3e94081 100644 --- a/src/components/map/MapFog.js +++ b/src/components/map/MapFog.js @@ -176,8 +176,7 @@ function MapFog({ } const simplified = simplifyPoints( [...prevPoints, brushPosition], - gridCellNormalizedSize, - stageScale / 4 + 1 / 1000 / stageScale ); return { ...prevShape, diff --git a/src/helpers/drawing.js b/src/helpers/drawing.js index 4491d61..00966a3 100644 --- a/src/helpers/drawing.js +++ b/src/helpers/drawing.js @@ -192,18 +192,13 @@ export function getUpdatedShapeData( } } -const defaultSimplifySize = 1 / 100; /** * Simplify points to a grid size * @param {Vector2[]} points - * @param {Vector2} gridCellSize - * @param {number} scale + * @param {number} tolerance */ -export function simplifyPoints(points, gridCellSize, scale) { - return simplify( - points, - (Vector2.min(gridCellSize) * defaultSimplifySize) / scale - ); +export function simplifyPoints(points, tolerance) { + return simplify(points, tolerance); } /**