cortico-world-hands 0.16.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2191,10 +2191,13 @@ ${lines.join("\n")}
|
|
|
2191
2191
|
const raw = await this.hands.matchImage(name, { threshold, tap });
|
|
2192
2192
|
try {
|
|
2193
2193
|
const r = JSON.parse(raw);
|
|
2194
|
-
if (r.
|
|
2195
|
-
return `${tap ? "\u70B9\
|
|
2194
|
+
if (r.band === "hit" && r.ok) {
|
|
2195
|
+
return `${tap ? "\u70B9\u4E86" : "\u627E\u5230\u4E86"}\u300C${name}\u300D@(${r.x},${r.y})\uFF0C\u5206\u6570 ${r.score}\uFF0C${r.ms}ms`;
|
|
2196
2196
|
}
|
|
2197
|
-
|
|
2197
|
+
if (r.band === "uncertain") {
|
|
2198
|
+
return `\u300C${name}\u300D\u50CF\u662F\u6709\uFF0C\u4F46\u5206\u6570\u53EA\u6709 ${r.score}\uFF080.4\u20130.7\uFF09\uFF0C**\u6211\u6CA1\u70B9**\uFF0C\u5750\u6807 @(${r.x},${r.y})\u3002\u4F60\u5B9A\u8981\u4E0D\u8981\u70B9\u3002`;
|
|
2199
|
+
}
|
|
2200
|
+
return failed(r.error || `\u5C4F\u5E55\u4E0A\u6CA1\u627E\u5230\u300C${name}\u300D`);
|
|
2198
2201
|
} catch {
|
|
2199
2202
|
return failed(raw.slice(0, 120));
|
|
2200
2203
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cortico-world-hands",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Cortico World: hands for the desktop pet — looks at the phone screen, then taps, swipes, pinches, drags, types and presses keys through whatever actuator the device actually has",
|
|
6
6
|
"license": "MIT",
|