Currently, doing animations which clear the screen every frame would lead to excessive tearing, as the browser redraws before the frame is finished.
Example:
Note that the old one looks even worse on a real screen than in the gif, since it flickers faster than my screen recorder can capture.
Some more examples that might be useful to test this PR:
; - Old and new are the same in those four examples
forever [ setpos mousepos ]
forever [ clearscreen setpos mousepos ]
forever [ setpos mousepos wait 1 ]
forever [ clearscreen setpos mousepos wait 1 ]
; - New one is much faster than the old one, but experiences hiccups from time to time
fern 25 1
tree 150
; - New one finishes in around 4 seconds, but does not block the UI from responding
clearscreen
repeat 3600 [ randomcolor square random 200 rt 1 ] ; Mind the 3600
Currently, doing animations which clear the screen every frame would lead to excessive tearing, as the browser redraws before the frame is finished. Example:
Note that the old one looks even worse on a real screen than in the gif, since it flickers faster than my screen recorder can capture.
Some more examples that might be useful to test this PR: