可变动的立绘大小

This commit is contained in:
草莓 2025-01-08 21:11:31 +08:00
parent b5991a4044
commit 572cd40493
4 changed files with 525 additions and 500 deletions

View File

@ -1144,16 +1144,19 @@ textcgDrawingList
| textcgDrawingEmpty;
textcgDrawing
: '立绘' EvalString? '绘制坐标' 'x' Number '变暗'Bool? Newline
: '立绘' EvalString? '绘制坐标' 'x' Number '变暗'Bool? '绘制大小w' IntString? 'h' IntString? '绘制比例(填写后w、h失效,此项默认1.7)' EvalString? Newline
/* textcgDrawing
tooltip : 立绘
helpUrl : /_docs/#/instruction
default : ["tati_050145a.webp",100,false]
default : ["tati_050145a.webp",100,false,"","",""]
colour : this.subColor
allImages : ['EvalString_0']
return '{ "name": "'+EvalString_0+'", "px": '+Number_0+',"filter":'+Bool_0+' },'
if(EvalString_1&&!/^(0|([1-9][0-9]*))(\.[\d]+)?$/.test(EvalString_1))throw new Error("此项仅能填写小数、整数或不填");
IntString_0=IntString_0?(',"w":'+IntString_0+''):''
IntString_1=IntString_1?(',"h":'+IntString_1+''):''
EvalString_1=EvalString_1?(',"scale":'+EvalString_1+''):''
return '{ "name": "'+EvalString_0+'", "px": '+Number_0+',"filter":'+Bool_0+IntString_0+IntString_1+EvalString_1+' },'
*/;
textcgDrawingEmpty
@ -2326,7 +2329,7 @@ return code;
*/;
playanimate_s
: '播放 帧动画/特效' '名称' EvalString '像素x' IntString? 'y' IntString? '跟随勇士' Bool 'x方向缩放' IntString? 'y方向缩放'IntString? Newline
: '播放 帧动画/特效' '名称' EvalString '像素x' IntString? 'y' IntString? '跟随勇士' Bool 'x方向缩放' EvalString? 'y方向缩放'EvalString? Newline
/* playanimate_s
tooltip : playanimate:播放帧动画选择跟随勇士后x、y将失效改为勇士中心坐标
@ -2336,9 +2339,11 @@ default : ["zone","","",false,"",""]
colour : this.soundColor
IntString_0 = IntString_0 ? (', "x": '+IntString_0+'') : '';
IntString_1 = IntString_1 ? (', "y": '+IntString_1+'') : '';
IntString_2 = IntString_2 ? (', "scalex": '+IntString_2+'') : '';
IntString_3 = IntString_3 ? (', "scaley": '+IntString_3+'') : '';
var code = '{"type": "playanimate", "name": "'+EvalString_0+'"'+IntString_0+IntString_1+',"hero":'+Bool_0+IntString_2+IntString_3+'},\n';
if(EvalString_1&&!/^(0|([1-9][0-9]*))(\.[\d]+)?$/.test(EvalString_1))throw new Error("此项仅能填写小数、整数或不填");
if(EvalString_2&&!/^(0|([1-9][0-9]*))(\.[\d]+)?$/.test(EvalString_2))throw new Error("此项仅能填写小数、整数或不填");
EvalString_1 = EvalString_1 ? (', "scalex": '+EvalString_1+'') : '';
EvalString_2 = EvalString_2 ? (', "scaley": '+EvalString_2+'') : '';
var code = '{"type": "playanimate", "name": "'+EvalString_0+'"'+IntString_0+IntString_1+',"hero":'+Bool_0+EvalString_1+EvalString_2+'},\n';
return code;
*/;

View File

@ -551,6 +551,9 @@ MotaActionParser = function () {
one[0],
one[1],
one[2],
one[3],
one[4],
one[5],
res,
]);
}
@ -2901,7 +2904,7 @@ MotaActionParser = function () {
MotaActionFunctions.processcgDrawing = function (bodyList) {
var list = [];
bodyList.forEach(function (one) {
list.push([one.name, one.px, one.filter]);
list.push([one.name, one.px, one.filter, one.w, one.h, one.scale]);
});
return list;
};

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff