- UID
- 215
- 积分
- 15394
- 帖子
- 1163
- 主题
- 27
- 论坛币
- 428
- 威望
- 125
- EP值
- 1992
- MP值
- 26
- 阅读权限
- 100
- 注册时间
- 2011-10-13
- 在线时间
- 668 小时
- 最后登录
- 2018-6-25
|
- from tcaxPy import *
- def tcaxPy_Init():
- global _FontFileName # frame duration, in millisecond
- global _FD
- global _Fs
- global _Length
- global _Bd
- global _Br
- global _FaceID
- global _Font
- _FontFileName = GetVal(val_FontFileName)
- _FD = 1000 / GetVal(val_FXFPS)
- _Fs = GetVal(val_FontSize)
- _Length = GetVal(val_TextLength)
- _Bd = GetVal(val_Bord)
- _Br = GetVal(val_Blur)
- _FaceID = GetVal(val_FaceID)
- _Font = InitFont(_FontFileName, _FaceID, _Fs, GetVal(val_Spacing), GetVal(val_SpaceScale), DecRGB('CBDCFE'), 2, False)
- def fr(x):
- X = randint(-x,x)
- return frx(X)+fry(X)+frz(X)
- def PixPoints2(PIX):
- width = PIX[1][0]
- height = PIX[1][1]
- points = []
- for w in range(width):
- for h in range(height):
- idx = 4 * (h * width + w)
- pixA = PIX[2][idx + 3]
- if pixA != 0:
- points.append((w, h))
- return points
- def tcaxPy_Main(_i, _j, _n, _BT, _ET, _SK, _KT, _X, _Y, _A, _TXT):
- global POS1
- ASS_BUF = [] # used for saving ASS FX line
- if _j == 0:
- POS1 = [_X , _Y]
- COLOR1 = ['FBF0DB','FFFFFF','CCCCCC']
- COLOR2 = ['9D81FA','FAA0FB','A794FF','8A44F2','CBDCFE']
- hana = ["m 17 32 b 16 36 12 39 11 39 b 9 38 5 39 3 36 b 1 34 3 27 4 27 b 7 25 11 26 13 23 b 10 23 6 21 4 17 b 5 14 5 10 5 6 b 8 5 11 9 13 7 b 13 7 13 7 13 7 b 16 10 18 12 18 14 b 18 10 19 7 21 4 b 24 4 26 3 29 3 b 31 6 32 8 34 11 b 32 14 31 17 29 20 b 32 18 36 18 40 18 b 42 20 42 24 45 26 b 42 27 41 32 38 33 b 35 34 32 33 29 30 b 30 34 33 37 32 40 b 31 42 31 44 30 46 b 26 47 22 45 19 43 b 18 40 17 36 17 32 "]
- if _i == 3:
- if _j < 6:
- for i in range(2):
- RAN1 = randint(40 , 100)
- RAN2 = randint(POS1[0]-40 , POS1[0]+_Length[_i]+40)
- ass_main(ASS_BUF,SubL(_BT+randint(-50,100),_ET+randint(-30,10)), an(5)+fad(300,400)+move(RAN2,_Y+randint(-40,-20),RAN2,_Y+randint(40,60))+bord(0)+blur(2)+color1(COLOR1[randint(0,2)])+fsc(RAN1,RAN1)+animation(frz(randint(-1080,-360))), "{\p1}" + hana[0] + "{\p0}")
- ass_main(ASS_BUF,SubL(_BT-40,_BT-5,4), an(5)+pos(_X,_Y)+fad(150,100)+color1("CBDCFE")+color3("FFFFFF")+bord(3)+blur(3)+be(5), _TXT)
- ass_main(ASS_BUF,SubL(_BT-40,_BT-5,4), an(5)+pos(_X,_Y)+fad(150,100)+color1("CBDCFE")+color3("FFFFFF")+bord(3)+blur(3)+be(5), _TXT)
- ass_main(ASS_BUF,SubL(_BT-40,_BT-5,4), an(5)+pos(_X,_Y)+fad(150,100)+color1("CBDCFE")+color3("FFFFFF")+bord(3)+blur(3)+be(5), _TXT)
- ass_main(ASS_BUF,SubL(_BT-5,_BT+_SK,4), an(5)+pos(_X,_Y)+color1("CBDCFE")+bord(0),_TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK,_BT+_SK+_KT,4), an(5)+pos(_X,_Y)+color1("361FF0")+blur(1)+bord(2)+color3(COLOR1[randint(0,2)])+be(3)+fsc(100,100)+animation(0,5 * _KT, fsc(120,120)+bord(3)+blur(4)+be(8))+animation(6 * _KT,10 * _KT, be(3)+fsc(100,100)+blur(1)+bord(2)), _TXT)
- else:
- for i in range(2):
- RAN1 = randint(40 , 100)
- RAN2 = randint(POS1[0]-40 , POS1[0]+_Length[_i]+40)
- ass_main(ASS_BUF,SubL(_BT+randint(-50,100),_ET+randint(-30,10)), an(5)+fad(300,400)+move(RAN2,_Y+randint(-40,-20),RAN2,_Y+randint(40,60))+bord(0)+blur(2)+color1(COLOR1[randint(0,2)])+fsc(RAN1,RAN1)+animation(frz(randint(-1080,-360))), "{\p1}" + hana[0] + "{\p0}")
- ass_main(ASS_BUF,SubL(_BT-40,_BT-5,4), an(5)+pos(_X,_Y)+fad(150,100)+color1("CBDCFE")+color3("FFFFFF")+bord(3)+blur(3)+be(5), _TXT)
- ass_main(ASS_BUF,SubL(_BT-40,_BT-5,4), an(5)+pos(_X,_Y)+fad(150,100)+color1("CBDCFE")+color3("FFFFFF")+bord(3)+blur(3)+be(5), _TXT)
- ass_main(ASS_BUF,SubL(_BT-40,_BT-5,4), an(5)+pos(_X,_Y)+fad(150,100)+color1("CBDCFE")+color3("FFFFFF")+bord(3)+blur(3)+be(5), _TXT)
- ass_main(ASS_BUF,SubL(_BT-5,_BT+_SK,4), an(5)+pos(_X,_Y)+color1("CBDCFE")+bord(0),_TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK,_BT+_SK+_KT,4), an(5)+pos(_X,_Y)+color1("117CFD")+blur(1)+bord(2)+color3(COLOR1[randint(0,2)])+be(3)+fsc(100,100)+animation(0,5 * _KT, fsc(120,120)+bord(3)+blur(4)+be(8))+animation(6 * _KT,10 * _KT, be(3)+fsc(100,100)+blur(1)+bord(2)), _TXT)
- if _i == 16 or _i == 29:
- if _j > 2:
- for i in range(2):
- RAN1 = randint(40 , 100)
- RAN2 = randint(POS1[0]-40 , POS1[0]+_Length[_i]+40)
- ass_main(ASS_BUF,SubL(_BT+randint(-50,100),_ET+randint(-30,10)), an(5)+fad(300,400)+move(RAN2,_Y+randint(-40,-20),RAN2,_Y+randint(40,60))+bord(0)+blur(2)+color1(COLOR1[randint(0,2)])+fsc(RAN1,RAN1)+animation(frz(randint(-1080,-360))), "{\p1}" + hana[0] + "{\p0}")
- ass_main(ASS_BUF,SubL(_BT-40,_BT-5,4), an(5)+pos(_X,_Y)+fad(150,100)+color1("CBDCFE")+color3("FFFFFF")+bord(3)+blur(3)+be(5), _TXT)
- ass_main(ASS_BUF,SubL(_BT-40,_BT-5,4), an(5)+pos(_X,_Y)+fad(150,100)+color1("CBDCFE")+color3("FFFFFF")+bord(3)+blur(3)+be(5), _TXT)
- ass_main(ASS_BUF,SubL(_BT-40,_BT-5,4), an(5)+pos(_X,_Y)+fad(150,100)+color1("CBDCFE")+color3("FFFFFF")+bord(3)+blur(3)+be(5), _TXT)
- ass_main(ASS_BUF,SubL(_BT-5,_BT+_SK,4), an(5)+pos(_X,_Y)+color1("CBDCFE")+bord(0),_TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK,_BT+_SK+_KT,4), an(5)+pos(_X,_Y)+color1("361FF0")+blur(1)+bord(2)+color3(COLOR1[randint(0,2)])+be(3)+fsc(100,100)+animation(0,5 * _KT, fsc(120,120)+bord(3)+blur(4)+be(8))+animation(6 * _KT,10 * _KT, be(3)+fsc(100,100)+blur(1)+bord(2)), _TXT)
- else:
- for i in range(2):
- RAN1 = randint(40 , 100)
- RAN2 = randint(POS1[0]-40 , POS1[0]+_Length[_i]+40)
- ass_main(ASS_BUF,SubL(_BT+randint(-50,100),_ET+randint(-30,10)), an(5)+fad(300,400)+move(RAN2,_Y+randint(-40,-20),RAN2,_Y+randint(40,60))+bord(0)+blur(2)+color1(COLOR1[randint(0,2)])+fsc(RAN1,RAN1)+animation(frz(randint(-1080,-360))), "{\p1}" + hana[0] + "{\p0}")
- ass_main(ASS_BUF,SubL(_BT-40,_BT-5,4), an(5)+pos(_X,_Y)+fad(150,100)+color1("CBDCFE")+color3("FFFFFF")+bord(3)+blur(3)+be(5), _TXT)
- ass_main(ASS_BUF,SubL(_BT-40,_BT-5,4), an(5)+pos(_X,_Y)+fad(150,100)+color1("CBDCFE")+color3("FFFFFF")+bord(3)+blur(3)+be(5), _TXT)
- ass_main(ASS_BUF,SubL(_BT-40,_BT-5,4), an(5)+pos(_X,_Y)+fad(150,100)+color1("CBDCFE")+color3("FFFFFF")+bord(3)+blur(3)+be(5), _TXT)
- ass_main(ASS_BUF,SubL(_BT-5,_BT+_SK,4), an(5)+pos(_X,_Y)+color1("CBDCFE")+bord(0),_TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK,_BT+_SK+_KT,4), an(5)+pos(_X,_Y)+color1("117CFD")+blur(1)+bord(2)+color3(COLOR1[randint(0,2)])+be(3)+fsc(100,100)+animation(0,5 * _KT, fsc(120,120)+bord(3)+blur(4)+be(8))+animation(6 * _KT,10 * _KT, be(3)+fsc(100,100)+blur(1)+bord(2)), _TXT)
- if _i == 37 or _i == 53:
- for i in range(4):
- RAN1 = randint(40 , 100)
- RAN2 = randint(POS1[0]-40 , POS1[0]+_Length[_i]+40)
- ass_main(ASS_BUF,SubL(_BT+randint(-50,100),_ET+randint(-30,10)), an(5)+fad(300,400)+move(RAN2,_Y+randint(20,40),RAN2,_Y+randint(-60,-40))+bord(0)+blur(2)+color1(COLOR2[randint(0,4)])+fsc(RAN1,RAN1)+animation(frz(randint(360,1080))), "{\p1}" + hana[0] + "{\p0}")
- ass_main(ASS_BUF,SubL(_BT-40,_BT-5,4), an(5)+pos(_X,_Y)+fad(150,100)+color1("CBDCFE")+color3("FFFFFF")+bord(3)+blur(3)+be(5), _TXT)
- ass_main(ASS_BUF,SubL(_BT-40,_BT-5,4), an(5)+pos(_X,_Y)+fad(150,100)+color1("CBDCFE")+color3("FFFFFF")+bord(3)+blur(3)+be(5), _TXT)
- ass_main(ASS_BUF,SubL(_BT-40,_BT-5,4), an(5)+pos(_X,_Y)+fad(150,100)+color1("CBDCFE")+color3("FFFFFF")+bord(3)+blur(3)+be(5), _TXT)
- ass_main(ASS_BUF,SubL(_BT-5,_BT+_SK,4), an(5)+pos(_X,_Y)+color1("CBDCFE")+bord(0),_TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK,_BT+_SK+_KT,4), an(5)+pos(_X,_Y)+color1("361FF0")+blur(1)+bord(2)+color3(COLOR2[randint(0,4)])+be(3)+fsc(100,100)+animation(0,5 * _KT, fsc(120,120)+bord(3)+blur(4)+be(8))+animation(6 * _KT,10 * _KT, be(3)+fsc(100,100)+blur(1)+bord(2)), _TXT)
- if _i == 20 or _i == 48:
- if _j < 6:
- for i in range(4):
- RAN1 = randint(40 , 100)
- RAN2 = randint(POS1[0]-40 , POS1[0]+_Length[_i]+40)
- ass_main(ASS_BUF,SubL(_BT+randint(-50,100),_ET+randint(-30,10)), an(5)+fad(300,400)+move(RAN2,_Y+randint(20,40),RAN2,_Y+randint(-60,-40))+bord(0)+blur(2)+color1(COLOR2[randint(0,4)])+fsc(RAN1,RAN1)+animation(frz(randint(360,1080))), "{\p1}" + hana[0] + "{\p0}")
- ass_main(ASS_BUF,SubL(_BT-40,_BT-5,4), an(5)+pos(_X,_Y)+fad(150,100)+color1("CBDCFE")+color3("FFFFFF")+bord(3)+blur(3)+be(5), _TXT)
- ass_main(ASS_BUF,SubL(_BT-40,_BT-5,4), an(5)+pos(_X,_Y)+fad(150,100)+color1("CBDCFE")+color3("FFFFFF")+bord(3)+blur(3)+be(5), _TXT)
- ass_main(ASS_BUF,SubL(_BT-40,_BT-5,4), an(5)+pos(_X,_Y)+fad(150,100)+color1("CBDCFE")+color3("FFFFFF")+bord(3)+blur(3)+be(5), _TXT)
- ass_main(ASS_BUF,SubL(_BT-5,_BT+_SK,4), an(5)+pos(_X,_Y)+color1("CBDCFE")+bord(0),_TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK,_BT+_SK+_KT,4), an(5)+pos(_X,_Y)+color1("361FF0")+blur(1)+bord(2)+color3(COLOR2[randint(0,4)])+be(3)+fsc(100,100)+animation(0,5 * _KT, fsc(120,120)+bord(3)+blur(4)+be(8))+animation(6 * _KT,10 * _KT, be(3)+fsc(100,100)+blur(1)+bord(2)), _TXT)
- else:
- for i in range(4):
- RAN1 = randint(40 , 100)
- RAN2 = randint(POS1[0]-40 , POS1[0]+_Length[_i]+40)
- ass_main(ASS_BUF,SubL(_BT+randint(-50,100),_ET+randint(-30,10)), an(5)+fad(300,400)+move(RAN2,_Y+randint(20,40),RAN2,_Y+randint(-60,-40))+bord(0)+blur(2)+color1(COLOR2[randint(0,4)])+fsc(RAN1,RAN1)+animation(frz(randint(360,1080))), "{\p1}" + hana[0] + "{\p0}")
- ass_main(ASS_BUF,SubL(_BT-40,_BT-5,4), an(5)+pos(_X,_Y)+fad(150,100)+color1("CBDCFE")+color3("FFFFFF")+bord(3)+blur(3)+be(5), _TXT)
- ass_main(ASS_BUF,SubL(_BT-40,_BT-5,4), an(5)+pos(_X,_Y)+fad(150,100)+color1("CBDCFE")+color3("FFFFFF")+bord(3)+blur(3)+be(5), _TXT)
- ass_main(ASS_BUF,SubL(_BT-40,_BT-5,4), an(5)+pos(_X,_Y)+fad(150,100)+color1("CBDCFE")+color3("FFFFFF")+bord(3)+blur(3)+be(5), _TXT)
- ass_main(ASS_BUF,SubL(_BT-5,_BT+_SK,4), an(5)+pos(_X,_Y)+color1("CBDCFE")+bord(0),_TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK,_BT+_SK+_KT,4), an(5)+pos(_X,_Y)+color1("117CFD")+blur(1)+bord(2)+color3(COLOR2[randint(0,4)])+be(3)+fsc(100,100)+animation(0,5 * _KT, fsc(120,120)+bord(3)+blur(4)+be(8))+animation(6 * _KT,10 * _KT, be(3)+fsc(100,100)+blur(1)+bord(2)), _TXT)
-
- ############以上是挑出来染色的部分,和下面的部分无区别,复制黏贴而已#########
-
-
- if _i < 3 or (_i > 3 and _i < 16) or (_i > 24 and _i < 29) :
- for i in range(2):
- RAN1 = randint(40 , 100)
- RAN2 = randint(POS1[0]-40 , POS1[0]+_Length[_i]+40)
- ass_main(ASS_BUF,SubL(_BT+randint(-50,100),_ET+randint(-30,10)), an(5)+fad(300,400)+move(RAN2,_Y+randint(-40,-20),RAN2,_Y+randint(40,60))+bord(0)+blur(2)+color1(COLOR1[randint(0,2)])+fsc(RAN1,RAN1)+animation(frz(randint(-1080,-360))), "{\p1}" + hana[0] + "{\p0}")
- ass_main(ASS_BUF,SubL(_BT-40,_BT-5,4), an(5)+pos(_X,_Y)+fad(150,100)+color1("CBDCFE")+color3("FFFFFF")+bord(3)+blur(3)+be(5), _TXT)
- ass_main(ASS_BUF,SubL(_BT-40,_BT-5,4), an(5)+pos(_X,_Y)+fad(150,100)+color1("CBDCFE")+color3("FFFFFF")+bord(3)+blur(3)+be(5), _TXT)
- ass_main(ASS_BUF,SubL(_BT-40,_BT-5,4), an(5)+pos(_X,_Y)+fad(150,100)+color1("CBDCFE")+color3("FFFFFF")+bord(3)+blur(3)+be(5), _TXT)
- ass_main(ASS_BUF,SubL(_BT-5,_BT+_SK,4), an(5)+pos(_X,_Y)+color1("CBDCFE")+bord(0),_TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK,_BT+_SK+_KT,4), an(5)+pos(_X,_Y)+color1("117CFD")+blur(1)+bord(2)+color3(COLOR1[randint(0,2)])+be(3)+fsc(100,100)+animation(0,5 * _KT, fsc(120,120)+bord(3)+blur(4)+be(8))+animation(6 * _KT,10 * _KT, be(3)+fsc(100,100)+blur(1)+bord(2)), _TXT)
- if (_i > 16 and _i < 20) or (_i > 20 and _i < 25) or (_i > 29 and _i < 37) or (_i > 37 and _i < 48) or (_i > 48 and _i < 53):
- for i in range(4):
- RAN1 = randint(40 , 100)
- RAN2 = randint(POS1[0]-40 , POS1[0]+_Length[_i]+40)
- ass_main(ASS_BUF,SubL(_BT+randint(-50,100),_ET+randint(-30,10)), an(5)+fad(300,400)+move(RAN2,_Y+randint(20,40),RAN2,_Y+randint(-60,-40))+bord(0)+blur(2)+color1(COLOR2[randint(0,4)])+fsc(RAN1,RAN1)+animation(frz(randint(360,1080))), "{\p1}" + hana[0] + "{\p0}")
- ass_main(ASS_BUF,SubL(_BT-40,_BT-5,4), an(5)+pos(_X,_Y)+fad(150,100)+color1("CBDCFE")+color3("FFFFFF")+bord(3)+blur(3)+be(5), _TXT)
- ass_main(ASS_BUF,SubL(_BT-40,_BT-5,4), an(5)+pos(_X,_Y)+fad(150,100)+color1("CBDCFE")+color3("FFFFFF")+bord(3)+blur(3)+be(5), _TXT)
- ass_main(ASS_BUF,SubL(_BT-40,_BT-5,4), an(5)+pos(_X,_Y)+fad(150,100)+color1("CBDCFE")+color3("FFFFFF")+bord(3)+blur(3)+be(5), _TXT)
- ass_main(ASS_BUF,SubL(_BT-5,_BT+_SK,4), an(5)+pos(_X,_Y)+color1("CBDCFE")+bord(0),_TXT)
- ass_main(ASS_BUF,SubL(_BT+_SK,_BT+_SK+_KT,4), an(5)+pos(_X,_Y)+color1("117CFD")+blur(1)+bord(2)+color3(COLOR2[randint(0,4)])+be(3)+fsc(100,100)+animation(0,5 * _KT, fsc(120,120)+bord(3)+blur(4)+be(8))+animation(6 * _KT,10 * _KT, be(3)+fsc(100,100)+blur(1)+bord(2)), _TXT)
- if _i < 11 or (_i > 33 and _i < 38):
- PIX = TextPix(_Font, _TXT)
- PIX = PixBlur(PIX, _Br)
- points = PixPoints2(PIX) # Get points from the PIX object.
- pt_num = len(points)
- dx = _X - int((_A + GetVal(val_Spacing)) / 2 + 0.5) + PIX[0][0]
- dy = _Y - int(_Fs / 2 + 0.5) + PIX[0][1]
- for e in range(pt_num):
- x1 = dx+points[e][0]
- y1 = dy+points[e][1]
- w = points[e][0]
- h = points[e][1]
- idx = 4 * (h * PIX[1][0] + w)
- PixA = PIX[2][idx + 3]
- t1 = 25 * (e / points[len(points) - 1][0])
- t2 = t1 + 500
- MOVE = move(x1,y1,x1,y1-40+randint(-20,20),t1,t2)
- ass_main(ASS_BUF,SubL(_BT+_SK+_KT,_BT+_SK+_KT+(t2 / 10),4,Pix_Style),MOVE+bord(1)+fsc(50,50)+fad(0,200)+be(2)+color1('117CFD')+color3('117CFD')+alpha(255 - PixA), PixPt())
- if (_i > 10 and _i < 34) or _i > 37:
- PIX = TextPix(_Font, _TXT)
- PIX = PixBlur(PIX, _Br)
- points = PixPoints2(PIX) # Get points from the PIX object.
- pt_num = len(points)
- dx = _X - int((_A + GetVal(val_Spacing)) / 2 + 0.5) + PIX[0][0]
- dy = _Y - int(_Fs / 2 + 0.5) + PIX[0][1]
- for e in range(pt_num):
- x1 = dx+points[e][0]
- y1 = dy+points[e][1]
- w = points[e][0]
- h = points[e][1]
- idx = 4 * (h * PIX[1][0] + w)
- PixA = PIX[2][idx + 3]
- CIR = Cir(pt_num, e, x1, y1, 25)
- t3 = 13 * AdvInt(sqrt((points[e][0]-sqrt(_A * _A + _Fs *_Fs) / 2 + 7) * (points[e][0]-sqrt(_A * _A + _Fs *_Fs) / 2 + 7) + (points[e][1]-sqrt(_A * _A + _Fs *_Fs) / 2 + 7) * (points[e][1]-sqrt(_A * _A + _Fs *_Fs) / 2 + 7))) % sqrt(_A * _A + _Fs *_Fs)
- t4 = t3 + 350
- MOVE = move(x1,y1,CIR[0], CIR[1],int(t3),int(t4))
- ass_main(ASS_BUF,SubL(_BT+_SK+_KT,_BT+_SK+_KT+(t4 / 10),4,Pix_Style),MOVE+bord(1)+fsc(50,50)+fad(0,200)+be(2)+color1('117CFD')+color3('117CFD')+alpha(255 - PixA), PixPt())
-
-
-
- return (ASS_BUF,None)
- def Cir(n, i, a, b, r): # 圆函数
- theta = i * 2 * pi / n
- x = AdvInt(r * cos(theta)) + a
- y = AdvInt(r * sin(theta)) + b
- return [x, y]
复制代码 总算解决了粒子的问题,模仿了艾大的粒子效果,多谢M大帮俺解决各种问题。总算填了个坑,至于预览=。=最近几天过了再弄吧。。。 |
-
1
查看全部评分
-
|