flo-mat 4.1.5 → 5.0.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/__tests__/closest-boundary-point/get-endpoint-info.spec.ts +140 -0
- package/__tests__/closest-boundary-point/root-interval-to-distance-squared-interval.spec.ts +87 -0
- package/__tests__/cp-node/fs/get-all-on-loop-by-loop.spec.ts +55 -0
- package/__tests__/cp-node/fs/get-angle-between-mat-curves.spec.ts +39 -3
- package/__tests__/cp-node/fs/get-boundary-bezier-parts-to-next.spec.ts +87 -3
- package/__tests__/cp-node/fs/get-boundary-beziers-between.spec.ts +68 -3
- package/__tests__/cp-node/fs/get-boundary-beziers-to-next.spec.ts +41 -3
- package/__tests__/cp-node/fs/get-boundary-distance-to-next.spec.ts +20 -3
- package/__tests__/cp-node/fs/get-branch-beziers.spec.ts +42 -3
- package/__tests__/cp-node/fs/get-branch.spec.ts +60 -3
- package/__tests__/cp-node/fs/get-cp-node-ordering.spec.ts +19 -3
- package/__tests__/cp-node/fs/get-distance-to-next.spec.ts +37 -4
- package/__tests__/cp-node/fs/get-edge-direction.spec.ts +50 -3
- package/__tests__/cp-node/fs/get-first-exit.spec.ts +78 -3
- package/__tests__/cp-node/fs/get-hole-closers.spec.ts +32 -3
- package/__tests__/cp-node/fs/get-implied-boundary-bezier-between.spec.ts +48 -3
- package/__tests__/cp-node/fs/get-mat-curve-between.spec.ts +77 -3
- package/__tests__/cp-node/fs/get-mat-curve-to-next.spec.ts +17 -4
- package/__tests__/cp-node/fs/get-mat-curves-between.spec.ts +38 -3
- package/__tests__/cp-node/fs/get-salience.spec.ts +68 -3
- package/__tests__/cp-node/fs/get-vertex-forward-children.spec.ts +40 -3
- package/__tests__/cp-node/fs/insert-cp-node.spec.ts +87 -3
- package/__tests__/cp-node/fs/is-special.spec.ts +1 -1
- package/__tests__/cp-node/fs/remove-cp-node.spec.ts +42 -3
- package/__tests__/find-2-prong/calc-seperation-tolerance.spec.ts +46 -0
- package/__tests__/find-2-prong/get-medial/get-closest-points.spec.ts +1 -1
- package/__tests__/floyd-warshall/get-graph.spec.ts +100 -0
- package/__tests__/get-mats-with-hole.ts +28 -0
- package/__tests__/get-mats1.spec.ts +61 -0
- package/__tests__/get-mats1.ts +75 -67
- package/__tests__/helpers/cp-node-by-id.ts +27 -0
- package/__tests__/helpers/expect-point-close.ts +42 -0
- package/__tests__/mat/hausdorff-distance-one-sided-exceeds.spec.ts +129 -0
- package/__tests__/mat/simplify-mat.spec.ts +85 -0
- package/__tests__/reconstruct-from-mat/reconstruct-from-mat.spec.ts +39 -0
- package/__tests__/specific-cases/test-svgs/achispado.svg +14 -0
- package/__tests__/utils/get-beziers-from-tangents.spec.ts +142 -0
- package/browser/index.js +12985 -9965
- package/browser/index.min.js +1 -1
- package/node/closest-boundary-point/cull-curve-pieces.d.ts +21 -0
- package/node/closest-boundary-point/cull-curve-pieces.js +40 -0
- package/node/closest-boundary-point/cull-curve-pieces.js.map +1 -0
- package/node/closest-boundary-point/get-close-boundary-points-certified.js +5 -2
- package/node/closest-boundary-point/get-close-boundary-points-certified.js.map +1 -1
- package/node/closest-boundary-point/get-endpoint-info.d.ts +39 -0
- package/node/closest-boundary-point/get-endpoint-info.js +78 -0
- package/node/closest-boundary-point/get-endpoint-info.js.map +1 -0
- package/node/closest-boundary-point/get-potential-closest-points-on-curve-certified.js +5 -19
- package/node/closest-boundary-point/get-potential-closest-points-on-curve-certified.js.map +1 -1
- package/node/closest-boundary-point/root-interval-to-distance-squared-interval.d.ts +17 -5
- package/node/closest-boundary-point/root-interval-to-distance-squared-interval.js +37 -50
- package/node/closest-boundary-point/root-interval-to-distance-squared-interval.js.map +1 -1
- package/node/corner/get-corner.d.ts +18 -1
- package/node/corner/get-corner.js +8 -1
- package/node/corner/get-corner.js.map +1 -1
- package/node/corner/get-interface-ccw.js.map +1 -1
- package/node/cp-node/cp-node.d.ts +4 -3
- package/node/cp-node/fs/get-all-on-loop-by-loop.js +0 -4
- package/node/cp-node/fs/get-all-on-loop-by-loop.js.map +1 -1
- package/node/cp-node/fs/get-angle-between-mat-curves.js +6 -4
- package/node/cp-node/fs/get-angle-between-mat-curves.js.map +1 -1
- package/node/cp-node/fs/get-boundary-beziers-between.d.ts +6 -4
- package/node/cp-node/fs/get-boundary-beziers-between.js +6 -4
- package/node/cp-node/fs/get-boundary-beziers-between.js.map +1 -1
- package/node/cp-node/fs/get-branch-beziers.d.ts +2 -1
- package/node/cp-node/fs/get-branch-beziers.js +3 -2
- package/node/cp-node/fs/get-branch-beziers.js.map +1 -1
- package/node/cp-node/fs/get-branch.js +1 -2
- package/node/cp-node/fs/get-branch.js.map +1 -1
- package/node/cp-node/fs/get-distance-to-next.js +4 -2
- package/node/cp-node/fs/get-distance-to-next.js.map +1 -1
- package/node/cp-node/fs/get-first-exit.d.ts +7 -3
- package/node/cp-node/fs/get-first-exit.js +13 -11
- package/node/cp-node/fs/get-first-exit.js.map +1 -1
- package/node/cp-node/fs/get-implied-boundary-bezier-between.d.ts +9 -1
- package/node/cp-node/fs/get-implied-boundary-bezier-between.js +11 -55
- package/node/cp-node/fs/get-implied-boundary-bezier-between.js.map +1 -1
- package/node/cp-node/fs/get-mat-curve-between.d.ts +4 -3
- package/node/cp-node/fs/get-mat-curve-between.js +5 -49
- package/node/cp-node/fs/get-mat-curve-between.js.map +1 -1
- package/node/cp-node/fs/get-mat-curve-to-next.d.ts +1 -1
- package/node/cp-node/fs/get-mat-curves-between.d.ts +8 -0
- package/node/cp-node/fs/get-mat-curves-between.js +9 -2
- package/node/cp-node/fs/get-mat-curves-between.js.map +1 -1
- package/node/cp-node/fs/get-real-prong-count.d.ts +2 -1
- package/node/cp-node/fs/get-real-prong-count.js +11 -5
- package/node/cp-node/fs/get-real-prong-count.js.map +1 -1
- package/node/cp-node/fs/get-salience.d.ts +10 -0
- package/node/cp-node/fs/get-salience.js +17 -1
- package/node/cp-node/fs/get-salience.js.map +1 -1
- package/node/cp-node/fs/is-fully-terminating.d.ts +4 -2
- package/node/cp-node/fs/is-fully-terminating.js +6 -15
- package/node/cp-node/fs/is-fully-terminating.js.map +1 -1
- package/node/cp-node/fs/is-on-same-loop.d.ts +1 -1
- package/node/cp-node/fs/is-special.d.ts +7 -0
- package/node/cp-node/fs/is-special.js +9 -2
- package/node/cp-node/fs/is-special.js.map +1 -1
- package/node/cp-node/fs/is-vertex.d.ts +1 -1
- package/node/cp-node/fs/traverse-edges.d.ts +7 -3
- package/node/cp-node/fs/traverse-edges.js +7 -3
- package/node/cp-node/fs/traverse-edges.js.map +1 -1
- package/node/cp-node/stringification/from-stringifyable.d.ts +2 -2
- package/node/cp-node/stringification/from-stringifyable.js +1 -1
- package/node/cp-node/stringification/from-stringifyable.js.map +1 -1
- package/node/cp-node/stringification/to-stringifyable.d.ts +3 -3
- package/node/cp-node/stringification/to-stringifyable.js +3 -3
- package/node/debug/debug.d.ts +26 -3
- package/node/debug/debug.js +16 -5
- package/node/debug/debug.js.map +1 -1
- package/node/find-2-prong/add-2-prong.js +1 -7
- package/node/find-2-prong/add-2-prong.js.map +1 -1
- package/node/find-2-prong/calc-seperation-tolerance.d.ts +28 -5
- package/node/find-2-prong/calc-seperation-tolerance.js +32 -89
- package/node/find-2-prong/calc-seperation-tolerance.js.map +1 -1
- package/node/find-2-prong/find-2-prong.js +8 -10
- package/node/find-2-prong/find-2-prong.js.map +1 -1
- package/node/find-2-prong/find-and-add-2-prongs.js +2 -2
- package/node/find-2-prong/find-and-add-2-prongs.js.map +1 -1
- package/node/find-2-prong/get-medial/get-antipodal-points.d.ts +1 -2
- package/node/find-2-prong/get-medial/get-antipodal-points.js +2 -3
- package/node/find-2-prong/get-medial/get-antipodal-points.js.map +1 -1
- package/node/find-2-prong/get-medial/get-closest-points.d.ts +1 -8
- package/node/find-2-prong/get-medial/get-closest-points.js +4 -40
- package/node/find-2-prong/get-medial/get-closest-points.js.map +1 -1
- package/node/find-2-prong/reduce-radius.d.ts +1 -1
- package/node/find-2-prong/reduce-radius.js +6 -3
- package/node/find-2-prong/reduce-radius.js.map +1 -1
- package/node/find-3-prong/calc-better-x.js +1 -1
- package/node/find-3-prong/calc-better-x.js.map +1 -1
- package/node/find-3-prong/find-3-prong-for-delta3s.d.ts +3 -2
- package/node/find-3-prong/find-3-prong-for-delta3s.js +35 -41
- package/node/find-3-prong/find-3-prong-for-delta3s.js.map +1 -1
- package/node/find-3-prong/find-3-prong.js +3 -1
- package/node/find-3-prong/find-3-prong.js.map +1 -1
- package/node/find-3-prong/find-and-add-3-prongs.js +16 -0
- package/node/find-3-prong/find-and-add-3-prongs.js.map +1 -1
- package/node/find-mat/create-initial-cp-tree.js +2 -2
- package/node/find-mat/create-initial-cp-tree.js.map +1 -1
- package/node/find-mat/find-mat.js +3 -4
- package/node/find-mat/find-mat.js.map +1 -1
- package/node/find-mat/find-mats.d.ts +6 -12
- package/node/find-mat/find-mats.js +10 -27
- package/node/find-mat/find-mats.js.map +1 -1
- package/node/find-mat/get-dull-corners-on-loop.js +2 -2
- package/node/find-mat/get-dull-corners-on-loop.js.map +1 -1
- package/node/find-mat/get-for-1-prongs-on-loop.js +36 -8
- package/node/find-mat/get-for-1-prongs-on-loop.js.map +1 -1
- package/node/find-mat/get-meta.d.ts +14 -4
- package/node/find-mat/get-meta.js +30 -24
- package/node/find-mat/get-meta.js.map +1 -1
- package/node/find-mat/get-sharp-corners.js +2 -2
- package/node/find-mat/get-sharp-corners.js.map +1 -1
- package/node/find-mat/mat-options.d.ts +2 -2
- package/node/floyd-warshall/get-graph.d.ts +12 -1
- package/node/floyd-warshall/get-graph.js +41 -38
- package/node/floyd-warshall/get-graph.js.map +1 -1
- package/node/geometry/get-bounding-box-.d.ts +16 -2
- package/node/geometry/get-bounding-box-.js +5 -2
- package/node/geometry/get-bounding-box-.js.map +1 -1
- package/node/geometry/get-closest-square-distance-to-rect.d.ts +3 -0
- package/node/geometry/get-closest-square-distance-to-rect.js +7 -5
- package/node/geometry/get-closest-square-distance-to-rect.js.map +1 -1
- package/node/geometry/get-closest-squared-distance-to-rotated-rect.d.ts +4 -0
- package/node/geometry/get-closest-squared-distance-to-rotated-rect.js +11 -5
- package/node/geometry/get-closest-squared-distance-to-rotated-rect.js.map +1 -1
- package/node/get-medial-points/double-double/dd-get-medial-point-coeffs-bez3.js +1 -2
- package/node/get-medial-points/double-double/dd-get-medial-point-coeffs-bez3.js.map +1 -1
- package/node/index.d.ts +3 -2
- package/node/index.js +2 -1
- package/node/index.js.map +1 -1
- package/node/mat/clone-mat.d.ts +9 -0
- package/node/mat/clone-mat.js +17 -0
- package/node/mat/clone-mat.js.map +1 -0
- package/node/mat/clone-meta.d.ts +12 -0
- package/node/mat/clone-meta.js +24 -0
- package/node/mat/clone-meta.js.map +1 -0
- package/node/mat/get-boundary-piece-beziers.d.ts +5 -0
- package/node/mat/get-boundary-piece-beziers.js +7 -93
- package/node/mat/get-boundary-piece-beziers.js.map +1 -1
- package/node/mat/get-largest-3-prong.d.ts +6 -0
- package/node/mat/get-largest-3-prong.js +8 -5
- package/node/mat/get-largest-3-prong.js.map +1 -1
- package/node/mat/get-largest-vertex.d.ts +15 -1
- package/node/mat/get-largest-vertex.js +20 -7
- package/node/mat/get-largest-vertex.js.map +1 -1
- package/node/mat/hausdorff-distance-one-sided-exceeds.d.ts +79 -0
- package/node/mat/hausdorff-distance-one-sided-exceeds.js +251 -0
- package/node/mat/hausdorff-distance-one-sided-exceeds.js.map +1 -0
- package/node/mat/mat-meta.d.ts +0 -6
- package/node/mat/simplify-mat.d.ts +25 -8
- package/node/mat/simplify-mat.js +182 -53
- package/node/mat/simplify-mat.js.map +1 -1
- package/node/mat/trim-mat.d.ts +4 -2
- package/node/mat/trim-mat.js +3 -1
- package/node/mat/trim-mat.js.map +1 -1
- package/node/point-on-shape/get-boundary-tangent-line.d.ts +19 -0
- package/node/point-on-shape/get-boundary-tangent-line.js +33 -0
- package/node/point-on-shape/get-boundary-tangent-line.js.map +1 -0
- package/node/point-on-shape/get-osculating-circle.d.ts +6 -4
- package/node/point-on-shape/get-osculating-circle.js +6 -4
- package/node/point-on-shape/get-osculating-circle.js.map +1 -1
- package/node/point-on-shape/get-pos-corner.js +2 -2
- package/node/point-on-shape/get-pos-corner.js.map +1 -1
- package/node/reconstruct-from-mat/reconstruct-from-mat.js +20 -80
- package/node/reconstruct-from-mat/reconstruct-from-mat.js.map +1 -1
- package/node/reconstruct-from-mat/remove-sat-induced-trivial-3prongs.d.ts +4 -0
- package/node/reconstruct-from-mat/remove-sat-induced-trivial-3prongs.js +4 -0
- package/node/reconstruct-from-mat/remove-sat-induced-trivial-3prongs.js.map +1 -1
- package/node/sat/cull.d.ts +7 -6
- package/node/sat/cull.js +13 -16
- package/node/sat/cull.js.map +1 -1
- package/node/sat/get-sat-culls.d.ts +12 -2
- package/node/sat/get-sat-culls.js +21 -16
- package/node/sat/get-sat-culls.js.map +1 -1
- package/node/svg/get-shape-bounds.d.ts +1 -12
- package/node/svg/get-shape-bounds.js +2 -3
- package/node/svg/get-shape-bounds.js.map +1 -1
- package/node/sweep-line/sweep-line.js.map +1 -1
- package/node/utils/get-beziers-from-tangents.d.ts +28 -0
- package/node/utils/get-beziers-from-tangents.js +92 -0
- package/node/utils/get-beziers-from-tangents.js.map +1 -0
- package/node/vertex/remove-vertex.d.ts +5 -3
- package/node/vertex/remove-vertex.js +5 -3
- package/node/vertex/remove-vertex.js.map +1 -1
- package/package.json +9 -9
- package/qv-infinite-loop.md +120 -0
- package/src/closest-boundary-point/cull-curve-pieces.ts +49 -0
- package/src/closest-boundary-point/get-close-boundary-points-certified.ts +5 -2
- package/src/closest-boundary-point/get-endpoint-info.ts +96 -0
- package/src/closest-boundary-point/get-potential-closest-points-on-curve-certified.ts +5 -23
- package/src/closest-boundary-point/root-interval-to-distance-squared-interval.ts +42 -60
- package/src/corner/get-corner.ts +10 -1
- package/src/corner/get-interface-ccw.ts +2 -2
- package/src/cp-node/cp-node.ts +4 -3
- package/src/cp-node/fs/get-all-on-loop-by-loop.ts +0 -4
- package/src/cp-node/fs/get-angle-between-mat-curves.ts +6 -4
- package/src/cp-node/fs/get-boundary-beziers-between.ts +10 -8
- package/src/cp-node/fs/get-branch-beziers.ts +3 -2
- package/src/cp-node/fs/get-branch.ts +1 -2
- package/src/cp-node/fs/get-distance-to-next.ts +4 -2
- package/src/cp-node/fs/get-first-exit.ts +15 -14
- package/src/cp-node/fs/get-implied-boundary-bezier-between.ts +17 -69
- package/src/cp-node/fs/get-mat-curve-between.ts +9 -67
- package/src/cp-node/fs/get-mat-curves-between.ts +9 -2
- package/src/cp-node/fs/get-real-prong-count.ts +11 -7
- package/src/cp-node/fs/get-salience.ts +15 -2
- package/src/cp-node/fs/is-fully-terminating.ts +6 -18
- package/src/cp-node/fs/is-on-same-loop.ts +2 -2
- package/src/cp-node/fs/is-special.ts +11 -6
- package/src/cp-node/fs/is-vertex.ts +1 -1
- package/src/cp-node/fs/traverse-edges.ts +8 -4
- package/src/cp-node/stringification/from-stringifyable.ts +75 -75
- package/src/cp-node/stringification/to-stringifyable.ts +3 -3
- package/src/debug/debug.ts +44 -8
- package/src/find-2-prong/add-2-prong.ts +2 -9
- package/src/find-2-prong/calc-seperation-tolerance.ts +34 -115
- package/src/find-2-prong/find-2-prong.ts +9 -11
- package/src/find-2-prong/find-and-add-2-prongs.ts +2 -2
- package/src/find-2-prong/get-medial/get-antipodal-points.ts +1 -3
- package/src/find-2-prong/get-medial/get-closest-points.ts +6 -51
- package/src/find-2-prong/reduce-radius.ts +6 -4
- package/src/find-3-prong/calc-better-x.ts +2 -2
- package/src/find-3-prong/find-3-prong-for-delta3s.ts +197 -214
- package/src/find-3-prong/find-3-prong.ts +54 -51
- package/src/find-3-prong/find-and-add-3-prongs.ts +20 -1
- package/src/find-mat/create-initial-cp-tree.ts +2 -2
- package/src/find-mat/find-mat.ts +4 -6
- package/src/find-mat/find-mats.ts +83 -105
- package/src/find-mat/get-dull-corners-on-loop.ts +2 -2
- package/src/find-mat/get-for-1-prongs-on-loop.ts +40 -8
- package/src/find-mat/get-meta.ts +34 -39
- package/src/find-mat/get-sharp-corners.ts +2 -2
- package/src/find-mat/mat-options.ts +2 -2
- package/src/floyd-warshall/get-graph.ts +46 -47
- package/src/geometry/get-bounding-box-.ts +5 -2
- package/src/geometry/get-closest-square-distance-to-rect.ts +7 -7
- package/src/geometry/get-closest-squared-distance-to-rotated-rect.ts +12 -10
- package/src/get-medial-points/double-double/dd-get-medial-point-coeffs-bez3.ts +1 -2
- package/src/index.ts +3 -2
- package/src/mat/clone-mat.ts +9 -3
- package/src/mat/clone-meta.ts +8 -0
- package/src/mat/get-boundary-piece-beziers.ts +16 -117
- package/src/mat/get-largest-3-prong.ts +9 -6
- package/src/mat/get-largest-vertex.ts +25 -9
- package/src/mat/hausdorff-distance-one-sided-exceeds.ts +314 -0
- package/src/mat/mat-meta.ts +0 -9
- package/src/mat/simplify-mat.ts +254 -116
- package/src/mat/trim-mat.ts +6 -4
- package/src/point-on-shape/get-boundary-tangent-line.ts +36 -0
- package/src/point-on-shape/get-osculating-circle.ts +7 -5
- package/src/point-on-shape/get-pos-corner.ts +2 -2
- package/src/reconstruct-from-mat/reconstruct-from-mat.ts +22 -111
- package/src/reconstruct-from-mat/remove-sat-induced-trivial-3prongs.ts +4 -0
- package/src/sat/cull.ts +16 -20
- package/src/sat/get-sat-culls.ts +28 -23
- package/src/svg/get-shape-bounds.ts +2 -3
- package/src/sweep-line/sweep-line.ts +1 -1
- package/src/utils/get-beziers-from-tangents.ts +110 -0
- package/src/utils/map-map.ts +1 -1
- package/src/vertex/remove-vertex.ts +5 -3
- package/__tests__/cp-node/fs/get-distance-between.spec.ts +0 -7
- package/__tests__/cp-node/fs/get-terminating-on-circle.spec.ts +0 -24
- package/__tests__/cp-node/fs/is-single-3-prong.spec.ts +0 -17
- package/__tests__/cp-node/fs/iterate-all-on-loop.spec.ts +0 -17
- package/__tests__/cp-node/fs/traverse-all-forward.spec.ts +0 -14
- package/node/closest-boundary-point/cull-bezier-pieces-1.d.ts +0 -9
- package/node/closest-boundary-point/cull-bezier-pieces-1.js +0 -17
- package/node/closest-boundary-point/cull-bezier-pieces-1.js.map +0 -1
- package/node/closest-boundary-point/cull-by-loose-bounding-box.d.ts +0 -13
- package/node/closest-boundary-point/cull-by-loose-bounding-box.js +0 -27
- package/node/closest-boundary-point/cull-by-loose-bounding-box.js.map +0 -1
- package/node/closest-boundary-point/cull-by-tight-boundary-box.d.ts +0 -11
- package/node/closest-boundary-point/cull-by-tight-boundary-box.js +0 -27
- package/node/closest-boundary-point/cull-by-tight-boundary-box.js.map +0 -1
- package/node/cp-node/fs/find-first.d.ts +0 -10
- package/node/cp-node/fs/find-first.js +0 -19
- package/node/cp-node/fs/find-first.js.map +0 -1
- package/node/debug/functions/check-ordering.d.ts +0 -4
- package/node/debug/functions/check-ordering.js +0 -43
- package/node/debug/functions/check-ordering.js.map +0 -1
- package/node/find-2-prong/cull-bezier-pieces.d.ts +0 -13
- package/node/find-2-prong/cull-bezier-pieces.js +0 -43
- package/node/find-2-prong/cull-bezier-pieces.js.map +0 -1
- package/node/floyd-warshall/get-hole-closer-pairs.d.ts +0 -8
- package/node/floyd-warshall/get-hole-closer-pairs.js +0 -27
- package/node/floyd-warshall/get-hole-closer-pairs.js.map +0 -1
- package/node/utils/dual-set.d.ts +0 -27
- package/node/utils/dual-set.js +0 -55
- package/node/utils/dual-set.js.map +0 -1
- package/node/utils/tri-map.d.ts +0 -27
- package/node/utils/tri-map.js +0 -49
- package/node/utils/tri-map.js.map +0 -1
- package/src/closest-boundary-point/cull-bezier-pieces-1.ts +0 -36
- package/src/closest-boundary-point/cull-by-loose-bounding-box.ts +0 -42
- package/src/closest-boundary-point/cull-by-tight-boundary-box.ts +0 -43
- package/src/closest-boundary-point/get-p-from-box.ts +0 -14
- package/src/cp-node/fs/add-distance-from.ts +0 -49
- package/src/cp-node/fs/get-distance-between.ts +0 -16
- package/src/cp-node/fs/get-terminating-on-circle.ts +0 -24
- package/src/cp-node/fs/is-single-3-prong.ts +0 -15
- package/src/cp-node/fs/iterate-all-on-loop.ts +0 -15
- package/src/cp-node/fs/traverse-all-forward.ts +0 -24
- package/src/debug/functions/draw/draw-beziers-as-single-path.ts +0 -40
- package/src/debug/functions/draw/draw-disk.ts +0 -34
- package/src/debug/functions/draw/xmlns.ts +0 -5
- package/src/find-2-prong/cull-bezier-pieces.ts +0 -61
- package/src/find-2-prong/find-and-add-2-prong.ts +0 -30
- package/src/find-2-prong/get-medial/get-closest-points-d.ts +0 -213
- package/src/find-2-prong/x-for-debugging.ts +0 -13
- package/src/floyd-warshall/get-hole-closer-pairs.ts +0 -35
- package/src/mat/get-two-prong-type.ts +0 -13
- package/src/point-on-shape/is-pos-dull-corner.ts +0 -18
- package/src/point-on-shape/is-pos-quite-dull-corner.ts +0 -18
- package/src/point-on-shape/is-pos-quite-sharp-corner.ts +0 -18
- package/src/point-on-shape/pos-to-human-string.ts +0 -18
- package/src/sweep-line/are-boxes-intersecting.ts +0 -37
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import type { CurvePiece } from '../mat/curve-piece.js';
|
|
2
|
-
import { getClosestSquareDistanceToRect } from '../geometry/get-closest-square-distance-to-rect.js';
|
|
3
|
-
import { getBoundingBox$ } from '../geometry/get-bounding-box-.js';
|
|
4
|
-
import { memoize } from 'flo-memoize';
|
|
5
|
-
import { getBoundingBoxTight } from 'flo-bezier3';
|
|
6
|
-
import { getClosestSquaredDistanceToRotatedRect } from '../geometry/get-closest-squared-distance-to-rotated-rect.js';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const TOLERANCE = 1 + 2**-20;
|
|
10
|
-
const getBoundingBoxTight$ = memoize(getBoundingBoxTight);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Cull all `curvePieces` not within the given radius of a given point.
|
|
15
|
-
*
|
|
16
|
-
* @param extreme
|
|
17
|
-
* @param curvePieces
|
|
18
|
-
* @param xO
|
|
19
|
-
* @param xy2
|
|
20
|
-
*
|
|
21
|
-
* @internal
|
|
22
|
-
*/
|
|
23
|
-
function cullCurvePieces(
|
|
24
|
-
curvePieces: CurvePiece[],
|
|
25
|
-
xO: number[],
|
|
26
|
-
xy2: number): CurvePiece[] {
|
|
27
|
-
|
|
28
|
-
if (curvePieces.length <= 2) {
|
|
29
|
-
// Curve pieces can never be less than 2 at this stage since a curve
|
|
30
|
-
// endpoint will be shared between 2 curves
|
|
31
|
-
return curvePieces as CurvePiece[];
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
let lastIdx = 0;
|
|
35
|
-
for (let i=0; i<curvePieces.length; i++) {
|
|
36
|
-
const curvePiece = curvePieces[i];
|
|
37
|
-
const { ps } = curvePiece.curve;
|
|
38
|
-
|
|
39
|
-
const rect = getBoundingBox$(ps);
|
|
40
|
-
const d = getClosestSquareDistanceToRect(rect, xO);
|
|
41
|
-
if (d <= TOLERANCE*xy2) {
|
|
42
|
-
const tightBoundingBox = getBoundingBoxTight$(ps);
|
|
43
|
-
const d2 = getClosestSquaredDistanceToRotatedRect(
|
|
44
|
-
tightBoundingBox,
|
|
45
|
-
xO
|
|
46
|
-
);
|
|
47
|
-
|
|
48
|
-
if (d2 <= TOLERANCE*xy2) {
|
|
49
|
-
curvePieces[lastIdx] = curvePiece;
|
|
50
|
-
lastIdx++;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
curvePieces.length = lastIdx;
|
|
56
|
-
|
|
57
|
-
return curvePieces;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
export { cullCurvePieces }
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
// import type { CpNode } from "../cp-node/cp-node.js";
|
|
2
|
-
// import type { MatMeta } from "../mat/mat-meta.js";
|
|
3
|
-
// import type { PrePointOnShape } from "../point-on-shape/point-on-shape.js";
|
|
4
|
-
// import { add2Prong } from "./add-2-prong.js";
|
|
5
|
-
// import { find2Prong } from "./find-2-prong.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
// /**
|
|
9
|
-
// * Just to simplify `find2Prong` a bit.
|
|
10
|
-
// *
|
|
11
|
-
// * * Cannot be used with holeClosers or angles other than 0
|
|
12
|
-
// * * Can be used after the mat has been found
|
|
13
|
-
// */
|
|
14
|
-
// function findAndAdd2Prong(
|
|
15
|
-
// meta: MatMeta,
|
|
16
|
-
// y: PrePointOnShape): CpNode | undefined {
|
|
17
|
-
|
|
18
|
-
// const twoProngInfo = find2Prong(meta, false, false, 0, y);
|
|
19
|
-
// if (twoProngInfo === undefined) {
|
|
20
|
-
// return undefined;
|
|
21
|
-
// }
|
|
22
|
-
|
|
23
|
-
// const { circle, z } = twoProngInfo;
|
|
24
|
-
// const cpNode = add2Prong(meta, circle, y, z, false);
|
|
25
|
-
|
|
26
|
-
// return cpNode;
|
|
27
|
-
// }
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
// export { findAndAdd2Prong }
|
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
import type { RootInterval } from 'flo-poly';
|
|
2
|
-
import type { CurvePiece } from "../../mat/curve-piece.js";
|
|
3
|
-
import type { PrePointOnShape } from "../../point-on-shape/point-on-shape.js";
|
|
4
|
-
import type { AntipodalPoint } from './antipodal-point.js';
|
|
5
|
-
import { lengthSquared } from "flo-vector2d";
|
|
6
|
-
import { roots, Horner } from 'flo-poly';
|
|
7
|
-
import { evalDeCasteljau, getMedialPointCoeffs, getMedialPointCoeffsBez0, getMedialPointCoeffsBez2_SameCurve, getMedialPointCoeffsBez3_SameCurve } from 'flo-bezier3';
|
|
8
|
-
|
|
9
|
-
const { sqrt, abs, max } = Math;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @param maxCoordPowerOf2
|
|
14
|
-
* @param nnorm
|
|
15
|
-
* @param yPos The point on the shape
|
|
16
|
-
* @param for1Prong defaults to `false`;
|
|
17
|
-
* @param angle defaults to `0`;
|
|
18
|
-
* @param curvePiece The curve piece
|
|
19
|
-
*
|
|
20
|
-
* @internal
|
|
21
|
-
*/
|
|
22
|
-
function getClosestPoint(
|
|
23
|
-
maxCoordPowerOf2: number,
|
|
24
|
-
nnorm: number[],
|
|
25
|
-
nnormDd: number[][],
|
|
26
|
-
yPos: PrePointOnShape,
|
|
27
|
-
for1Prong: boolean,
|
|
28
|
-
angle: number,
|
|
29
|
-
curvePiece: CurvePiece): AntipodalPoint[] {
|
|
30
|
-
|
|
31
|
-
const { curve, ts: [tS,tE] } = curvePiece;
|
|
32
|
-
const { ps } = curve;
|
|
33
|
-
const { curve: touchedCurve, t, p: y, pDd: yDd } = yPos;
|
|
34
|
-
|
|
35
|
-
const isTouched = curve === touchedCurve;
|
|
36
|
-
const shouldDeflate = angle === 0 && isTouched;
|
|
37
|
-
|
|
38
|
-
const infos: AntipodalPoint[] = [];
|
|
39
|
-
let startPushed = false;
|
|
40
|
-
let endPushed = false;
|
|
41
|
-
|
|
42
|
-
let ss: RootInterval[];
|
|
43
|
-
if (tS !== tE &&
|
|
44
|
-
!(shouldDeflate && ps.length === 2) &&
|
|
45
|
-
!(isTouched && ps.length === 3 && for1Prong)) {
|
|
46
|
-
|
|
47
|
-
const { A, B, H } = shouldDeflate
|
|
48
|
-
? ps.length === 3
|
|
49
|
-
? getMedialPointCoeffsBez2_SameCurve(t, nnorm, ps)
|
|
50
|
-
: getMedialPointCoeffsBez3_SameCurve(t, nnorm, ps)
|
|
51
|
-
: getMedialPointCoeffs(y, nnorm, ps);
|
|
52
|
-
|
|
53
|
-
ss = roots(H, tS, tE) || [];
|
|
54
|
-
//-----------------------
|
|
55
|
-
|
|
56
|
-
for (let i=0; i<ss.length; i++) {
|
|
57
|
-
const ri = ss[i];
|
|
58
|
-
const { tS: sS, tE: sE, t: _s } = ri;
|
|
59
|
-
if (ri.multiplicity > 1) {
|
|
60
|
-
continue;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
if (sE < tS || sS > tE) { continue; } // outside curve piece
|
|
64
|
-
if (sS < 0) { continue; } // outside curve piece
|
|
65
|
-
|
|
66
|
-
// clip to [0,1]
|
|
67
|
-
const s = sE > 1 ? 1 : _s;
|
|
68
|
-
|
|
69
|
-
//-----------------------
|
|
70
|
-
const AS = Horner(A, s);
|
|
71
|
-
const BS = Horner(B, s);
|
|
72
|
-
// const CS = Horner(C, s);
|
|
73
|
-
// const DS = Horner(D, s);
|
|
74
|
-
|
|
75
|
-
const _AS = abs(AS);
|
|
76
|
-
// const _CS = abs(CS);
|
|
77
|
-
|
|
78
|
-
// if (max(_AS, _CS) < 2**-40) { continue; }
|
|
79
|
-
if (max(_AS) < 2**-40) { continue; }
|
|
80
|
-
|
|
81
|
-
// const w = _AS > _CS
|
|
82
|
-
// ? -BS / AS
|
|
83
|
-
// : -DS / CS; // alternative
|
|
84
|
-
const w = -BS / AS;
|
|
85
|
-
|
|
86
|
-
if (w <= 0) {
|
|
87
|
-
// If `w` is negative the circle radius is negative -> discard
|
|
88
|
-
continue;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
const V = [w*nnorm[0], w*nnorm[1]];
|
|
92
|
-
const d = sqrt(lengthSquared(V));
|
|
93
|
-
|
|
94
|
-
if (d <= 2**(maxCoordPowerOf2 - 40)) {
|
|
95
|
-
// If `w` <= 2**-40 -> discard
|
|
96
|
-
continue;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
const x = [y[0] + V[0], y[1] + V[1]];
|
|
100
|
-
//-----------------------
|
|
101
|
-
|
|
102
|
-
if (ri.tS <= tS && ri.tE >= tS) {
|
|
103
|
-
startPushed = true;
|
|
104
|
-
}
|
|
105
|
-
if (ri.tS <= tE && ri.tE >= tE) {
|
|
106
|
-
endPushed = true;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
// If the point is the first control point of the curve then we
|
|
111
|
-
// ensure the point becomes the last control point of the prior
|
|
112
|
-
// curve to induce some symmetery and simplify the algorithm.
|
|
113
|
-
const s_ = s === 0 ? 1 : s;
|
|
114
|
-
const curve_ = s === 0 ? curve.prev : curve;
|
|
115
|
-
|
|
116
|
-
const info: AntipodalPoint = {
|
|
117
|
-
curve: curve_,
|
|
118
|
-
s: s_,
|
|
119
|
-
d, x
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
infos.push(info);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
//------------------------------------------
|
|
129
|
-
const pLast = ps[ps.length - 1];
|
|
130
|
-
|
|
131
|
-
let dontPush1 = (
|
|
132
|
-
(t === 0 && curve === touchedCurve!.prev) ||
|
|
133
|
-
(t === 1 && curve === touchedCurve)
|
|
134
|
-
);
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
//--------------------------------------
|
|
138
|
-
// Also check curve start control point
|
|
139
|
-
//--------------------------------------
|
|
140
|
-
const PS: { P: number[], t: number }[] = [];
|
|
141
|
-
if (tS === 0) {
|
|
142
|
-
// We never check points at `t === 0` since they are covered by the previous curve's endpoint
|
|
143
|
-
// which cannot be culled if this curve`s `t === 0` is included
|
|
144
|
-
} else if (tS === 1) {
|
|
145
|
-
if (!dontPush1 && !startPushed) {
|
|
146
|
-
PS.push({ P: pLast, t: 1 });
|
|
147
|
-
}
|
|
148
|
-
} else {
|
|
149
|
-
if (!startPushed) {
|
|
150
|
-
const pp = evalDeCasteljau(ps, tS);
|
|
151
|
-
PS.push({ P: pp, t: tS });
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
//--------------------------------------
|
|
156
|
-
// Also check curve end control point
|
|
157
|
-
//--------------------------------------
|
|
158
|
-
if (tS !== tE) {
|
|
159
|
-
if (tE === 0) {
|
|
160
|
-
// We never check points at `t === 0` since they are covered by the previous curve's endpoint
|
|
161
|
-
// which cannot be culled if this curve`s `t === 0` is included
|
|
162
|
-
} else if (tE === 1) {
|
|
163
|
-
if (!dontPush1 && !endPushed) {
|
|
164
|
-
PS.push({ P: pLast, t: 1 }); dontPush1 = true;
|
|
165
|
-
}
|
|
166
|
-
} else {
|
|
167
|
-
if (!endPushed) {
|
|
168
|
-
const pp = evalDeCasteljau(ps, tE);
|
|
169
|
-
PS.push({ P: pp, t: tE });
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
//------------------------------------------
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
for (let i=0; i<PS.length; i++) {
|
|
177
|
-
//-----------------------
|
|
178
|
-
const { P, t: s } = PS[i];
|
|
179
|
-
const { a0, b0 } = getMedialPointCoeffsBez0(y,nnorm,P);
|
|
180
|
-
|
|
181
|
-
if (abs(a0) <= 2**-40 || abs(b0) <= 2**-40) {
|
|
182
|
-
continue;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
const w = -b0 / a0;
|
|
186
|
-
|
|
187
|
-
// too close to point of origin *or* negative;
|
|
188
|
-
if (w < 2**-40) {
|
|
189
|
-
continue;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
const V = [w*nnorm[0], w*nnorm[1]];
|
|
193
|
-
const d = sqrt(lengthSquared(V));
|
|
194
|
-
|
|
195
|
-
const x = [y[0] + V[0], y[1] + V[1]];
|
|
196
|
-
|
|
197
|
-
const s_ = s === 0 ? 1 : s;
|
|
198
|
-
const curve_ = s === 0 ? curve.prev : curve;
|
|
199
|
-
|
|
200
|
-
const info: AntipodalPoint = {
|
|
201
|
-
curve: curve_,
|
|
202
|
-
s: s_,
|
|
203
|
-
d, x
|
|
204
|
-
};
|
|
205
|
-
|
|
206
|
-
infos.push(info);
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
return infos;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
export { getClosestPoint }
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { CpNode } from "../cp-node/cp-node.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
*
|
|
6
|
-
* @param holeClosers
|
|
7
|
-
* @returns
|
|
8
|
-
*/
|
|
9
|
-
// FUTURE - this function is currently O(n^2) but could be made O(n).
|
|
10
|
-
// FUTURE - only `pointOnShape.p` is checked but `pointOnShape.t` should also be checked
|
|
11
|
-
// or better yet, `CpNode.cp.order` and `CpNode.cp.order2`, etc.
|
|
12
|
-
function getHoleCloserPairs(
|
|
13
|
-
holeClosers: CpNode[]): Map<CpNode,CpNode> {
|
|
14
|
-
|
|
15
|
-
const pairs: Map<CpNode,CpNode> = new Map();
|
|
16
|
-
for (let hcA of holeClosers) {
|
|
17
|
-
for (let hcB of holeClosers) {
|
|
18
|
-
const cA = hcA.pointOnShape!.circle!.center;
|
|
19
|
-
const cB = hcB.pointOnShape!.circle!.center;
|
|
20
|
-
const cpA = hcA.pointOnShape!.p;
|
|
21
|
-
const cpB = hcB.pointOnShape!.p;
|
|
22
|
-
if (hcB !== hcA &&
|
|
23
|
-
cA[0] === cB[0] && cA[1] === cB[1] &&
|
|
24
|
-
cpA[0] === cpB[0] && cpA[1] === cpB[1]) {
|
|
25
|
-
|
|
26
|
-
pairs.set(hcA,hcB);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
return pairs;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
export { getHoleCloserPairs }
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// import { TwoProngForDebugging } from '../debug/two-prong-for-debugging.js';
|
|
2
|
-
// import { ElemType_TwoProng } from './elem-type-two-prong.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
// /** @internal */
|
|
6
|
-
// function getTwoProngType(e: TwoProngForDebugging): ElemType_TwoProng {
|
|
7
|
-
// if (e.holeClosing) { return 'twoProng_holeClosing' }
|
|
8
|
-
|
|
9
|
-
// return 'twoProng_regular';
|
|
10
|
-
// }
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
// export { getTwoProngType }
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { PointOnShape } from "./point-on-shape.js";
|
|
2
|
-
import { getPosCorner$ } from "./get-pos-corner.js";
|
|
3
|
-
import { isPosCorner } from "./is-pos-corner.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @internal
|
|
8
|
-
*/
|
|
9
|
-
function isPosDullCorner(
|
|
10
|
-
pos: PointOnShape) {
|
|
11
|
-
|
|
12
|
-
if (!isPosCorner(pos)) { return false; }
|
|
13
|
-
|
|
14
|
-
return getPosCorner$(pos).isDull;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export { isPosDullCorner }
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { PointOnShape } from "./point-on-shape.js";
|
|
2
|
-
import { isPosCorner } from './is-pos-corner.js';
|
|
3
|
-
import { getPosCorner$ } from './get-pos-corner.js';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @internal
|
|
8
|
-
*/
|
|
9
|
-
function isPosQuiteDullCorner(
|
|
10
|
-
pos: PointOnShape) {
|
|
11
|
-
|
|
12
|
-
if (!isPosCorner(pos)) { return false; }
|
|
13
|
-
|
|
14
|
-
return getPosCorner$(pos).isQuiteDull;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export { isPosQuiteDullCorner }
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { PointOnShape } from "./point-on-shape.js";
|
|
2
|
-
import { isPosCorner } from './is-pos-corner.js';
|
|
3
|
-
import { getPosCorner$ } from './get-pos-corner.js';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @internal
|
|
8
|
-
*/
|
|
9
|
-
function isPosQuiteSharpCorner(
|
|
10
|
-
pos: PointOnShape) {
|
|
11
|
-
|
|
12
|
-
if (!isPosCorner(pos)) { return false; }
|
|
13
|
-
|
|
14
|
-
return getPosCorner$(pos).isQuiteSharp;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export { isPosQuiteSharpCorner }
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { PointOnShape } from "./point-on-shape.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Returns a human-readable string of the given `PointOnShape`.
|
|
6
|
-
* For debugging only.
|
|
7
|
-
* @internal
|
|
8
|
-
*/
|
|
9
|
-
function posToHumanString(
|
|
10
|
-
pos: PointOnShape) {
|
|
11
|
-
|
|
12
|
-
return '' + pos.p[0] + ', ' + pos.p[1] +
|
|
13
|
-
' | bz: ' + pos.curve.idx +
|
|
14
|
-
' | t: ' + pos.t
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export { posToHumanString }
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Returns true if the 2 given (closed) boxes intersect. At this stage we already
|
|
4
|
-
* know their x-axis intersect.
|
|
5
|
-
* @param a A rectangular box
|
|
6
|
-
* @param a Another rectangular box
|
|
7
|
-
* @param closed (defaults to true) Interpret boxes as being closed (i.e. they
|
|
8
|
-
* contain their border) or open.
|
|
9
|
-
*
|
|
10
|
-
* @internal
|
|
11
|
-
*/
|
|
12
|
-
function areBoxesIntersecting(closed: boolean) {
|
|
13
|
-
return (a: number[][], b: number[][]): boolean => {
|
|
14
|
-
|
|
15
|
-
let [[ax0, ay0],[ax1, ay1]] = a;
|
|
16
|
-
let [[bx0, by0],[bx1, by1]] = b;
|
|
17
|
-
|
|
18
|
-
// Swap so smaller coordinate comes first
|
|
19
|
-
if (ay0 > ay1) { [ay0,ay1] = [ay1,ay0] }
|
|
20
|
-
if (by0 > by1) { [by0,by1] = [by1,by0] }
|
|
21
|
-
if (ax0 > ax1) { [ax0,ax1] = [ax1,ax0] }
|
|
22
|
-
if (bx0 > bx1) { [bx0,bx1] = [bx1,bx0] }
|
|
23
|
-
|
|
24
|
-
return closed
|
|
25
|
-
? (
|
|
26
|
-
ax0 <= bx1 && ax1 >= bx0 &&
|
|
27
|
-
by0 <= ay1 && by1 >= ay0
|
|
28
|
-
)
|
|
29
|
-
: (
|
|
30
|
-
ax0 < bx1 && ax1 > bx0 &&
|
|
31
|
-
by0 < ay1 && by1 > ay0
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
export { areBoxesIntersecting }
|