Skip to content

Commit

Permalink
fixed example
Browse files Browse the repository at this point in the history
  • Loading branch information
diyaayay committed Dec 9, 2024
1 parent 79d66c1 commit 4a8b81d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/events/pointer.js
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ function pointer(p5, fn){
* <div>
* <code>
* function setup() {
* createCanvas(400, 400);
* createCanvas(200, 200);
*
* describe(
* 'A gray square with black text at its center. The text changes from 0 to either "left" or "right" when the user clicks a mouse button.'
Expand All @@ -728,7 +728,9 @@ function pointer(p5, fn){
* textSize(16);
*
* // Display the mouse button.
* text(JSON.stringify(mouseButton), 50, 50);
* text(`Left: ${mouseButton.left}`, width / 2, height / 2 - 20);
* text(`Right: ${mouseButton.right}`, width / 2, height / 2);
* text(`Center: ${mouseButton.center}`, width / 2, height / 2 + 20);
* }
* </code>
* </div>
Expand Down

0 comments on commit 4a8b81d

Please sign in to comment.