Files
processing-projects/other/Old_Lines/Old_Lines.pyde
2019-11-28 12:29:23 -06:00

15 lines
288 B
Python

def setup():
size(500, 500)
arr = []
def draw():
global arr
print(len(arr))
buffersize = 100
arr.insert(0, (mouseX, mouseY))
if len(arr) > buffersize:
arr = arr[:buffersize]
oldx, oldy = (arr[-1])
line(oldx, oldy, mouseX, mouseY)