mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-18 18:11:24 +01:00
refactor(es modules): modulize utils
This commit is contained in:
parent
11df349394
commit
12e1c9f334
45 changed files with 620 additions and 283 deletions
1
src/types/common.d.ts
vendored
Normal file
1
src/types/common.d.ts
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
type UnknownObject = {[key: string]: unknown};
|
||||
8
src/types/coordinates.d.ts
vendored
Normal file
8
src/types/coordinates.d.ts
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
interface IMapCoordinates {
|
||||
latT: number;
|
||||
latN: number;
|
||||
latS: number;
|
||||
lonT: number;
|
||||
lonW: number;
|
||||
lonE: number;
|
||||
}
|
||||
4
src/types/modules.d.ts
vendored
Normal file
4
src/types/modules.d.ts
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
declare module "lineclip" {
|
||||
export function polygon(points: number[][], bbox: number[], result?: number[][]): number[][];
|
||||
export function lineclip(points: number[][], bbox: number[]): number[][];
|
||||
}
|
||||
|
|
@ -13,6 +13,9 @@ interface Window {
|
|||
pack: IPack;
|
||||
grig: IGrid;
|
||||
d3: typeof d3;
|
||||
graphHeight: number;
|
||||
graphWidth: number;
|
||||
mapCoordinates: IMapCoordinates;
|
||||
}
|
||||
|
||||
interface Node {
|
||||
3
src/types/point.d.ts
vendored
Normal file
3
src/types/point.d.ts
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
type TPoint = [number, number];
|
||||
|
||||
type TPoints = TPoint[];
|
||||
Loading…
Add table
Add a link
Reference in a new issue