@weasel-js/geom 1.15.1 → 1.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/3d/index.d.ts +3 -1
- package/dist/3d/index.js +7 -10
- package/dist/3d/index.js.map +1 -1
- package/dist/booleans/index.js +4 -5
- package/dist/booleans/index.js.map +1 -1
- package/dist/{chunk-B3D6KWW3.js → chunk-346XYYMX.js} +154 -3
- package/dist/chunk-346XYYMX.js.map +1 -0
- package/dist/chunk-DNX24KBT.js +82 -0
- package/dist/chunk-DNX24KBT.js.map +1 -0
- package/dist/{chunk-EURWZUNY.js → chunk-GA5R5KWD.js} +59 -65
- package/dist/chunk-GA5R5KWD.js.map +1 -0
- package/dist/{chunk-3HQJGI63.js → chunk-HTT5AQIU.js} +3 -4
- package/dist/chunk-HTT5AQIU.js.map +1 -0
- package/dist/{chunk-FROQPADA.js → chunk-IDSKOHA4.js} +4 -4
- package/dist/{chunk-FROQPADA.js.map → chunk-IDSKOHA4.js.map} +1 -1
- package/dist/{chunk-HMGGJZTM.js → chunk-MIKP4V2C.js} +7 -21
- package/dist/chunk-MIKP4V2C.js.map +1 -0
- package/dist/{chunk-HNLJO3E7.js → chunk-MOCSUHEI.js} +22 -8
- package/dist/chunk-MOCSUHEI.js.map +1 -0
- package/dist/{chunk-3YH5XU3H.js → chunk-OQP5M5VD.js} +14 -23
- package/dist/chunk-OQP5M5VD.js.map +1 -0
- package/dist/{chunk-ZOMUTU7J.js → chunk-STYO7J4Y.js} +5 -11
- package/dist/chunk-STYO7J4Y.js.map +1 -0
- package/dist/{curvature-CDOI32hv.d.ts → curvature-DKPO4Qeh.d.ts} +0 -27
- package/dist/curves/index.d.ts +1 -1
- package/dist/curves/index.js +4 -4
- package/dist/index.d.ts +108 -3
- package/dist/index.js +159 -162
- package/dist/index.js.map +1 -1
- package/dist/nd/index.d.ts +28 -1
- package/dist/nd/index.js +2 -5
- package/dist/nd/index.js.map +1 -1
- package/dist/tessellate/index.js +5 -5
- package/dist/warp/index.js +8 -15
- package/dist/warp/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-2N6OWA7E.js +0 -104
- package/dist/chunk-2N6OWA7E.js.map +0 -1
- package/dist/chunk-3HQJGI63.js.map +0 -1
- package/dist/chunk-3YH5XU3H.js.map +0 -1
- package/dist/chunk-755Y4YZS.js +0 -32
- package/dist/chunk-755Y4YZS.js.map +0 -1
- package/dist/chunk-B3D6KWW3.js.map +0 -1
- package/dist/chunk-EURWZUNY.js.map +0 -1
- package/dist/chunk-HMGGJZTM.js.map +0 -1
- package/dist/chunk-HNLJO3E7.js.map +0 -1
- package/dist/chunk-ZOMUTU7J.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/paths/cornerCarry.ts","../src/paths/cornerRestore.ts","../src/booleans/contourSegments.ts","../src/intersect/segmentIntersections.ts","../src/booleans/contours.ts","../src/booleans/cutRegions.ts"],"names":["u","folded","a","b","c","l","r"],"mappings":";;;;;AASA,IAAM,SAAA,uBAAgB,OAAA,EAAiC;AAQhD,SAAS,kBAAkB,IAAA,EAA+B;AAC/D,EAAA,MAAM,GAAA,GAAM,SAAA,CAAU,GAAA,CAAI,IAAI,CAAA;AAC9B,EAAA,IAAI,KAAK,OAAO,GAAA;AAChB,EAAA,MAAM,EAAE,QAAA,EAAU,MAAA,EAAO,GAAI,IAAA;AAC7B,EAAA,MAAM,MAAgB,EAAC;AACvB,EAAA,IAAI,IAAA,GAAO,CAAA,EAAG,KAAA,GAAQ,CAAA,EAAG,KAAA,GAAQ,CAAA;AACjC,EAAA,IAAI,EAAA,GAAK,GAAG,EAAA,GAAK,CAAA,EAAG,KAAK,CAAA,EAAG,EAAA,GAAK,GAAG,KAAA,GAAQ,KAAA;AAC5C,EAAA,cAAA,CAAe,QAAA,EAAU,MAAA,EAAQ,CAAC,GAAA,EAAK,EAAA,KAAO;AAC5C,IAAA,IAAI,QAAQ,MAAA,EAAQ;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AA,GAAS,EAAE,MAAA,KAAW;AAAC,GACxH;AACF","file":"chunk-OQP5M5VD.js","sourcesContent":["/**\n * Carrying corner specs onto a path rebuilt from another: a split, a rejoin,\n * a reversal. Specs are keyed by flat anchor index, so a rewrite that moves\n * anchors must renumber them rather than keep the old array.\n */\nimport { forEachSegment, pathCommandCoordCount, PATH_C, PATH_M, PATH_Q, PATH_Z } from '../commands';\nimport type { PolygonPath } from '../path';\nimport { compactCorners, withoutCorners, type CornerSpec } from './cornerSpec';\n\nconst flatCache = new WeakMap<PolygonPath, Int32Array>();\n\n/**\n * For each anchor command of `path` (each M, L, C, or Q, as `countPathAnchors`\n * numbers them), its flat anchor index, the numbering `PolygonPath.corners`\n * uses: a closing curve that ends on its subpath's first point folds onto\n * that anchor, as `pathToAnchors` folds it.\n */\nexport function flatAnchorIndices(path: PolygonPath): Int32Array {\n const hit = flatCache.get(path);\n if (hit) return hit;\n const { commands, coords } = path;\n const out: number[] = [];\n let flat = 0, first = 0, count = 0;\n let sx = 0, sy = 0, ex = 0, ey = 0, curve = false;\n forEachSegment(commands, coords, (cmd, ci) => {\n if (cmd === PATH_Z) {\n if (count > 1 && curve && ex === sx && ey === sy) { out[out.length - 1] = first; flat--; }\n count = 0;\n return;\n }\n const n = pathCommandCoordCount(cmd);\n ex = coords[ci + n - 2]; ey = coords[ci + n - 1];\n curve = cmd === PATH_C || cmd === PATH_Q;\n if (cmd === PATH_M || count === 0) { first = flat; sx = ex; sy = ey; count = 0; }\n count++;\n out.push(flat++);\n });\n const result = Int32Array.from(out);\n flatCache.set(path, result);\n return result;\n}\n\n/**\n * `to` with `from`'s corner specs carried across, where `sources[k]` is the\n * anchor command of `from` that anchor command `k` of `to` was drawn from, or\n * -1 for one with no source. Each spec lands once, on the first anchor drawn\n * from its own; any specs `to` already had are dropped.\n */\nexport function carryCorners(from: PolygonPath, to: PolygonPath, sources: ArrayLike<number>): PolygonPath {\n const bare = withoutCorners(to);\n const specs = from.corners;\n if (!specs) return bare;\n const fromFlat = flatAnchorIndices(from);\n const toFlat = flatAnchorIndices(to);\n const placed = new Set<number>();\n const next: (CornerSpec | null)[] = [];\n for (let k = 0; k < toFlat.length; k++) {\n const s = sources[k];\n if (s === undefined || s < 0 || s >= fromFlat.length) continue;\n const f = fromFlat[s];\n const spec = specs[f];\n if (!spec || placed.has(f)) continue;\n placed.add(f);\n while (next.length < toFlat[k]) next.push(null);\n next[toFlat[k]] = spec;\n }\n const corners = compactCorners(next);\n return corners ? { ...bare, corners } : bare;\n}\n\n/** `count` consecutive anchor command indices from `start`: the sources of a\n * contiguous slice. */\nexport function anchorRange(start: number, count: number): Int32Array {\n const out = new Int32Array(count);\n for (let i = 0; i < count; i++) out[i] = start + i;\n return out;\n}\n","/**\n * Putting corner specs back on a path an operation rebuilt from expanded\n * geometry. Booleans, trims and cuts work on what a path draws, its corners\n * cut and spanned (`resolveCorners`); wherever a corner's cut comes through\n * whole, it folds back into its anchor and spec, and only a corner the\n * operation cut into or moved stays expanded.\n */\nimport type { Path, PolygonPath } from '../path';\nimport { nearestOnCubic, nearestOnLine } from '../nearest';\nimport { PathBuilder } from './builder';\nimport { flatAnchorIndices } from './cornerCarry';\nimport { decodeContours, type Contour, type Seg } from './cornerSegments';\nimport type { Point } from './cubicMath';\nimport type { CornerPiece } from './cornerShape';\nimport { compactCorners, withoutCorners, type CornerSpec } from './cornerSpec';\nimport { cornerCuts } from './corners';\nimport { distance, lerpPoint } from '../points2';\n\n/** A corner a rebuilt path may hold expanded: the anchor and spec it folds\n * back into, and the cut it is drawn as, from `start` to `end`. */\nexport interface CornerTrace {\n anchor: Point;\n spec: CornerSpec;\n start: Point;\n end: Point;\n pieces: readonly CornerPiece[];\n}\n\n/** How far a point may sit from where a corner draws it and still count as on it. */\nexport const CORNER_RESTORE_TOLERANCE = 1e-3;\n\n/** The corners `path` cuts, as {@link restoreCorners} looks for them. */\nexport function cornerTraces(path: Path): CornerTrace[] {\n if (path.kind !== 'polygon') return [];\n return cornerCuts(path).map(({ anchor, spec, start, end, pieces }) => ({ anchor, spec, start, end, pieces }));\n}\n\n/**\n * `result` with the corners of `sources` folded back in wherever it still\n * draws them whole: an operation's output, rebuilt from what the sources\n * draw. A corner the operation cut into, or whose edges it moved, stays as\n * the plain geometry it already is.\n */\nexport function keepCorners(sources: readonly Path[], result: PolygonPath, tolerance = CORNER_RESTORE_TOLERANCE): PolygonPath {\n const traces = sources.flatMap(cornerTraces);\n return traces.length === 0 ? result : restoreCorners(result, traces, tolerance);\n}\n\nfunction onTrace(p: Point, t: CornerTrace, tol: number): boolean {\n let from = t.start;\n for (const piece of t.pieces) {\n const d = piece.kind === 'line'\n ? nearestOnLine(p.x, p.y, from.x, from.y, piece.to.x, piece.to.y).dist\n : nearestOnCubic(p.x, p.y, from.x, from.y, piece.c1.x, piece.c1.y, piece.c2.x, piece.c2.y, piece.to.x, piece.to.y).dist;\n if (d <= tol) return true;\n from = piece.to;\n }\n return false;\n}\n\n/** The blossom of cubic `s` at `(u, v, w)`. */\nfunction blossom(s: Seg, u: number, v: number, w: number): Point {\n const a = lerpPoint(s.p0, s.c1, u), b = lerpPoint(s.c1, s.c2, u), c = lerpPoint(s.c2, s.p3, u);\n const d = lerpPoint(a, b, v), e = lerpPoint(b, c, v);\n return lerpPoint(d, e, w);\n}\n\n/** The parameter, past `[0, 1]` on the side `from` gives, where cubic `s`\n * carried on as the same polynomial passes through `target`; null if it does not. */\nfunction extendTo(s: Seg, target: Point, from: 0 | 1, tol: number): number | null {\n const at = (u: number) => blossom(s, u, u, u);\n const d1 = (u: number): Point => {\n const a = blossom(s, u, u, 0), b = blossom(s, u, u, 1);\n return { x: 3 * (b.x - a.x), y: 3 * (b.y - a.y) };\n };\n const speed = Math.hypot(d1(from).x, d1(from).y);\n if (speed === 0) return null;\n let u = from + (from === 1 ? 1 : -1) * distance(at(from), target) / speed;\n for (let i = 0; i < 30; i++) {\n const p = at(u), d = d1(u);\n const dd = d.x * d.x + d.y * d.y;\n if (dd === 0) break;\n u -= ((p.x - target.x) * d.x + (p.y - target.y) * d.y) / dd;\n }\n return distance(at(u), target) <= tol ? u : null;\n}\n\n/** `s` with its start moved to `start` and its end to `end`, either left\n * where it was when undefined; null when a curve cannot reach them. */\nfunction reachSeg(s: Seg, start: Point | undefined, end: Point | undefined, tol: number): Seg | null {\n const p0 = start ?? s.p0, p3 = end ?? s.p3;\n if (s.line) return { line: true, p0, c1: p0, c2: p3, p3 };\n const u0 = start ? extendTo(s, start, 0, tol) : 0;\n const u1 = end ? extendTo(s, end, 1, tol) : 1;\n if (u0 === null || u1 === null) return null;\n return { line: false, p0, c1: blossom(s, u0, u0, u1), c2: blossom(s, u0, u1, u1), p3 };\n}\n\n/** A stretch of a contour's anchors, `from` to `to` going forward, that draws one corner. */\ninterface Run { from: number; to: number; trace: CornerTrace }\n\n/** Whether anchor `a`, reached or left by straight edge `edge`, ends a corner's\n * cut at `p`: it sits there, or it sits on the cut and the edge runs through\n * `p` to it, as when flattening has merged the cut's end into the edge. */\nfunction endsCut(a: Point, edge: Seg, p: Point, t: CornerTrace, tol: number): boolean {\n if (distance(a, p) <= tol) return true;\n return edge.line && onTrace(a, t, tol)\n && nearestOnLine(p.x, p.y, edge.p0.x, edge.p0.y, edge.p3.x, edge.p3.y).dist <= tol;\n}\n\nfunction findRun(c: Contour, t: CornerTrace, tol: number): Run | null {\n const n = c.anchors.length;\n for (let i = c.closed ? 0 : 1; i < n; i++) {\n for (const [first, last] of [[t.start, t.end], [t.end, t.start]] as const) {\n if (!endsCut(c.anchors[i], c.segs[(i - 1 + n) % n], first, t, tol)) continue;\n for (let j = i + 1, steps = 1; steps < c.segs.length; j++, steps++) {\n if (!c.closed && j >= n - 1) break;\n const a = c.anchors[j % n];\n const seg = c.segs[(j - 1) % n];\n if (!seg.line && !onTrace(blossom(seg, 0.5, 0.5, 0.5), t, tol)) break;\n if (endsCut(a, c.segs[j % n], last, t, tol)) return { from: i, to: j % n, trace: t };\n if (!onTrace(a, t, tol)) break;\n }\n }\n }\n return null;\n}\n\n/** The anchors a run covers, its ends included. */\nfunction covered(run: Run, n: number): number[] {\n const out: number[] = [];\n for (let k = run.from; ; k = (k + 1) % n) {\n out.push(k);\n if (k === run.to) return out;\n }\n}\n\ninterface Node { at: Point; spec: CornerSpec | null }\ninterface Rebuilt { nodes: Node[]; segs: Seg[]; closed: boolean; folded: Run[] }\n\n/** `c` with each of `runs` folded into its anchor; null when an edge next to one cannot reach it. */\nfunction foldContour(c: Contour, runs: readonly Run[], specs: readonly (CornerSpec | null)[], tol: number): Rebuilt | null {\n const n = c.anchors.length;\n const runAt = new Map<number, Run>();\n const inside = new Set<number>();\n for (const run of runs) {\n runAt.set(run.from, run);\n for (const k of covered(run, n)) inside.add(k);\n }\n let begin = 0;\n if (c.closed) {\n const free = c.anchors.findIndex((_a, k) => !inside.has(k));\n begin = free >= 0 ? free : runs[0]!.from;\n }\n const nodes: Node[] = [];\n const exits: number[] = []; // anchor each node's outgoing segment leaves from\n for (let step = 0, k = begin; step < n; ) {\n const run = runAt.get(k);\n if (run) {\n nodes.push({ at: run.trace.anchor, spec: run.trace.spec });\n exits.push(run.to);\n const span = covered(run, n).length;\n step += span;\n k = (run.to + 1) % n;\n } else {\n nodes.push({ at: c.anchors[k], spec: specs[k] ?? null });\n exits.push(k);\n step++;\n k = (k + 1) % n;\n }\n }\n const runEnds = new Set(runs.map((r) => r.to));\n const segs: Seg[] = [];\n const count = c.closed ? nodes.length : nodes.length - 1;\n for (let m = 0; m < count; m++) {\n const exit = exits[m]!;\n const moveStart = runEnds.has(exit) ? nodes[m]!.at : undefined;\n const moveEnd = runAt.has((exit + 1) % n) ? nodes[(m + 1) % nodes.length]!.at : undefined;\n const reached = reachSeg(c.segs[exit]!, moveStart, moveEnd, tol);\n if (!reached) return null;\n segs.push(reached);\n }\n return { nodes, segs, closed: c.closed, folded: [...runs] };\n}\n\nfunction write(contours: readonly Rebuilt[], result: PolygonPath): PolygonPath {\n const b = new PathBuilder();\n if (result.origin) b.setOrigin(result.origin.x, result.origin.y);\n const specs: (CornerSpec | null)[] = [];\n for (const { nodes, segs, closed } of contours) {\n b.moveTo(nodes[0]!.at.x, nodes[0]!.at.y);\n specs.push(nodes[0]!.spec);\n segs.forEach((s, m) => {\n const to = nodes[(m + 1) % nodes.length]!;\n const closing = closed && m === segs.length - 1;\n if (closing && s.line) return;\n if (s.line) b.lineTo(to.at.x, to.at.y);\n else b.curveTo(s.c1.x, s.c1.y, s.c2.x, s.c2.y, to.at.x, to.at.y);\n specs.push(to.spec);\n });\n if (closed) b.close();\n }\n const { commands, coords } = b.build();\n const built: PolygonPath = { ...withoutCorners(result), commands, coords };\n const flat = flatAnchorIndices(built);\n const corners: (CornerSpec | null)[] = [];\n specs.forEach((spec, k) => {\n if (!spec) return;\n while (corners.length < flat[k]!) corners.push(null);\n corners[flat[k]!] = spec;\n });\n const compact = compactCorners(corners);\n return compact ? { ...built, corners: compact } : built;\n}\n\n/** Whether every corner folded into `path` draws again where its trace says. */\nfunction failedTraces(path: PolygonPath, tol: number, folded: readonly Run[]): Set<CornerTrace> {\n const bad = new Set(folded.map((r) => r.trace));\n for (const cut of cornerCuts(path)) {\n for (const t of bad) {\n if (distance(cut.anchor, t.anchor) > tol) continue;\n const same = (distance(cut.start, t.start) <= tol && distance(cut.end, t.end) <= tol)\n || (distance(cut.start, t.end) <= tol && distance(cut.end, t.start) <= tol);\n if (same) bad.delete(t);\n }\n }\n return bad;\n}\n\n/**\n * `result` with each of `traces` it draws whole folded back into its anchor\n * and spec. A trace counts as drawn when a run of anchors goes from one end\n * of its cut to the other along it, the edges either side carry on to its\n * anchor, and the folded corner cuts the same again. Specs `result` already\n * holds are kept.\n */\nexport function restoreCorners(result: PolygonPath, traces: readonly CornerTrace[], tolerance = CORNER_RESTORE_TOLERANCE): PolygonPath {\n const contours = decodeContours(result);\n if (!contours || traces.length === 0) return result;\n const rejected = new Set<CornerTrace>();\n for (let attempt = 0; attempt <= traces.length; attempt++) {\n const rebuilt: Rebuilt[] = [];\n for (const c of contours) {\n const runs: Run[] = [];\n const used = new Set<number>();\n for (const t of traces) {\n if (rejected.has(t)) continue;\n const run = findRun(c, t, tolerance);\n if (!run) continue;\n const span = covered(run, c.anchors.length);\n if (span.some((k) => used.has(k))) continue;\n span.forEach((k) => used.add(k));\n runs.push(run);\n }\n const specs = c.anchors.map((_a, k) => result.corners?.[c.first + k] ?? null);\n const folded = runs.length > 0 ? foldContour(c, runs, specs, tolerance) : null;\n if (runs.length > 0 && !folded) {\n runs.forEach((r) => rejected.add(r.trace));\n rebuilt.length = 0;\n break;\n }\n rebuilt.push(folded ?? { nodes: c.anchors.map((at, k) => ({ at, spec: specs[k]! })), segs: c.segs, closed: c.closed, folded: [] });\n }\n if (rebuilt.length !== contours.length) continue;\n const folded = rebuilt.flatMap((r) => r.folded);\n if (folded.length === 0) return result;\n const out = write(rebuilt, result);\n const bad = failedTraces(out, tolerance, folded);\n if (bad.size === 0) return out;\n bad.forEach((t) => rejected.add(t));\n }\n return result;\n}\n","/** A contour as Bézier segments: evaluating and splitting one, and where one crosses a line. */\n\nimport { splitCubicAt, splitQuadraticAt } from '../curve';\nimport { ringSignedArea } from '../polyline';\nimport type { Point } from '../paths/cubicMath';\n\n/** A Bézier segment by its control points: 2 = line, 3 = quadratic, 4 = cubic. */\nexport type Seg = Point[];\nexport type Contour = Seg[];\n\n/** A point on a contour: segment index and parameter. */\nexport interface Station {\n seg: number;\n t: number;\n pt: Point;\n}\n\nexport function evalSeg(s: Seg, t: number): Point {\n const u = 1 - t;\n if (s.length === 2) return { x: u * s[0].x + t * s[1].x, y: u * s[0].y + t * s[1].y };\n if (s.length === 3) {\n const a = u * u, b = 2 * u * t, c = t * t;\n return { x: a * s[0].x + b * s[1].x + c * s[2].x, y: a * s[0].y + b * s[1].y + c * s[2].y };\n }\n const a = u * u * u, b = 3 * u * u * t, c = 3 * u * t * t, d = t * t * t;\n return {\n x: a * s[0].x + b * s[1].x + c * s[2].x + d * s[3].x,\n y: a * s[0].y + b * s[1].y + c * s[2].y + d * s[3].y,\n };\n}\n\nexport function derivSeg(s: Seg, t: number): Point {\n const n = s.length - 1;\n const d: Seg = [];\n for (let i = 0; i < n; i++) d.push({ x: n * (s[i + 1].x - s[i].x), y: n * (s[i + 1].y - s[i].y) });\n return d.length === 1 ? d[0] : evalSeg(d, t);\n}\n\nfunction splitSeg(s: Seg, t: number): [Seg, Seg] {\n const pts = (c: ArrayLike<number>): Seg => {\n const out: Seg = [];\n for (let i = 0; i < c.length; i += 2) out.push({ x: c[i], y: c[i + 1] });\n return out;\n };\n if (s.length === 2) {\n const m = evalSeg(s, t);\n return [[s[0], m], [m, s[1]]];\n }\n if (s.length === 3) {\n const [l, r] = splitQuadraticAt(s[0].x, s[0].y, s[1].x, s[1].y, s[2].x, s[2].y, t);\n return [pts(l), pts(r)];\n }\n const [l, r] = splitCubicAt(s[0].x, s[0].y, s[1].x, s[1].y, s[2].x, s[2].y, s[3].x, s[3].y, t);\n return [pts(l), pts(r)];\n}\n\n/** The part of `s` between t0 and t1, with its ends snapped to the given points. */\nexport function subSeg(s: Seg, t0: number, t1: number, p0: Point, p1: Point): Seg | null {\n if (t1 - t0 <= 0) return null;\n let out = s;\n if (t0 > 0) out = splitSeg(out, t0)[1];\n const u = (t1 - t0) / (1 - t0);\n if (u < 1) out = splitSeg(out, u)[0];\n out = out.slice();\n out[0] = p0;\n out[out.length - 1] = p1;\n return out;\n}\n\nexport const reverseContour = (c: Contour): Contour => c.map((s) => s.slice().reverse()).reverse();\n\n/** Points along a contour for area and containment estimates. */\nexport function sampleContour(c: Contour): number[] {\n const out: number[] = [];\n for (const s of c) {\n const n = s.length === 2 ? 1 : 16;\n for (let i = 0; i < n; i++) {\n const p = evalSeg(s, i / n);\n out.push(p.x, p.y);\n }\n }\n return out;\n}\n\n/** Signed area; positive when the fill lies to the left of the direction of travel. */\nexport function signedArea(c: Contour): number {\n return ringSignedArea(sampleContour(c));\n}\n\n/** Bernstein coefficients of the signed distance cross(d, P − o) along `s`. */\nexport function sideCoeffs(s: Seg, o: Point, d: Point): number[] {\n return s.map((p) => d.x * (p.y - o.y) - d.y * (p.x - o.x));\n}\n\nfunction bernstein(f: number[], t: number): number {\n const u = 1 - t;\n if (f.length === 2) return u * f[0] + t * f[1];\n if (f.length === 3) return u * u * f[0] + 2 * u * t * f[1] + t * t * f[2];\n return u * u * u * f[0] + 3 * u * u * t * f[1] + 3 * u * t * t * f[2] + t * t * t * f[3];\n}\n\ninterface SignChange { t: number; before: number; after: number }\n\n/**\n * Where the polynomial changes sign on [0, 1]. The interval is cut at the\n * derivative's roots so each piece is monotonic, then each sign change is\n * bisected. Tangencies have no sign change and are skipped. With\n * `zeroIsPositive` a zero counts as positive, so a change landing exactly on\n * an end is still seen once; otherwise zeros at the ends are left to the\n * caller.\n */\nexport function signChanges(f: number[], zeroIsPositive: boolean): SignChange[] {\n const sgn = (v: number) => (v > 0 ? 1 : v < 0 ? -1 : zeroIsPositive ? 1 : 0);\n const cuts = [0, ...criticalPoints(f), 1];\n const out: SignChange[] = [];\n for (let i = 0; i + 1 < cuts.length; i++) {\n let lo = cuts[i], hi = cuts[i + 1];\n const slo = sgn(bernstein(f, lo)), shi = sgn(bernstein(f, hi));\n if (slo === 0 && i > 0) {\n const before = sgn(bernstein(f, lo - 1e-7)), after = sgn(bernstein(f, lo + 1e-7));\n if (before * after < 0) out.push({ t: lo, before, after });\n }\n if (slo * shi >= 0) continue;\n for (let it = 0; it < 64; it++) {\n const mid = (lo + hi) / 2;\n if (sgn(bernstein(f, mid)) === slo) lo = mid; else hi = mid;\n }\n out.push({ t: (lo + hi) / 2, before: slo, after: shi });\n }\n return out;\n}\n\n/** Roots in (0, 1) of the derivative of a Bernstein polynomial of degree ≤ 3. */\nfunction criticalPoints(f: number[]): number[] {\n if (f.length < 3) return [];\n const n = f.length - 1;\n const d = f.slice(1).map((v, i) => n * (v - f[i]));\n // Power basis of the derivative: A t² + B t + C.\n let A = 0, B: number, C: number;\n if (d.length === 2) { B = d[1] - d[0]; C = d[0]; }\n else { A = d[0] - 2 * d[1] + d[2]; B = 2 * (d[1] - d[0]); C = d[0]; }\n const out: number[] = [];\n const scale = Math.max(Math.abs(A), Math.abs(B), Math.abs(C)) || 1;\n if (Math.abs(A) / scale < 1e-12) {\n if (Math.abs(B) / scale > 1e-12) out.push(-C / B);\n } else {\n const disc = B * B - 4 * A * C;\n if (disc >= 0) {\n const q = -0.5 * (B + Math.sign(B || 1) * Math.sqrt(disc));\n out.push(q / A);\n if (q !== 0) out.push(C / q);\n }\n }\n return out.filter((t) => t > 0 && t < 1).sort((x, y) => x - y);\n}\n\n/** Sign of f just after t = 0 (`fromStart`) or just before t = 1, read off the control values. */\nexport function endSide(f: number[], fromStart: boolean): number {\n const n = f.length;\n for (let i = 1; i < n; i++) {\n const v = fromStart ? f[i] : f[n - 1 - i];\n if (v !== 0) return Math.sign(v);\n }\n return 0;\n}\n","/** Where two Bézier segments cross, by subdivision then Newton refinement. */\n\nimport type { Point } from '../paths/cubicMath';\nimport { evalSeg, derivSeg, type Seg } from '../booleans/contourSegments';\n\n/** One crossing of segments `a` and `b`: the parameter on each, and the point. */\nexport interface SegmentCrossing {\n ta: number;\n tb: number;\n x: number;\n y: number;\n}\n\n/** Subdivision stops once both pieces are this flat (world units). */\nconst FLAT = 1e-4;\nconst MAX_DEPTH = 48;\n/** Crossings closer than this along both parameters are one crossing. */\nconst SAME_T = 1e-7;\n/** Two overlapping curves cross everywhere; stop collecting past this. */\nconst MAX_HITS = 16;\n\ninterface Piece {\n pts: Seg;\n t0: number;\n t1: number;\n}\n\nfunction boxOf(pts: Seg): [number, number, number, number] {\n let x0 = Infinity, y0 = Infinity, x1 = -Infinity, y1 = -Infinity;\n for (const p of pts) {\n if (p.x < x0) x0 = p.x;\n if (p.x > x1) x1 = p.x;\n if (p.y < y0) y0 = p.y;\n if (p.y > y1) y1 = p.y;\n }\n return [x0, y0, x1, y1];\n}\n\n/** How far the control points stray from the chord. Zero for a line. */\nfunction flatness(pts: Seg): number {\n if (pts.length === 2) return 0;\n const a = pts[0], b = pts[pts.length - 1];\n const dx = b.x - a.x, dy = b.y - a.y;\n const len = Math.hypot(dx, dy);\n let worst = 0;\n for (let i = 1; i < pts.length - 1; i++) {\n const p = pts[i];\n const d = len === 0 ? Math.hypot(p.x - a.x, p.y - a.y) : Math.abs((p.x - a.x) * dy - (p.y - a.y) * dx) / len;\n if (d > worst) worst = d;\n }\n return worst;\n}\n\n/** De Casteljau at one half, for a segment of any degree. */\nfunction halve(p: Piece): [Piece, Piece] {\n let row = p.pts;\n const left: Point[] = [row[0]];\n const right: Point[] = [row[row.length - 1]];\n while (row.length > 1) {\n const next: Point[] = [];\n for (let i = 0; i + 1 < row.length; i++) {\n next.push({ x: (row[i].x + row[i + 1].x) / 2, y: (row[i].y + row[i + 1].y) / 2 });\n }\n row = next;\n left.push(row[0]);\n right.unshift(row[row.length - 1]);\n }\n const tm = (p.t0 + p.t1) / 2;\n return [{ pts: left, t0: p.t0, t1: tm }, { pts: right, t0: tm, t1: p.t1 }];\n}\n\n/** Where chords p0→p1 and q0→q1 cross, as parameters on each, or null when\n * they are parallel or miss. `slack` widens [0, 1] on both. */\nfunction chordCross(p0: Point, p1: Point, q0: Point, q1: Point, slack: number): [number, number] | null {\n const rx = p1.x - p0.x, ry = p1.y - p0.y;\n const sx = q1.x - q0.x, sy = q1.y - q0.y;\n const den = rx * sy - ry * sx;\n if (den === 0) return null;\n const qx = q0.x - p0.x, qy = q0.y - p0.y;\n const u = (qx * sy - qy * sx) / den;\n const v = (qx * ry - qy * rx) / den;\n if (u < -slack || u > 1 + slack || v < -slack || v > 1 + slack) return null;\n return [u, v];\n}\n\n/** Newton on A(ta) − B(tb) = 0, kept inside [0, 1]. */\nfunction refine(a: Seg, b: Seg, ta: number, tb: number): [number, number] {\n for (let i = 0; i < 12; i++) {\n const pa = evalSeg(a, ta), pb = evalSeg(b, tb);\n const fx = pa.x - pb.x, fy = pa.y - pb.y;\n if (Math.abs(fx) + Math.abs(fy) < 1e-12) break;\n const da = derivSeg(a, ta), db = derivSeg(b, tb);\n // J = [da, -db]; solve J·[δa, δb] = −f.\n const det = -da.x * db.y + da.y * db.x;\n if (det === 0) break;\n const dta = (-fx * -db.y - -fy * -db.x) / det;\n const dtb = (da.x * -fy - da.y * -fx) / det;\n ta = Math.min(1, Math.max(0, ta + dta));\n tb = Math.min(1, Math.max(0, tb + dtb));\n }\n return [ta, tb];\n}\n\n/**\n * Every point where segment `a` crosses or touches segment `b` — each a line,\n * quadratic or cubic given by its control points — with the parameter on\n * each. Two lines are solved exactly; a curve is subdivided until its pieces\n * are flat, their chords crossed, and the answer refined against the curves.\n * Segments that overlap along a stretch report at most a few points of it.\n * Sorted by `ta`.\n */\nexport function intersectSegments(a: Point[], b: Point[]): SegmentCrossing[] {\n if (a.length === 2 && b.length === 2) {\n const uv = chordCross(a[0], a[1], b[0], b[1], 1e-12);\n if (!uv) return [];\n const ta = Math.min(1, Math.max(0, uv[0]));\n const tb = Math.min(1, Math.max(0, uv[1]));\n const p = evalSeg(a, ta);\n return [{ ta, tb, x: p.x, y: p.y }];\n }\n const out: SegmentCrossing[] = [];\n const push = (ta: number, tb: number) => {\n [ta, tb] = refine(a, b, ta, tb);\n const pa = evalSeg(a, ta), pb = evalSeg(b, tb);\n if (Math.hypot(pa.x - pb.x, pa.y - pb.y) > 1e-6 * (1 + Math.abs(pa.x) + Math.abs(pa.y))) return;\n if (out.some((h) => Math.abs(h.ta - ta) < SAME_T && Math.abs(h.tb - tb) < SAME_T)) return;\n out.push({ ta, tb, x: pa.x, y: pa.y });\n };\n const stack: Array<[Piece, Piece, number]> = [[{ pts: a, t0: 0, t1: 1 }, { pts: b, t0: 0, t1: 1 }, 0]];\n while (stack.length > 0 && out.length < MAX_HITS) {\n const [p, q, depth] = stack.pop()!;\n const bp = boxOf(p.pts), bq = boxOf(q.pts);\n if (bp[0] > bq[2] + FLAT || bq[0] > bp[2] + FLAT || bp[1] > bq[3] + FLAT || bq[1] > bp[3] + FLAT) continue;\n const fp = flatness(p.pts), fq = flatness(q.pts);\n if ((fp <= FLAT && fq <= FLAT) || depth >= MAX_DEPTH) {\n const uv = chordCross(p.pts[0], p.pts[p.pts.length - 1], q.pts[0], q.pts[q.pts.length - 1], 1e-6);\n if (uv) push(p.t0 + uv[0] * (p.t1 - p.t0), q.t0 + uv[1] * (q.t1 - q.t0));\n continue;\n }\n if (fp >= fq) {\n const [l, r] = halve(p);\n stack.push([l, q, depth + 1], [r, q, depth + 1]);\n } else {\n const [l, r] = halve(q);\n stack.push([p, l, depth + 1], [p, r, depth + 1]);\n }\n }\n return out.sort((h, k) => h.ta - k.ta);\n}\n","/** Reading a path into contours, and what a set of contours encloses. */\n\nimport { segmentsCross } from '../polyline';\nimport type { Path, PathFillRule } from '../path';\nimport { PATH_C, PATH_L, PATH_M, PATH_Q, PATH_Z } from '../commands';\nimport type { Point } from '../paths/cubicMath';\nimport { EPS } from '../scalar';\nimport { fillsOpenSubpaths } from '../openFill';\nimport { resolveCorners } from '../paths/corners';\nimport { worldCoords } from '../paths/pathOrigin';\nimport { type Contour, evalSeg, derivSeg, reverseContour, sideCoeffs, signChanges } from './contourSegments';\n\n/** The contours a fill of `path` covers: an open subpath closes implicitly\n * where a fill closes it, and is left out where one does not. */\nexport function parseContours(path: Path): Contour[] {\n const fillsOpen = path.kind === 'rect' || fillsOpenSubpaths(path);\n return parseSubpaths(path).filter((s) => s.closed || fillsOpen).map((s) => s.segs);\n}\n\nexport interface Subpath {\n segs: Contour;\n /** Closed by a `Z` (or a rect); the closing edge, if any, is in `segs`. */\n closed: boolean;\n}\n\n/**\n * Subpaths of `path` with their segments. With `implicitClose` (the default,\n * as a fill sees them) every subpath ends in its closing edge; without it,\n * only a subpath closed by `Z` does, as a stroke sees them.\n */\nexport function parseSubpaths(given: Path, implicitClose = true): Subpath[] {\n const path = resolveCorners(given);\n if (path.kind === 'rect') {\n const { x, y, width: w, height: h } = path;\n const p = [{ x, y }, { x: x + w, y }, { x: x + w, y: y + h }, { x, y: y + h }];\n return [{ segs: p.map((q, i) => [q, p[(i + 1) % 4]]), closed: true }];\n }\n const out: Subpath[] = [];\n let cur: Contour = [];\n let start: Point = { x: 0, y: 0 };\n let pen: Point = start;\n const finish = (closed: boolean) => {\n if (cur.length > 0 && (closed || implicitClose) && (pen.x !== start.x || pen.y !== start.y)) {\n cur.push([pen, start]);\n }\n if (cur.length > 0) out.push({ segs: cur, closed });\n cur = [];\n pen = start;\n };\n const c = worldCoords(path);\n let k = 0;\n for (const cmd of path.commands) {\n if (cmd === PATH_M) {\n finish(false);\n start = pen = { x: c[k], y: c[k + 1] };\n k += 2;\n } else if (cmd === PATH_L) {\n const e = { x: c[k], y: c[k + 1] };\n if (e.x !== pen.x || e.y !== pen.y) cur.push([pen, e]);\n pen = e;\n k += 2;\n } else if (cmd === PATH_Q) {\n const e = { x: c[k + 2], y: c[k + 3] };\n cur.push([pen, { x: c[k], y: c[k + 1] }, e]);\n pen = e;\n k += 4;\n } else if (cmd === PATH_C) {\n const e = { x: c[k + 4], y: c[k + 5] };\n cur.push([pen, { x: c[k], y: c[k + 1] }, { x: c[k + 2], y: c[k + 3] }, e]);\n pen = e;\n k += 6;\n } else if (cmd === PATH_Z) {\n finish(true);\n }\n }\n finish(false);\n return out;\n}\n\n/** Whether any contour crosses another or itself, judged on a flattening. */\nexport function contoursIntersect(contours: Contour[], tol: number): boolean {\n type Edge = { x0: number; y0: number; x1: number; y1: number; c: number; i: number; n: number };\n const edges: Edge[] = [];\n contours.forEach((contour, ci) => {\n const pts: Point[] = [];\n for (const s of contour) {\n let n = 1;\n if (s.length > 2) {\n let len = 0;\n for (let i = 0; i + 1 < s.length; i++) len += Math.hypot(s[i + 1].x - s[i].x, s[i + 1].y - s[i].y);\n n = Math.min(64, Math.max(2, Math.ceil(Math.sqrt(len / Math.max(tol, 1e-3)))));\n }\n for (let i = 0; i < n; i++) pts.push(evalSeg(s, i / n));\n }\n for (let i = 0; i < pts.length; i++) {\n const p = pts[i], q = pts[(i + 1) % pts.length];\n edges.push({ x0: p.x, y0: p.y, x1: q.x, y1: q.y, c: ci, i, n: pts.length });\n }\n });\n for (let i = 0; i < edges.length; i++) {\n const e = edges[i];\n for (let j = i + 1; j < edges.length; j++) {\n const f = edges[j];\n if (e.c === f.c && (j - i === 1 || (i === 0 && f.i === f.n - 1))) continue;\n if (Math.max(e.x0, e.x1) < Math.min(f.x0, f.x1) || Math.max(f.x0, f.x1) < Math.min(e.x0, e.x1)) continue;\n if (Math.max(e.y0, e.y1) < Math.min(f.y0, f.y1) || Math.max(f.y0, f.y1) < Math.min(e.y0, e.y1)) continue;\n if (segmentsCross(e.x0, e.y0, e.x1, e.y1, f.x0, f.y0, f.x1, f.y1)) return true;\n }\n }\n return false;\n}\n\n/** Winding number of `q`, by a ray cast in +x against the exact curves. */\nexport function windingAt(q: Point, contours: Contour[]): number {\n const dir = { x: 1, y: 0 };\n let w = 0;\n for (const contour of contours) {\n for (const s of contour) {\n for (const c of signChanges(sideCoeffs(s, q, dir), true)) {\n if (evalSeg(s, c.t).x > q.x) w += c.after > 0 ? 1 : -1;\n }\n }\n }\n return w;\n}\n\n/** The diagonal of the box around every control point of `contours`. */\nexport function extentOf(contours: Contour[]): number {\n let minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;\n for (const c of contours) for (const s of c) for (const p of s) {\n minX = Math.min(minX, p.x); maxX = Math.max(maxX, p.x);\n minY = Math.min(minY, p.y); maxY = Math.max(maxY, p.y);\n }\n return Math.hypot(maxX - minX, maxY - minY);\n}\n\n/** The area below which a region cut from `contours` is rounding, not a piece. */\nexport function negligibleArea(contours: Contour[]): number {\n const extent = extentOf(contours);\n return extent * extent * EPS * EPS;\n}\n\n/**\n * The contours that bound the fill, each turned so the fill lies on its left.\n * A contour with fill on both sides or neither (a same-direction inner ring\n * under nonzero) bounds nothing and is dropped.\n */\nexport function orientBoundaries(contours: Contour[], fillRule: PathFillRule): Contour[] {\n const filled = (q: Point) => {\n const w = windingAt(q, contours);\n return fillRule === 'evenodd' ? (w & 1) !== 0 : w !== 0;\n };\n const eps = Math.max(extentOf(contours) * 1e-6, 1e-9);\n\n const out: Contour[] = [];\n for (const contour of contours) {\n let probe = contour[0];\n let best = -1;\n for (const s of contour) {\n const len = Math.hypot(s[s.length - 1].x - s[0].x, s[s.length - 1].y - s[0].y);\n if (len > best) { best = len; probe = s; }\n }\n const p = evalSeg(probe, 0.5);\n let tan = derivSeg(probe, 0.5);\n const tl = Math.hypot(tan.x, tan.y);\n if (tl === 0) continue;\n tan = { x: tan.x / tl, y: tan.y / tl };\n const left = filled({ x: p.x - tan.y * eps, y: p.y + tan.x * eps });\n const right = filled({ x: p.x + tan.y * eps, y: p.y - tan.x * eps });\n if (left && !right) out.push(contour);\n else if (right && !left) out.push(reverseContour(contour));\n }\n return out;\n}\n","/** Grouping traced loops into regions, and writing contours back out as paths. */\n\nimport { pointInPolygon } from '../polyline';\nimport type { PolygonPath, PathFillRule } from '../path';\nimport { PATH_C, PATH_L, PATH_M, PATH_Q, PATH_Z } from '../commands';\nimport { type Contour, evalSeg, sampleContour, signedArea } from './contourSegments';\nimport type { Subpath } from './contours';\nimport { coordsFrom, originFor } from '../paths/pathOrigin';\n\n/** Group loops into regions: each positive loop with the holes it immediately contains. */\nexport function assembleRegions(outers: Contour[], holes: Contour[]): Contour[][] {\n const regions = outers.map((o) => ({ loops: [o], ring: sampleContour(o), area: signedArea(o) }));\n for (const h of holes) {\n const hp = evalSeg(h[0], 0.5);\n let best: (typeof regions)[number] | null = null;\n for (const r of regions) {\n if (pointInPolygon(r.ring, hp.x, hp.y) && (!best || r.area < best.area)) best = r;\n }\n best?.loops.push(h);\n }\n return regions.map((r) => r.loops);\n}\n\nexport const regionArea = (r: Contour[]): number => r.reduce((s, c) => s + signedArea(c), 0);\n\nexport const toPath = (loops: Contour[], fillRule: PathFillRule): PolygonPath =>\n writePath(loops.map((segs) => ({ segs, closed: true })), fillRule);\n\nexport function writePath(subpaths: Subpath[], fillRule: PathFillRule): PolygonPath {\n const cmds: number[] = [];\n const xs: number[] = [];\n for (const { segs, closed } of subpaths) {\n cmds.push(PATH_M);\n xs.push(segs[0][0].x, segs[0][0].y);\n for (const s of segs) {\n cmds.push(s.length === 2 ? PATH_L : s.length === 3 ? PATH_Q : PATH_C);\n for (let i = 1; i < s.length; i++) xs.push(s[i].x, s[i].y);\n }\n if (closed) cmds.push(PATH_Z);\n }\n const origin = originFor(xs);\n return {\n kind: 'polygon', commands: new Uint8Array(cmds), coords: coordsFrom(origin, xs), fillRule, ...(origin ? { origin } : {}),\n };\n}\n"]}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { forEachSegment, PATH_Z, PATH_Q, elevateQuadraticToCubic, cubicBounds, PATH_C, PATH_L, PATH_M } from './chunk-B3D6KWW3.js';
|
|
1
|
+
import { resolveCorners, fitCubicWithTangents } from './chunk-GA5R5KWD.js';
|
|
2
|
+
import { forEachSegment, PATH_Z, PATH_Q, elevateQuadraticToCubic, cubicBounds, PATH_C, PATH_L, PATH_M, nearestOnLine, pointSegmentDist2 } from './chunk-346XYYMX.js';
|
|
4
3
|
|
|
5
4
|
// src/paths/bounds.ts
|
|
6
5
|
function boundsOfPath(path) {
|
|
@@ -157,12 +156,7 @@ function worstFromPolyline(from, to, bound) {
|
|
|
157
156
|
const px = from[i], py = from[i + 1];
|
|
158
157
|
let near = Infinity, at = hint;
|
|
159
158
|
for (let j = hint, end = Math.min(edges, hint + reach); j < end; j++) {
|
|
160
|
-
const
|
|
161
|
-
const dx = to[2 * j + 2] - x0, dy = to[2 * j + 3] - y0;
|
|
162
|
-
const len = dx * dx + dy * dy;
|
|
163
|
-
const s = len === 0 ? 0 : Math.min(1, Math.max(0, ((px - x0) * dx + (py - y0) * dy) / len));
|
|
164
|
-
const ex = x0 + s * dx - px, ey = y0 + s * dy - py;
|
|
165
|
-
const d = ex * ex + ey * ey;
|
|
159
|
+
const d = pointSegmentDist2(px, py, to[2 * j], to[2 * j + 1], to[2 * j + 2], to[2 * j + 3]);
|
|
166
160
|
if (d < near) {
|
|
167
161
|
near = d;
|
|
168
162
|
at = j;
|
|
@@ -245,5 +239,5 @@ function unit(p) {
|
|
|
245
239
|
}
|
|
246
240
|
|
|
247
241
|
export { boundsOfPath, fitPointRun, keepCorner };
|
|
248
|
-
//# sourceMappingURL=chunk-
|
|
249
|
-
//# sourceMappingURL=chunk-
|
|
242
|
+
//# sourceMappingURL=chunk-STYO7J4Y.js.map
|
|
243
|
+
//# sourceMappingURL=chunk-STYO7J4Y.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/paths/bounds.ts","../src/paths/fitHandles.ts","../src/paths/fitRun.ts"],"names":["al","be"],"mappings":";;;;AAUO,SAAS,aAAa,IAAA,EAAsB;AACjD,EAAA,IAAI,IAAA,CAAK,IAAA,KAAS,MAAA,EAAQ,OAAO,IAAA;AAEjC,EAAA,MAAM,EAAE,QAAA,EAAU,MAAA,EAAO,GAAI,eAAe,IAAI,CAAA;AAChD,EAAA,IAAI,QAAA,CAAS,WAAW,CAAA,EAAG;AACzB,IAAA,OAAO,EAAE,IAAA,EAAM,MAAA,EAAQ,CAAA,EAAG,CAAA,EAAG,GAAG,CAAA,EAAG,KAAA,EAAO,CAAA,EAAG,MAAA,EAAQ,CAAA,EAAE;AAAA,EACzD;AAEA,EAAA,IAAI,OAAO,QAAA,EAAU,IAAA,GAAO,QAAA,EAAU,IAAA,GAAO,WAAW,IAAA,GAAO,CAAA,QAAA;AAC/D,EAAA,IAAI,IAAA,GAAO,KAAA;AAEX,EAAA,MAAM,OAAA,GAAU,CAAC,CAAA,EAAW,CAAA,KAAc;AACxC,IAAA,IAAI,CAAA,GAAI,MAAM,IAAA,GAAO,CAAA;AACrB,IAAA,IAAI,CAAA,GAAI,MAAM,IAAA,GAAO,CAAA;AACrB,IAAA,IAAI,CAAA,GAAI,MAAM,IAAA,GA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ds, elevateQuadraticToCubic } from '../curve';\nimport { forEachSegment, PATH_C, PATH_L, PATH_M, PATH_Q, PATH_Z } from '../commands';\nimport type { Path, RectPath } from '../path';\nimport { resolveCorners } from './corners';\n\n/**\n * AABB of a `Path`, returned as a `RectPath` for direct reuse with rect-fast-path machinery.\n * Control points are NOT included directly; they're used only to compute extrema that actually\n * lie on the curve. Corner shapes are bounded as they are drawn, expanded. Empty paths (no commands) return a zero-size rect anchored at the origin.\n */\nexport function boundsOfPath(path: Path): RectPath {\n if (path.kind === 'rect') return path;\n\n const { commands, coords } = resolveCorners(path);\n if (commands.length === 0) {\n return { kind: 'rect', x: 0, y: 0, width: 0, height: 0 };\n }\n\n let minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;\n let seen = false;\n\n const include = (x: number, y: number) => {\n if (x < minX) minX = x;\n if (x > maxX) maxX = x;\n if (y < minY) minY = y;\n if (y > maxY) maxY = y;\n seen = true;\n };\n\n forEachSegment(commands, coords, (cmd, ci, px, py) => {\n switch (cmd) {\n case PATH_M:\n case PATH_L: {\n include(coords[ci], coords[ci + 1]);\n break;\n }\n case PATH_C: {\n const [bMinX, bMinY, bMaxX, bMaxY] = cubicBounds(\n px, py,\n coords[ci], coords[ci + 1],\n coords[ci + 2], coords[ci + 3],\n coords[ci + 4], coords[ci + 5],\n );\n include(bMinX, bMinY);\n include(bMaxX, bMaxY);\n break;\n }\n case PATH_Q: {\n const qx2 = coords[ci + 2], qy2 = coords[ci + 3];\n const [c1x, c1y, c2x, c2y] = elevateQuadraticToCubic(px, py, coords[ci], coords[ci + 1], qx2, qy2);\n const [bMinX, bMinY, bMaxX, bMaxY] = cubicBounds(px, py, c1x, c1y, c2x, c2y, qx2, qy2);\n include(bMinX, bMinY);\n include(bMaxX, bMaxY);\n break;\n }\n case PATH_Z:\n break;\n default:\n throw new Error(`boundsOfPath: unknown command ${cmd}`);\n }\n });\n\n if (!seen) return { kind: 'rect', x: 0, y: 0, width: 0, height: 0 };\n return {\n kind: 'rect', x: minX + (path.origin?.x ?? 0), y: minY + (path.origin?.y ?? 0),\n width: maxX - minX, height: maxY - minY,\n };\n}\n\n","/**\n * How far a cubic and a run of samples stray from each other, and the handle\n * lengths that bring them closest: the measure and the search behind\n * `fitPointRun`. Both work on flattened cubics and on the run as a polyline.\n */\nimport type { Point } from './cubicMath';\nimport { pointSegmentDist2 } from '../points2';\n\n/** A cubic's two handles. */\nexport interface Handles {\n cp1: Point;\n cp2: Point;\n}\n\n/** Handle lengths tried on each axis of the coarse search, as shares of the chord. */\nconst GRID = [0.02, 0.1, 0.2, 0.3, 0.45, 0.6, 0.8, 1.05];\n/** Most steps of the pattern search after the coarse one. */\nconst MAX_STEPS = 60;\n/** Segments the cubic is flattened to while the search compares handle lengths. */\nconst SEARCH_FLAT = 48;\n/** The search stops once the run and the cubic are within this share of the tolerance. */\nconst TARGET = 0.9;\n/** A least-squares fit farther than this many tolerances from the run is not searched around. */\nconst SEARCH_REACH = 4;\n/** A coarse best farther than this many tolerances is not worth refining. */\nconst GIVE_UP = 2;\n/** How far a flattened cubic may sit from the cubic, as a share of the tolerance, when checking a fit. */\nconst CHECK_SAG = 1 / 16;\nconst MAX_CHECK_FLAT = 512;\n\n/** `pts` as interleaved `x, y`. */\nexport function packRun(pts: readonly Point[]): Float64Array {\n const run = new Float64Array(2 * pts.length);\n pts.forEach((p, i) => { run[2 * i] = p.x; run[2 * i + 1] = p.y; });\n return run;\n}\n\n/**\n * Whether the cubic from `a` to `e` lies within `tol` of the polyline through\n * `run`, and every sample of `run` within `tol` of it. The samples hold the\n * run to the cubic; the other way holds the cubic to the run, which a cubic\n * bulging across a sparsely sampled flat fails. The cubic is flattened finely\n * enough that its chords stay within a sixteenth of `tol` of it, and that\n * much is taken off the bound.\n */\nexport function cubicWithin(run: Float64Array, a: Point, cp1: Point, cp2: Point, e: Point, tol: number): boolean {\n // A chord of a cubic split N ways sits within max|B''| / 8N² of it, and |B''| is at most 6 × the larger second difference.\n const bend = 6 * Math.max(Math.hypot(a.x - 2 * cp1.x + cp2.x, a.y - 2 * cp1.y + cp2.y), Math.hypot(cp1.x - 2 * cp2.x + e.x, cp1.y - 2 * cp2.y + e.y));\n const n = Math.min(MAX_CHECK_FLAT, Math.max(8, Math.ceil(Math.sqrt(bend / (8 * CHECK_SAG * tol)))));\n const sag = bend / (8 * n * n);\n const bound = tol - sag;\n if (bound <= 0) return false;\n const flat = new Float64Array(2 * (n + 1));\n flatten(a, cp1, cp2, e, flat);\n return worstFromPolyline(run, flat, bound) <= bound && worstFromPolyline(flat, run, bound) <= bound;\n}\n\n/**\n * The handle lengths, directions held, that bring the run nearest the cubic\n * both ways: a coarse grid, then a pattern search from its best; null when\n * even the best of the grid is far off. Least squares minimizes the sum, so\n * its worst sample can sit well outside a tolerance other lengths meet, often\n * in another basin entirely: a bend near one end wants that end's handle\n * short. The caller checks the result with {@link cubicWithin}.\n */\nexport function searchHandles(run: Float64Array, a: Point, e: Point, tStart: Point, tEnd: Point, tol: number, from: Handles): Handles | null {\n const chord = Math.hypot(e.x - a.x, e.y - a.y);\n const at = (al: number, be: number): Handles => ({\n cp1: { x: a.x + al * tStart.x, y: a.y + al * tStart.y },\n cp2: { x: e.x + be * tEnd.x, y: e.y + be * tEnd.y },\n });\n const flat = new Float64Array(2 * (SEARCH_FLAT + 1));\n /** How far apart the run and the cubic get, or some figure above `bound` once they pass it. */\n const spread = (al: number, be: number, bound: number) => {\n const { cp1, cp2 } = at(al, be);\n flatten(a, cp1, cp2, e, flat);\n const out = worstFromPolyline(run, flat, bound);\n return out > bound ? out : Math.max(out, worstFromPolyline(flat, run, bound));\n };\n const fromAl = Math.max(0, (from.cp1.x - a.x) * tStart.x + (from.cp1.y - a.y) * tStart.y);\n const fromBe = Math.max(0, (from.cp2.x - e.x) * tEnd.x + (from.cp2.y - e.y) * tEnd.y);\n let al = fromAl, be = fromBe, best = spread(al, be, Infinity);\n if (best > SEARCH_REACH * tol) return null;\n for (const fa of GRID) for (const fb of GRID) {\n const d = spread(fa * chord, fb * chord, best);\n if (d < best) { best = d; al = fa * chord; be = fb * chord; }\n }\n if (best > GIVE_UP * tol) return null;\n let step = chord * 0.05;\n for (let i = 0; i < MAX_STEPS && best > TARGET * tol && step > tol / 32; i++) {\n let moved = false;\n for (const [da, db] of STEPS) {\n const na = al + da * step, nb = be + db * step;\n if (na < 0 || nb < 0) continue;\n const d = spread(na, nb, best);\n if (d < best) { best = d; al = na; be = nb; moved = true; break; }\n }\n if (!moved) step /= 2;\n }\n return at(al, be);\n}\n\nconst STEPS = [[1, 0], [-1, 0], [0, 1], [0, -1], [1, 1], [-1, -1], [1, -1], [-1, 1]];\n\n/** The cubic at even parameters, as many as `out` holds points, into `out`. */\nfunction flatten(a: Point, cp1: Point, cp2: Point, e: Point, out: Float64Array): void {\n const n = out.length / 2 - 1;\n const ax = e.x - a.x + 3 * (cp1.x - cp2.x), ay = e.y - a.y + 3 * (cp1.y - cp2.y);\n const bx = 3 * (a.x - 2 * cp1.x + cp2.x), by = 3 * (a.y - 2 * cp1.y + cp2.y);\n const cx = 3 * (cp1.x - a.x), cy = 3 * (cp1.y - a.y);\n for (let k = 0; k <= n; k++) {\n const t = k / n;\n out[2 * k] = ((ax * t + bx) * t + cx) * t + a.x;\n out[2 * k + 1] = ((ay * t + by) * t + cy) * t + a.y;\n }\n}\n\n/**\n * The farthest any interior point of `from` lies from the polyline through\n * `to`, both interleaved `x, y` and running the same way; it stops early,\n * with a figure above `bound`, once one is farther than that. Each point\n * looks only a stretch ahead of where the last one landed, so a polyline\n * doubling back reads as farther than it is, never nearer.\n */\nfunction worstFromPolyline(from: Float64Array, to: Float64Array, bound: number): number {\n const edges = to.length / 2 - 1;\n const reach = Math.max(4, edges >> 2);\n const limit = bound * bound;\n let hint = 0, worst = 0;\n for (let i = 2; i < from.length - 2; i += 2) {\n const px = from[i], py = from[i + 1];\n let near = Infinity, at = hint;\n for (let j = hint, end = Math.min(edges, hint + reach); j < end; j++) {\n const d = pointSegmentDist2(px, py, to[2 * j], to[2 * j + 1], to[2 * j + 2], to[2 * j + 3]);\n if (d < near) { near = d; at = j; }\n }\n hint = at;\n if (near > worst) {\n worst = near;\n if (worst > limit) break;\n }\n }\n return Math.sqrt(worst);\n}\n","/**\n * Fitting a run of sampled points with as few cubics as hold it within a\n * tolerance, each held to the run's end tangents: the refit `simplifyPath`\n * and `warpPath` share.\n */\nimport { nearestOnLine } from '../nearest';\nimport type { PenAnchor } from './anchors';\nimport type { Point } from './cubicMath';\nimport { cubicWithin, packRun, searchHandles } from './fitHandles';\nimport { fitCubicWithTangents } from './schneiderFit';\n\n/** Give `to`, an anchor a refit kept where `from` was, `from`'s corner spec. */\nexport function keepCorner(to: PenAnchor, from: PenAnchor): void {\n if (from.corner) to.corner = { ...from.corner };\n}\n\n/**\n * Fit `pts` with cubics held to the end tangents, each the longest stretch one\n * cubic holds within `tol`, and append the anchors after the first to `out`\n * (the first too when `out` is empty). `closing` folds the final anchor,\n * which lands on the subpath's first, into that first one.\n */\nexport function fitPointRun(pts: Point[], tStart: Point, tEnd: Point, tol: number, out: PenAnchor[], closing: boolean): void {\n if (out.length === 0) out.push({ x: pts[0].x, y: pts[0].y });\n const segs: Seg[] = [];\n fitGreedy(pts, tStart, tEnd, tol, segs);\n segs.forEach((seg, i) => {\n const prev = out[out.length - 1];\n if (seg.c1) prev.outHandle = seg.c1;\n const isLast = i === segs.length - 1;\n if (closing && isLast) {\n if (seg.c2) out[0].inHandle = seg.c2;\n return;\n }\n out.push(seg.c2 ? { x: seg.end.x, y: seg.end.y, inHandle: seg.c2 } : { x: seg.end.x, y: seg.end.y });\n });\n}\n\ntype Seg = { c1?: Point; c2?: Point; end: Point };\n\n/**\n * Each piece is the longest prefix of what is left that one cubic holds,\n * found by bisecting on its end sample. Splitting at the worst sample instead\n * cuts where a poor first fit strays most, which is rarely where a piece has\n * to end: it refit a puppet-warped bar with twice the anchors it needed.\n */\nfunction fitGreedy(pts: Point[], tStart: Point, tEnd: Point, tol: number, out: Seg[]): void {\n let from = 0;\n let tIn = tStart;\n for (;;) {\n const whole = fitOne(pts.slice(from), tIn, tEnd, tol);\n if (whole) { out.push(whole); return; }\n let lo = from + 1, hi = pts.length - 1;\n let piece: Seg = { end: pts[lo] };\n while (hi - lo > 1) {\n const mid = (lo + hi) >> 1;\n const fit = fitOne(pts.slice(from, mid + 1), tIn, neg(tangentAt(pts, mid)), tol);\n if (fit) { lo = mid; piece = fit; } else hi = mid;\n }\n out.push(piece);\n tIn = tangentAt(pts, lo);\n from = lo;\n }\n}\n\nconst tangentAt = (pts: Point[], k: number): Point => unit(sub2(pts[k + 1], pts[k - 1]));\n\n/** One cubic held to the run's end tangents within `tol` of the run both ways, or null. */\nfunction fitOne(pts: Point[], tStart: Point, tEnd: Point, tol: number): Seg | null {\n const a = pts[0];\n const e = pts[pts.length - 1];\n if (pts.length <= 2 || withinLine(pts, a, e, tol)) return { end: e };\n const run = packRun(pts);\n const { cp1, cp2 } = fitCubicWithTangents(pts, tStart, tEnd);\n if (cubicWithin(run, a, cp1, cp2, e, tol)) return { c1: cp1, c2: cp2, end: e };\n const found = searchHandles(run, a, e, tStart, tEnd, tol, { cp1, cp2 });\n return found && cubicWithin(run, a, found.cp1, found.cp2, e, tol) ? { c1: found.cp1, c2: found.cp2, end: e } : null;\n}\n\nfunction withinLine(pts: Point[], a: Point, e: Point, tol: number): boolean {\n for (let i = 1; i < pts.length - 1; i++) {\n if (nearestOnLine(pts[i].x, pts[i].y, a.x, a.y, e.x, e.y).dist > tol) return false;\n }\n return true;\n}\n\nconst sub2 = (p: Point, q: Point): Point => ({ x: p.x - q.x, y: p.y - q.y });\nconst neg = (p: Point): Point => ({ x: -p.x, y: -p.y });\nfunction unit(p: Point): Point {\n const len = Math.hypot(p.x, p.y);\n return len === 0 ? { x: 0, y: 0 } : { x: p.x / len, y: p.y / len };\n}\n"]}
|
|
@@ -54,33 +54,6 @@ declare function eulerCurvatureAt(seg: EulerSegment, s: number): number;
|
|
|
54
54
|
* to world arc length, at fraction `s` of it. */
|
|
55
55
|
declare function eulerCurvatureDerivativesAt(seg: EulerSegment, s: number): [number, number];
|
|
56
56
|
|
|
57
|
-
/**
|
|
58
|
-
* Spiro curves: a spline defined by on-curve points alone. Between each pair
|
|
59
|
-
* of neighboring points runs an Euler-spiral segment (`eulerSpiral`), and the
|
|
60
|
-
* segments are solved together so that, at every smooth point, both the
|
|
61
|
-
* tangent and the curvature carry straight through. The curve has no handles
|
|
62
|
-
* to tune; moving a point re-solves the whole curve.
|
|
63
|
-
*
|
|
64
|
-
* Each point's kind says what holds at it:
|
|
65
|
-
*
|
|
66
|
-
* | kind | at the point |
|
|
67
|
-
* |---|---|
|
|
68
|
-
* | `smooth` | tangent and curvature continue (G2); next to a straight segment, the curve leaves along the line |
|
|
69
|
-
* | `g4` | tangent, curvature, and the curvature's first two derivatives continue (G4); otherwise as `smooth` |
|
|
70
|
-
* | `corner` | the two sides are independent; each meets the point with zero curvature |
|
|
71
|
-
* | `left` | the segment arriving is straight, and the curve leaving continues the line |
|
|
72
|
-
* | `right` | the segment leaving is straight, and the curve arriving runs into the line |
|
|
73
|
-
*
|
|
74
|
-
* The ends of an open curve meet their points with zero curvature, as a
|
|
75
|
-
* corner's sides do.
|
|
76
|
-
*
|
|
77
|
-
* A segment with a `g4` point at either end is a cubic-curvature segment,
|
|
78
|
-
* with two more unknowns than an Euler spiral's two end tangents. A `g4`
|
|
79
|
-
* point between two curved segments pays for its side's two with its two
|
|
80
|
-
* extra equations; anywhere else, such a segment's curvature stops bending
|
|
81
|
-
* at that end (its second derivative is zero there).
|
|
82
|
-
*/
|
|
83
|
-
|
|
84
57
|
/** What holds at a spiro point; see the table at the top of `spiro.ts`. */
|
|
85
58
|
type SpiroKind = 'smooth' | 'g4' | 'corner' | 'left' | 'right';
|
|
86
59
|
/** Every {@link SpiroKind}, in the order a picker lists them. */
|
package/dist/curves/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { P as PolygonPath } from '../path-t80OoJnM.js';
|
|
2
|
-
import { S as SpiroKind, C as CurvatureSource } from '../curvature-
|
|
2
|
+
import { S as SpiroKind, C as CurvatureSource } from '../curvature-DKPO4Qeh.js';
|
|
3
3
|
|
|
4
4
|
/** A point in the shared anchor set. Every representation reads only the
|
|
5
5
|
* fields it cares about: cubic Bezier reads inHandle/outHandle; NURBS
|
package/dist/curves/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { cubicCurvatureAt, SPIRO_KINDS, eulerCurvatureAt, spiroToPath, eulerPointAt, solveSpiro } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import
|
|
1
|
+
import { cubicCurvatureAt, SPIRO_KINDS, eulerCurvatureAt, spiroToPath, eulerPointAt, solveSpiro } from '../chunk-MOCSUHEI.js';
|
|
2
|
+
import '../chunk-HTT5AQIU.js';
|
|
3
|
+
import { PATH_M, cubicPointAt, PATH_L, PATH_Q, PATH_C } from '../chunk-346XYYMX.js';
|
|
4
|
+
import '../chunk-DNX24KBT.js';
|
|
5
5
|
|
|
6
6
|
// src/curves/anchorHandles.ts
|
|
7
7
|
var DEFAULT_HANDLE_FRACTION = 1 / 3;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as Affine, a as AnchorSet, P as PenAnchor, b as SpiroPoint, S as SpiroKind, c as Scale2 } from './curvature-
|
|
2
|
-
export { d as AnchorRect, e as CombTooth, f as CurvatureCombOptions, C as CurvatureSource, E as EulerFit, g as EulerSegment, h as SPIRO_KINDS, i as SegmentComb, j as SegmentHit, k as SpiroSegment, l as anchorAt, m as anchorCount, n as anchorsInRect, o as anchorsToPath, p as applyToPoint, q as boxToBox, r as combTeeth, s as countPathAnchors, t as cubicCurvatureAt, u as cubicCurvatureSource, v as cubicDerivativeAt, w as curvatureComb, x as deleteAnchorsAt, y as editAnchorSet, z as eulerAngleAt, B as eulerCurvatureAt, D as eulerCurvatureDerivativesAt, F as eulerPointAt, G as fitEulerSegment, H as flatAnchorIndex, I as identity, J as insertAnchorOnSegment, K as invert, L as isAnchorSmooth, M as isSpiroKind, N as isStraightSegment, O as locateAnchor, Q as moveHandleTo, R as multiply, T as nearestSegmentT, U as openSubpathAt, V as pathToAnchors, W as placeEulerSegment, X as pxExtent, Y as pxExtentInFrame, Z as rotate, _ as rotateAboutPoint, $ as scale, a0 as scaleDelta, a1 as screenAngleOf, a2 as segmentAt, a3 as segmentEnds, a4 as solveSpiro, a5 as standoff, a6 as transformCoords, a7 as translate, a8 as translateAnchorBy, a9 as withinPxBox, aa as withinPxRadius } from './curvature-
|
|
1
|
+
import { A as Affine, a as AnchorSet, P as PenAnchor, b as SpiroPoint, S as SpiroKind, c as Scale2 } from './curvature-DKPO4Qeh.js';
|
|
2
|
+
export { d as AnchorRect, e as CombTooth, f as CurvatureCombOptions, C as CurvatureSource, E as EulerFit, g as EulerSegment, h as SPIRO_KINDS, i as SegmentComb, j as SegmentHit, k as SpiroSegment, l as anchorAt, m as anchorCount, n as anchorsInRect, o as anchorsToPath, p as applyToPoint, q as boxToBox, r as combTeeth, s as countPathAnchors, t as cubicCurvatureAt, u as cubicCurvatureSource, v as cubicDerivativeAt, w as curvatureComb, x as deleteAnchorsAt, y as editAnchorSet, z as eulerAngleAt, B as eulerCurvatureAt, D as eulerCurvatureDerivativesAt, F as eulerPointAt, G as fitEulerSegment, H as flatAnchorIndex, I as identity, J as insertAnchorOnSegment, K as invert, L as isAnchorSmooth, M as isSpiroKind, N as isStraightSegment, O as locateAnchor, Q as moveHandleTo, R as multiply, T as nearestSegmentT, U as openSubpathAt, V as pathToAnchors, W as placeEulerSegment, X as pxExtent, Y as pxExtentInFrame, Z as rotate, _ as rotateAboutPoint, $ as scale, a0 as scaleDelta, a1 as screenAngleOf, a2 as segmentAt, a3 as segmentEnds, a4 as solveSpiro, a5 as standoff, a6 as transformCoords, a7 as translate, a8 as translateAnchorBy, a9 as withinPxBox, aa as withinPxRadius } from './curvature-DKPO4Qeh.js';
|
|
3
3
|
import { b as Point, a as Path, c as PathOpenFill, P as PolygonPath, d as PathFillRule, R as RectPath, C as CornerSpec, e as CornerPiece } from './path-t80OoJnM.js';
|
|
4
4
|
export { f as CORNER_FIT_TOLERANCE, g as CORNER_KEYWORDS, h as CornerKeyword, i as CornerShape, j as CornerShapeFrame, k as compactCorners, l as cornerAt, m as cornerCenter, n as cornerKeywordOf, o as cornerShapeK, p as cornerShapePieces, q as cornerShapePoint, r as cornerSpecAt, s as cubicPointAt, t as hasCorners, u as isCornerShape, v as lerpCorners, w as nextCornerShape, x as scaleCorners, y as splitCubicAtT, z as withCorner, A as withoutCorners } from './path-t80OoJnM.js';
|
|
5
5
|
export { P as PORT_REACH } from './portCurve-C5HDWuuV.js';
|
|
@@ -15,6 +15,10 @@ export { P as PORT_REACH } from './portCurve-C5HDWuuV.js';
|
|
|
15
15
|
declare const EPS = 0.000001;
|
|
16
16
|
/** `v` held to `lo`..`hi`. `lo` wins when the bounds cross; `NaN` passes through. */
|
|
17
17
|
declare function clamp(v: number, lo: number, hi: number): number;
|
|
18
|
+
/** `v` held to `0`..`1`; `NaN` passes through. */
|
|
19
|
+
declare function clamp01(v: number): number;
|
|
20
|
+
/** The number `t` of the way from `a` to `b`; `t` outside [0, 1] extrapolates. */
|
|
21
|
+
declare function lerp(a: number, b: number, t: number): number;
|
|
18
22
|
/** 2D cross (wedge) product of vectors (ax,ay) and (bx,by). */
|
|
19
23
|
declare function cross(ax: number, ay: number, bx: number, by: number): number;
|
|
20
24
|
/** 2D dot product. */
|
|
@@ -38,6 +42,30 @@ declare function sign(n: number): -1 | 0 | 1;
|
|
|
38
42
|
*/
|
|
39
43
|
declare function approxEq(a: number, b: number, eps?: number): boolean;
|
|
40
44
|
|
|
45
|
+
/** Angle units and wrapping: one definition of each, so callers agree on where a half turn lands. */
|
|
46
|
+
/** Multiply degrees by this to get radians. */
|
|
47
|
+
declare const DEG_TO_RAD: number;
|
|
48
|
+
/** Multiply radians by this to get degrees. */
|
|
49
|
+
declare const RAD_TO_DEG: number;
|
|
50
|
+
/**
|
|
51
|
+
* Where {@link wrapAngle} puts a half turn, the one angle with two names:
|
|
52
|
+
* `'max'` at `π`, `'min'` at `-π`, and `'sign'` at whichever of the two has
|
|
53
|
+
* the input's sign, so `-3π` stays a turn the negative way.
|
|
54
|
+
*/
|
|
55
|
+
type HalfTurn = 'max' | 'min' | 'sign';
|
|
56
|
+
/**
|
|
57
|
+
* `a` radians as the turn of at most half a circle that reaches it, in
|
|
58
|
+
* `(-π, π]` by default. `half` picks the closed end (see {@link HalfTurn}).
|
|
59
|
+
* `NaN` and infinities give `NaN`.
|
|
60
|
+
*/
|
|
61
|
+
declare function wrapAngle(a: number, half?: HalfTurn): number;
|
|
62
|
+
/**
|
|
63
|
+
* `a` in `[0, period)`: radians by default, `wrapPositive(deg, 360)` for
|
|
64
|
+
* degrees. Never returns `period` itself, however close to zero a negative
|
|
65
|
+
* `a` is. `NaN` and infinities give `NaN`.
|
|
66
|
+
*/
|
|
67
|
+
declare function wrapPositive(a: number, period?: number): number;
|
|
68
|
+
|
|
41
69
|
/**
|
|
42
70
|
* Viewport state. `(view.x, view.y)` is the world point currently rendered at
|
|
43
71
|
* the canvas top-left; `view.scale.x` / `view.scale.y` is pixels per world
|
|
@@ -69,6 +97,38 @@ declare const ZOOM_FLOOR = 1e-9;
|
|
|
69
97
|
* floor.
|
|
70
98
|
*/
|
|
71
99
|
declare function normalizeZoom(zoom: number): number;
|
|
100
|
+
/** The screen pixel `view` draws world point `p` at, from the canvas top-left. */
|
|
101
|
+
declare function viewWorldToScreen(view: View, p: {
|
|
102
|
+
x: number;
|
|
103
|
+
y: number;
|
|
104
|
+
}): {
|
|
105
|
+
x: number;
|
|
106
|
+
y: number;
|
|
107
|
+
};
|
|
108
|
+
/** The world point under screen pixel `p`; the inverse of {@link viewWorldToScreen}. */
|
|
109
|
+
declare function viewScreenToWorld(view: View, p: {
|
|
110
|
+
x: number;
|
|
111
|
+
y: number;
|
|
112
|
+
}): {
|
|
113
|
+
x: number;
|
|
114
|
+
y: number;
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* World rect `r` in screen pixels through `view`. A flipped axis (negative
|
|
118
|
+
* scale) still gives a positive width and height, with `x` / `y` at the
|
|
119
|
+
* rect's top-left on screen.
|
|
120
|
+
*/
|
|
121
|
+
declare function viewRectToScreen(view: View, r: {
|
|
122
|
+
x: number;
|
|
123
|
+
y: number;
|
|
124
|
+
width: number;
|
|
125
|
+
height: number;
|
|
126
|
+
}): {
|
|
127
|
+
x: number;
|
|
128
|
+
y: number;
|
|
129
|
+
width: number;
|
|
130
|
+
height: number;
|
|
131
|
+
};
|
|
72
132
|
|
|
73
133
|
/** Axis-aligned box as [minX, minY, maxX, maxY]. */
|
|
74
134
|
type Box = readonly [number, number, number, number];
|
|
@@ -94,6 +154,23 @@ declare function boxContainsBox(outer: Box, inner: Box): boolean;
|
|
|
94
154
|
* `pointInPolygon` takes, and what a repeated first vertex would leave as a
|
|
95
155
|
* zero-length segment for anything that strokes it. */
|
|
96
156
|
declare function rectToContour(x: number, y: number, w: number, h: number): Float64Array;
|
|
157
|
+
/** Whether `a` and `b` meet, edges inclusive: boxes touching along an edge or
|
|
158
|
+
* at a corner answer true. */
|
|
159
|
+
declare function boxesIntersect(a: Box, b: Box): boolean;
|
|
160
|
+
/** Whether `a` and `b` share interior: rects that only touch along an edge or
|
|
161
|
+
* at a corner answer false. */
|
|
162
|
+
declare function rectsOverlap(a: Readonly<Rect>, b: Readonly<Rect>): boolean;
|
|
163
|
+
/** Whether `a` and `b` meet, edges inclusive: rects touching along an edge or
|
|
164
|
+
* at a corner answer true. {@link rectsOverlap} is the interior-only test. */
|
|
165
|
+
declare function rectsIntersect(a: Readonly<Rect>, b: Readonly<Rect>): boolean;
|
|
166
|
+
/** Inclusive point-in-rect test: a point on any edge is inside. */
|
|
167
|
+
declare function rectContainsPoint(r: Readonly<Rect>, x: number, y: number): boolean;
|
|
168
|
+
/** Half-open point-in-rect test: the left and top edges are inside, the right
|
|
169
|
+
* and bottom ones outside, so rects that tile a plane never both claim a point. */
|
|
170
|
+
declare function rectContainsPointHalfOpen(r: Readonly<Rect>, x: number, y: number): boolean;
|
|
171
|
+
/** Smallest rect containing every one of `rects`, or null for none. A `NaN`
|
|
172
|
+
* coordinate makes the matching edge of the result `NaN`. */
|
|
173
|
+
declare function unionRects(rects: Iterable<Readonly<Rect>>): Rect | null;
|
|
97
174
|
|
|
98
175
|
/**
|
|
99
176
|
* SVG-style command-stream encoding — the kit's single declaration of the path
|
|
@@ -527,6 +604,7 @@ declare function portCurvePoints(ax: number, ay: number, bx: number, by: number,
|
|
|
527
604
|
* rendering at 1× zoom; consumers that zoom in heavily should pass a
|
|
528
605
|
* tighter tolerance.
|
|
529
606
|
*/
|
|
607
|
+
/** The tolerance, in world units, the flatteners use when none is given. */
|
|
530
608
|
declare const DEFAULT_FLATTEN_TOLERANCE = 0.5;
|
|
531
609
|
/**
|
|
532
610
|
* Recursively subdivide a cubic bezier (P0..P3) and append `lineTo`-style
|
|
@@ -558,6 +636,13 @@ declare function flattenQuadraticWithArcLen(x0: number, y0: number, x1: number,
|
|
|
558
636
|
* inside a buffer holding several.
|
|
559
637
|
*/
|
|
560
638
|
declare function pointInPolygon(coords: ArrayLike<number>, px: number, py: number, start?: number, end?: number): boolean;
|
|
639
|
+
/**
|
|
640
|
+
* Signed shoelace area of an interleaved, unclosed ring, its closing edge
|
|
641
|
+
* implicit as in {@link pointInPolygon}: positive when the ring runs
|
|
642
|
+
* counterclockwise with y up, so clockwise on a y-down screen. `start`/`end`
|
|
643
|
+
* are vertex indices bounding one ring in a buffer holding several.
|
|
644
|
+
*/
|
|
645
|
+
declare function ringSignedArea(coords: ArrayLike<number>, start?: number, end?: number): number;
|
|
561
646
|
/**
|
|
562
647
|
* True if segments (ax,ay)-(bx,by) and (cx,cy)-(dx,dy) intersect at a single
|
|
563
648
|
* point. An endpoint landing on the other segment counts (a T-junction and a
|
|
@@ -566,8 +651,28 @@ declare function pointInPolygon(coords: ArrayLike<number>, px: number, py: numbe
|
|
|
566
651
|
* point, so the sign test both segments rely on is zero on all four sides.
|
|
567
652
|
*/
|
|
568
653
|
declare function segmentsCross(ax: number, ay: number, bx: number, by: number, cx: number, cy: number, dx: number, dy: number): boolean;
|
|
654
|
+
|
|
655
|
+
/**
|
|
656
|
+
* The rules of `./points` in the 2D kernel's currency. The segment functions
|
|
657
|
+
* take loose scalars and allocate nothing, since hit tests call them per
|
|
658
|
+
* pointermove and per vertex; the point functions take `Point`. Each goes
|
|
659
|
+
* through the same scalar steps as its `./nd` counterpart, so the two agree
|
|
660
|
+
* to the bit.
|
|
661
|
+
*/
|
|
662
|
+
|
|
663
|
+
/** Squared distance between two points. */
|
|
664
|
+
declare function distance2(a: Point, b: Point): number;
|
|
665
|
+
/** Euclidean distance between two points. */
|
|
666
|
+
declare function distance(a: Point, b: Point): number;
|
|
667
|
+
/** The point `t` of the way from `a` to `b`; `t` outside [0, 1] extrapolates. */
|
|
668
|
+
declare function lerpPoint(a: Point, b: Point, t: number): Point;
|
|
669
|
+
/** The parameter, 0 to 1, of the point of segment (ax,ay)-(bx,by) nearest
|
|
670
|
+
* (px,py). A zero-length segment answers 0. */
|
|
671
|
+
declare function segmentT(px: number, py: number, ax: number, ay: number, bx: number, by: number): number;
|
|
569
672
|
/** Squared distance from (px,py) to segment (ax,ay)-(bx,by), endpoint-clamped. */
|
|
570
673
|
declare function pointSegmentDist2(px: number, py: number, ax: number, ay: number, bx: number, by: number): number;
|
|
674
|
+
/** Distance from (px,py) to segment (ax,ay)-(bx,by), endpoint-clamped. */
|
|
675
|
+
declare function pointSegmentDist(px: number, py: number, ax: number, ay: number, bx: number, by: number): number;
|
|
571
676
|
|
|
572
677
|
/** Set whether a fill closes an open subpath, for every path that names no
|
|
573
678
|
* `openFill` of its own. Starts at `'close'`. */
|
|
@@ -3275,4 +3380,4 @@ declare function reviveTypedArrays(value: unknown): unknown;
|
|
|
3275
3380
|
/** `tagTypedArrays` as a `JSON.stringify` replacer. */
|
|
3276
3381
|
declare function typedArrayReplacer(_key: string, value: unknown): unknown;
|
|
3277
3382
|
|
|
3278
|
-
export { ANCHOR_FIELDS, Affine, type AnchorField, type AnchorFieldValues, type AnchorPair, type AnchorPathMeasure, AnchorSet, type AnchorSubpathMeasure, type AnchorSymmetry, type ArcTrackShape, type ArcTrackSpec, type AverageAxis, type BendAlongPathOptions, type BendGrip, type BezierEasing, type BlendPathsOptions, type Box, CONSTRAINT_TOLERANCE, CORNER_RESTORE_TOLERANCE, type ConflictingConstraintsOptions, type ConstrainPathEditOptions, type ConstrainedPathEdit, type ConstrainedPathsEdit, type ConstraintPoint, type CornerCut, type CornerFrame, CornerPiece, CornerSpec, type CornerTrace, type CubicContour, type CubicCoords, type CubicSegment, type CurveNearest, DEFAULT_FLATTEN_TOLERANCE, type DirectionMark, EASINGS, EPS, type EaseOptions, type EasingFn, type EasingName, type EasingSpec, type EllipseTrackShape, type EllipseTrackSpec, type ExtendToMeetOptions, type ExtensionPiece, type ExtremaAxes, type FramedBox, type GlMat3, type GrowRegionOptions, type HandleBalance, type HandleRef, type JoinOptions, type LengthenMode, type LineCoords, type MeasureAnchorPathOptions, type MeasurePathOptions, type MergeRegionOptions, type NumberEntry, type NumberTypedArray, ORIGIN_THRESHOLD, type OpenPathEnd, PATH_C, PATH_CMD_LENGTHS, PATH_COMMANDS, PATH_L, PATH_M, PATH_Q, PATH_SNAP_KINDS, PATH_Z, Path, type PathAnchorHit, type PathAwayFromAnchors, type PathBlend, PathBuilder, type PathCommandCode, type PathCommandName, type PathConstraint, type PathConstraintKind, type PathCrossing, type PathEndFrame, PathFillRule, type PathInWorldPose, type PathLink, type PathMeasure, type PathNearest, type PathNearestStation, PathOpenFill, type PathSegment, type PathSnapHit, type PathSnapIndex, type PathSnapKind, type PathSnapQuery, type PathSnapTarget, type PathStation, type PathStop, type PathTrackShape, type PathsEditItem, PenAnchor, type PlaceAlongRunOptions, type PlaceRectOptions, type PlacedRect, type Placement, type PlacementAlign, type PlacementSide, Point, type PointAlongPathOptions, type PointInPathOptions, type PointOrigin, type PolygonIntersectsPathOptions, PolygonPath, type PoseLinear, type PoseRotation, type PuckerBloatPathOptions, type QuadraticCoords, type Rect, RectPath, type RepeatAlongPathOptions, type RepeatStation, type ResamplePathOptions, type ResolvedCorners, type RoughenPathOptions, type RunAlign, type RunOrder, type RunPast, type RunPlace, type RunSpot, SPRING_PRESETS, Scale2, type SegmentCrossing, type SegmentMeasure, type SegmentRef, type SegmentType, type SimplifyPathOptions, type SmudgePathOptions, type SoftFalloff, type SolveConstraintsOptions, type SolveConstraintsResult, type SolvePathConstraintsResult, type SpiroContour, SpiroKind, type SpiroPath, SpiroPoint, type SpiroToPathOptions, type SpringPreset, type SpringPresetName, type StaticPathSnapKind, type StrokeHitTestOptions, type SubpathEnd, TYPED_ARRAY_CONSTRUCTORS, type TaggedTypedArray, type TrackAtOptions, type TrackNearest, type TrackNearestOptions, type TrackPlace, type TrackRun, type TrackRunOptions, type TrackShape, type TrackShapeKind, type TrackSide, type TrackStation, type TransformPathOptions, type TrimPathOptions, type TrimResult, type TypedArrayTag, type UnsatisfiedConstraintsOptions, type View, ZOOM_FLOOR, type ZigzagPathOptions, addExtremaAnchors, addOrigin, anchorOriginsOf, anchorSymmetries, anchorSymmetry, anchorsBefore, anchorsUnderBrush, anchorsWhere, approxEq, arcShape, asPolygonPath, averageAnchorsAt, balanceFactorToward, bendAlongPath, bendSegment, bendSide, blendPaths, boundsOfCoords, boundsOfPath, boxContainsBox, boxContainsPoint, boxFrameOf, circlePath, clamp, clampRectWithin, closestOpenEnds, composePath, conflictingConstraints, constrainPathEdit, constrainPathsEdit, constraintAnchors, constraintApplies, constraintFits, convertSegments, coordsFrom, cornerAnchors, cornerCuts, cornerFrameAt, cornerFrames, cornerTraces, createPathSnapIndex, cross, cubicAxisExtremaTs, cubicBezierEasing, cubicBounds, cubicContoursToPath, cubicEvalAt, decomposePath, defaultOpenFill, directionMarks, dot, easeIn, easeInBack, easeInBounce, easeInCirc, easeInCubic, easeInElastic, easeInExpo, easeInOut, easeInOutBack, easeInOutBounce, easeInOutCirc, easeInOutCubic, easeInOutElastic, easeInOutExpo, easeInOutQuad, easeInOutQuart, easeInOutQuint, easeInOutSine, easeInQuad, easeInQuart, easeInQuint, easeInSine, easeLength, easeOut, easeOutBack, easeOutBounce, easeOutCirc, easeOutCubic, easeOutElastic, easeOutExpo, easeOutQuad, easeOutQuart, easeOutQuint, easeOutSine, editAnchorSetTracked, elevateQuadraticToCubic, ellipsePath, ellipseShape, equalizeSegmentHandles, everyNthAnchor, extendToMeet, extensionPieces, fillsOpenSubpaths, findPathSnap, findPathSnaps, fitAffine, fitCubicThroughDeletion, fitCubicWithTangents, flatIndexesAfterReverse, flattenCubic, flattenCubicWithArcLen, flattenQuadratic, flattenQuadraticWithArcLen, forEachSegment, growAnchorSelection, growRegion, handleAlongItsAngle, handleAtItsLength, handleBalances, harmonizeAnchors, hasOpenSubpath, intersectSegments, invertAnchorSelection, isSegmentStraight, joinAnchorsAt, joinPaths, joinSubpathEnds, keepCorners, len2, lengthToward, lengthenOpenEnd, lengthenPathEnd, linePath, lineShape, linear, makeHandlesSymmetric, mapConstraintAnchors, mat3, meanScale, measureAnchorPath, measurePath, mergeRegion, moveHandleSymmetric, nearestOnCubic, nearestOnLine, nearestOnPath, nearestOnQuadratic, nearestPathAnchor, normalizeZoom, offsetCornerTraces, openEndAt, openEndRay, openPathEnds, originFor, originOf, pathAnchorPoints, pathAwayFromAnchors, pathCommandCoordCount, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathCrossings, pathDistanceToPoint, pathEndAnchorIndex, pathEndFrame, pathFromD, pathInPoseFrame, pathInWorld, pathIntersectsPolygon, pathIntersectsRect, pathPoint, pathSegments, pathShape, pathSignedArea, pathThroughPoseFrame, pathToCubicContours, pathToD, placeAlongRun, placeRect, pointAlongPath, pointInPath, pointInPolygon, pointSegmentDist2, polygonContainsPath, polygonFromPoints, polygonIntersectsPath, polylineFromPoints, portControls, portCurvePoints, poseFrameInverseOf, poseFrameOf, poseLinearOf, poseRotationOf, prepareBlend, puckerBloatPath, quadraticEvalAt, readAnchorFields, rectMarkerPath, rectPath, rectToContour, regularPolygonPath, remapAnchorValues, remapConstraints, remapPerAnchor, remapPointValues, repeatAlongPath, resamplePath, resolveCorners, resolveCornersWithSources, resolveEasing, restoreCorners, retractHandles, reverseAnchors, reversePath, reverseSubpaths, reviveTypedArrays, rotatePathAround, roughenPath, roundRectPath, runLength, runPlaces, runStationAt, scalePathToBounds, scaleSegmentHandles, schneiderFit, segmentBetween, segmentExtremaTs, segmentsBetweenAnchors, segmentsCross, setDefaultOpenFill, setSubpathStart, shiftTrack, shrinkAnchorSelection, sign, simplifyAnchorsAt, simplifyPath, simplifySpan, simplifySubpath, smoothAnchors, smudgePath, softFalloff, softSelectionBand, softSelectionWeights, solveConstraints, solvePathConstraints, spiroContoursFromControl, spiroContoursOf, spiroControlPath, spiroToPath, splitByClosure, splitCubicAt, splitLineAt, splitQuadraticAt, splitSubpaths, squarePath, starPath, stationsAlongPath, strokeHitTest, sub, subpathEndAt, subpathsOfAnchors, tagTypedArray, tagTypedArrays, trackRun, trackShapeD, trackSlice, transformPath, translateAnchorsSymmetric, translatePath, trimPathAt, typedArrayReplacer, unionBoundsPath, unionBox, unsatisfiedConstraints, untagTypedArray, viewToMat3, withAnchorPoints, worldCoords, worldEditToStorage, writeAnchorField, zigzagPath };
|
|
3383
|
+
export { ANCHOR_FIELDS, Affine, type AnchorField, type AnchorFieldValues, type AnchorPair, type AnchorPathMeasure, AnchorSet, type AnchorSubpathMeasure, type AnchorSymmetry, type ArcTrackShape, type ArcTrackSpec, type AverageAxis, type BendAlongPathOptions, type BendGrip, type BezierEasing, type BlendPathsOptions, type Box, CONSTRAINT_TOLERANCE, CORNER_RESTORE_TOLERANCE, type ConflictingConstraintsOptions, type ConstrainPathEditOptions, type ConstrainedPathEdit, type ConstrainedPathsEdit, type ConstraintPoint, type CornerCut, type CornerFrame, CornerPiece, CornerSpec, type CornerTrace, type CubicContour, type CubicCoords, type CubicSegment, type CurveNearest, DEFAULT_FLATTEN_TOLERANCE, DEG_TO_RAD, type DirectionMark, EASINGS, EPS, type EaseOptions, type EasingFn, type EasingName, type EasingSpec, type EllipseTrackShape, type EllipseTrackSpec, type ExtendToMeetOptions, type ExtensionPiece, type ExtremaAxes, type FramedBox, type GlMat3, type GrowRegionOptions, type HalfTurn, type HandleBalance, type HandleRef, type JoinOptions, type LengthenMode, type LineCoords, type MeasureAnchorPathOptions, type MeasurePathOptions, type MergeRegionOptions, type NumberEntry, type NumberTypedArray, ORIGIN_THRESHOLD, type OpenPathEnd, PATH_C, PATH_CMD_LENGTHS, PATH_COMMANDS, PATH_L, PATH_M, PATH_Q, PATH_SNAP_KINDS, PATH_Z, Path, type PathAnchorHit, type PathAwayFromAnchors, type PathBlend, PathBuilder, type PathCommandCode, type PathCommandName, type PathConstraint, type PathConstraintKind, type PathCrossing, type PathEndFrame, PathFillRule, type PathInWorldPose, type PathLink, type PathMeasure, type PathNearest, type PathNearestStation, PathOpenFill, type PathSegment, type PathSnapHit, type PathSnapIndex, type PathSnapKind, type PathSnapQuery, type PathSnapTarget, type PathStation, type PathStop, type PathTrackShape, type PathsEditItem, PenAnchor, type PlaceAlongRunOptions, type PlaceRectOptions, type PlacedRect, type Placement, type PlacementAlign, type PlacementSide, Point, type PointAlongPathOptions, type PointInPathOptions, type PointOrigin, type PolygonIntersectsPathOptions, PolygonPath, type PoseLinear, type PoseRotation, type PuckerBloatPathOptions, type QuadraticCoords, RAD_TO_DEG, type Rect, RectPath, type RepeatAlongPathOptions, type RepeatStation, type ResamplePathOptions, type ResolvedCorners, type RoughenPathOptions, type RunAlign, type RunOrder, type RunPast, type RunPlace, type RunSpot, SPRING_PRESETS, Scale2, type SegmentCrossing, type SegmentMeasure, type SegmentRef, type SegmentType, type SimplifyPathOptions, type SmudgePathOptions, type SoftFalloff, type SolveConstraintsOptions, type SolveConstraintsResult, type SolvePathConstraintsResult, type SpiroContour, SpiroKind, type SpiroPath, SpiroPoint, type SpiroToPathOptions, type SpringPreset, type SpringPresetName, type StaticPathSnapKind, type StrokeHitTestOptions, type SubpathEnd, TYPED_ARRAY_CONSTRUCTORS, type TaggedTypedArray, type TrackAtOptions, type TrackNearest, type TrackNearestOptions, type TrackPlace, type TrackRun, type TrackRunOptions, type TrackShape, type TrackShapeKind, type TrackSide, type TrackStation, type TransformPathOptions, type TrimPathOptions, type TrimResult, type TypedArrayTag, type UnsatisfiedConstraintsOptions, type View, ZOOM_FLOOR, type ZigzagPathOptions, addExtremaAnchors, addOrigin, anchorOriginsOf, anchorSymmetries, anchorSymmetry, anchorsBefore, anchorsUnderBrush, anchorsWhere, approxEq, arcShape, asPolygonPath, averageAnchorsAt, balanceFactorToward, bendAlongPath, bendSegment, bendSide, blendPaths, boundsOfCoords, boundsOfPath, boxContainsBox, boxContainsPoint, boxFrameOf, boxesIntersect, circlePath, clamp, clamp01, clampRectWithin, closestOpenEnds, composePath, conflictingConstraints, constrainPathEdit, constrainPathsEdit, constraintAnchors, constraintApplies, constraintFits, convertSegments, coordsFrom, cornerAnchors, cornerCuts, cornerFrameAt, cornerFrames, cornerTraces, createPathSnapIndex, cross, cubicAxisExtremaTs, cubicBezierEasing, cubicBounds, cubicContoursToPath, cubicEvalAt, decomposePath, defaultOpenFill, directionMarks, distance, distance2, dot, easeIn, easeInBack, easeInBounce, easeInCirc, easeInCubic, easeInElastic, easeInExpo, easeInOut, easeInOutBack, easeInOutBounce, easeInOutCirc, easeInOutCubic, easeInOutElastic, easeInOutExpo, easeInOutQuad, easeInOutQuart, easeInOutQuint, easeInOutSine, easeInQuad, easeInQuart, easeInQuint, easeInSine, easeLength, easeOut, easeOutBack, easeOutBounce, easeOutCirc, easeOutCubic, easeOutElastic, easeOutExpo, easeOutQuad, easeOutQuart, easeOutQuint, easeOutSine, editAnchorSetTracked, elevateQuadraticToCubic, ellipsePath, ellipseShape, equalizeSegmentHandles, everyNthAnchor, extendToMeet, extensionPieces, fillsOpenSubpaths, findPathSnap, findPathSnaps, fitAffine, fitCubicThroughDeletion, fitCubicWithTangents, flatIndexesAfterReverse, flattenCubic, flattenCubicWithArcLen, flattenQuadratic, flattenQuadraticWithArcLen, forEachSegment, growAnchorSelection, growRegion, handleAlongItsAngle, handleAtItsLength, handleBalances, harmonizeAnchors, hasOpenSubpath, intersectSegments, invertAnchorSelection, isSegmentStraight, joinAnchorsAt, joinPaths, joinSubpathEnds, keepCorners, len2, lengthToward, lengthenOpenEnd, lengthenPathEnd, lerp, lerpPoint, linePath, lineShape, linear, makeHandlesSymmetric, mapConstraintAnchors, mat3, meanScale, measureAnchorPath, measurePath, mergeRegion, moveHandleSymmetric, nearestOnCubic, nearestOnLine, nearestOnPath, nearestOnQuadratic, nearestPathAnchor, normalizeZoom, offsetCornerTraces, openEndAt, openEndRay, openPathEnds, originFor, originOf, pathAnchorPoints, pathAwayFromAnchors, pathCommandCoordCount, pathContainsPoint, pathContainsPolygon, pathContainsRect, pathCrossings, pathDistanceToPoint, pathEndAnchorIndex, pathEndFrame, pathFromD, pathInPoseFrame, pathInWorld, pathIntersectsPolygon, pathIntersectsRect, pathPoint, pathSegments, pathShape, pathSignedArea, pathThroughPoseFrame, pathToCubicContours, pathToD, placeAlongRun, placeRect, pointAlongPath, pointInPath, pointInPolygon, pointSegmentDist, pointSegmentDist2, polygonContainsPath, polygonFromPoints, polygonIntersectsPath, polylineFromPoints, portControls, portCurvePoints, poseFrameInverseOf, poseFrameOf, poseLinearOf, poseRotationOf, prepareBlend, puckerBloatPath, quadraticEvalAt, readAnchorFields, rectContainsPoint, rectContainsPointHalfOpen, rectMarkerPath, rectPath, rectToContour, rectsIntersect, rectsOverlap, regularPolygonPath, remapAnchorValues, remapConstraints, remapPerAnchor, remapPointValues, repeatAlongPath, resamplePath, resolveCorners, resolveCornersWithSources, resolveEasing, restoreCorners, retractHandles, reverseAnchors, reversePath, reverseSubpaths, reviveTypedArrays, ringSignedArea, rotatePathAround, roughenPath, roundRectPath, runLength, runPlaces, runStationAt, scalePathToBounds, scaleSegmentHandles, schneiderFit, segmentBetween, segmentExtremaTs, segmentT, segmentsBetweenAnchors, segmentsCross, setDefaultOpenFill, setSubpathStart, shiftTrack, shrinkAnchorSelection, sign, simplifyAnchorsAt, simplifyPath, simplifySpan, simplifySubpath, smoothAnchors, smudgePath, softFalloff, softSelectionBand, softSelectionWeights, solveConstraints, solvePathConstraints, spiroContoursFromControl, spiroContoursOf, spiroControlPath, spiroToPath, splitByClosure, splitCubicAt, splitLineAt, splitQuadraticAt, splitSubpaths, squarePath, starPath, stationsAlongPath, strokeHitTest, sub, subpathEndAt, subpathsOfAnchors, tagTypedArray, tagTypedArrays, trackRun, trackShapeD, trackSlice, transformPath, translateAnchorsSymmetric, translatePath, trimPathAt, typedArrayReplacer, unionBoundsPath, unionBox, unionRects, unsatisfiedConstraints, untagTypedArray, viewRectToScreen, viewScreenToWorld, viewToMat3, viewWorldToScreen, withAnchorPoints, worldCoords, worldEditToStorage, wrapAngle, wrapPositive, writeAnchorField, zigzagPath };
|