update voronoi-core.d.ts to include inner class exports

This commit is contained in:
ajuvercr 2020-04-18 14:09:47 +02:00
parent 4645f8d392
commit 68a58e24d7

View file

@ -1,29 +1,30 @@
declare class Point {
declare namespace Voronoi {
class Point {
x: number;
y: number;
}
declare class Site {
class Site {
x: number;
y: number;
voronoiId: number;
}
declare class Cell {
class Cell {
site: Site;
halfedges: HalfEdge[];
closeMe: boolean;
}
declare class Edge {
class Edge {
lSite: Site;
rSite: Site;
vb: Point;
va: Point;
}
declare class HalfEdge {
class HalfEdge {
site: Site;
edge: Edge;
angle: number;
@ -31,24 +32,25 @@ declare class HalfEdge {
getEndpoint(): Point;
}
declare class BBox {
class BBox {
xl: number;
xr: number;
yt: number;
yb: number;
}
declare class VoronoiDiagram {
class VoronoiDiagram {
site: any;
cells: Cell[];
edges: Edge[];
vertices: Point[];
execTime: number;
}
}
declare class Voronoi {
constructor();
compute(sites: Point[], bbox: BBox): VoronoiDiagram;
compute(sites: Voronoi.Point[], bbox: Voronoi.BBox): Voronoi.VoronoiDiagram;
}
export = Voronoi;