@korial29/tiny-fps 0.186.1 → 0.188.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.
@@ -106,7 +106,9 @@ export declare const BARE = 8;
106
106
  * through the joint, not a corner, so that a fist keeps a round knuckle. The glove ends at ring
107
107
  * BARE in a rolled edge; the skin goes on to the tip.
108
108
  */
109
- export declare const finger: (p: Vec3, d1: Vec3, d2: Vec3, d3: Vec3, l: number, r: number, t: Vec3) => Ring[];
109
+ export declare const finger: (p: Vec3, d1: Vec3, d2: Vec3, d3: Vec3, l: number, r: number, t: Vec3,
110
+ /** 0 to 1: a skeleton's finger (the xenomorph's), thin bones between swollen knuckles, a fine tip. */
111
+ bony?: number) => Ring[];
110
112
  /**
111
113
  * The directions of the three phalanges of the finger i (index to little) at `curl`, in the hand's
112
114
  * space. At 0.9, the curl of every grip, they go round a handle 2.5 cm thick 7.8 cm along the
@@ -49,15 +49,24 @@ export declare const swung: (a?: Blade, b?: Blade) => number;
49
49
  export declare const struck: (a?: Blade, b?: Blade, xeno?: boolean) => boolean;
50
50
  /** The pitch of a player's voice: the woman's higher, and each a little off the next by his id. */
51
51
  export declare const voiceOf: (id: number, body?: number) => number;
52
- export declare const createCombat: (world: World, audio: Pick<Audio, "play"> & Partial<Pick<Audio, "loop" | "speak">>, hud: Pick<Hud, "vitals" | "hit" | "down">, fx: Pick<Effects, "fire" | "cut" | "wound" | "lie" | "quake" | "blow" | "punch">, tracer: Pick<Tracer, "flash" | "burst" | "blast" | "orbs" | "update" | "mount" | "crackle" | "charging" | "lightning">, ctl: {
52
+ /**
53
+ * A death worth a cry of pain rather than a groan (the user, 2026-11-17): a katana's cut that took
54
+ * a limb, a fall hard enough to hurt (the speed a frame before the landing), or a hit of 3 or more
55
+ * (a grenade, a charged shot). `was` is the life and vertical speed a frame before.
56
+ */
57
+ export declare const dreadful: (was: {
58
+ life: number;
59
+ vy: number;
60
+ }, p: PlayerState) => boolean;
61
+ export declare const createCombat: (world: World, audio: Pick<Audio, "play"> & Partial<Pick<Audio, "loop">>, hud: Pick<Hud, "vitals" | "hit" | "down">, fx: Pick<Effects, "fire" | "cut" | "wound" | "lie" | "quake" | "blow" | "punch">, tracer: Pick<Tracer, "flash" | "burst" | "blast" | "orbs" | "update" | "mount" | "crackle" | "charging" | "lightning">, ctl: {
53
62
  pitch: number;
54
63
  }, balls: Pick<Balls, "fire" | "frame">,
55
64
  /** The muzzle of a runner's long gun as last drawn, from his feet (Renderer.muzzle()). */
56
65
  drawn?: (id: number) => Vec3 | undefined,
57
66
  /** The pitch of a player's voice (voiceOf()). */
58
67
  voice?: (id: number) => number,
59
- /** A player's own voice in the players' sprite (speakerOf()). */
60
- speaker?: (id: number) => number,
68
+ /** A player's BODY: his death cries' voice. */
69
+ bodyOf?: (id: number) => number | undefined,
61
70
  /** Whether a player is a xenomorph: its own cries, its acid, its hiss at a tail's charge, its shriek at a dash. */
62
71
  beast?: (id: number) => boolean) => Combat;
63
72
  export {};
@@ -136,6 +136,15 @@ export declare const SOUND: {
136
136
  readonly XENO_LAND: 69;
137
137
  /** A fist bursting a head (the fists' glory kill): a deep thump, bone cracking, a wet splatter. */
138
138
  readonly SMASH: 70;
139
+ /**
140
+ * The death cries (scream(), the user 2026-11-17: a synth's, not the players' voices): DEATH his
141
+ * brief cry of pain and HER_DEATH hers, for a dreadful death (a limb cut off, a hard fall, a heavy
142
+ * hit); GROAN and HER_GROAN cut off in the throat, for the others. Hers are her own, not his
143
+ * played faster: that raised the vowel with the pitch into a cartoon's.
144
+ */
145
+ readonly HER_DEATH: 71;
146
+ readonly GROAN: 72;
147
+ readonly HER_GROAN: 73;
139
148
  };
140
149
  /**
141
150
  * The sounds of the game: one entry per sound, its voices layered, in SOUND order. A low-passed
@@ -152,12 +161,37 @@ export declare const LOOPED: number[];
152
161
  */
153
162
  export declare const render: (id: number, layers?: Voice[][]) => Float32Array;
154
163
  /**
155
- * The death cry of a human (the user, 2026-11-16: "a real scream", then lower and shorter), a
156
- * source-filter voice: a saw for the vocal folds, its pitch thrown up to a strained 380 Hz, held
157
- * 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
158
- * each period; four vowel formants gliding from a wide "aah" to a dying "uh", then a soft clip.
164
+ * A cry of a human voice, source-filter: the flow through the vocal folds (a Rosenberg pulse, not a
165
+ * saw: a saw buzzes like a synth) through four vowel formants, breath riding each opening, and no
166
+ * two periods alike in length or loudness. The death cries are short cries of pain (the user,
167
+ * 2026-11-17: "a brief cry of pain", the screams were long, loud and synthetic).
159
168
  */
160
- export declare const scream: () => Float32Array;
169
+ export type Cry = {
170
+ /** Seconds. */
171
+ len: number;
172
+ /** The pitch (Hz) at the start, at `up` s, at `hold` s, and at the end, falling from `hold`. */
173
+ hz: [number, number, number, number];
174
+ up: number;
175
+ hold: number;
176
+ /** Vibrato: Hz and depth. */
177
+ vib: [number, number];
178
+ /** How much each period's loudness is off the last (shimmer). */
179
+ shim: number;
180
+ /** Every other period this much louder: the rasp of a torn throat. */
181
+ rasp: number;
182
+ /** Breath on each opening while held, and more of it as the voice gives out. */
183
+ breath: [number, number];
184
+ /** The formants: Hz at the start, at the end, bandwidth, gain. */
185
+ F: number[][];
186
+ /** Seconds where the voice stops dead, a breath let out after it; 0 fades it out over `fade` s. */
187
+ choke: number;
188
+ fade: number;
189
+ /** The peak of the samples. */
190
+ vol: number;
191
+ seed: number;
192
+ };
193
+ /** Renders a Cry as mono samples at RATE, peaking at its `vol`. */
194
+ export declare const scream: (c?: Cry) => Float32Array;
161
195
  /**
162
196
  * A sound made loopable: the last `x` samples are cross-faded into the first, the length drops by
163
197
  * `x`, and the end joins the start. For a stationary sound (a loop's voice is held at full
@@ -15,8 +15,6 @@ export declare const paceOf: (id: number) => number;
15
15
  * for the fists and the katana, else one of the taunts, a new one each frag.
16
16
  */
17
17
  export declare const tauntOf: (speaker: number, how: number, n: number) => number;
18
- /** The clip (CAST) of `speaker`'s `k`th cry as he goes down. */
19
- export declare const deathOf: (speaker: number, k: number) => number;
20
18
  /** A line over the radio that began: who says it, and its seconds. */
21
19
  export interface Said {
22
20
  by: number;