added layer

This commit is contained in:
Dan Marshall
2015-10-01 10:29:15 -07:00
parent 6cb0032bdb
commit 7a79c29c26
2 changed files with 21 additions and 4 deletions
+12 -4
View File
@@ -96,11 +96,15 @@ declare module MakerJs {
/**
* The type of the path, e.g. "line", "circle", or "arc". These strings are enumerated in pathType.
*/
type: string;
"type": string;
/**
* The main point of reference for this path.
*/
origin: IPoint;
/**
* Optional layer of this path.
*/
layer?: string;
}
/**
* Test to see if an object implements the required properties of a path.
@@ -193,7 +197,7 @@ declare module MakerJs {
/**
* Key is the type of a path, value is a function which accepts a path object a point object as its parameters.
*/
[type: string]: (id: string, pathValue: IPath, origin: IPoint) => void;
[type: string]: (id: string, pathValue: IPath, origin: IPoint, layer: string) => void;
}
/**
* String-based enumeration of all paths types.
@@ -276,7 +280,7 @@ declare module MakerJs {
/**
* A model may want to specify its type, but this value is not employed yet.
*/
type?: string;
"type"?: string;
/**
* Optional array of path objects in this model.
*/
@@ -293,6 +297,10 @@ declare module MakerJs {
* An author may wish to add notes to this model instance.
*/
notes?: string;
/**
* Optional layer of this model.
*/
layer?: string;
}
/**
* Test to see if an object implements the required properties of a model.
@@ -844,7 +852,7 @@ declare module MakerJs.exporter {
* @param pathToExport The path to export.
* @param offset The offset position of the path.
*/
exportPath(id: string, pathToExport: IPath, offset: IPoint): void;
exportPath(id: string, pathToExport: IPath, offset: IPoint, layer: string): void;
/**
* Export a model.
*