File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- /*
1+ /**
22 * @name Constrain
3- * @description This example draws a circle as the mouse position but
3+ * @description This example draws a circle as the cursor's position but
44 * keeps the circle within a rectangle. It does so by passing the
55 * mouse's coordinates into the
66 * <a href="https://p5js.org/reference/#/p5/constrain" target="_blank">constrain()</a>
@@ -14,7 +14,7 @@ let radius = 24;
1414let edge = 100 ;
1515
1616// Distance between center of circle and edge of canvas
17- // when circle is at edge of rectangle
17+ // when circle is at edge of rectangle
1818let inner = edge + radius ;
1919
2020function setup ( ) {
@@ -28,7 +28,7 @@ function setup() {
2828 rectMode ( CORNERS ) ;
2929
3030 describe (
31- 'Pink rectangle on a grey background. A user uses their mouse to move a white circle within the pink rectangle.'
31+ 'Pink rectangle on a grey background. The cursor moves a white circle within the pink rectangle.'
3232 ) ;
3333}
3434
You can’t perform that action at this time.
0 commit comments