@korial29/tiny-fps 0.143.0 → 0.145.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.
@@ -33,6 +33,8 @@ interface Region {
33
33
  legs?: boolean;
34
34
  /** No plate: the suit's dark ribbed cloth, a hair off the skin, with no wall (the gusset). */
35
35
  thin?: boolean;
36
+ /** No plate: the ninja's belt, cloth in the team's colour a hair off the skin, with no wall. */
37
+ belt?: boolean;
36
38
  }
37
39
  /**
38
40
  * The chest plate's pecs (the user, 2026-11-10: fuller toward the bottom, then the round part too
@@ -101,6 +103,20 @@ export declare const THIGH: {
101
103
  back: number;
102
104
  at: number[];
103
105
  };
106
+ /**
107
+ * The ninja's belt (the user, 2026-11-13: a V on the sides, then deeper, on him and on her): its
108
+ * bottom at the front's middle, under the buckle's middle (buckle.ts), rising `rise` to the hips,
109
+ * then down round the back to `back` from the front's (over it, the back's last lames would meet
110
+ * it); its height, and how far it stands off the skin. Cut as the gusset is, so drawn on every
111
+ * map, armour or none (armor()'s `bare`).
112
+ */
113
+ export declare const BELT: {
114
+ y: number;
115
+ rise: number;
116
+ back: number;
117
+ h: number;
118
+ off: number;
119
+ };
104
120
  /**
105
121
  * The chest plate's armholes (the user, 2026-11-12: a triangle came through the plate under the
106
122
  * armpit; 2026-11-13: small triangles on its sides): the shoulder's skin stands out of the trunk's
@@ -147,19 +163,70 @@ export declare const VEST: {
147
163
  lame: number;
148
164
  gap: number;
149
165
  };
166
+ /**
167
+ * The last lame's point cut round over the belt's buckle (buckle.ts; the user, 2026-11-13: they met,
168
+ * fix the armour, not the buckle): an arch `clear` over its rim, the angle turned into a place
169
+ * across on the waist's front, `waist` out from the axis.
170
+ */
171
+ export declare const ARCH: {
172
+ clear: number;
173
+ waist: number;
174
+ };
150
175
  /**
151
176
  * The vest's armholes (the user, 2026-11-13: a crack in the chest piece by the armpit): over the
152
177
  * trunk's split (1.41 m) the skin is the shoulder's and goes with the arm, away from the piece under
153
- * it. Its top is down to `y`, under the split, at the angle `a`, where the shoulder's skin starts;
154
- * from the top over the pec it falls there from the angle `fall` on him and on her (hers sooner,
155
- * round over each breast); its outer corner rounds off by `corner` between the angles `round`.
178
+ * it. Its top is down to `y`, under the split, at the angle `a` on him and on her; from the top over
179
+ * the pec it falls there from the angle `fall` (hers sooner, round over each breast); its outer
180
+ * corner rounds off by `corner` between the angles `round`. His holds its height out to the
181
+ * shoulders, over all of the pecs, under the pads (the user, 2026-11-13: it fell from 22 to 42
182
+ * degrees and left their top bare); the skin there is the chest's and the collarbone's, not yet
183
+ * the arm's.
156
184
  */
157
185
  export declare const ARMHOLE: {
158
- a: number;
186
+ a: number[];
159
187
  y: number;
160
188
  fall: number[];
161
189
  corner: number;
162
- round: number[];
190
+ round: number[][];
191
+ };
192
+ /**
193
+ * The ninja's back (the user, 2026-11-13: one big block, not pretty): two plates on each shoulder
194
+ * blade, from `spine` degrees off the spine (a groove down it) to `a`, parted at the trunk's split
195
+ * (`split`, 1.41 m: one plate across it showed the step between the two rings): the upper one up to
196
+ * `top` by the spine, rising `rise` toward the shoulder and rounding off by `corner` at its outer
197
+ * end; the lower one from `low` by the spine, rising `wing` to its outer end. Under them three lames
198
+ * as the belly's, the first's top at `lames`, each `lame` high, their point `dip` down at the spine.
199
+ */
200
+ export declare const BACK: {
201
+ spine: number;
202
+ a: number;
203
+ split: number[];
204
+ top: number;
205
+ rise: number;
206
+ corner: number;
207
+ low: number;
208
+ wing: number;
209
+ lames: number;
210
+ lame: number;
211
+ dip: number;
212
+ };
213
+ /**
214
+ * The blocks down the spine, in the back's groove: how many, the first's top, their height and the
215
+ * gap between two (none across the split), their half width (degrees) and how far they stand off
216
+ * the skin.
217
+ */
218
+ export declare const SPINE: {
219
+ n: number;
220
+ top: number;
221
+ h: number;
222
+ gap: number;
223
+ a: number;
224
+ off: number;
225
+ };
226
+ /** The plates on the flanks: their heights, and the angles round from the front they span. */
227
+ export declare const SIDES: {
228
+ y: number[][];
229
+ a: number[];
163
230
  };
164
231
  /** How far the ninja's bracers stand off the forearm: half a plate's thickness. */
165
232
  export declare const BRACER = 0.006;
@@ -201,11 +268,27 @@ export declare const SWELL: {
201
268
  * from upright (degrees), its length, its half width, the side it is on (0: both)].
202
269
  */
203
270
  export declare const DETAILS: number[][];
271
+ /**
272
+ * 忍 on the left pec of the ninja's chest piece (the user, 2026-11-13: the hood's ideogram on the
273
+ * chest too), dark, over the vents and read from the front, on him and on her: its middle across
274
+ * (m, - the left) and up, its size, and the trunk's half width and depth there that turn a place
275
+ * across into an angle round it. Hers in the middle of her left breast, in place of its vents
276
+ * (VENTS): her piece is moulded over the dome and set where the skin's normal meets it, so a stroke
277
+ * over the top of the breast landed past the piece's top and was dropped.
278
+ */
279
+ export declare const SIGN: {
280
+ x: number;
281
+ y: number;
282
+ size: number;
283
+ w: number;
284
+ d: number;
285
+ }[];
204
286
  /**
205
287
  * The ninja's details (the user, 2026-11-13: more detail on his armour), as DETAILS on his own
206
- * pieces: a seam down the chest piece and three vents on each pec; a rivet at each end of each lame;
207
- * two grooves down the back plate, either side of the spine; a band at each end of the bracers with
208
- * three slits between them; a groove down each shin guard, a rivet each side of its top.
288
+ * pieces: a seam down the chest piece; a rivet at each end of each lame;
289
+ * a groove down each of the back's blade plates, a rivet at each end of each back lame; a band at each end of the bracers with
290
+ * three slits between them; a groove down each shin guard, a rivet each side of its top. And by
291
+ * build, the vents (VENTS) and 忍 on the left pec (SIGNS).
209
292
  */
210
293
  export declare const NINJA_DETAILS: number[][];
211
294
  /**
@@ -223,5 +306,5 @@ export declare const ASTRO_DETAILS: number[][];
223
306
  * plates' colour (their walls a shade darker): white when absent, the astronaut's, who has his own
224
307
  * details in his team's colour `accent` too. The `ninja` wears his own armour.
225
308
  */
226
- export declare const armor: (out: number[], from: number, s: Skin, fine?: boolean, plate?: number[], ninja?: boolean, accent?: number[]) => void;
309
+ export declare const armor: (out: number[], from: number, s: Skin, fine?: boolean, plate?: number[], ninja?: boolean, accent?: number[], bare?: boolean) => void;
227
310
  export {};
@@ -37,7 +37,7 @@ export interface Audio {
37
37
  * then MP3 where the browser cannot decode the first (older Safari).
38
38
  */
39
39
  export declare const SPRITES: (() => Promise<string>)[];
40
- export declare const createAudio: (layers?: Voice[][], sprites?: (() => Promise<string>)[]) => Audio;
40
+ export declare const createAudio: (layers?: Voice[][], sprites?: (() => Promise<string>)[], song?: () => Float32Array) => Audio;
41
41
  /** The mute choice of the last visit. Storage throws when blocked: no memory then. */
42
42
  export declare const savedMute: () => boolean;
43
43
  /** Flips mute, remembers it, and returns the new state. */
@@ -0,0 +1,8 @@
1
+ import type { Vec3 } from './mesh';
2
+ import type { Quat } from './rig';
3
+ /** The height of its middle at rest, on the middle of the belt (0.99 to 1.03 m). */
4
+ export declare const BUCKLE_Y = 1.008;
5
+ /** Its radius and depth (m). */
6
+ export declare const BUCKLE: number[];
7
+ /** Appends the buckle for build b's pelvis at `at` turned by `q`, its middle in `team`. */
8
+ export declare const buckle: (out: number[], at: Vec3, q: Quat, b: number, team: number[]) => void;
@@ -3,6 +3,11 @@ import type { Vec3 } from './mesh';
3
3
  import type { Skin } from './skin';
4
4
  /** The suit's and the hood's black, a touch of blue in it; the guard's rim, a shade lighter; the disc's ink. */
5
5
  export declare const CLOTH: number[];
6
+ /**
7
+ * 忍, its strokes as lines in a unit square, y up: 刃 (the turn and hook, the sweep down to the
8
+ * left, its dot), then 心 (the left dot, the hook along the bottom, the middle and the right dots).
9
+ */
10
+ export declare const KANJI: number[][];
6
11
  /** The grooves at the mouth: their places round (radians), their bottom and top, their width (m). */
7
12
  export declare const MOUTH: {
8
13
  a: number[];
@@ -20,6 +20,12 @@ export declare const SHINE = -1.25;
20
20
  * metal's sharp highlight, but none of its sky reflection, which would grey it under a black sky.
21
21
  */
22
22
  export declare const GLOSS = -1.12;
23
+ /**
24
+ * The layer of gold (the ninja's shoulder pads, the user, 2026-11-13: it must shine): polished
25
+ * metal's sharp highlight, and the sky reflected in it tinted by its own colour (SHINE's, barely
26
+ * tinted, turned yellow olive under a blue sky).
27
+ */
28
+ export declare const GILT = -1.42;
23
29
  /**
24
30
  * Camera axes [right, up, forward]: forward is (-sin yaw cos pitch, sin pitch, -cos yaw cos pitch),
25
31
  * y up at roll 0. A positive roll leans the camera right: up tilts toward right.
@@ -20,12 +20,24 @@ export declare const COLLAR: {
20
20
  };
21
21
  /**
22
22
  * The lames' front half (the user, 2026-11-13: wrap the front of the shoulders more): this much
23
- * wider than their back half, and falling this much further, down over the front of the shoulder.
23
+ * wider than their back half, and falling this much further, down over the front of the shoulder
24
+ * (1.6 plunged too steeply, the user, 2026-11-13), down onto the chest piece (the user: fill the
25
+ * gap between the pads and the plates).
24
26
  */
25
27
  export declare const FORE: {
26
28
  wide: number;
27
29
  fall: number;
28
30
  };
31
+ /** Their back half (the user, 2026-11-13: the pads go on behind too): as FORE, over the shoulder blade. */
32
+ export declare const AFT: {
33
+ wide: number;
34
+ fall: number;
35
+ };
36
+ /**
37
+ * How a lame falls from its crease to its edges, as a power of the way across: round over the
38
+ * shoulder, not a roof's straight slope (the user, 2026-11-13: round the slope; it was 1.3).
39
+ */
40
+ export declare const CROWN = 2;
29
41
  /**
30
42
  * The marine's shoulder bell (the user, 2026-11-13, on a picture of a trooper's armour: a big round
31
43
  * shell over each shoulder, hanging over the top of the arm): from the arm's joint at rest, its
@@ -51,8 +63,18 @@ export declare const BAND: {
51
63
  rows: number[];
52
64
  shade: number;
53
65
  };
66
+ /** A lame's quads: its top and underside, its inner end, its front and back edges. */
67
+ export declare const LAME_QUADS: number;
68
+ /**
69
+ * The ninja's colours (the user, 2026-11-13: vary them): gold shoulder pads that shine (GILT; a darker
70
+ * gold, the user), and a
71
+ * collar of brown cloth, matte.
72
+ */
73
+ export declare const GOLD: number[];
74
+ export declare const COLLAR_CLOTH: number[];
54
75
  /**
55
- * Appends the ninja's shoulder pads and his collar on the solved pose `s`, in the team's `color`;
76
+ * Appends the ninja's shoulder pads and his collar on the solved pose `s`, the pads in `color` (GOLD
77
+ * for him), the collar in COLLAR_CLOTH;
56
78
  * smaller on the woman (`build`). Or the `marine`'s shoulder bells, and no collar, with a band
57
79
  * round them in `band` (the astronaut's team colour on his white bells).
58
80
  */
@@ -137,3 +137,12 @@ export declare const MUSIC_RATE: number;
137
137
  * under the sounds.
138
138
  */
139
139
  export declare const music: () => Float32Array;
140
+ /**
141
+ * The moon's music, 8-bit: thirty-two bars in D minor at 126 bpm, a pulse lead, a fast arpeggio
142
+ * in a thin pulse, an octave bass on the triangle and noise drums. The second sixteen bars play
143
+ * the lead thinner with an echo and the arpeggio an octave up. Like music(): mono at MUSIC_RATE,
144
+ * deterministic, its end joining its start.
145
+ */
146
+ export declare const moon: () => Float32Array;
147
+ /** The music of each map by its key; the others play music(). */
148
+ export declare const SONGS: Record<string, () => Float32Array>;
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.143.0",
5
+ "version": "0.145.0",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist"