Name

loop()

Examples
x = 0

def setup():
    size(200, 200)
    noLoop()  # draw() will not loop

def draw():
    background(204)
    global x
    x = x + .1
    if x > width:
        x = 0

    line(x, 0, x, height)

def mousePressed():
    loop()  # Holding down the mouse activates looping

def mouseReleased():
    noLoop()  # Releasing the mouse stops looping draw()

THIS EXAMPLE IS BROKEN

Description
Syntax
Related noLoop()
redraw()
draw()
Updated on Wed Jan 18 17:32:21 2017.
Creative Commons License