{"id":36924267,"url":"https://github.com/jsplumb/jsBezier","last_synced_at":"2026-01-28T10:01:04.059Z","repository":{"id":57284082,"uuid":"2011249","full_name":"jsplumb/jsBezier","owner":"jsplumb","description":"Bezier curve helper functions for JavaScript.  Used by jsPlumb; perhaps useful for others.","archived":true,"fork":false,"pushed_at":"2019-04-11T19:54:44.000Z","size":61,"stargazers_count":171,"open_issues_count":2,"forks_count":40,"subscribers_count":10,"default_branch":"master","last_synced_at":"2026-01-23T13:16:17.364Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jsplumb.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.txt","contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-07-07T08:48:53.000Z","updated_at":"2025-11-16T13:31:36.000Z","dependencies_parsed_at":"2022-08-31T00:00:13.736Z","dependency_job_id":null,"html_url":"https://github.com/jsplumb/jsBezier","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/jsplumb/jsBezier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsplumb%2FjsBezier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsplumb%2FjsBezier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsplumb%2FjsBezier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsplumb%2FjsBezier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsplumb","download_url":"https://codeload.github.com/jsplumb/jsBezier/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsplumb%2FjsBezier/sbom","scorecard":{"id":539066,"data":{"date":"2025-08-11","repo":{"name":"github.com/jsplumb/jsBezier","commit":"4522a9e2af0acb2ddaeacbb39dcd15bef1421060"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":1,"reason":"Found 3/28 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE-MIT:0","Info: FSF or OSI recognized license: MIT License: LICENSE-MIT:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T07:45:25.242Z","repository_id":57284082,"created_at":"2025-08-20T07:45:25.242Z","updated_at":"2025-08-20T07:45:25.242Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28844011,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T07:39:25.367Z","status":"ssl_error","status_checked_at":"2026-01-28T07:39:24.487Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-12T19:00:25.491Z","updated_at":"2026-01-28T10:01:04.049Z","avatar_url":"https://github.com/jsplumb.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# jsBezier\n\nThis is a set of Bezier curve functions that deal with Beziers, used by jsPlumb, and perhaps useful for other \npeople. These functions work with Bezier curves of arbitrary degree.\n\n## Installation\n\n```\nnpm install jsbezier\n```\n\n## Notes\n\n- all input points should be in the format {x:.., y:..}. all output points are in this format too.\n- all input curves should be in the format [ {x:.., y:..}, {x:.., y:..}, {x:.., y:..}, {x:.., y:..} ]\n- The order of the points is [ start, control point 1, ..., control point N, end ]. `location` as used as an \ninput here refers to a decimal in the range [0-1], which indicates a point some proportion along the \nlength of the curve. `location` as output has the same format and meaning.\n\n## Function List\n\n### Functions are all in the 'jsBezier' namespace.\n\n- `distanceFromCurve(point, curve)`\n\nCalculates the distance that the given point lies from the given Bezier. Note that it is computed \nrelative to the center of the Bezier, so if you have stroked the curve with a wide pen you may wish \nto take that into account! The distance returned is relative to the values of the curve and the point - \nit will most likely be pixels.\n\n- `gradientAtPoint(curve, location)`\n\nCalculates the gradient to the curve at the given location, as a decimal between 0 and 1 inclusive.\n\n- `gradientAtPointAlongCurveFrom(location, distance)`\n\nCalculates the gradient to the curve at the point which is 'distance' units from the given location. \nSee `pointAlongCurveFrom`. \n\n- `nearestPointOnCurve(point, curve)`\n\nCalculates the nearest point to the given point on the given curve. The return value of this is a JS object \nliteral, containing both the point's coordinates and also the location of the point (see above), for example: \n\n\t\t{ point:{ x:551,y:150 }, location:0.263365 }.\n\n- `pointOnCurve(curve, location)`\n\nCalculates the coordinates of the point on the given Bezier curve at the given location.\n\n- `pointAlongCurveFrom(curve, location, distance)`\n\nCalculates the coordinates of the point on the given curve that is `distance` units from `location`. `distance` \nshould be in the same coordinate space as that used to construct the Bezier curve. For an HTML Canvas usage, \nfor example, `distance` would be a measure of pixels. The return value is a point in the form:\n\n\t\t{ x:..., y:... }\n\n- `locationAlongCurveFrom(curve, location, distance)`\n\nCalculates the location of the point on the given curve that is `distance` units from `location`. \n`distance` should be in the same coordinate space as that used to construct the Bezier curve. For an \nHTML Canvas usage, for example, distance would be a measure of pixels. The return value is a float \nin the range [0,1].\n\n- `pointAlongCurve(curve, location, distance)`\n\nCalculates both the coordinates and location of the point on the given curve that is `distance` units \nfrom `location`. This function is the function that both `locationAlongCurveFrom` and `pointAlongCurveFrom` \ncall. The return value is a JS object containing:\n\n\t\t{ point:the new point, location: location in range [0,1], originalPoint:the reference point }\n\n- `perpendicularToCurveAt(curve, location, length, distance)`\n\nCalculates the perpendicular to the given curve at the given location. `length` is the length of the line \nyou wish for (it will be centered on the point at location). `distance` is optional, and allows you to \nspecify a point along the path from the given `location` as the center of the perpendicular returned. \nThe return value of this is an array of two points: \n\n\t\t[ {x:...,y:...}, {x:...,y:...} ].","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsplumb%2FjsBezier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsplumb%2FjsBezier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsplumb%2FjsBezier/lists"}