- UID
- 3
- 积分
- 8169
- 帖子
- 259
- 主题
- 68
- 论坛币
- 5016
- 威望
- 54
- EP值
- 2533
- MP值
- 20
- 阅读权限
- 200
- 注册时间
- 2011-8-3
- 在线时间
- 1097 小时
- 最后登录
- 2022-10-8
|
預覽:http://pan.baidu.com/s/1hqqY9CC#dir/path=%2FSaiyakuFX_Preview- from tcaxPy import *
- from util.tcCurve import *
- from extLibs.XXParticleSystem import *
- def tcaxPy_Init():
- global _FontFileName
- global _FaceID
- global _Fs
- global _Height
- global Font
- _FontFileName = GetVal(val_FontFileName)
- _FaceID = GetVal(val_FaceID)
- _Fs = GetVal(val_FontSize)
- _Height = GetVal(val_TextHeight)
- Font = InitFont(_FontFileName, _FaceID, _Fs, GetVal(val_Spacing), GetVal(val_SpaceScale), 0xFFFFFF, 0, 0)
- def tcaxPy_Main(_i, _j, _n, _BT, _ET, _SK, _KT, _X, _Y, _A, _TXT):
- ASS_BUF = []
- TCS_BUF = []
- t2 = _BT + _SK
- t3 = _BT + _SK + _KT
- if IsLineChanged(_i):
- global textpath
- textpath = []
- textpath.append([t2, XXPoint(x = _X, y = _Y, start = t2 / 100, end = t3 / 100)])
- dx = _X - int(_A / 2 + 0.5)
- dy = _Y - int(_Fs / 2 + 0.5)
- if _i > 5:
- ass_main(ASS_BUF, SubL(t2-5,_BT+_SK+_KT,200), pos(_X , _Y ) + alpha1(255) + alpha3(50) + color3('FFFFFF')+shad(1.5) + bord(2) + blur(2) +t(0,10,fsc(135,135)) +t(120,_KT*10,fsc(100,100)),_TXT)
- else :
- ass_main(ASS_BUF, SubL(t2-5,_BT+_SK+_KT,200), pos(_X , _Y ) + alpha1(255) + alpha3(50) + color4('FFFFFF') + color3('000000')+shad(1.5)+ bord(2) + blur(2) +t(0,10,fsc(135,135)) +t(120,_KT*10,fsc(100,100)),_TXT)
- ass_main(ASS_BUF, SubL(_BT+5*_j, t2-3,180), pos(_X, _Y)+fad(100,20) , _TXT)
- ass_main(ASS_BUF, SubL(_BT+_SK+_KT-3,_ET+5*_j,180), pos(_X, _Y)+fad(20,100) , _TXT)
- if _i <= 3:
- for q in range(3):
- posX = _X+randint(-_A,-_A/2)
- nposX =_X+randint(-_A/2,_A)
- PP = [(posX, _Y),(posX, _Y),(posX, _Y+0.000001),(_X+randint(-_A*1.5,_A*1.5), _Y+randint(-50,50)), (_X+randint(-_A*1.5,_A*1.5), _Y+randint(-50,50)),(nposX ,_Y),(nposX ,_Y),(nposX ,_Y+0.000001)]
- ucb = UCBSpline(PP)
- L = ucb.length()
-
- STEP_N = _KT
-
- step_size = 1 / STEP_N
- POS = []
-
- for u in range(STEP_N):
-
- POS.append(ucb(u * step_size))
- if _i == 2 or _i == 3:
- ptcol = '532BFF'
- elif _i > 5:
- ptcol = '00A8FF'
- else:
- ptcol = 'EC3667'
- for w in range(_KT):
- s = RandPolygon(12/8, 12/8, 4)
- ass_main(ASS_BUF, SubL(_BT+_SK-20+w*1, _BT+_SK-20+70+(w+1)*1,151), an(5)+bord(0)+t(fry(720))+color3(ptcol)+bord(1.8)+shad(0)+blur(2)+ mov(POS[w][0], POS[w][1],POS[w][0]+randint(-10,10), POS[w][1]+randint(-10,10)) +fad(50,200), s )
- n = 90
- if _j==_n-1 and _i >3:
- num = len(textpath) - 1
- for i in range(num):
- if textpath[i][1].end < textpath[i + 1][1].start:
- textpath[i][1].end = textpath[i + 1][1].start
- textpath[num][1].end = _ET
- emitterList = []
- for pair in textpath:
- emitterList.append(XXPoint(start = pair[1].start,
- end = pair[1].end,
- x = pair[1].x + RandomDouble(-20, 20),
- y = pair[1].y + RandomDouble(-20, 20)))
- forceCurve = CompositeCurve(minTime = _BT / 100, maxTime = _ET / 100 + 10)
- lastag = 0
- time = forceCurve.minTime
- maxTime = forceCurve.maxTime
- while time <= maxTime:
- ag = RandomDouble(0, math.pi * 2)
- while abs(ag - lastag) < math.pi * 0.5 or abs(ag - lastag) > math.pi * 1.5:
- ag = RandomDouble(0, math.pi * 2)
- lastag = ag
- x = 1500 * math.cos(ag)
- y = 800 * math.sin(ag)
- forceCurve.AddCurve(time, time + 0.7, Line(x0 = x, y0 = y, x1 = 0, y1 = 0, acc = 0.7))
- time += 0.7
- emitter = XXEmitter(n, emitterList)
- forceField = XXForceField(forceCurve)
- gravityPosition = XXGravityPosition()
- xxps = XXParticleSystem(emitter = emitter,
- forceField = forceField,
- startTime = _BT / 100,
- endTime = _ET / 100,
- interpolationPrecision = 0.03,
- resistance = 0.04,
- repulsion = -3600,
- gravity = 0,
- gravityPosition = gravityPosition)
- result = xxps.RenderT()
- for pKey in result:
- s = RandPolygon(12/8, 12/8, 4)
- ptstr = "{\\p1}m 0 0 l 1 0 1 1 0 1"
- if _i == 2 or _i == 3:
- ptcol = '532BFF'
- elif _i > 5:
- ptcol = '00A8FF'
- else:
- ptcol = 'EC3667'
- pValue = result[pKey]
- ass_main(ASS_BUF, SubL(100 * pKey.born, 100 * (pKey.born + pKey.life), 25, Pix_Style), '', \
- '{' + pos(-100, -100) + pValue[1] + '}' + ptstr + "\\N{\\r" + \
- pValue[0] + '}' + ptstr + '{\\r' + alpha1(34) + alpha3(119) + blur(2) + bord(1.8) + color1("FFFFFF")+color3(ptcol) + '}' + s)
- return (ASS_BUF, TCS_BUF)
- def tcaxPy_Fin():
- FinFont(Font)
复制代码 |
-
1
查看全部评分
-
|