@korial29/tiny-fps 0.147.4 → 0.148.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 +1 -1
- package/dist/types/client/soldier.d.ts +12 -2
- package/package.json +1 -1
|
@@ -44,6 +44,8 @@ export interface Runner {
|
|
|
44
44
|
seat?: Seat;
|
|
45
45
|
/** The head of the runner he looks at (watched()), and how far his own is turned to it, eased: to his right and up, radians. */
|
|
46
46
|
watch?: Vec3;
|
|
47
|
+
/** The id of the runner he looks at, kept while he can be followed. */
|
|
48
|
+
watching?: number;
|
|
47
49
|
gaze?: number[];
|
|
48
50
|
/** The muzzle of the long gun in his hands as last drawn, from his feet: where its shots are seen to leave (combat.ts). */
|
|
49
51
|
tip?: Vec3;
|
|
@@ -78,15 +80,23 @@ export declare const createRunner: (p: PlayerState, seat?: Seat, build?: number,
|
|
|
78
80
|
* The head turns to the runner one looks at (the user, 2026-11-12): the nearest within `far`
|
|
79
81
|
* metres and `cone` radians of his aim. It turns no further than `turn` (to a side, up or down)
|
|
80
82
|
* from where it points, the eyes going the rest of their travel; `rate` is how fast, per second.
|
|
83
|
+
* The one looked at is followed as he goes by (the user, 2026-11-14): kept, over a nearer one,
|
|
84
|
+
* until he is `hold` radians off the aim (the head's 80 degrees and the eyes' travel, REACH_X)
|
|
85
|
+
* or `keep` metres away.
|
|
81
86
|
*/
|
|
82
87
|
export declare const WATCH: {
|
|
83
88
|
far: number;
|
|
89
|
+
keep: number;
|
|
84
90
|
cone: number;
|
|
91
|
+
hold: number;
|
|
85
92
|
turn: number[];
|
|
86
93
|
rate: number;
|
|
87
94
|
};
|
|
88
|
-
/**
|
|
89
|
-
export declare const watched: (p: PlayerState, crowd: PlayerState[]) =>
|
|
95
|
+
/** The runner `p` looks at among `crowd`, and where his head is: none when he looks at no one, or is down. `held` is the one he looked at last. */
|
|
96
|
+
export declare const watched: (p: PlayerState, crowd: PlayerState[], held?: number) => {
|
|
97
|
+
id: number;
|
|
98
|
+
at: Vec3;
|
|
99
|
+
} | undefined;
|
|
90
100
|
export declare const animate: (book: Map<number, Runner>, others: PlayerState[], dt: number, world?: World, tracer?: Pick<Tracer, "shock" | "spit">, rovers?: Rover[], builds?: ReadonlyMap<number, number>, looks?: ReadonlyMap<number, Choice>) => void;
|
|
91
101
|
/**
|
|
92
102
|
* A long gun's butt plate in the hollow of the right shoulder: from the shoulder joint, in the
|
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.148.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist"
|