@simpludify/web 0.1.5 → 0.1.6
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 +3 -3
- package/dist/game.d.ts +3 -1
- package/dist/gamepad-bindings.d.ts +2 -100
- package/dist/gamepads.d.ts +11 -2
- package/dist/index.js +361 -140
- package/dist/index.js.map +1 -1
- package/dist/input-capture.d.ts +33 -0
- package/dist/pointer.d.ts +12 -2
- package/package.json +2 -2
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { InputCapture, type InputCaptureOptions, type InputSystem, type Scene } from "@simpludify/core";
|
|
2
|
+
import type { GamepadState } from "./gamepads.js";
|
|
3
|
+
/** @internal One Game-owned observer; existing adapters retain gameplay ownership. */
|
|
4
|
+
export declare class InputCaptureManager {
|
|
5
|
+
private readonly host;
|
|
6
|
+
private readonly input;
|
|
7
|
+
private readonly scene;
|
|
8
|
+
private readonly releasePointers;
|
|
9
|
+
private readonly report;
|
|
10
|
+
private readonly abort;
|
|
11
|
+
private current;
|
|
12
|
+
private readonly keys;
|
|
13
|
+
private readonly blockedKeys;
|
|
14
|
+
private readonly blockedPointers;
|
|
15
|
+
private readonly blockedAuxiliary;
|
|
16
|
+
private mouseButtons;
|
|
17
|
+
private needsPadSample;
|
|
18
|
+
private pads;
|
|
19
|
+
private readonly readyPads;
|
|
20
|
+
private dead;
|
|
21
|
+
constructor(host: HTMLElement, input: InputSystem, scene: () => Scene, releasePointers: () => void, report: (error: unknown) => void);
|
|
22
|
+
start(options?: InputCaptureOptions): InputCapture;
|
|
23
|
+
private arm;
|
|
24
|
+
private keyDown;
|
|
25
|
+
private surface;
|
|
26
|
+
private pointer;
|
|
27
|
+
/** Same validated gamepad poll as gameplay; no navigator polling in this manager. */
|
|
28
|
+
sample(pads: ReadonlyMap<number, GamepadState>): void;
|
|
29
|
+
private consume;
|
|
30
|
+
private guard;
|
|
31
|
+
private interrupt;
|
|
32
|
+
dispose(): void;
|
|
33
|
+
}
|
package/dist/pointer.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PointerInfo } from "@simpludify/core";
|
|
1
|
+
import type { InputSystem, PointerInfo } from "@simpludify/core";
|
|
2
2
|
import { PointerRouting, type ViewTransform, type WorldPoint } from "@simpludify/core";
|
|
3
3
|
/** One DOM capture-phase adapter per Game; Pixi federated events never route these widgets. */
|
|
4
4
|
export declare class BrowserPointer {
|
|
@@ -6,8 +6,14 @@ export declare class BrowserPointer {
|
|
|
6
6
|
private readonly project;
|
|
7
7
|
private readonly report;
|
|
8
8
|
private readonly flush;
|
|
9
|
+
private readonly input?;
|
|
9
10
|
readonly routing: PointerRouting;
|
|
10
11
|
private readonly abort;
|
|
12
|
+
private readonly mouse;
|
|
13
|
+
private readonly mouseStates;
|
|
14
|
+
private readonly blockedMouse;
|
|
15
|
+
private readonly auxiliary;
|
|
16
|
+
private readonly offInput;
|
|
11
17
|
constructor(host: HTMLElement, project: (event: {
|
|
12
18
|
clientX: number;
|
|
13
19
|
clientY: number;
|
|
@@ -15,7 +21,11 @@ export declare class BrowserPointer {
|
|
|
15
21
|
screen: PointerInfo["screen"];
|
|
16
22
|
world: WorldPoint;
|
|
17
23
|
view: ViewTransform;
|
|
18
|
-
}, report: (error: unknown) => void, flush: () => void);
|
|
24
|
+
}, report: (error: unknown) => void, flush: () => void, input?: InputSystem | undefined);
|
|
25
|
+
private applyMouse;
|
|
26
|
+
private releaseMouse;
|
|
27
|
+
private updateMouse;
|
|
28
|
+
private resetMouse;
|
|
19
29
|
private surface;
|
|
20
30
|
private data;
|
|
21
31
|
private guard;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simpludify/web",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"./package.json": "./package.json"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@simpludify/core": "0.1.
|
|
17
|
+
"@simpludify/core": "0.1.6",
|
|
18
18
|
"pixi.js": "8.22.0"
|
|
19
19
|
},
|
|
20
20
|
"description": "Browser host, PixiJS rendering and input for the experimental Simpludify 2D engine.",
|