Created
December 29, 2021 02:41
-
-
Save stenson/95626751fa4d80f54ded744e35674923 to your computer and use it in GitHub Desktop.
plakato draw variating in 3d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from coldtype import * | |
from coldtype.blender import * | |
keyframes = dict() | |
for x in range(0, 4): | |
keyframes[f"{x}0"] = dict(ANIM=0) | |
keyframes[f"{x}1"] = dict(ANIM=1) | |
at = AsciiTimeline(2, 24, """ | |
< | |
00 01 01 00 | |
10 11 11 10 | |
20 21 21 20 | |
30 31 31 30 30 31 31 30 | |
2 | |
""", keyframes=keyframes) | |
@b3d_animation(timeline=at, center=(0, 0), upright=0) | |
def newyear(f): | |
gs = f.a.r.inset(0, 0).grid(2, 2) | |
txt = "20\n21" | |
if f.i > f.t.ki("2").t[0].start: | |
txt = "20\n22" | |
return PS([ | |
(P(gs[0]).union(P(gs[3])) | |
.ch(b3d(lambda bp: bp | |
.extrude(1) | |
, material="blocks"))), | |
(Glyphwise(txt, lambda g: | |
Style("Plakato.*D", 575, **f.t.kf("seio", lines=[g.i+1]))) | |
.collapse() | |
.pmap(lambda i, p: p | |
.align(gs[i], th=0) | |
.t(0, 15) | |
#.ch(warp()) | |
.ch(b3d(lambda bp: bp | |
.extrude(0+f.t.kf("eeio", lines=[i+1])["ANIM"]*5) | |
.locate(z=1)))))]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment