type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
FunctionDeclaration
/** * Round the values of a point. * * @param pointContext The point to serialize. * @param accuracy Optional exemplar number of decimal places. * @returns A new point with the values rounded. */ function rounded(pointContext: IPoint, accuracy?: number): IPoint;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Rotate a point. * * @param pointToRotate The point to rotate. * @param angleInDegrees The amount of rotation, in degrees. * @param rotationOrigin The center point of rotation. * @returns A new point. */ function rotate(pointToRotate: IPoint, angleInDegrees: number, rotationOrigi...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Scale a point's coordinates. * * @param pointToScale The point to scale. * @param scaleValue The amount of scaling. * @returns A new point. */ function scale(pointToScale: IPoint, scaleValue: number): IPoint;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Distort a point's coordinates. * * @param pointToDistort The point to distort. * @param scaleX The amount of x scaling. * @param scaleY The amount of y scaling. * @returns A new point. */ function distort(pointToDistort: IPoint, scaleX: number, scaleY: number): IPoint;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Subtract a point from another point, and return the result as a new point. Shortcut to Add(a, b, subtract = true). * * @param a First point. * @param b Second point. * @returns A new point object. */ function subtract(a: IPoint, b: IPoint): IPoint;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * A point at 0,0 coordinates. * NOTE: It is important to call this as a method, with the empty parentheses. * * @returns A new point. */ function zero(): IPoint;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Create a clone of a path. This is faster than cloneObject. * * @param pathToClone The path to clone. * @returns Cloned path. */ function clone(pathToClone: IPath): IPath;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Create a clone of a path, mirrored on either or both x and y axes. * * @param pathToMirror The path to mirror. * @param mirrorX Boolean to mirror on the x axis. * @param mirrorY Boolean to mirror on the y axis. * @returns Mirrored path. */ function mirror(pathToMirror: IPath, mi...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Move a path to an absolute point. * * @param pathToMove The path to move. * @param origin The new origin for the path. * @returns The original path (for chaining). */ function move(pathToMove: IPath, origin: IPoint): IPath;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Move a path's origin by a relative amount. * * @param pathToMove The path to move. * @param delta The x & y adjustments as a point object. * @param subtract Optional boolean to subtract instead of add. * @returns The original path (for chaining). */ function moveRelative(pathToM...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Move some paths relatively during a task execution, then unmove them. * * @param pathsToMove The paths to move. * @param deltas The x & y adjustments as a point object array. * @param task The function to call while the paths are temporarily moved. */ function moveTemporary(pathsToMo...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Rotate a path. * * @param pathToRotate The path to rotate. * @param angleInDegrees The amount of rotation, in degrees. * @param rotationOrigin The center point of rotation. * @returns The original path (for chaining). */ function rotate(pathToRotate: IPath, angleInDegrees: numbe...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Scale a path. * * @param pathToScale The path to scale. * @param scaleValue The amount of scaling. * @returns The original path (for chaining). */ function scale(pathToScale: IPath, scaleValue: number): IPath;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Distort a path - scale x and y individually. * * @param pathToDistort The path to distort. * @param scaleX The amount of x scaling. * @param scaleY The amount of y scaling. * @returns A new IModel (for circles and arcs) or IPath (for lines and bezier seeds). */ function distort(...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Connect 2 lines at their slope intersection point. * * @param lineA First line to converge. * @param lineB Second line to converge. * @param useOriginA Optional flag to converge the origin point of lineA instead of the end point. * @param useOriginB Optional flag to converge the orig...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Breaks a path in two. The supplied path will end at the supplied pointOfBreak, * a new path is returned which begins at the pointOfBreak and ends at the supplied path's initial end point. * For Circle, the original path will be converted in place to an Arc, and null is returned. * * @para...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Count the number of child models within a given model. * * @param modelContext The model containing other models. * @returns Number of child models. */ function countChildModels(modelContext: IModel): number;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Get an unused id in the models map with the same prefix. * * @param modelContext The model containing the models map. * @param modelId The id to use directly (if unused), or as a prefix. */ function getSimilarModelId(modelContext: IModel, modelId: string): string;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Get an unused id in the paths map with the same prefix. * * @param modelContext The model containing the paths map. * @param pathId The id to use directly (if unused), or as a prefix. */ function getSimilarPathId(modelContext: IModel, pathId: string): string;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Moves all of a model's children (models and paths, recursively) in reference to a single common origin. Useful when points between children need to connect to each other. * * @param modelToOriginate The model to originate. * @param origin Optional offset reference point. */ function origi...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Create a clone of a model, mirrored on either or both x and y axes. * * @param modelToMirror The model to mirror. * @param mirrorX Boolean to mirror on the x axis. * @param mirrorY Boolean to mirror on the y axis. * @returns Mirrored model. */ function mirror(modelToMirror: IMod...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Move a model to an absolute point. Note that this is also accomplished by directly setting the origin property. This function exists for chaining. * * @param modelToMove The model to move. * @param origin The new position of the model. * @returns The original model (for chaining). */...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Move a model's origin by a relative amount. * * @param modelToMove The model to move. * @param delta The x & y adjustments as a point object. * @returns The original model (for chaining). */ function moveRelative(modelToMove: IModel, delta: IPoint): IModel;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Prefix the ids of paths in a model. * * @param modelToPrefix The model to prefix. * @param prefix The prefix to prepend on paths ids. * @returns The original model (for chaining). */ function prefixPathIds(modelToPrefix: IModel, prefix: string): IModel;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Rotate a model. * * @param modelToRotate The model to rotate. * @param angleInDegrees The amount of rotation, in degrees. * @param rotationOrigin The center point of rotation. * @returns The original model (for chaining). */ function rotate(modelToRotate: IModel, angleInDegrees:...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Scale a model. * * @param modelToScale The model to scale. * @param scaleValue The amount of scaling. * @param scaleOrigin Optional boolean to scale the origin point. Typically false for the root model. * @returns The original model (for chaining). */ function scale(modelToScale...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Convert a model to match a different unit system. * * @param modeltoConvert The model to convert. * @param destUnitType The unit system. * @returns The scaled model (for chaining). */ function convertUnits(modeltoConvert: IModel, destUnitType: string): IModel;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Recursively walk through all paths for a given model. * * @param modelContext The model to walk. * @param callback Callback for each path. */ function walkPaths(modelContext: IModel, callback: IModelPathCallback): void;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Recursively walk through all paths for a given model. * * @param modelContext The model to walk. * @param pathCallback Callback for each path. * @param modelCallbackBeforeWalk Callback for each model prior to recursion, which can cancel the recursion if it returns false. * @param mod...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Check to see if a path is inside of a model. * * @param pathContext The path to check. * @param modelContext The model to check against. * @param farPoint Optional point of reference which is outside the bounds of the modelContext. * @returns Boolean true if the path is inside of the...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Break a model's paths everywhere they intersect with another path. * * @param modelToBreak The model containing paths to be broken. * @param modelToIntersect Optional model containing paths to look for intersection, or else the modelToBreak will be used. */ function breakPathsAtIntersecti...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Combine 2 models. * * @param modelA First model to combine. * @param modelB Second model to combine. * @param includeAInsideB Flag to include paths from modelA which are inside of modelB. * @param includeAOutsideB Flag to include paths from modelA which are outside of modelB. * ...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Combine 2 models, resulting in a intersection. * * @param modelA First model to combine. * @param modelB Second model to combine. */ function combineIntersection(modelA: IModel, modelB: IModel): void;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Combine 2 models, resulting in a subtraction of B from A. * * @param modelA First model to combine. * @param modelB Second model to combine. */ function combineSubtraction(modelA: IModel, modelB: IModel): void;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Combine 2 models, resulting in a union. * * @param modelA First model to combine. * @param modelB Second model to combine. */ function combineUnion(modelA: IModel, modelB: IModel): void;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Simplify a model's paths by reducing redundancy: combine multiple overlapping paths into a single path. The model must be originated. * * @param modelContext The originated model to search for similar paths. * @param options Optional options object. * @returns The simplified model (for ch...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Expand path by creating a model which surrounds it. * * @param pathToExpand Path to expand. * @param expansion Distance to expand. * @param isolateCaps Optional flag to put the end caps into a separate model named "caps". * @returns Model which surrounds the path. */ function ex...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Represent an arc using straight lines. * * @param arc Arc to straighten. * @param bevel Optional flag to bevel the angle to prevent it from being too sharp. * @param prefix Optional prefix to apply to path ids. * @returns Model of straight lines with same endpoints as the arc. *...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Expand all paths in a model, then combine the resulting expansions. * * @param modelToExpand Model to expand. * @param distance Distance to expand. * @param joints Number of points at a joint between paths. Use 0 for round joints, 1 for pointed joints, 2 for beveled joints. * @return...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Outline a model by a specified distance. Useful for accommodating for kerf. * * @param modelToOutline Model to outline. * @param distance Distance to outline. * @param joints Number of points at a joint between paths. Use 0 for round joints, 1 for pointed joints, 2 for beveled joints. ...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Get a conversion ratio between a source unit and a destination unit. * * @param srcUnitType unitType converting from. * @param destUnitType unitType converting to. * @returns Numeric ratio of the conversion. */ function conversionScale(srcUnitType: string, destUnitType: string): numb...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Find out if two angles are equal. * * @param angleA First angle. * @param angleB Second angle. * @returns true if angles are the same, false if they are not */ function isAngleEqual(angleA: number, angleB: number, accuracy?: number): boolean;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Find out if two paths are equal. * * @param pathA First path. * @param pathB Second path. * @returns true if paths are the same, false if they are not */ function isPathEqual(pathA: IPath, pathB: IPath, withinPointDistance?: number, pathAOffset?: IPoint, pathBOffset?: IPoint): boolea...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Find out if two points are equal. * * @param a First point. * @param b Second point. * @returns true if points are the same, false if they are not */ function isPointEqual(a: IPoint, b: IPoint, withinDistance?: number): boolean;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Find out if point is on a slope. * * @param p Point to check. * @param b Slope. * @returns true if point is on the slope */ function isPointOnSlope(p: IPoint, slope: ISlope, withinDistance?: number): boolean;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Check for slope equality. * * @param slopeA The ISlope to test. * @param slopeB The ISlope to check for equality. * @returns Boolean true if slopes are equal. */ function isSlopeEqual(slopeA: ISlope, slopeB: ISlope): boolean;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Increase a measurement by an additional measurement. * * @param baseMeasure The measurement to increase. * @param addMeasure The additional measurement. * @param addOffset Optional offset point of the additional measurement. * @returns The increased original measurement (for chaining...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Check for arc being concave or convex towards a given point. * * @param arc The arc to test. * @param towardsPoint The point to test. * @returns Boolean true if arc is concave towards point. */ function isArcConcaveTowardsPoint(arc: IPathArc, towardsPoint: IPoint): boolean;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Check for arc overlapping another arc. * * @param arcA The arc to test. * @param arcB The arc to check for overlap. * @param excludeTangents Boolean to exclude exact endpoints and only look for deep overlaps. * @returns Boolean true if arc1 is overlapped with arcB. */ function i...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Check if a given number is between two given limits. * * @param valueInQuestion The number to test. * @param limitA First limit. * @param limitB Second limit. * @param exclusive Flag to exclude equaling the limits. * @returns Boolean true if value is between (or equal to) the li...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Check if a given angle is between an arc's start and end angles. * * @param angleInQuestion The angle to test. * @param arc Arc to test against. * @param exclusive Flag to exclude equaling the start or end angles. * @returns Boolean true if angle is between (or equal to) the arc's st...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Check if a given point is between a line's end points. * * @param pointInQuestion The point to test. * @param line Line to test against. * @param exclusive Flag to exclude equaling the origin or end points. * @returns Boolean true if point is between (or equal to) the line's origin a...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Check if a given bezier seed is simply a line. * * @param seed The bezier seed to test. * @returns Boolean true if bezier seed has control points on the line slope and between the line endpoints. */ function isBezierSeedLinear(seed: IPathBezierSeed): boolean;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Check for line overlapping another line. * * @param lineA The line to test. * @param lineB The line to check for overlap. * @param excludeTangents Boolean to exclude exact endpoints and only look for deep overlaps. * @returns Boolean true if line1 is overlapped with lineB. */ fu...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Check for measurement overlapping another measurement. * * @param measureA The measurement to test. * @param measureB The measurement to check for overlap. * @returns Boolean true if measure1 is overlapped with measureB. */ function isMeasurementOverlapping(measureA: IMeasure, measur...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Gets the slope of a line. */ function lineSlope(line: IPathLine): ISlope;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Calculates the distance between two points. * * @param a First point. * @param b Second point. * @returns Distance between points. */ function pointDistance(a: IPoint, b: IPoint): number;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Calculates the smallest rectangle which contains a path. * * @param pathToMeasure The path to measure. * @returns object with low and high points. */ function pathExtents(pathToMeasure: IPath, addOffset?: IPoint): IMeasure;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Measures the length of a path. * * @param pathToMeasure The path to measure. * @returns Length of the path. */ function pathLength(pathToMeasure: IPath): number;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Measures the smallest rectangle which contains a model. * * @param modelToMeasure The model to measure. * @param atlas Optional atlas to save measurements. * @returns object with low and high points. */ function modelExtents(modelToMeasure: IModel, atlas?: measure.Atlas): IMeasure;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Try to get the unit system from a model * @private */ function tryGetModelUnits(itemToExport: any): string;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Create a numeric array from a string of numbers. The numbers may be delimited by anything non-numeric. * * Example: * ``` * var n = makerjs.importer.parseNumericList('5, 10, 15.20 25-30-35 4e1 .5'); * ``` * * @param s The string of numbers. * @returns Array of numbers....
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
function toDXF(modelToExport: IModel, options?: IDXFRenderOptions): string;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
function toDXF(pathsToExport: IPath[], options?: IDXFRenderOptions): string;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
function toDXF(pathToExport: IPath, options?: IDXFRenderOptions): string;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Solves for the angle of a triangle when you know lengths of 3 sides. * * @param lengthA Length of side of triangle, opposite of the angle you are trying to find. * @param lengthB Length of any other side of the triangle. * @param lengthC Length of the remaining side of the triangle. ...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Solves for the length of a side of a triangle when you know length of one side and 2 angles. * * @param oppositeAngleInDegrees Angle which is opposite of the side you are trying to find. * @param lengthOfSideBetweenAngles Length of one side of the triangle which is between the provided angles....
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Find the point(s) where 2 paths intersect. * * @param path1 First path to find intersection. * @param path2 Second path to find intersection. * @param options Optional IPathIntersectionOptions. * @returns IPathIntersection object, with points(s) of intersection (and angles, when a pa...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Adds a round corner to the outside angle between 2 lines. The lines must meet at one point. * * @param lineA First line to fillet, which will be modified to fit the fillet. * @param lineB Second line to fillet, which will be modified to fit the fillet. * @returns Arc path object of the ne...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Adds a round corner to the inside angle between 2 paths. The paths must meet at one point. * * @param pathA First path to fillet, which will be modified to fit the fillet. * @param pathB Second path to fillet, which will be modified to fit the fillet. * @returns Arc path object of the new...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Helper function to use the JavaScript "apply" function in conjunction with the "new" keyword. * * @param ctor The constructor for the class which is an IKit. * @param args The array of parameters passed to the constructor. * @returns A new instance of the class, which implements the IMode...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Extract just the initial sample values from a kit. * * @param ctor The constructor for the class which is an IKit. * @returns Array of the inital sample values provided in the metaParameters array. */ function getParameterValues(ctor: IKit): any[];
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Find paths that have common endpoints and form chains. * * @param modelContext The model to search for chains. * @param options Optional options object. */ function findChains(modelContext: IModel, callback: IChainCallback, options?: IFindChainsOptions): void;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Find paths that have common endpoints and form loops. * * @param modelContext The model to search for loops. * @param options Optional options object. * @returns A new model with child models ranked according to their containment within other found loops. The paths of models will be IPath...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Remove all paths in a loop model from the model(s) which contained them. * * @param loopToDetach The model to search for loops. */ function detachLoop(loopToDetach: IModel): void;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Remove paths from a model which have endpoints that do not connect to other paths. * * @param modelContext The model to search for dead ends. * @param options Optional options object. * @returns The input model (for chaining). */ function removeDeadEnds(modelContext: IModel, pointMat...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
function toOpenJsCad(modelToExport: IModel, options?: IOpenJsCadOptions): string;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
function toOpenJsCad(pathsToExport: IPath[], options?: IOpenJsCadOptions): string;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
function toOpenJsCad(pathToExport: IPath, options?: IOpenJsCadOptions): string;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Executes a JavaScript string with the OpenJsCad engine - converts 2D to 3D. * * @param modelToExport Model object to export. * @param options Export options object. * @param options.extrusion Height of 3D extrusion. * @param options.resolution Size of facets. * @returns String o...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Injects drawing into a PDFKit document. * * @param modelToExport Model object to export. * @param options Export options object. * @returns String of PDF file contents. */ function toPDF(doc: PDFKit.PDFDocument, modelToExport: IModel, options?: IPDFRenderOptions): void;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Convert a chain to SVG path data. */ function chainToSVGPathData(chain: IChain, offset: IPoint, scale: number): string;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
/** * Convert a path to SVG path data. */ function pathToSVGPathData(pathToExport: IPath, offset: IPoint, offset2: IPoint, scale: number): string;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
function toSVG(modelToExport: IModel, options?: ISVGRenderOptions): string;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
function toSVG(pathsToExport: IPath[], options?: ISVGRenderOptions): string;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
function toSVG(pathToExport: IPath, options?: ISVGRenderOptions): string;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
FunctionDeclaration
function fromSVGPathData(pathData: string): IModel;
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
ClassDeclaration
/** * Class for arc path. */ class Arc implements IPathArc { origin: IPoint; radius: number; startAngle: number; endAngle: number; type: string; /** * Class for arc path, created from origin point, radius, start angle, and end angle. * ...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
ClassDeclaration
/** * Class for circle path. */ class Circle implements IPathCircle { type: string; origin: IPoint; radius: number; /** * Class for circle path, created from radius. Origin will be [0, 0]. * * Example: * ``` * var c = new makerjs.pat...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
ClassDeclaration
/** * Class for line path. */ class Line implements IPathLine { type: string; origin: IPoint; end: IPoint; /** * Class for line path, constructed from array of 2 points. * * @param points Array of 2 points. */ constructor(points: IPoi...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
ClassDeclaration
/** * Class for chord, which is simply a line path that connects the endpoints of an arc. * * @param arc Arc to use as the basic for the chord. */ class Chord implements IPathLine { type: string; origin: IPoint; end: IPoint; constructor(arc: IPathArc); }
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
ClassDeclaration
/** * Class for a parallel line path. * * @param toLine A line to be parallel to. * @param distance Distance between parallel and original line. * @param nearPoint Any point to determine which side of the line to place the parallel. */ class Parallel implements IPathLine { type: st...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
ClassDeclaration
/** * Collects items that share a common key. */ class Collector<K, T> { private comparer; collections: ICollection<K, T>[]; constructor(comparer?: ICollectionKeyComparer<K>); addItemToCollection(key: K, item: T): void; findCollection(key: K, action?: (index: number) =>...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
ClassDeclaration
/** * A list of maps of measurements. * * @param modelToMeasure The model to measure. * @param atlas Optional atlas to save measurements. * @returns object with low and high points. */ class Atlas { modelContext: IModel; /** * Flag that models have been measured. ...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
ClassDeclaration
/** * Class to traverse an item 's models or paths and ultimately render each path. * @private */ class Exporter { private map; private fixPoint; private fixPath; private beginModel; private endModel; /** * @param map Object containing properties: ...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
ClassDeclaration
/** * Class for an XML tag. * @private */ class XmlTag { name: string; attrs: IXmlTagAttrs; /** * Text between the opening and closing tags. */ innerText: string; /** * Boolean to indicate that the innerText has been escaped. */ ...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
ClassDeclaration
class BezierCurve implements IModel { models: IModelMap; paths: IPathMap; origin: IPoint; type: string; seed: IPathBezierSeed; accuracy: number; constructor(points: IPoint[], accuracy?: number); constructor(seed: IPathBezierSeed, accuracy?: number); ...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
ClassDeclaration
class Ellipse implements IModel { models: IModelMap; origin: IPoint; /** * Class for Ellipse created with 2 radii. * * @param radiusX The x radius of the ellipse. * @param radiusY The y radius of the ellipse. * @param accuracy Optional accuracy of th...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
ClassDeclaration
class EllipticArc implements IModel { models: IModelMap; /** * Class for Elliptic Arc created by distorting a circular arc. * * @param arc The circular arc to use as the basis of the elliptic arc. * @param radiusX The x radius of the ellipse. * @param radius...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript
ClassDeclaration
class ConnectTheDots implements IModel { paths: IPathMap; /** * Create a model by connecting points designated in a string. The model will be 'closed' - i.e. the last point will connect to the first point. * * Example: * ``` * var c = new makerjs.models.Conn...
HydTechie/DefinitelyTyped
maker.js/makerjs.d.ts
TypeScript