Skip to content

Added this.rectMode support#29

Closed
sahej-dev wants to merge 3 commits into
Lartu:masterfrom
sahej-dev:master
Closed

Added this.rectMode support#29
sahej-dev wants to merge 3 commits into
Lartu:masterfrom
sahej-dev:master

Conversation

@sahej-dev

Copy link
Copy Markdown

I have added support for all P5 rectModes. All the following are valid:

myButton = new Clickable();
myButton.rectMode = CORNER; // Default
myButton.rectMode = CORNERS;
myButton.rectMode = CENTER;
myButton.rectMode = RADIUS;
  • Click area, button rect, image, and text scaling should be working, as expected with all the rectModes.
  • Changing rectMode by doing (for e.g. rectMode(CENTER) should no longer affect clickables. myButton.rectMode = CENTER must be used.
  • I have also update the minified version with the latest version of the library.

I have tried not to change up the existing structure of the library too much. Please let me know if I should make any further improvements/changes to this PR.

@Lartu

Lartu commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Hi there! I’m back! Thank you so much for your pull request. That said, I’m going to close it because I’ve changed the API while updating the library to p5.js 2.x, and p5.clickable no longer manages how clickables look, only their interactions. Thank you very much for your contribution!

@Lartu Lartu closed this Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants