更新配置,能够简单运行实例.

This commit is contained in:
ChenX
2018-10-12 17:02:10 +08:00
parent 2ef48e17c6
commit bda2b05204
66 changed files with 732 additions and 4481 deletions

58
dist/ThreeCSG.d.ts vendored
View File

@@ -1,58 +0,0 @@
import * as THREE from "three";
export declare class ThreeBSP {
tree: Node;
matrix: THREE.Matrix4;
Node: typeof Node;
Vertex: typeof Vertex;
Polygon: typeof Polygon;
constructor(geometry: any);
subtract(other_tree: any): ThreeBSP;
union(other_tree: any): ThreeBSP;
intersect(other_tree: any): ThreeBSP;
toGeometry(): THREE.Geometry;
toMesh(material: any): THREE.Mesh;
}
export declare class Polygon {
w: any;
normal: any;
vertices: any;
constructor(vertices?: any, normal?: any, w?: any);
calculateProperties(): this;
clone(): Polygon;
flip(): this;
classifyVertex(vertex: any): 1 | 0 | 2;
classifySide(polygon: any): 1 | 0 | 2 | 3;
splitPolygon(polygon: any, coplanar_front: any, coplanar_back: any, front: any, back: any): void;
}
export declare class Vertex {
uv: any;
normal: any;
z: any;
y: any;
x: any;
constructor(x: number, y: number, z: number, normal: THREE.Vector3, uv: THREE.Vector2);
clone(): Vertex;
add(vertex: any): this;
subtract(vertex: any): this;
multiplyScalar(scalar: any): this;
cross(vertex: any): this;
normalize(): this;
dot(vertex: any): number;
lerp(a: any, t: any): this;
interpolate(other: any, t: any): Vertex;
applyMatrix4(m: any): this;
}
export declare class Node {
divider: any;
back: any;
front: any;
polygons: any[];
constructor(polygons?: any);
isConvex(polygons: any): boolean;
build(polygons: any): void;
allPolygons(): any[];
clone(): Node;
invert(): this;
clipPolygons(polygons: any): any;
clipTo(node: any): void;
}