{"id":13394054,"url":"https://github.com/rough-stuff/rough","last_synced_at":"2026-01-27T11:05:56.325Z","repository":{"id":37487450,"uuid":"76342242","full_name":"rough-stuff/rough","owner":"rough-stuff","description":"Create graphics with a hand-drawn, sketchy, appearance","archived":false,"fork":false,"pushed_at":"2024-07-28T21:12:58.000Z","size":6173,"stargazers_count":20774,"open_issues_count":41,"forks_count":645,"subscribers_count":166,"default_branch":"master","last_synced_at":"2026-01-23T09:03:49.930Z","etag":null,"topics":["canvas","draw","graphics","html5-canvas","svg","svg-path"],"latest_commit_sha":null,"homepage":"http://roughjs.com","language":"HTML","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/rough-stuff.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"pshihn","open_collective":"rough"}},"created_at":"2016-12-13T09:12:55.000Z","updated_at":"2026-01-23T02:22:16.000Z","dependencies_parsed_at":"2022-07-14T04:00:36.581Z","dependency_job_id":"6a93ca48-9473-4024-a260-7081ccb8c558","html_url":"https://github.com/rough-stuff/rough","commit_stats":{"total_commits":405,"total_committers":15,"mean_commits":27.0,"dds":0.5209876543209877,"last_synced_commit":"56a2762171b1294d643501e8d14f120db6b27bd7"},"previous_names":["pshihn/rough"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/rough-stuff/rough","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rough-stuff%2Frough","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rough-stuff%2Frough/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rough-stuff%2Frough/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rough-stuff%2Frough/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rough-stuff","download_url":"https://codeload.github.com/rough-stuff/rough/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rough-stuff%2Frough/sbom","scorecard":{"id":748037,"data":{"date":"2025-08-11","repo":{"name":"github.com/rough-stuff/rough","commit":"56a2762171b1294d643501e8d14f120db6b27bd7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.4,"checks":[{"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":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"Code-Review","score":0,"reason":"Found 0/12 approved changesets -- score normalized to 0","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":"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":"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":"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":"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":"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:0","Info: FSF or OSI recognized license: MIT License: LICENSE: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 26 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"}},{"name":"Vulnerabilities","score":5,"reason":"5 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T19:27:18.861Z","repository_id":37487450,"created_at":"2025-08-22T19:27:18.861Z","updated_at":"2025-08-22T19:27:18.861Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28812367,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T07:41:26.337Z","status":"ssl_error","status_checked_at":"2026-01-27T07:41:08.776Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["canvas","draw","graphics","html5-canvas","svg","svg-path"],"created_at":"2024-07-30T17:01:07.425Z","updated_at":"2026-01-27T11:05:56.309Z","avatar_url":"https://github.com/rough-stuff.png","language":"HTML","readme":"# Rough.js\n\n\u003cb\u003eRough.js\u003c/b\u003e is a small (\\\u003c9 kB) graphics library that lets you draw in a _sketchy_, _hand-drawn-like_, style.\nThe library defines primitives to draw lines, curves, arcs, polygons, circles, and ellipses. It also supports drawing [SVG paths](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths).\n\nRough.js works with both [Canvas](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API) and [SVG](https://developer.mozilla.org/en-US/docs/Web/SVG).\n\n![Rough.js sample](https://roughjs.com/images/cap_demo.png)\n\n[@RoughLib](https://twitter.com/RoughLib) on Twitter.\n\n## Install\n\nfrom npm:\n\n```\nnpm install --save roughjs\n```\n\nOr get the latest using unpkg: https://unpkg.com/roughjs@latest/bundled/rough.js\n\n\nIf you are looking for bundled version in different formats, the npm package will have these in the following locations:\n\nCommonJS: `roughjs/bundled/rough.cjs.js`\n\nESM: `roughjs/bundled/rough.esm.js`\n\nBrowser IIFE: `roughjs/bundled/rough.js`\n\n\n## Usage\n\n![Rough.js rectangle](https://roughjs.com/images/m1.png)\n\n```js\nconst rc = rough.canvas(document.getElementById('canvas'));\nrc.rectangle(10, 10, 200, 200); // x, y, width, height\n```\n\nor SVG\n\n```js\nconst rc = rough.svg(svg);\nlet node = rc.rectangle(10, 10, 200, 200); // x, y, width, height\nsvg.appendChild(node);\n```\n\n### Lines and Ellipses\n\n![Rough.js rectangle](https://roughjs.com/images/m2.png)\n\n```js\nrc.circle(80, 120, 50); // centerX, centerY, diameter\nrc.ellipse(300, 100, 150, 80); // centerX, centerY, width, height\nrc.line(80, 120, 300, 100); // x1, y1, x2, y2\n```\n\n### Filling\n\n![Rough.js rectangle](https://roughjs.com/images/m3.png)\n\n```js\nrc.circle(50, 50, 80, { fill: 'red' }); // fill with red hachure\nrc.rectangle(120, 15, 80, 80, { fill: 'red' });\nrc.circle(50, 150, 80, {\n  fill: \"rgb(10,150,10)\",\n  fillWeight: 3 // thicker lines for hachure\n});\nrc.rectangle(220, 15, 80, 80, {\n  fill: 'red',\n  hachureAngle: 60, // angle of hachure,\n  hachureGap: 8\n});\nrc.rectangle(120, 105, 80, 80, {\n  fill: 'rgba(255,0,200,0.2)',\n  fillStyle: 'solid' // solid fill\n});\n```\n\nFill styles can be: **hachure**(default), **solid**, **zigzag**, **cross-hatch**, **dots**, **dashed**, or **zigzag-line**\n\n![Rough.js fill examples](https://roughjs.com/images/m14.png)\n\n### Sketching style\n\n![Rough.js rectangle](https://roughjs.com/images/m4.png)\n\n```js\nrc.rectangle(15, 15, 80, 80, { roughness: 0.5, fill: 'red' });\nrc.rectangle(120, 15, 80, 80, { roughness: 2.8, fill: 'blue' });\nrc.rectangle(220, 15, 80, 80, { bowing: 6, stroke: 'green', strokeWidth: 3 });\n```\n\n### SVG Paths\n\n![Rough.js paths](https://roughjs.com/images/m5.png)\n\n```js\nrc.path('M80 80 A 45 45, 0, 0, 0, 125 125 L 125 80 Z', { fill: 'green' });\nrc.path('M230 80 A 45 45, 0, 1, 0, 275 125 L 275 80 Z', { fill: 'purple' });\nrc.path('M80 230 A 45 45, 0, 0, 1, 125 275 L 125 230 Z', { fill: 'red' });\nrc.path('M230 230 A 45 45, 0, 1, 1, 275 275 L 275 230 Z', { fill: 'blue' });\n```\n\nSVG Path with simplification:\n\n![Rough.js texas map](https://roughjs.com/images/m9.png) ![Rough.js texas map](https://roughjs.com/images/m10.png)\n\n## Examples\n\n![Rough.js US map](https://roughjs.com/images/m6.png)\n\n[View examples here](https://github.com/pshihn/rough/wiki/Examples)\n\n## API \u0026 Documentation\n\n[Full Rough.js API](https://github.com/pshihn/rough/wiki)\n\n## Credits\n\nSome of the core algorithms were adapted from [handy](https://www.gicentre.net/software/#/handy/) processing lib.\n\nAlgorithm to convert SVG arcs to Canvas [described here](https://www.w3.org/TR/SVG/implnote.html) was adapted from [Mozilla codebase](https://hg.mozilla.org/mozilla-central/file/17156fbebbc8/content/svg/content/src/nsSVGPathDataParser.cpp#l887)\n\n## Contributors\n\n### Financial Contributors\n\nBecome a financial contributor and help us sustain our community. [[Contribute](https://opencollective.com/rough/contribute)]\n\n#### Individuals\n\n\u003ca href=\"https://opencollective.com/rough\"\u003e\u003cimg src=\"https://opencollective.com/rough/individuals.svg?width=890\"\u003e\u003c/a\u003e\n\n#### Organizations\n\nSupport this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/rough/contribute)]\n\n\u003ca href=\"https://excalidraw.com/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/59452120?s=64\u0026v=4\"\u003e\u003c/a\u003e\n\u003ca href=\"https://www.diagrams.net/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/1769238?s=64\u0026v=4\"\u003e\u003c/a\u003e\n\u003ca href=\"https://terrastruct.com/\"\u003e\u003cimg width=\"64\" height=\"64\" src=\"https://roughjs.com/images/sponsors/terrastruct.png\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/rough/organization/0/website\"\u003e\u003cimg src=\"https://opencollective.com/rough/organization/0/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/rough/organization/1/website\"\u003e\u003cimg src=\"https://opencollective.com/rough/organization/1/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/rough/organization/2/website\"\u003e\u003cimg src=\"https://opencollective.com/rough/organization/2/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/rough/organization/3/website\"\u003e\u003cimg src=\"https://opencollective.com/rough/organization/3/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/rough/organization/4/website\"\u003e\u003cimg src=\"https://opencollective.com/rough/organization/4/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/rough/organization/5/website\"\u003e\u003cimg src=\"https://opencollective.com/rough/organization/5/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/rough/organization/6/website\"\u003e\u003cimg src=\"https://opencollective.com/rough/organization/6/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/rough/organization/7/website\"\u003e\u003cimg src=\"https://opencollective.com/rough/organization/7/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/rough/organization/8/website\"\u003e\u003cimg src=\"https://opencollective.com/rough/organization/8/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/rough/organization/9/website\"\u003e\u003cimg src=\"https://opencollective.com/rough/organization/9/avatar.svg\"\u003e\u003c/a\u003e\n\n## License\n[MIT License](https://github.com/pshihn/rough/blob/master/LICENSE) (c) [Preet Shihn](https://twitter.com/preetster)\n","funding_links":["https://github.com/sponsors/pshihn","https://opencollective.com/rough","https://opencollective.com/rough/contribute","https://opencollective.com/rough/organization/0/website","https://opencollective.com/rough/organization/1/website","https://opencollective.com/rough/organization/2/website","https://opencollective.com/rough/organization/3/website","https://opencollective.com/rough/organization/4/website","https://opencollective.com/rough/organization/5/website","https://opencollective.com/rough/organization/6/website","https://opencollective.com/rough/organization/7/website","https://opencollective.com/rough/organization/8/website","https://opencollective.com/rough/organization/9/website"],"categories":["HTML","TypeScript","绘图","By Language","UI library","others","前端开发框架及项目","Render Styled","Repository","Svg/Canvas"],"sub_categories":["Web","其他_文本生成、文本对话","Canvas/SVG"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frough-stuff%2Frough","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frough-stuff%2Frough","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frough-stuff%2Frough/lists"}