Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
adaptive-bezier-curve
Advanced tools
Builds a bezier curve that is adaptive; that is to say, it has more points along curved corners, and less points along straight lines. This can be used to produce scalable curves that are consistently smooth, while using a small number of steps. Based on AntiGrain.
Also see adaptive-quadratic-curve.
var bezier = require('adaptive-bezier-curve')
var start = [20, 20],
c1 = [100, 159],
c2 = [50, 200],
end = [200, 20],
scale = 2
var points = bezier(start, c1, c2, end, scale)
//returns a list of 2d points: [ [x,y], [x,y], [x,y] ... ]
See demo/index.js for an example with HTML5 canvas.
bezier(start, c1, c2, end[, scale, points])
Returns an adaptive bezier curve for the given four control points. You can specify a scale
to produce better smoothing for scaled contexts, otherwise it defaults to 1.0.
If you specify a points
array, the new points will be pushed onto that array (useful for building paths). If you don't specify points
, a new array will be used.
The AntiGrain 2.4 code is licensed under BSD-3-Clause, see LICENSE.md for details.
FAQs
adaptive and scalable 2D bezier curves
The npm package adaptive-bezier-curve receives a total of 12,091 weekly downloads. As such, adaptive-bezier-curve popularity was classified as popular.
We found that adaptive-bezier-curve demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.