import manimlib as mnm
class Manimala(mnm.Scene):
def construct(self):
lis_text = []
for j in range(4):
for i in range(3):
s = i+1 # ค่า size
fs = (j+1)*12 # ค่า font_size
text = mnm.Text(f'{s},{fs}',size=s,font_size=fs)
lis_text.append(text)
vg = mnm.VGroup(*lis_text,buff=0)
vg.arrange_in_grid(n_cols=3)
self.play(
mnm.Write(vg),
run_time=1.5
)
import manimlib as mnm
class Manimala(mnm.Scene):
def construct(self):
lis_text = []
for i in range(9):
h = (2+i)/5 # ความสูง
text = mnm.Text(f'{h}',height=h)
lis_text.append(text)
vg = mnm.VGroup(*lis_text,buff=0)
vg.arrange_in_grid(n_cols=3)
self.play(
mnm.Write(vg),
run_time=1.5
)
import manimlib as mnm
class Manimala(mnm.Scene):
def construct(self):
ss = ['ค','คี','คู','คี่','คู่']
vg = mnm.VGroup(*[mnm.Text(s,height=3.5,color='#aaffdd') for s in ss])
vg.arrange(mnm.RIGHT)
self.play(
mnm.FadeIn(vg),
run_time=1
)
import manimlib as mnm
class Manimala(mnm.Scene):
def construct(self):
text = mnm.Text('ก'*12,gradient=['#dfb9de','#445ba4'])
self.play(
text.animate.set_height(1),
run_time=1
)
import manimlib as mnm
class Manimala(mnm.Scene):
def construct(self):
text = mnm.Text('มกร',color='#bfffb6',stroke_width=6,fill_color='#2e2c8b')
self.play(
text.animate.set_height(5),
run_time=1
)
import manimlib as mnm
class Manimala(mnm.Scene):
def construct(self):
abc = 'กขคงจabcde'
text1 = mnm.Text(abc,font='Tahoma',size=3)
text2 = mnm.Text(abc,font='Courier',size=3)
text3 = mnm.Text(abc,size=3)
vg = mnm.VGroup(text1,text2,text3)
vg.arrange(mnm.DOWN)
self.play(
mnm.FadeIn(vg),
run_time=0.5
)
self.wait(0.5)
import manimlib as mnm
class Manimala(mnm.Scene):
def construct(self):
text1 = mnm.Text('ไม่เอียงไม่หนา',font='Tahoma')
text2 = mnm.Text('ไม่เอียงแต่หนา',weight='BOLD',font='Tahoma')
text3 = mnm.Text('เอียงแต่ไม่หนา',slant='ITALIC',font='Tahoma')
text4 = mnm.Text('ทั้งเอียงทั้งหนา',slant='ITALIC',weight='BOLD',font='Tahoma')
vg = mnm.VGroup(text1,text2,text3,text4)
vg.arrange(mnm.DOWN)
vg.set_height(7)
self.play(
vg.animate.set_color('#63e9ce'),
run_time=1
)
import manimlib as mnm
class Manimala(mnm.Scene):
def construct(self):
text = mnm.Text('ฉันเป็นศิษย์\n\nจอมปราชญ์\n\nจริงๆนะ',
font='Tahoma',
t2c={"น":'#ffaaaa',"ปราชญ์":'#aaaaff'})
self.play(
text.animate.set_height(7),
run_time=1
)
import manimlib as mnm
class Manimala(mnm.Scene):
def construct(self):
t2c = {'เกิดใหม่':'#c163e9','สไลม์':'#63c5e9'}
text = mnm.Text('เกิดใหม่ทั้งที\n\nก็เป็นสไลม์ไปซะแล้ว',font='Tahoma')
text.set_width(12)
self.play(
text.animate.set_color_by_t2c(t2c),
run_time=1
)
import manimlib as mnm
class Manimala(mnm.Scene):
def construct(self):
text = mnm.Text('การล้างแค้นของ\n\nผู้กล้าโล่ผงาด',font='Tahoma')
text.set_width(12)
self.add(text)
self.play(
text[3:7].animate.set_color('#63d8e9'),
text[-4:].animate.set_color('#e9d863'),
run_time=1
)
import manimlib as mnm
class Manimala(mnm.Scene):
def construct(self):
t2g = {"ข้องใจเหรอ":['#ff9ad5','#a4ff9a']}
text = mnm.Text('ผู้กล้าโล่ผงาดแล้วไง\n\nข้องใจเหรอครับ?',font='Tahoma')
text.set_width(13)
self.play(
text.animate.set_color_by_t2g(t2g),
run_time=0.7
)
self.wait(0.3)
ติดตามอัปเดตของบล็อกได้ที่แฟนเพจ