diff --git a/2020/sketch_2020_04_07a/sketch_2020_04_07a.pyde b/2020/sketch_2020_04_07a/sketch_2020_04_07a.pyde index 74d8e166..521900a1 100644 --- a/2020/sketch_2020_04_07a/sketch_2020_04_07a.pyde +++ b/2020/sketch_2020_04_07a/sketch_2020_04_07a.pyde @@ -1,3 +1,7 @@ +# inspired by https://twitter.com/beesandbombs/status/1247567578802855938?s=20 +add_library('GifAnimation') +from gif_animation_helper import gif_export + s_size = 100 COLORS = [color(200, 255, 0), color(200, 0, 0), @@ -28,6 +32,13 @@ def draw(): stroke(cor) x, y = lerp_sequence(origin[i], target[i], t) square(x, y, s_size) + + if frameCount < 1080: + if frameCount % 2: + gif_export(GifMaker, "animation") + else: + gif_export(GifMaker, "animation", finish=True) + if frameCount % 360 == 0: init()