MCPcopy Create free account
hub / github.com/6dylan6/jdm / constructor

Method constructor

function/jdValidate.js:47–59  ·  view source on GitHub ↗
(bg, patch, y)

Source from the content-addressed store, hash-verified

45const PUZZLE_PAD = 10;
46class PuzzleRecognizer {
47 constructor(bg, patch, y) {
48 // console.log(bg);
49 const imgBg = new PNGDecoder(Buffer.from(bg, 'base64'));
50 const imgPatch = new PNGDecoder(Buffer.from(patch, 'base64'));
51 // console.log(imgBg);
52 this.bg = imgBg;
53 this.patch = imgPatch;
54 this.rawBg = bg;
55 this.rawPatch = patch;
56 this.y = y;
57 this.w = imgBg.width;
58 this.h = imgBg.height;
59 }
60 async run() {
61 await this.bg.decodeToPixels();
62 await this.patch.decodeToPixels();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected