@korial29/tiny-fps 0.222.0 → 0.224.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.
@@ -8,7 +8,7 @@ export interface Loop {
8
8
  export interface Audio {
9
9
  /**
10
10
  * Starts the AudioContext on a user gesture (browsers keep it suspended until one); the first
11
- * call also renders the sound buffers and starts the music. Later calls do nothing.
11
+ * call also renders the sound buffers and starts the menus' theme. Later calls do nothing.
12
12
  */
13
13
  unlock(): void;
14
14
  /** Where the listener is and looks, each frame (yaw as a player's: 0 looks toward -z). */
@@ -36,6 +36,11 @@ export interface Audio {
36
36
  loop(id: number): Loop;
37
37
  /** Fades the music out (true) or back in (false), the other sounds untouched: the Hunter's visions. */
38
38
  hush(on: boolean): void;
39
+ /**
40
+ * The menus' theme (true, as at first) or the map's music (false), crossfaded; the map's is
41
+ * rendered on the first false, so the first click renders one song only.
42
+ */
43
+ menu(on: boolean): void;
39
44
  /** Mutes or unmutes everything, music included. */
40
45
  mute(on: boolean): void;
41
46
  readonly muted: boolean;
@@ -75,7 +80,7 @@ export declare const MIMIC: {
75
80
  export declare const SPRITES: (() => Promise<string>)[];
76
81
  /** The players' voices (voice/cast.ts), loaded the same way after the announcer's. */
77
82
  export declare const VOICED: (() => Promise<string>)[];
78
- export declare const createAudio: (layers?: Voice[][], sprites?: (() => Promise<string>)[], song?: () => Float32Array, voiced?: (() => Promise<string>)[]) => Audio;
83
+ export declare const createAudio: (layers?: Voice[][], sprites?: (() => Promise<string>)[], song?: () => Float32Array, voiced?: (() => Promise<string>)[], theme?: () => Float32Array) => Audio;
79
84
  /** The mute choice of the last visit. Storage throws when blocked: no memory then. */
80
85
  export declare const savedMute: () => boolean;
81
86
  /** Flips mute, remembers it, and returns the new state. */
@@ -274,3 +274,11 @@ export declare const music: () => Float32Array;
274
274
  export declare const moon: () => Float32Array;
275
275
  /** The music of each map by its key; the others play music(). */
276
276
  export declare const SONGS: Record<string, () => Float32Array>;
277
+ /**
278
+ * The menus' theme, 8-bit: thirty-two bars in E minor at 105 bpm, a chord every bar or half bar.
279
+ * The lead on the soft triangle, then on a pulse, then wide and with an echo at the climax, then
280
+ * back on the triangle with an echo over a thinner beat; under it a sixteenth arpeggio of the
281
+ * chord, an octave bass on the triangle and noise drums. Rhythmic, never shrill: the thin pulses
282
+ * stay quiet. Mono at MUSIC_RATE, deterministic, its end joining its start.
283
+ */
284
+ export declare const anthem: () => Float32Array;
@@ -103,10 +103,10 @@ export declare const onHead: (x: number, y: number) => number;
103
103
  /** The exponent of the dome's sections, 2 an ellipse: over it, a flatter top and fuller corners (the user, 2026-11-24: flatten the top a little, no egg). */
104
104
  export declare const CREST_E = 2.5;
105
105
  /**
106
- * How much larger its head is than it was drawn (the user, 2026-11-16: a bigger head), about the
107
- * head joint: the dome here (CREST), the face's pieces in xeno.ts (grow()).
106
+ * How much larger its head is than it was drawn (the user, 2026-11-16: a bigger head, 2026-11-24:
107
+ * a little bigger still), about the head joint: the dome here (CREST), the face's pieces in xeno.ts (grow()).
108
108
  */
109
- export declare const HEAD_K = 1.12;
109
+ export declare const HEAD_K = 1.2;
110
110
  /** And how much narrower (the user, 2026-11-16: less round, the sides in), across it alone. */
111
111
  export declare const HEAD_X = 0.78;
112
112
  /** The dome's length behind the face's edge, metres, before the head is grown. */
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.222.0",
5
+ "version": "0.224.0",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist"