@bloopjs/web 0.0.71 → 0.0.73
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/App.d.ts.map +1 -1
- package/dist/mod.js +5 -3
- package/dist/mod.js.map +5 -5
- package/package.json +3 -3
- package/src/App.ts +5 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bloopjs/web",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.73",
|
|
4
4
|
"author": "Neil Sarkar",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"typescript": "^5"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@bloopjs/bloop": "0.0.
|
|
37
|
-
"@bloopjs/engine": "0.0.
|
|
36
|
+
"@bloopjs/bloop": "0.0.73",
|
|
37
|
+
"@bloopjs/engine": "0.0.73",
|
|
38
38
|
"@preact/signals": "^1.3.1",
|
|
39
39
|
"partysocket": "^1.1.6",
|
|
40
40
|
"preact": "^10.25.4"
|
package/src/App.ts
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type Bloop,
|
|
3
|
-
type MountOptions,
|
|
4
|
-
mount,
|
|
5
|
-
type Sim,
|
|
6
|
-
} from "@bloopjs/bloop";
|
|
1
|
+
import { type Bloop, type MountOptions, mount, type Sim } from "@bloopjs/bloop";
|
|
7
2
|
import type { Key } from "@bloopjs/engine";
|
|
8
3
|
import { mouseButtonCodeToMouseButton, readTapeHeader } from "@bloopjs/engine";
|
|
9
4
|
import { DebugUi, type DebugUiOptions } from "./debugui/mod.ts";
|
|
@@ -180,7 +175,8 @@ export class App {
|
|
|
180
175
|
window.addEventListener("keyup", handleKeyup);
|
|
181
176
|
|
|
182
177
|
const handleMousemove = (event: MouseEvent) => {
|
|
183
|
-
if (shouldEmitInputs())
|
|
178
|
+
if (shouldEmitInputs())
|
|
179
|
+
this.sim.emit.mousemove(event.clientX, event.clientY);
|
|
184
180
|
};
|
|
185
181
|
window.addEventListener("mousemove", handleMousemove);
|
|
186
182
|
|
|
@@ -253,6 +249,7 @@ export class App {
|
|
|
253
249
|
if (this.sim.hasHistory) {
|
|
254
250
|
switch (event.key) {
|
|
255
251
|
case "4":
|
|
252
|
+
case ";":
|
|
256
253
|
debugState.onJumpBack.value?.();
|
|
257
254
|
break;
|
|
258
255
|
case ",":
|
|
@@ -264,6 +261,7 @@ export class App {
|
|
|
264
261
|
if (this.sim.isPaused) this.sim.seek(this.sim.time.frame + 1);
|
|
265
262
|
break;
|
|
266
263
|
case "8":
|
|
264
|
+
case "'":
|
|
267
265
|
debugState.onJumpForward.value?.();
|
|
268
266
|
break;
|
|
269
267
|
}
|