mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2026-02-04 17:41: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 {
|
declare global {
|
||||||
var drawFeatures: () => void;
|
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: (
|
var simplify: (
|
||||||
points: [number, number][],
|
points: [number, number][],
|
||||||
tolerance: number,
|
tolerance: number,
|
||||||
|
|
@ -95,7 +91,7 @@ function getFeaturePath(feature: PackedGraphFeature): string {
|
||||||
}
|
}
|
||||||
|
|
||||||
const simplifiedPoints = simplify(points, 0.3);
|
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 lineGen = line().curve(curveBasisClosed);
|
||||||
const path = `${round(lineGen(clippedPoints) || "")}Z`;
|
const path = `${round(lineGen(clippedPoints) || "")}Z`;
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,9 @@ declare global {
|
||||||
var terrs: Selection<SVGGElement, unknown, null, undefined>;
|
var terrs: Selection<SVGGElement, unknown, null, undefined>;
|
||||||
var temperature: Selection<SVGGElement, unknown, null, undefined>;
|
var temperature: Selection<SVGGElement, unknown, null, undefined>;
|
||||||
var markers: 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 getColorScheme: (scheme: string | null) => (t: number) => string;
|
||||||
var getColor: (height: number, scheme: (t: number) => string) => string;
|
var getColor: (height: number, scheme: (t: number) => string) => string;
|
||||||
var svgWidth: number;
|
var svgWidth: number;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue