flo-mat 2.0.2 → 2.0.3
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/browser/index.js +8230 -8229
- package/browser/index.min.js +1 -1
- package/node/circle.d.ts +20 -20
- package/node/circle.js +31 -31
- package/node/compare-curvatures-at-interface.d.ts +19 -19
- package/node/compare-curvatures-at-interface.js +124 -124
- package/node/contact-point.d.ts +26 -26
- package/node/contact-point.js +25 -25
- package/node/cp-node/clone.d.ts +8 -8
- package/node/cp-node/clone.js +31 -31
- package/node/cp-node/remove.d.ts +9 -9
- package/node/cp-node/remove.js +19 -19
- package/node/cp-node.d.ts +202 -202
- package/node/cp-node.js +320 -320
- package/node/curve.d.ts +46 -46
- package/node/curve.js +88 -88
- package/node/debug/cp-node-for-debugging.d.ts +11 -11
- package/node/debug/cp-node-for-debugging.js +1 -1
- package/node/debug/debug-elem-types.d.ts +32 -32
- package/node/debug/debug-elem-types.js +1 -1
- package/node/debug/debug.d.ts +50 -50
- package/node/debug/debug.js +75 -75
- package/node/debug/functions/draw-elem/bounding-hull.d.ts +3 -3
- package/node/debug/functions/draw-elem/bounding-hull.js +7 -7
- package/node/debug/functions/draw-elem/branch.d.ts +4 -4
- package/node/debug/functions/draw-elem/branch.js +22 -22
- package/node/debug/functions/draw-elem/culls.d.ts +4 -4
- package/node/debug/functions/draw-elem/culls.js +21 -21
- package/node/debug/functions/draw-elem/draw-circle-percent.d.ts +3 -3
- package/node/debug/functions/draw-elem/draw-circle-percent.js +12 -12
- package/node/debug/functions/draw-elem/draw-elem.d.ts +8 -8
- package/node/debug/functions/draw-elem/draw-elem.js +45 -45
- package/node/debug/functions/draw-elem/dull-corner.d.ts +4 -4
- package/node/debug/functions/draw-elem/dull-corner.js +10 -10
- package/node/debug/functions/draw-elem/leaves.d.ts +4 -4
- package/node/debug/functions/draw-elem/leaves.js +12 -12
- package/node/debug/functions/draw-elem/loop.d.ts +4 -4
- package/node/debug/functions/draw-elem/loop.js +11 -11
- package/node/debug/functions/draw-elem/loops.d.ts +4 -4
- package/node/debug/functions/draw-elem/loops.js +6 -6
- package/node/debug/functions/draw-elem/loose-bounding-box.d.ts +3 -3
- package/node/debug/functions/draw-elem/loose-bounding-box.js +9 -9
- package/node/debug/functions/draw-elem/mat.d.ts +4 -4
- package/node/debug/functions/draw-elem/mat.js +30 -30
- package/node/debug/functions/draw-elem/max-vertex.d.ts +4 -4
- package/node/debug/functions/draw-elem/max-vertex.js +8 -8
- package/node/debug/functions/draw-elem/min-y.d.ts +4 -4
- package/node/debug/functions/draw-elem/min-y.js +13 -13
- package/node/debug/functions/draw-elem/one-prong-at-dull-corner.d.ts +4 -4
- package/node/debug/functions/draw-elem/one-prong-at-dull-corner.js +12 -12
- package/node/debug/functions/draw-elem/one-prong.d.ts +4 -4
- package/node/debug/functions/draw-elem/one-prong.js +16 -16
- package/node/debug/functions/draw-elem/sharp-corner.d.ts +4 -4
- package/node/debug/functions/draw-elem/sharp-corner.js +9 -9
- package/node/debug/functions/draw-elem/three-prong.d.ts +4 -4
- package/node/debug/functions/draw-elem/three-prong.js +16 -16
- package/node/debug/functions/draw-elem/tight-bounding-box.d.ts +3 -3
- package/node/debug/functions/draw-elem/tight-bounding-box.js +7 -7
- package/node/debug/functions/draw-elem/two-prong.d.ts +4 -4
- package/node/debug/functions/draw-elem/two-prong.js +36 -36
- package/node/debug/functions/draw-elem/vertex.d.ts +4 -4
- package/node/debug/functions/draw-elem/vertex.js +27 -27
- package/node/debug/functions/general.d.ts +48 -48
- package/node/debug/functions/general.js +52 -52
- package/node/debug/functions/three-prong.d.ts +11 -11
- package/node/debug/functions/three-prong.js +184 -184
- package/node/debug/functions/two-prong.d.ts +13 -13
- package/node/debug/functions/two-prong.js +117 -117
- package/node/debug/three-prong-for-debugging.d.ts +31 -31
- package/node/debug/three-prong-for-debugging.js +20 -20
- package/node/debug/two-prong-for-debugging.d.ts +26 -26
- package/node/debug/two-prong-for-debugging.js +1 -1
- package/node/find-mats.d.ts +26 -26
- package/node/find-mats.js +122 -122
- package/node/get-boundary-bezier-parts-to-next.d.ts +9 -9
- package/node/get-boundary-bezier-parts-to-next.js +42 -42
- package/node/get-boundary-beziers-to-next.d.ts +8 -8
- package/node/get-boundary-beziers-to-next.js +44 -44
- package/node/get-bounding-box-.d.ts +2 -2
- package/node/get-bounding-box-.js +4 -4
- package/node/get-branches.d.ts +12 -12
- package/node/get-branches.js +68 -68
- package/node/get-curve/get-curve-between.d.ts +9 -9
- package/node/get-curve/get-curve-between.js +56 -56
- package/node/get-curve/get-edge-direction.d.ts +9 -9
- package/node/get-curve/get-edge-direction.js +53 -53
- package/node/get-curve-to-next.d.ts +9 -9
- package/node/get-curve-to-next.js +11 -11
- package/node/get-interface-ccw.d.ts +24 -24
- package/node/get-interface-ccw.js +97 -97
- package/node/index.d.ts +36 -36
- package/node/index.js +32 -32
- package/node/loop/get-max-coordinate.d.ts +10 -10
- package/node/loop/get-max-coordinate.js +43 -43
- package/node/loop.d.ts +16 -16
- package/node/loop.js +34 -34
- package/node/mat/add-to-cp-graph.d.ts +16 -16
- package/node/mat/add-to-cp-graph.js +30 -30
- package/node/mat/bezier-piece.d.ts +12 -12
- package/node/mat/bezier-piece.js +1 -1
- package/node/mat/closest-boundary-point/closest-points-on-curve.d.ts +14 -14
- package/node/mat/closest-boundary-point/closest-points-on-curve.js +72 -72
- package/node/mat/closest-boundary-point/cull-bezier-pieces.d.ts +9 -9
- package/node/mat/closest-boundary-point/cull-bezier-pieces.js +19 -19
- package/node/mat/closest-boundary-point/cull-by-loose-bounding-box.d.ts +11 -11
- package/node/mat/closest-boundary-point/cull-by-loose-bounding-box.js +24 -24
- package/node/mat/closest-boundary-point/cull-by-tight-boundary-box.d.ts +11 -11
- package/node/mat/closest-boundary-point/cull-by-tight-boundary-box.js +26 -26
- package/node/mat/closest-boundary-point/get-best-distance-squared.d.ts +8 -8
- package/node/mat/closest-boundary-point/get-best-distance-squared.js +24 -24
- package/node/mat/closest-boundary-point/get-close-boundary-points.d.ts +17 -17
- package/node/mat/closest-boundary-point/get-close-boundary-points.js +80 -80
- package/node/mat/closest-boundary-point/get-closest-boundary-point.d.ts +18 -18
- package/node/mat/closest-boundary-point/get-closest-boundary-point.js +40 -40
- package/node/mat/corner.d.ts +37 -37
- package/node/mat/corner.js +1 -1
- package/node/mat/create-new-cp-tree.d.ts +9 -9
- package/node/mat/create-new-cp-tree.js +23 -23
- package/node/mat/elem-type-two-prong.d.ts +3 -3
- package/node/mat/elem-type-two-prong.js +1 -1
- package/node/mat/find-mat/add-1-prong.d.ts +12 -12
- package/node/mat/find-mat/add-1-prong.js +42 -42
- package/node/mat/find-mat/add-2-prong.d.ts +21 -21
- package/node/mat/find-mat/add-2-prong.js +192 -192
- package/node/mat/find-mat/add-3-prong.d.ts +19 -19
- package/node/mat/find-mat/add-3-prong.js +54 -54
- package/node/mat/find-mat/add-debug-info.d.ts +9 -9
- package/node/mat/find-mat/add-debug-info.js +67 -67
- package/node/mat/find-mat/create-get-interesting-points-on-loop.d.ts +11 -11
- package/node/mat/find-mat/create-get-interesting-points-on-loop.js +51 -51
- package/node/mat/find-mat/create-initial-cp-graph.d.ts +12 -12
- package/node/mat/find-mat/create-initial-cp-graph.js +40 -40
- package/node/mat/find-mat/find-2-prong/add-debug-info.d.ts +8 -8
- package/node/mat/find-mat/find-2-prong/add-debug-info.js +21 -21
- package/node/mat/find-mat/find-2-prong/cull-bezier-pieces.d.ts +11 -11
- package/node/mat/find-mat/find-2-prong/cull-bezier-pieces.js +29 -29
- package/node/mat/find-mat/find-2-prong/find-2-prong.d.ts +37 -37
- package/node/mat/find-mat/find-2-prong/find-2-prong.js +232 -232
- package/node/mat/find-mat/find-2-prong/find-equidistant-point-on-line.d.ts +9 -9
- package/node/mat/find-mat/find-2-prong/find-equidistant-point-on-line.js +39 -39
- package/node/mat/find-mat/find-2-prong/get-initial-bezier-pieces.d.ts +11 -11
- package/node/mat/find-mat/find-2-prong/get-initial-bezier-pieces.js +37 -37
- package/node/mat/find-mat/find-2-prong/x-for-debugging.d.ts +9 -9
- package/node/mat/find-mat/find-2-prong/x-for-debugging.js +1 -1
- package/node/mat/find-mat/find-3-prong/calc-better-x.d.ts +19 -19
- package/node/mat/find-mat/find-3-prong/calc-better-x.js +36 -36
- package/node/mat/find-mat/find-3-prong/calc-initial-3-prong-center.d.ts +13 -13
- package/node/mat/find-mat/find-3-prong/calc-initial-3-prong-center.js +25 -25
- package/node/mat/find-mat/find-3-prong/find-3-prong-for-delta3s.d.ts +22 -22
- package/node/mat/find-mat/find-3-prong/find-3-prong-for-delta3s.js +159 -159
- package/node/mat/find-mat/find-3-prong/find-3-prong.d.ts +16 -16
- package/node/mat/find-mat/find-3-prong/find-3-prong.js +76 -76
- package/node/mat/find-mat/find-3-prong/get-closest-points.d.ts +9 -9
- package/node/mat/find-mat/find-3-prong/get-closest-points.js +16 -16
- package/node/mat/find-mat/find-and-add-2-prongs-on-all-paths.d.ts +15 -15
- package/node/mat/find-mat/find-and-add-2-prongs-on-all-paths.js +20 -20
- package/node/mat/find-mat/find-and-add-2-prongs.d.ts +16 -16
- package/node/mat/find-mat/find-and-add-2-prongs.js +73 -73
- package/node/mat/find-mat/find-and-add-3-prongs.d.ts +13 -13
- package/node/mat/find-mat/find-and-add-3-prongs.js +146 -146
- package/node/mat/find-mat/find-and-add-hole-closing-2-prongs.d.ts +14 -14
- package/node/mat/find-mat/find-and-add-hole-closing-2-prongs.js +33 -33
- package/node/mat/find-mat/get-potential-2-prongs.d.ts +4 -4
- package/node/mat/find-mat/get-potential-2-prongs.js +16 -16
- package/node/mat/find-mat/get-sharp-corners.d.ts +4 -4
- package/node/mat/find-mat/get-sharp-corners.js +17 -17
- package/node/mat/geometry/get-closest-square-distance-to-rect.d.ts +5 -5
- package/node/mat/geometry/get-closest-square-distance-to-rect.js +49 -49
- package/node/mat/geometry/get-closest-squared-distance-to-rotated-rect.d.ts +5 -5
- package/node/mat/geometry/get-closest-squared-distance-to-rotated-rect.js +15 -15
- package/node/mat/get-boundary-piece-beziers.d.ts +11 -11
- package/node/mat/get-boundary-piece-beziers.js +58 -58
- package/node/mat/get-contact-circles-at-interface.d.ts +8 -8
- package/node/mat/get-contact-circles-at-interface.js +20 -20
- package/node/mat/get-largest-vertex.d.ts +4 -4
- package/node/mat/get-largest-vertex.js +9 -9
- package/node/mat/get-leaves.d.ts +4 -4
- package/node/mat/get-leaves.js +12 -12
- package/node/mat/get-neighboring-cps.d.ts +14 -14
- package/node/mat/get-neighboring-cps.js +30 -30
- package/node/mat/get-two-prong-type.d.ts +5 -5
- package/node/mat/get-two-prong-type.js +8 -8
- package/node/mat/is-another-cp-closeby.d.ts +20 -20
- package/node/mat/is-another-cp-closeby.js +55 -55
- package/node/mat/simplify-mat-map-only.d.ts +23 -23
- package/node/mat/simplify-mat-map-only.js +80 -80
- package/node/mat/to-scale-axis/add-debug-info.d.ts +7 -7
- package/node/mat/to-scale-axis/add-debug-info.js +13 -13
- package/node/mat/to-scale-axis/cull-non-cycles.d.ts +9 -9
- package/node/mat/to-scale-axis/cull-non-cycles.js +51 -51
- package/node/mat/to-scale-axis/cull.d.ts +12 -12
- package/node/mat/to-scale-axis/cull.js +132 -132
- package/node/mat/trim-mat.d.ts +8 -8
- package/node/mat/trim-mat.js +16 -16
- package/node/mat.d.ts +22 -22
- package/node/mat.js +1 -1
- package/node/point-on-shape.d.ts +73 -73
- package/node/point-on-shape.js +167 -167
- package/node/simplify-mat.d.ts +16 -16
- package/node/simplify-mat.js +71 -71
- package/node/svg/get-loop-bounds.d.ts +12 -12
- package/node/svg/get-loop-bounds.js +80 -80
- package/node/svg/get-min-y-pos.d.ts +8 -8
- package/node/svg/get-min-y-pos.js +9 -9
- package/node/svg/get-shape-bounds.d.ts +9 -9
- package/node/svg/get-shape-bounds.js +35 -35
- package/node/sweep-line/sweep-line.d.ts +18 -18
- package/node/sweep-line/sweep-line.js +72 -72
- package/node/to-scale-axis.d.ts +16 -16
- package/node/to-scale-axis.js +74 -74
- package/node/traverse-edges.d.ts +10 -10
- package/node/traverse-edges.js +21 -21
- package/node/traverse-vertices.d.ts +12 -12
- package/node/traverse-vertices.js +27 -27
- package/package.json +11 -11
- package/tsconfig.json +0 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { drawFs } from 'flo-draw';
|
|
2
|
-
import { getCurveToNext } from '../../../get-curve-to-next.js';
|
|
3
|
-
/** @hidden */
|
|
4
|
-
function drawBranch(g, branch, delay) {
|
|
5
|
-
const classes = 'thin5 purple nofill';
|
|
6
|
-
const $svgs = [];
|
|
7
|
-
let i = 0;
|
|
8
|
-
for (const cpNode of branch) {
|
|
9
|
-
if (cpNode.isTerminating()) {
|
|
10
|
-
continue;
|
|
11
|
-
}
|
|
12
|
-
//let bezier = cpNode.matCurveToNextVertex;
|
|
13
|
-
const bezier = getCurveToNext(cpNode);
|
|
14
|
-
if (!bezier) {
|
|
15
|
-
continue;
|
|
16
|
-
}
|
|
17
|
-
i++;
|
|
18
|
-
$svgs.push(...drawFs.bezier(g, bezier, classes, delay));
|
|
19
|
-
}
|
|
20
|
-
return $svgs;
|
|
21
|
-
}
|
|
22
|
-
export { drawBranch };
|
|
1
|
+
import { drawFs } from 'flo-draw';
|
|
2
|
+
import { getCurveToNext } from '../../../get-curve-to-next.js';
|
|
3
|
+
/** @hidden */
|
|
4
|
+
function drawBranch(g, branch, delay) {
|
|
5
|
+
const classes = 'thin5 purple nofill';
|
|
6
|
+
const $svgs = [];
|
|
7
|
+
let i = 0;
|
|
8
|
+
for (const cpNode of branch) {
|
|
9
|
+
if (cpNode.isTerminating()) {
|
|
10
|
+
continue;
|
|
11
|
+
}
|
|
12
|
+
//let bezier = cpNode.matCurveToNextVertex;
|
|
13
|
+
const bezier = getCurveToNext(cpNode);
|
|
14
|
+
if (!bezier) {
|
|
15
|
+
continue;
|
|
16
|
+
}
|
|
17
|
+
i++;
|
|
18
|
+
$svgs.push(...drawFs.bezier(g, bezier, classes, delay));
|
|
19
|
+
}
|
|
20
|
+
return $svgs;
|
|
21
|
+
}
|
|
22
|
+
export { drawBranch };
|
|
23
23
|
//# sourceMappingURL=branch.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Circle } from '../../../circle.js';
|
|
2
|
-
/** @hidden */
|
|
3
|
-
declare function culls(g: SVGGElement, culls: Circle[]): SVGElement[];
|
|
4
|
-
export { culls };
|
|
1
|
+
import { Circle } from '../../../circle.js';
|
|
2
|
+
/** @hidden */
|
|
3
|
+
declare function culls(g: SVGGElement, culls: Circle[]): SVGElement[];
|
|
4
|
+
export { culls };
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
/** @hidden */
|
|
2
|
-
function culls(g, culls) {
|
|
3
|
-
const $elems = [];
|
|
4
|
-
for (const circle of culls) {
|
|
5
|
-
const p = circle.center;
|
|
6
|
-
$elems.push(drawCircle(g, p, 0.4, 'cyan thin5 nofill'));
|
|
7
|
-
}
|
|
8
|
-
return $elems;
|
|
9
|
-
}
|
|
10
|
-
/** @hidden */
|
|
11
|
-
function drawCircle(g, center, radiusPercent, classes) {
|
|
12
|
-
const XMLNS = 'http://www.w3.org/2000/svg';
|
|
13
|
-
const $circle = document.createElementNS(XMLNS, 'circle');
|
|
14
|
-
$circle.setAttributeNS(null, "cx", center[0].toString());
|
|
15
|
-
$circle.setAttributeNS(null, "cy", center[1].toString());
|
|
16
|
-
$circle.setAttributeNS(null, "r", radiusPercent.toString() + '%');
|
|
17
|
-
$circle.setAttributeNS(null, "class", classes);
|
|
18
|
-
g.appendChild($circle);
|
|
19
|
-
return $circle;
|
|
20
|
-
}
|
|
21
|
-
export { culls };
|
|
1
|
+
/** @hidden */
|
|
2
|
+
function culls(g, culls) {
|
|
3
|
+
const $elems = [];
|
|
4
|
+
for (const circle of culls) {
|
|
5
|
+
const p = circle.center;
|
|
6
|
+
$elems.push(drawCircle(g, p, 0.4, 'cyan thin5 nofill'));
|
|
7
|
+
}
|
|
8
|
+
return $elems;
|
|
9
|
+
}
|
|
10
|
+
/** @hidden */
|
|
11
|
+
function drawCircle(g, center, radiusPercent, classes) {
|
|
12
|
+
const XMLNS = 'http://www.w3.org/2000/svg';
|
|
13
|
+
const $circle = document.createElementNS(XMLNS, 'circle');
|
|
14
|
+
$circle.setAttributeNS(null, "cx", center[0].toString());
|
|
15
|
+
$circle.setAttributeNS(null, "cy", center[1].toString());
|
|
16
|
+
$circle.setAttributeNS(null, "r", radiusPercent.toString() + '%');
|
|
17
|
+
$circle.setAttributeNS(null, "class", classes);
|
|
18
|
+
g.appendChild($circle);
|
|
19
|
+
return $circle;
|
|
20
|
+
}
|
|
21
|
+
export { culls };
|
|
22
22
|
//# sourceMappingURL=culls.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/** @hidden */
|
|
2
|
-
declare function drawCirclePercent(g: SVGGElement, center: number[], radiusPercent: number, classes: string): SVGCircleElement;
|
|
3
|
-
export { drawCirclePercent };
|
|
1
|
+
/** @hidden */
|
|
2
|
+
declare function drawCirclePercent(g: SVGGElement, center: number[], radiusPercent: number, classes: string): SVGCircleElement;
|
|
3
|
+
export { drawCirclePercent };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/** @hidden */
|
|
2
|
-
function drawCirclePercent(g, center, radiusPercent, classes) {
|
|
3
|
-
const XMLNS = 'http://www.w3.org/2000/svg';
|
|
4
|
-
const $circle = document.createElementNS(XMLNS, 'circle');
|
|
5
|
-
$circle.setAttributeNS(null, "cx", center[0].toString());
|
|
6
|
-
$circle.setAttributeNS(null, "cy", center[1].toString());
|
|
7
|
-
$circle.setAttributeNS(null, "r", radiusPercent.toString() + '%');
|
|
8
|
-
$circle.setAttributeNS(null, "class", classes);
|
|
9
|
-
g.appendChild($circle);
|
|
10
|
-
return $circle;
|
|
11
|
-
}
|
|
12
|
-
export { drawCirclePercent };
|
|
1
|
+
/** @hidden */
|
|
2
|
+
function drawCirclePercent(g, center, radiusPercent, classes) {
|
|
3
|
+
const XMLNS = 'http://www.w3.org/2000/svg';
|
|
4
|
+
const $circle = document.createElementNS(XMLNS, 'circle');
|
|
5
|
+
$circle.setAttributeNS(null, "cx", center[0].toString());
|
|
6
|
+
$circle.setAttributeNS(null, "cy", center[1].toString());
|
|
7
|
+
$circle.setAttributeNS(null, "r", radiusPercent.toString() + '%');
|
|
8
|
+
$circle.setAttributeNS(null, "class", classes);
|
|
9
|
+
g.appendChild($circle);
|
|
10
|
+
return $circle;
|
|
11
|
+
}
|
|
12
|
+
export { drawCirclePercent };
|
|
13
13
|
//# sourceMappingURL=draw-circle-percent.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { IDebugElems } from '../../debug-elem-types.js';
|
|
2
|
-
/** @hidden */
|
|
3
|
-
type TDrawElemFunctions = {
|
|
4
|
-
[T in keyof IDebugElems]: (g: SVGGElement, elem: IDebugElems[T], classes?: string, delay?: number) => SVGElement[];
|
|
5
|
-
};
|
|
6
|
-
/** @hidden */
|
|
7
|
-
declare const drawElemFunctions: TDrawElemFunctions;
|
|
8
|
-
export { drawElemFunctions, TDrawElemFunctions };
|
|
1
|
+
import { IDebugElems } from '../../debug-elem-types.js';
|
|
2
|
+
/** @hidden */
|
|
3
|
+
type TDrawElemFunctions = {
|
|
4
|
+
[T in keyof IDebugElems]: (g: SVGGElement, elem: IDebugElems[T], classes?: string, delay?: number) => SVGElement[];
|
|
5
|
+
};
|
|
6
|
+
/** @hidden */
|
|
7
|
+
declare const drawElemFunctions: TDrawElemFunctions;
|
|
8
|
+
export { drawElemFunctions, TDrawElemFunctions };
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { drawOneProng } from './one-prong.js';
|
|
2
|
-
import { twoProng } from './two-prong.js';
|
|
3
|
-
import { threeProng } from './three-prong.js';
|
|
4
|
-
import { vertex } from './vertex.js';
|
|
5
|
-
import { boundingHull } from './bounding-hull.js';
|
|
6
|
-
import { looseBoundingBox } from './loose-bounding-box.js';
|
|
7
|
-
import { tightBoundingBox } from './tight-bounding-box.js';
|
|
8
|
-
import { sharpCorner } from './sharp-corner.js';
|
|
9
|
-
import { dullCorner } from './dull-corner.js';
|
|
10
|
-
import { drawMat } from './mat.js';
|
|
11
|
-
import { maxVertex } from './max-vertex.js';
|
|
12
|
-
import { leaves } from './leaves.js';
|
|
13
|
-
import { culls } from './culls.js';
|
|
14
|
-
import { oneProngAtDullCorner } from './one-prong-at-dull-corner.js';
|
|
15
|
-
/** @hidden */
|
|
16
|
-
function notImplementedYet(g, elem) {
|
|
17
|
-
return []; // TODO - implement relevant drawing function
|
|
18
|
-
}
|
|
19
|
-
/** @hidden */
|
|
20
|
-
const drawElemFunctions = {
|
|
21
|
-
oneProng: drawOneProng,
|
|
22
|
-
oneProngAtDullCorner,
|
|
23
|
-
twoProng_regular: twoProng,
|
|
24
|
-
twoProng_failed: twoProng,
|
|
25
|
-
twoProng_notAdded: twoProng,
|
|
26
|
-
twoProng_deleted: twoProng,
|
|
27
|
-
twoProng_holeClosing: twoProng,
|
|
28
|
-
threeProng,
|
|
29
|
-
//minY,
|
|
30
|
-
boundingHull,
|
|
31
|
-
looseBoundingBox,
|
|
32
|
-
tightBoundingBox,
|
|
33
|
-
sharpCorner,
|
|
34
|
-
dullCorner,
|
|
35
|
-
vertex,
|
|
36
|
-
mat: drawMat('mat'),
|
|
37
|
-
sat: drawMat('sat'),
|
|
38
|
-
//loop,
|
|
39
|
-
//loops,
|
|
40
|
-
maxVertex,
|
|
41
|
-
leaves,
|
|
42
|
-
culls,
|
|
43
|
-
cpNode: notImplementedYet
|
|
44
|
-
};
|
|
45
|
-
export { drawElemFunctions };
|
|
1
|
+
import { drawOneProng } from './one-prong.js';
|
|
2
|
+
import { twoProng } from './two-prong.js';
|
|
3
|
+
import { threeProng } from './three-prong.js';
|
|
4
|
+
import { vertex } from './vertex.js';
|
|
5
|
+
import { boundingHull } from './bounding-hull.js';
|
|
6
|
+
import { looseBoundingBox } from './loose-bounding-box.js';
|
|
7
|
+
import { tightBoundingBox } from './tight-bounding-box.js';
|
|
8
|
+
import { sharpCorner } from './sharp-corner.js';
|
|
9
|
+
import { dullCorner } from './dull-corner.js';
|
|
10
|
+
import { drawMat } from './mat.js';
|
|
11
|
+
import { maxVertex } from './max-vertex.js';
|
|
12
|
+
import { leaves } from './leaves.js';
|
|
13
|
+
import { culls } from './culls.js';
|
|
14
|
+
import { oneProngAtDullCorner } from './one-prong-at-dull-corner.js';
|
|
15
|
+
/** @hidden */
|
|
16
|
+
function notImplementedYet(g, elem) {
|
|
17
|
+
return []; // TODO - implement relevant drawing function
|
|
18
|
+
}
|
|
19
|
+
/** @hidden */
|
|
20
|
+
const drawElemFunctions = {
|
|
21
|
+
oneProng: drawOneProng,
|
|
22
|
+
oneProngAtDullCorner,
|
|
23
|
+
twoProng_regular: twoProng,
|
|
24
|
+
twoProng_failed: twoProng,
|
|
25
|
+
twoProng_notAdded: twoProng,
|
|
26
|
+
twoProng_deleted: twoProng,
|
|
27
|
+
twoProng_holeClosing: twoProng,
|
|
28
|
+
threeProng,
|
|
29
|
+
//minY,
|
|
30
|
+
boundingHull,
|
|
31
|
+
looseBoundingBox,
|
|
32
|
+
tightBoundingBox,
|
|
33
|
+
sharpCorner,
|
|
34
|
+
dullCorner,
|
|
35
|
+
vertex,
|
|
36
|
+
mat: drawMat('mat'),
|
|
37
|
+
sat: drawMat('sat'),
|
|
38
|
+
//loop,
|
|
39
|
+
//loops,
|
|
40
|
+
maxVertex,
|
|
41
|
+
leaves,
|
|
42
|
+
culls,
|
|
43
|
+
cpNode: notImplementedYet
|
|
44
|
+
};
|
|
45
|
+
export { drawElemFunctions };
|
|
46
46
|
//# sourceMappingURL=draw-elem.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Curve } from '../../../curve.js';
|
|
2
|
-
/** @hidden */
|
|
3
|
-
declare function dullCorner(g: SVGGElement, curve: Curve): SVGCircleElement[];
|
|
4
|
-
export { dullCorner };
|
|
1
|
+
import { Curve } from '../../../curve.js';
|
|
2
|
+
/** @hidden */
|
|
3
|
+
declare function dullCorner(g: SVGGElement, curve: Curve): SVGCircleElement[];
|
|
4
|
+
export { dullCorner };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { drawFs } from 'flo-draw';
|
|
2
|
-
/** @hidden */
|
|
3
|
-
function dullCorner(g, curve) {
|
|
4
|
-
const scaleFactor = 1;
|
|
5
|
-
const ps = curve.ps;
|
|
6
|
-
const p = curve.ps[ps.length - 1];
|
|
7
|
-
const $pos = drawFs.dot(g, p, 0.5 * scaleFactor, 'orange');
|
|
8
|
-
return $pos;
|
|
9
|
-
}
|
|
10
|
-
export { dullCorner };
|
|
1
|
+
import { drawFs } from 'flo-draw';
|
|
2
|
+
/** @hidden */
|
|
3
|
+
function dullCorner(g, curve) {
|
|
4
|
+
const scaleFactor = 1;
|
|
5
|
+
const ps = curve.ps;
|
|
6
|
+
const p = curve.ps[ps.length - 1];
|
|
7
|
+
const $pos = drawFs.dot(g, p, 0.5 * scaleFactor, 'orange');
|
|
8
|
+
return $pos;
|
|
9
|
+
}
|
|
10
|
+
export { dullCorner };
|
|
11
11
|
//# sourceMappingURL=dull-corner.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CpNode } from '../../../cp-node.js';
|
|
2
|
-
/** @hidden */
|
|
3
|
-
declare function leaves(g: SVGGElement, leaves: CpNode[]): SVGElement[];
|
|
4
|
-
export { leaves };
|
|
1
|
+
import { CpNode } from '../../../cp-node.js';
|
|
2
|
+
/** @hidden */
|
|
3
|
+
declare function leaves(g: SVGGElement, leaves: CpNode[]): SVGElement[];
|
|
4
|
+
export { leaves };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { drawCirclePercent } from './draw-circle-percent.js';
|
|
2
|
-
/** @hidden */
|
|
3
|
-
function leaves(g, leaves) {
|
|
4
|
-
const $elems = [];
|
|
5
|
-
for (const cpNode of leaves) {
|
|
6
|
-
const cp = cpNode.cp;
|
|
7
|
-
const p = cp.circle.center;
|
|
8
|
-
$elems.push(drawCirclePercent(g, p, 0.5, 'pinker thin5 nofill'));
|
|
9
|
-
}
|
|
10
|
-
return $elems;
|
|
11
|
-
}
|
|
12
|
-
export { leaves };
|
|
1
|
+
import { drawCirclePercent } from './draw-circle-percent.js';
|
|
2
|
+
/** @hidden */
|
|
3
|
+
function leaves(g, leaves) {
|
|
4
|
+
const $elems = [];
|
|
5
|
+
for (const cpNode of leaves) {
|
|
6
|
+
const cp = cpNode.cp;
|
|
7
|
+
const p = cp.circle.center;
|
|
8
|
+
$elems.push(drawCirclePercent(g, p, 0.5, 'pinker thin5 nofill'));
|
|
9
|
+
}
|
|
10
|
+
return $elems;
|
|
11
|
+
}
|
|
12
|
+
export { leaves };
|
|
13
13
|
//# sourceMappingURL=leaves.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Loop } from "../../../loop.js";
|
|
2
|
-
/** @hidden */
|
|
3
|
-
declare function loop(g: SVGGElement, loop: Loop): SVGElement[];
|
|
4
|
-
export { loop };
|
|
1
|
+
import { Loop } from "../../../loop.js";
|
|
2
|
+
/** @hidden */
|
|
3
|
+
declare function loop(g: SVGGElement, loop: Loop): SVGElement[];
|
|
4
|
+
export { loop };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
// TODO - finish
|
|
2
|
-
/** @hidden */
|
|
3
|
-
function loop(g, loop) {
|
|
4
|
-
/*
|
|
5
|
-
for (let curve of loop.curves) {
|
|
6
|
-
drawFs.bezier(g, curve.ps, undefined, 1000);
|
|
7
|
-
}
|
|
8
|
-
*/
|
|
9
|
-
return [];
|
|
10
|
-
}
|
|
11
|
-
export { loop };
|
|
1
|
+
// TODO - finish
|
|
2
|
+
/** @hidden */
|
|
3
|
+
function loop(g, loop) {
|
|
4
|
+
/*
|
|
5
|
+
for (let curve of loop.curves) {
|
|
6
|
+
drawFs.bezier(g, curve.ps, undefined, 1000);
|
|
7
|
+
}
|
|
8
|
+
*/
|
|
9
|
+
return [];
|
|
10
|
+
}
|
|
11
|
+
export { loop };
|
|
12
12
|
//# sourceMappingURL=loop.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Loop } from "../../../loop.js";
|
|
2
|
-
/** @hidden */
|
|
3
|
-
declare function loops(g: SVGGElement, loops: Loop[]): SVGElement[];
|
|
4
|
-
export { loops };
|
|
1
|
+
import { Loop } from "../../../loop.js";
|
|
2
|
+
/** @hidden */
|
|
3
|
+
declare function loops(g: SVGGElement, loops: Loop[]): SVGElement[];
|
|
4
|
+
export { loops };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
// TODO - finish
|
|
2
|
-
/** @hidden */
|
|
3
|
-
function loops(g, loops) {
|
|
4
|
-
return [];
|
|
5
|
-
}
|
|
6
|
-
export { loops };
|
|
1
|
+
// TODO - finish
|
|
2
|
+
/** @hidden */
|
|
3
|
+
function loops(g, loops) {
|
|
4
|
+
return [];
|
|
5
|
+
}
|
|
6
|
+
export { loops };
|
|
7
7
|
//# sourceMappingURL=loops.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/** @hidden */
|
|
2
|
-
declare function looseBoundingBox(g: SVGGElement, box: number[][]): SVGPathElement[];
|
|
3
|
-
export { looseBoundingBox };
|
|
1
|
+
/** @hidden */
|
|
2
|
+
declare function looseBoundingBox(g: SVGGElement, box: number[][]): SVGPathElement[];
|
|
3
|
+
export { looseBoundingBox };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { drawFs } from "flo-draw";
|
|
2
|
-
/** @hidden */
|
|
3
|
-
function looseBoundingBox(g, box) {
|
|
4
|
-
const [[x0, y0], [x1, y1]] = box;
|
|
5
|
-
box = [[x0, y0], [x1, y0], [x1, y1], [x0, y1]];
|
|
6
|
-
const $box = drawFs.polygon(g, box, 'thin5 brown nofill');
|
|
7
|
-
return $box;
|
|
8
|
-
}
|
|
9
|
-
export { looseBoundingBox };
|
|
1
|
+
import { drawFs } from "flo-draw";
|
|
2
|
+
/** @hidden */
|
|
3
|
+
function looseBoundingBox(g, box) {
|
|
4
|
+
const [[x0, y0], [x1, y1]] = box;
|
|
5
|
+
box = [[x0, y0], [x1, y0], [x1, y1], [x0, y1]];
|
|
6
|
+
const $box = drawFs.polygon(g, box, 'thin5 brown nofill');
|
|
7
|
+
return $box;
|
|
8
|
+
}
|
|
9
|
+
export { looseBoundingBox };
|
|
10
10
|
//# sourceMappingURL=loose-bounding-box.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Mat } from '../../../mat.js';
|
|
2
|
-
/** @hidden */
|
|
3
|
-
declare function drawMat(type: 'mat' | 'sat'): (g: SVGGElement, mat: Mat) => SVGElement[];
|
|
4
|
-
export { drawMat };
|
|
1
|
+
import { Mat } from '../../../mat.js';
|
|
2
|
+
/** @hidden */
|
|
3
|
+
declare function drawMat(type: 'mat' | 'sat'): (g: SVGGElement, mat: Mat) => SVGElement[];
|
|
4
|
+
export { drawMat };
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { drawFs } from 'flo-draw';
|
|
2
|
-
import { traverseEdges } from '../../../traverse-edges.js';
|
|
3
|
-
import { getCurveToNext } from '../../../get-curve-to-next.js';
|
|
4
|
-
/** @hidden */
|
|
5
|
-
function drawMat(type) {
|
|
6
|
-
const classes = type === 'mat'
|
|
7
|
-
? 'thin5 purple nofill'
|
|
8
|
-
: 'thin10 red nofill';
|
|
9
|
-
return (g, mat) => {
|
|
10
|
-
const cpNode = mat.cpNode;
|
|
11
|
-
if (!cpNode) {
|
|
12
|
-
return undefined;
|
|
13
|
-
}
|
|
14
|
-
const $svgs = [];
|
|
15
|
-
let i = 0;
|
|
16
|
-
traverseEdges(cpNode, cpNode => {
|
|
17
|
-
if (cpNode.isTerminating()) {
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
const bezier = getCurveToNext(cpNode);
|
|
21
|
-
if (!bezier) {
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
i++;
|
|
25
|
-
$svgs.push(...drawFs.bezier(g, bezier, classes /*, i*500*/));
|
|
26
|
-
});
|
|
27
|
-
return $svgs;
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
export { drawMat };
|
|
1
|
+
import { drawFs } from 'flo-draw';
|
|
2
|
+
import { traverseEdges } from '../../../traverse-edges.js';
|
|
3
|
+
import { getCurveToNext } from '../../../get-curve-to-next.js';
|
|
4
|
+
/** @hidden */
|
|
5
|
+
function drawMat(type) {
|
|
6
|
+
const classes = type === 'mat'
|
|
7
|
+
? 'thin5 purple nofill'
|
|
8
|
+
: 'thin10 red nofill';
|
|
9
|
+
return (g, mat) => {
|
|
10
|
+
const cpNode = mat.cpNode;
|
|
11
|
+
if (!cpNode) {
|
|
12
|
+
return undefined;
|
|
13
|
+
}
|
|
14
|
+
const $svgs = [];
|
|
15
|
+
let i = 0;
|
|
16
|
+
traverseEdges(cpNode, cpNode => {
|
|
17
|
+
if (cpNode.isTerminating()) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const bezier = getCurveToNext(cpNode);
|
|
21
|
+
if (!bezier) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
i++;
|
|
25
|
+
$svgs.push(...drawFs.bezier(g, bezier, classes /*, i*500*/));
|
|
26
|
+
});
|
|
27
|
+
return $svgs;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export { drawMat };
|
|
31
31
|
//# sourceMappingURL=mat.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CpNode } from '../../../cp-node.js';
|
|
2
|
-
/** @hidden */
|
|
3
|
-
declare function maxVertex(g: SVGGElement, cpNode: CpNode): SVGCircleElement[];
|
|
4
|
-
export { maxVertex };
|
|
1
|
+
import { CpNode } from '../../../cp-node.js';
|
|
2
|
+
/** @hidden */
|
|
3
|
+
declare function maxVertex(g: SVGGElement, cpNode: CpNode): SVGCircleElement[];
|
|
4
|
+
export { maxVertex };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { drawFs } from 'flo-draw';
|
|
2
|
-
/** @hidden */
|
|
3
|
-
function maxVertex(g, cpNode) {
|
|
4
|
-
const circle = cpNode.cp.circle;
|
|
5
|
-
const $elems = drawFs.circle(g, circle, 'brown thin10 nofill');
|
|
6
|
-
return $elems;
|
|
7
|
-
}
|
|
8
|
-
export { maxVertex };
|
|
1
|
+
import { drawFs } from 'flo-draw';
|
|
2
|
+
/** @hidden */
|
|
3
|
+
function maxVertex(g, cpNode) {
|
|
4
|
+
const circle = cpNode.cp.circle;
|
|
5
|
+
const $elems = drawFs.circle(g, circle, 'brown thin10 nofill');
|
|
6
|
+
return $elems;
|
|
7
|
+
}
|
|
8
|
+
export { maxVertex };
|
|
9
9
|
//# sourceMappingURL=max-vertex.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IPointOnShape } from '../../../point-on-shape.js';
|
|
2
|
-
/** @hidden */
|
|
3
|
-
declare function minY(g: SVGGElement, pos: IPointOnShape): SVGElement[];
|
|
4
|
-
export { minY };
|
|
1
|
+
import { IPointOnShape } from '../../../point-on-shape.js';
|
|
2
|
+
/** @hidden */
|
|
3
|
+
declare function minY(g: SVGGElement, pos: IPointOnShape): SVGElement[];
|
|
4
|
+
export { minY };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { toCubic, evalDeCasteljau } from 'flo-bezier3';
|
|
2
|
-
import { drawFs } from 'flo-draw';
|
|
3
|
-
/** @hidden */
|
|
4
|
-
function minY(g, pos) {
|
|
5
|
-
const p = evalDeCasteljau(pos.curve.ps, pos.t);
|
|
6
|
-
const ps = toCubic(pos.curve.ps);
|
|
7
|
-
//console.log('x: ', getX(ps));
|
|
8
|
-
//console.log('y: ', getY(ps));
|
|
9
|
-
//console.log('t: ', pos.t);
|
|
10
|
-
const $elems = drawFs.crossHair(g, p, 'red thin10 nofill');
|
|
11
|
-
return $elems;
|
|
12
|
-
}
|
|
13
|
-
export { minY };
|
|
1
|
+
import { toCubic, evalDeCasteljau } from 'flo-bezier3';
|
|
2
|
+
import { drawFs } from 'flo-draw';
|
|
3
|
+
/** @hidden */
|
|
4
|
+
function minY(g, pos) {
|
|
5
|
+
const p = evalDeCasteljau(pos.curve.ps, pos.t);
|
|
6
|
+
const ps = toCubic(pos.curve.ps);
|
|
7
|
+
//console.log('x: ', getX(ps));
|
|
8
|
+
//console.log('y: ', getY(ps));
|
|
9
|
+
//console.log('t: ', pos.t);
|
|
10
|
+
const $elems = drawFs.crossHair(g, p, 'red thin10 nofill');
|
|
11
|
+
return $elems;
|
|
12
|
+
}
|
|
13
|
+
export { minY };
|
|
14
14
|
//# sourceMappingURL=min-y.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IPointOnShape } from '../../../point-on-shape.js';
|
|
2
|
-
/** @hidden */
|
|
3
|
-
declare function oneProngAtDullCorner(g: SVGGElement, pos: IPointOnShape): SVGCircleElement[];
|
|
4
|
-
export { oneProngAtDullCorner };
|
|
1
|
+
import { IPointOnShape } from '../../../point-on-shape.js';
|
|
2
|
+
/** @hidden */
|
|
3
|
+
declare function oneProngAtDullCorner(g: SVGGElement, pos: IPointOnShape): SVGCircleElement[];
|
|
4
|
+
export { oneProngAtDullCorner };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { drawFs } from 'flo-draw';
|
|
2
|
-
import { getOsculatingCircle } from '../../../point-on-shape.js';
|
|
3
|
-
/** @hidden */
|
|
4
|
-
function oneProngAtDullCorner(g, pos) {
|
|
5
|
-
//let oCircle = PointOnShape.getOsculatingCircle(Number.POSITIVE_INFINITY, pos);
|
|
6
|
-
const oCircle = getOsculatingCircle(Number.POSITIVE_INFINITY, pos);
|
|
7
|
-
const $center = drawFs.dot(g, pos.p, 0.1, 'orange');
|
|
8
|
-
const $circle = drawFs.dot(g, oCircle.center, 0.25, 'orange');
|
|
9
|
-
const $pos = drawFs.circle(g, oCircle, 'orange thin10 nofill');
|
|
10
|
-
return [...$center, ...$circle, ...$pos];
|
|
11
|
-
}
|
|
12
|
-
export { oneProngAtDullCorner };
|
|
1
|
+
import { drawFs } from 'flo-draw';
|
|
2
|
+
import { getOsculatingCircle } from '../../../point-on-shape.js';
|
|
3
|
+
/** @hidden */
|
|
4
|
+
function oneProngAtDullCorner(g, pos) {
|
|
5
|
+
//let oCircle = PointOnShape.getOsculatingCircle(Number.POSITIVE_INFINITY, pos);
|
|
6
|
+
const oCircle = getOsculatingCircle(Number.POSITIVE_INFINITY, pos);
|
|
7
|
+
const $center = drawFs.dot(g, pos.p, 0.1, 'orange');
|
|
8
|
+
const $circle = drawFs.dot(g, oCircle.center, 0.25, 'orange');
|
|
9
|
+
const $pos = drawFs.circle(g, oCircle, 'orange thin10 nofill');
|
|
10
|
+
return [...$center, ...$circle, ...$pos];
|
|
11
|
+
}
|
|
12
|
+
export { oneProngAtDullCorner };
|
|
13
13
|
//# sourceMappingURL=one-prong-at-dull-corner.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IPointOnShape } from '../../../point-on-shape.js';
|
|
2
|
-
/** @hidden */
|
|
3
|
-
declare function drawOneProng(g: SVGGElement, pos: IPointOnShape, classes: string, delay?: number): SVGCircleElement[];
|
|
4
|
-
export { drawOneProng };
|
|
1
|
+
import { IPointOnShape } from '../../../point-on-shape.js';
|
|
2
|
+
/** @hidden */
|
|
3
|
+
declare function drawOneProng(g: SVGGElement, pos: IPointOnShape, classes: string, delay?: number): SVGCircleElement[];
|
|
4
|
+
export { drawOneProng };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { drawFs } from 'flo-draw';
|
|
2
|
-
import { getOsculatingCircle } from '../../../point-on-shape.js';
|
|
3
|
-
import { scaleCircle } from '../../../circle.js';
|
|
4
|
-
/** @hidden */
|
|
5
|
-
const scaleFactor = 0.5;
|
|
6
|
-
/** @hidden */
|
|
7
|
-
function drawOneProng(g, pos, classes, delay = 0) {
|
|
8
|
-
const circle = scaleCircle(
|
|
9
|
-
//PointOnShape.getOsculatingCircle(Number.POSITIVE_INFINITY, pos),
|
|
10
|
-
getOsculatingCircle(Number.POSITIVE_INFINITY, pos), 1);
|
|
11
|
-
const $center = drawFs.dot(g, pos.p, 0.1 * scaleFactor, 'gray', delay);
|
|
12
|
-
const $circle = drawFs.dot(g, circle.center, 0.25 * scaleFactor, 'gray', delay);
|
|
13
|
-
const $pos = drawFs.circle(g, circle, 'gray thin10 nofill', delay);
|
|
14
|
-
return [...$center, ...$circle, ...$pos];
|
|
15
|
-
}
|
|
16
|
-
export { drawOneProng };
|
|
1
|
+
import { drawFs } from 'flo-draw';
|
|
2
|
+
import { getOsculatingCircle } from '../../../point-on-shape.js';
|
|
3
|
+
import { scaleCircle } from '../../../circle.js';
|
|
4
|
+
/** @hidden */
|
|
5
|
+
const scaleFactor = 0.5;
|
|
6
|
+
/** @hidden */
|
|
7
|
+
function drawOneProng(g, pos, classes, delay = 0) {
|
|
8
|
+
const circle = scaleCircle(
|
|
9
|
+
//PointOnShape.getOsculatingCircle(Number.POSITIVE_INFINITY, pos),
|
|
10
|
+
getOsculatingCircle(Number.POSITIVE_INFINITY, pos), 1);
|
|
11
|
+
const $center = drawFs.dot(g, pos.p, 0.1 * scaleFactor, 'gray', delay);
|
|
12
|
+
const $circle = drawFs.dot(g, circle.center, 0.25 * scaleFactor, 'gray', delay);
|
|
13
|
+
const $pos = drawFs.circle(g, circle, 'gray thin10 nofill', delay);
|
|
14
|
+
return [...$center, ...$circle, ...$pos];
|
|
15
|
+
}
|
|
16
|
+
export { drawOneProng };
|
|
17
17
|
//# sourceMappingURL=one-prong.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Curve } from '../../../curve.js';
|
|
2
|
-
/** @hidden */
|
|
3
|
-
declare function sharpCorner(g: SVGGElement, curve: Curve): SVGCircleElement[];
|
|
4
|
-
export { sharpCorner };
|
|
1
|
+
import { Curve } from '../../../curve.js';
|
|
2
|
+
/** @hidden */
|
|
3
|
+
declare function sharpCorner(g: SVGGElement, curve: Curve): SVGCircleElement[];
|
|
4
|
+
export { sharpCorner };
|