@korial29/tiny-fps 0.188.0 → 0.189.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.
@@ -36,7 +36,7 @@ interface Region {
36
36
  legs?: boolean;
37
37
  /** No plate: the suit's dark ribbed cloth, a hair off the skin, with no wall (the gusset). */
38
38
  thin?: boolean;
39
- /** No plate: the ninja's belt, cloth in the team's colour a hair off the skin, with no wall. */
39
+ /** No plate: the ninja's sash, cloth in its own grey (SASH) a hair off the skin, with no wall. */
40
40
  belt?: boolean;
41
41
  }
42
42
  /**
@@ -147,11 +147,11 @@ export declare const THIGH: {
147
147
  at: number[];
148
148
  };
149
149
  /**
150
- * The ninja's belt (the user, 2026-11-13: a V on the sides, then deeper, on him and on her): its
151
- * bottom at the front's middle, under the buckle's middle (buckle.ts), rising `rise` to the hips,
152
- * then down round the back to `back` from the front's (over it, the back's last lames would meet
153
- * it); its height, and how far it stands off the skin. Cut as the gusset is, so drawn on every
154
- * map, armour or none (armor()'s `bare`).
150
+ * The ninja's belt, a sash (the user, 2026-11-17: the thin strip in a V of 2026-11-13 did not
151
+ * please): wide, nearly level, woven cloth knotted in front (buckle.ts). Its bottom at the front's
152
+ * middle, rising `rise` to the hips, then down round the back to `back` over the front's; its
153
+ * height, and how far it stands off the skin. Cut as the gusset is, so drawn on every map, armour
154
+ * or none (armor()'s `bare`).
155
155
  */
156
156
  export declare const BELT: {
157
157
  y: number;
@@ -160,6 +160,8 @@ export declare const BELT: {
160
160
  h: number;
161
161
  off: number;
162
162
  };
163
+ /** The sash's dark grey (the user, 2026-11-17: thinner, and black; then less black), and the face guard's (mask.ts: the same). */
164
+ export declare const SASH: number[];
163
165
  /**
164
166
  * The chest plate's armholes (the user, 2026-11-12: a triangle came through the plate under the
165
167
  * armpit; 2026-11-13: small triangles on its sides): the shoulder's skin stands out of the trunk's
@@ -249,44 +251,18 @@ export declare const ARMHOLE: {
249
251
  round: number[][];
250
252
  };
251
253
  /**
252
- * The ninja's back (the user, 2026-11-13: one big block, not pretty): two plates on each shoulder
253
- * blade, from `spine` degrees off the spine (a groove down it) to `a`, parted at the trunk's split
254
- * (`split`, 1.41 m: one plate across it showed the step between the two rings): the upper one up to
255
- * `top` by the spine, rising `rise` toward the shoulder and rounding off by `corner` at its outer
256
- * end; the lower one from `low` by the spine, rising `wing` to its outer end. Under them three lames
257
- * as the belly's, the first's top at `lames`, each `lame` high, their point `dip` down at the spine.
254
+ * The ninja's back piece (the user, 2026-11-17: one piece as the front's, where plates by halves
255
+ * stood each side of a spine of blocks, with a plate on each flank): its top is at `top` at the
256
+ * spine and rises by `rise` beside it, before it falls (SHIELD).
258
257
  */
259
258
  export declare const BACK: {
260
- spine: number;
261
- a: number;
262
- split: number[];
263
259
  top: number;
264
260
  rise: number;
265
- corner: number;
266
- low: number;
267
- wing: number;
268
- lames: number;
269
- lame: number;
270
- dip: number;
271
- };
272
- /**
273
- * The blocks down the spine, in the back's groove: how many, the first's top, their height and the
274
- * gap between two (none across the split), their half width (degrees) and how far they stand off
275
- * the skin.
276
- */
277
- export declare const SPINE: {
278
- n: number;
279
- top: number;
280
- h: number;
281
- gap: number;
282
- a: number;
283
- off: number;
284
- };
285
- /** The plates on the flanks: their heights, and the angles round from the front they span. */
286
- export declare const SIDES: {
287
- y: number[][];
288
- a: number[];
289
261
  };
262
+ /** How far round the lames go, from the front and from the back (degrees): they meet at the flank, a seam between them. */
263
+ export declare const FLANK = 88.5;
264
+ /** The back piece's shield: the angles off the spine between which its top falls. */
265
+ export declare const SHIELD: number[];
290
266
  /** How far the ninja's bracers stand off the forearm: half a plate's thickness. */
291
267
  export declare const BRACER = 0.006;
292
268
  export declare const REGIONS: Region[];
@@ -330,7 +306,13 @@ export declare const DOME: {
330
306
  h: number;
331
307
  };
332
308
  /** The ninja's vest has them a little smaller (the user, 2026-11-13): this much of their height. */
333
- export declare const SLIM = 0.8;
309
+ export declare const SLIM = 0.65;
310
+ /** The cut down the sternum of his chest piece: how deep at the middle, how far round each side (degrees), and how hollow its sides. */
311
+ export declare const NOTCH: {
312
+ deep: number;
313
+ a: number;
314
+ curve: number;
315
+ };
334
316
  /**
335
317
  * The marine's chest shell swells toward the shoulders (the user, 2026-11-13: the plate on over the
336
318
  * top of the pecs, near the shoulders): there the shoulder's skin stands out of the trunk's, and a
@@ -368,10 +350,11 @@ export declare const SIGN: {
368
350
  }[];
369
351
  /**
370
352
  * The ninja's details (the user, 2026-11-13: more detail on his armour), as DETAILS on his own
371
- * pieces: a seam down the chest piece; a rivet at each end of each lame;
372
- * 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
373
- * three slits between them; a groove down each shin guard, a rivet each side of its top. And by
374
- * build, the vents (VENTS) and 忍 on the left pec (SIGNS).
353
+ * pieces: a seam down the chest piece, what its cut down the sternum leaves of it (NOTCH); a rivet
354
+ * each side of each lame; a groove down each side of the back piece, a rivet each side of each back
355
+ * lame, as the belly's; a band at each end of the bracers with three slits between them; a groove
356
+ * down each shin guard, a rivet each side of its top. And by build, the vents (VENTS) and 忍 on the
357
+ * left pec (SIGNS).
375
358
  */
376
359
  export declare const NINJA_DETAILS: number[][];
377
360
  /**
@@ -1,9 +1,17 @@
1
1
  import type { Vec3 } from './mesh';
2
2
  import type { Quat } from './rig';
3
3
  import type { Out } from './verts';
4
- /** The height of its middle at rest, on the middle of the belt (0.99 to 1.03 m). */
4
+ /** The height of its middle at rest, on the middle of the sash. */
5
5
  export declare const BUCKLE_Y = 1.008;
6
- /** Its radius and depth (m). */
6
+ /** The knot's half width and its depth (m): what the vest's last lame is cut round (armor.ts). */
7
7
  export declare const BUCKLE: number[];
8
- /** Appends the buckle for build b's pelvis at `at` turned by `q`, its middle in `team`. */
9
- export declare const buckle: (out: Out, at: Vec3, q: Quat, b: number, team: number[]) => void;
8
+ /** Its ends: across from the knot's middle, lean from straight down (radians), length, half width. */
9
+ export declare const ENDS: number[][];
10
+ /** Appends the knot for build b's pelvis at `at` turned by `q`, its band in `team`. */
11
+ export declare const buckle: (out: Out, at: Vec3, q: Quat, b: number) => void;
12
+ /**
13
+ * Appends the sash's two ends under the knot, at the clock `t` (s) of a runner going at `speed`
14
+ * (m/s): ribbons of PIECES pieces, each leaning a little more than the one above it, by a wave that
15
+ * runs down it; out of the body and wider apart, faster, the faster he goes. Two faces each.
16
+ */
17
+ export declare const tails: (out: Out, at: Vec3, q: Quat, b: number, t: number, speed: number) => void;
@@ -37,4 +37,6 @@ export declare const flesh: (list: Pieces, s: Skin, pose: {
37
37
  /** The runner's id: his skin's marks. */
38
38
  seed?: number,
39
39
  /** The xenomorph's: its chitin. */
40
- chitin?: boolean) => void;
40
+ chitin?: boolean,
41
+ /** The ninja's: his suit is woven cloth. */
42
+ woven?: boolean) => void;
@@ -27,4 +27,6 @@ export declare const dressedOf: (n: number) => [Float64Array, Float64Array];
27
27
  /** Appends the guard and the ideograms on the head joint at `at` turned by `q` (see solve()), on the woman's smaller head with `build`, in the team's `color`. */
28
28
  export declare const mask: (out: Out, at: Vec3, q: Quat, build?: number, color?: number[],
29
29
  /** A far runner's: fewer quads. */
30
- far?: boolean) => void;
30
+ far?: boolean,
31
+ /** The guard's shell, when not in `color` (the user, 2026-11-17: the sash's grey); the ideograms stay in `color`. */
32
+ shell?: number[]) => void;
@@ -62,6 +62,19 @@ export declare const CHITIN = -1.17;
62
62
  * of SHINE's sheen, whose band it is in.
63
63
  */
64
64
  export declare const TUBE = -1.19;
65
+ /**
66
+ * Brushed, scratched metal (the ninja's guard and shoulder pads, the user, 2026-11-17: a metallic
67
+ * texture with scratches; it was a twill): within GLOSS's band of the shader, so it keeps the clear
68
+ * coat and the wear, with a fine brushing across it and long pale scratches two ways, on its rest
69
+ * place.
70
+ */
71
+ export declare const TWILL = -1.135;
72
+ /**
73
+ * Woven cloth (the ninja's hood, the user, 2026-11-17: a weave on it), on its rest place: a plain
74
+ * weave of threads round the piece's upright axis and up it, each over one and under the next, a
75
+ * bump and a tone, and a slow mottle. Lit like -1, whose band of the shader's SPEC row it is in.
76
+ */
77
+ export declare const WEAVE = -0.94;
65
78
  /**
66
79
  * Camera axes [right, up, forward]: forward is (-sin yaw cos pitch, sin pitch, -cos yaw cos pitch),
67
80
  * y up at roll 0. A positive roll leans the camera right: up tilts toward right.
@@ -67,16 +67,11 @@ export declare const BAND: {
67
67
  };
68
68
  /** A lame's quads: its top and underside, its inner end, its front and back edges. */
69
69
  export declare const LAME_QUADS: number;
70
- /**
71
- * The ninja's colours (the user, 2026-11-13: vary them): gold shoulder pads that shine (GILT; a darker
72
- * gold, the user), and a
73
- * collar of brown cloth, matte.
74
- */
75
- export declare const GOLD: number[];
70
+ /** The ninja's collar (the user, 2026-11-13: vary the colours): brown cloth, matte. */
76
71
  export declare const COLLAR_CLOTH: number[];
77
72
  /**
78
- * Appends the ninja's shoulder pads and his collar on the solved pose `s`, the pads in `color` (GOLD
79
- * for him), the collar in COLLAR_CLOTH;
73
+ * Appends the ninja's shoulder pads and his collar on the solved pose `s`, the pads in `color` (the
74
+ * sash's grey for him, brushed metal), the collar in COLLAR_CLOTH;
80
75
  * smaller on the woman (`build`). Or the `marine`'s shoulder bells, and no collar, with a band
81
76
  * round them in `band` (the astronaut's team colour on his white bells).
82
77
  */
@@ -43,6 +43,14 @@ export declare const FOV: number;
43
43
  export declare const ROVER_NEAR: number, ROVER_MID: number;
44
44
  /** A ship's, 14 m long: its cockpit and its struts within 45 m, its plain shape past 160 m. */
45
45
  export declare const SHIP_NEAR: number, SHIP_MID: number;
46
+ /**
47
+ * The layer of the ninja's boots' uppers, in WEAVE's band (woven as it is): the shader adds their
48
+ * details on the rest place (the user, 2026-11-17): a band wound round the ankle, a cord tied under
49
+ * the lip of the shaft, and the split of the toe.
50
+ */
51
+ export declare const BOOT_LAYER = -0.88;
52
+ /** The regions of a ninja's skin that are woven cloth: his suit, and his boots' uppers (the user, 2026-11-17: cloth, not leather). */
53
+ export declare const SUIT: number[];
46
54
  export declare const POST_FRAG = "#version 300 es\nprecision highp float;uniform sampler2D S[4];uniform vec4 Y;uniform float L;in vec2 U;out vec4 o;\nvec3 b(vec2 x){vec3 c=texture(S[0],x).rgb;return c*smoothstep(.9,2.,max(c.r,max(c.g,c.b)));}\n#define T(k)texture(S[0],U+Y.xy*(k)).rgb\nvoid main(){\nvec3 c;\nif(Y.z<1.)c=(b(U+Y.xy)+b(U-Y.xy)+b(U+Y.xy*vec2(1,-1))+b(U-Y.xy*vec2(1,-1)))/4.;\nelse if(Y.z<2.)c=T(0.)*.227+(T(1.3846)+T(-1.3846))*.3162+(T(3.2308)+T(-3.2308))*.0703;\nelse{\nc=texture(S[0],U).rgb+texture(S[1],U).rgb*1.3+texture(S[2],U).rgb*1.+texture(S[3],U).rgb*.7;\nvec2 q=U-.5;\nc=min(c,.6)+.4*(1.-exp(-max(c-.6,0.)/.4));\nfloat a=atan(q.y,q.x)*24.,h=fract(sin(floor(a)*12.9898)*43758.5453);\nc+=L*step(.85-.5*L,h)*sin(fract(a)*3.1416)*smoothstep(.2,.6,length(q))*fract(length(q)*3.-Y.w*.002+h*9.)*.22;\nc*=1.-(.7+.3*L)*dot(q,q);\nc=pow(max(c*vec3(.97,1.,1.03),0.),vec3(.92))+(fract(sin(dot(gl_FragCoord.xy+Y.w,vec2(12.9898,78.233)))*43758.5453)-.5)*.03;}\no=vec4(c,1);}";
47
55
  /**
48
56
  * Blinn-Phong strength and exponent: a row per TEX id in order (brick, tile, lava, stone, metal, wood,
@@ -42,6 +42,10 @@ export interface Flesh {
42
42
  seed?: number;
43
43
  /** The xenomorph's skin: its chitin (CHITIN in mesh.ts). */
44
44
  chitin?: boolean;
45
+ /** The ninja's skin: his suit is woven cloth (WEAVE in mesh.ts). */
46
+ woven?: boolean;
47
+ /** The ninja's armour: its trunk is quilted (render.ts). */
48
+ quilt?: boolean;
45
49
  }
46
50
  /** What the vertex shader reads by texel (flesh.ts): four floats each, 2048 a row. */
47
51
  export declare let data: Float32Array<ArrayBuffer>;
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.188.0",
5
+ "version": "0.189.0",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist"