@algorisys/yappydraw 0.8.267 → 0.8.269
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/README.md +2 -2
- package/chunks/{canva-ai-B4dgM7pp.js → canva-ai-BkG9bKiO.js} +1 -1
- package/chunks/{choice-dialog-state-CDsZoy1W.js → choice-dialog-state-CdWJAMoe.js} +1 -1
- package/chunks/{design-generator-DAsCB9PH.js → design-generator-C1HROSMB.js} +5 -5
- package/chunks/{drawing-engine-HTzU4Q_O.js → drawing-engine-DolRvTFi.js} +1 -1
- package/chunks/{drawings-store-Dm0mVRe3.js → drawings-store-DENBAm4r.js} +1 -1
- package/chunks/{ds-operations-baszHTUk.js → ds-operations-B2OLkKgx.js} +1 -1
- package/chunks/{export-game-C5NMkNN6.js → export-game-aXEw7eIh.js} +11 -11
- package/chunks/{game-runtime-DdWeXqPV.js → game-runtime-Co1XPqU6.js} +20 -20
- package/chunks/{index-DdYrWfgJ.js → index-N8KIsBvL.js} +9153 -8946
- package/chunks/{lucide-solid-B0fI6kFQ.js → lucide-solid-BAhUURVQ.js} +1 -1
- package/chunks/{markdown-to-slides-DnZKrGVv.js → markdown-to-slides-_SQjfqEn.js} +1 -1
- package/chunks/{morph-animator-DnmxlOT9.js → morph-animator-DJ5foG2l.js} +1 -1
- package/chunks/{onboarding-tour-CBqwHjWY.js → onboarding-tour-CwCg8HQa.js} +1 -1
- package/chunks/{search-D4jYIXJw.js → search-DeYOOpjs.js} +2 -2
- package/chunks/{slide-generator-DZv934LN.js → slide-generator-rcobWUBi.js} +1 -1
- package/chunks/{turntable-ai-B5aQ8WIf.js → turntable-ai-CnuQXeFx.js} +1 -1
- package/package.json +1 -1
- package/yappy.js +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as o, b as m, d as b,
|
|
1
|
+
import { s as o, b as m, d as b, z as W, w as z, g as a, x as U, y as B } from "./index-N8KIsBvL.js";
|
|
2
2
|
const h = /* @__PURE__ */ new Set(), x = [], G = {
|
|
3
3
|
ArrowLeft: "left",
|
|
4
4
|
a: "left",
|
|
@@ -19,9 +19,9 @@ const h = /* @__PURE__ */ new Set(), x = [], G = {
|
|
|
19
19
|
x: "b",
|
|
20
20
|
X: "b",
|
|
21
21
|
Shift: "b"
|
|
22
|
-
},
|
|
22
|
+
}, j = (e) => {
|
|
23
23
|
h.has(e) || (h.add(e), I(e));
|
|
24
|
-
},
|
|
24
|
+
}, Q = (e) => {
|
|
25
25
|
h.delete(e);
|
|
26
26
|
}, I = (e) => {
|
|
27
27
|
for (const i of x) i.button === e && L(i.fn);
|
|
@@ -113,7 +113,7 @@ let $ = null, V = !1, E = () => {
|
|
|
113
113
|
};
|
|
114
114
|
const ie = (e) => {
|
|
115
115
|
E = e;
|
|
116
|
-
},
|
|
116
|
+
}, q = (e) => {
|
|
117
117
|
$ = e, E();
|
|
118
118
|
}, P = (e) => {
|
|
119
119
|
T = e, V = e, E();
|
|
@@ -134,13 +134,13 @@ const ie = (e) => {
|
|
|
134
134
|
const i = G[e.key];
|
|
135
135
|
i && h.delete(i);
|
|
136
136
|
};
|
|
137
|
-
let
|
|
138
|
-
function
|
|
137
|
+
let J = 0;
|
|
138
|
+
function X() {
|
|
139
139
|
const e = o.slides[o.activeSlideIndex] || o.slides[0];
|
|
140
140
|
return e ? { x: e.spatialPosition.x, y: e.spatialPosition.y, width: e.dimensions.width, height: e.dimensions.height } : { x: 0, y: 0, width: 800, height: 600 };
|
|
141
141
|
}
|
|
142
|
-
function
|
|
143
|
-
const e =
|
|
142
|
+
function Y() {
|
|
143
|
+
const e = X(), i = {
|
|
144
144
|
strokeColor: "transparent",
|
|
145
145
|
strokeWidth: 0,
|
|
146
146
|
strokeStyle: "solid",
|
|
@@ -154,7 +154,7 @@ function Z() {
|
|
|
154
154
|
roundness: null
|
|
155
155
|
}, s = (n, t, r, d, l, S) => {
|
|
156
156
|
const D = {
|
|
157
|
-
id: `game-${Date.now()}-${++
|
|
157
|
+
id: `game-${Date.now()}-${++J}`,
|
|
158
158
|
type: n,
|
|
159
159
|
x: t,
|
|
160
160
|
y: r,
|
|
@@ -240,17 +240,17 @@ function Z() {
|
|
|
240
240
|
t && B(t.id);
|
|
241
241
|
},
|
|
242
242
|
playAnim: (n, t) => {
|
|
243
|
-
n?.alive && import("./index-
|
|
243
|
+
n?.alive && import("./index-N8KIsBvL.js").then((r) => r.ap).then((r) => r.sequenceAnimator.playAnimation(n.id, { id: `bhv-${Date.now()}`, type: "preset", name: t, trigger: "programmatic" }, () => {
|
|
244
244
|
}));
|
|
245
245
|
},
|
|
246
246
|
goToPage: (n) => {
|
|
247
247
|
n >= 0 && n < o.slides.length && U(n);
|
|
248
248
|
},
|
|
249
249
|
sound: (n) => {
|
|
250
|
-
import("./index-
|
|
250
|
+
import("./index-N8KIsBvL.js").then((t) => t.aq).then((t) => t.playSfx(n));
|
|
251
251
|
},
|
|
252
252
|
music: (n) => {
|
|
253
|
-
import("./index-
|
|
253
|
+
import("./index-N8KIsBvL.js").then((t) => t.aq).then((t) => n ? t.startMusic() : t.stopMusic());
|
|
254
254
|
},
|
|
255
255
|
end: (n) => {
|
|
256
256
|
if (P(!0), n) {
|
|
@@ -266,13 +266,13 @@ function Z() {
|
|
|
266
266
|
});
|
|
267
267
|
}
|
|
268
268
|
},
|
|
269
|
-
pad: (n) =>
|
|
269
|
+
pad: (n) => q(n),
|
|
270
270
|
random: (n, t) => n + Math.random() * (t - n),
|
|
271
271
|
clamp: (n, t, r) => Math.max(t, Math.min(r, n))
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
274
|
const re = () => o.gameActive;
|
|
275
|
-
function
|
|
275
|
+
function Z(e) {
|
|
276
276
|
o.gameActive && p();
|
|
277
277
|
const i = e ?? o.gameScript;
|
|
278
278
|
if (!i?.trim())
|
|
@@ -295,7 +295,7 @@ ${i}`);
|
|
|
295
295
|
a("selection", []), a("gameActive", !0), a("appMode", "presentation");
|
|
296
296
|
}), W();
|
|
297
297
|
try {
|
|
298
|
-
s(
|
|
298
|
+
s(Y());
|
|
299
299
|
} catch (t) {
|
|
300
300
|
return m(`Game error: ${t?.message || t}`, "error"), p(), !1;
|
|
301
301
|
}
|
|
@@ -316,7 +316,7 @@ ${i}`);
|
|
|
316
316
|
return y = requestAnimationFrame(n), !0;
|
|
317
317
|
}
|
|
318
318
|
function p() {
|
|
319
|
-
if (y !== null && (cancelAnimationFrame(y), y = null), window.removeEventListener("keydown", K, !0), window.removeEventListener("keyup", O, !0), import("./index-
|
|
319
|
+
if (y !== null && (cancelAnimationFrame(y), y = null), window.removeEventListener("keydown", K, !0), window.removeEventListener("keyup", O, !0), import("./index-N8KIsBvL.js").then((e) => e.aq).then((e) => e.stopMusic()), h.clear(), w = [], x.length = 0, v.length = 0, g) {
|
|
320
320
|
const e = g;
|
|
321
321
|
g = null, b(() => {
|
|
322
322
|
a("elements", JSON.parse(e.elements)), a("selection", e.selection), a("activeSlideIndex", e.activeSlideIndex), a("appMode", e.appMode), a("gameActive", !1);
|
|
@@ -327,7 +327,7 @@ function p() {
|
|
|
327
327
|
}
|
|
328
328
|
function se() {
|
|
329
329
|
const e = F;
|
|
330
|
-
p(), e &&
|
|
330
|
+
p(), e && Z(e);
|
|
331
331
|
}
|
|
332
332
|
export {
|
|
333
333
|
A as Sprite,
|
|
@@ -337,10 +337,10 @@ export {
|
|
|
337
337
|
ne as gamePointerUp,
|
|
338
338
|
re as isGameRunning,
|
|
339
339
|
ie as onGameUiSignal,
|
|
340
|
-
|
|
341
|
-
|
|
340
|
+
j as padPress,
|
|
341
|
+
Q as padRelease,
|
|
342
342
|
$ as padVisibleOverride,
|
|
343
343
|
se as restartGame,
|
|
344
|
-
|
|
344
|
+
Z as startGame,
|
|
345
345
|
p as stopGame
|
|
346
346
|
};
|