- UID
- 1462
- 积分
- 667
- 帖子
- 77
- 主题
- 13
- 论坛币
- 1091
- 威望
- 2
- EP值
- 447
- MP值
- 0
- 阅读权限
- 50
- 注册时间
- 2013-9-6
- 在线时间
- 141 小时
- 最后登录
- 2024-5-25
|
本帖最后由 Alex 于 2022-2-7 23:59 编辑
I just fixed the error but the pixels not moving in curve?
There's an issue with position!! move(165,39,-135665737821,-21123381180,348,930)
PP.zip
(171.21 KB, 下载次数: 2289)
- from tcaxPy import *
- from util.tcCurve import *
- def tcaxPy_Init():
- global _Fs
- global _FD
- global _Spacing
- global Font
- _Fs = GetVal(val_FontSize)
- _FD = 1000 / GetVal(val_FXFPS)
- _FontFileName = GetVal(val_FontFileName)
- _FaceID = GetVal(val_FaceID)
- _Spacing = GetVal(val_Spacing)
- Font = InitFont(_FontFileName, _FaceID, _Fs, _Spacing, GetVal(val_SpaceScale), MakeRGB(255, 255, 255), 0, False)
- def tcaxPy_Fin():
- FinFont(Font)
- def tcaxPy_Main(_i, _j, _n, _start, _end, _elapk, _k, _x, _y, _a, _txt):
- ASS_BUF = []
- TCAS_BUF = []
- dx = _x - int((_a + _Spacing) / 2 + 0.5)
- dy = _y - int(_Fs / 2 + 0.5)
-
- EFT = move(_x, _y,_x, _y) + fad(90, 0) + shad(0) + bord(0)
- ass_main(ASS_BUF, SubL(_start, _start+ _elapk, 3), EFT, _txt)
- PIX = TextPix(Font,_txt)
- points = PixPoints(PIX)
- pt_num = len(points)
- dx = _x - int((_a + _Spacing) / 2 + 0.5) + PIX[0][0]
- dy = _y - int(_Fs / 2 + 0.5) + PIX[0][1] + 1
- inix = dx - randint(15, 30)
- tab_posx = (inix + randint(-40, 40), inix + randint(-130, 130), inix + randint(-130, 130), inix + randint(-40, 40))
- tab_posy = (dy + _Fs + randint(-15, 20), _y + randint(-100, 100), _y + randint(-110, 110), dy + randint(-15, 20))
- Points = [(tab_posx[0] + randint(-15, 15), tab_posy[0]), (tab_posx[3] + randint(-15, 15), tab_posy[3]), (tab_posx[1] + randint(-20, 20), tab_posy[1]), (tab_posx[2] + randint(-20, 20), tab_posy[2])]
- posb = []
- for i in range(pt_num ):
- indice_text = randint(0, pt_num - 1)
- indice_pos = randint(0, pt_num - 1)
- x = dx + points[i][0]
- y = dy + points[i][1]
- posb.append(Bezier(Points,pt_num))
- x_fin = posb[i ][0]
- y_fin = posb[i][1]
- rand_ini = randint(50, 400)
- ts = _start + _elapk + _j * 2.5
- te = ts + _k + 70 + _j * 2.5
- rand_end = 10 * (te - ts)
- EFT = move(x, y, x_fin, y_fin, rand_ini, rand_end) + shad(0) + bord(0) + alpha(255 - points[indice_text][2])
- ass_main(ASS_BUF, SubL(ts, te, 0, Pix_Style), EFT, PixPt())
- return (ASS_BUF, TCAS_BUF)
复制代码 |
|