mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-22 06:58:24 +00:00
优化部分图像生成的格式及尺寸,获得速度与质量的平衡
This commit is contained in:
parent
3ecde0ef77
commit
7c7e3d6033
@ -94,8 +94,8 @@ export async function sysCfg(e, { render }) {
|
||||
|
||||
let base64 = await render("admin", "index", {
|
||||
...cfg,
|
||||
cfgScale: Cfg.scale(1.2)
|
||||
}, "png");
|
||||
cfgScale: Cfg.scale(1.4)
|
||||
});
|
||||
if (base64) {
|
||||
e.reply(segment.image(`base64://${base64}`));
|
||||
}
|
||||
|
@ -345,8 +345,8 @@ async function renderCard(e, avatar, render, renderType = "card") {
|
||||
bg,
|
||||
...getCharacterData(avatar),
|
||||
ds: char.getData("name,id,title,desc"),
|
||||
cfgScale: Cfg.scale(1.25)
|
||||
}, "png");
|
||||
cfgScale: Cfg.scale(1.6)
|
||||
});
|
||||
if (base64) {
|
||||
e.reply(segment.image(`base64://${base64}`));
|
||||
}
|
||||
|
@ -41,8 +41,8 @@ export async function help(e, { render }) {
|
||||
|
||||
let base64 = await render("help", "index", {
|
||||
helpCfg: helpGroup,
|
||||
cfgScale: Cfg.scale(1.05)
|
||||
}, "png");
|
||||
cfgScale: Cfg.scale(1.2)
|
||||
});
|
||||
if (base64) {
|
||||
e.reply(segment.image(`base64://${base64}`));
|
||||
}
|
||||
|
@ -78,8 +78,8 @@ export async function consStat(e, { render }) {
|
||||
pct: function (num) {
|
||||
return (num * 100).toFixed(2);
|
||||
},
|
||||
cfgScale: Cfg.scale(1.4)
|
||||
}, "png");
|
||||
cfgScale: Cfg.scale(1.5)
|
||||
});
|
||||
if (base64) {
|
||||
e.reply(segment.image(`base64://${base64}`));
|
||||
}
|
||||
@ -156,8 +156,8 @@ export async function abyssPct(e, { render }) {
|
||||
pct: function (num) {
|
||||
return (num * 100).toFixed(2);
|
||||
},
|
||||
cfgScale: Cfg.scale(1.4)
|
||||
}, "png");
|
||||
cfgScale: Cfg.scale(1.5)
|
||||
});
|
||||
if (base64) {
|
||||
e.reply(segment.image(`base64://${base64}`));
|
||||
}
|
||||
|
@ -393,7 +393,7 @@ let Calc = {
|
||||
avg: atkNum * pctNum * (1 + multiNum) * dmgNum * (1 + cpctNum * cdmgNum) * defNum * kNum * eleNum
|
||||
}
|
||||
|
||||
console.log(attr, { atkNum, pctNum, multiNum, dmgNum, cpctNum, cdmgNum, defNum, eleNum, kNum }, ret)
|
||||
// console.log(attr, { atkNum, pctNum, multiNum, dmgNum, cpctNum, cdmgNum, defNum, eleNum, kNum }, ret)
|
||||
|
||||
return ret;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user