@korial29/tiny-fps 0.183.1 → 0.185.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.
@@ -0,0 +1,29 @@
1
+ import type { PlayerState } from '../shared/types';
2
+ import type { Vec3 } from './mesh';
3
+ /**
4
+ * A cue: the tick of the lock it plays on, the sound, on the killer (0) or the victim (1), its gain
5
+ * and rate, and, to repeat it, every so many ticks up to a last; a victim's cue `voiced` is said in
6
+ * his own voice (its rate times voiceOf()).
7
+ */
8
+ export type Cue = [
9
+ tick: number,
10
+ sound: number,
11
+ on: number,
12
+ gain: number,
13
+ rate: number,
14
+ every?: number,
15
+ last?: number,
16
+ voiced?: boolean
17
+ ];
18
+ /** The xenomorph's, over GLORY_TICKS: on him at 18, its head back from 46, the bite home at 114. */
19
+ export declare const FEAST_CUES: Cue[];
20
+ /** The katana's, over EXEC.TICKS: the cut down bites at 36, he is on his knee at 46. */
21
+ export declare const EXEC_CUES: Cue[];
22
+ /** After the kill: seconds, then as a cue (on the place each stood). */
23
+ export declare const FEAST_AFTER: [number, number, number, number, number][];
24
+ export declare const EXEC_AFTER: [number, number, number, number, number][];
25
+ export interface GloryFx {
26
+ /** Plays what the glory kills of `players` (the own one among them) cue since the last frame. */
27
+ frame(players: PlayerState[]): void;
28
+ }
29
+ export declare const createGloryFx: (play: (id: number, at: Vec3, gain: number, rate: number) => void, voice: (id: number) => number, xeno: (id: number) => boolean, later?: (f: () => void, ms: number) => void) => GloryFx;
@@ -149,6 +149,13 @@ export declare const LOOPED: number[];
149
149
  * noise), silent at both ends (no click).
150
150
  */
151
151
  export declare const render: (id: number, layers?: Voice[][]) => Float32Array;
152
+ /**
153
+ * The death cry of a human (the user, 2026-11-16: "a real scream", then lower and shorter), a
154
+ * source-filter voice: a saw for the vocal folds, its pitch thrown up to a strained 380 Hz, held
155
+ * shaking a quarter of a second, then falling away an octave and a half; every other period louder (the period doubling of a torn throat, the rasp), breath riding
156
+ * each period; four vowel formants gliding from a wide "aah" to a dying "uh", then a soft clip.
157
+ */
158
+ export declare const scream: () => Float32Array;
152
159
  /**
153
160
  * A sound made loopable: the last `x` samples are cross-faded into the first, the length drops by
154
161
  * `x`, and the end joins the start. For a stationary sound (a loop's voice is held at full
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.183.1",
5
+ "version": "0.185.0",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist"