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", {
|
let base64 = await render("admin", "index", {
|
||||||
...cfg,
|
...cfg,
|
||||||
cfgScale: Cfg.scale(1.2)
|
cfgScale: Cfg.scale(1.4)
|
||||||
}, "png");
|
});
|
||||||
if (base64) {
|
if (base64) {
|
||||||
e.reply(segment.image(`base64://${base64}`));
|
e.reply(segment.image(`base64://${base64}`));
|
||||||
}
|
}
|
||||||
|
@ -345,8 +345,8 @@ async function renderCard(e, avatar, render, renderType = "card") {
|
|||||||
bg,
|
bg,
|
||||||
...getCharacterData(avatar),
|
...getCharacterData(avatar),
|
||||||
ds: char.getData("name,id,title,desc"),
|
ds: char.getData("name,id,title,desc"),
|
||||||
cfgScale: Cfg.scale(1.25)
|
cfgScale: Cfg.scale(1.6)
|
||||||
}, "png");
|
});
|
||||||
if (base64) {
|
if (base64) {
|
||||||
e.reply(segment.image(`base64://${base64}`));
|
e.reply(segment.image(`base64://${base64}`));
|
||||||
}
|
}
|
||||||
|
@ -41,8 +41,8 @@ export async function help(e, { render }) {
|
|||||||
|
|
||||||
let base64 = await render("help", "index", {
|
let base64 = await render("help", "index", {
|
||||||
helpCfg: helpGroup,
|
helpCfg: helpGroup,
|
||||||
cfgScale: Cfg.scale(1.05)
|
cfgScale: Cfg.scale(1.2)
|
||||||
}, "png");
|
});
|
||||||
if (base64) {
|
if (base64) {
|
||||||
e.reply(segment.image(`base64://${base64}`));
|
e.reply(segment.image(`base64://${base64}`));
|
||||||
}
|
}
|
||||||
|
@ -78,8 +78,8 @@ export async function consStat(e, { render }) {
|
|||||||
pct: function (num) {
|
pct: function (num) {
|
||||||
return (num * 100).toFixed(2);
|
return (num * 100).toFixed(2);
|
||||||
},
|
},
|
||||||
cfgScale: Cfg.scale(1.4)
|
cfgScale: Cfg.scale(1.5)
|
||||||
}, "png");
|
});
|
||||||
if (base64) {
|
if (base64) {
|
||||||
e.reply(segment.image(`base64://${base64}`));
|
e.reply(segment.image(`base64://${base64}`));
|
||||||
}
|
}
|
||||||
@ -156,8 +156,8 @@ export async function abyssPct(e, { render }) {
|
|||||||
pct: function (num) {
|
pct: function (num) {
|
||||||
return (num * 100).toFixed(2);
|
return (num * 100).toFixed(2);
|
||||||
},
|
},
|
||||||
cfgScale: Cfg.scale(1.4)
|
cfgScale: Cfg.scale(1.5)
|
||||||
}, "png");
|
});
|
||||||
if (base64) {
|
if (base64) {
|
||||||
e.reply(segment.image(`base64://${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
|
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;
|
return ret;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user