Skip to content

Commit

Permalink
Rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
williamngan committed Aug 7, 2018
1 parent a120a3a commit 56cfbca
Show file tree
Hide file tree
Showing 32 changed files with 852 additions and 649 deletions.
15 changes: 4 additions & 11 deletions dist/files/Canvas.d.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
import { MultiTouchSpace } from './Space';
import { VisualForm, Font } from "./Form";
import { Bound } from './Bound';
import { Pt, PtLike, GroupLike } from "./Pt";
export interface PtsCanvasRenderingContext2D extends CanvasRenderingContext2D {
webkitBackingStorePixelRatio?: number;
mozBackingStorePixelRatio?: number;
msBackingStorePixelRatio?: number;
oBackingStorePixelRatio?: number;
backingStorePixelRatio?: number;
}
import { Pt, Bound } from "./Pt";
import { PtLike, GroupLike, PtsCanvasRenderingContext2D } from "./Types";
export declare class CanvasSpace extends MultiTouchSpace {
protected _canvas: HTMLCanvasElement;
protected _container: Element;
Expand All @@ -22,7 +15,7 @@ export declare class CanvasSpace extends MultiTouchSpace {
protected _initialResize: boolean;
constructor(elem: string | Element, callback?: Function);
protected _createElement(elem: string, id: any): HTMLElement;
private _ready(callback);
private _ready;
setup(opt: {
bgcolor?: string;
resize?: boolean;
Expand All @@ -49,7 +42,7 @@ export declare class CanvasSpace extends MultiTouchSpace {
export declare class CanvasForm extends VisualForm {
protected _space: CanvasSpace;
protected _ctx: CanvasRenderingContext2D;
protected _estimateTextWidth: (string) => number;
protected _estimateTextWidth: (string: any) => number;
protected _style: {
fillStyle: string;
strokeStyle: string;
Expand Down
11 changes: 6 additions & 5 deletions dist/files/Canvas.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion dist/files/Color.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Pt, Group } from "./Pt";
export declare type ColorType = "rgb" | "hsl" | "hsb" | "lab" | "lch" | "luv" | "xyz";
import { ColorType } from "./Types";
export declare class Color extends Pt {
private static D65;
protected _mode: ColorType;
Expand Down Expand Up @@ -35,6 +35,7 @@ export declare class Color extends Pt {
u: number;
v: number;
readonly alpha: number;
normalized: boolean;
normalize(toNorm?: boolean): Color;
$normalize(toNorm?: boolean): Color;
toString(format?: ("hex" | "rgb" | "rgba" | "mode")): string;
Expand Down
6 changes: 4 additions & 2 deletions dist/files/Color.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 2 additions & 12 deletions dist/files/Create.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Pt, Group, PtLike, GroupLike } from "./Pt";
import { Bound } from "./Bound";
import { Pt, Group, Bound } from "./Pt";
import { PtLike, GroupLike, DelaunayMesh, DelaunayShape } from "./Types";
export declare class Create {
static distributeRandom(bound: Bound, count: number, dimensions?: number): Group;
static distributeLinear(line: GroupLike, count: number): Group;
Expand All @@ -18,16 +18,6 @@ export declare class Noise extends Pt {
seed(s: any): void;
noise2D(): number;
}
export declare type DelaunayShape = {
i: number;
j: number;
k: number;
triangle: GroupLike;
circle: Group;
};
export declare type DelaunayMesh = {
[key: string]: DelaunayShape;
}[];
export declare class Delaunay extends Group {
private _mesh;
delaunay(triangleOnly?: boolean): GroupLike[] | DelaunayShape[];
Expand Down
19 changes: 4 additions & 15 deletions dist/files/Dom.d.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
import { MultiTouchSpace, IPlayer } from './Space';
import { MultiTouchSpace } from './Space';
import { Form, VisualForm, Font } from "./Form";
import { Bound } from './Bound';
import { Pt, PtLike, GroupLike } from './Pt';
export declare type DOMFormContext = {
group: Element;
groupID: string;
groupCount: number;
currentID: string;
currentClass?: string;
style: object;
font: string;
fontSize: number;
fontFamily: string;
};
import { Pt, Bound } from './Pt';
import { PtLike, GroupLike, IPlayer, DOMFormContext } from "./Types";
export declare class DOMSpace extends MultiTouchSpace {
protected _canvas: HTMLElement | SVGElement;
protected _container: Element;
Expand All @@ -22,7 +11,7 @@ export declare class DOMSpace extends MultiTouchSpace {
protected _css: {};
constructor(elem: string | Element, callback?: Function);
static createElement(elem: string, id: string, appendTo?: Element): Element;
private _ready(callback);
private _ready;
setup(opt: {
bgcolor?: string;
resize?: boolean;
Expand Down
3 changes: 1 addition & 2 deletions dist/files/Dom.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion dist/files/Form.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Pt, PtLike, GroupLike } from "./Pt";
import { Pt } from "./Pt";
import { PtLike, GroupLike } from "./Types";
export declare abstract class Form {
protected _ready: boolean;
readonly ready: boolean;
Expand Down
13 changes: 7 additions & 6 deletions dist/files/LinearAlgebra.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Pt, PtLike, GroupLike, Group } from "./Pt";
import { Pt, Group } from "./Pt";
import { PtLike, GroupLike } from "./Types";
export declare class Vec {
static add(a: PtLike, b: PtLike | number): PtLike;
static subtract(a: PtLike, b: PtLike | number): PtLike;
Expand All @@ -14,15 +15,15 @@ export declare class Vec {
static ceil(a: PtLike): PtLike;
static round(a: PtLike): PtLike;
static max(a: PtLike): {
value;
index;
value: any;
index: any;
};
static min(a: PtLike): {
value;
index;
value: any;
index: any;
};
static sum(a: PtLike): number;
static map(a: PtLike, fn: (n: number, index: number, arr) => number): PtLike;
static map(a: PtLike, fn: (n: number, index: number, arr: any) => number): PtLike;
}
export declare class Mat {
static add(a: GroupLike, b: GroupLike | number[][] | number): Group;
Expand Down
7 changes: 4 additions & 3 deletions dist/files/Num.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Pt, PtLike, Group, GroupLike } from "./Pt";
import { Pt, Group } from "./Pt";
import { PtLike, GroupLike } from "./Types";
export declare class Num {
static equals(a: number, b: number, threshold?: number): boolean;
static lerp(a: number, b: number, t: number): number;
Expand All @@ -10,11 +11,11 @@ export declare class Num {
static sum(pts: GroupLike | number[][]): Pt;
static average(pts: GroupLike | number[][]): Pt;
static cycle(t: number): number;
static mapToRange(n: number, currA: any, currB: any, targetA: any, targetB: any): number;
static mapToRange(n: number, currA: number, currB: number, targetA: number, targetB: number): number;
}
export declare class Geom {
static boundAngle(angle: number): number;
static boundRadian(angle: number): number;
static boundRadian(radian: number): number;
static toRadian(angle: number): number;
static toDegree(radian: number): number;
static boundingBox(pts: GroupLike): Group;
Expand Down
6 changes: 3 additions & 3 deletions dist/files/Num.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 5 additions & 14 deletions dist/files/Op.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
import { Pt, PtLike, Group, GroupLike } from "./Pt";
export declare type IntersectContext = {
which: number;
dist: number;
normal: Pt;
vertex: Pt;
edge: Group;
other?: any;
};
import { Pt, Group } from "./Pt";
import { PtLike, GroupLike, IntersectContext } from "./Types";
export declare class Line {
static fromAngle(anchor: PtLike, angle: number, magnitude: number): Group;
static slope(p1: PtLike | number[], p2: PtLike | number[]): number;
Expand Down Expand Up @@ -38,13 +31,12 @@ export declare class Rectangle {
static from(topLeft: PtLike | number[], widthOrSize: number | PtLike, height?: number): Group;
static fromTopLeft(topLeft: PtLike | number[], widthOrSize: number | PtLike, height?: number): Group;
static fromCenter(center: PtLike | number[], widthOrSize: number | PtLike, height?: number): Group;
static toCircle(pts: GroupLike): Group;
static toCircle(pts: GroupLike, within?: boolean): Group;
static toSquare(pts: GroupLike, enclose?: boolean): Group;
static size(pts: GroupLike): Pt;
static center(pts: GroupLike): Pt;
static corners(rect: GroupLike): Group;
static sides(rect: GroupLike): Group[];
static lines(rect: GroupLike): Group[];
static boundingBox(rects: GroupLike[]): Group;
static polygon(rect: GroupLike): Group;
static quadrants(rect: GroupLike, center?: PtLike): Group[];
Expand All @@ -61,9 +53,8 @@ export declare class Circle {
static intersectLine2D(pts: GroupLike, line: GroupLike): Group;
static intersectCircle2D(pts: GroupLike, circle: GroupLike): Group;
static intersectRect2D(pts: GroupLike, rect: GroupLike): Group;
static toRect(pts: GroupLike): Group;
static toInnerRect(pts: GroupLike): Group;
static toInnerTriangle(pts: GroupLike): Group;
static toRect(pts: GroupLike, within?: boolean): Group;
static toTriangle(pts: GroupLike, within?: boolean): Group;
}
export declare class Triangle {
static fromRect(rect: GroupLike): Group;
Expand Down
45 changes: 24 additions & 21 deletions dist/files/Op.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/files/Physics.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Pt, PtLike, Group, GroupLike } from "./Pt";
import { Bound } from "./Bound";
import { Pt, Group, Bound } from "./Pt";
import { PtLike, GroupLike } from "./Types";
export declare class World {
private _lastTime;
protected _gravity: Pt;
Expand Down

0 comments on commit 56cfbca

Please sign in to comment.