Skip to content

Instantly share code, notes, and snippets.

@stenson
Created December 27, 2022 18:35
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/7a08a7f63fa285f8971eabfcea270ae8 to your computer and use it in GitHub Desktop.
Save stenson/7a08a7f63fa285f8971eabfcea270ae8 to your computer and use it in GitHub Desktop.
from coldtype import *
from coldtype.fx.skia import phototype
rs = random_series(-(r:=30), r, seed=0)
@animation((1080, 1080), bg=0, tl=120)
def slicer(f):
s = Scaffold(f.a.r.inset(-500, 0))
s.grid(41, 1)
txt = (StSt("Cold\ntype!", "KASS 0.2 Italic", f.e(r=(50, 440)), wght=1, leading=50)
.xalign(f.a.r)
.align(f.a.r, ty=1)
.pen()
.removeOverlap())
skew = 0.35
return (P().enumerate(s, lambda x:
P(x.el.rect.inset(2))
.skew(skew, 0, pt=(0, 0))
.intersection(txt)
.translate(rs[x.i]*skew, rs[x.i])
.f(1)
.ch(phototype(f.a.r, 1.5, 180, 35))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment