@korial29/tiny-fps 0.173.0 → 0.175.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/{cast-mp3-D3WiTzsl.js → cast-mp3-CYkr5hCR.js} +1 -1
- package/dist/{cast-opus-Cb4aT9hu.js → cast-opus-B5_NZZjr.js} +1 -1
- package/dist/index.js +21 -21
- package/dist/types/client/audio.d.ts +2 -2
- package/dist/types/client/foley.d.ts +2 -0
- package/dist/types/client/sfx.d.ts +5 -2
- package/dist/types/client/taunt.d.ts +10 -9
- package/dist/types/client/voice/cast-mp3.d.ts +2 -2
- package/dist/types/client/voice/cast-opus.d.ts +2 -2
- package/dist/types/client/voice/cast.d.ts +6 -4
- package/package.json +1 -1
|
@@ -16,9 +16,9 @@ export interface Audio {
|
|
|
16
16
|
/**
|
|
17
17
|
* Plays the sound `id` (an index into the layers). With `at`, panned left or right by its direction from the listener and
|
|
18
18
|
* fainter with distance; without, centred (the own player's sounds). `gain` scales the volume,
|
|
19
|
-
* `rate` the speed and so the pitch.
|
|
19
|
+
* `rate` the speed and so the pitch; over the `radio` as speak() says a line.
|
|
20
20
|
*/
|
|
21
|
-
play(id: number, at?: Vec3, gain?: number, rate?: number): void;
|
|
21
|
+
play(id: number, at?: Vec3, gain?: number, rate?: number, radio?: boolean): void;
|
|
22
22
|
/**
|
|
23
23
|
* Says the announcer's line `id` (LINE), centred, the music lowered under it. Lines wait their
|
|
24
24
|
* turn, two at most and each once; none before the voice is decoded, a moment after unlock.
|
|
@@ -24,6 +24,8 @@ export interface Foley {
|
|
|
24
24
|
}
|
|
25
25
|
/** A breath's cycle at rest and at the hardest effort (s), and where in it he breathes out. */
|
|
26
26
|
export declare const BREATH: number[];
|
|
27
|
+
/** The xenomorph's footfalls' rates, foot by foot. */
|
|
28
|
+
export declare const PAWS: number[];
|
|
27
29
|
/** The rover: a sideways slide from this speed (m/s) skids, and is at its loudest this much over it. */
|
|
28
30
|
export declare const SKID_FROM = 2.5;
|
|
29
31
|
export declare const createFoley: (a: Audio,
|
|
@@ -121,8 +121,8 @@ export declare const SOUND: {
|
|
|
121
121
|
/**
|
|
122
122
|
* The xenomorph's own (the user, 2026-11-16: not a runner's): a hiss with a growl under it as it
|
|
123
123
|
* charges a pounce, a shriek as it leaps, its claws' swipe and the whip of its tail, a screech of
|
|
124
|
-
* pain and a big roar going down,
|
|
125
|
-
* blood,
|
|
124
|
+
* pain and a big roar going down, its footfall (claws, wet pad, weight) at each step, the sizzle of
|
|
125
|
+
* its acid blood, a roar after a kill, and the heavier footfall of a landing.
|
|
126
126
|
*/
|
|
127
127
|
readonly XENO_HISS: 60;
|
|
128
128
|
readonly SHRIEK: 61;
|
|
@@ -133,12 +133,15 @@ export declare const SOUND: {
|
|
|
133
133
|
readonly CHITIN: 66;
|
|
134
134
|
readonly ACID: 67;
|
|
135
135
|
readonly ROAR: 68;
|
|
136
|
+
readonly XENO_LAND: 69;
|
|
136
137
|
};
|
|
137
138
|
/**
|
|
138
139
|
* The sounds of the game: one entry per sound, its voices layered, in SOUND order. A low-passed
|
|
139
140
|
* noise is quiet (lp 0.06 keeps about a tenth of the swing): the loops have a high volume.
|
|
140
141
|
*/
|
|
141
142
|
export declare const LAYERS: Voice[][];
|
|
143
|
+
/** The seconds sound `id` lasts: its longest voice, from its start late to the end of its decay. */
|
|
144
|
+
export declare const secondsOf: (id: number, layers?: Voice[][]) => number;
|
|
142
145
|
/** The sounds played in a loop: their buffers go through seam. */
|
|
143
146
|
export declare const LOOPED: number[];
|
|
144
147
|
/**
|
|
@@ -6,8 +6,8 @@ export declare const TAUNT_DELAY = 0.6;
|
|
|
6
6
|
export declare const TAUNT_LATE = 1.3;
|
|
7
7
|
/** Seconds a player keeps quiet after a taunt: a quick run of frags gets one. */
|
|
8
8
|
export declare const TAUNT_GAP = 4;
|
|
9
|
-
/** The voice of player `id` in a build (BODY): one of the man's or one of the woman's. */
|
|
10
|
-
export declare const speakerOf: (id: number, body?: number) => number;
|
|
9
|
+
/** The voice of player `id` in a build (BODY): one of the man's or one of the woman's, a ninja's own. */
|
|
10
|
+
export declare const speakerOf: (id: number, body?: number, ninja?: boolean) => number;
|
|
11
11
|
/** A player's speed of speech, a little off the next's by his id, so that two in a voice differ. */
|
|
12
12
|
export declare const paceOf: (id: number) => number;
|
|
13
13
|
/**
|
|
@@ -17,7 +17,7 @@ export declare const paceOf: (id: number) => number;
|
|
|
17
17
|
export declare const tauntOf: (speaker: number, how: number, n: number) => number;
|
|
18
18
|
/** The clip (CAST) of `speaker`'s `k`th cry as he goes down. */
|
|
19
19
|
export declare const deathOf: (speaker: number, k: number) => number;
|
|
20
|
-
/**
|
|
20
|
+
/** A line over the radio that began: who says it, and its seconds. */
|
|
21
21
|
export interface Said {
|
|
22
22
|
by: number;
|
|
23
23
|
s: number;
|
|
@@ -34,16 +34,17 @@ export interface Taunts {
|
|
|
34
34
|
n: number;
|
|
35
35
|
}, me: number, now: number, wait?: number): void;
|
|
36
36
|
/**
|
|
37
|
-
* Says the taunts due at `now` (s): the own and the one aimed at the own
|
|
38
|
-
*
|
|
39
|
-
* when it does not draw him
|
|
37
|
+
* Says the taunts due at `now` (s): the own centred, an ally's and the one aimed at the own
|
|
38
|
+
* player over the radio wherever their author is, any other enemy's from where `where` draws him
|
|
39
|
+
* (feet), unheard when it does not draw him; a xenomorph roars in their place. Returns the
|
|
40
|
+
* radio's lines that began.
|
|
40
41
|
*/
|
|
41
42
|
frame(now: number, where: (id: number) => Vec3 | undefined): Said[];
|
|
42
43
|
}
|
|
43
44
|
export declare const createTaunts: (audio: Pick<Audio, "speak"> & Partial<Pick<Audio, "play">>,
|
|
44
|
-
/** A player's
|
|
45
|
-
|
|
45
|
+
/** A player's voice from the roster (speakerOf()). */
|
|
46
|
+
speaker: (id: number) => number,
|
|
46
47
|
/** A player's team from the roster. */
|
|
47
48
|
team?: (id: number) => number | undefined,
|
|
48
|
-
/** Whether a player is a xenomorph: it roars (ROAR), with no words
|
|
49
|
+
/** Whether a player is a xenomorph: it roars (ROAR), with no words, over the radio all the same. */
|
|
49
50
|
beast?: (id: number) => boolean) => Taunts;
|