1681-engine 0.5.9 → 0.6.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/CHANGELOG.md +92 -1
- package/README.md +15 -6
- package/dist/1681-engine.js +588 -465
- package/dist/ai/behaviorTree.js +198 -0
- package/dist/ai/buildTree.js +54 -0
- package/dist/ambient/life/Birds.js +73 -0
- package/dist/ambient/life/Butterflies.js +43 -0
- package/dist/ambient/life/ChimneySmoke.js +50 -0
- package/dist/ambient/life/Drift.js +75 -0
- package/dist/ambient/life/Fireflies.js +52 -0
- package/dist/ambient/life/lifeMotion.js +49 -0
- package/dist/assets/AssetLoader.js +115 -70
- package/dist/assets/Prepainter.js +61 -0
- package/dist/assets/workerPainter.js +39 -0
- package/dist/audio/spatial.js +118 -0
- package/dist/cjs/electron/electronLike.d.ts +55 -0
- package/dist/cjs/electron/electronLike.js +7 -0
- package/dist/cjs/electron/index.d.ts +14 -0
- package/dist/cjs/electron/index.js +20 -0
- package/dist/cjs/electron/lockdown.d.ts +33 -0
- package/dist/cjs/electron/lockdown.js +69 -0
- package/dist/cjs/electron/lockdownRules.d.ts +28 -0
- package/dist/cjs/electron/lockdownRules.js +61 -0
- package/dist/cjs/electron/sessionStore.d.ts +40 -0
- package/dist/cjs/electron/sessionStore.js +77 -0
- package/dist/cjs/electron/shellId.d.ts +22 -0
- package/dist/cjs/electron/shellId.js +31 -0
- package/dist/cjs/electron/webFiles.d.ts +13 -0
- package/dist/cjs/electron/webFiles.js +52 -0
- package/dist/cjs/electron/webPatcher.d.ts +83 -0
- package/dist/cjs/electron/webPatcher.js +223 -0
- package/dist/cjs/electron/webPointers.d.ts +19 -0
- package/dist/cjs/electron/webPointers.js +35 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/updates/index.d.ts +8 -0
- package/dist/cjs/updates/index.js +21 -0
- package/dist/cjs/updates/manifest.d.ts +73 -0
- package/dist/cjs/updates/manifest.js +67 -0
- package/dist/cjs/updates/pickUpdate.d.ts +42 -0
- package/dist/cjs/updates/pickUpdate.js +52 -0
- package/dist/cjs/updates/webPlan.d.ts +20 -0
- package/dist/cjs/updates/webPlan.js +34 -0
- package/dist/dialogue/DialogueRunner.js +173 -0
- package/dist/dialogue/expr.js +137 -0
- package/dist/dialogue/validateDialogue.js +52 -0
- package/dist/ecs/prefab.js +94 -0
- package/dist/electron/lockdown.js +31 -0
- package/dist/electron/lockdownRules.js +42 -0
- package/dist/electron/sessionStore.js +48 -0
- package/dist/electron/shellId.js +18 -0
- package/dist/electron/webFiles.js +36 -0
- package/dist/electron/webPatcher.js +153 -0
- package/dist/electron/webPointers.js +25 -0
- package/dist/electron.js +19 -0
- package/dist/input/Actions.js +58 -27
- package/dist/input/InputCapture.js +98 -0
- package/dist/input/Keymap.js +32 -26
- package/dist/input/haptics.js +50 -0
- package/dist/input/inputTape.js +68 -0
- package/dist/mobile/backButton.js +40 -0
- package/dist/mobile/capacitor.js +48 -0
- package/dist/mobile/screen.js +31 -0
- package/dist/mobile.js +12 -0
- package/dist/nav/flowField.js +58 -0
- package/dist/nav/steering.js +77 -0
- package/dist/net/ApiClient.js +96 -0
- package/dist/net/InterpolationBuffer.js +30 -23
- package/dist/net/LagCompensator.js +100 -0
- package/dist/net/Room.js +122 -43
- package/dist/net/RoomHost.js +13 -4
- package/dist/net/SpatialHash.js +66 -0
- package/dist/pixel/lifeArt.js +83 -0
- package/dist/pixel.js +63 -58
- package/dist/react/ConfirmButton.js +24 -0
- package/dist/react/baseCss.js +1 -0
- package/dist/react/labels.js +7 -6
- package/dist/react/useJsonSelector.js +13 -0
- package/dist/react.js +73 -68
- package/dist/tilemap/TilemapView.js +57 -32
- package/dist/tilemap/autotile.js +103 -0
- package/dist/tilemap/collision.js +29 -18
- package/dist/tilemap/ldtk.js +21 -0
- package/dist/tilemap/ldtkParse.js +191 -0
- package/dist/types/ai/behaviorTree.d.ts +133 -0
- package/dist/types/ai/behaviorTree.d.ts.map +1 -0
- package/dist/types/ai/buildTree.d.ts +55 -0
- package/dist/types/ai/buildTree.d.ts.map +1 -0
- package/dist/types/ambient/life/Birds.d.ts +50 -0
- package/dist/types/ambient/life/Birds.d.ts.map +1 -0
- package/dist/types/ambient/life/Butterflies.d.ts +32 -0
- package/dist/types/ambient/life/Butterflies.d.ts.map +1 -0
- package/dist/types/ambient/life/ChimneySmoke.d.ts +37 -0
- package/dist/types/ambient/life/ChimneySmoke.d.ts.map +1 -0
- package/dist/types/ambient/life/Drift.d.ts +58 -0
- package/dist/types/ambient/life/Drift.d.ts.map +1 -0
- package/dist/types/ambient/life/Fireflies.d.ts +43 -0
- package/dist/types/ambient/life/Fireflies.d.ts.map +1 -0
- package/dist/types/ambient/life/lifeMotion.d.ts +63 -0
- package/dist/types/ambient/life/lifeMotion.d.ts.map +1 -0
- package/dist/types/assets/AssetLoader.d.ts +20 -0
- package/dist/types/assets/AssetLoader.d.ts.map +1 -1
- package/dist/types/assets/Prepainter.d.ts +64 -0
- package/dist/types/assets/Prepainter.d.ts.map +1 -0
- package/dist/types/assets/workerPainter.d.ts +21 -0
- package/dist/types/assets/workerPainter.d.ts.map +1 -0
- package/dist/types/audio/spatial.d.ts +107 -0
- package/dist/types/audio/spatial.d.ts.map +1 -0
- package/dist/types/dialogue/DialogueRunner.d.ts +78 -0
- package/dist/types/dialogue/DialogueRunner.d.ts.map +1 -0
- package/dist/types/dialogue/expr.d.ts +12 -0
- package/dist/types/dialogue/expr.d.ts.map +1 -0
- package/dist/types/dialogue/script.d.ts +78 -0
- package/dist/types/dialogue/script.d.ts.map +1 -0
- package/dist/types/dialogue/validateDialogue.d.ts +21 -0
- package/dist/types/dialogue/validateDialogue.d.ts.map +1 -0
- package/dist/types/ecs/prefab.d.ts +84 -0
- package/dist/types/ecs/prefab.d.ts.map +1 -0
- package/dist/types/electron/electronLike.d.ts +56 -0
- package/dist/types/electron/electronLike.d.ts.map +1 -0
- package/dist/types/electron/index.d.ts +15 -0
- package/dist/types/electron/index.d.ts.map +1 -0
- package/dist/types/electron/lockdown.d.ts +34 -0
- package/dist/types/electron/lockdown.d.ts.map +1 -0
- package/dist/types/electron/lockdownRules.d.ts +29 -0
- package/dist/types/electron/lockdownRules.d.ts.map +1 -0
- package/dist/types/electron/sessionStore.d.ts +41 -0
- package/dist/types/electron/sessionStore.d.ts.map +1 -0
- package/dist/types/electron/shellId.d.ts +23 -0
- package/dist/types/electron/shellId.d.ts.map +1 -0
- package/dist/types/electron/webFiles.d.ts +14 -0
- package/dist/types/electron/webFiles.d.ts.map +1 -0
- package/dist/types/electron/webPatcher.d.ts +84 -0
- package/dist/types/electron/webPatcher.d.ts.map +1 -0
- package/dist/types/electron/webPointers.d.ts +20 -0
- package/dist/types/electron/webPointers.d.ts.map +1 -0
- package/dist/types/index.d.ts +30 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/input/Actions.d.ts +14 -0
- package/dist/types/input/Actions.d.ts.map +1 -1
- package/dist/types/input/InputCapture.d.ts +53 -0
- package/dist/types/input/InputCapture.d.ts.map +1 -0
- package/dist/types/input/Keymap.d.ts +12 -6
- package/dist/types/input/Keymap.d.ts.map +1 -1
- package/dist/types/input/haptics.d.ts +42 -0
- package/dist/types/input/haptics.d.ts.map +1 -0
- package/dist/types/input/inputTape.d.ts +66 -0
- package/dist/types/input/inputTape.d.ts.map +1 -0
- package/dist/types/mobile/backButton.d.ts +30 -0
- package/dist/types/mobile/backButton.d.ts.map +1 -0
- package/dist/types/mobile/capacitor.d.ts +62 -0
- package/dist/types/mobile/capacitor.d.ts.map +1 -0
- package/dist/types/mobile/index.d.ts +4 -0
- package/dist/types/mobile/index.d.ts.map +1 -0
- package/dist/types/mobile/screen.d.ts +27 -0
- package/dist/types/mobile/screen.d.ts.map +1 -0
- package/dist/types/nav/flowField.d.ts +31 -0
- package/dist/types/nav/flowField.d.ts.map +1 -0
- package/dist/types/nav/steering.d.ts +47 -0
- package/dist/types/nav/steering.d.ts.map +1 -0
- package/dist/types/net/ApiClient.d.ts +74 -0
- package/dist/types/net/ApiClient.d.ts.map +1 -0
- package/dist/types/net/InterpolationBuffer.d.ts +5 -0
- package/dist/types/net/InterpolationBuffer.d.ts.map +1 -1
- package/dist/types/net/LagCompensator.d.ts +70 -0
- package/dist/types/net/LagCompensator.d.ts.map +1 -0
- package/dist/types/net/Room.d.ts +72 -3
- package/dist/types/net/Room.d.ts.map +1 -1
- package/dist/types/net/RoomHost.d.ts +8 -3
- package/dist/types/net/RoomHost.d.ts.map +1 -1
- package/dist/types/net/SpatialHash.d.ts +25 -0
- package/dist/types/net/SpatialHash.d.ts.map +1 -0
- package/dist/types/pixel/index.d.ts +1 -0
- package/dist/types/pixel/index.d.ts.map +1 -1
- package/dist/types/pixel/lifeArt.d.ts +63 -0
- package/dist/types/pixel/lifeArt.d.ts.map +1 -0
- package/dist/types/react/ConfirmButton.d.ts +26 -0
- package/dist/types/react/ConfirmButton.d.ts.map +1 -0
- package/dist/types/react/baseCss.d.ts +1 -1
- package/dist/types/react/baseCss.d.ts.map +1 -1
- package/dist/types/react/index.d.ts +2 -0
- package/dist/types/react/index.d.ts.map +1 -1
- package/dist/types/react/labels.d.ts +2 -0
- package/dist/types/react/labels.d.ts.map +1 -1
- package/dist/types/react/useJsonSelector.d.ts +13 -0
- package/dist/types/react/useJsonSelector.d.ts.map +1 -0
- package/dist/types/tilemap/TilemapView.d.ts +17 -0
- package/dist/types/tilemap/TilemapView.d.ts.map +1 -1
- package/dist/types/tilemap/autotile.d.ts +95 -0
- package/dist/types/tilemap/autotile.d.ts.map +1 -0
- package/dist/types/tilemap/collision.d.ts +8 -0
- package/dist/types/tilemap/collision.d.ts.map +1 -1
- package/dist/types/tilemap/ldtk.d.ts +97 -0
- package/dist/types/tilemap/ldtk.d.ts.map +1 -0
- package/dist/types/tilemap/ldtkParse.d.ts +26 -0
- package/dist/types/tilemap/ldtkParse.d.ts.map +1 -0
- package/dist/types/ui/ScrollView.d.ts.map +1 -1
- package/dist/types/updates/index.d.ts +9 -0
- package/dist/types/updates/index.d.ts.map +1 -0
- package/dist/types/updates/manifest.d.ts +74 -0
- package/dist/types/updates/manifest.d.ts.map +1 -0
- package/dist/types/updates/pickUpdate.d.ts +43 -0
- package/dist/types/updates/pickUpdate.d.ts.map +1 -0
- package/dist/types/updates/webPlan.d.ts +21 -0
- package/dist/types/updates/webPlan.d.ts.map +1 -0
- package/dist/ui/ScrollView.js +10 -8
- package/dist/updates/manifest.js +35 -0
- package/dist/updates/pickUpdate.js +27 -0
- package/dist/updates/webPlan.js +14 -0
- package/dist/updates.js +15 -0
- package/package.json +35 -3
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { InputLike } from './electronLike.js';
|
|
2
|
+
/**
|
|
3
|
+
* The links a locked-down window may open in the system browser: https only, no credentials in the URL, to one of
|
|
4
|
+
* `hosts` or a subdomain of it — or, for a host where anyone can publish a page (a code host), only under one of its
|
|
5
|
+
* `paths`.
|
|
6
|
+
*/
|
|
7
|
+
export interface ExternalPolicy {
|
|
8
|
+
/** Hosts allowed whole, each with its subdomains (`example.com` allows `www.example.com`). */
|
|
9
|
+
hosts: readonly string[];
|
|
10
|
+
/** Hosts allowed only under a path prefix (exact host, prefix compared case-insensitively), e.g. one owner's repositories. */
|
|
11
|
+
paths?: readonly {
|
|
12
|
+
host: string;
|
|
13
|
+
prefix: string;
|
|
14
|
+
}[];
|
|
15
|
+
}
|
|
16
|
+
/** Whether `url` is a link {@link ExternalPolicy} lets out to the system browser. */
|
|
17
|
+
export declare function isAllowedExternal(url: string, policy: ExternalPolicy): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* The game's own page: the bundled `file://` build, or the dev server's origin in a dev run. Anything else followed
|
|
20
|
+
* inside the window would replace the game with a web page that has the shell's preload API.
|
|
21
|
+
*/
|
|
22
|
+
export declare function isAllowedNavigation(url: string, devServerUrl?: string): boolean;
|
|
23
|
+
/** The keys that open DevTools (F12, Ctrl/Cmd+Shift/Alt+I/J/C), refused in a packaged build. */
|
|
24
|
+
export declare function isDevToolsKey(input: InputLike): boolean;
|
|
25
|
+
/** Chromium and Node switches that attach a debugger to a running app. */
|
|
26
|
+
export declare const DEBUG_SWITCHES: readonly string[];
|
|
27
|
+
/** Whether the command line (`argv`, or a switch Chromium parsed: `hasSwitch`) asks for a debugger. */
|
|
28
|
+
export declare function debuggerRequested(argv: readonly string[], hasSwitch?: (name: string) => boolean): boolean;
|
|
29
|
+
//# sourceMappingURL=lockdownRules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lockdownRules.d.ts","sourceRoot":"","sources":["../../../src/electron/lockdownRules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,8FAA8F;IAC9F,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,8HAA8H;IAC9H,KAAK,CAAC,EAAE,SAAS;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACrD;AAUD,qFAAqF;AACrF,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAG,OAAO,CAU9E;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAQ/E;AAED,gGAAgG;AAChG,wBAAgB,aAAa,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAMvD;AAED,0EAA0E;AAC1E,eAAO,MAAM,cAAc,EAAE,SAAS,MAAM,EAAsG,CAAC;AAGnJ,uGAAuG;AACvG,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,SAAS,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAqB,GAAG,OAAO,CAGtH"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { IpcMainLike, SafeStorageLike } from './electronLike.js';
|
|
2
|
+
/** Where and how a {@link SessionStore} keeps its one secret. */
|
|
3
|
+
export interface SessionStoreOptions {
|
|
4
|
+
/** `electron.safeStorage`. */
|
|
5
|
+
safeStorage: SafeStorageLike;
|
|
6
|
+
/** The folder, e.g. `app.getPath('userData')` — a second app (a test build) with its own user data keeps its own. */
|
|
7
|
+
dir: string;
|
|
8
|
+
/** Default `session.bin`. */
|
|
9
|
+
fileName?: string;
|
|
10
|
+
/** Longest value accepted, in characters. Default 4096: a saved login is a token and a name, never a blob. */
|
|
11
|
+
maxLength?: number;
|
|
12
|
+
/** Default `process.platform`. */
|
|
13
|
+
platform?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* One small secret (a refresh token and username, as a JSON string) kept for "stay logged in", encrypted by the OS —
|
|
17
|
+
* `safeStorage`: DPAPI for the Windows user, the Keychain on the Mac. Where the OS offers no real encryption (Linux
|
|
18
|
+
* without a keyring: `basic_text`, a key written into Chromium) nothing is written and the player logs in again after
|
|
19
|
+
* closing; a token on disk in the clear is worse than that. Never `localStorage`: any script in the page could read it.
|
|
20
|
+
*/
|
|
21
|
+
export declare class SessionStore {
|
|
22
|
+
private readonly o;
|
|
23
|
+
private readonly file;
|
|
24
|
+
private readonly maxLength;
|
|
25
|
+
private readonly platform;
|
|
26
|
+
constructor(o: SessionStoreOptions);
|
|
27
|
+
/** Whether the OS can encrypt for real here. */
|
|
28
|
+
canEncrypt(): boolean;
|
|
29
|
+
/** The saved value, or null when there is none, it cannot be decrypted (another OS user, a reinstall) or nothing may be. */
|
|
30
|
+
get(): Promise<string | null>;
|
|
31
|
+
/** Saves `value`; false when it is not a string, too long, or the OS cannot encrypt it. */
|
|
32
|
+
set(value: unknown): Promise<boolean>;
|
|
33
|
+
clear(): Promise<void>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Answers a renderer's `<prefix>:get`, `<prefix>:set` (one string) and `<prefix>:clear` from `store`, so the page only
|
|
37
|
+
* ever sees the plain value, and only its own. Expose them in the preload with `ipcRenderer.invoke`. Returns a function
|
|
38
|
+
* that removes the handlers.
|
|
39
|
+
*/
|
|
40
|
+
export declare function registerSessionStore(ipcMain: IpcMainLike, store: SessionStore, prefix?: string): () => void;
|
|
41
|
+
//# sourceMappingURL=sessionStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sessionStore.d.ts","sourceRoot":"","sources":["../../../src/electron/sessionStore.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEnE,iEAAiE;AACjE,MAAM,WAAW,mBAAmB;IAClC,8BAA8B;IAC9B,WAAW,EAAE,eAAe,CAAC;IAC7B,qHAAqH;IACrH,GAAG,EAAE,MAAM,CAAC;IACZ,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8GAA8G;IAC9G,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kCAAkC;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;GAKG;AACH,qBAAa,YAAY;IAKX,OAAO,CAAC,QAAQ,CAAC,CAAC;IAJ9B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;gBAEL,CAAC,EAAE,mBAAmB;IAMnD,gDAAgD;IAChD,UAAU,IAAI,OAAO;IAMrB,4HAA4H;IACtH,GAAG,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IASnC,2FAA2F;IACrF,GAAG,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAerC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAG7B;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,SAAY,GAAG,MAAM,IAAI,CAO9G"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** What goes into a shell's identity besides the runtime's version. */
|
|
2
|
+
export interface ShellIdOptions {
|
|
3
|
+
/** Folders whose files (non-recursive) are hashed, in this order. */
|
|
4
|
+
dirs: string[];
|
|
5
|
+
/** Which files of each folder count; default the compiled main-process code, `*.cjs`. */
|
|
6
|
+
match?: (fileName: string) => boolean;
|
|
7
|
+
/** More text to fold in (an engine or framework version the main process bundles from elsewhere). */
|
|
8
|
+
extra?: string[];
|
|
9
|
+
/** Hex characters kept; default 16. */
|
|
10
|
+
length?: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A desktop shell's identity: a hash of the main process's own code and the Electron version it runs on. A web patch
|
|
14
|
+
* is taken only by a shell with the same identity, because the web talks to the shell through its preload script and
|
|
15
|
+
* may need what a newer shell adds; anything else comes with an installer. The publish script reckons it the same way
|
|
16
|
+
* off the build it uploads, so nobody has to remember to raise a number when the shell changes.
|
|
17
|
+
*
|
|
18
|
+
* `shellId(version, dir)` hashes `dir`'s `*.cjs`; pass {@link ShellIdOptions} for more folders or other files. With one
|
|
19
|
+
* folder, the default match and no `extra`, both forms give the same hash. Code the shell takes from `node_modules`
|
|
20
|
+
* (this module included) is not in `dir`: name its version in `extra`, or a change there would not change the identity.
|
|
21
|
+
*/
|
|
22
|
+
export declare function shellId(electronVersion: string, dirOrOptions: string | ShellIdOptions): string;
|
|
23
|
+
//# sourceMappingURL=shellId.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shellId.d.ts","sourceRoot":"","sources":["../../../src/electron/shellId.ts"],"names":[],"mappings":"AAIA,uEAAuE;AACvE,MAAM,WAAW,cAAc;IAC7B,qEAAqE;IACrE,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,yFAAyF;IACzF,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;IACtC,qGAAqG;IACrG,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,uCAAuC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CAAC,eAAe,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,cAAc,GAAG,MAAM,CAa9F"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Lower-case hex sha256. */
|
|
2
|
+
export declare const sha256: (data: Uint8Array) => string;
|
|
3
|
+
/** Every file under `dir`, as forward-slash paths relative to it. */
|
|
4
|
+
export declare function listFiles(dir: string, base?: string): Promise<string[]>;
|
|
5
|
+
/** Every file of the web in `dir`, path → sha256. */
|
|
6
|
+
export declare function hashWeb(dir: string): Promise<Map<string, string>>;
|
|
7
|
+
/** Writes `data` at the manifest path `path` under `dir`, making its folders. */
|
|
8
|
+
export declare function putFile(dir: string, path: string, data: Uint8Array): Promise<void>;
|
|
9
|
+
/**
|
|
10
|
+
* `fetch` that gives up after `ms` and never takes a cached answer: a store behind a CDN otherwise hands back
|
|
11
|
+
* yesterday's `latest.json`, and a stalled connection would hold an update check open for good.
|
|
12
|
+
*/
|
|
13
|
+
export declare function fetchWithTimeout(fetcher: typeof fetch, url: string, ms: number): Promise<Response>;
|
|
14
|
+
//# sourceMappingURL=webFiles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webFiles.d.ts","sourceRoot":"","sources":["../../../src/electron/webFiles.ts"],"names":[],"mappings":"AAIA,6BAA6B;AAC7B,eAAO,MAAM,MAAM,GAAI,MAAM,UAAU,KAAG,MAAyD,CAAC;AAEpG,qEAAqE;AACrE,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,SAAK,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAQzE;AAED,qDAAqD;AACrD,wBAAsB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAIvE;AAED,iFAAiF;AACjF,wBAAsB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAIxF;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAQxG"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { type LatestJson } from '../updates/manifest.js';
|
|
2
|
+
/** How a {@link WebPatcher} finds its webs and its store. */
|
|
3
|
+
export interface WebPatcherOptions {
|
|
4
|
+
/** Where patched webs are built and kept, e.g. `join(app.getPath('userData'), 'web')`. */
|
|
5
|
+
root: string;
|
|
6
|
+
/** The web the installed build ships (the folder holding its `index.html`). */
|
|
7
|
+
builtinDir: string;
|
|
8
|
+
/** The installed build's version (`app.getVersion()`): a patched web must be newer to be loaded. */
|
|
9
|
+
appVersion: string;
|
|
10
|
+
/** This shell's identity (`shellId`), or a function reckoning it on first use. */
|
|
11
|
+
shell: string | (() => string);
|
|
12
|
+
/** The store's channel, e.g. `https://store.example/public/live`: `latest.json`, `web/…`, `files/…` lie under it. */
|
|
13
|
+
channelUrl: string;
|
|
14
|
+
/** False in a dev run: the built-in web is always loaded and nothing is read or tidied. Default true. */
|
|
15
|
+
packaged?: boolean;
|
|
16
|
+
/** Starts an unconfirmed web gets before it is dropped. Default 2. */
|
|
17
|
+
maxTries?: number;
|
|
18
|
+
/** Fall back to the last web that booted, rather than the built-in one, when a new web never boots. Default true. */
|
|
19
|
+
keepPrevious?: boolean;
|
|
20
|
+
/** The page file in a web. Default `index.html`. */
|
|
21
|
+
entry?: string;
|
|
22
|
+
/** Downloads at once. Default 6. */
|
|
23
|
+
parallel?: number;
|
|
24
|
+
/** Per request. Default 15 000 ms. */
|
|
25
|
+
fetchTimeoutMs?: number;
|
|
26
|
+
/** Default `globalThis.fetch`. */
|
|
27
|
+
fetch?: typeof fetch;
|
|
28
|
+
/** Where a failure to read the patched webs is reported. Default `console.error`. */
|
|
29
|
+
log?: (...args: unknown[]) => void;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* A desktop shell that patches its web file by file, the way a game launcher does: the web a build ships is its
|
|
33
|
+
* built-in copy, and every newer web is assembled beside it in `<root>/<version>/` from the files already held plus
|
|
34
|
+
* only those whose content is new (`<channel>/files/<sha256>`, checked against their hash), then loaded in its place.
|
|
35
|
+
* A web is taken only by a shell of the same identity; any other change needs an installer. A web that never reports
|
|
36
|
+
* booting ({@link markBooted}, from the page) within `maxTries` starts is dropped, and the shell goes back to the last
|
|
37
|
+
* web that did — or the built-in one — so a broken release cannot lock a player out.
|
|
38
|
+
*
|
|
39
|
+
* Use one per process: {@link startEntry} first (it decides which web this run loads), then the update calls.
|
|
40
|
+
*/
|
|
41
|
+
export declare class WebPatcher {
|
|
42
|
+
private readonly options;
|
|
43
|
+
private readonly o;
|
|
44
|
+
private readonly pointers;
|
|
45
|
+
private shellValue;
|
|
46
|
+
/** The web this run loads, and its version (the installed build's own when none is patched in). */
|
|
47
|
+
private loaded;
|
|
48
|
+
/** The tidy a start began: a build waits for it, or it could delete the `.part` folder being filled. */
|
|
49
|
+
private tidying;
|
|
50
|
+
private tidyChain;
|
|
51
|
+
constructor(options: WebPatcherOptions);
|
|
52
|
+
/** This shell's identity. */
|
|
53
|
+
get shell(): string;
|
|
54
|
+
/** Where the window loads the page from: a patched web when there is a good one, else the built-in copy. */
|
|
55
|
+
startEntry(): string;
|
|
56
|
+
/** The version of the web running now. */
|
|
57
|
+
webVersion(): string;
|
|
58
|
+
/** The page came up: the web it was loaded from is kept from now on. Call it from the page's own "booted" message. */
|
|
59
|
+
markBooted(): void;
|
|
60
|
+
/** The channel's newest build, or null when the store cannot be read. */
|
|
61
|
+
latest(): Promise<LatestJson | null>;
|
|
62
|
+
/** Whether `l`'s web can be patched in here rather than installed: newer than the web running, for this shell. */
|
|
63
|
+
patchable(l: LatestJson): boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Builds `l`'s web beside the one running: the files held are copied, the rest downloaded and checked, into
|
|
66
|
+
* `<version>.part/`, which becomes `<version>/` and the pending web once whole — a crash mid-way never leaves a
|
|
67
|
+
* folder that looks finished. `onProgress` gets 0–100. Resolves with the version built; throws on any failure.
|
|
68
|
+
*/
|
|
69
|
+
prepare(l: LatestJson, onProgress?: (percent: number) => void): Promise<string>;
|
|
70
|
+
/**
|
|
71
|
+
* Puts the pending web in use now and returns the page to load (reload every window from it), or null when there is
|
|
72
|
+
* none this shell may load. The switch counts as its first start, so a web that never boots is still dropped.
|
|
73
|
+
*/
|
|
74
|
+
applyPending(): string | null;
|
|
75
|
+
/** Makes `p` the active web, keeping the one it replaces as the fallback when that one ever booted. */
|
|
76
|
+
private promote;
|
|
77
|
+
/** A pointer this shell may load: its own shell, newer than the installed build, its folder whole. */
|
|
78
|
+
private usable;
|
|
79
|
+
/** Removes every patched web but the active, pending and previous one, and any half-made folder. A call made while
|
|
80
|
+
* one is running waits for it and then runs once more, so two never delete the same folder at once. */
|
|
81
|
+
tidy(): Promise<void>;
|
|
82
|
+
private tidyOnce;
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=webPatcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webPatcher.d.ts","sourceRoot":"","sources":["../../../src/electron/webPatcher.ts"],"names":[],"mappings":"AAGA,OAAO,EAAmC,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAKvF,6DAA6D;AAC7D,MAAM,WAAW,iBAAiB;IAChC,0FAA0F;IAC1F,IAAI,EAAE,MAAM,CAAC;IACb,+EAA+E;IAC/E,UAAU,EAAE,MAAM,CAAC;IACnB,oGAAoG;IACpG,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CAAC,EAAE,UAAU,GAAG,OAAO;IAIjC;;;;OAIG;IACG,OAAO,CAAC,CAAC,EAAE,UAAU,EAAE,UAAU,GAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAsB,GAAG,OAAO,CAAC,MAAM,CAAC;IAmDtG;;;OAGG;IACH,YAAY,IAAI,MAAM,GAAG,IAAI;IAS7B,uGAAuG;IACvG,OAAO,CAAC,OAAO;IAMf,sGAAsG;IACtG,OAAO,CAAC,MAAM;IAId;2GACuG;IACvG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;YAMP,QAAQ;CAYvB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** Which patched web a pointer names, and whether it ever came up. */
|
|
2
|
+
export interface WebPointer {
|
|
3
|
+
version: string;
|
|
4
|
+
shell: string;
|
|
5
|
+
/** The page reported booting from it at least once. */
|
|
6
|
+
booted: boolean;
|
|
7
|
+
/** Starts it was loaded on without booting. */
|
|
8
|
+
tries: number;
|
|
9
|
+
}
|
|
10
|
+
/** `active`: in use; `pending`: built, put in use on the next start; `previous`: the last web that booted before `active`. */
|
|
11
|
+
export type PointerName = 'active' | 'pending' | 'previous';
|
|
12
|
+
/** The pointer files beside the patched webs (`<root>/<name>.json`), read and written whole. */
|
|
13
|
+
export declare class WebPointers {
|
|
14
|
+
private readonly root;
|
|
15
|
+
constructor(root: string);
|
|
16
|
+
read(name: PointerName): WebPointer | null;
|
|
17
|
+
write(name: PointerName, p: WebPointer | null): void;
|
|
18
|
+
private file;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=webPointers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webPointers.d.ts","sourceRoot":"","sources":["../../../src/electron/webPointers.ts"],"names":[],"mappings":"AAGA,sEAAsE;AACtE,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,MAAM,EAAE,OAAO,CAAC;IAChB,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;CACf;AAED,8HAA8H;AAC9H,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAC;AAE5D,gGAAgG;AAChG,qBAAa,WAAW;IACV,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,MAAM;IAEzC,IAAI,CAAC,IAAI,EAAE,WAAW,GAAG,UAAU,GAAG,IAAI;IAU1C,KAAK,CAAC,IAAI,EAAE,WAAW,EAAE,CAAC,EAAE,UAAU,GAAG,IAAI,GAAG,IAAI;IAOpD,OAAO,CAAC,IAAI;CAGb"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export { SceneManager } from './engine/SceneManager.js';
|
|
|
8
8
|
export { FixedLoop, type FixedLoopOptions } from './engine/FixedLoop.js';
|
|
9
9
|
export { HiddenPause, type Pausable } from './engine/HiddenPause.js';
|
|
10
10
|
export { World, defineComponent, defineFields, entityIndex, system, type Entity, type ComponentType, type System, type SystemContext, type SystemPhase, type ComponentValues, } from './ecs/World.js';
|
|
11
|
+
export { definePrefab, prefabPart, spawnPrefab, isPrefabOf, PrefabLibrary, type Prefab, type PrefabPart, type PrefabValue, type PrefabContext, type PrefabOptions, type SpawnOptions, type PrefabData, } from './ecs/prefab.js';
|
|
11
12
|
export type { FieldKind, FieldSpec, FieldsType, FieldValues, Columns, ArrayOf } from './ecs/fields.js';
|
|
12
13
|
export { EventBus } from './events/EventBus.js';
|
|
13
14
|
export { engineSettings, type EngineSettings, type SettingsListener } from './settings.js';
|
|
@@ -35,7 +36,7 @@ export { TextureRegistry, CanvasTexture, type PackedFrame } from './core/Texture
|
|
|
35
36
|
export { AtlasBuilder } from './core/atlas.js';
|
|
36
37
|
export { planAtlas, atlasPageLimit, type AtlasSize, type AtlasPlan, type AtlasPage } from './core/atlasPlan.js';
|
|
37
38
|
export type { WorldObject } from './core/types.js';
|
|
38
|
-
export { AssetLoader, resolveUrl, type AssetLoaderOptions, type TilemapAssetOptions, type LoadProgress, type TextureSink, type AssetResponse, type AtlasInfo } from './assets/AssetLoader.js';
|
|
39
|
+
export { AssetLoader, resolveUrl, type AssetLoaderOptions, type TilemapAssetOptions, type LdtkAssetOptions, type LoadProgress, type TextureSink, type AssetResponse, type AtlasInfo } from './assets/AssetLoader.js';
|
|
39
40
|
export { parseAtlas, collectAtlasPages, duplicateFrames, type AtlasFrame, type PackedAtlasPage } from './assets/textureAtlas.js';
|
|
40
41
|
export { Animator, type AnimationClip, type AnimationClips } from './anim/Animator.js';
|
|
41
42
|
export { parseAseprite, frameNamed, clipMarkers } from './anim/parseAseprite.js';
|
|
@@ -43,12 +44,17 @@ export { tagFrames, tagDirection, tagRepeat } from './anim/asepriteTags.js';
|
|
|
43
44
|
export { sliceNamed, sliceAt, sliceBorders } from './anim/asepriteSlices.js';
|
|
44
45
|
export type { AsepriteJson, AsepriteJsonFrame, AsepriteJsonTag, AsepriteJsonSlice, AsepriteJsonSliceKey, AsepriteJsonLayer, AsepriteRect, AsepriteSheet, AsepriteFrame, AsepriteTag, AsepriteDirection, AsepriteSlice, AsepriteSliceKey, AsepriteLayer, AsepriteCue, ClipMarker } from './anim/asepriteTypes.js';
|
|
45
46
|
export { loadAseprite, addAsepriteTextures, type AsepriteTextureSink, type AsepriteLoadOptions } from './assets/loadAseprite.js';
|
|
47
|
+
export { Prepainter, type PrepainterOptions, type PrepainterTextures, type Painter, type PaintedPixels } from './assets/Prepainter.js';
|
|
48
|
+
export { workerPainter, type WorkerPainterOptions, type PaintReply } from './assets/workerPainter.js';
|
|
46
49
|
export { AnimStateMachine } from './anim/AnimStateMachine.js';
|
|
47
50
|
export type { AnimStateMachineOptions, AnimStateDef, AnimTransition, AnimCondition, AnimParams, AnimParamDecl, CompareOp } from './anim/animStateTypes.js';
|
|
48
51
|
export { AnimStateComponent, animStateSystem } from './anim/animStateSystem.js';
|
|
49
52
|
export { animationSystem, SpriteComponent, AnimationComponent } from './anim/animationSystem.js';
|
|
50
53
|
export { parseTiled, tileAt, tileRect, gidOf, layerByName, objectsOf, FLIP_H, FLIP_V, FLIP_D, type TileMap, type TileLayer, type ObjectLayer, type MapLayer, type MapObject, type Tileset, type Properties, type TiledPropertyValue, } from './tilemap/tiled.js';
|
|
51
|
-
export { collisionFromTiled, type TiledCollisionOptions } from './tilemap/collision.js';
|
|
54
|
+
export { collisionFromTiled, collisionFromIntGrid, type TiledCollisionOptions, type IntGridSolid } from './tilemap/collision.js';
|
|
55
|
+
export { levelByName, levelAt, intGridAt, entitiesOf, type LdtkProject, type LdtkWorld, type LdtkWorldLayout, type LdtkLevel, type LdtkIntGrid, type LdtkEntity, type LdtkFieldValue } from './tilemap/ldtk.js';
|
|
56
|
+
export { parseLdtk, ldtkExternalLevels, loadLdtkLevel, type LdtkParseOptions } from './tilemap/ldtkParse.js';
|
|
57
|
+
export { autotile, autotileAt, updateAutotile, paintTerrain, edgeMask, blobMask, reduceBlobMask, blob47Index, BLOB47_MASKS, EDGE_N, EDGE_E, EDGE_S, EDGE_W, BLOB_N, BLOB_NE, BLOB_E, BLOB_SE, BLOB_S, BLOB_SW, BLOB_W, BLOB_NW, type TerrainGrid, type AutotileMode, type AutotileRule, type AutotileRuleSet, type MaskOptions, } from './tilemap/autotile.js';
|
|
52
58
|
export { TilemapView, type TilemapViewOptions } from './tilemap/TilemapView.js';
|
|
53
59
|
export { Skeleton } from './rig/Skeleton.js';
|
|
54
60
|
export { HUMANOID_RIG } from './rig/humanoid.js';
|
|
@@ -69,6 +75,7 @@ export { elementVolumeLocked } from './audio/music/musicVoice.js';
|
|
|
69
75
|
export { registerSounds, type SoundTable } from './audio/soundTable.js';
|
|
70
76
|
export { registerTakes, hasTakes } from './audio/sampleBank.js';
|
|
71
77
|
export { Footsteps, type FootstepOptions, type SurfaceSounds } from './audio/Footsteps.js';
|
|
78
|
+
export { SpatialAudio, spatialMix, type SpatialEmitter, type EmitterOptions as SpatialEmitterOptions, type SpatialMix, type SpatialMixOptions } from './audio/spatial.js';
|
|
72
79
|
export { renderRecipe, SYNTH_RATE, type SynthRecipe, type SynthLayer } from './audio/synth.js';
|
|
73
80
|
export { Keyboard } from './input/Keyboard.js';
|
|
74
81
|
export { Actions, PAD_BUTTONS, type Bindings, type ActionsOptions, type PadState } from './input/Actions.js';
|
|
@@ -79,10 +86,13 @@ export { LongPress } from './input/longPress.js';
|
|
|
79
86
|
export { AimGesture, aimPoint, spotReach, spotShare, dragSlop, AIM_TAP_SLOP, AIM_EARLY_SLOP, AIM_PRESS_MS, AIM_CENTRE, type AimGestureOptions, type AimShape, type AimEnd } from './input/AimGesture.js';
|
|
80
87
|
export { TargetLock, pickTarget, nearestTarget, keptTarget, LOCK_PICK_RANGE, LOCK_KEEP_RANGE, LOCK_PICK_CONE, type LockBody, type TargetLockOptions } from './input/TargetLock.js';
|
|
81
88
|
export { Keymap, mergeKeymap, keymapStorage, keyLabel } from './input/Keymap.js';
|
|
89
|
+
export { InputCapture, padLabel, deviceOf, type CaptureOptions, type InputDevice } from './input/InputCapture.js';
|
|
90
|
+
export { InputRecorder, InputPlayer, type InputTape } from './input/inputTape.js';
|
|
82
91
|
export { isTouchUi, setNativeShell, setTouchOverrideKey } from './platform/touch.js';
|
|
83
92
|
export { onAppResume, type ResumeEnv } from './platform/appResume.js';
|
|
84
93
|
export { timeoutSignal } from './platform/timeoutSignal.js';
|
|
85
94
|
export { rumble, rumblePad, stopRumble, rumbleParams, type RumbleOptions, type RumblePad } from './input/rumble.js';
|
|
95
|
+
export { Haptics, HapticGate, vibrate, type HapticsOptions, type HapticGaps } from './input/haptics.js';
|
|
86
96
|
export { enterFullscreen, exitFullscreen, toggleFullscreen, isFullscreen, fullscreenSupported, onFullscreenChange, type FullscreenDocument } from './platform/fullscreen.js';
|
|
87
97
|
export { lockOrientation, unlockOrientation, currentOrientationKind, type OrientationLock, type OrientationTarget } from './platform/orientation.js';
|
|
88
98
|
export { prefersReducedMotion, onReducedMotionChange, followReducedMotion, type MotionQuery } from './platform/reducedMotion.js';
|
|
@@ -93,6 +103,12 @@ export { weatherAt, hash01, type WeatherTable, type WeatherEntry, type WeatherSk
|
|
|
93
103
|
export { WeatherLayer, type WeatherLook, type WeatherMotion, type WeatherLayerOptions } from './ambient/WeatherLayer.js';
|
|
94
104
|
export { gradeAt, mixToWhite, type Grade, type GradeState } from './ambient/grade.js';
|
|
95
105
|
export { ColorGrade, type ColorGradeOptions, type GradePlacement } from './ambient/ColorGrade.js';
|
|
106
|
+
export { boxInView, pickInView, sourceOf, birdFrame, flockSlot, fireflyGlow, fireflyOffset, firefliesOut, puffOffset, type LifePoint, type LifeBox, type LifeAir, type LifeSource, type PuffMotion, } from './ambient/life/lifeMotion.js';
|
|
107
|
+
export { Drift, type DriftKind, type DriftOptions } from './ambient/life/Drift.js';
|
|
108
|
+
export { Birds, type BirdsOptions } from './ambient/life/Birds.js';
|
|
109
|
+
export { Butterflies, type ButterfliesOptions } from './ambient/life/Butterflies.js';
|
|
110
|
+
export { Fireflies, type FirefliesOptions } from './ambient/life/Fireflies.js';
|
|
111
|
+
export { ChimneySmoke, type ChimneySmokeOptions } from './ambient/life/ChimneySmoke.js';
|
|
96
112
|
export { Parallax, type ParallaxOptions } from './parallax/Parallax.js';
|
|
97
113
|
export { ParallaxLayer, type ParallaxLayerOptions, type ParallaxCamera } from './parallax/ParallaxLayer.js';
|
|
98
114
|
export { parallaxOrigin, wrap, spanVisible, placeAxis, type AxisPlacement, type AxisInput } from './parallax/parallaxMath.js';
|
|
@@ -117,6 +133,14 @@ export { navGrid, navGridFromCollision, isOpen, nearWallCost, canStep, NAV_STEPS
|
|
|
117
133
|
export { nearestOpen } from './nav/nearestOpen.js';
|
|
118
134
|
export { findPath, floodFill, reachedCount, octile, type NavGoal, type FindPathOptions } from './nav/findPath.js';
|
|
119
135
|
export { straightenPath, simplifyPath } from './nav/straightenPath.js';
|
|
136
|
+
export { flowField, followField, type FlowField } from './nav/flowField.js';
|
|
137
|
+
export { seek, flee, arrive, separation, alignment, cohesion, followFlow, combineSteering, applySteering, type SteerVec, type SteerAgent, type StepSource, } from './nav/steering.js';
|
|
138
|
+
export { BehaviorTree, BtAgent, sequence, selector, reactiveSequence, reactiveSelector, parallel, invert, succeed, repeat, retry, cooldown, timeout, wait, condition, action, formatTrace, type BtStatus, type BtNode, type BtRun, type BtTraceLine, type ParallelPolicy, type ActionOptions, } from './ai/behaviorTree.js';
|
|
139
|
+
export { buildTree, type BtSpec, type BtRegistry } from './ai/buildTree.js';
|
|
140
|
+
export { DialogueRunner, type DialogueOptions, type DialogueSave } from './dialogue/DialogueRunner.js';
|
|
141
|
+
export { validateDialogue, type DialogueIssue, type ValidateOptions as DialogueValidateOptions } from './dialogue/validateDialogue.js';
|
|
142
|
+
export { compileExpr, type CompiledExpr, type ExprScope, type ExprValue } from './dialogue/expr.js';
|
|
143
|
+
export type { DialogueScript, DialogueNode, DialogueLine, DialogueChoice, DialogueBranch, DialogueCommand, DialogueStep, ShownLine, ShownChoice, ShownChoices, DialogueEnd, } from './dialogue/script.js';
|
|
120
144
|
export { SaveStore, type SaveStoreOptions, type SaveInfo, type LoadResult, type LoadFailure } from './save/SaveStore.js';
|
|
121
145
|
export type { SaveBackend } from './save/SaveBackend.js';
|
|
122
146
|
export { MemoryBackend } from './save/MemoryBackend.js';
|
|
@@ -155,9 +179,12 @@ export { CADENCE, cadenceEarly, cadenceNext } from './net/cadence.js';
|
|
|
155
179
|
export { serverNow, serverOffset, noteServerTime, resetServerClock } from './net/serverClock.js';
|
|
156
180
|
export { PredictedMover } from './net/PredictedMover.js';
|
|
157
181
|
export { InterpolationBuffer, type InterpolatedState } from './net/InterpolationBuffer.js';
|
|
158
|
-
export { Room, type RoomPlayer, type RoomOptions } from './net/Room.js';
|
|
182
|
+
export { Room, BODY_ID_BASE, type RoomPlayer, type RoomBody, type RoomSeen, type RoomOptions, type RoomInterest } from './net/Room.js';
|
|
183
|
+
export { SpatialHash } from './net/SpatialHash.js';
|
|
184
|
+
export { LagCompensator, type RewoundBody, type RewoundHit } from './net/LagCompensator.js';
|
|
159
185
|
export { RoomHost, type HostSocket, type RoomHostOptions } from './net/RoomHost.js';
|
|
160
186
|
export { Connection, CLOSE_NO_ANSWER, type ConnectionEvents, type ConnectionOptions } from './net/Connection.js';
|
|
187
|
+
export { ApiClient, ApiError, type ApiClientOptions, type ApiRequestOptions, type ApiErrorInfo, type ApiMethod, type RefreshResult } from './net/ApiClient.js';
|
|
161
188
|
export { reconnectDelay, shouldReconnect } from './net/reconnect.js';
|
|
162
189
|
export { LobbyHost, LobbyClient, LobbyRooms, Matchmaker, balanceTeams, type LobbyHostOptions, type LobbyMatch, type LobbyClientEvents, type LobbyLink, type PendingMatch, type LobbyRoom, type MatchMode, type Ticket, type FoundMatch, type LobbyClientMessage, type LobbyServerMessage, type LobbyErrorCode, type RoomSummary, type RoomState, type RoomMember, type MatchPlayer, } from './net/lobby/index.js';
|
|
163
190
|
export { moverToWire, moverFromWire, type ClientMessage, type ServerMessage, type Snapshot, type SpawnInfo, type MoverWire } from './net/protocol.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EAAE,KAAK,EAAE,KAAK,cAAc,EAAE,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,KAAK,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EACL,KAAK,EACL,eAAe,EACf,YAAY,EACZ,WAAW,EACX,MAAM,EACN,KAAK,M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K,WAAW,GACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,KAAK,aAAa,EAAE,KAAK,aAAa,EAAE,KAAK,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -57,6 +57,10 @@ export declare class Actions<A extends string> {
|
|
|
57
57
|
private readonly chords;
|
|
58
58
|
/** Keys a chord holds this step: their bare bindings read 0 until the key comes up. */
|
|
59
59
|
private readonly claimed;
|
|
60
|
+
/** Where `poll` takes its values from instead of the devices (a replay), until it returns null. */
|
|
61
|
+
private source;
|
|
62
|
+
/** Handed every step's values after `poll` (a recorder). */
|
|
63
|
+
private readonly taps;
|
|
60
64
|
private readonly keyDown;
|
|
61
65
|
constructor(keyboard: Keyboard | null, bindings: Bindings<A>, options?: ActionsOptions);
|
|
62
66
|
/** Replaces one action's bindings (a player's rebinding). */
|
|
@@ -72,6 +76,16 @@ export declare class Actions<A extends string> {
|
|
|
72
76
|
rumble(options: RumbleOptions, padIndex?: number): Promise<boolean>;
|
|
73
77
|
/** Reads every device once; call at the start of each simulation step. */
|
|
74
78
|
poll(): void;
|
|
79
|
+
/**
|
|
80
|
+
* Takes each step's values from `source` instead of the devices (an `InputPlayer`), until it returns null; then
|
|
81
|
+
* the devices answer again. Pass null to stop at once.
|
|
82
|
+
*/
|
|
83
|
+
replay(source: (() => ReadonlyMap<A, number> | null) | null): void;
|
|
84
|
+
/** Whether a replay is driving the actions now. */
|
|
85
|
+
get replaying(): boolean;
|
|
86
|
+
/** Calls `tap` with every step's values right after `poll` (an `InputRecorder`); returns the stop. */
|
|
87
|
+
tap(tap: (values: ReadonlyMap<A, number>) => void): () => void;
|
|
88
|
+
private readDevices;
|
|
75
89
|
/** Held this step. */
|
|
76
90
|
down(action: A): boolean;
|
|
77
91
|
/** How far it is held (0–1): 1 for a key, the trigger or stick amount for analog input. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../src/input/Actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EAAa,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAEzE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,MAAM,IAAI,MAAM,CAAC,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC;AAEtE,8EAA8E;AAC9E,eAAO,MAAM,WAAW,6HAA8H,CAAC;AAGvJ,0FAA0F;AAC1F,MAAM,WAAW,QAAS,SAAQ,SAAS;IACzC,QAAQ,CAAC,OAAO,EAAE,SAAS;QAAE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACnF,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC;AAED,MAAM,WAAW,cAAc;IAC7B,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wFAAwF;IACxF,QAAQ,CAAC,EAAE,MAAM,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAC,EAAE,CAAC;CAC/C;AAED,qBAAa,OAAO,CAAC,CAAC,SAAS,MAAM;
|
|
1
|
+
{"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../src/input/Actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EAAa,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAEzE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,MAAM,IAAI,MAAM,CAAC,CAAC,EAAE,SAAS,MAAM,EAAE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,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;IAO3D,0GAA0G;IAC1G,OAAO,IAAI,IAAI;IAKf;;;;OAIG;IACH,KAAK,IAAI,IAAI;IAOb,OAAO,CAAC,OAAO;IASf,6EAA6E;IAC7E,OAAO,CAAC,WAAW;IAUnB,OAAO,CAAC,IAAI;CAgCb"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type PadState } from './Actions.js';
|
|
2
|
+
/** What kind of input a binding is: a key (or chord), a gamepad button or stick half, or a touch button. */
|
|
3
|
+
export type InputDevice = 'keys' | 'pad' | 'touch';
|
|
4
|
+
export declare function deviceOf(binding: string): InputDevice;
|
|
5
|
+
/**
|
|
6
|
+
* How a gamepad binding reads on screen: `pad:a` is "A", `pad:lx-` "Left stick left". `names` overrides any (a
|
|
7
|
+
* PlayStation game's "Cross", the game's own language); a binding that is not a pad's comes back as it is.
|
|
8
|
+
*/
|
|
9
|
+
export declare function padLabel(binding: string, names?: Readonly<Record<string, string>>): string;
|
|
10
|
+
export interface CaptureOptions {
|
|
11
|
+
/** Which devices may answer (default keys and pad). */
|
|
12
|
+
devices?: readonly ('keys' | 'pad')[];
|
|
13
|
+
/** Key codes that do not count (default Escape: it cancels instead). */
|
|
14
|
+
ignoreKeys?: readonly string[];
|
|
15
|
+
/** Key codes that cancel the capture (default Escape; the pad's Start and B are buttons like any other). */
|
|
16
|
+
cancelKeys?: readonly string[];
|
|
17
|
+
/** A stick half counts once pushed past this (default 0.6), so a resting stick's drift never binds. */
|
|
18
|
+
axisThreshold?: number;
|
|
19
|
+
/** Where key presses are heard (default `window`). */
|
|
20
|
+
target?: EventTarget;
|
|
21
|
+
/** Where gamepads come from (default `navigator.getGamepads`). */
|
|
22
|
+
gamepads?: () => readonly (PadState | null)[];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Waits for the next input the player gives, for a settings screen's "press a key for Jump": the next key (its
|
|
26
|
+
* `KeyboardEvent.code`), gamepad button or stick half pushed past a threshold, as a binding string `Actions` and
|
|
27
|
+
* `Keymap` take. Inputs already held when the capture began do not count until let go, so the press that opened the
|
|
28
|
+
* capture (Enter, the pad's A) does not bind itself.
|
|
29
|
+
*
|
|
30
|
+
* Call `poll()` once a frame for the gamepad (the browser has no gamepad events worth trusting); keys are heard as
|
|
31
|
+
* they come. The promise resolves to the binding, or null when cancelled (Escape, or `cancel()`).
|
|
32
|
+
*/
|
|
33
|
+
export declare class InputCapture {
|
|
34
|
+
readonly result: Promise<string | null>;
|
|
35
|
+
private settle;
|
|
36
|
+
private done;
|
|
37
|
+
private readonly held;
|
|
38
|
+
private readonly options;
|
|
39
|
+
private readonly gamepads;
|
|
40
|
+
private readonly target;
|
|
41
|
+
private readonly onKey;
|
|
42
|
+
constructor(options?: CaptureOptions);
|
|
43
|
+
/** Reads the gamepads once; call every frame while the capture is open. */
|
|
44
|
+
poll(): void;
|
|
45
|
+
/** Stops waiting; the result is null. */
|
|
46
|
+
cancel(): void;
|
|
47
|
+
get open(): boolean;
|
|
48
|
+
private key;
|
|
49
|
+
private finish;
|
|
50
|
+
/** Every pad input down on any pad now, as bindings. */
|
|
51
|
+
private padInputs;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=InputCapture.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputCapture.d.ts","sourceRoot":"","sources":["../../../src/input/InputCapture.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,QAAQ,EAAE,MAAM,WAAW,CAAC;AAEvD,4GAA4G;AAC5G,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,CAAC;AAEnD,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,CAErD;AAgCD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,GAAE,QAAQ,CAAC,MA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';
|
|
2
3
|
/**
|
|
3
4
|
* Which keys each action sits on, as the player has rebound them: one table the input, the key hints on screen and
|
|
4
5
|
* a settings screen all read. A binding is a `KeyboardEvent.code` (`KeyW`, `Digit1`), so it means the same physical
|
|
5
6
|
* key on every layout. Each action keeps a list (W and ArrowUp, 1 and Q); a settings screen edits the **first** and
|
|
6
|
-
* leaves the alternates alone.
|
|
7
|
+
* leaves the alternates alone. Gamepad inputs (`pad:a`, `pad:lx-`) may be the player's too: each device keeps its own
|
|
8
|
+
* first binding, so a settings screen with a keys column and a pad column edits each without touching the other.
|
|
7
9
|
*
|
|
8
10
|
* Two rules: one key serves one action at a time (a key bound twice would fire both, and the player could not tell
|
|
9
11
|
* which they meant), and reserved keys (Escape, Enter, Tab by default: the interface's own) are never taken.
|
|
@@ -34,16 +36,20 @@ export declare class Keymap<A extends string> {
|
|
|
34
36
|
/** Every action, in the order the defaults named them. */
|
|
35
37
|
actions(): A[];
|
|
36
38
|
isReserved(code: string): boolean;
|
|
37
|
-
/**
|
|
38
|
-
|
|
39
|
+
/**
|
|
40
|
+
* The bindings of one action, or only those of one device; the first of a device is the one a settings screen
|
|
41
|
+
* shows and edits.
|
|
42
|
+
*/
|
|
43
|
+
keysFor(action: A, device?: InputDevice): readonly string[];
|
|
39
44
|
/** The inputs an action always has besides the player's keys (the constructor's `fixed`). */
|
|
40
45
|
fixedFor(action: A): readonly string[];
|
|
41
46
|
/** Which action a key belongs to, or undefined. */
|
|
42
47
|
actionFor(code: string): A | undefined;
|
|
43
48
|
/**
|
|
44
|
-
* Puts `code` first on `action
|
|
45
|
-
*
|
|
46
|
-
*
|
|
49
|
+
* Puts `code` first on `action` in place of the action's first binding of the same device (a key replaces its first
|
|
50
|
+
* key, a pad input its first pad input), taking it off whatever else held it; returns the actions that lost it (to
|
|
51
|
+
* tell the player). A reserved key is refused (returns null). An action stripped of its last key keeps none: it is
|
|
52
|
+
* unbound until something is put back on it.
|
|
47
53
|
*/
|
|
48
54
|
bind(action: A, code: string): A[] | null;
|
|
49
55
|
/** Takes every key off `action`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Keymap.d.ts","sourceRoot":"","sources":["../../../src/input/Keymap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"Keymap.d.ts","sourceRoot":"","sources":["../../../src/input/Keymap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAY,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,MAAM,CAAC,CAAC,SAAS,MAAM;IAClC,OAAO,CAAC,KAAK,CAAsB;IACnC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA+B;IACxD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAsB;IAC/C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAwC;IAC9D,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAsB;IAEhD;;;OAGG;gBAED,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,EAChD,QAAQ,GAAE,QAAQ,CAAC,MAAM,CAA8B,EACvD,KAAK,GAAE,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC,CAAM;IAQnD,OAAO,CAAC,KAAK;IAMb,0DAA0D;IAC1D,OAAO,IAAI,CAAC,EAAE;IAId,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAIjC;;;OAGG;IACH,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,MAAM,EAAE;IAK3D,6FAA6F;IAC7F,QAAQ,CAAC,MAAM,EAAE,CAAC,GAAG,SAAS,MAAM,EAAE;IAItC,m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