Gathering detailed insights and metrics for bezier-intersect
Gathering detailed insights and metrics for bezier-intersect
Gathering detailed insights and metrics for bezier-intersect
Gathering detailed insights and metrics for bezier-intersect
Set of functions to find intersections between lines and rectangles and Bezier curves of order 2 and 3
npm install bezier-intersect
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
45 Stars
9 Commits
4 Forks
1 Watchers
1 Branches
1 Contributors
Updated on Jun 02, 2025
Latest Version
0.0.3
Package Id
bezier-intersect@0.0.3
Unpacked Size
25.62 kB
Size
4.47 kB
File Count
7
NPM Version
5.8.0
Node Version
8.11.1
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Set of functions to find intersections between lines and rectangles and Bezier curves of order 2 and 3. Based on thelonious/js-intersections, but with the abstractions removed and some performance tweaking.
npm i -S bezier-intersect
1import { 2 quadBezierLine, 3 cubicBezierLine, 4 quadBezierAABB, 5 cubicBezierAABB 6} from 'bezier-intersect';
1<script src="https://unpkg.com/bezier-intersect"></script> 2<script> 3var res = []; 4bezierIntersect.quadBezierLine(..., res); 5console.log(res); 6</script>
quadBezierLine(ax, ay, cx, cy, bx, by, l1x, l1y, l2x, l2y, [result:Array<number>]):number
Calculates the intersection points between the quadratic Bezier curve and line segment. If result
is passed, returns the exact number of intersections, and stores them in result
as [x, y, x, y]
. If not - stops at the first intersection and returns 1
or 0
if there are no intersections.
quadBezierAABB(ax, ay, cx, cy, bx, by, minx, miny, maxx, maxy, [result:Array<number>]):number
Calculates the intersection points between the quadratic Bezier curve and axis-aligned box. If result
is passed, returns the exact number of intersections, and stores them in result
as [x, y, x, y]
. If not - stops at the first intersection and returns 1
or 0
if there are no intersections.
cubicBezierLine(ax, ay, c1x, c1y, c2x, c2y, bx, by, l1x, l1y, l2x, l2y, [result:Array<number>]):number
Calculates the intersection points between the cubic Bezier curve and line segment. If result
is passed, returns the exact number of intersections, and stores them in result
as [x, y, x, y]
. If not - stops at the first intersection and returns 1
or 0
if there are no intersections.
cubicBezierAABB(ax, ay, c1x, c1y, c2x, c2y, bx, by, minx, miny, maxx, maxy, [result:Array<number>]):number
Calculates the intersection points between the cubic Bezier curve and axis-aligned box. If result
is passed, returns the exact number of intersections, and stores them in result
as [x, y, x, y]
. If not - stops at the first intersection and returns 1
or 0
if there are no intersections.
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no SAST tool detected
Details
Reason
Found 0/9 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
14 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More