@korial29/tiny-fps 1.7.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 (108) hide show
  1. package/dist/assets/{room-RIvmKR68.js → room-DNdwMAUE.js} +31 -15
  2. package/dist/cast-art-DbwsToaQ.js +1 -0
  3. package/dist/index.js +7 -7
  4. package/dist/landfall-CSZGx2iA.js +21 -0
  5. package/dist/local.js +1 -1
  6. package/dist/paint-DipbUTzI.js +4 -0
  7. package/dist/room.js +1 -1
  8. package/dist/server.js +1 -1
  9. package/dist/types/client/armor/clip.d.ts +22 -0
  10. package/dist/types/client/armor/cooking.d.ts +14 -0
  11. package/dist/types/client/armor/details.d.ts +65 -0
  12. package/dist/types/client/armor/fit.d.ts +8 -0
  13. package/dist/types/client/armor/regions.d.ts +304 -0
  14. package/dist/types/client/armor/scratches.d.ts +4 -0
  15. package/dist/types/client/armor/shell.d.ts +46 -0
  16. package/dist/types/client/armor/types.d.ts +37 -0
  17. package/dist/types/client/armor/wear.d.ts +22 -0
  18. package/dist/types/client/armor.d.ts +9 -393
  19. package/dist/types/client/body/constants.d.ts +35 -0
  20. package/dist/types/client/body/create.d.ts +3 -0
  21. package/dist/types/client/body/fingers.d.ts +112 -0
  22. package/dist/types/client/body/glove.d.ts +27 -0
  23. package/dist/types/client/body/hands.d.ts +28 -0
  24. package/dist/types/client/body/hunter.d.ts +26 -0
  25. package/dist/types/client/body/motion.d.ts +42 -0
  26. package/dist/types/client/body/reach.d.ts +65 -0
  27. package/dist/types/client/body/types.d.ts +39 -0
  28. package/dist/types/client/body/wield.d.ts +30 -0
  29. package/dist/types/client/body.d.ts +10 -207
  30. package/dist/types/client/cast-art.d.ts +2 -0
  31. package/dist/types/client/gait/constants.d.ts +34 -0
  32. package/dist/types/client/gait/create.d.ts +3 -0
  33. package/dist/types/client/gait/fists.d.ts +55 -0
  34. package/dist/types/client/gait/maths.d.ts +38 -0
  35. package/dist/types/client/gait/moves.d.ts +129 -0
  36. package/dist/types/client/gait/types.d.ts +59 -0
  37. package/dist/types/client/gait.d.ts +6 -146
  38. package/dist/types/client/gun/ammo.d.ts +21 -0
  39. package/dist/types/client/gun/display.d.ts +32 -0
  40. package/dist/types/client/gun/held.d.ts +75 -0
  41. package/dist/types/client/gun/kinds.d.ts +12 -0
  42. package/dist/types/client/gun/loft.d.ts +16 -0
  43. package/dist/types/client/gun/paint.d.ts +30 -0
  44. package/dist/types/client/gun/railgun.d.ts +34 -0
  45. package/dist/types/client/gun/reload.d.ts +112 -0
  46. package/dist/types/client/gun/rifle.d.ts +54 -0
  47. package/dist/types/client/gun/sidearm.d.ts +32 -0
  48. package/dist/types/client/gun.d.ts +10 -308
  49. package/dist/types/client/hulk/cabin.d.ts +36 -0
  50. package/dist/types/client/hulk/common.d.ts +55 -0
  51. package/dist/types/client/hulk/debris.d.ts +16 -0
  52. package/dist/types/client/hulk/hull.d.ts +81 -0
  53. package/dist/types/client/hulk/inside.d.ts +5 -0
  54. package/dist/types/client/hulk/parts.d.ts +16 -0
  55. package/dist/types/client/hulk/types.d.ts +7 -0
  56. package/dist/types/client/hulk/wings.d.ts +4 -0
  57. package/dist/types/client/hulk.d.ts +8 -18
  58. package/dist/types/client/hunter/animation.d.ts +113 -0
  59. package/dist/types/client/hunter/constants.d.ts +53 -0
  60. package/dist/types/client/hunter/disc.d.ts +33 -0
  61. package/dist/types/client/hunter/harpoon.d.ts +68 -0
  62. package/dist/types/client/hunter/marine.d.ts +14 -0
  63. package/dist/types/client/hunter/model.d.ts +4 -0
  64. package/dist/types/client/hunter/rest.d.ts +7 -0
  65. package/dist/types/client/hunter.d.ts +7 -164
  66. package/dist/types/client/render/camera.d.ts +58 -0
  67. package/dist/types/client/render/constants.d.ts +63 -0
  68. package/dist/types/client/render/scene.d.ts +58 -0
  69. package/dist/types/client/render/shader.d.ts +62 -0
  70. package/dist/types/client/render/shots.d.ts +61 -0
  71. package/dist/types/client/render/types.d.ts +74 -0
  72. package/dist/types/client/render.d.ts +9 -277
  73. package/dist/types/client/sfx/air.d.ts +46 -0
  74. package/dist/types/client/sfx/anthem.d.ts +27 -0
  75. package/dist/types/client/sfx/layers.d.ts +6 -0
  76. package/dist/types/client/sfx/music.d.ts +96 -0
  77. package/dist/types/client/sfx/render.d.ts +10 -0
  78. package/dist/types/client/sfx/sounds.d.ts +180 -0
  79. package/dist/types/client/sfx/synth.d.ts +24 -0
  80. package/dist/types/client/sfx/voices.d.ts +59 -0
  81. package/dist/types/client/sfx.d.ts +8 -325
  82. package/dist/types/client/skin/head.d.ts +120 -0
  83. package/dist/types/client/skin/lofts.d.ts +145 -0
  84. package/dist/types/client/skin/pose.d.ts +102 -0
  85. package/dist/types/client/skin/shape.d.ts +2 -0
  86. package/dist/types/client/skin.d.ts +4 -179
  87. package/dist/types/client/soldier/animate.d.ts +12 -0
  88. package/dist/types/client/soldier/carry.d.ts +28 -0
  89. package/dist/types/client/soldier/common.d.ts +8 -0
  90. package/dist/types/client/soldier/draw.d.ts +12 -0
  91. package/dist/types/client/soldier/grasp.d.ts +28 -0
  92. package/dist/types/client/soldier/hunter.d.ts +38 -0
  93. package/dist/types/client/soldier/runner.d.ts +58 -0
  94. package/dist/types/client/soldier/stance.d.ts +20 -0
  95. package/dist/types/client/soldier/types.d.ts +107 -0
  96. package/dist/types/client/soldier.d.ts +9 -236
  97. package/dist/types/client/xeno/back.d.ts +113 -0
  98. package/dist/types/client/xeno/body.d.ts +63 -0
  99. package/dist/types/client/xeno/common.d.ts +28 -0
  100. package/dist/types/client/xeno/head.d.ts +109 -0
  101. package/dist/types/client/xeno/limbs.d.ts +62 -0
  102. package/dist/types/client/xeno/mouth.d.ts +23 -0
  103. package/dist/types/client/xeno/parts.d.ts +40 -0
  104. package/dist/types/client/xeno/tail.d.ts +107 -0
  105. package/dist/types/client/xeno.d.ts +8 -246
  106. package/package.json +1 -1
  107. package/dist/landfall-n5tpoRmi.js +0 -21
  108. package/dist/paint-BBkY8KO0.js +0 -4
@@ -0,0 +1,129 @@
1
+ import type { Quat } from '../rig';
2
+ import type { Seat } from './types';
3
+ /**
4
+ * The gaits, as numbers at three speeds: a walk at 1.4 m/s, a run at 5 and a sprint at 9, linear
5
+ * between, held beyond. Angles in radians, lengths in metres. Real running: cadence and stride
6
+ * both grow with speed, the foot lands nearer the body and leaves higher, the knees bend deeper in
7
+ * stance and swing, the elbows fold to a right angle and beyond.
8
+ */
9
+ export declare const SPEEDS: number[];
10
+ export declare const GAITS: {
11
+ /** Stride frequency, cycles per second (two steps). */
12
+ f: number[];
13
+ /** Stance travel: how far the body goes while one foot is down. It sets the contact time. */
14
+ s: number[];
15
+ /** The part of it that the foot lands ahead of the hip. */
16
+ k: number[];
17
+ /** Foot sideways from the midline. */
18
+ lat: number[];
19
+ /** Swing foot clearance: the ankle's peak above its resting height. */
20
+ lift: number[];
21
+ /** Leg shortening (a fraction of the leg) at touchdown, and the extra loading at mid-stance. */
22
+ d0: number[];
23
+ d1: number[];
24
+ /** Ankle at touchdown (toes up positive) and at toe-off. */
25
+ td: number[];
26
+ to: number[];
27
+ /** Pelvis turn, obliquity (the swing side drops), mean tilt and the twice-a-stride tilt. */
28
+ pr: number[];
29
+ po: number[];
30
+ pt: number[];
31
+ pa: number[];
32
+ /** Shoulder line turn against the pelvis. */
33
+ cc: number[];
34
+ /** Arm swing, mean shoulder flexion, mean and swing of the elbow, arm abduction. */
35
+ aa: number[];
36
+ am: number[];
37
+ em: number[];
38
+ ea: number[];
39
+ ab: number[];
40
+ /** Hips sway toward the stance foot, and the flight bump of the pelvis. */
41
+ sw: number[];
42
+ hop: number[];
43
+ };
44
+ export type Key = keyof typeof GAITS;
45
+ /** The moves other than the stride, in layering order: a later one covers an earlier one. */
46
+ export declare const MOVE: {
47
+ readonly AIR: 0;
48
+ readonly RISE: 1;
49
+ readonly DASH: 2;
50
+ readonly WALL_L: 3;
51
+ readonly WALL_R: 4;
52
+ readonly HANG: 5;
53
+ readonly CLIMB: 6;
54
+ readonly SLIDE: 7;
55
+ readonly STUN: 8;
56
+ readonly TUCK: 9;
57
+ /** Out of health: the knees give and the body topples (see `lie` in build). */
58
+ readonly DOWN: 10;
59
+ /** Seated in a rover: the rough of it, the hands and the feet are placed in `reach`. */
60
+ readonly RIDE: 11;
61
+ /** The xenomorph on a wall (MODE.CLING): facing it, the hands and the feet on it (`reach`). */
62
+ readonly CLING: 12;
63
+ /** Swimming (MODE.SWIM): prone on the water, a breaststroke (see STROKE). */
64
+ readonly SWIM: 13;
65
+ };
66
+ /**
67
+ * A seated body, from the seat point (the player's position, the feet of shared/rover.ts' seat())
68
+ * in the rover's frame: the pelvis above it and behind it (on a cushion whose top is 0.13 m up,
69
+ * before a back 0.3 m behind that leans away), the trunk's lean back, the ankles ahead and above,
70
+ * half the feet's spread, and the toes' pitch up against the footwell's slope.
71
+ */
72
+ export declare const SIT: {
73
+ up: number;
74
+ back: number;
75
+ lean: number;
76
+ ahead: number;
77
+ ankle: number;
78
+ wide: number;
79
+ toes: number;
80
+ /** The driver sits up to the yoke: his pelvis this far ahead of a rider's, his trunk this far forward of it. */
81
+ reach: number;
82
+ hunch: number;
83
+ };
84
+ /**
85
+ * A move's pose, in radians (metres for the offsets): drop of the pelvis, lean forward, lean to the
86
+ * left, hip and knee flexion of the left then the right leg, shoulder and elbow flexion of the left
87
+ * then the right arm, both arms out sideways, then the pelvis forward and to the right. Hands and
88
+ * feet that touch the world are placed over it (see `reach`). A stumble poses the arms only: the
89
+ * trunk and the legs follow the knock.
90
+ */
91
+ export declare const MOVES: number[][];
92
+ /**
93
+ * The breaststroke, a row of MOVES (the prone body: SWIM_PITCH, the pelvis tipped forward, so a
94
+ * shoulder at 3 points the arm ahead and a hip at 0 trails the leg behind) at each of six evenly
95
+ * spaced keys of the cycle: the arms reaching ahead, the pull (swept out and back, elbows bent), the
96
+ * legs drawn up with the hands joined under the chin, the kick with the arms shooting ahead and
97
+ * straight into the next pull. The cycle is a closed Catmull-Rom curve through them, so no joint
98
+ * ever stops at a key, and the arms hold no glide.
99
+ */
100
+ /** How far the pelvis tips forward for a body lying prone on the water (radians). */
101
+ export declare const SWIM_PITCH = 1.3;
102
+ /** Strokes per second at a speed (m/s): never still, a treading water's slow one up to one every 1.2 s. */
103
+ export declare const strokeRate: (v: number) => number;
104
+ /** How much of the full stroke a speed gets (the rest is treading water): all of it from 2/3 of the top speed. */
105
+ export declare const strokeShare: (v: number) => number;
106
+ /**
107
+ * Fills `row` with the swimmer's pose at phase `u` (0 to 1): the stroke, `m` of the way from a
108
+ * treading water (arms sculling in turn, the legs fluttering, the body bobbing) to it.
109
+ */
110
+ export declare const stroke: (row: number[], u: number, m: number) => number[];
111
+ /** What a move poses: the pelvis, the spine, the arms and the legs, and nothing of the head. */
112
+ export declare const FK: (0 | 1 | 2 | 6 | 16 | 7 | 10 | 11 | 20 | 14 | 18 | 15 | 13 | 19 | 17)[];
113
+ export declare const fk: (c: number[]) => Quat[];
114
+ export declare const IDENT: Quat;
115
+ /**
116
+ * The falls of one put down shot or struck (FALL, less one), keys of the seconds since he went
117
+ * down: the pelvis's tip (forward or back) and roll to the side, its height over the floor and how
118
+ * far it has gone along the throw (metres), the bend of the hips and the knees, the arms' lift
119
+ * forward and out, the elbows' bend, the spine's slump. Shot: thrown off his feet along the hit,
120
+ * flat on his back or his face, the arms flung out; struck: down on his knees, a sway, then over
121
+ * on his side, curled.
122
+ */
123
+ export declare const FALLS: number[][][];
124
+ /** The farthest a shot throws a body, metres: no further than the floor goes on at his height. */
125
+ export declare const THROW = 1.6;
126
+ /** The keys K at the time t, eased from one to the next. */
127
+ export declare const keyed: (K: number[][], t: number) => number[];
128
+ /** The rover's lean in the frame of its yaw, `k` of the way: the nose up by its pitch, the right side down by its roll (basis() in mesh.ts). */
129
+ export declare const tipped: (s: Seat, k: number) => Quat;
@@ -0,0 +1,59 @@
1
+ import type { PlayerState } from '../../shared/types';
2
+ import type { Plant } from '../prints';
3
+ import type { Pose } from '../rig';
4
+ /** The height of the ground at (x, z), for feet that stand on stairs and slopes. */
5
+ export type Floor = (x: number, z: number) => number;
6
+ /** The seat of a player in a rover (MODE.RIDE): the rover's attitude and its front wheels' angle, and the seat, 0 the driver's, 1 the rider's. */
7
+ export interface Seat {
8
+ yaw: number;
9
+ pitch: number;
10
+ roll: number;
11
+ steer: number;
12
+ s: number;
13
+ }
14
+ export interface Gait {
15
+ /**
16
+ * Moves to the state `p` after dt seconds. Without `floor` the feet stand on y = p.y. `seat` is
17
+ * where a player who rides sits: without it he sits level, a rider, facing his look.
18
+ */
19
+ update(p: PlayerState, dt: number, floor?: Floor, seat?: Seat): void;
20
+ /** The pose now: one object, rewritten by each call. */
21
+ pose(): Pose;
22
+ /** Stride phase, in cycles: the left foot lands at 0 and the right one at a half. */
23
+ readonly phase: number;
24
+ /** Footsteps so far: a foot set down, or along a wall each half of the stride. */
25
+ readonly steps: number;
26
+ /** The last foot set down flat (not along a wall): one object, rewritten at each footfall. */
27
+ readonly plant: Plant;
28
+ }
29
+ export interface Foot {
30
+ /** The ankle now. */
31
+ x: number;
32
+ y: number;
33
+ z: number;
34
+ /** Planted: where the flat foot stands, and the ground height there. */
35
+ px: number;
36
+ pz: number;
37
+ gy: number;
38
+ /** Swing: where the ankle left, the stride phase it left at, and the ground height it lands on. */
39
+ lx: number;
40
+ ly: number;
41
+ lz: number;
42
+ dl: number;
43
+ tg: number;
44
+ /** Stride phase last frame, how far along the stance (0 to 1), and the weight it has on the pelvis. */
45
+ u: number;
46
+ x0: number;
47
+ w: number;
48
+ /** Pitch of the foot, toes up positive, and how much of the toes' bend against it holds. */
49
+ th: number;
50
+ tw: number;
51
+ /** The way the foot points: kept while it stands, turned in the swing from `la`, the way it left. */
52
+ fy: number;
53
+ la: number;
54
+ /** The pitch it left with. */
55
+ lt: number;
56
+ /** How far along a step taken standing is, 0 to 1, on its own clock; -1 in a stride. */
57
+ k: number;
58
+ on: boolean;
59
+ }
@@ -1,146 +1,6 @@
1
- import type { PlayerState } from '../shared/types';
2
- import type { Vec3 } from './mesh';
3
- import type { Plant } from './prints';
4
- import type { Pose, Quat } from './rig';
5
- /** The height of the ground at (x, z), for feet that stand on stairs and slopes. */
6
- export type Floor = (x: number, z: number) => number;
7
- /** The seat of a player in a rover (MODE.RIDE): the rover's attitude and its front wheels' angle, and the seat, 0 the driver's, 1 the rider's. */
8
- export interface Seat {
9
- yaw: number;
10
- pitch: number;
11
- roll: number;
12
- steer: number;
13
- s: number;
14
- }
15
- export interface Gait {
16
- /**
17
- * Moves to the state `p` after dt seconds. Without `floor` the feet stand on y = p.y. `seat` is
18
- * where a player who rides sits: without it he sits level, a rider, facing his look.
19
- */
20
- update(p: PlayerState, dt: number, floor?: Floor, seat?: Seat): void;
21
- /** The pose now: one object, rewritten by each call. */
22
- pose(): Pose;
23
- /** Stride phase, in cycles: the left foot lands at 0 and the right one at a half. */
24
- readonly phase: number;
25
- /** Footsteps so far: a foot set down, or along a wall each half of the stride. */
26
- readonly steps: number;
27
- /** The last foot set down flat (not along a wall): one object, rewritten at each footfall. */
28
- readonly plant: Plant;
29
- }
30
- /** The rotation whose x axis is `x` and whose y axis points up the bone, opposite to `d`. */
31
- export declare const frame: (x: Vec3, d: Vec3) => Quat;
32
- /** The moves other than the stride, in layering order: a later one covers an earlier one. */
33
- export declare const MOVE: {
34
- readonly AIR: 0;
35
- readonly RISE: 1;
36
- readonly DASH: 2;
37
- readonly WALL_L: 3;
38
- readonly WALL_R: 4;
39
- readonly HANG: 5;
40
- readonly CLIMB: 6;
41
- readonly SLIDE: 7;
42
- readonly STUN: 8;
43
- readonly TUCK: 9;
44
- /** Out of health: the knees give and the body topples (see `lie` in build). */
45
- readonly DOWN: 10;
46
- /** Seated in a rover: the rough of it, the hands and the feet are placed in `reach`. */
47
- readonly RIDE: 11;
48
- /** The xenomorph on a wall (MODE.CLING): facing it, the hands and the feet on it (`reach`). */
49
- readonly CLING: 12;
50
- /** Swimming (MODE.SWIM): prone on the water, a breaststroke (see STROKE). */
51
- readonly SWIM: 13;
52
- };
53
- /**
54
- * A seated body, from the seat point (the player's position, the feet of shared/rover.ts' seat())
55
- * in the rover's frame: the pelvis above it and behind it (on a cushion whose top is 0.13 m up,
56
- * before a back 0.3 m behind that leans away), the trunk's lean back, the ankles ahead and above,
57
- * half the feet's spread, and the toes' pitch up against the footwell's slope.
58
- */
59
- export declare const SIT: {
60
- up: number;
61
- back: number;
62
- lean: number;
63
- ahead: number;
64
- ankle: number;
65
- wide: number;
66
- toes: number;
67
- /** The driver sits up to the yoke: his pelvis this far ahead of a rider's, his trunk this far forward of it. */
68
- reach: number;
69
- hunch: number;
70
- };
71
- /**
72
- * A move's pose, in radians (metres for the offsets): drop of the pelvis, lean forward, lean to the
73
- * left, hip and knee flexion of the left then the right leg, shoulder and elbow flexion of the left
74
- * then the right arm, both arms out sideways, then the pelvis forward and to the right. Hands and
75
- * feet that touch the world are placed over it (see `reach`). A stumble poses the arms only: the
76
- * trunk and the legs follow the knock.
77
- */
78
- export declare const MOVES: number[][];
79
- /** Strokes per second at a speed (m/s): never still, a treading water's slow one up to one every 1.2 s. */
80
- export declare const strokeRate: (v: number) => number;
81
- /** How much of the full stroke a speed gets (the rest is treading water): all of it from 2/3 of the top speed. */
82
- export declare const strokeShare: (v: number) => number;
83
- /**
84
- * The falls of one put down shot or struck (FALL, less one), keys of the seconds since he went
85
- * down: the pelvis's tip (forward or back) and roll to the side, its height over the floor and how
86
- * far it has gone along the throw (metres), the bend of the hips and the knees, the arms' lift
87
- * forward and out, the elbows' bend, the spine's slump. Shot: thrown off his feet along the hit,
88
- * flat on his back or his face, the arms flung out; struck: down on his knees, a sway, then over
89
- * on his side, curled.
90
- */
91
- export declare const FALLS: number[][][];
92
- /**
93
- * An arm's pose, the upper arm then the forearm, as the gait builds them: `s` 1 the right, -1 the
94
- * left; the upper arm's lift forward, out to the side and turn inward, and the elbow's bend.
95
- */
96
- export declare const armOf: (s: number, [lift, out, inward, bend]: number[]) => [Quat, Quat];
97
- /**
98
- * A punch from the guard (the user, 2026-11-11), a karate reverse punch: the rear hand (the left)
99
- * driven straight out at the chest's height, the lead one drawn back to the hip, the chest turned
100
- * behind the blow (radians, the left shoulder forward).
101
- */
102
- export declare const JAB: {
103
- out: number[];
104
- back: number[];
105
- twist: number;
106
- };
107
- /**
108
- * The other blows (BLOW, the user 2026-11-13), as JAB's arms: the HOOK's left arm swung round at
109
- * the shoulder's height, the elbow bent square and out, the chest turned behind it; the LUNGE's right
110
- * arm driven straight out, further than a jab, the chest turned the other way.
111
- */
112
- export declare const HOOK: {
113
- out: number[];
114
- twist: number;
115
- };
116
- export declare const LUNGE: {
117
- out: number[];
118
- twist: number;
119
- };
120
- /** Any strike of the xenomorph's tail, as a blow: none of BLOW's, told apart for its arm and its sound. */
121
- export declare const TAIL_BLOW = 6;
122
- /** The striking arm of each blow (BLOW): -1 the left, 1 the right; the xenomorph's claws, and its tail (TAIL_BLOW), which takes no arm (0). */
123
- export declare const SIDE: number[];
124
- /** Whether the player has no weapon at all: FIRE punches. */
125
- export declare const bare: (p: PlayerState) => boolean;
126
- /**
127
- * The blow (BLOW) of a bare-handed swing. The xenomorph's (`xeno`) cut reads TAILS: its claws, else
128
- * its tail's TAIL_BLOW.
129
- */
130
- export declare const blowOf: (p: Pick<PlayerState, "cut">, xeno?: boolean) => number;
131
- /** The numbers of the swing a bare-handed player is in: the blow's, or the xenomorph's (TAILS, a heavy one's own). */
132
- export declare const blowing: (p: Pick<PlayerState, "cut" | "heavy">, xeno?: boolean) => {
133
- ticks: number;
134
- strike: number;
135
- reach: number;
136
- arc: number;
137
- hp: number;
138
- hold: number;
139
- };
140
- /**
141
- * How far out the fist of a punch is, 0 to 1, by the swing of a player with no weapon at all: out
142
- * at the strike of its blow, back by the swing's end. None for the xenomorph's tail.
143
- */
144
- export declare const thrown: (p: PlayerState, xeno?: boolean) => number;
145
- /** `bow` is the guard's lean forward: none for the eye's own body, whose arms hold to the view and which stands in no sword guard. */
146
- export declare const createGait: (bow?: number, kind?: number) => Gait;
1
+ export * from './gait/types';
2
+ export * from './gait/maths';
3
+ export * from './gait/constants';
4
+ export * from './gait/moves';
5
+ export * from './gait/fists';
6
+ export * from './gait/create';
@@ -0,0 +1,21 @@
1
+ /** The rifle's power cell, built once: a box of olive metal along its own forward from its foot, a red band near the foot. */
2
+ export declare const cell: (lod: number) => number[];
3
+ /**
4
+ * The mouth of the gun's battery seat, in the battery's frame: a dark disc a little wider than it,
5
+ * laid on the slanted shell where the battery goes in, 2 mm out of it. The shell's distance from
6
+ * the battery's foot, in 0.1 mm, round two rings (measured on gun(1)).
7
+ */
8
+ export declare const WELL_HOLE: number[];
9
+ /**
10
+ * The gun's battery (the user, 2026-11-08), built once: a gunmetal cell in the grip, along its own
11
+ * forward from its foot, which stands out under the lower shell with a band of glow round it.
12
+ */
13
+ export declare const battery: (lod: number) => number[];
14
+ export declare const cells: number[][];
15
+ /**
16
+ * The rail gun's cell (the user, 2026-11-08: its batteries in view), built once for each of 9 steps
17
+ * of `level` (0 to 1): a threaded copper base (it screws into the socket on the gun), a column of
18
+ * violet lightning as high as the level in a dark glass tube, in a cage of three steel posts, and a
19
+ * cap with its terminal, standing along its own forward from its base.
20
+ */
21
+ export declare const capsule: (lod: number, level?: number) => number[];
@@ -0,0 +1,32 @@
1
+ import type { Vec3 } from '../mesh';
2
+ import type { Out } from '../verts';
3
+ /**
4
+ * Printed circuit tracks round the digits, inside the frame (the user, 2026-11-09): the right
5
+ * half's, mirrored to the left, each a run of [across, up from the middle] points ending in a pad.
6
+ */
7
+ export declare const TRACKS: number[][][];
8
+ /**
9
+ * The shots in the battery as two glowing seven-segment digits on a dark screen set in the back of
10
+ * a small block on top of the body, in model space: cyan, red at 4 or fewer, thick segments that bloom only a
11
+ * little, the screen framed in a line of their colour. The block is part of the readout, so only a gun that shows the ammo carries it. 99 at most.
12
+ * While the gun charges, a gauge of CHARGE_MAX cells under the digits lights `level` of them, the
13
+ * strength the shot would have; all orange at the full charge. Not `shown`: the block and the dark
14
+ * screen only, the gun still booting.
15
+ */
16
+ export declare const readout: (ammo: number, level?: number, shown?: boolean, glyphs?: boolean) => number[];
17
+ /**
18
+ * The rail gun's counter, a small LCD out of the left of its receiver turned to the player, in model space
19
+ * (the user, 2026-11-08: like the screen on the back of a digital camera), in a dark case: neon like
20
+ * the others' (the user, 2026-11-08), two glowing violet digits on a dark screen framed in a line of
21
+ * their colour, red at 5 or less. It counts as the HUD does (charge()): a full capsule is 33.
22
+ */
23
+ export declare const lcd: (ammo: number) => number[];
24
+ /**
25
+ * The laser rifle's counter (`n` rounds in its cell), in model space: a trapezoid screen, narrow at
26
+ * the top, set in the sloped back of the housing and turned to the eye, ringed in a line of the
27
+ * digits' colour (cyan, red at 7 or fewer), with the two digits once `shown`; under them, when
28
+ * `nades` is given, NADE_MAX orange pips for the launcher's grenades, dim for the spent ones (the
29
+ * user, 2026-11-10). All glow but the dark screen.
30
+ */
31
+ export declare const scope: (n: number, shown?: boolean, nades?: number) => number[];
32
+ export declare const smoke: (out: Out, at: Vec3, [r, u, f]: Vec3[], k: number, t: number) => void;
@@ -0,0 +1,75 @@
1
+ import type { PlayerState } from '../../shared/types';
2
+ import type { World } from '../../shared/world';
3
+ import type { Vec3 } from '../mesh';
4
+ import type { Quat } from '../rig';
5
+ import type { Out } from '../verts';
6
+ import type { Pieces } from '../store';
7
+ /**
8
+ * How a gun is drawn beyond its place: its glow from 0 (off) to 1, the swap under way (0 to 1, -1
9
+ * none), whether its battery or capsule holds any, how far the gun's counter has faded in (0 dark,
10
+ * 1 lit) and whether the rifle's digits show; for the rail gun the level of its three cells (the
11
+ * one in use, then the two in reserve), its heat (0 to 1) and whether it overheated.
12
+ */
13
+ export interface Lit {
14
+ /** The frame's pieces of the store: the gun's body, lit, goes there (store.ts). */
15
+ list?: Pieces;
16
+ /** The gun in the Hunter's bronze (hunterGun()): his pistol. */
17
+ skin?: boolean;
18
+ light?: number;
19
+ swap?: number;
20
+ empty?: boolean;
21
+ screen?: number;
22
+ digits?: boolean;
23
+ cells?: number[];
24
+ heat?: number;
25
+ hot?: boolean;
26
+ /** The laser rifle's grenades left, shown under its rounds; none shown when absent. */
27
+ nades?: number;
28
+ /** How far the thumb has its button in, 0 to 1. */
29
+ press?: number;
30
+ /** How far the rail gun's capsule is turned on (radians, tune()). */
31
+ tune?: number;
32
+ /**
33
+ * The player whose gun it is, the floor under him and his speed: the spent battery, cell or
34
+ * capsule is thrown out to fall there as the swap passes RELEASE (drops.ts).
35
+ */
36
+ id?: number;
37
+ floor?: number;
38
+ vel?: Vec3;
39
+ /** Where the hand holds the new battery or cell while it brings it from the pouch (its foot and axes, as loadFrame()). */
40
+ carry?: [Vec3, Vec3[]];
41
+ }
42
+ /** The levels of the rail gun's three cells for `p` (0 to 1): the capsule in use, then what it carries beside, a capsule's worth to each. */
43
+ export declare const cellsOf: (p: Pick<PlayerState, "rail" | "cap">) => number[];
44
+ /**
45
+ * Appends the gun (the rail gun or the laser rifle by `kind`, the rail gun's spark at the time `t`) held in the hand at `pos`
46
+ * with the world rotation `q`, `k` times its size about the grip, with the ammo on its back when
47
+ * given, and the charge gauge at `level`; its battery (capsule) where the swap has it, its glow and
48
+ * its counter dimmed with `light`, and the spark only when it is all on.
49
+ */
50
+ export declare const held: (out: Out, pos: Vec3, q: Quat, lod: number, k?: number, ammo?: number, level?: number, kind?: boolean | number, t?: number, { light, swap, empty, screen, digits, cells, heat, hot, press, tune, nades, id, floor, vel, carry, list, skin, }?: Lit) => void;
51
+ /** The muzzle of a gun (the rail gun's or the rifle's by `kind`) whose grip is at `at` and whose axes are [right, up, forward]. */
52
+ export declare const tip: (at: Vec3, [, u, f]: Vec3[], kind?: boolean | number) => Vec3;
53
+ /**
54
+ * The axes [right, up, forward] of a gun held with its grip at `at` so that its long axis, from the
55
+ * back of the body to the emitter, points at `to`: the beam leaves the emitter along it. `side` is
56
+ * where the right axis points, `up` where up is. The emitter is off the grip, so the axes are found
57
+ * in three rounds.
58
+ */
59
+ export declare const pointed: (at: Vec3, to: Vec3, side: Vec3, up: Vec3, sag?: number) => Vec3[];
60
+ /** The middle of the butt plate of the rail gun and of the laser rifle, in model space: what the shoulder takes. */
61
+ export declare const BUTTS: Vec3[];
62
+ /**
63
+ * A long gun (`kind` 2 the rail gun, 3 the rifle) shouldered: its grip and its axes [right, up,
64
+ * forward] when its butt plate is at `butt` and its barrel points at `to`. The rail gun's barrel
65
+ * lies on the gun's long axis, the rifle's is level in its model.
66
+ */
67
+ export declare const shouldered: (butt: Vec3, to: Vec3, side: Vec3, up: Vec3, kind: number) => [Vec3, Vec3[]];
68
+ /** Where a runner's shots end: the first wall along its look from the eye, or the range. */
69
+ export declare const focus: (p: PlayerState, world: World) => [Vec3, boolean];
70
+ /**
71
+ * Where a runner holds the gun when it fires at `to`: the grip, a little right of and below the eye,
72
+ * and the gun's axes. The rail gun, in both hands like a rifle, is nearer the chest, so that the
73
+ * left hand reaches its front grip.
74
+ */
75
+ export declare const aimed: (p: PlayerState, to: Vec3) => [Vec3, Vec3[]];
@@ -0,0 +1,12 @@
1
+ import type { PlayerState } from '../../shared/types';
2
+ /** The Hunter's pistol: its own model (pistol.ts), on the gun's marks. */
3
+ export declare const hunterGun: (lod: number) => number[];
4
+ /** The weapon a gun model is, from a player or a flag: 0 the gun, 2 the rail gun (or true), 3 the laser rifle. */
5
+ export declare const kindOf: (p: Pick<PlayerState, "railed" | "rifled"> | boolean | number) => number;
6
+ export declare const LONG_TILT: number[];
7
+ export declare const LONG_HOLD: number[];
8
+ export declare const LONG_CURL = 0.72;
9
+ /** The hold of a weapon of `kind` (kindOf()) in the hand that has its grip. */
10
+ export declare const holdOf: (kind?: boolean | number) => number[];
11
+ /** The grip's tilt in the hand for a weapon of `kind` (kindOf()): the pistol's, or a long gun's. */
12
+ export declare const tiltOf: (kind?: boolean | number) => number[];
@@ -0,0 +1,16 @@
1
+ import type { Vec3 } from '../mesh';
2
+ import type { Out } from '../verts';
3
+ /** A ring of a loft: how far ahead, how high, half width, half height, and the offset to the side. */
4
+ export type Station = [f: number, y: number, a: number, b: number, x?: number];
5
+ /** The colour of a vertex from its place and normal: [r, g, layer, b]. */
6
+ export type Paint = (p: Vec3, n: Vec3) => number[];
7
+ export declare const sgn: (v: number) => number;
8
+ export declare const mix: (a: number[], b: number[], t: number) => number[];
9
+ export declare const clamp: (v: number) => number;
10
+ /**
11
+ * Appends the tube through `st`: a ring is `n` sides of a superellipse across the spine's side
12
+ * view, a station with no width a point. Triangles with smooth normals, each vertex painted.
13
+ */
14
+ /** Vertex `k` of the `n` of station `i`'s ring in tube(). */
15
+ export declare const ring: (st: Station[], i: number, k: number, n: number) => Vec3;
16
+ export declare const tube: (out: Out, st: Station[], n: number, paint: Paint) => void;
@@ -0,0 +1,30 @@
1
+ import type { Paint } from './loft';
2
+ /** Cyan that blooms: unlit (layer -2) and brighter than 1. */
3
+ export declare const GLOW: number[];
4
+ /**
5
+ * Violet metal that is lit by its normal: light where it faces up, dark where it faces down, and
6
+ * shifting toward blue along the way to the muzzle, as an iridescent finish does. Returns [r, g, layer, b].
7
+ */
8
+ export declare const metal: (dark?: number) => Paint;
9
+ export declare const DARK: number[];
10
+ export declare const glow: Paint;
11
+ /** The violet white of a Tesla arc, which blooms. */
12
+ export declare const ARC: number[];
13
+ export declare const arcing: Paint;
14
+ export declare const dim: Paint;
15
+ /** The capsule's core of lightning: violet, less than a spark. */
16
+ export declare const core: Paint;
17
+ /** Paint lit by its normal, from `lo` facing down to `hi` facing up. */
18
+ export declare const shade: (lo: number[], hi: number[]) => Paint;
19
+ /** Polished grey metal, for the rifle's housing. */
20
+ export declare const chrome: Paint;
21
+ /** Dark gunmetal, and the copper of the coils. */
22
+ export declare const steel: Paint;
23
+ export declare const copper: Paint;
24
+ /** The rail gun's olive drab receiver, its wooden stock, its red cables and its ceramic insulators. */
25
+ export declare const drab: Paint;
26
+ export declare const wood: Paint;
27
+ export declare const cable: Paint;
28
+ export declare const CERAMIC: number[][];
29
+ /** The glowing orange red of a hot insulator. */
30
+ export declare const EMBER: number[];
@@ -0,0 +1,34 @@
1
+ import type { Vec3 } from '../mesh';
2
+ import type { Station } from './loft';
3
+ /** The rail gun's muzzle, between its electrodes' tips: on the gun's long axis (REAR to MUZZLE), 36 cm further out. */
4
+ export declare const RAIL_MUZZLE: Vec3;
5
+ /** The electrodes' tips stand this far above and below the muzzle. */
6
+ export declare const SPREAD = 0.05;
7
+ /** The middle of the rail gun's front grip, under the barrel, where the left hand holds it. */
8
+ export declare const FOREGRIP: Vec3;
9
+ /** The height of the long axis at `f` ahead of the grip, in the side view. */
10
+ export declare const axisY: (f: number) => number;
11
+ /** A station on the long axis, `up` above it. */
12
+ export declare const on: (f: number, up: number, a: number, b?: number, x?: number) => Station;
13
+ export declare const railed: number[][];
14
+ /**
15
+ * The rail gun at a level of detail (0 far, 1 near), built once like gun(), after a Tesla gun held
16
+ * in both hands: a stock to the shoulder, a gunmetal receiver over the same grip, a front grip under
17
+ * a barrel in three copper coils, and two electrodes forking out of its end, up and down, each
18
+ * tipped with a glowing ball. arc() is the spark between them.
19
+ */
20
+ export declare const railgun: (lod: number) => number[];
21
+ /**
22
+ * The feet of the rail gun's three cells (the user, 2026-11-08): the one in use standing on the
23
+ * receiver's top, the capsule a swap replaces, and two smaller ones lying along its flanks low,
24
+ * between the hands and under the counter, pointing forward. Each forward, up and across, how far it leans back and aside
25
+ * (radians), and its size.
26
+ */
27
+ export declare const SLOTS: number[][];
28
+ export declare const posts: number[][];
29
+ /**
30
+ * The rail gun's two ceramic insulators standing on its barrel, stacks of four ribbed discs, built
31
+ * once for each of 5 steps of `heat` (0 to 1): from grey green to orange as the gun heats, glowing
32
+ * in its last quarter.
33
+ */
34
+ export declare const insulators: (lod: number, heat?: number) => number[];