Skip to content

Instantly share code, notes, and snippets.

@Ad115
Created April 21, 2018 01:07
Show Gist options
  • Save Ad115/4fa8df8f40f331bcd85c49d67655f192 to your computer and use it in GitHub Desktop.
Save Ad115/4fa8df8f40f331bcd85c49d67655f192 to your computer and use it in GitHub Desktop.
# 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