restore backup and add opencode support
This commit is contained in:
60
dist/nls-guilloche/nls/components/graphs.component.d.ts
vendored
Normal file
60
dist/nls-guilloche/nls/components/graphs.component.d.ts
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
import { SimpleChanges, OnChanges, EventEmitter } from '@angular/core';
|
||||
import { Graph } from './../models/graph.model';
|
||||
import { Config } from './../models/config.model';
|
||||
import { NlsCanvasService } from './../services/canvas.service';
|
||||
import { NlsHistoryService } from './../services/history.service';
|
||||
import { NlsMathService } from './../services/math.service';
|
||||
import { NlsGraphService } from './../services/graph.service';
|
||||
export declare class NlsGraphsComponent implements OnChanges {
|
||||
private canvasService;
|
||||
private historyService;
|
||||
private math;
|
||||
private graphService;
|
||||
canvas: any | null;
|
||||
matrix: any | null;
|
||||
graphs: Graph[];
|
||||
windowHeight: number | null;
|
||||
windowWidth: number | null;
|
||||
private genShiftPoint;
|
||||
private genLoadedAllGraphs;
|
||||
private hash;
|
||||
private resizingWindow;
|
||||
config: Config;
|
||||
restoredHistory: any;
|
||||
animation: boolean;
|
||||
svgChange: EventEmitter<{}>;
|
||||
graphChange: EventEmitter<{}>;
|
||||
svgElementRef: any;
|
||||
onResize(event: any): void;
|
||||
constructor(canvasService: NlsCanvasService, historyService: NlsHistoryService, math: NlsMathService, graphService: NlsGraphService);
|
||||
ngOnChanges(changes: SimpleChanges): void;
|
||||
private restoreGraph();
|
||||
private saveHistory();
|
||||
private saveGraph();
|
||||
private updateGraphs();
|
||||
private adjustGraph(curve);
|
||||
private genRandomPoints(num);
|
||||
private flipflop(x);
|
||||
private adjustCanvas();
|
||||
private calcMatrix();
|
||||
private genVectorPoint(point, vector);
|
||||
private shiftPoint(point, vector, startPositive?);
|
||||
private shiftNumber(space, vector, startPositive?);
|
||||
prepareGuillocheExport(guillocheElement: any): void;
|
||||
private countLoadedGraphs();
|
||||
}
|
||||
46
dist/nls-guilloche/nls/directives/guilloche.directive.d.ts
vendored
Normal file
46
dist/nls-guilloche/nls/directives/guilloche.directive.d.ts
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
import { ElementRef, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
|
||||
import { Graph } from './../models/graph.model';
|
||||
import { NlsCanvasService } from './../services/canvas.service';
|
||||
import { NlsMathService } from './../services/math.service';
|
||||
import { NlsGraphService } from '../services/graph.service';
|
||||
export declare class NlsGuillocheDirective implements OnChanges, OnDestroy {
|
||||
private canvasService;
|
||||
private el;
|
||||
private math;
|
||||
private graphService;
|
||||
private canvas;
|
||||
private group;
|
||||
private bounce;
|
||||
private bounces;
|
||||
private initialNodes;
|
||||
private initialCurve;
|
||||
private animationInterval;
|
||||
private medianPoint;
|
||||
private medianIndex;
|
||||
private pathElements;
|
||||
graph: Graph;
|
||||
animation: boolean;
|
||||
constructor(canvasService: NlsCanvasService, el: ElementRef, math: NlsMathService, graphService: NlsGraphService);
|
||||
ngOnDestroy(): void;
|
||||
ngOnChanges(changes: SimpleChanges): void;
|
||||
private animateGraph(x);
|
||||
private spreadLines(points);
|
||||
private updateGraph(points, index);
|
||||
private drawGraph(points);
|
||||
private debugGraph(points);
|
||||
}
|
||||
49
dist/nls-guilloche/nls/models/config.model.d.ts
vendored
Normal file
49
dist/nls-guilloche/nls/models/config.model.d.ts
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
export interface Config {
|
||||
margin: {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
start: {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
end: {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
vectors: {
|
||||
spacing: number;
|
||||
start: any;
|
||||
end: any;
|
||||
range: any;
|
||||
};
|
||||
colors: {
|
||||
primary: string;
|
||||
secondary: string;
|
||||
};
|
||||
spread: {
|
||||
amount: number;
|
||||
spacing: number;
|
||||
};
|
||||
nodes: any;
|
||||
stroke: any;
|
||||
overlap: any;
|
||||
scale: any;
|
||||
interval: number;
|
||||
date?: Date;
|
||||
}
|
||||
37
dist/nls-guilloche/nls/models/graph.model.d.ts
vendored
Normal file
37
dist/nls-guilloche/nls/models/graph.model.d.ts
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
import { Point } from './point.model';
|
||||
export interface Graph {
|
||||
id: string;
|
||||
color: string;
|
||||
start: {
|
||||
point: Point;
|
||||
direction?: Point;
|
||||
vector: number;
|
||||
};
|
||||
end: {
|
||||
point: Point;
|
||||
direction?: Point;
|
||||
vector: number;
|
||||
};
|
||||
spread: {
|
||||
amount: number;
|
||||
spacing: number;
|
||||
};
|
||||
interval: number;
|
||||
stroke: number;
|
||||
nodes?: Point[];
|
||||
}
|
||||
24
dist/nls-guilloche/nls/models/matrix.model.d.ts
vendored
Normal file
24
dist/nls-guilloche/nls/models/matrix.model.d.ts
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
import { Point } from './point.model';
|
||||
export interface Matrix {
|
||||
start: Point;
|
||||
end: Point;
|
||||
center: Point;
|
||||
width: number;
|
||||
height: number;
|
||||
unit?: number;
|
||||
}
|
||||
32
dist/nls-guilloche/nls/models/param.model.d.ts
vendored
Normal file
32
dist/nls-guilloche/nls/models/param.model.d.ts
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
export interface Param {
|
||||
colors: {
|
||||
start: string;
|
||||
end: string;
|
||||
};
|
||||
points: number;
|
||||
margin: {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
spread: number;
|
||||
space: number;
|
||||
stroke?: {
|
||||
width: number;
|
||||
};
|
||||
showGrid?: boolean;
|
||||
}
|
||||
21
dist/nls-guilloche/nls/models/point.model.d.ts
vendored
Normal file
21
dist/nls-guilloche/nls/models/point.model.d.ts
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
export interface Point {
|
||||
x: number;
|
||||
y: number;
|
||||
color?: string;
|
||||
ascent?: number;
|
||||
}
|
||||
2
dist/nls-guilloche/nls/nls-guilloche.module.d.ts
vendored
Normal file
2
dist/nls-guilloche/nls/nls-guilloche.module.d.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export declare class NlsGuillocheModule {
|
||||
}
|
||||
12
dist/nls-guilloche/nls/services/animation.service.d.ts
vendored
Normal file
12
dist/nls-guilloche/nls/services/animation.service.d.ts
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import { Graph } from '../models/graph.model';
|
||||
import { NlsMathService } from './math.service';
|
||||
import { NlsHistoryService } from './history.service';
|
||||
export declare class NlsAnimationService {
|
||||
private math;
|
||||
private historyService;
|
||||
graphs: Graph[];
|
||||
speed: number;
|
||||
range: number;
|
||||
constructor(math: NlsMathService, historyService: NlsHistoryService);
|
||||
animate(initialGraph: Graph): Graph;
|
||||
}
|
||||
25
dist/nls-guilloche/nls/services/canvas.service.d.ts
vendored
Normal file
25
dist/nls-guilloche/nls/services/canvas.service.d.ts
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* Copyright (C) 2018 Michael Czechowski <mail@dailysh.it>
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation; version 2.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51
|
||||
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
import { RendererFactory2 } from '@angular/core';
|
||||
export declare class NlsCanvasService {
|
||||
private rendererFactory;
|
||||
private renderer;
|
||||
canvas: any;
|
||||
constructor(rendererFactory: RendererFactory2);
|
||||
readonly get: any;
|
||||
set(el: any): void;
|
||||
adjustToWindow(): void;
|
||||
}
|
||||
16
dist/nls-guilloche/nls/services/graph.service.d.ts
vendored
Normal file
16
dist/nls-guilloche/nls/services/graph.service.d.ts
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import { NlsMathService } from './math.service';
|
||||
import { Graph } from './../models/graph.model';
|
||||
import { Point } from './../models/point.model';
|
||||
export declare class NlsGraphService {
|
||||
private math;
|
||||
private graphs;
|
||||
private animation;
|
||||
constructor(math: NlsMathService);
|
||||
get(): Graph[];
|
||||
set(newGraphs: Graph[]): void;
|
||||
readonly isAnimated: boolean;
|
||||
startAnimation(): void;
|
||||
stopAnimation(): void;
|
||||
spreadOrthogonal(start: Point, spacing: number): IterableIterator<Point>;
|
||||
shiftPoint(point: Point, radians: number, spacing: number): Point;
|
||||
}
|
||||
8
dist/nls-guilloche/nls/services/history.service.d.ts
vendored
Normal file
8
dist/nls-guilloche/nls/services/history.service.d.ts
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import { Graph } from '../models/graph.model';
|
||||
export declare class NlsHistoryService {
|
||||
history: any[];
|
||||
constructor();
|
||||
save(graphs: Graph[], config: any): void;
|
||||
hash(graphs: any): string;
|
||||
list(): any[];
|
||||
}
|
||||
44
dist/nls-guilloche/nls/services/math.service.d.ts
vendored
Normal file
44
dist/nls-guilloche/nls/services/math.service.d.ts
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
import { Point } from './../models/point.model';
|
||||
export declare class NlsMathService {
|
||||
/**
|
||||
* Calculate distance between to points with coordinates.
|
||||
* @param a
|
||||
* @param b
|
||||
*/
|
||||
Δ(a: Point, b: Point): number;
|
||||
getClosestCenter(point: Point, matrix: any): any;
|
||||
getFarestCenter(point: Point, matrix: any): any;
|
||||
randomPoint(matrix: any, overlap: number): {
|
||||
x: any;
|
||||
y: any;
|
||||
};
|
||||
centerOfArea(width: any, height: any): Point;
|
||||
centerOfPoints(p1: Point, p2: Point): {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
centerOfCurve(curve: Point[]): {
|
||||
x: number;
|
||||
y: number;
|
||||
} & {
|
||||
ascent: number;
|
||||
};
|
||||
medianOfCurve(curve: Point[]): Point & {
|
||||
ascent: number;
|
||||
};
|
||||
angleRadians(p1: Point, p2: Point): number;
|
||||
angleDegree(p1: Point, p2: Point): number;
|
||||
medianIndex(list: any): number;
|
||||
medianPoint(points: Point[]): IterableIterator<Point>;
|
||||
/**
|
||||
* Generator for sine bounce
|
||||
*
|
||||
* @param start 0 indicates to initiate with positive numbers, 1 indicates to
|
||||
* start with negative numbers first
|
||||
* @param amplitude default to 1 indicates the amplitude in positive as well
|
||||
* in negative range
|
||||
* @param decimals amount of decimal places
|
||||
*/
|
||||
bounce(amplitude?: number, decimals?: number, start?: number): IterableIterator<number>;
|
||||
flipSign(startPositive?: boolean): IterableIterator<number>;
|
||||
}
|
||||
Reference in New Issue
Block a user