@korial29/tiny-fps 0.198.0 → 0.199.1
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.
|
@@ -62,6 +62,8 @@ export interface Controls {
|
|
|
62
62
|
* the other guns).
|
|
63
63
|
*/
|
|
64
64
|
take(): number;
|
|
65
|
+
/** The next step's keys without consuming queued presses, for the local visual preview. */
|
|
66
|
+
peek(): number;
|
|
65
67
|
/** One live step of the own player, its state before and after: a katana or a rail gun picked up is chosen, losing every weapon chooses the gun. */
|
|
66
68
|
track(was?: PlayerState, now?: PlayerState): void;
|
|
67
69
|
/** The canvas holds the pointer lock. */
|
|
@@ -33,6 +33,8 @@ export interface Predictor {
|
|
|
33
33
|
* beside it (at the time of the last step plus alpha of a step).
|
|
34
34
|
*/
|
|
35
35
|
me(alpha: number): PlayerState | undefined;
|
|
36
|
+
/** The own player for drawing, previewing the next step without changing prediction or inputs. */
|
|
37
|
+
view(alpha: number, input: Omit<Input, 'seq' | 'view'>): PlayerState | undefined;
|
|
36
38
|
/** The other players at now - INTERP_DELAY; a player missing from the latest snapshot is gone. */
|
|
37
39
|
others(now: number): PlayerState[];
|
|
38
40
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Vec3 } from './mesh';
|
|
2
2
|
import type { Out } from './verts';
|
|
3
|
+
import type { Pieces } from './store';
|
|
3
4
|
/**
|
|
4
5
|
* The packs of `all` whose bit is set in `mask`, if any: the ones that are there to take. The bits
|
|
5
6
|
* count from `from`: the ammo packs come after the health packs.
|
|
@@ -10,14 +11,18 @@ export declare const packsOf: (all?: readonly Vec3[], mask?: number, from?: numb
|
|
|
10
11
|
* the weapon, and the weapon over it: the gun, or by `kind` the katana (1), crackling, the rail
|
|
11
12
|
* gun (2) or the laser rifle (3).
|
|
12
13
|
*/
|
|
13
|
-
|
|
14
|
+
/** A rack's rotating rigid weapon, made once in model space. */
|
|
15
|
+
export declare const rackWeapon: (kind: number) => import("./store").Mesh;
|
|
16
|
+
export declare const rack: (out: Out, at: Vec3, rgb: number[], t: number, kind?: number, pieces?: Pieces) => void;
|
|
14
17
|
/** Each team's gun rack, katana rack, rail gun rack and laser rifle rack, where it has them. */
|
|
15
|
-
export declare const racks: (out: Out, guns?: readonly (Vec3 | undefined)[], blades?: readonly (Vec3 | undefined)[], t?: number, rails?: readonly (Vec3 | undefined)[], rifles?: readonly (Vec3 | undefined)[]) => void;
|
|
18
|
+
export declare const racks: (out: Out, guns?: readonly (Vec3 | undefined)[], blades?: readonly (Vec3 | undefined)[], t?: number, rails?: readonly (Vec3 | undefined)[], rifles?: readonly (Vec3 | undefined)[], pieces?: Pieces) => void;
|
|
16
19
|
/** A health pack at `at`: a white box with a glowing green cross on each side. */
|
|
17
20
|
export declare const kit: (out: Out, at: Vec3, t: number) => void;
|
|
18
21
|
/** An ammo pack at `at`: a violet box with a glowing cyan cartridge on each side, the gun's colours. */
|
|
19
22
|
export declare const cell: (out: Out, at: Vec3, t: number) => void;
|
|
20
23
|
/** A rail cell at `at`: a gunmetal box with a glowing violet-white bolt on each side, the rail gun's colours. */
|
|
21
24
|
export declare const battery: (out: Out, at: Vec3, t: number) => void;
|
|
25
|
+
/** Keep the rigid shell on the GPU; the small shield still pulses in the frame. */
|
|
26
|
+
export declare const vestMesh: () => import("./store").Mesh;
|
|
22
27
|
/** An armour at `at`: a green cuirass turning and bobbing over it, its shield pulsing. */
|
|
23
|
-
export declare const vest: (out: Out, at: Vec3, t: number) => void;
|
|
28
|
+
export declare const vest: (out: Out, at: Vec3, t: number, pieces?: Pieces) => void;
|
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.199.1",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist"
|