mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-19 13:56:43 +02:00
Consistent Nike Logo Size
This commit is contained in:
@@ -54,7 +54,10 @@ module.exports = class NikeAdCommand extends Command {
|
|||||||
const ctx = canvas.getContext('2d');
|
const ctx = canvas.getContext('2d');
|
||||||
drawImageWithTint(ctx, data, 'black', 0, 0, data.width, data.height);
|
drawImageWithTint(ctx, data, 'black', 0, 0, data.width, data.height);
|
||||||
greyscale(ctx, 0, 0, data.width, data.height);
|
greyscale(ctx, 0, 0, data.width, data.height);
|
||||||
ctx.drawImage(base, (data.width / 2) - (base.width / 2), data.height - base.height);
|
const ratio = base.width / base.height;
|
||||||
|
const width = data.width / 3;
|
||||||
|
const height = Math.round(width / ratio);
|
||||||
|
ctx.drawImage(base, (data.width / 2) - (width / 2), data.height - height, width, height);
|
||||||
ctx.font = `${Math.round(data.height / 25)}px Noto`;
|
ctx.font = `${Math.round(data.height / 25)}px Noto`;
|
||||||
ctx.fillStyle = 'white';
|
ctx.fillStyle = 'white';
|
||||||
ctx.textAlign = 'center';
|
ctx.textAlign = 'center';
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "91.1.0",
|
"version": "91.1.1",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user