mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2026-02-04 09:31:23 +01:00
fix: copilot review
This commit is contained in:
parent
49160b9cc7
commit
eb4ad86664
2 changed files with 4 additions and 5 deletions
|
|
@ -4,10 +4,6 @@ import { clipPoly, round } from "../utils";
|
|||
|
||||
declare global {
|
||||
var drawFeatures: () => void;
|
||||
|
||||
var defs: d3.Selection<SVGDefsElement, unknown, null, undefined>;
|
||||
var coastline: d3.Selection<SVGGElement, unknown, null, undefined>;
|
||||
var lakes: d3.Selection<SVGGElement, unknown, null, undefined>;
|
||||
var simplify: (
|
||||
points: [number, number][],
|
||||
tolerance: number,
|
||||
|
|
@ -95,7 +91,7 @@ function getFeaturePath(feature: PackedGraphFeature): string {
|
|||
}
|
||||
|
||||
const simplifiedPoints = simplify(points, 0.3);
|
||||
const clippedPoints = clipPoly(simplifiedPoints, graphWidth, graphHeight);
|
||||
const clippedPoints = clipPoly(simplifiedPoints, graphWidth, graphHeight, 1);
|
||||
|
||||
const lineGen = line().curve(curveBasisClosed);
|
||||
const path = `${round(lineGen(clippedPoints) || "")}Z`;
|
||||
|
|
|
|||
|
|
@ -42,6 +42,9 @@ declare global {
|
|||
var terrs: Selection<SVGGElement, unknown, null, undefined>;
|
||||
var temperature: Selection<SVGGElement, unknown, null, undefined>;
|
||||
var markers: Selection<SVGGElement, unknown, null, undefined>;
|
||||
var defs: Selection<SVGDefsElement, unknown, null, undefined>;
|
||||
var coastline: Selection<SVGGElement, unknown, null, undefined>;
|
||||
var lakes: Selection<SVGGElement, unknown, null, undefined>;
|
||||
var getColorScheme: (scheme: string | null) => (t: number) => string;
|
||||
var getColor: (height: number, scheme: (t: number) => string) => string;
|
||||
var svgWidth: number;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue