@korial29/tiny-fps 0.150.0 → 0.151.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.
- package/dist/index.js +19 -19
- package/dist/types/client/armor.d.ts +82 -14
- package/dist/types/client/body.d.ts +13 -2
- package/package.json +1 -1
|
@@ -12,7 +12,7 @@ interface Region {
|
|
|
12
12
|
y: [number, number];
|
|
13
13
|
a: [number, number];
|
|
14
14
|
/** How much further out the plate swells at the rest point (x, y): the chest plate's pecs. */
|
|
15
|
-
swell?: (x: number, y: number) => number;
|
|
15
|
+
swell?: (x: number, y: number, z: number) => number;
|
|
16
16
|
/** Where its angles are measured from, degrees (0 the front): 180 for a plate on the back. */
|
|
17
17
|
face?: number;
|
|
18
18
|
/** Its bottom and top at each angle (degrees from the front, + outward) or rest point, when not level: a leg's opening. */
|
|
@@ -24,6 +24,8 @@ interface Region {
|
|
|
24
24
|
man?: boolean;
|
|
25
25
|
/** A round plate: its outline an ellipse in (angle, height), [half the angle, middle height, half height]. */
|
|
26
26
|
round?: [number, number, number];
|
|
27
|
+
/** Cast: the forearm's straight plate rather than the skin's shape (casting()). */
|
|
28
|
+
cast?: boolean;
|
|
27
29
|
/** Moulded: a smooth shell round the trunk rather than the skin's facets (moulding()). */
|
|
28
30
|
mould?: boolean;
|
|
29
31
|
/** The ninja's own armour (the user, 2026-11-13), worn by him alone; he wears no other plate. */
|
|
@@ -58,6 +60,7 @@ export declare const bust: (x: number, y: number) => number;
|
|
|
58
60
|
* cut low in the crook of the elbow, at `y`, and rises by `rise` round to the elbow's point behind,
|
|
59
61
|
* between the angles `a` round the arm; it flares by `flare` toward the elbow; and a flat ridge
|
|
60
62
|
* `ridge` high runs down its outer side, from `x` out from the body's middle, fading to the wrist.
|
|
63
|
+
* It stands `off` the arm, half a chest plate's thickness (the user, 2026-11-14: thinner).
|
|
61
64
|
*/
|
|
62
65
|
export declare const CUFF: {
|
|
63
66
|
wrist: number;
|
|
@@ -67,10 +70,31 @@ export declare const CUFF: {
|
|
|
67
70
|
flare: number;
|
|
68
71
|
ridge: number;
|
|
69
72
|
x: number;
|
|
73
|
+
off: number;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* The forearm's plate cast straight (the user, 2026-11-14: rectilinear, aggressive, not in rolls
|
|
77
|
+
* over the muscles, still flared): its section a rounded square (`n`, a superellipse) round the
|
|
78
|
+
* arm's line at `cx`, its half sizes across (`x`) and front to back (`z`) in straight lines between
|
|
79
|
+
* the heights `y`: a steep taper from the wrist, then an angular break and the long run to the elbow
|
|
80
|
+
* (the user, 2026-11-14: thin, an angular slope toward the hands, aggressive, down to the end of the
|
|
81
|
+
* wrist, kept thin by its shape: a bevel pressed onto the skin lay on the arm in a tongue), at least
|
|
82
|
+
* `floor` off the skin; then the flare and the ridge. Its end is cut to a point over the back of the
|
|
83
|
+
* hand, an arrow (the user liked it: more), `cut` higher on the inside of the arm, in straight lines.
|
|
84
|
+
*/
|
|
85
|
+
export declare const CAST: {
|
|
86
|
+
cx: number;
|
|
87
|
+
y: number[];
|
|
88
|
+
x: number[];
|
|
89
|
+
z: number[];
|
|
90
|
+
floor: number;
|
|
91
|
+
n: number;
|
|
92
|
+
cut: number;
|
|
70
93
|
};
|
|
71
94
|
/**
|
|
72
|
-
* The biceps' plate (the user, 2026-11-13: worked too, and thinner): the
|
|
73
|
-
* middles, how far they slant (`cut`), and how far it stands off the arm, not
|
|
95
|
+
* The biceps' plate (the user, 2026-11-13: worked too, and thinner; 2026-11-14: thinner again): the
|
|
96
|
+
* heights of its edges' middles, how far they slant (`cut`), and how far it stands off the arm, not
|
|
97
|
+
* OFF.
|
|
74
98
|
*/
|
|
75
99
|
export declare const BICEPS: {
|
|
76
100
|
y: number[];
|
|
@@ -80,28 +104,46 @@ export declare const BICEPS: {
|
|
|
80
104
|
/**
|
|
81
105
|
* The briefs (the user, 2026-11-10: round the hips under the belt, the leg's opening rising from the
|
|
82
106
|
* crotch to the hip and lower behind, never between the thighs; 2026-11-12: thinner on the sides,
|
|
83
|
-
* and no glitches
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
* did not agree, and left gaps, overlaps and
|
|
87
|
-
*
|
|
107
|
+
* and no glitches; 2026-11-14: their sides up higher toward the hips, then a little less). One opening line for all
|
|
108
|
+
* their pieces, the band on the trunk and the piece on each thigh, by the angle of the rest point
|
|
109
|
+
* round the trunk (0 the front, 180 the back, either side): the pieces met at the border of the
|
|
110
|
+
* trunk's skin and the legs' (0.93 m) on two lines that did not agree, and left gaps, overlaps and
|
|
111
|
+
* slivers there. Their top is at `top` before and behind and climbs to `hip` over the hip between
|
|
112
|
+
* the angles `rise`; the opening, lowest at the crotch, before and behind, rises between the angles
|
|
113
|
+
* `at` to a strap `strap` high under that top.
|
|
88
114
|
*/
|
|
89
115
|
export declare const BRIEFS: {
|
|
90
116
|
front: number;
|
|
91
117
|
back: number;
|
|
92
|
-
|
|
118
|
+
top: number;
|
|
119
|
+
hip: number;
|
|
120
|
+
strap: number;
|
|
93
121
|
at: number[];
|
|
122
|
+
rise: number[];
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* The seat (the user, 2026-11-14: one piece, rounded, no breach in the middle, then one block): behind,
|
|
126
|
+
* the opening rises over the cleft in a small round arch to `top`, `r` either side of the middle,
|
|
127
|
+
* where the legs' insides rose in a V and parted the seat in two points.
|
|
128
|
+
*/
|
|
129
|
+
export declare const SEAT: {
|
|
130
|
+
top: number;
|
|
131
|
+
r: number;
|
|
132
|
+
fill: number;
|
|
133
|
+
w: number;
|
|
134
|
+
y: number[];
|
|
94
135
|
};
|
|
95
136
|
/**
|
|
96
137
|
* The thigh plates' top (the user, 2026-11-13, on a picture of a trooper's hips: a slant from the
|
|
97
138
|
* hip down to the inside of the thigh, a crescent of dark ribbed suit between it and the briefs):
|
|
98
139
|
* a line of its own by the angle round the trunk, on the thighs and up the hips' sides alike, so one
|
|
99
140
|
* line across the border too. Lowest at the inside of the thigh, `front` and `back`, under the
|
|
100
|
-
* crotch;
|
|
141
|
+
* crotch; `hip` at the hip, where the briefs' strap climbs on over it; between the angles `at`.
|
|
101
142
|
*/
|
|
102
143
|
export declare const THIGH: {
|
|
103
144
|
front: number;
|
|
104
145
|
back: number;
|
|
146
|
+
hip: number;
|
|
105
147
|
at: number[];
|
|
106
148
|
};
|
|
107
149
|
/**
|
|
@@ -133,12 +175,20 @@ export declare const ARMPIT: {
|
|
|
133
175
|
y: number;
|
|
134
176
|
low: number;
|
|
135
177
|
};
|
|
178
|
+
/** The marine's shoulder blade plates: ovals `at` degrees either side of the spine, `a` degrees and `h` metres half wide and high, their middle at `y`. */
|
|
179
|
+
export declare const BLADE: {
|
|
180
|
+
at: number;
|
|
181
|
+
a: number;
|
|
182
|
+
y: number;
|
|
183
|
+
h: number;
|
|
184
|
+
};
|
|
136
185
|
/** The gap the user asked between the chest plate and the belly's plate. */
|
|
137
186
|
export declare const GAP = 0.02;
|
|
138
187
|
/**
|
|
139
|
-
* The belly's plate (the user, 2026-11-13: worked, rounder
|
|
140
|
-
*
|
|
141
|
-
* how
|
|
188
|
+
* The belly's plate (the user, 2026-11-13: worked, rounder; 2026-11-14: its shape to fit the chest
|
|
189
|
+
* plate's as puzzle pieces fit): its bottom at the middle, how far it goes round each side
|
|
190
|
+
* (degrees: out to under the chest plate's corners), how much its bottom rises to its corners,
|
|
191
|
+
* rounding them off, and how far it domes at its middle.
|
|
142
192
|
*/
|
|
143
193
|
export declare const BELLY: {
|
|
144
194
|
y: number;
|
|
@@ -146,9 +196,16 @@ export declare const BELLY: {
|
|
|
146
196
|
round: number;
|
|
147
197
|
dome: number;
|
|
148
198
|
};
|
|
149
|
-
/**
|
|
199
|
+
/**
|
|
200
|
+
* The chest plate's bottom (the user, 2026-11-13: dipped at the middle; 2026-11-14: the belly's
|
|
201
|
+
* plate to lock into it): a tab hangs down the middle to `y`, flat out to the first angle of `tab`
|
|
202
|
+
* and rounding up by `drop` to the second; beside it the bottom rises by `rise` more to the sides.
|
|
203
|
+
* The belly's top follows it GAP under, so the tab sits in a notch of the belly's plate.
|
|
204
|
+
*/
|
|
150
205
|
export declare const CHEST: {
|
|
151
206
|
y: number;
|
|
207
|
+
drop: number;
|
|
208
|
+
tab: number[];
|
|
152
209
|
rise: number;
|
|
153
210
|
};
|
|
154
211
|
/**
|
|
@@ -313,6 +370,17 @@ export declare const NINJA_DETAILS: number[][];
|
|
|
313
370
|
* down the front of each thigh plate.
|
|
314
371
|
*/
|
|
315
372
|
export declare const ASTRO_DETAILS: number[][];
|
|
373
|
+
/**
|
|
374
|
+
* The marine's details (the user, 2026-11-14: coloured buttons, boxes, grooves), as DETAILS, then
|
|
375
|
+
* how far it stands over the plate (a box, walled, when not 0) and its look in `KIT`: a control box
|
|
376
|
+
* on the left of the chest with three lit buttons (none on the belly: smooth, the user); a
|
|
377
|
+
* power box on the back with two lights, two
|
|
378
|
+
* grooves across the small of the back; a box on the outside of each thigh with a light; three
|
|
379
|
+
* lit buttons alone on the left forearm by the wrist (the user: no black box there).
|
|
380
|
+
*/
|
|
381
|
+
export declare const MARINE_DETAILS: number[][];
|
|
382
|
+
/** A triangle's kind bit: in its own colour on any plate (the marine's details). */
|
|
383
|
+
export declare const OWN = 64;
|
|
316
384
|
/** The armour's recipe on the skin `s`, `fine` or not (armor()), made now if it is not yet: the close one takes a quarter of a second. */
|
|
317
385
|
export declare const prepare: (s: Skin, fine: boolean) => Recipe;
|
|
318
386
|
/**
|
|
@@ -105,6 +105,13 @@ export declare const finger: (p: Vec3, d1: Vec3, d2: Vec3, d3: Vec3, l: number,
|
|
|
105
105
|
* user, 2026-11-09: the fingers stood off the katana's grip).
|
|
106
106
|
*/
|
|
107
107
|
export declare const phalanges: (curl: number, i: number) => [Vec3, Vec3, Vec3];
|
|
108
|
+
/** The strap round the wrist (the user, 2026-11-14: finer): its width, and how far it stands out of the palm's ring. */
|
|
109
|
+
export declare const STRAP: {
|
|
110
|
+
w: number;
|
|
111
|
+
k: number;
|
|
112
|
+
};
|
|
113
|
+
/** The marine's lit buttons on it, in place of the buckle (the user, 2026-11-14: no black box): across (toward the thumb), and colour. */
|
|
114
|
+
export declare const WRIST_LIGHTS: [number, number[]][];
|
|
108
115
|
/**
|
|
109
116
|
* A gloved hand at the wrist `end`: the fingers along `f`, the back of the hand along `u`, the thumb
|
|
110
117
|
* toward `th` (unit vectors). `curl` runs from 0, a flat open hand with the fingers spread, to 1, a
|
|
@@ -118,13 +125,17 @@ export declare const hand: (out: Out, end: Vec3, f: Vec3, u: Vec3, th: Vec3, cur
|
|
|
118
125
|
/** 0 to 1: the thumb out of the fist to CUP, up the side of what the palm carries. */
|
|
119
126
|
cup?: number,
|
|
120
127
|
/** A near runner's hand: fewer sides, on the near sleeve's cuff, and none of the glove's small parts. */
|
|
121
|
-
lite?: boolean
|
|
128
|
+
lite?: boolean,
|
|
129
|
+
/** The marine's: lit buttons on the strap round the wrist (WRIST_LIGHTS). */
|
|
130
|
+
lights?: boolean) => void;
|
|
122
131
|
/** What a hand does besides closing (hand()): the left index pointing, the right thumb pushing toward `to`, the left thumb cupped. */
|
|
123
132
|
export interface Grip {
|
|
124
133
|
point?: number;
|
|
125
134
|
push?: number;
|
|
126
135
|
to?: Vec3;
|
|
127
136
|
cup?: number;
|
|
137
|
+
/** The marine's lit buttons on the wrists' straps. */
|
|
138
|
+
lights?: boolean;
|
|
128
139
|
}
|
|
129
140
|
/**
|
|
130
141
|
* Both hands of the skeleton `s` on its wrists, left then right, each closed `curls[i]` (hand()), in
|
|
@@ -132,7 +143,7 @@ export interface Grip {
|
|
|
132
143
|
* body and the runners share it, so a runner's fist closes on a grip as the own one does. `lite` is
|
|
133
144
|
* a near runner's hand, `skip` a hand not drawn (the one a cut took off with its arm).
|
|
134
145
|
*/
|
|
135
|
-
export declare const hands: (out: Out, s: Solved, build: number, curls: number[], glove: number[], bare: number[], { point, push, to, cup }?: Grip, lite?: boolean, skip?: number) => void;
|
|
146
|
+
export declare const hands: (out: Out, s: Solved, build: number, curls: number[], glove: number[], bare: number[], { point, push, to, cup, lights }?: Grip, lite?: boolean, skip?: number) => void;
|
|
136
147
|
/** On a wall run the rail gun is put away, unless its bolt is going out. */
|
|
137
148
|
export declare const stowed: (p: PlayerState) => boolean;
|
|
138
149
|
export declare const createBody: (world?: World) => Body;
|
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.
|
|
5
|
+
"version": "0.151.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist"
|