Created
April 21, 2018 01:07
-
-
Save Ad115/4fa8df8f40f331bcd85c49d67655f192 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import everything in the p5.py library | |
from p5 import * | |
def draw(): | |
# On each frame... | |
if mouse_is_pressed: | |
fill(100) # Fill color gray | |
else: | |
fill(255) # Fill color white | |
# Draw a circle of radius 100 | |
# at the position of the mouse | |
circle((mouse_x, mouse_y), 100) | |
# --- | |
# Run the sketch | |
run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment