Animation: Difference between revisions

m
→‎{{header|Processing Python mode}}: dir is a built-in, renamed variable
m (→‎{{header|Processing Python mode}}: dir is a built-in, renamed variable)
Line 2,088:
 
<lang python>txt = "Hello, world! "
dirleft = True
 
def draw():
Line 2,095:
text(txt, 10, height / 2)
if frameCount % 10 == 0:
if (dirleft):
txt = rotate(txt, 1)
else:
Line 2,102:
 
def mouseReleased():
global dirleft
dirleft = not dirleft
 
def rotate(text, startIdx):
Anonymous user