{"id":26875959,"url":"https://github.com/boringdeveloper/p5js-to-svg","last_synced_at":"2026-02-06T22:33:07.684Z","repository":{"id":284771017,"uuid":"628349089","full_name":"boringdeveloper/p5js-to-svg","owner":"boringdeveloper","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-15T17:14:03.000Z","size":1,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-29T10:09:47.567Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boringdeveloper.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-04-15T17:07:10.000Z","updated_at":"2023-04-15T17:07:10.000Z","dependencies_parsed_at":"2025-03-27T15:55:58.189Z","dependency_job_id":"9080c2ba-baac-419b-92dd-d61491b63caa","html_url":"https://github.com/boringdeveloper/p5js-to-svg","commit_stats":null,"previous_names":["boringdeveloper/p5js-to-svg"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/boringdeveloper/p5js-to-svg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boringdeveloper%2Fp5js-to-svg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boringdeveloper%2Fp5js-to-svg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boringdeveloper%2Fp5js-to-svg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boringdeveloper%2Fp5js-to-svg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boringdeveloper","download_url":"https://codeload.github.com/boringdeveloper/p5js-to-svg/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boringdeveloper%2Fp5js-to-svg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29179420,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T22:12:24.066Z","status":"ssl_error","status_checked_at":"2026-02-06T22:12:09.859Z","response_time":59,"last_error":"SSL_read: 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":"2025-03-31T10:52:55.040Z","updated_at":"2026-02-06T22:33:07.631Z","avatar_url":"https://github.com/boringdeveloper.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# p5js-to-svg\n\nUse p5.js-svg library to convert the p5js element to svg. Add this in the `\u003chead\u003e\u003c/head\u003e` tag of your index.html\n\n```html\n\u003cscript src=\"https://unpkg.com/p5.js-svg@1.3.1\"\u003e\u003c/script\u003e\n```\n\nCreate a button to save the svg file.\n```html\n\u003cbutton type=\"button\" id=\"saveSvgbtn\" onclick=\"downloadSvg()\"\u003eSave SVG\u003c/button\u003e\n```\n\nIn your sketch.js file, add this function.\n```js\nfunction downloadSvg() {\n  noLoop();\n  \n  let svgElement = document.getElementsByTagName('svg')[0];\n  let svg = svgElement.outerHTML;\n  let file = new Blob([svg], { type: 'plain/text' });\n  let a = document.createElement(\"a\"), url = URL.createObjectURL(file);\n\n  a.href = url;\n  a.download = 'exported.svg';    \n  document.body.appendChild(a);\n  a.click();\n\n  setTimeout(function() \n  {\n      document.body.removeChild(a);\n      window.URL.revokeObjectURL(url);  \n  }, 0); \n}\n```\n\nIn the `createCanvas()` function, add the `SVG` parameter.\n```js\ncreateCanvas(1080, 1080, SVG);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboringdeveloper%2Fp5js-to-svg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboringdeveloper%2Fp5js-to-svg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboringdeveloper%2Fp5js-to-svg/lists"}