Skip to content

Instantly share code, notes, and snippets.

@stenson
Created January 12, 2022 23:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stenson/3d98674d1b04a42addbc880a8df247be to your computer and use it in GitHub Desktop.
Save stenson/3d98674d1b04a42addbc880a8df247be to your computer and use it in GitHub Desktop.
from coldtype import *
chars = "ABCDEFGHIJKLMNOPQRSTUVWXY&Z"
lines = ["", " ", " "]
for idx, c in enumerate(chars):
lines[idx%3] = lines[idx%3] + c + " "
at = AsciiTimeline(5, 18, f"""
<
{lines[0]}
{lines[1]}
{lines[2]}
""").shift("end", 5)
fnt = Font.Find("Plakato.*Draw")
rs = random_series(-250, 250, 0)
rs2 = random_series(-250, 250, 1)
rs3 = random_series(0, 1, 2)
@animation(timeline=at, bg=1, render_bg=1)
def animall(f):
out = PS()
for x in [0, 1, 2]:
curr = f.t.current(x)
if curr:
out.append(StSt(curr.name
, fnt
, fontSize=250
, ANIM=curr.e("eeio", 1)
)
.align(f.a.r, th=0)
.f(hsl(x/3, 0.8, 0.6))
.translate(rs[curr.idx], rs2[curr.idx])
.blendmode(BlendMode.Cycle(13)))
return out
@stenson
Copy link
Author

stenson commented Jan 12, 2022

(to see the AsciiTimeline view in the viewer, hit the V key while the viewer is focused)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment