@korial29/tiny-fps 1.8.0 → 1.9.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.
Files changed (102) hide show
  1. package/dist/cast-art-DbwsToaQ.js +1 -0
  2. package/dist/index.js +7 -7
  3. package/dist/landfall-CSZGx2iA.js +21 -0
  4. package/dist/types/client/armor/clip.d.ts +22 -0
  5. package/dist/types/client/armor/cooking.d.ts +14 -0
  6. package/dist/types/client/armor/details.d.ts +65 -0
  7. package/dist/types/client/armor/fit.d.ts +8 -0
  8. package/dist/types/client/armor/regions.d.ts +304 -0
  9. package/dist/types/client/armor/scratches.d.ts +4 -0
  10. package/dist/types/client/armor/shell.d.ts +46 -0
  11. package/dist/types/client/armor/types.d.ts +37 -0
  12. package/dist/types/client/armor/wear.d.ts +22 -0
  13. package/dist/types/client/armor.d.ts +9 -393
  14. package/dist/types/client/body/constants.d.ts +35 -0
  15. package/dist/types/client/body/create.d.ts +3 -0
  16. package/dist/types/client/body/fingers.d.ts +112 -0
  17. package/dist/types/client/body/glove.d.ts +27 -0
  18. package/dist/types/client/body/hands.d.ts +28 -0
  19. package/dist/types/client/body/hunter.d.ts +26 -0
  20. package/dist/types/client/body/motion.d.ts +42 -0
  21. package/dist/types/client/body/reach.d.ts +65 -0
  22. package/dist/types/client/body/types.d.ts +39 -0
  23. package/dist/types/client/body/wield.d.ts +30 -0
  24. package/dist/types/client/body.d.ts +10 -207
  25. package/dist/types/client/cast-art.d.ts +2 -0
  26. package/dist/types/client/gait/constants.d.ts +34 -0
  27. package/dist/types/client/gait/create.d.ts +3 -0
  28. package/dist/types/client/gait/fists.d.ts +55 -0
  29. package/dist/types/client/gait/maths.d.ts +38 -0
  30. package/dist/types/client/gait/moves.d.ts +129 -0
  31. package/dist/types/client/gait/types.d.ts +59 -0
  32. package/dist/types/client/gait.d.ts +6 -146
  33. package/dist/types/client/gun/ammo.d.ts +21 -0
  34. package/dist/types/client/gun/display.d.ts +32 -0
  35. package/dist/types/client/gun/held.d.ts +75 -0
  36. package/dist/types/client/gun/kinds.d.ts +12 -0
  37. package/dist/types/client/gun/loft.d.ts +16 -0
  38. package/dist/types/client/gun/paint.d.ts +30 -0
  39. package/dist/types/client/gun/railgun.d.ts +34 -0
  40. package/dist/types/client/gun/reload.d.ts +112 -0
  41. package/dist/types/client/gun/rifle.d.ts +54 -0
  42. package/dist/types/client/gun/sidearm.d.ts +32 -0
  43. package/dist/types/client/gun.d.ts +10 -308
  44. package/dist/types/client/hulk/cabin.d.ts +36 -0
  45. package/dist/types/client/hulk/common.d.ts +55 -0
  46. package/dist/types/client/hulk/debris.d.ts +16 -0
  47. package/dist/types/client/hulk/hull.d.ts +81 -0
  48. package/dist/types/client/hulk/inside.d.ts +5 -0
  49. package/dist/types/client/hulk/parts.d.ts +16 -0
  50. package/dist/types/client/hulk/types.d.ts +7 -0
  51. package/dist/types/client/hulk/wings.d.ts +4 -0
  52. package/dist/types/client/hulk.d.ts +8 -18
  53. package/dist/types/client/hunter/animation.d.ts +113 -0
  54. package/dist/types/client/hunter/constants.d.ts +53 -0
  55. package/dist/types/client/hunter/disc.d.ts +33 -0
  56. package/dist/types/client/hunter/harpoon.d.ts +68 -0
  57. package/dist/types/client/hunter/marine.d.ts +14 -0
  58. package/dist/types/client/hunter/model.d.ts +4 -0
  59. package/dist/types/client/hunter/rest.d.ts +7 -0
  60. package/dist/types/client/hunter.d.ts +7 -164
  61. package/dist/types/client/render/camera.d.ts +58 -0
  62. package/dist/types/client/render/constants.d.ts +63 -0
  63. package/dist/types/client/render/scene.d.ts +58 -0
  64. package/dist/types/client/render/shader.d.ts +62 -0
  65. package/dist/types/client/render/shots.d.ts +61 -0
  66. package/dist/types/client/render/types.d.ts +74 -0
  67. package/dist/types/client/render.d.ts +9 -277
  68. package/dist/types/client/sfx/air.d.ts +46 -0
  69. package/dist/types/client/sfx/anthem.d.ts +27 -0
  70. package/dist/types/client/sfx/layers.d.ts +6 -0
  71. package/dist/types/client/sfx/music.d.ts +96 -0
  72. package/dist/types/client/sfx/render.d.ts +10 -0
  73. package/dist/types/client/sfx/sounds.d.ts +180 -0
  74. package/dist/types/client/sfx/synth.d.ts +24 -0
  75. package/dist/types/client/sfx/voices.d.ts +59 -0
  76. package/dist/types/client/sfx.d.ts +8 -325
  77. package/dist/types/client/skin/head.d.ts +120 -0
  78. package/dist/types/client/skin/lofts.d.ts +145 -0
  79. package/dist/types/client/skin/pose.d.ts +102 -0
  80. package/dist/types/client/skin/shape.d.ts +2 -0
  81. package/dist/types/client/skin.d.ts +4 -179
  82. package/dist/types/client/soldier/animate.d.ts +12 -0
  83. package/dist/types/client/soldier/carry.d.ts +28 -0
  84. package/dist/types/client/soldier/common.d.ts +8 -0
  85. package/dist/types/client/soldier/draw.d.ts +12 -0
  86. package/dist/types/client/soldier/grasp.d.ts +28 -0
  87. package/dist/types/client/soldier/hunter.d.ts +38 -0
  88. package/dist/types/client/soldier/runner.d.ts +58 -0
  89. package/dist/types/client/soldier/stance.d.ts +20 -0
  90. package/dist/types/client/soldier/types.d.ts +107 -0
  91. package/dist/types/client/soldier.d.ts +9 -236
  92. package/dist/types/client/xeno/back.d.ts +113 -0
  93. package/dist/types/client/xeno/body.d.ts +63 -0
  94. package/dist/types/client/xeno/common.d.ts +28 -0
  95. package/dist/types/client/xeno/head.d.ts +109 -0
  96. package/dist/types/client/xeno/limbs.d.ts +62 -0
  97. package/dist/types/client/xeno/mouth.d.ts +23 -0
  98. package/dist/types/client/xeno/parts.d.ts +40 -0
  99. package/dist/types/client/xeno/tail.d.ts +107 -0
  100. package/dist/types/client/xeno.d.ts +8 -246
  101. package/package.json +1 -1
  102. package/dist/landfall-CXJnap8w.js +0 -21
@@ -0,0 +1,38 @@
1
+ import type { PlayerState } from '../../shared/types';
2
+ import type { HunterPiece } from '../hunter';
3
+ import type { Vec3 } from '../mesh';
4
+ import type { Quat } from '../rig';
5
+ import type { Out } from '../verts';
6
+ export type HunterLod = 0 | 1;
7
+ export declare const hunterTrail: Vec3[];
8
+ /** The far level leaves out the dreadlocks and the visor grille. */
9
+ export declare const hunterPieces: (lod: HunterLod) => import("../hunter").HunterRig;
10
+ export declare const hunterKey: (lod: HunterLod, piece: HunterPiece) => string;
11
+ /**
12
+ * The shoulder cannon's hinge and turn on a Hunter whose chest is at `chest` turned by `q`: stowed
13
+ * (k 0) it lies back along the shoulder, CANNON_FOLD about the hinge from the chest's frame; out
14
+ * (k 1) it points along his look.
15
+ */
16
+ export declare const cannonOf: (chest: Vec3, q: Quat, p: Pick<PlayerState, "yaw" | "pitch">, k: number) => [Vec3, Quat];
17
+ /**
18
+ * The Hunter with all he finds on the racks carried and nothing in hand (`fists`: he has none, so
19
+ * no weapon is out): what his pictures on the menus show. In play his weapons are drawn on him
20
+ * only once he has found them.
21
+ */
22
+ export declare const HUNTER_GEAR: {
23
+ ammo: number;
24
+ mag: number;
25
+ rail: number;
26
+ cap: number;
27
+ rifle: number;
28
+ side: number;
29
+ fists: boolean;
30
+ };
31
+ /** The Hunter's joints this frame (hunterPose()), reused. */
32
+ export declare const hunterAt: Vec3[];
33
+ /** Build and index the Hunter models before they can be drawn during a match. */
34
+ export declare const warmHunter: () => void;
35
+ /** warmHunter() a level at a time, a step each (render.ts warmSteps()): some 150 ms each on an M2. */
36
+ export declare const hunterSteps: () => (() => void)[];
37
+ /** Places a part of the Hunter's complete rest-pose model at the player's feet and heading. */
38
+ export declare const placeHunterPart: (out: Out, vertices: number[], at: Vec3, q: Quat) => void;
@@ -0,0 +1,58 @@
1
+ import type { Choice, PlayerState, Rover } from '../../shared/types';
2
+ import type { World } from '../../shared/world';
3
+ import type { Floor, Seat } from '../gait';
4
+ import type { Vec3 } from '../mesh';
5
+ import type { Runner } from './types';
6
+ /** A man's haircuts (look.ts's HAIR_NAMES[0]): how long the hair stands off the scalp, the first one shaved. */
7
+ export declare const LENGTHS: number[];
8
+ /** Whether two looks draw the same runner. */
9
+ export declare const same: (a?: Choice, b?: Choice) => boolean;
10
+ /**
11
+ * The seat of a player who rides: the rover whose `driver` or `rider` he is. Nothing for one on
12
+ * foot, or whose rover is not among `rovers`.
13
+ */
14
+ export declare const seatOf: (p: PlayerState, rovers?: Rover[]) => Seat | undefined;
15
+ /** How far under a standing eye a seated one is: his gun is held out from there. */
16
+ export declare const SEATED = 0.62;
17
+ /** Seconds after a shot that the gun stays up. */
18
+ export declare const AIMING = 0.5;
19
+ /** Seconds a hit's wince lasts, and the grin of a capture or of a foe put down. */
20
+ export declare const HURT: number, GRIN: number;
21
+ /** Seconds the anger of a hit, a tackle or a punch lasts; it fades over the second half. */
22
+ export declare const MAD = 4;
23
+ /**
24
+ * A woman's traits on the face of her id: never the heavy brow ridge, the wide jaw or the long
25
+ * lower face of the draw, fuller lips, and the scalp's hair flat under her style (hair.ts).
26
+ */
27
+ export declare const femme: (w: Float32Array) => void;
28
+ /** A runner as first seen: in the pose its state asks for, no ease. */
29
+ /** `calm`: at ease, not in a fighter's guard (the menu's picture, the user 2026-11-12). */
30
+ export declare const createRunner: (p: PlayerState, seat?: Seat, build?: number, look?: Choice, calm?: boolean) => Runner;
31
+ /** The floor under a player standing at height `y`: the first top within a step above or below it. */
32
+ export declare const floorOf: (world: World, y: number) => Floor;
33
+ /**
34
+ * Moves each runner of `book` to its player in `others` after dt seconds: a new player gets a
35
+ * runner already in pose, one that left loses it. With a `world` the feet stand on the brushes
36
+ * under them. The `tracer` gets the sparks of a limb cut off.
37
+ */
38
+ /**
39
+ * The head turns to the runner one looks at (the user, 2026-11-12): the nearest within `far`
40
+ * metres and `cone` radians of his aim. It turns no further than `turn` (to a side, up or down)
41
+ * from where it points, the eyes going the rest of their travel; `rate` is how fast, per second.
42
+ * The one looked at is followed as he goes by (the user, 2026-11-14): kept, over a nearer one,
43
+ * until he is `hold` radians off the aim (the head's 80 degrees and the eyes' travel, REACH_X)
44
+ * or `keep` metres away.
45
+ */
46
+ export declare const WATCH: {
47
+ far: number;
48
+ keep: number;
49
+ cone: number;
50
+ hold: number;
51
+ turn: number[];
52
+ rate: number;
53
+ };
54
+ /** The runner `p` looks at among `crowd`, and where his head is: none when he looks at no one, or is down. `held` is the one he looked at last. */
55
+ export declare const watched: (p: PlayerState, crowd: PlayerState[], held?: number) => {
56
+ id: number;
57
+ at: Vec3;
58
+ } | undefined;
@@ -0,0 +1,20 @@
1
+ import type { Vec3 } from '../mesh';
2
+ import type { Quat } from '../rig';
3
+ import type { Runner } from './types';
4
+ export declare const stance: (r: Runner) => {
5
+ s: {
6
+ pos: Vec3[];
7
+ rot: Quat[];
8
+ };
9
+ sink: number;
10
+ yaw: number;
11
+ carry?: undefined;
12
+ } | {
13
+ s: {
14
+ pos: Vec3[];
15
+ rot: Quat[];
16
+ };
17
+ sink: number;
18
+ yaw: number;
19
+ carry: [Vec3, Vec3[]] | undefined;
20
+ };
@@ -0,0 +1,107 @@
1
+ import type { Choice, PlayerState } from '../../shared/types';
2
+ import type { Face } from '../expression';
3
+ import type { Prey } from '../feast';
4
+ import type { Fours } from '../fours';
5
+ import type { Gait, Seat } from '../gait';
6
+ import type { Piece } from '../limbs';
7
+ import type { Vec3 } from '../mesh';
8
+ import type { solve } from '../rig';
9
+ import type { Pose } from '../rig';
10
+ import type { Trail } from '../trail';
11
+ /** What a runner keeps between frames. */
12
+ export interface Runner {
13
+ /** The player as last seen. */
14
+ p: PlayerState;
15
+ gait: Gait;
16
+ /** The xenomorph's gait on all fours (fours.ts): none for the others. */
17
+ fours?: Fours;
18
+ /** Posed to threaten, the xenomorph of the menu's picture (menace()). */
19
+ menace?: boolean;
20
+ /** How much of a dash it is in, eased from 0 to 1: the length of the streaks. */
21
+ dash: number;
22
+ /** Seconds since its last shot, and how far its gun arm is raised to aim, eased from 0 to 1. */
23
+ since: number;
24
+ aim: number;
25
+ /** Where its last shot went, which its gun points at. */
26
+ focus: Vec3;
27
+ /** How far through its katana cut it is, -1 when it is not cutting, the light the blade leaves and the clock of its crackle. */
28
+ prog: number;
29
+ /** Seconds since his katana struck a ball back (DEFLECT, katana.ts), from below 0 when it is yet to be drawn. */
30
+ parry: number;
31
+ trail: Trail;
32
+ t: number;
33
+ /** How far the Hunter's shoulder cannon is folded out, 0 stowed to 1 along his look. */
34
+ cannon: number;
35
+ /** The limb a katana's cut took off, while he is down (see limbs.ts). */
36
+ cut?: Piece;
37
+ /** Seconds left of the grimace a hit puts on his face, and of the grin of a capture or of a foe put down. */
38
+ hurt: number;
39
+ grin: number;
40
+ /** Seconds left of his anger: a hit, a tackle or a punch from a foe. */
41
+ mad: number;
42
+ /** How far out the fist of a punch is, 0 to 1, eased, and its blow (BLOW). */
43
+ jab: number;
44
+ /** How closed his hands are, left then right, eased toward grasp(). */
45
+ curls: number[];
46
+ blow: number;
47
+ /** How far his head is still thrown back by a blow he took, 1 to 0. */
48
+ flinch: number;
49
+ /** His face (expression.ts), and the seconds it has yet to live through: soldier() moves it once drawn, where the head's turn is known. */
50
+ face: Face;
51
+ dt: number;
52
+ /** The seat he rides in, when he does and his rover is known. */
53
+ seat?: Seat;
54
+ /** The head of the runner he looks at (watched()), and how far his own is turned to it, eased: to his right and up, radians. */
55
+ watch?: Vec3;
56
+ /** The id of the runner he looks at, kept while he can be followed. */
57
+ watching?: number;
58
+ gaze?: number[];
59
+ /** The muzzle of the long gun in his hands as last drawn, from his feet: where its shots are seen to leave (combat.ts). */
60
+ tip?: Vec3;
61
+ /** The BUILD of the body (rig.ts, PlayerInfo.body): the man's when absent. */
62
+ build?: number;
63
+ /** The skin and haircut the player picked (PlayerInfo.tone and hair): his id's when absent. */
64
+ look?: Choice;
65
+ /**
66
+ * A xenomorph's glory kill (feast.ts): the id of the other one, how far the xenomorph is on its
67
+ * prey (mounted(), then down to 0 over FEAST.DROP once it has fed), and the other's feet.
68
+ */
69
+ mate?: number;
70
+ mount?: number;
71
+ /** The size of its prey's body to a man's (Kit size), for the xenomorph's holds on him. */
72
+ size?: number;
73
+ with?: Vec3;
74
+ /** The xenomorph's belly as last drawn, for its prey's hands; the seconds it eats on after the kill. */
75
+ bust?: Vec3;
76
+ feed?: number;
77
+ /** Where its prey's feet were as it last held him (FEAST.FEED); the seconds left of its head coming up after (FEAST.LOW). */
78
+ fedOn?: Vec3;
79
+ low?: number;
80
+ /** The share of a drop of blood owed to the next frame (FEAST.GORE, EXECUTE.BLEED), the same from its prey's thighs (FEAST.GRIP), and the drops so far. */
81
+ gore?: number;
82
+ grip?: number;
83
+ drops?: number;
84
+ /** Seconds left of the blood from the neck of one the katana's execution beheaded. */
85
+ bleed?: number;
86
+ /** The execution's victim: the swordsman's feet while he kneels; once beheaded, them and the seconds since. */
87
+ killer?: Vec3;
88
+ slain?: {
89
+ at: Vec3;
90
+ t: number;
91
+ pivot?: number;
92
+ };
93
+ /** The execution's victim's pose as he last knelt, or the xenomorph's prey's as it last held him: the dead body tips over from it. */
94
+ knelt?: Pose;
95
+ /**
96
+ * The fists' execution (feast.ts pummel()): its killer's ticks into the lock, smoothed between
97
+ * snapshots and running on past it after the kill, and his victim as last drawn; its victim's
98
+ * `fist`, set while he kneels to fists rather than a katana.
99
+ */
100
+ pum?: number;
101
+ prey?: Prey;
102
+ /** The katana's execution (feast.ts lunge()): its swordsman's ticks into the lock, smoothed as `pum`, running on past it for his recovery. */
103
+ exe?: number;
104
+ fist?: boolean;
105
+ /** The skeleton as last drawn: a limb cut off leaves from it (limbs.ts track()). */
106
+ s?: ReturnType<typeof solve>;
107
+ }
@@ -1,236 +1,9 @@
1
- import type { Choice, PlayerState, Rover } from '../shared/types';
2
- import type { World } from '../shared/world';
3
- import type { Gait, Seat } from './gait';
4
- import type { Fours } from './fours';
5
- import type { Pieces } from './store';
6
- import type { Tracer } from './beams';
7
- import type { Piece } from './limbs';
8
- import type { Vec3 } from './mesh';
9
- import { solve } from './rig';
10
- import type { Pose, Quat } from './rig';
11
- import type { Face } from './expression';
12
- import type { Prey } from './feast';
13
- import type { Trail } from './trail';
14
- import type { Out } from './verts';
15
- /** What a runner keeps between frames. */
16
- export interface Runner {
17
- /** The player as last seen. */
18
- p: PlayerState;
19
- gait: Gait;
20
- /** The xenomorph's gait on all fours (fours.ts): none for the others. */
21
- fours?: Fours;
22
- /** Posed to threaten, the xenomorph of the menu's picture (menace()). */
23
- menace?: boolean;
24
- /** How much of a dash it is in, eased from 0 to 1: the length of the streaks. */
25
- dash: number;
26
- /** Seconds since its last shot, and how far its gun arm is raised to aim, eased from 0 to 1. */
27
- since: number;
28
- aim: number;
29
- /** Where its last shot went, which its gun points at. */
30
- focus: Vec3;
31
- /** How far through its katana cut it is, -1 when it is not cutting, the light the blade leaves and the clock of its crackle. */
32
- prog: number;
33
- /** Seconds since his katana struck a ball back (DEFLECT, katana.ts), from below 0 when it is yet to be drawn. */
34
- parry: number;
35
- trail: Trail;
36
- t: number;
37
- /** How far the Hunter's shoulder cannon is folded out, 0 stowed to 1 along his look. */
38
- cannon: number;
39
- /** The limb a katana's cut took off, while he is down (see limbs.ts). */
40
- cut?: Piece;
41
- /** Seconds left of the grimace a hit puts on his face, and of the grin of a capture or of a foe put down. */
42
- hurt: number;
43
- grin: number;
44
- /** Seconds left of his anger: a hit, a tackle or a punch from a foe. */
45
- mad: number;
46
- /** How far out the fist of a punch is, 0 to 1, eased, and its blow (BLOW). */
47
- jab: number;
48
- /** How closed his hands are, left then right, eased toward grasp(). */
49
- curls: number[];
50
- blow: number;
51
- /** How far his head is still thrown back by a blow he took, 1 to 0. */
52
- flinch: number;
53
- /** His face (expression.ts), and the seconds it has yet to live through: soldier() moves it once drawn, where the head's turn is known. */
54
- face: Face;
55
- dt: number;
56
- /** The seat he rides in, when he does and his rover is known. */
57
- seat?: Seat;
58
- /** The head of the runner he looks at (watched()), and how far his own is turned to it, eased: to his right and up, radians. */
59
- watch?: Vec3;
60
- /** The id of the runner he looks at, kept while he can be followed. */
61
- watching?: number;
62
- gaze?: number[];
63
- /** The muzzle of the long gun in his hands as last drawn, from his feet: where its shots are seen to leave (combat.ts). */
64
- tip?: Vec3;
65
- /** The BUILD of the body (rig.ts, PlayerInfo.body): the man's when absent. */
66
- build?: number;
67
- /** The skin and haircut the player picked (PlayerInfo.tone and hair): his id's when absent. */
68
- look?: Choice;
69
- /**
70
- * A xenomorph's glory kill (feast.ts): the id of the other one, how far the xenomorph is on its
71
- * prey (mounted(), then down to 0 over FEAST.DROP once it has fed), and the other's feet.
72
- */
73
- mate?: number;
74
- mount?: number;
75
- /** The size of its prey's body to a man's (Kit size), for the xenomorph's holds on him. */
76
- size?: number;
77
- with?: Vec3;
78
- /** The xenomorph's belly as last drawn, for its prey's hands; the seconds it eats on after the kill. */
79
- bust?: Vec3;
80
- feed?: number;
81
- /** Where its prey's feet were as it last held him (FEAST.FEED); the seconds left of its head coming up after (FEAST.LOW). */
82
- fedOn?: Vec3;
83
- low?: number;
84
- /** The share of a drop of blood owed to the next frame (FEAST.GORE, EXECUTE.BLEED), the same from its prey's thighs (FEAST.GRIP), and the drops so far. */
85
- gore?: number;
86
- grip?: number;
87
- drops?: number;
88
- /** Seconds left of the blood from the neck of one the katana's execution beheaded. */
89
- bleed?: number;
90
- /** The execution's victim: the swordsman's feet while he kneels; once beheaded, them and the seconds since. */
91
- killer?: Vec3;
92
- slain?: {
93
- at: Vec3;
94
- t: number;
95
- pivot?: number;
96
- };
97
- /** The execution's victim's pose as he last knelt, or the xenomorph's prey's as it last held him: the dead body tips over from it. */
98
- knelt?: Pose;
99
- /**
100
- * The fists' execution (feast.ts pummel()): its killer's ticks into the lock, smoothed between
101
- * snapshots and running on past it after the kill, and his victim as last drawn; its victim's
102
- * `fist`, set while he kneels to fists rather than a katana.
103
- */
104
- pum?: number;
105
- prey?: Prey;
106
- /** The katana's execution (feast.ts lunge()): its swordsman's ticks into the lock, smoothed as `pum`, running on past it for his recovery. */
107
- exe?: number;
108
- fist?: boolean;
109
- /** The skeleton as last drawn: a limb cut off leaves from it (limbs.ts track()). */
110
- s?: ReturnType<typeof solve>;
111
- }
112
- /** A man's haircuts (look.ts's HAIR_NAMES[0]): how long the hair stands off the scalp, the first one shaved. */
113
- export declare const LENGTHS: number[];
114
- /**
115
- * The seat of a player who rides: the rover whose `driver` or `rider` he is. Nothing for one on
116
- * foot, or whose rover is not among `rovers`.
117
- */
118
- export declare const seatOf: (p: PlayerState, rovers?: Rover[]) => Seat | undefined;
119
- /** Seconds a hit's wince lasts, and the grin of a capture or of a foe put down. */
120
- export declare const HURT: number, GRIN: number;
121
- /** Seconds the anger of a hit, a tackle or a punch lasts; it fades over the second half. */
122
- export declare const MAD = 4;
123
- /**
124
- * A woman's traits on the face of her id: never the heavy brow ridge, the wide jaw or the long
125
- * lower face of the draw, fuller lips, and the scalp's hair flat under her style (hair.ts).
126
- */
127
- export declare const femme: (w: Float32Array) => void;
128
- /** A runner as first seen: in the pose its state asks for, no ease. */
129
- /** `calm`: at ease, not in a fighter's guard (the menu's picture, the user 2026-11-12). */
130
- export declare const createRunner: (p: PlayerState, seat?: Seat, build?: number, look?: Choice, calm?: boolean) => Runner;
131
- /**
132
- * Moves each runner of `book` to its player in `others` after dt seconds: a new player gets a
133
- * runner already in pose, one that left loses it. With a `world` the feet stand on the brushes
134
- * under them. The `tracer` gets the sparks of a limb cut off.
135
- */
136
- /**
137
- * The head turns to the runner one looks at (the user, 2026-11-12): the nearest within `far`
138
- * metres and `cone` radians of his aim. It turns no further than `turn` (to a side, up or down)
139
- * from where it points, the eyes going the rest of their travel; `rate` is how fast, per second.
140
- * The one looked at is followed as he goes by (the user, 2026-11-14): kept, over a nearer one,
141
- * until he is `hold` radians off the aim (the head's 80 degrees and the eyes' travel, REACH_X)
142
- * or `keep` metres away.
143
- */
144
- export declare const WATCH: {
145
- far: number;
146
- keep: number;
147
- cone: number;
148
- hold: number;
149
- turn: number[];
150
- rate: number;
151
- };
152
- /** The runner `p` looks at among `crowd`, and where his head is: none when he looks at no one, or is down. `held` is the one he looked at last. */
153
- export declare const watched: (p: PlayerState, crowd: PlayerState[], held?: number) => {
154
- id: number;
155
- at: Vec3;
156
- } | undefined;
157
- export declare const animate: (book: Map<number, Runner>, others: PlayerState[], dt: number, world?: World, tracer?: Pick<Tracer, "shock" | "spit"> & Partial<Pick<Tracer, "gore">>, rovers?: Rover[], builds?: ReadonlyMap<number, number>, looks?: ReadonlyMap<number, Choice>) => void;
158
- /**
159
- * A long gun's butt plate in the hollow of the right shoulder: from the shoulder joint, in the
160
- * chest's frame (to its right, up, back). The gun goes from there along the look, so it is
161
- * shouldered whatever the pitch (the user, 2026-11-10: it hung across the belly).
162
- */
163
- export declare const POCKET: Vec3;
164
- /** How far a runner has his long gun down to the low ready, 0 to 1: in a sprint, when he is not firing. */
165
- export declare const lowered: (r: Runner) => number;
166
- /**
167
- * The pose with the katana in both hands: in the guard, or in a cut, which is the first person's cut
168
- * seen from the runner's eye (the share `e` of it, so that it is drawn from the guard and back to
169
- * it), and the trunk twisting, bending and leaning through it (trunk()).
170
- */
171
- export declare const brandish: (from: Pose, p: PlayerState, prog: number, ph: number, t?: number, parry?: number, oneHand?: boolean) => Pose;
172
- /**
173
- * How closed the hands of `p` are, left then right (hand() in body.ts: 0 flat, 0.9 round a grip, 1
174
- * a fist), as the own body closes its own: round what they hold and on the wheel, fists with
175
- * nothing in them (the guard), a loose fist on a run, tighter at a sprint, open in the air, flat
176
- * on a ledge, a wall or the floor, limp lying down.
177
- */
178
- export declare const grasp: (p: PlayerState, seat?: Seat, hunter?: boolean) => number[];
179
- /** Seconds a runner the rail gun's bolt put down takes to come apart. */
180
- export declare const FRY = 0.9;
181
- /** How far a runner has come apart, 0 (whole, or not fried) to 1 (gone). */
182
- export declare const fried: (p: PlayerState) => number;
183
- /**
184
- * The triangles of `out` from `from` coming apart `k` of the way (0 to 1): they glow violet white
185
- * at once, each drifts up and out on its own, and goes when `k` passes its own share, so the body
186
- * thins to nothing.
187
- */
188
- export declare const dissolve: (out: Out, from: number, k: number) => void;
189
- export declare const stance: (r: Runner) => {
190
- s: {
191
- pos: Vec3[];
192
- rot: Quat[];
193
- };
194
- sink: number;
195
- yaw: number;
196
- carry?: undefined;
197
- } | {
198
- s: {
199
- pos: Vec3[];
200
- rot: Quat[];
201
- };
202
- sink: number;
203
- yaw: number;
204
- carry: [Vec3, Vec3[]] | undefined;
205
- };
206
- /**
207
- * The shoulder cannon's hinge and turn on a Hunter whose chest is at `chest` turned by `q`: stowed
208
- * (k 0) it lies back along the shoulder, CANNON_FOLD about the hinge from the chest's frame; out
209
- * (k 1) it points along his look.
210
- */
211
- export declare const cannonOf: (chest: Vec3, q: Quat, p: Pick<PlayerState, "yaw" | "pitch">, k: number) => [Vec3, Quat];
212
- /**
213
- * The Hunter with all he finds on the racks carried and nothing in hand (`fists`: he has none, so
214
- * no weapon is out): what his pictures on the menus show. In play his weapons are drawn on him
215
- * only once he has found them.
216
- */
217
- export declare const HUNTER_GEAR: {
218
- ammo: number;
219
- mag: number;
220
- rail: number;
221
- cap: number;
222
- rifle: number;
223
- side: number;
224
- fists: boolean;
225
- };
226
- /** Build and index the Hunter models before they can be drawn during a match. */
227
- export declare const warmHunter: () => void;
228
- /** warmHunter() a level at a time, a step each (render.ts warmSteps()): some 150 ms each on an M2. */
229
- export declare const hunterSteps: () => (() => void)[];
230
- /** Draws the runner and gives back its solved skeleton, or nothing once a bolt has burnt it away. */
231
- export declare const soldier: (out: Out, r: Runner, color: number[], lod?: number, helmets?: boolean, armored?: boolean,
232
- /** The frame's pieces of the store: the rigid ones go there (store.ts), but on one coming apart. */
233
- list?: Pieces) => {
234
- pos: Vec3[];
235
- rot: Quat[];
236
- } | undefined;
1
+ export * from './soldier/common';
2
+ export * from './soldier/types';
3
+ export * from './soldier/runner';
4
+ export * from './soldier/animate';
5
+ export * from './soldier/carry';
6
+ export * from './soldier/grasp';
7
+ export * from './soldier/stance';
8
+ export * from './soldier/hunter';
9
+ export * from './soldier/draw';
@@ -0,0 +1,113 @@
1
+ import type { Spot } from '../helmet';
2
+ import type { Vec3 } from '../mesh';
3
+ import type { Bone, Solved } from './common';
4
+ import type { Lash } from './tail';
5
+ /** The joints the back's points hang on, from the base of the skull to the coccyx (bonesOf()). */
6
+ export declare const BACK: (0 | 1 | 2 | 4 | 3)[];
7
+ /**
8
+ * Its spine's points in the world, from the solved skeleton `s` (the user, 2026-11-15: vertebrae
9
+ * linked to one another, from the tail up the back to the head): the back's seven (BACK), from the
10
+ * base of the skull down to the coccyx low over the rear, then the tail's twelve. The tail bends
11
+ * from down and back up to its tip, hooked at the end, sways with the clock `t` (none with `sway`
12
+ * 0) and more with the speed `run` (0 to 1), and takes the pose `lash` (Lash): the arch, the turn
13
+ * most of all toward the tip, the lean toward the tip so it curls back in as it comes down.
14
+ * `fours` (0 to 1) is how far the body is on all fours, its pelvis level: the tail trails behind,
15
+ * as much as it keeps its hook (a strike lifts it out of that).
16
+ */
17
+ export declare const bonesOf: (s: Solved, t: number, run: number, lash?: Lash, sway?: number, fours?: number) => Bone[];
18
+ /** A smooth curve through bones (smooth()), from its `skip`th point, and its length up to each. */
19
+ export interface Curve {
20
+ dense: Bone[];
21
+ len: number[];
22
+ total: number;
23
+ }
24
+ export declare const curveOf: (bones: Bone[], skip?: number) => Curve;
25
+ /** The curve `c` `l` metres along it, its way there, and where that is between its points (2.5: halfway from the third to the fourth). */
26
+ export declare const along: ({ dense, len }: Curve, l: number) => [Bone, Vec3, number];
27
+ /**
28
+ * Vertebrae down the whole column, far and nearer, and the rings of one (the user, 2026-11-17: a
29
+ * spine, an alien's): a spool, a rim at each end and a waist between, pinched to a disc at its joints.
30
+ */
31
+ export declare const VERTEBRAE: number[];
32
+ export declare const BEAD: number[][];
33
+ /**
34
+ * The blade out of the top of each vertebra (the user's picture, 2026-11-17: a comb of thin curved
35
+ * blades down the column): metres high at the skull, at the coccyx and at its highest on the tail,
36
+ * how far along the tail that is and where the blades stop before the stinger; its lean toward the
37
+ * tail's tip at its root and how much more at its point, radians; half its chord as a share of a
38
+ * vertebra's length, half its thickness as a share of the column's radius; rings by level of detail.
39
+ */
40
+ export declare const FIN: {
41
+ skull: number;
42
+ coccyx: number;
43
+ high: number;
44
+ at: number;
45
+ end: number;
46
+ lean: number;
47
+ bend: number;
48
+ chord: number;
49
+ thick: number;
50
+ steps: number[];
51
+ };
52
+ /** A blade's height `u` of the way down the tail: up from the coccyx's, then down to a nub. */
53
+ export declare const finH: (u: number) => number;
54
+ /** The rings of the last blade fin() made, four spots each (a place then a normal), then its point. */
55
+ export declare const FINS: Float64Array<ArrayBuffer>[];
56
+ /**
57
+ * A blade into FINS, `steps` rings and a point: from `base` out along `up`, `h` high, leaning toward
58
+ * `tan` and bending further that way up to its point; flat, its faces to the unit `x` and -x, its
59
+ * edges sharp, `chord` and `thick` its half chord and half thickness at the root.
60
+ */
61
+ export declare const fin: (base: Vec3, up: Vec3, tan: Vec3, x: Vec3, h: number, chord: number, thick: number, steps: number, lean?: number) => void;
62
+ /**
63
+ * Geometry baked into the beast's skin (shape() in skin.ts), posed with it by flesh() at no cost a
64
+ * frame: places and normals at rest, six numbers a vertex, its two joints and its weight on the
65
+ * second, three vertex indices a triangle and the palette region of each corner.
66
+ */
67
+ export interface Baked {
68
+ v: number[];
69
+ j: number[];
70
+ w: number[];
71
+ t: number[];
72
+ c: number[];
73
+ }
74
+ /** Rows of spots, each on two joints, sewn into triangles as sheet() sews them. */
75
+ export declare class Bake implements Baked {
76
+ v: number[];
77
+ j: number[];
78
+ w: number[];
79
+ t: number[];
80
+ c: number[];
81
+ /** The spots of a row, hanging on joints `a` and `b`, `u` of the way to `b`: their indices. */
82
+ row(spots: Spot[], a: number, b: number, u: number): number[];
83
+ /** A triangle as face() makes it: none of no area, wound as its first corner's normal faces. */
84
+ tri(p: number, q: number, r: number, region: number): void;
85
+ sheet(rows: number[][], region: number): void;
86
+ }
87
+ /** 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. */
88
+ export interface Back {
89
+ baked: Baked;
90
+ n: number;
91
+ /** The last ring's middle in the pelvis' frame, its way, its radius. */
92
+ c: Vec3;
93
+ tan: Vec3;
94
+ r: number;
95
+ }
96
+ export declare const backs: Back[];
97
+ /** The pipes' colour: a very dark grey, lighter than the chitin. */
98
+ export declare const PIPE: number[];
99
+ /**
100
+ * The back's half of its spine, sunk in the skin, and the pipes up its neck, baked into the skin of
101
+ * `lod` (shape() in skin.ts): they only follow the joints, so the shader poses them with the rest
102
+ * of it. The vertebrae lie at rest as column() spaced them; each point hangs on the joints of the
103
+ * two bones it lies between, the last ring on the pelvis alone, where tail() takes the column on.
104
+ */
105
+ export declare const backOf: (lod: number) => Back;
106
+ export declare const bake: (lod: number) => Back;
107
+ /**
108
+ * Thin pipes up its neck (the user, 2026-11-15: following the neck, in curves, many): six each side,
109
+ * from the top of the chest round the neck's sides into the underside of the skull, each through
110
+ * points carried by the chest, the neck and the head, so it bends with them, on a smooth curve
111
+ * that snakes round the neck. Baked at rest from `s` (backOf()), in the palette's `region`.
112
+ */
113
+ export declare const pipes: (out: Bake, s: Solved, lod: number, region: number) => void;
@@ -0,0 +1,63 @@
1
+ import type { Vec3 } from '../mesh';
2
+ import type { Quat } from '../rig';
3
+ import type { Out } from '../verts';
4
+ /** Bone: its claws and teeth, nothing else. */
5
+ export declare const BONE: number[];
6
+ /** Its claws, hands and feet (the user, 2026-11-17: less white): a dull horn, darker than bone. */
7
+ export declare const CLAW: number[];
8
+ /** Its tendons and ribs: the chitin, a little lighter. */
9
+ export declare const SINEW: number[];
10
+ /**
11
+ * A tube through `pts` in the frame (at, q) of a joint, `radii` thick at them, closed at both ends,
12
+ * its rings steadied by the joint's `axis` (x), which must never lie along it: a ring whose way is
13
+ * the axis collapses flat, and a tube along it pinched there. An end thicker than a hair is a dome
14
+ * (`round`): a flat cap read as a cut-off pipe.
15
+ */
16
+ export declare const strand: (out: Out, at: Vec3, q: Quat, pts: Vec3[], radii: number[], n: number, col: number[], layer?: number, round?: boolean,
17
+ /** What steadies its rings: one axis, or one a point (the surface's normal under it). */
18
+ axis?: Vec3 | Vec3[]) => void;
19
+ /**
20
+ * Its rib cage on the chest joint, standing out of a starved trunk in a lighter chitin: five pairs of ribs from the
21
+ * spine round to the breastbone, each sloping down toward the front, the lower ones shorter, and
22
+ * the keel of the breastbone down the middle. Each row: the height at the spine, the half width and
23
+ * the half depth of the arch (a hair outside the skin's).
24
+ */
25
+ /**
26
+ * A striated tube (TUBE) along `pts` (in the frame of `at` and `q`), `radii` thick: strand()'s,
27
+ * each vertex's red how far along it lies, metres, for the shader's grooves.
28
+ */
29
+ export declare const tubed: (out: Out, at: Vec3, q: Quat, pts: Vec3[], radii: number[], n: number, axis?: Vec3 | Vec3[],
30
+ /** How bright the shader paints it: its green, 1 its usual grey. */
31
+ shade?: number) => void;
32
+ /** The thigh's length, hip to knee, and a point on its skin (a hair off it): `t` of the way down, `a` round from the front toward the outside, `off` proud of it. */
33
+ export declare const THIGH = 0.44;
34
+ export declare const onThigh: (s: number, t: number, a: number, off: number) => Vec3;
35
+ /**
36
+ * The windows in a thigh (the user's picture, 2026-11-17): [round the thigh from its front, radians,
37
+ * outward; from and to, as shares of its length; the ribbed tube's radius]. One, on the outside of
38
+ * its front (the user, 2026-11-17: only the one on the side).
39
+ */
40
+ export declare const WINDOWS: number[][];
41
+ /**
42
+ * Windows in a limb (WINDOWS' rows), on its joint: in each a ribbed tube (tubed()) sunk in the limb,
43
+ * swelling to its middle, framed by two bony cords that part round it and meet at its ends. `at(t,
44
+ * a, off)` is a point of the limb's skin, `girth` its radius, for the cords' angle off the tube.
45
+ */
46
+ export declare const windows: (out: Out, at: Vec3, q: Quat, lod: number, rows: number[][], skin: (t: number, a: number, off: number) => Vec3, girth: number,
47
+ /** The tube's shade (tubed()) and the cords' colour. */
48
+ shade?: number, cord?: number[]) => void;
49
+ /** The legs' and hips' details, discreet (the user, 2026-11-17: darker): their tubes' shade and their cords' colour, hardly over the chitin's. */
50
+ export declare const DIM = 0.45;
51
+ export declare const CORD: number[];
52
+ /**
53
+ * A thigh's open flesh, on the thigh joint of side `s` (-1 left): its window (WINDOWS).
54
+ */
55
+ export declare const thigh: (out: Out, at: Vec3, q: Quat, lod: number, s: number) => void;
56
+ /**
57
+ * Its hips, on the pelvis joint (the user's picture, 2026-11-17): each side a ribbed tube down the
58
+ * groin from the hip bone to the crotch, the two a V, a cord along it, and a ribbed tube round the
59
+ * hip's socket from the front over the side to the back. High on the pelvis (the user, 2026-11-17),
60
+ * clear of the thighs as they swing.
61
+ */
62
+ export declare const hips: (out: Out, at: Vec3, q: Quat, lod: number) => void;
63
+ export declare const ribs: (out: Out, at: Vec3, q: Quat, lod: number, low?: boolean) => void;