Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,21 @@
|
|||
txt = "Hello, world! "
|
||||
left = True
|
||||
|
||||
def draw():
|
||||
global txt
|
||||
background(128)
|
||||
text(txt, 10, height / 2)
|
||||
if frameCount % 10 == 0:
|
||||
if (left):
|
||||
txt = rotate(txt, 1)
|
||||
else:
|
||||
txt = rotate(txt, -1)
|
||||
println(txt)
|
||||
|
||||
def mouseReleased():
|
||||
global left
|
||||
left = not left
|
||||
|
||||
def rotate(text, startIdx):
|
||||
rotated = text[startIdx:] + text[:startIdx]
|
||||
return rotated
|
||||
Loading…
Add table
Add a link
Reference in a new issue