Skip to content

Instantly share code, notes, and snippets.

@stenson
Last active April 9, 2022 13:45
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stenson/1c545b46c22bb7e3c96c552d408b351e to your computer and use it in GitHub Desktop.
Save stenson/1c545b46c22bb7e3c96c552d408b351e to your computer and use it in GitHub Desktop.
playing with plakato and image feedback
from coldtype import *
from coldtype.fx.skia import phototype, luma, precompose, fill
from coldtype.warping import warp
fnt = Font.Find("PlakatoPlay.*I")
rs = random_series(0, 1000)
txt = "VERY\nVARI-\nABLE"
@animation((1080, 1080), tl=Timeline(60, 24), bg=0, render_bg=1, composites=1)
def plak2(f):
return (Glyphwise(txt, lambda g:
Style(fnt, 330, ro=1
, ANIM=(fe:=f.adj(-g.i*5).e("l", 0, r=(0, 3)))
, BNIM=fe-1.5))
.lead(50)
.align(f.a.r, th=0)
.fssw(-1, 1, 7)
.understroke(sw=20)
.ch(warp(-1, rs[f.i//3+30], mult=10))
.insert(0, f.last_render(lambda p: p.scale(0.99)))
.ch(phototype(f.a.r, 3, cut=125, cutw=30, fill=1)))
# Uncomment decorator below after rendering
# the @animation above twice in a row
# (for full recursion)
#@animation((1080, 1080), tl=plak2.t, bg=hsl(0.7, 0.9, 0.3), render_bg=1, solo=1)
def recolor(f):
return (plak2.frame_img(f.i)
.ch(luma(f.a.r))
.ch(precompose(f.a.r))
.ch(fill(hsl(0.9, 1, 0.7))))
try: release = recolor.export("h264", loops=4)
except AttributeError: pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment