feat: 更新编辑器服务中的机器人图标尺寸和像素对齐算法,以提升视觉效果和精确度

This commit is contained in:
xudan 2025-08-18 16:17:05 +08:00
parent 11cdb6cdc2
commit 01b6ad2051

View File

@ -933,9 +933,9 @@ export class EditorService extends Meta2d {
import.meta.env.BASE_URL + (active ? `/robot/${type}-active-${theme}.png` : `/robot/${type}-${theme}.png`);
// 使用优化的像素对齐算法,确保小车和光圈精确重合
const iconTop = this.#calculatePixelAlignedOffset(-10);
const iconTop = this.#calculatePixelAlignedOffset(-16);
return { image, iconWidth: 48, iconHeight: 76, iconTop };
return { image, iconWidth: 42, iconHeight: 76, iconTop };
}
//#endregion