Boolean Variables
3.4: Boolean Variables - p5.js Tutorial
Code from the Video
His code uses a test to see if the mouse is inside a rectangle.
Explains how to test whether the user is holding down the mouse.
Explains how to test two things before making something happen. In his example:
- is the mouse inside the rectangle?
- is the mouse being pressed?
Uses his own boolean variable to do a test in an If statement.
Uses a boolean variable to turn something on and off when mouse is clicked.
Code from the Video
His code uses a test to see if the mouse is inside a rectangle.
Explains how to test whether the user is holding down the mouse.
Explains how to test two things before making something happen. In his example:
- is the mouse inside the rectangle?
- is the mouse being pressed?
Uses his own boolean variable to do a test in an If statement.
Uses a boolean variable to turn something on and off when mouse is clicked.