@korial29/tiny-fps 0.224.0 → 0.225.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/dist/index.js +2 -2
- package/dist/types/client/hud.d.ts +2 -1
- package/dist/types/client/lobby.d.ts +11 -2
- package/package.json +1 -1
|
@@ -196,5 +196,6 @@ export declare const clock: (s: number) => string;
|
|
|
196
196
|
/**
|
|
197
197
|
* Appends the HUD to `screen`, whose stylesheet has HUD_CSS. `play` is the title screen's button:
|
|
198
198
|
* the click that starts the game (the panel takes its other clicks, the view round it plays too).
|
|
199
|
+
* `recast`: what the pause menu's Character opens instead of the panel's part (the whole-page screen).
|
|
199
200
|
*/
|
|
200
|
-
export declare const createHud: (screen: HTMLElement, play?: () => void, quit?: () => void) => Hud;
|
|
201
|
+
export declare const createHud: (screen: HTMLElement, play?: () => void, quit?: () => void, recast?: () => void) => Hud;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Choice } from '../shared/types';
|
|
2
2
|
import type { WorldDef } from '../shared/world';
|
|
3
|
+
import type { Shot } from './render';
|
|
3
4
|
/** A whole choice: the body, the skin, the haircut and the class. */
|
|
4
5
|
export type Cast = Choice & {
|
|
5
6
|
body: number;
|
|
@@ -13,9 +14,17 @@ export declare const TRAITS: {
|
|
|
13
14
|
}[];
|
|
14
15
|
export interface Lobby {
|
|
15
16
|
destroy(): void;
|
|
17
|
+
/**
|
|
18
|
+
* In a match: the game's frame at `now` (ms) offers its renderer. `draw` is asked for the picture
|
|
19
|
+
* of the choice shown, HZ times a second at most, and says whether it drew it.
|
|
20
|
+
*/
|
|
21
|
+
paint(now: number, draw: (into: HTMLCanvasElement, c: Cast, shot: Shot) => boolean): void;
|
|
16
22
|
}
|
|
17
23
|
/**
|
|
18
24
|
* Shows the character screen in `container` for the map `def` (the classes it offers, its sky);
|
|
19
|
-
* `start` hears the whole choice on Start, after the screen is gone.
|
|
25
|
+
* `start` hears the whole choice on Start, after the screen is gone. `now`: opened again in a
|
|
26
|
+
* match from the pause menu (the user, 2026-11-25), over the game, on what the player wears: no
|
|
27
|
+
* renderer of its own (the game's draws the big picture, paint()), no head shots on the tiles, Apply
|
|
28
|
+
* for Start and a way back (Escape too) that changes nothing.
|
|
20
29
|
*/
|
|
21
|
-
export declare const createLobby: (container: HTMLElement, def: WorldDef, start: (c: Cast) => void) => Lobby;
|
|
30
|
+
export declare const createLobby: (container: HTMLElement, def: WorldDef, start: (c: Cast) => void, now?: Partial<Cast>) => Lobby;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@korial29/tiny-fps",
|
|
3
3
|
"description": "Tiny multiplayer first-person rooftop game for the browser: raw WebGL, zero runtime dependencies, WebSocket or same-browser multi-tab play.",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.225.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist"
|