Conversation
main/deepnest.js
Outdated
| @@ -688,160 +671,10 @@ | |||
| // assuming no intersections, return a tree where odd leaves are parts and even ones are holes | |||
| // might be easier to use the DOM, but paths can't have paths as children. So we'll just make our own tree. | |||
| this.getParts = function (paths, filename) { | |||
There was a problem hiding this comment.
Ultimately this entire function should be removable. I started stripping out pieces of it as I replaced the functionality with the typescript stuff.
| s = require("../dist/tsc/svgparser.js"); | ||
| window.SvgParser = new s.SvgParser(new f.FontFactory()); | ||
| console.log(s); | ||
| </script> |
There was a problem hiding this comment.
This is where the entrypoint to the ts code is.
| export abstract class Curve { | ||
| abstract linearize(tol: number): Array<Point>; | ||
| abstract start(): Point; | ||
| abstract end(): Point; | ||
| abstract toString(): String; | ||
| } |
There was a problem hiding this comment.
This encapsulates functionality for "path-like things" that can be turned into polygons with some "tolerance", so that we can use polygon-oriented Minkowski for everything, but still handle all of SVG paths.
| constructor() { | ||
| } | ||
|
|
||
| get(name: String) : opentype.Font { |
There was a problem hiding this comment.
This should be replaceable with some kind of browser API, I think? This works on my Mac, but is obviously Wrong and Bad. I only used it because I was originally building in a non-browser context.
There was a problem hiding this comment.
This is not be bad. opentype.Font works crossplattform
No description provided.