@korial29/tiny-fps 0.123.0 → 0.124.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.
|
@@ -19,6 +19,8 @@ interface Region {
|
|
|
19
19
|
high?: (a: number) => number;
|
|
20
20
|
/** Only on the woman's skin. */
|
|
21
21
|
fem?: boolean;
|
|
22
|
+
/** Only on the man's. */
|
|
23
|
+
man?: boolean;
|
|
22
24
|
/** A round plate: its outline an ellipse in (angle, height), [half the angle, middle height, half height]. */
|
|
23
25
|
round?: [number, number, number];
|
|
24
26
|
}
|
|
@@ -34,9 +36,34 @@ export declare const PEC = 0.011;
|
|
|
34
36
|
* metres out at most, fullest low with a firm line under it, the sternum left hollow between them.
|
|
35
37
|
*/
|
|
36
38
|
export declare const CUP = 0.014;
|
|
39
|
+
/** The cups' fullest height, 3 mm under the bust's (BUST_Y, skin.ts). */
|
|
40
|
+
export declare const CUP_Y = 1.367;
|
|
37
41
|
export declare const bust: (x: number, y: number) => number;
|
|
38
|
-
/**
|
|
39
|
-
|
|
42
|
+
/**
|
|
43
|
+
* The woman's shoulder cap (the user, 2026-11-11: simpler, no part down the arm): one round piece
|
|
44
|
+
* on the top of the shoulder, all of it on the trunk's skin, over the arm's (which stops at
|
|
45
|
+
* 1.41 m): the border between the two is under no plate, so its triangles make no steps. Its middle
|
|
46
|
+
* angle round the trunk (degrees from the front), half angle, middle height and half height; a low
|
|
47
|
+
* dome, 4 mm more at its middle.
|
|
48
|
+
*/
|
|
49
|
+
export declare const SHOULDER: {
|
|
50
|
+
a: number;
|
|
51
|
+
half: number;
|
|
52
|
+
y: number;
|
|
53
|
+
h: number;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* The man's shoulder piece (the user, 2026-11-11: no pad standing over the shoulder, a light and
|
|
57
|
+
* simple piece that covers its shape, joining the collar piece in front to the shoulder blade's
|
|
58
|
+
* behind): the angles round the trunk it spans, from the collar piece's end to the shoulder blade
|
|
59
|
+
* plate's; its bottom, over the arm's skin (which stops at 1.41 m), so no plate edge follows the
|
|
60
|
+
* border between the two; and its top at each end, the collar's and the shoulder blade plate's.
|
|
61
|
+
*/
|
|
62
|
+
export declare const BAND: {
|
|
63
|
+
a: number[];
|
|
64
|
+
low: number;
|
|
65
|
+
top: number[];
|
|
66
|
+
};
|
|
40
67
|
/** The gap the user asked between the chest plate and the belly's plates, and between those. */
|
|
41
68
|
export declare const GAP = 0.02;
|
|
42
69
|
export declare const REGIONS: Region[];
|
|
@@ -4,14 +4,15 @@ import type { Quat } from './rig';
|
|
|
4
4
|
/**
|
|
5
5
|
* The dome: its middle (the widest ring, level with the brow), its half width, height over the
|
|
6
6
|
* middle and depth, how square it is seen from above, how flat on top, and the height of its lip
|
|
7
|
-
* under the chin. It holds the head of the skin (1.555 to 1.803 m, the head joint at 1.62)
|
|
7
|
+
* under the chin. It holds the head of the skin (1.555 to 1.803 m, the head joint at 1.62): the
|
|
8
|
+
* head fills 97 % of it at the cheekbones.
|
|
8
9
|
*/
|
|
9
10
|
export declare const DOME: {
|
|
10
11
|
c: Vec3;
|
|
11
12
|
r: Vec3;
|
|
12
13
|
e: [number, number];
|
|
13
14
|
rim: number;
|
|
14
|
-
/** The cheeks draw in by this share half way down, and the lip flares out by this one. */
|
|
15
|
+
/** The cheeks draw in by this share half way down, and the lip flares out by this one: none, the bottom cut straight (the user, 2026-11-11). */
|
|
15
16
|
waist: number;
|
|
16
17
|
flare: number;
|
|
17
18
|
};
|
|
@@ -60,6 +61,22 @@ export declare const onDome: (a: number, y: number, off?: number) => Spot;
|
|
|
60
61
|
export declare const slit: (a: number) => number;
|
|
61
62
|
/** Whether the dome's point at (a, y) is under the T's glass grown by `grow` metres. */
|
|
62
63
|
export declare const glazed: (a: number, y: number, grow?: number) => boolean;
|
|
64
|
+
/**
|
|
65
|
+
* The cheeks (the user, 2026-11-11, after a Mandalorian helmet, an idea and nothing copied): the
|
|
66
|
+
* dome is whole but for a V carved in each cheek, no panel and no line round it. The V is upside
|
|
67
|
+
* down: its top edge just under the slit, from the slot back across the cheek, its inner side
|
|
68
|
+
* straight down along the slot (the helmet's middle line), its point low by the jaw. Each corner is
|
|
69
|
+
* [u, v] on the outline (outline()).
|
|
70
|
+
*/
|
|
71
|
+
export declare const CUT: {
|
|
72
|
+
tip: [number, number];
|
|
73
|
+
arms: [number, number][];
|
|
74
|
+
};
|
|
75
|
+
/** The V's hollow: its deepest point (u, v) inside the V, and how deep, metres. */
|
|
76
|
+
export declare const PIT: {
|
|
77
|
+
at: [number, number];
|
|
78
|
+
depth: number;
|
|
79
|
+
};
|
|
63
80
|
/**
|
|
64
81
|
* Appends her helmet at level of detail `lod` (0 far, 1 near, 2 and up close) on the head joint at
|
|
65
82
|
* `at` turned by `q`, the frame of its T in `rgb`, the team's colour (0 to 1). The far one has no
|
|
@@ -27,25 +27,7 @@ export declare const pack: (out: number[], at: Vec3, q: Quat, rgb: number[], lod
|
|
|
27
27
|
* the pack's port from above, ribbed close up. None far.
|
|
28
28
|
*/
|
|
29
29
|
export declare const hose: (out: number[], head: Vec3, hq: Quat, chest: Vec3, cq: Quat, lod: number) => void;
|
|
30
|
-
/**
|
|
31
|
-
* The shoulder pads (the user, 2026-11-10: white and glossy, then worked, less of a shell, cut a
|
|
32
|
-
* third of the way in from the neck, smaller): a plate over each shoulder, flat on top and rounded
|
|
33
|
-
* to its rim, which turns down; two grooves along its outer edge; its inner third, toward the
|
|
34
|
-
* neck, cut off straight. On the arm's joint so it goes with the arm. For the right one (the left
|
|
35
|
-
* is mirrored): its middle from the joint, the way it faces, its half length along the shoulder
|
|
36
|
-
* and half width across it, its height, and the cut (a share of the half length, from the middle
|
|
37
|
-
* toward the neck).
|
|
38
|
-
*/
|
|
39
|
-
export declare const PAD: {
|
|
40
|
-
at: Vec3;
|
|
41
|
-
out: Vec3;
|
|
42
|
-
r: [number, number];
|
|
43
|
-
h: number;
|
|
44
|
-
cut: number;
|
|
45
|
-
};
|
|
46
|
-
/** The woman's cup, scaled about its joint: flatter. Her shoulders have caps of the armour (armor.ts), no pads. */
|
|
30
|
+
/** The woman's cup, scaled about its joint: flatter. */
|
|
47
31
|
export declare const CUP_F: Vec3;
|
|
48
|
-
/** Appends both shoulder pads at level of detail `lod` on the arm joints (`arms`: the left's and the right's place and turn), in `plate` (white when absent), `scale`d about the joints. */
|
|
49
|
-
export declare const shoulders: (out: number[], arms: [Vec3, Quat][], lod: number, plate?: number[], scale?: number) => void;
|
|
50
32
|
/** Appends the crotch cup at level of detail `lod` on the pelvis joint at `at` turned by `q`, in `plate` (white when absent). */
|
|
51
33
|
export declare const crotch: (out: number[], at: Vec3, q: Quat, lod: number, plate?: number[], scale?: number | Vec3) => void;
|
|
@@ -73,6 +73,8 @@ export interface Skin {
|
|
|
73
73
|
}
|
|
74
74
|
/** How far out the woman's bust stands at its fullest, on the man's rest mesh, metres. */
|
|
75
75
|
export declare const BUST = 0.028;
|
|
76
|
+
/** Where it is fullest, metres up (the user, 2026-11-11: a little higher; it was 1.345). */
|
|
77
|
+
export declare const BUST_Y = 1.37;
|
|
76
78
|
/**
|
|
77
79
|
* The skin at a level of detail: 0 far, 1 near (see DETAIL in mesh.ts), 2 near, headless and
|
|
78
80
|
* handless, for the eye, 3 close (CLOSE in render.ts), twice the rings and half more sides, the
|
|
@@ -86,13 +88,6 @@ export declare const body: (lod: number, build?: number) => Skin;
|
|
|
86
88
|
export declare const cut: (lod: number, limb: number, build?: number) => Skin[];
|
|
87
89
|
/** A build's joints at rest (solve() of its rest pose), for what is placed on its body. */
|
|
88
90
|
export declare const bindOf: (build?: number) => Vec3[];
|
|
89
|
-
/**
|
|
90
|
-
* The turn of the shoulder plate of shoulder joint `j`: on the collarbone, it goes with a share of
|
|
91
|
-
* the upper arm's swing, all of it as the arm comes up over the shoulder, and with none of its
|
|
92
|
-
* turn about itself, as a plate strapped to the trunk does (the user, 2026-11-10: it rode a
|
|
93
|
-
* reaching arm round to the front of the chest).
|
|
94
|
-
*/
|
|
95
|
-
export declare const capped: (rot: Quat[], j: number, build?: number) => Quat;
|
|
96
91
|
/**
|
|
97
92
|
* Appends the skin in the pose `solved` (see solve()) to `out` as triangles in the renderer's
|
|
98
93
|
* vertex format, each in its palette colour: a vertex goes where the two joints it hangs on would
|
|
@@ -4,7 +4,7 @@ import type { Gait, Seat } from './gait';
|
|
|
4
4
|
import type { Tracer } from './beams';
|
|
5
5
|
import type { Piece } from './limbs';
|
|
6
6
|
import type { Vec3 } from './mesh';
|
|
7
|
-
import type { Pose
|
|
7
|
+
import type { Pose } from './rig';
|
|
8
8
|
import type { Face } from './expression';
|
|
9
9
|
import type { Trail } from './trail';
|
|
10
10
|
/** What a runner keeps between frames. */
|
|
@@ -93,7 +93,7 @@ export declare const dissolve: (out: number[], from: number, k: number) => void;
|
|
|
93
93
|
export declare const stance: (r: Runner) => {
|
|
94
94
|
s: {
|
|
95
95
|
pos: Vec3[];
|
|
96
|
-
rot: Quat[];
|
|
96
|
+
rot: import("./rig").Quat[];
|
|
97
97
|
};
|
|
98
98
|
sink: number;
|
|
99
99
|
yaw: number;
|
|
@@ -101,7 +101,7 @@ export declare const stance: (r: Runner) => {
|
|
|
101
101
|
} | {
|
|
102
102
|
s: {
|
|
103
103
|
pos: Vec3[];
|
|
104
|
-
rot: Quat[];
|
|
104
|
+
rot: import("./rig").Quat[];
|
|
105
105
|
};
|
|
106
106
|
sink: number;
|
|
107
107
|
yaw: number;
|
|
@@ -110,5 +110,5 @@ export declare const stance: (r: Runner) => {
|
|
|
110
110
|
/** Draws the runner and gives back its solved skeleton, or nothing once a bolt has burnt it away. */
|
|
111
111
|
export declare const soldier: (out: number[], r: Runner, color: number[], lod?: number, helmets?: boolean, armored?: boolean) => {
|
|
112
112
|
pos: Vec3[];
|
|
113
|
-
rot: Quat[];
|
|
113
|
+
rot: import("./rig").Quat[];
|
|
114
114
|
} | undefined;
|
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.124.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist"
|