petdex-cc 0.1.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/LICENSE +21 -0
- package/README.md +247 -0
- package/README_CN.md +247 -0
- package/dist/bin/cli.d.ts +3 -0
- package/dist/bin/cli.d.ts.map +1 -0
- package/dist/bin/cli.js +78 -0
- package/dist/bin/cli.js.map +1 -0
- package/dist/src/assets/tray-icon.png +0 -0
- package/dist/src/cli/config.d.ts +9 -0
- package/dist/src/cli/config.d.ts.map +1 -0
- package/dist/src/cli/config.js +41 -0
- package/dist/src/cli/config.js.map +1 -0
- package/dist/src/cli/install.d.ts +2 -0
- package/dist/src/cli/install.d.ts.map +1 -0
- package/dist/src/cli/install.js +62 -0
- package/dist/src/cli/install.js.map +1 -0
- package/dist/src/cli/list.d.ts +2 -0
- package/dist/src/cli/list.d.ts.map +1 -0
- package/dist/src/cli/list.js +20 -0
- package/dist/src/cli/list.js.map +1 -0
- package/dist/src/cli/start.d.ts +3 -0
- package/dist/src/cli/start.d.ts.map +1 -0
- package/dist/src/cli/start.js +37 -0
- package/dist/src/cli/start.js.map +1 -0
- package/dist/src/cli/status.d.ts +2 -0
- package/dist/src/cli/status.d.ts.map +1 -0
- package/dist/src/cli/status.js +8 -0
- package/dist/src/cli/status.js.map +1 -0
- package/dist/src/cli/stop.d.ts +2 -0
- package/dist/src/cli/stop.d.ts.map +1 -0
- package/dist/src/cli/stop.js +39 -0
- package/dist/src/cli/stop.js.map +1 -0
- package/dist/src/cli/switch.d.ts +2 -0
- package/dist/src/cli/switch.d.ts.map +1 -0
- package/dist/src/cli/switch.js +34 -0
- package/dist/src/cli/switch.js.map +1 -0
- package/dist/src/cli/uninstall.d.ts +2 -0
- package/dist/src/cli/uninstall.d.ts.map +1 -0
- package/dist/src/cli/uninstall.js +18 -0
- package/dist/src/cli/uninstall.js.map +1 -0
- package/dist/src/hooks/register.d.ts +3 -0
- package/dist/src/hooks/register.d.ts.map +1 -0
- package/dist/src/hooks/register.js +113 -0
- package/dist/src/hooks/register.js.map +1 -0
- package/dist/src/hooks/write-scripts.d.ts +2 -0
- package/dist/src/hooks/write-scripts.d.ts.map +1 -0
- package/dist/src/hooks/write-scripts.js +39 -0
- package/dist/src/hooks/write-scripts.js.map +1 -0
- package/dist/src/main/ai-speech.d.ts +22 -0
- package/dist/src/main/ai-speech.d.ts.map +1 -0
- package/dist/src/main/ai-speech.js +131 -0
- package/dist/src/main/ai-speech.js.map +1 -0
- package/dist/src/main/event-mapper.d.ts +10 -0
- package/dist/src/main/event-mapper.d.ts.map +1 -0
- package/dist/src/main/event-mapper.js +92 -0
- package/dist/src/main/event-mapper.js.map +1 -0
- package/dist/src/main/index.d.ts +2 -0
- package/dist/src/main/index.d.ts.map +1 -0
- package/dist/src/main/index.js +175 -0
- package/dist/src/main/index.js.map +1 -0
- package/dist/src/main/server.d.ts +8 -0
- package/dist/src/main/server.d.ts.map +1 -0
- package/dist/src/main/server.js +81 -0
- package/dist/src/main/server.js.map +1 -0
- package/dist/src/main/storage.d.ts +15 -0
- package/dist/src/main/storage.d.ts.map +1 -0
- package/dist/src/main/storage.js +90 -0
- package/dist/src/main/storage.js.map +1 -0
- package/dist/src/main/tray.d.ts +3 -0
- package/dist/src/main/tray.d.ts.map +1 -0
- package/dist/src/main/tray.js +156 -0
- package/dist/src/main/tray.js.map +1 -0
- package/dist/src/petdex-api/client.d.ts +21 -0
- package/dist/src/petdex-api/client.d.ts.map +1 -0
- package/dist/src/petdex-api/client.js +23 -0
- package/dist/src/petdex-api/client.js.map +1 -0
- package/dist/src/petdex-api/download.d.ts +8 -0
- package/dist/src/petdex-api/download.d.ts.map +1 -0
- package/dist/src/petdex-api/download.js +45 -0
- package/dist/src/petdex-api/download.js.map +1 -0
- package/dist/src/renderer/bubble.d.ts +30 -0
- package/dist/src/renderer/bubble.d.ts.map +1 -0
- package/dist/src/renderer/bubble.js +69 -0
- package/dist/src/renderer/bubble.js.map +1 -0
- package/dist/src/renderer/click-through.d.ts +21 -0
- package/dist/src/renderer/click-through.d.ts.map +1 -0
- package/dist/src/renderer/click-through.js +29 -0
- package/dist/src/renderer/click-through.js.map +1 -0
- package/dist/src/renderer/context-menu.d.ts +24 -0
- package/dist/src/renderer/context-menu.d.ts.map +1 -0
- package/dist/src/renderer/context-menu.js +83 -0
- package/dist/src/renderer/context-menu.js.map +1 -0
- package/dist/src/renderer/drag.d.ts +3 -0
- package/dist/src/renderer/drag.d.ts.map +1 -0
- package/dist/src/renderer/drag.js +57 -0
- package/dist/src/renderer/drag.js.map +1 -0
- package/dist/src/renderer/index.html +264 -0
- package/dist/src/renderer/pet-sprite.d.ts +25 -0
- package/dist/src/renderer/pet-sprite.d.ts.map +1 -0
- package/dist/src/renderer/pet-sprite.js +59 -0
- package/dist/src/renderer/pet-sprite.js.map +1 -0
- package/dist/src/renderer/renderer.d.ts +2 -0
- package/dist/src/renderer/renderer.d.ts.map +1 -0
- package/dist/src/renderer/renderer.js +244 -0
- package/dist/src/renderer/renderer.js.map +1 -0
- package/dist/src/renderer/wander.d.ts +8 -0
- package/dist/src/renderer/wander.d.ts.map +1 -0
- package/dist/src/renderer/wander.js +137 -0
- package/dist/src/renderer/wander.js.map +1 -0
- package/dist/src/shared/events.d.ts +62 -0
- package/dist/src/shared/events.d.ts.map +1 -0
- package/dist/src/shared/events.js +2 -0
- package/dist/src/shared/events.js.map +1 -0
- package/dist/src/shared/levels.d.ts +18 -0
- package/dist/src/shared/levels.d.ts.map +1 -0
- package/dist/src/shared/levels.js +20 -0
- package/dist/src/shared/levels.js.map +1 -0
- package/dist/src/shared/pet-states.d.ts +72 -0
- package/dist/src/shared/pet-states.d.ts.map +1 -0
- package/dist/src/shared/pet-states.js +20 -0
- package/dist/src/shared/pet-states.js.map +1 -0
- package/package.json +48 -0
- package/src/assets/tray-icon.png +0 -0
- package/src/hooks/bridge.ps1 +11 -0
- package/src/hooks/bridge.sh +9 -0
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
(() => {
|
|
3
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
4
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
5
|
+
}) : x)(function(x) {
|
|
6
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
7
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
// src/renderer/pet-sprite.ts
|
|
11
|
+
var petStates = [
|
|
12
|
+
{ id: "idle", label: "Idle", row: 0, frames: 6, durationMs: 1100 },
|
|
13
|
+
{ id: "running-right", label: "Running Right", row: 1, frames: 8, durationMs: 1060 },
|
|
14
|
+
{ id: "running-left", label: "Running Left", row: 2, frames: 8, durationMs: 1060 },
|
|
15
|
+
{ id: "waving", label: "Waving", row: 3, frames: 4, durationMs: 700 },
|
|
16
|
+
{ id: "jumping", label: "Jumping", row: 4, frames: 5, durationMs: 840 },
|
|
17
|
+
{ id: "failed", label: "Failed", row: 5, frames: 8, durationMs: 1220 },
|
|
18
|
+
{ id: "waiting", label: "Waiting", row: 6, frames: 6, durationMs: 1010 },
|
|
19
|
+
{ id: "running", label: "Running", row: 7, frames: 6, durationMs: 820 },
|
|
20
|
+
{ id: "review", label: "Review", row: 8, frames: 6, durationMs: 1030 }
|
|
21
|
+
];
|
|
22
|
+
function setSpriteImage(url) {
|
|
23
|
+
const el = getPetElement();
|
|
24
|
+
if (el) {
|
|
25
|
+
el.style.setProperty("--sprite-url", `url("${url}")`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function setPetAction(stateId) {
|
|
29
|
+
const el = getPetElement();
|
|
30
|
+
if (!el) return;
|
|
31
|
+
const state = petStates.find((s) => s.id === stateId);
|
|
32
|
+
if (!state) return;
|
|
33
|
+
el.style.setProperty("--sprite-row", String(state.row));
|
|
34
|
+
el.style.setProperty("--sprite-frames", String(state.frames));
|
|
35
|
+
el.style.setProperty("--sprite-duration", `${state.durationMs}ms`);
|
|
36
|
+
const currentAnimation = el.style.animation;
|
|
37
|
+
el.style.animation = "none";
|
|
38
|
+
void el.offsetWidth;
|
|
39
|
+
el.style.animation = currentAnimation || "";
|
|
40
|
+
}
|
|
41
|
+
function getPetElement() {
|
|
42
|
+
return document.getElementById("pet-sprite");
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// src/renderer/bubble.ts
|
|
46
|
+
var BUBBLE_ELEMENT_ID = "bubble";
|
|
47
|
+
var HIDDEN_CLASS = "bubble-hidden";
|
|
48
|
+
var DEFAULT_DURATION_MS = 3e3;
|
|
49
|
+
var AI_DURATION_MS = 8e3;
|
|
50
|
+
var bubbleTimer = null;
|
|
51
|
+
function getBubble() {
|
|
52
|
+
return document.getElementById(BUBBLE_ELEMENT_ID);
|
|
53
|
+
}
|
|
54
|
+
function truncateText(text, maxLen = 60) {
|
|
55
|
+
if (text.length <= maxLen) return text;
|
|
56
|
+
return text.slice(0, maxLen - 3) + "...";
|
|
57
|
+
}
|
|
58
|
+
function showBubble(text, durationMs = DEFAULT_DURATION_MS) {
|
|
59
|
+
const el = getBubble();
|
|
60
|
+
if (!el) return;
|
|
61
|
+
if (bubbleTimer !== null) {
|
|
62
|
+
clearTimeout(bubbleTimer);
|
|
63
|
+
bubbleTimer = null;
|
|
64
|
+
}
|
|
65
|
+
el.textContent = truncateText(text);
|
|
66
|
+
el.classList.remove(HIDDEN_CLASS);
|
|
67
|
+
bubbleTimer = setTimeout(() => {
|
|
68
|
+
el.classList.add(HIDDEN_CLASS);
|
|
69
|
+
bubbleTimer = null;
|
|
70
|
+
}, durationMs);
|
|
71
|
+
}
|
|
72
|
+
function showAiBubble(text) {
|
|
73
|
+
showBubble(text, AI_DURATION_MS);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// src/renderer/click-through.ts
|
|
77
|
+
function initClickThrough(win, petEl2) {
|
|
78
|
+
win.setIgnoreMouseEvents(true, { forward: true });
|
|
79
|
+
petEl2.addEventListener("mouseenter", () => {
|
|
80
|
+
win.setIgnoreMouseEvents(false);
|
|
81
|
+
});
|
|
82
|
+
petEl2.addEventListener("mouseleave", () => {
|
|
83
|
+
win.setIgnoreMouseEvents(true, { forward: true });
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// src/renderer/drag.ts
|
|
88
|
+
var dragging = false;
|
|
89
|
+
var startX = 0;
|
|
90
|
+
var startY = 0;
|
|
91
|
+
var clickCount = 0;
|
|
92
|
+
var clickTimer = null;
|
|
93
|
+
var CLICK_WINDOW_MS = 1500;
|
|
94
|
+
var CLICK_MESSAGES = [
|
|
95
|
+
{ threshold: 2, text: "\u4F60\u6233\u6211\u5E72\u561B\uFF1F" },
|
|
96
|
+
{ threshold: 4, text: "\u597D\u75DB\uFF01\u522B\u6233\u4E86\uFF01" },
|
|
97
|
+
{ threshold: 6, text: "\u518D\u70B9\u6211\u5C31\u4E0D\u7406\u4F60\u4E86\uFF01", state: "failed" },
|
|
98
|
+
{ threshold: 9, text: "\u545C\u545C...\u4F60\u6B3A\u8D1F\u4EBA", state: "failed" },
|
|
99
|
+
{ threshold: 12, text: "\u6211\u8981\u62A5\u8B66\u4E86\uFF01\u518D\u70B9\u4E00\u4E0B\u8BD5\u8BD5\uFF01", state: "jumping" },
|
|
100
|
+
{ threshold: 15, text: "\u2728 \u52C7\u6562\u7684\u5192\u9669\u8005\uFF0C\u4F60\u89E3\u9501\u4E86\u9690\u85CF\u6210\u5C31\uFF01", state: "jumping" }
|
|
101
|
+
];
|
|
102
|
+
function handleClick() {
|
|
103
|
+
clickCount++;
|
|
104
|
+
if (clickTimer) clearTimeout(clickTimer);
|
|
105
|
+
clickTimer = setTimeout(() => {
|
|
106
|
+
clickCount = 0;
|
|
107
|
+
}, CLICK_WINDOW_MS);
|
|
108
|
+
let matched = CLICK_MESSAGES[0];
|
|
109
|
+
for (const msg of CLICK_MESSAGES) {
|
|
110
|
+
if (clickCount >= msg.threshold) matched = msg;
|
|
111
|
+
}
|
|
112
|
+
if (clickCount >= CLICK_MESSAGES[0].threshold) {
|
|
113
|
+
showBubble(matched.text, 4e3);
|
|
114
|
+
if (matched.state) setPetAction(matched.state);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
function initDrag(petEl2, win) {
|
|
118
|
+
petEl2.addEventListener("mousedown", (e) => {
|
|
119
|
+
dragging = true;
|
|
120
|
+
startX = e.screenX;
|
|
121
|
+
startY = e.screenY;
|
|
122
|
+
e.preventDefault();
|
|
123
|
+
handleClick();
|
|
124
|
+
});
|
|
125
|
+
document.addEventListener("mousemove", (e) => {
|
|
126
|
+
if (!dragging) return;
|
|
127
|
+
const [wx, wy] = win.getPosition();
|
|
128
|
+
win.setPosition(wx + e.screenX - startX, wy + e.screenY - startY);
|
|
129
|
+
startX = e.screenX;
|
|
130
|
+
startY = e.screenY;
|
|
131
|
+
});
|
|
132
|
+
document.addEventListener("mouseup", () => {
|
|
133
|
+
dragging = false;
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// src/renderer/renderer.ts
|
|
138
|
+
var import_electron = __require("electron");
|
|
139
|
+
var import_remote = __require("@electron/remote");
|
|
140
|
+
var WINDOW_W = 300;
|
|
141
|
+
var WINDOW_H = 320;
|
|
142
|
+
var MARGIN = 20;
|
|
143
|
+
var petEl = document.getElementById("pet-sprite");
|
|
144
|
+
var bubbleEl = document.getElementById("bubble");
|
|
145
|
+
var containerEl = document.getElementById("pet-container");
|
|
146
|
+
function getPetWindow() {
|
|
147
|
+
return (0, import_remote.getCurrentWindow)();
|
|
148
|
+
}
|
|
149
|
+
function positionBottomRight() {
|
|
150
|
+
try {
|
|
151
|
+
const display = import_remote.screen.getPrimaryDisplay();
|
|
152
|
+
const { x, y, width, height } = display.workArea;
|
|
153
|
+
const win = getPetWindow();
|
|
154
|
+
win.setPosition(
|
|
155
|
+
x + width - WINDOW_W - MARGIN,
|
|
156
|
+
y + height - WINDOW_H - MARGIN
|
|
157
|
+
);
|
|
158
|
+
} catch {
|
|
159
|
+
const win = getPetWindow();
|
|
160
|
+
win.setPosition(
|
|
161
|
+
window.screen.width - WINDOW_W - MARGIN,
|
|
162
|
+
window.screen.height - WINDOW_H - MARGIN
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
function init() {
|
|
167
|
+
if (!petEl) return;
|
|
168
|
+
positionBottomRight();
|
|
169
|
+
initClickThrough(getPetWindow(), petEl);
|
|
170
|
+
initDrag(petEl, getPetWindow());
|
|
171
|
+
setPetAction("idle");
|
|
172
|
+
petEl.addEventListener("contextmenu", (e) => {
|
|
173
|
+
e.preventDefault();
|
|
174
|
+
import_electron.ipcRenderer.send("show-context-menu");
|
|
175
|
+
});
|
|
176
|
+
import_electron.ipcRenderer.on("pet-action", (_event, action) => {
|
|
177
|
+
if (action.stateId) setPetAction(action.stateId);
|
|
178
|
+
if (action.bubbleText) showBubble(action.bubbleText);
|
|
179
|
+
});
|
|
180
|
+
import_electron.ipcRenderer.on("ai-speech", (_event, data) => {
|
|
181
|
+
if (data.text) showAiBubble(data.text);
|
|
182
|
+
});
|
|
183
|
+
import_electron.ipcRenderer.on("level-up", (_event, data) => {
|
|
184
|
+
showBubble(`Level up! ${data.levelName}!`);
|
|
185
|
+
updateLevelEffects(data.level);
|
|
186
|
+
});
|
|
187
|
+
import_electron.ipcRenderer.on("pet-switched", (_event, slug) => {
|
|
188
|
+
loadPetSprite(slug);
|
|
189
|
+
});
|
|
190
|
+
import_electron.ipcRenderer.on("state", (_event, state) => {
|
|
191
|
+
loadPetSprite(state.petSlug);
|
|
192
|
+
updateLevelEffects(state.level);
|
|
193
|
+
});
|
|
194
|
+
import_electron.ipcRenderer.send("get-state");
|
|
195
|
+
}
|
|
196
|
+
function loadPetSprite(slug) {
|
|
197
|
+
if (!slug) return;
|
|
198
|
+
const homeDir = (process.env.USERPROFILE || process.env.HOME || "").replace(/\\/g, "/");
|
|
199
|
+
const exts = ["webp", "png"];
|
|
200
|
+
for (const ext of exts) {
|
|
201
|
+
const path = `file:///${homeDir}/.petdex-cc/pets/${slug}/spritesheet.${ext}`;
|
|
202
|
+
setSpriteImage(path);
|
|
203
|
+
break;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
var LEVEL_NAMES = {
|
|
207
|
+
1: "Byte",
|
|
208
|
+
2: "Process",
|
|
209
|
+
3: "Thread",
|
|
210
|
+
4: "Module",
|
|
211
|
+
5: "Kernel",
|
|
212
|
+
6: "Neural",
|
|
213
|
+
7: "Quantum",
|
|
214
|
+
8: "Singularity"
|
|
215
|
+
};
|
|
216
|
+
var LEVEL_COLORS = {
|
|
217
|
+
1: "#94a3b8",
|
|
218
|
+
2: "#4ade80",
|
|
219
|
+
3: "#60a5fa",
|
|
220
|
+
4: "#a78bfa",
|
|
221
|
+
5: "#f59e0b",
|
|
222
|
+
6: "#ec4899",
|
|
223
|
+
7: "#06b6d4",
|
|
224
|
+
8: "#fbbf24"
|
|
225
|
+
};
|
|
226
|
+
function updateLevelEffects(level) {
|
|
227
|
+
document.documentElement.style.setProperty("--lv-color", LEVEL_COLORS[level] ?? "#94a3b8");
|
|
228
|
+
const badge = document.getElementById("level-badge");
|
|
229
|
+
if (badge) {
|
|
230
|
+
badge.textContent = `Lv${level} ${LEVEL_NAMES[level] ?? ""}`;
|
|
231
|
+
badge.style.display = level >= 2 ? "block" : "none";
|
|
232
|
+
}
|
|
233
|
+
const glow = document.getElementById("level-glow");
|
|
234
|
+
if (glow) glow.classList.toggle("active", level >= 2);
|
|
235
|
+
const aura = document.getElementById("level-aura");
|
|
236
|
+
if (aura) aura.classList.toggle("active", level >= 3);
|
|
237
|
+
document.querySelectorAll(".level-particle").forEach((p) => {
|
|
238
|
+
p.classList.toggle("active", level >= 5);
|
|
239
|
+
});
|
|
240
|
+
const halo = document.getElementById("level-halo");
|
|
241
|
+
if (halo) halo.classList.toggle("active", level >= 8);
|
|
242
|
+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AAC,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;IAEH,MAAM,IAAI,GAAG,QAAQ,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;IACnD,IAAI,IAAI;QAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC;AACxD,CAAC;AAED,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { BrowserWindow } from "electron";
|
|
2
|
+
type Screen = Electron.Screen;
|
|
3
|
+
export declare function startWander(window: BrowserWindow, screenObjParam?: Screen): void;
|
|
4
|
+
export declare function stopWander(): void;
|
|
5
|
+
export declare function pauseWander(): void;
|
|
6
|
+
export declare function resumeWander(): void;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=wander.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wander.d.ts","sourceRoot":"","sources":["../../../src/renderer/wander.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG9C,KAAK,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;AA8G9B,wBAAgB,WAAW,CAAC,MAAM,EAAE,aAAa,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAKhF;AAED,wBAAgB,UAAU,IAAI,IAAI,CAKjC;AAED,wBAAgB,WAAW,IAAI,IAAI,CAElC;AAED,wBAAgB,YAAY,IAAI,IAAI,CAInC"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { setPetAction } from "./pet-sprite.js";
|
|
2
|
+
let wanderRafId = null;
|
|
3
|
+
let paused = false;
|
|
4
|
+
let dx = 0;
|
|
5
|
+
let dy = 0;
|
|
6
|
+
let moveFrames = 0;
|
|
7
|
+
const SPEED = 1;
|
|
8
|
+
const MOVE_DURATION_MIN = 5 * 60; // 5 seconds at 60fps
|
|
9
|
+
const MOVE_DURATION_MAX = 12 * 60;
|
|
10
|
+
const IDLE_DURATION_MIN = 2 * 60;
|
|
11
|
+
const IDLE_DURATION_MAX = 4 * 60;
|
|
12
|
+
let screenObj = null;
|
|
13
|
+
function randomInt(min, max) {
|
|
14
|
+
return Math.floor(Math.random() * (max - min + 1)) + min;
|
|
15
|
+
}
|
|
16
|
+
/** Get usable screen area (safe bounds for the pet). */
|
|
17
|
+
function getScreenBounds() {
|
|
18
|
+
if (screenObj) {
|
|
19
|
+
try {
|
|
20
|
+
const displays = screenObj.getAllDisplays();
|
|
21
|
+
if (displays.length > 0) {
|
|
22
|
+
let minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;
|
|
23
|
+
for (const d of displays) {
|
|
24
|
+
const w = d.workArea;
|
|
25
|
+
minX = Math.min(minX, w.x);
|
|
26
|
+
minY = Math.min(minY, w.y);
|
|
27
|
+
maxX = Math.max(maxX, w.x + w.width);
|
|
28
|
+
maxY = Math.max(maxY, w.y + w.height);
|
|
29
|
+
}
|
|
30
|
+
return { minX, minY, maxX, maxY };
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
catch { }
|
|
34
|
+
}
|
|
35
|
+
// Fallback: use primary screen from web API
|
|
36
|
+
return {
|
|
37
|
+
minX: 0,
|
|
38
|
+
minY: 0,
|
|
39
|
+
maxX: window.screen.width,
|
|
40
|
+
maxY: window.screen.height,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function pickNewDirection() {
|
|
44
|
+
dx = randomInt(-1, 1);
|
|
45
|
+
dy = randomInt(-1, 1);
|
|
46
|
+
if (dx === 0 && dy === 0)
|
|
47
|
+
dx = Math.random() < 0.5 ? -1 : 1;
|
|
48
|
+
moveFrames = randomInt(MOVE_DURATION_MIN, MOVE_DURATION_MAX);
|
|
49
|
+
if (dx > 0)
|
|
50
|
+
setPetAction("running-right");
|
|
51
|
+
else if (dx < 0)
|
|
52
|
+
setPetAction("running-left");
|
|
53
|
+
}
|
|
54
|
+
function pickIdle() {
|
|
55
|
+
dx = 0;
|
|
56
|
+
dy = 0;
|
|
57
|
+
moveFrames = randomInt(IDLE_DURATION_MIN, IDLE_DURATION_MAX);
|
|
58
|
+
const actions = ["idle", "waiting", "waving"];
|
|
59
|
+
setPetAction(actions[randomInt(0, actions.length - 1)]);
|
|
60
|
+
}
|
|
61
|
+
function wanderTick(window) {
|
|
62
|
+
if (paused) {
|
|
63
|
+
wanderRafId = requestAnimationFrame(() => wanderTick(window));
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
// Segment finished → pick next action
|
|
67
|
+
if (moveFrames <= 0) {
|
|
68
|
+
if (Math.random() < 0.4) {
|
|
69
|
+
pickIdle();
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
pickNewDirection();
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
// Only move if we have a direction
|
|
76
|
+
if (dx !== 0 || dy !== 0) {
|
|
77
|
+
const [wx, wy] = window.getPosition();
|
|
78
|
+
const [ww, wh] = window.getSize();
|
|
79
|
+
const { minX, minY, maxX, maxY } = getScreenBounds();
|
|
80
|
+
let nx = wx + dx * SPEED;
|
|
81
|
+
let ny = wy + dy * SPEED;
|
|
82
|
+
// Bounce: clamp position AND reverse direction
|
|
83
|
+
let bounced = false;
|
|
84
|
+
if (nx < minX) {
|
|
85
|
+
nx = minX;
|
|
86
|
+
dx = 1;
|
|
87
|
+
bounced = true;
|
|
88
|
+
}
|
|
89
|
+
if (nx + ww > maxX) {
|
|
90
|
+
nx = maxX - ww;
|
|
91
|
+
dx = -1;
|
|
92
|
+
bounced = true;
|
|
93
|
+
}
|
|
94
|
+
if (ny < minY) {
|
|
95
|
+
ny = minY;
|
|
96
|
+
dy = 1;
|
|
97
|
+
bounced = true;
|
|
98
|
+
}
|
|
99
|
+
if (ny + wh > maxY) {
|
|
100
|
+
ny = maxY - wh;
|
|
101
|
+
dy = -1;
|
|
102
|
+
bounced = true;
|
|
103
|
+
}
|
|
104
|
+
if (bounced) {
|
|
105
|
+
// Give a fresh segment after bounce so the pet walks away clearly
|
|
106
|
+
moveFrames = randomInt(MOVE_DURATION_MIN, MOVE_DURATION_MAX);
|
|
107
|
+
if (dx > 0)
|
|
108
|
+
setPetAction("running-right");
|
|
109
|
+
else if (dx < 0)
|
|
110
|
+
setPetAction("running-left");
|
|
111
|
+
}
|
|
112
|
+
window.setPosition(Math.round(nx), Math.round(ny));
|
|
113
|
+
}
|
|
114
|
+
moveFrames--;
|
|
115
|
+
wanderRafId = requestAnimationFrame(() => wanderTick(window));
|
|
116
|
+
}
|
|
117
|
+
export function startWander(window, screenObjParam) {
|
|
118
|
+
screenObj = screenObjParam ?? null;
|
|
119
|
+
paused = false;
|
|
120
|
+
pickNewDirection();
|
|
121
|
+
wanderRafId = requestAnimationFrame(() => wanderTick(window));
|
|
122
|
+
}
|
|
123
|
+
export function stopWander() {
|
|
124
|
+
if (wanderRafId !== null) {
|
|
125
|
+
cancelAnimationFrame(wanderRafId);
|
|
126
|
+
wanderRafId = null;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
export function pauseWander() {
|
|
130
|
+
paused = true;
|
|
131
|
+
}
|
|
132
|
+
export function resumeWander() {
|
|
133
|
+
paused = false;
|
|
134
|
+
// Pick a fresh direction from current position so pet doesn't jump back
|
|
135
|
+
pickNewDirection();
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=wander.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wander.js","sourceRoot":"","sources":["../../../src/renderer/wander.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAI/C,IAAI,WAAW,GAAkB,IAAI,CAAC;AACtC,IAAI,MAAM,GAAG,KAAK,CAAC;AAEnB,IAAI,EAAE,GAAG,CAAC,CAAC;AACX,IAAI,EAAE,GAAG,CAAC,CAAC;AACX,IAAI,UAAU,GAAG,CAAC,CAAC;AAEnB,MAAM,KAAK,GAA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AW;IACzB,MAAM,GAAG,IAAI,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,YAAY;IAC1B,MAAM,GAAG,KAAK,CAAC;IACf,wEAAwE;IACxE,gBAAgB,EAAE,CAAC;AACrB,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { PetStateId } from "./pet-states.js";
|
|
2
|
+
type CommonHookFields = {
|
|
3
|
+
session_id: string;
|
|
4
|
+
transcript_path: string;
|
|
5
|
+
cwd: string;
|
|
6
|
+
hook_event_name: string;
|
|
7
|
+
};
|
|
8
|
+
export type SessionStartEvent = CommonHookFields & {
|
|
9
|
+
hook_event_name: "SessionStart";
|
|
10
|
+
source: "startup" | "resume" | "clear" | "compact";
|
|
11
|
+
model: string;
|
|
12
|
+
};
|
|
13
|
+
export type PostToolUseEvent = CommonHookFields & {
|
|
14
|
+
hook_event_name: "PostToolUse";
|
|
15
|
+
tool_name: string;
|
|
16
|
+
tool_input: Record<string, unknown>;
|
|
17
|
+
tool_response?: unknown;
|
|
18
|
+
tool_use_id: string;
|
|
19
|
+
duration_ms?: number;
|
|
20
|
+
};
|
|
21
|
+
export type PostToolUseFailureEvent = CommonHookFields & {
|
|
22
|
+
hook_event_name: "PostToolUseFailure";
|
|
23
|
+
tool_name: string;
|
|
24
|
+
tool_input: Record<string, unknown>;
|
|
25
|
+
tool_use_id: string;
|
|
26
|
+
error: string;
|
|
27
|
+
duration_ms?: number;
|
|
28
|
+
};
|
|
29
|
+
export type StopEvent = CommonHookFields & {
|
|
30
|
+
hook_event_name: "Stop";
|
|
31
|
+
stop_hook_active: boolean;
|
|
32
|
+
last_assistant_message: string;
|
|
33
|
+
};
|
|
34
|
+
export type StopFailureEvent = CommonHookFields & {
|
|
35
|
+
hook_event_name: "StopFailure";
|
|
36
|
+
error: string;
|
|
37
|
+
error_details?: string;
|
|
38
|
+
};
|
|
39
|
+
export type NotificationEvent = CommonHookFields & {
|
|
40
|
+
hook_event_name: "Notification";
|
|
41
|
+
message: string;
|
|
42
|
+
title?: string;
|
|
43
|
+
notification_type: string;
|
|
44
|
+
};
|
|
45
|
+
export type TaskCompletedEvent = CommonHookFields & {
|
|
46
|
+
hook_event_name: "TaskCompleted";
|
|
47
|
+
task_id: string;
|
|
48
|
+
task_subject: string;
|
|
49
|
+
};
|
|
50
|
+
export type SessionEndEvent = CommonHookFields & {
|
|
51
|
+
hook_event_name: "SessionEnd";
|
|
52
|
+
reason: string;
|
|
53
|
+
};
|
|
54
|
+
export type HookEvent = SessionStartEvent | PostToolUseEvent | PostToolUseFailureEvent | StopEvent | StopFailureEvent | NotificationEvent | TaskCompletedEvent | SessionEndEvent;
|
|
55
|
+
export type PetAction = {
|
|
56
|
+
stateId: PetStateId;
|
|
57
|
+
bubbleText: string;
|
|
58
|
+
triggerAi: boolean;
|
|
59
|
+
aiScene?: string;
|
|
60
|
+
};
|
|
61
|
+
export {};
|
|
62
|
+
//# sourceMappingURL=events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/shared/events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,KAAK,gBAAgB,GAAG;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,gBAAgB,GAAG;IACjD,eAAe,EAAE,cAAc,CAAC;IAChC,MAAM,EAAE,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;IACnD,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,GAAG;IAChD,eAAe,EAAE,aAAa,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC,M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AgB,GAChB,uBAAuB,GACvB,SAAS,GACT,gBAAgB,GAChB,iBAAiB,GACjB,kBAAkB,GAClB,eAAe,CAAC;AAEpB,MAAM,MAAM,SAAS,GAAG;IACtB,OAAO,EAAE,UAAU,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../../src/shared/events.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type Level = {
|
|
2
|
+
level: number;
|
|
3
|
+
name: string;
|
|
4
|
+
eventsRequired: number;
|
|
5
|
+
effect: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const LEVELS: Level[];
|
|
8
|
+
export declare function getLevelForEvents(totalEvents: number): Level;
|
|
9
|
+
export type PersistedState = {
|
|
10
|
+
petSlug: string;
|
|
11
|
+
totalEvents: number;
|
|
12
|
+
level: number;
|
|
13
|
+
levelName: string;
|
|
14
|
+
createdAt: string;
|
|
15
|
+
lastActiveAt: string;
|
|
16
|
+
version: number;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=levels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"levels.d.ts","sourceRoot":"","sources":["../../../src/shared/levels.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,KAAK,GAAG;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAAK,EASzB,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,KAAK,CAQ5D;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export const LEVELS = [
|
|
2
|
+
{ level: 1, name: "Byte", eventsRequired: 0, effect: "None" },
|
|
3
|
+
{ level: 2, name: "Process", eventsRequired: 50, effect: "Slight glow" },
|
|
4
|
+
{ level: 3, name: "Thread", eventsRequired: 200, effect: "Small aura under feet" },
|
|
5
|
+
{ level: 4, name: "Module", eventsRequired: 500, effect: "Afterimage trail" },
|
|
6
|
+
{ level: 5, name: "Kernel", eventsRequired: 1000, effect: "Periodic particles" },
|
|
7
|
+
{ level: 6, name: "Neural", eventsRequired: 2000, effect: "Icon flash above head" },
|
|
8
|
+
{ level: 7, name: "Quantum", eventsRequired: 5000, effect: "Teleport flicker" },
|
|
9
|
+
{ level: 8, name: "Singularity", eventsRequired: 10000, effect: "Golden halo + all effects" },
|
|
10
|
+
];
|
|
11
|
+
export function getLevelForEvents(totalEvents) {
|
|
12
|
+
let result = LEVELS[0];
|
|
13
|
+
for (const lvl of LEVELS) {
|
|
14
|
+
if (lvl.eventsRequired <= totalEvents) {
|
|
15
|
+
result = lvl;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return result;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=levels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"levels.js","sourceRoot":"","sources":["../../../src/shared/levels.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,MAAM,GAAY;IAC7B,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE;IAC7D,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,EAAE,aAAa,EAAE;IACxE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,EAAE,uBAAuB,EAAE;IAClF,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,EAAE,kBAAkB,EAAE;IAC7E,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,EAAE,oBAAoB,EAAE;IAChF,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,EAAE,uBAAuB,EAAE;IACnF,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,EAAE,kBAAkB,EAAE;IAC/E,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,EAAE,2BAA2B,EAAE;CAC9F,CAAC;AAEF,MAAM,UAAU,iBAAiB,CAAC,WAAmB;IACnD,IAAI,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IACvB,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;QACzB,IAAI,GAAG,CAAC,cAAc,IAAI,WAAW,EAAE,CAAC;YACtC,MAAM,GAAG,GAAG,CAAC;QACf,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
export type PetStateId = "idle" | "running-right" | "running-left" | "waving" | "jumping" | "failed" | "waiting" | "running" | "review";
|
|
2
|
+
export type PetState = {
|
|
3
|
+
id: PetStateId;
|
|
4
|
+
label: string;
|
|
5
|
+
row: number;
|
|
6
|
+
frames: number;
|
|
7
|
+
durationMs: number;
|
|
8
|
+
};
|
|
9
|
+
export declare const petStates: [{
|
|
10
|
+
readonly id: "idle";
|
|
11
|
+
readonly label: "Idle";
|
|
12
|
+
readonly row: 0;
|
|
13
|
+
readonly frames: 6;
|
|
14
|
+
readonly durationMs: 1100;
|
|
15
|
+
}, {
|
|
16
|
+
readonly id: "running-right";
|
|
17
|
+
readonly label: "Running Right";
|
|
18
|
+
readonly row: 1;
|
|
19
|
+
readonly frames: 8;
|
|
20
|
+
readonly durationMs: 1060;
|
|
21
|
+
}, {
|
|
22
|
+
readonly id: "running-left";
|
|
23
|
+
readonly label: "Running Left";
|
|
24
|
+
readonly row: 2;
|
|
25
|
+
readonly frames: 8;
|
|
26
|
+
readonly durationMs: 1060;
|
|
27
|
+
}, {
|
|
28
|
+
readonly id: "waving";
|
|
29
|
+
readonly label: "Waving";
|
|
30
|
+
readonly row: 3;
|
|
31
|
+
readonly frames: 4;
|
|
32
|
+
readonly durationMs: 700;
|
|
33
|
+
}, {
|
|
34
|
+
readonly id: "jumping";
|
|
35
|
+
readonly label: "Jumping";
|
|
36
|
+
readonly row: 4;
|
|
37
|
+
readonly frames: 5;
|
|
38
|
+
readonly durationMs: 840;
|
|
39
|
+
}, {
|
|
40
|
+
readonly id: "failed";
|
|
41
|
+
readonly label: "Failed";
|
|
42
|
+
readonly row: 5;
|
|
43
|
+
readonly frames: 8;
|
|
44
|
+
readonly durationMs: 1220;
|
|
45
|
+
}, {
|
|
46
|
+
readonly id: "waiting";
|
|
47
|
+
readonly label: "Waiting";
|
|
48
|
+
readonly row: 6;
|
|
49
|
+
readonly frames: 6;
|
|
50
|
+
readonly durationMs: 1010;
|
|
51
|
+
}, {
|
|
52
|
+
readonly id: "running";
|
|
53
|
+
readonly label: "Running";
|
|
54
|
+
readonly row: 7;
|
|
55
|
+
readonly frames: 6;
|
|
56
|
+
readonly durationMs: 820;
|
|
57
|
+
}, {
|
|
58
|
+
readonly id: "review";
|
|
59
|
+
readonly label: "Review";
|
|
60
|
+
readonly row: 8;
|
|
61
|
+
readonly frames: 6;
|
|
62
|
+
readonly durationMs: 1030;
|
|
63
|
+
}];
|
|
64
|
+
export declare function getPetStateById(id: PetStateId): PetState;
|
|
65
|
+
export declare const defaultPetState: {
|
|
66
|
+
readonly id: "idle";
|
|
67
|
+
readonly label: "Idle";
|
|
68
|
+
readonly row: 0;
|
|
69
|
+
readonly frames: 6;
|
|
70
|
+
readonly durationMs: 1100;
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=pet-states.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pet-states.d.ts","sourceRoot":"","sources":["../../../src/shared/pet-states.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAClB,MAAM,GACN,eAAe,GACf,cAAc,GACd,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,SAAS,GACT,SAAS,GACT,QAAQ,CAAC;AAEb,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,EAAE,UAAU,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUS,CAAC;AAEhC,wBAAgB,eAAe,CAAC,EAAE,EAAE,UAAU,GAAG,QAAQ,CAMxD;AAED,eAAO,MAAM,eAAe;;;;;;CAAe,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export const petStates = [
|
|
2
|
+
{ id: "idle", label: "Idle", row: 0, frames: 6, durationMs: 1100 },
|
|
3
|
+
{ id: "running-right", label: "Running Right", row: 1, frames: 8, durationMs: 1060 },
|
|
4
|
+
{ id: "running-left", label: "Running Left", row: 2, frames: 8, durationMs: 1060 },
|
|
5
|
+
{ id: "waving", label: "Waving", row: 3, frames: 4, durationMs: 700 },
|
|
6
|
+
{ id: "jumping", label: "Jumping", row: 4, frames: 5, durationMs: 840 },
|
|
7
|
+
{ id: "failed", label: "Failed", row: 5, frames: 8, durationMs: 1220 },
|
|
8
|
+
{ id: "waiting", label: "Waiting", row: 6, frames: 6, durationMs: 1010 },
|
|
9
|
+
{ id: "running", label: "Running", row: 7, frames: 6, durationMs: 820 },
|
|
10
|
+
{ id: "review", label: "Review", row: 8, frames: 6, durationMs: 1030 },
|
|
11
|
+
];
|
|
12
|
+
export function getPetStateById(id) {
|
|
13
|
+
const state = petStates.find((s) => s.id === id);
|
|
14
|
+
if (!state) {
|
|
15
|
+
throw new Error(`Unknown PetStateId: ${id}`);
|
|
16
|
+
}
|
|
17
|
+
return state;
|
|
18
|
+
}
|
|
19
|
+
export const defaultPetState = petStates[0];
|
|
20
|
+
//# sourceMappingURL=pet-states.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pet-states.js","sourceRoot":"","sources":["../../../src/shared/pet-states.ts"],"names":[],"mappings":"AAmBA,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE;IAClE,EAAE,EAAE,EAAE,eAAe,EAAE,KAAK,EAAE,eAAe,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE;IACpF,EAAE,EAAE,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE;IAClF,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM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