{"repo":"Lartu/p5.clickable","free":true,"listed":false,"github":"https://github.com/Lartu/p5.clickable","clone":"git clone https://github.com/Lartu/p5.clickable.git","description":"Easy-to-use button library for P5.js 👆🐰","language":"JavaScript","stars":119,"topics":["p5js","p5","button","library","gui","ui","ui-components","p5-library","p5xjs"],"license":"MIT","category":"ui-components","readme_excerpt":"[!NOTE] Beware that p5.clickable has been migrated to support p5.js 2.x, and part of its API has changed compared to the p5.js 1.x version. Welcome! This is p5.clickable , a p5.js 2.x library that lets you create immediate-mode buttons . With p5.clickable , you can create buttons and define what happens when the user presses , holds , or releases them, as well as when the cursor enters , hovers over , or leaves them. :telescope: Preview Integrating p5.clickable buttons into your project is super easy: That's it! :microscope: Documentation Including the p5.clickable Library To include the p5.clickable library in your p5.js project, copy the p5.clickable.js file into your project directory and then add the line to the HTML file that includes your p5.js script, after the line that imports the p5 library but before any of your own code or the line that imports your own code. Creating a Clickable p5.clickable provides Clickable objects that act as buttons (a Clickable is simply an interactable area, and it's invisible!). To create a button, just call the createClickable() function, like this: By default, Clickables are located at (0, 0) and have a size of (100, 100) . Keep in mind that p5.clickable does not define what your buttons look like ; it simply implements interactable areas that detect presses, hovers, and similar interactions. These areas are invisible! To style your buttons, draw them yourself in the same spots where your Clickables are located! Moving a Clickable To mo","default_branch":null,"files":null,"tree":[],"storefront":"/r/Lartu","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Lartu/p5.clickable/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}