{"id":27883381,"url":"https://github.com/zsakowitz/p5-resources","last_synced_at":"2025-08-03T09:08:15.254Z","repository":{"id":152483299,"uuid":"406941453","full_name":"zsakowitz/p5-resources","owner":"zsakowitz","description":"A snippet and template pack for p5.js.","archived":false,"fork":false,"pushed_at":"2022-01-21T05:14:20.000Z","size":76,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-05T06:15:35.973Z","etag":null,"topics":["p5js","snippets","template","vscode"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=zsakowitz.p5-resources","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zsakowitz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"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}},"created_at":"2021-09-15T22:28:35.000Z","updated_at":"2024-05-02T08:58:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"b44db687-758e-4937-a647-796e95615f13","html_url":"https://github.com/zsakowitz/p5-resources","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zsakowitz/p5-resources","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zsakowitz%2Fp5-resources","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zsakowitz%2Fp5-resources/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zsakowitz%2Fp5-resources/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zsakowitz%2Fp5-resources/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zsakowitz","download_url":"https://codeload.github.com/zsakowitz/p5-resources/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zsakowitz%2Fp5-resources/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268519122,"owners_count":24263048,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["p5js","snippets","template","vscode"],"created_at":"2025-05-05T06:15:33.500Z","updated_at":"2025-08-03T09:08:15.235Z","avatar_url":"https://github.com/zsakowitz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"- [p5 Resources](#p5-resources)\n- [Commands](#commands)\n- [Snippets](#snippets)\n  - [setup (Universal)](#setup-universal)\n  - [draw (Universal)](#draw-universal)\n  - [preload (Universal)](#preload-universal)\n  - [mouseclicked (Universal)](#mouseclicked-universal)\n  - [doubleclicked (Universal)](#doubleclicked-universal)\n  - [mousemoved (Universal)](#mousemoved-universal)\n  - [mousedragged (Universal)](#mousedragged-universal)\n  - [mousepressed (Universal)](#mousepressed-universal)\n  - [mousereleased (Universal)](#mousereleased-universal)\n  - [comment (Universal)](#comment-universal)\n\n# p5 Resources\n\nThis extension adds some snippets and commands meant for use with p5es projects made with the [p5es project on Glitch](https://glitch.com/edit/#!/p5es) or the [p5es-empty project on Glitch](https://glitch.com/edit/#!/p5es-empty).\nIt also adds snippets and commands meant for use the p5ts projects made with the [p5ts project on Glitch](https://glitch.com/edit/#!/p5ts) or [its empty variant, p5ts-empty](https://glitch.com/edit/#!/p5ts-empty).\nFor your convenience, a command to open the p5js documentation in your browser is also added.\n\n# Commands\n\nThis extension adds two commands relating to templates. \"P5JS: Open a starter project\" opens either `p5es`, `p5ts`, `p5es-empty`, or `p5ts-empty` on Glitch, depending on a user choice.\n\"P5JS: Remix a starter project\" does the same, but remixes the project automatically if the user is logged in.\n\nIt also adds the \"P5JS: Open Documentation\" command which opens the p5js documentation. Depending on the \"P5: Documentation Location\" setting, it will open in VSCode or the browser.\n\n# Snippets\n\nThis extension also adds some snippets that can be used with p5.js projects created from `p5es`, `p5ts`, `p5es-empty`, or `p5ts-empty` on Glitch.\n\n## setup (Universal)\n\nJavaScript + TypeScript\n\n```javascript\n/** This function sets up our sketch. */\nexport function setup() {\n  createCanvas(500, 500);\n  frameRate(60);\n}\n```\n\n## draw (Universal)\n\nJavaScript + TypeScript\n\n```javascript\n/** This function redraws the sketch multiple times a second. */\nexport function draw() {\n\n}\n```\n\n## preload (Universal)\n\nJavaScript + TypeScript\n\n```javascript\n/** This function loads resources that will be used later. */\nexport function preload() {\n  \n}\n```\n\n## mouseclicked (Universal)\n\nJavaScript\n\n```javascript\n/**\n * This function is called when the mouse is clicked.\n * @param {MouseEvent} event - The `MouseEvent` that is passed as an argument.\n */\nexport function mouseClicked(event) {\n  \n}\n```\n\nTypeScript\n\n```typescript\n/**\n * This function is called when the mouse is clicked.\n * @param event - The `MouseEvent` that is passed as an argument.\n */\nexport function mouseClicked(event: MouseEvent) {\n  \n}\n```\n\n## doubleclicked (Universal)\n\nJavaScript\n\n```javascript\n/**\n * This function is called when the mouse is double-clicked.\n * @param {MouseEvent} event - The `MouseEvent` that is passed as an argument.\n */\nexport function doubleClicked(event) {\n  \n}\n```\n\nTypeScript\n\n```typescript\n/**\n * This function is called when the mouse is double-clicked.\n * @param event - The `MouseEvent` that is passed as an argument.\n */\nexport function doubleClicked(event: MouseEvent) {\n  \n}\n```\n\n## mousemoved (Universal)\n\nJavaScript\n\n```javascript\n/**\n * This function is called when the mouse is moved.\n * @param {MouseEvent} event - The `MouseEvent` that is passed as an argument.\n */\nexport function mouseMoved(event) {\n  \n}\n```\n\nTypeScript\n\n```typescript\n/**\n * This function is called when the mouse is moved.\n * @param event - The `MouseEvent` that is passed as an argument.\n */\nexport function mouseMoved(event: MouseEvent) {\n  \n}\n```\n\n## mousedragged (Universal)\n\nJavaScript\n\n```javascript\n/**\n * This function is called when the mouse is dragged.\n * @param {MouseEvent} event - The `MouseEvent` that is passed as an argument.\n */\nexport function mouseDragged(event) {\n  \n}\n```\n\nTypeScript\n\n```typescript\n/**\n * This function is called when the mouse is dragged.\n * @param event - The `MouseEvent` that is passed as an argument.\n */\nexport function mouseDragged(event: MouseEvent) {\n  \n}\n```\n\n## mousepressed (Universal)\n\nJavaScript\n\n```javascript\n/**\n * This function is called when the mouse is pressed.\n * @param {MouseEvent} event - The `MouseEvent` that is passed as an argument.\n */\nexport function mousePressed(event) {\n  \n}\n```\n\nTypeScript\n\n```typescript\n/**\n * This function is called when the mouse is pressed.\n * @param event - The `MouseEvent` that is passed as an argument.\n */\nexport function mousePressed(event: MouseEvent) {\n  \n}\n```\n\n## mousereleased (Universal)\n\nJavaScript\n\n```javascript\n/**\n * This function is called when the mouse is released.\n * @param {MouseEvent} event - The `MouseEvent` that is passed as an argument.\n */\nexport function mouseReleased(event) {\n  \n}\n```\n\nTypeScript\n\n```typescript\n/**\n * This function is called when the mouse is released.\n * @param event - The `MouseEvent` that is passed as an argument.\n */\nexport function mouseReleased(event: MouseEvent) {\n  \n}\n```\n\n## comment (Universal)\n\nJavaScript + TypeScript\n\n```javascript\n// comment goes here...\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzsakowitz%2Fp5-resources","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzsakowitz%2Fp5-resources","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzsakowitz%2Fp5-resources/lists"}