@korial29/tiny-fps 0.165.0 → 0.165.1

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.
@@ -135,7 +135,9 @@ lite?: boolean,
135
135
  /** The marine's: lit buttons on the strap round the wrist (WRIST_LIGHTS). */
136
136
  lights?: boolean,
137
137
  /** The xenomorph's claws on the fingertips (Grip). */
138
- claws?: boolean) => void;
138
+ claws?: boolean,
139
+ /** Its size: the xenomorph's grows from the wrist over 4 cm, hers is smaller (hands()). */
140
+ grow?: number) => void;
139
141
  /** What a hand does besides closing (hand()): the left index pointing, the right thumb pushing toward `to`, the left thumb cupped. */
140
142
  export interface Grip {
141
143
  point?: number;
@@ -15,6 +15,8 @@ export interface Draw {
15
15
  f?: Flesh;
16
16
  /** Worn: armour, which the shader scuffs (grime, chipped paint, scratches) on its glossy and gold parts. */
17
17
  w?: boolean;
18
+ /** Thin: too fine for a shadow, left out of the depth passes (the xenomorph's veins, teeth and eyes). */
19
+ s?: boolean;
18
20
  /** Close hair (hair.ts), coloured `rgb`, swung by `sw` in the head's frame at the time `t`: the shader sways it (swayOf()). */
19
21
  h?: {
20
22
  rgb: number[];
@@ -19,14 +19,43 @@ interface Solved {
19
19
  rot: Quat[];
20
20
  }
21
21
  /**
22
- * Its spine, in the world, from the base of the skull down the back and on into the tail (the user,
23
- * 2026-11-15: vertebrae linked to one another, from the tail up the back to the head): one chain of
24
- * vertebrae, each a bead pinched at its joints with a spine standing out of it, on the back half
25
- * sunk in the skin, the tail free. The tail bends from down and back up to its tip, sways with the
26
- * clock `t` and more with the speed `run` (0 to 1); `sting` (0 to 1) arches it up over the back and
27
- * forward past the head. The stinger glows in the team's `color`. `lod` 0 far, 1 near, 2 close.
28
- */
29
- export declare const column: (out: Out, s: Solved, t: number, run: number, sting: number, color: number[], lod: number) => void;
22
+ * Geometry baked into the beast's skin (shape() in skin.ts), posed with it by flesh() at no cost a
23
+ * frame: places and normals at rest, six numbers a vertex, its two joints and its weight on the
24
+ * second, three vertex indices a triangle and the palette region of each corner.
25
+ */
26
+ export interface Baked {
27
+ v: number[];
28
+ j: number[];
29
+ w: number[];
30
+ t: number[];
31
+ c: number[];
32
+ }
33
+ /** The back's part of the column at a level of detail: baked, how many vertebrae, and the ring the tail goes on from, on the pelvis. */
34
+ interface Back {
35
+ baked: Baked;
36
+ n: number;
37
+ /** The last ring's middle in the pelvis' frame, its way, its radius. */
38
+ c: Vec3;
39
+ tan: Vec3;
40
+ r: number;
41
+ }
42
+ /** The pipes' colour: a very dark grey, lighter than the chitin. */
43
+ export declare const PIPE: number[];
44
+ /**
45
+ * The back's half of its spine, sunk in the skin, and the pipes up its neck, baked into the skin of
46
+ * `lod` (shape() in skin.ts): they only follow the joints, so the shader poses them with the rest
47
+ * of it. The vertebrae lie at rest as column() spaced them; each point hangs on the joints of the
48
+ * two bones it lies between, the last ring on the pelvis alone, where tail() takes the column on.
49
+ */
50
+ export declare const backOf: (lod: number) => Back;
51
+ /**
52
+ * Its tail, in the world, from the solved skeleton `s`: the column's free part, from the pelvis
53
+ * on (the back's is in the skin, backOf()), each vertebra a bead pinched at its joints with a spine
54
+ * standing out of it but near the tip, as bonesOf() bends and sways it; the stinger at its end, a
55
+ * blade swelling to a barb, then a point, glowing in the team's `color`. Written straight into
56
+ * `out`. `lod` 0 far, 1 near, 3 close.
57
+ */
58
+ export declare const tail: (out: Out, s: Solved, t: number, run: number, sting: number, color: number[], lod: number) => void;
30
59
  /** Bone: its claws and teeth, nothing else. */
31
60
  export declare const BONE: number[];
32
61
  /** Where the metatarsal (the foot) ends, from the ankle, in the foot joint's frame: longer than the rig's foot. */
@@ -60,13 +89,6 @@ export declare const ribs: (out: Out, at: Vec3, q: Quat, lod: number, low?: bool
60
89
  * shoulder.
61
90
  */
62
91
  export declare const clavicles: (out: Out, at: Vec3, q: Quat, lod: number) => void;
63
- /**
64
- * Thin pipes up its neck (the user, 2026-11-15: following the neck, in curves, many): six each side,
65
- * from the top of the chest round the neck's sides into the underside of the skull, each through
66
- * points carried by the chest, the neck and the head, so it bends with them, on a smooth curve
67
- * that snakes round the neck. In the world, from the solved skeleton `s`.
68
- */
69
- export declare const pipes: (out: Out, s: Solved, lod: number) => void;
70
92
  /**
71
93
  * Curved horns out of its back (the user, 2026-11-15): a pair on a joint, each from beside the spine
72
94
  * out of the back near square to it and well out to the side, clear of the head, curling up a little, `len` long and `r` thick at its root, at `base` (the right
@@ -104,6 +126,11 @@ export declare const HEAD_UP = 0.065;
104
126
  * with grey teeth, the fangs longest. A grid over the face, finer the closer.
105
127
  */
106
128
  export declare const skull: (out: Out, head: Vec3, q: Quat, lod: number) => void;
129
+ /**
130
+ * The fine parts of its face, too thin for a shadow (soldier.ts keeps them out of the depth passes):
131
+ * its steel teeth and the cords of sinew beside its mouth. Not far.
132
+ */
133
+ export declare const teeth: (out: Out, head: Vec3, q: Quat, lod: number) => void;
107
134
  /**
108
135
  * Veins along its dome (the user, 2026-11-16), on the head joint: on each side three running back
109
136
  * from the face's edge along the banana, wandering a little up and down its side, thinning toward
@@ -111,5 +138,32 @@ export declare const skull: (out: Out, head: Vec3, q: Quat, lod: number) => void
111
138
  */
112
139
  export declare const veins: (out: Out, head: Vec3, q: Quat, lod: number) => void;
113
140
  /** Its eyes, glowing slits at the back of the orbits in the team's `color`. */
114
- export declare const eyes: (out: Out, head: Vec3, q: Quat, color: number[]) => void;
141
+ export declare const eyes: (out: Out, head: Vec3, q: Quat, color: number[], lod?: number) => void;
142
+ /** A rigid piece made at the origin of its joint's frame, then only placed (store.ts). */
143
+ type Make = (o: Out, at: Vec3, q: Quat) => void;
144
+ /**
145
+ * A rigid piece of the xenomorph at a level of detail: its key in the store (all its vertices
146
+ * depend on), how it is made, and whether it is `thin`, too fine for a shadow: left out of the
147
+ * depth passes.
148
+ */
149
+ export interface Part {
150
+ key: string;
151
+ make: Make;
152
+ thin?: boolean;
153
+ }
154
+ /** Its pieces by the joint they go on (partsOf()), those on one joint merged: one draw each a pass. */
155
+ export declare const PART: {
156
+ SHIN: number;
157
+ FOOT: number;
158
+ TOES: number;
159
+ CHEST: number;
160
+ SPINE: number;
161
+ ELBOW: number;
162
+ CUFF_L: number;
163
+ CUFF_R: number;
164
+ HEAD: number;
165
+ FINE: number;
166
+ };
167
+ /** The xenomorph's rigid pieces at `lod`, in PART's order; render.ts makes them all at the map's load. */
168
+ export declare const partsOf: (lod: number) => Part[];
115
169
  export {};
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.165.0",
5
+ "version": "0.165.1",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist"