From 95c5be22c42469ad68c4d7f52e8030ca9222bb71 Mon Sep 17 00:00:00 2001 From: Kvan7 <71402892+Kvan7@users.noreply.github.com> Date: Tue, 7 Jul 2026 12:51:19 -0500 Subject: [PATCH] Update RuneRecipeFinder.ts --- main/src/vision/RuneRecipeFinder.ts | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/main/src/vision/RuneRecipeFinder.ts b/main/src/vision/RuneRecipeFinder.ts index 31fe0587..6c47c28e 100644 --- a/main/src/vision/RuneRecipeFinder.ts +++ b/main/src/vision/RuneRecipeFinder.ts @@ -2,7 +2,7 @@ import { cvWrapper } from "./opencv/cvWrapper"; import type { ICvAdapter } from "./opencv/ICvAdapter"; import type { BoundingBox, ImageData } from "./utils"; -interface OcrResult { +interface RecipeResult { elapsed: number; data: { highlightedTome: string; @@ -14,37 +14,22 @@ interface OcrResult { export class RuneRecipeFinder { private cv: ICvAdapter; - private constructor( - private readonly needleMat: any, - private readonly hsvMin: any, - private readonly hsvMax: any, - ) { + private constructor() { this.cv = cvWrapper.cv; } static create() { - return new RuneRecipeFinder(0, 0, 0); + return new RuneRecipeFinder(); } - async calibrate(): Promise { - const result = new Promise((resolve) => { - setTimeout(() => { - resolve({ - x: 102, - y: 304, - width: 985, - height: 81, - }); - }, 2000); - }); - - return await result; + async calibrate(screenshot: ImageData): Promise { + throw new Error("Method not implemented."); } - async ocrScreenshot( + async findRecipeId( screenshot: ImageData, bbox: BoundingBox, - ): Promise { + ): Promise { throw new Error("Method not implemented."); } }