feat(scanner): validate elevated live automation

This commit is contained in:
AzuTear
2026-07-07 07:49:22 +02:00
parent 7930e369a7
commit ef65c3e6a0
37 changed files with 826 additions and 217 deletions
+6 -6
View File
@@ -1,5 +1,5 @@
import { clampRect, type LayoutRect } from "./layoutProfile";
import type { Bitmap } from "./ocrPreprocess";
import { clampRect, type LayoutRect } from "./layoutProfile.js";
import type { Bitmap } from "./ocrPreprocess.js";
// EXPERIMENTAL, read-only lock-status detection (nice-to-have). Genshin shows a
// padlock at the top-right of the artifact detail card: a bright gold fill when
@@ -15,10 +15,10 @@ import type { Bitmap } from "./ocrPreprocess";
export function lockIconCropRect(detailRect: LayoutRect, imageSize: { width: number; height: number }): LayoutRect {
return clampRect(
{
x: Math.round(detailRect.x + detailRect.width * 0.8),
y: Math.round(detailRect.y + detailRect.height * 0.03),
width: Math.round(detailRect.width * 0.16),
height: Math.round(detailRect.height * 0.09),
x: Math.round(detailRect.x + detailRect.width * 0.735),
y: Math.round(detailRect.y + detailRect.height * 0.355),
width: Math.round(detailRect.width * 0.105),
height: Math.round(detailRect.height * 0.07),
},
imageSize,
);