-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdynamicSkinTemplate.js
493 lines (492 loc) · 12.1 KB
/
dynamicSkinTemplate.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
'use strict';
decadeModule.import((lib, game, ui, get, ai, _status) => {
/**
* ***请不要直接在这个文件添加动态皮肤!***
*
* ***还请另行复制此文件并粘贴到本目录,然后改名为dynamicSkin.js!***
*
* ***然后就可以随意在粘贴后的dynamicSkin.js中修改动态皮肤参数了!***
*
* 十周年UI动皮使用说明:
* - 首先打开动态皮肤的开关,直接替换原有武将皮肤显示;
* - 目前不支持动态皮肤的切换功能;
* - 动态皮肤参数表在线文档链接:https://docs.qq.com/sheet/DS2Vaa0ZGWkdMdnZa ;可以在群在线文档提供你设置好的参数
* - 所有相关的文件请放到 十周年UI/assets/dynamic目录下;
* - 关于格式请参考下面示例:
* ```
* 武将名:{
* 皮肤名:{
* name: "xxx", // 必★填 骨骼名称,一般是yyy.skel,注意xxx不带后缀名.skel;
* action: "xxx", // 可删掉 播放动作,xxx 一般是 DaiJi,目前手杀的骨骼文件需要填;
* x: [10, 0.5], // 可删掉 [10, 0.5]相当于 left: calc(10px + 50%),不填默认为[0, 0.5];
* y: [10, 0.5], // 可删掉 [10, 0.5]相当于 bottom: calc(10px + 50%),不填默认为[0, 0.5];
* scale: 0.5, // 可删掉 缩放大小,不填默认为1;
* angle: 0, // 可删掉 旋转角度,不填默认为0;
* speed: 1, // 可删掉 播放速度,不填默认为1;
* hideSlots: ['隐藏的部件'], // 隐藏不需要的部件,想知道具体部件名称请使用SpineAltasSplit工具查看
* clipSlots: ['裁剪的部件'], // 剪掉超出头的部件,仅针对露头动皮,其他勿用
* background: "xxx.jpg", // 可删掉 背景图片,注意后面要写后缀名,如.jpg .png等
* }
* },
* ```
* - 为了方便得到动皮的显示位置信息,请在游戏选将后,用控制台或调试助手小齿轮执行以下代码(没用到的属性请删掉以免报错):
* ```
* game.me.stopDynamic();
* game.me.playDynamic({
* name: 'xxxxxxxxx', // 勿删
* action: undefined,
* speed: 1,
* loop: true, // 勿删
* x: [0, 0.5],
* y: [0, 0.5],
* scale: 0.5,
* angle: 0,
* hideSlots: ['隐藏的部件'], // 隐藏不需要的部件,想知道具体部件名称请使用SpineAltasSplit工具查看
* clipSlots: ['裁剪的部件'], // 剪掉超出头的部件,仅针对露头动皮,其他勿用
* });
* ```
* 这里可以改成`}, true);`设置右将动皮
*/
const dynamicSkinTemplate = {
zhangqiying: {
岁稔年丰: {
name: 'skin_zhangqiying_SuiRenNianFeng',
x: [5, 0.5],
y: [15, 0.4],
scale: 0.42,
background: 'skin_zhangqiying_SuiRenNianFeng_bg.png',
},
},
caojie: {
凤历迎春: {
name: 'skin_caojie_FengLiYingChun',
x: [0, 0.4],
y: [0, 0.5],
scale: 0.8,
background: 'skin_caojie_FengLiYingChun_bg.png',
},
},
caoying: {
巾帼花舞: {
name: 'skin_caoying_JinGuoHuaWu',
x: [0, 0.5],
y: [0, 0.5],
scale: 0.8,
background: 'skin_caoying_JinGuoHuaWu_bg.png',
},
},
baosanniang: {
漫花剑俏: {
name: 'skin_baosanniang_ManHuaJianQiao',
x: [96, 0.5],
y: [10, 0.4],
scale: 0.38,
background: 'skin_baosanniang_ManHuaJianQiao_bg.png',
},
},
sp_caiwenji: {
才颜双绝: {
name: 'skin_caiwenji_CaiYanShuangJue',
x: [-30, 0.5],
y: [0, 0.1],
scale: 0.5,
background: 'skin_caiwenji_CaiYanShuangJue_bg.png',
},
},
daqiao: {
衣垂绿川: {
name: 'skin_daqiao_YiChuiLvChuan',
action: 'DaiJi',
x: [60, 0.5],
y: [0, 0.2],
scale: 0.5,
clipSlots: ['san'],
hideSlots: ['qjhua1', 'qjhua2', 'qjhua3', 'qjhua4', 'qjhua5', 'guangxian', 'yun1', 'yun3', 'effect/guang2_00', 'effect/yan'],
background: 'skin_daqiao_QingXiaoQingLi_bg.png',
},
清萧清丽: {
name: 'skin_daqiao_QingXiaoQingLi',
x: [16, 0.5],
y: [15, 0.1],
scale: 0.55,
background: 'skin_daqiao_QingXiaoQingLi_bg.png',
},
},
daxiaoqiao: {
战场绝版: {
name: 'skin_daqiaoxiaoqiao_ZhanChang',
x: [0, 0.5],
y: [10, 0.3],
scale: 0.5,
background: 'skin_daqiaoxiaoqiao_ZhanChang.png',
},
},
diaochan: {
战场绝版: {
name: 'skin_diaochan_ZhanChang',
x: [0, 0.5],
y: [0, 0.5],
scale: 0.8,
background: 'skin_diaochan_ZhanChang_bg.png',
},
玉婵仙子: {
name: 'skin_diaochan_YuChanXianZi',
x: [5, 0.5],
y: [0, 0],
scale: 0.6,
background: 'skin_diaochan_YuChanXianZi_bg.png',
},
},
guozhao: {
雍容尊雅: {
name: 'skin_guozhao_YongRongZunYa',
x: [-80, 0.5],
y: [8, 0.3],
scale: 0.6,
background: 'skin_guozhao_YongRongZunYa_bg.png',
},
},
huangyueying: {
木牛流马: {
name: 'skin_huangyueying_MuNiuLiuMa',
action: 'DaiJi',
x: [-20, 0.5],
y: [0, 0.3],
scale: 0.53,
background: 'skin_huangyueying_MuNiuLiuMa_bg.png',
},
},
hetaihou: {
耀紫迷幻: {
name: 'skin_hetaihou_YaoZiMiHuan',
x: [0, 0.5],
y: [0, 0.5],
scale: 0.8,
background: 'skin_hetaihou_YaoZiMiHuan_bg.png',
},
蛇蝎为心: {
name: 'skin_hetaihou_SheXieWeiXin',
action: 'DaiJi',
x: [-50, 0.5],
y: [10, 0.1],
scale: 0.46,
angle: 27,
clipSlots: ['wangzuo', 'bu2', 'bu3'],
background: 'skin_hetaihou_SheXieWeiXin_bg.png',
},
},
huaman: {
花俏蛮娇: {
name: 'skin_huaman_HuaQiaoManJiao',
x: [65, 0.5],
y: [10, 0.3],
scale: 0.4,
background: 'skin_huaman_HuaQiaoManJiao_bg.png',
}
},
luyusheng: {
玉桂月满: {
name: 'skin_luyusheng_YuGuiYueMan',
x: [-25, 0.5],
y: [16, 0.3],
scale: 0.5,
background: 'skin_luyusheng_YuGuiYueMan_bg.png',
}
},
re_machao: {
西凉雄狮: {
name: 'skin_machao_XiLiangXiongShi',
action: 'DaiJi',
x: [0, 0.5],
y: [0, 0.3],
scale: 0.52,
background: 'skin_machao_XiLiangXiongShi_bg.png',
clipSlots: ['tx/fw_19'],
hideSlots: ['tx/glow_00']
},
},
mayunlu: {
战场绝版: {
name: 'skin_mayunlu_ZhanChang',
x: [88, 0.5],
y: [0, 0.1],
scale: 0.65,
background: 'skin_mayunlu_ZhanChang_bg.png',
},
},
panshu: {
繁囿引芳: {
name: 'skin_panshu_FanYouYinFang',
x: [100, 0.5],
y: [10, 0.3],
scale: 0.52,
background: 'skin_panshu_FanYouYinFang_bg.png',
},
},
sunluban: {
沅茝香兰: {
name: 'skin_sunluban_YuanChaiXiangLan',
x: [10, 0.5],
y: [12, 0.1],
scale: 0.55,
background: 'skin_sunluban_YuanChaiXiangLan_bg.png',
},
宵靥谜君: {
name: 'skin_sunluban_XiaoYeMiJun',
x: [0, 0.5],
y: [-10, 0.5],
scale: 0.5,
background: 'skin_sunluban_XiaoYeMiJun_bg.png',
},
},
simashi: {
桀骜睥睨: {
name: 'skin_simashi_JieAoPiNi',
x: [0, 0.04],
y: [0, 0.3],
scale: 0.85,
angle: 15,
background: 'skin_simashi_JieAoPiNi_bg.png'
}
},
sunluyu: {
娇俏伶俐: {
name: 'skin_sunluyu_JiaoQiaoLingLi',
x: [-10, 0.5],
y: [20, 0.3],
scale: 0.4,
background: 'skin_sunluyu_JiaoQiaoLingLi_bg.png',
},
},
sunshangxiang: {
魅影剑舞: {
name: 'skin_sunshangxiang_MeiYingJianWu',
x: [-5, 0.5],
y: [10, 0.2],
scale: 0.42,
background: 'skin_sunshangxiang_MeiYingJianWu_bg.png',
},
},
sp_sunshangxiang: {
花曳心牵: {
name: 'skin_shuxiangxiang_HuaYeXinQian',
x: [0, 0.5],
y: [0, 0.5],
scale: 0.8,
background: 'skin_shuxiangxiang_HuaYeXinQian_bg.png',
}
},
wangrong: {
云裳花容: {
name: 'skin_wangrong_YunShangHuaRong',
x: [0, 0.5],
y: [0, 0.5],
scale: 0.8,
background: 'skin_wangrong_YunShangHuaRong_bg.png',
},
},
wangyuanji: {
鼠年冬至: {
name: 'skin_wangyuanji_ShuNianDongZhi',
action: 'DaiJi',
x: [-24, 0.5],
y: [8, 0.5],
scale: 0.6,
background: 'skin_wangyuanji_ShuNianDongZhi_bg.png',
},
},
wangyi: {
绝色异彩: {
name: 'skin_wangyi_JueSeYiCai',
x: [16, 0.5],
y: [10, 0.3],
scale: 0.42,
background: 'skin_wangyi_JueSeYiCai_bg.png',
},
},
wuxian: {
金玉满堂: {
name: 'skin_wuxian_JinYuManTang',
x: [0, 0.5],
y: [0, 0.5],
scale: 0.8,
background: 'skin_wuxian_JinYuManTang_bg.png',
},
锦运福绵: {
name: 'skin_wuxian_JinYunFuMian',
x: [-58, 0.5],
y: [0, 0.2],
scale: 0.6,
background: 'skin_wuxian_JinYunFuMian_bg.png',
},
},
xiahoushi: {
战场绝版: {
name: 'skin_xiahoushi_ZhanChang',
x: [-8, 0.5],
y: [-5, 0.4],
scale: 0.45,
angle: -20,
background: 'skin_xiahoushi_ZhanChang_bg.png',
},
},
re_xiaoqiao: {
采莲江南: {
name: 'skin_xiaoqiao_CaiLianJiangNan',
action: 'DaiJi',
x: [105, 0.5],
y: [15, 0.1],
scale: 0.48,
background: 'skin_xiaoqiao_HuaHaoYueYuan_bg.png',
clipSlots: ['san', 'guang3_30'],
hideSlots: ['guang3_30', 'bghua1', 'bgshitou1', 'bgshitou2', 'hehua1',
'hehua2', 'hehua3', 'hehua4', 'shuchong1', 'shuchong2', 'shugan',
'shui1', 'shui2', 'shuimian', 'shuiwen1', 'shuiwen2', 'shuiwen3', 'qjhehua', 'heye2'],
},
花好月圆: {
name: 'skin_xiaoqiao_HuaHaoYueYuan',
x: [-40, 0.5],
y: [5, 0.1],
scale: 0.5,
background: 'skin_xiaoqiao_HuaHaoYueYuan_bg.png',
},
},
xinxianying: {
英装素果: {
name: 'skin_xinxianying_YingZhuangSuGuo',
x: [38, 0.5],
y: 0,
scale: 0.7,
background: 'skin_xinxianying_YingZhuangSuGuo_bg.png',
},
},
xushi: {
为夫弑敌: {
name: 'skin_xushi_WeiFuShiDi',
x: [28, 0.5],
y: [0, 0.3],
scale: 0.42,
background: 'skin_xushi_WeiFuShiDi_bg.png',
hideSlots: ['xushi_piaodai2', 'xushi_piaodai8'],
}
},
yangwan: {
星光淑婉: {
name: 'skin_yangwan_XingGuangShuWan',
x: [5, 0.5],
y: [0, 0.3],
scale: 0.42,
background: 'skin_yangwan_XingGuangShuWan_bg.png',
},
},
zhangchangpu: {
钟桂香蒲: {
name: 'skin_zhangchangpu_ZhongGuiXiangPu',
x: [-5, 0.5],
y: [5, 0.3],
scale: 0.43,
background: 'skin_zhangchangpu_ZhongGuiXiangPu_bg.png',
},
},
zhangxingcai: {
凯旋星花: {
name: 'skin_zhangxingcai_KaiXuanXingHua',
x: [-15, 0.5],
y: [15, 0.2],
scale: 0.6,
background: 'skin_zhangxingcai_KaiXuanXingHua_bg.png',
},
},
zhenji: {
才颜双绝: {
name: 'skin_zhenji_CaiYanShuangJue',
x: [20, 0.5],
y: [0, 0.3],
scale: 0.45,
background: 'skin_zhenji_CaiYanShuangJue_bg.png',
},
},
zhoufei: {
鹊星夕情: {
name: 'skin_sundengzhoufei_QueXingXiQing',
x: [0, 0.5],
y: [15, 0.2],
scale: 0.7,
background: 'skin_sundengzhoufei_QueXingXiQing_bg.png',
},
},
zhouyi: {
剑舞浏漓: {
name: 'skin_zhouyi_JianWuLiuLi',
x: [0, 0.4],
y: [0, 0.5],
scale: 0.8,
background: 'skin_zhouyi_JianWuLiuLi_bg.png',
}
},
zhugeguo: {
仙池起舞: {
name: 'skin_zhugeguo_XianChiQiWU',
action: 'DaiJi',
x: [-70, 0.5],
y: [15, 0.2],
scale: 0.45,
background: 'skin_zhugeguo_LanHeAiLian_bg.png',
},
兰荷艾莲: {
name: 'skin_zhugeguo_LanHeAiLian',
x: [-30, 0.5],
y: [8, 0.3],
scale: 0.5,
background: 'skin_zhugeguo_LanHeAiLian_bg.png',
}
},
get re_baosanniang() {
return this.baosanniang;
},
get re_daqiao() {
return this.daqiao;
},
get re_diaochan() {
return this.diaochan;
},
get re_huangyueying() {
return this.huangyueying;
},
get re_panshu() {
return this.panshu;
},
get jin_simashi() {
return this.simashi;
},
get re_sunluban() {
return this.sunluban;
},
get re_sunluyu() {
return this.sunluyu;
},
get re_sunshangxiang() {
return this.sunshangxiang;
},
get re_wangyi() {
return this.wangyi;
},
get ol_xiaoqiao() {
return this.re_xiaoqiao;
},
get re_xinxianying() {
return this.xinxianying;
},
get ol_zhangchangpu() {
return this.zhangchangpu;
},
get re_zhenji() {
return this.zhenji;
}
};
const dynamicSkin = decadeUI.dynamicSkin;
if (dynamicSkin) Object.keys(dynamicSkinTemplate).forEach(key => {
if (!dynamicSkin[key]) Object.defineProperty(dynamicSkin, key, Object.getOwnPropertyDescriptor(dynamicSkinTemplate, key));
});
else decadeUI.dynamicSkin = dynamicSkinTemplate;
});