Updating void draw() while another function is in a loop

You can place that for loop in a separate function which is called by thread(): :thread:
Processing.org/reference/thread_.html

You can update a global variable w/ the current index the for loop is currently processing. :globe_with_meridians:

And then, the draw() function can use that global variable to determine how big to draw the progress bar. :bar_chart:

2 Likes