@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.
- package/dist/assets/{room-RIvmKR68.js → room-DNdwMAUE.js} +31 -15
- package/dist/cast-art-DbwsToaQ.js +1 -0
- package/dist/index.js +7 -7
- package/dist/landfall-CSZGx2iA.js +21 -0
- package/dist/local.js +1 -1
- package/dist/paint-DipbUTzI.js +4 -0
- package/dist/room.js +1 -1
- package/dist/server.js +1 -1
- package/dist/types/client/armor/clip.d.ts +22 -0
- package/dist/types/client/armor/cooking.d.ts +14 -0
- package/dist/types/client/armor/details.d.ts +65 -0
- package/dist/types/client/armor/fit.d.ts +8 -0
- package/dist/types/client/armor/regions.d.ts +304 -0
- package/dist/types/client/armor/scratches.d.ts +4 -0
- package/dist/types/client/armor/shell.d.ts +46 -0
- package/dist/types/client/armor/types.d.ts +37 -0
- package/dist/types/client/armor/wear.d.ts +22 -0
- package/dist/types/client/armor.d.ts +9 -393
- package/dist/types/client/body/constants.d.ts +35 -0
- package/dist/types/client/body/create.d.ts +3 -0
- package/dist/types/client/body/fingers.d.ts +112 -0
- package/dist/types/client/body/glove.d.ts +27 -0
- package/dist/types/client/body/hands.d.ts +28 -0
- package/dist/types/client/body/hunter.d.ts +26 -0
- package/dist/types/client/body/motion.d.ts +42 -0
- package/dist/types/client/body/reach.d.ts +65 -0
- package/dist/types/client/body/types.d.ts +39 -0
- package/dist/types/client/body/wield.d.ts +30 -0
- package/dist/types/client/body.d.ts +10 -207
- package/dist/types/client/cast-art.d.ts +2 -0
- package/dist/types/client/gait/constants.d.ts +34 -0
- package/dist/types/client/gait/create.d.ts +3 -0
- package/dist/types/client/gait/fists.d.ts +55 -0
- package/dist/types/client/gait/maths.d.ts +38 -0
- package/dist/types/client/gait/moves.d.ts +129 -0
- package/dist/types/client/gait/types.d.ts +59 -0
- package/dist/types/client/gait.d.ts +6 -146
- package/dist/types/client/gun/ammo.d.ts +21 -0
- package/dist/types/client/gun/display.d.ts +32 -0
- package/dist/types/client/gun/held.d.ts +75 -0
- package/dist/types/client/gun/kinds.d.ts +12 -0
- package/dist/types/client/gun/loft.d.ts +16 -0
- package/dist/types/client/gun/paint.d.ts +30 -0
- package/dist/types/client/gun/railgun.d.ts +34 -0
- package/dist/types/client/gun/reload.d.ts +112 -0
- package/dist/types/client/gun/rifle.d.ts +54 -0
- package/dist/types/client/gun/sidearm.d.ts +32 -0
- package/dist/types/client/gun.d.ts +10 -308
- package/dist/types/client/hulk/cabin.d.ts +36 -0
- package/dist/types/client/hulk/common.d.ts +55 -0
- package/dist/types/client/hulk/debris.d.ts +16 -0
- package/dist/types/client/hulk/hull.d.ts +81 -0
- package/dist/types/client/hulk/inside.d.ts +5 -0
- package/dist/types/client/hulk/parts.d.ts +16 -0
- package/dist/types/client/hulk/types.d.ts +7 -0
- package/dist/types/client/hulk/wings.d.ts +4 -0
- package/dist/types/client/hulk.d.ts +8 -18
- package/dist/types/client/hunter/animation.d.ts +113 -0
- package/dist/types/client/hunter/constants.d.ts +53 -0
- package/dist/types/client/hunter/disc.d.ts +33 -0
- package/dist/types/client/hunter/harpoon.d.ts +68 -0
- package/dist/types/client/hunter/marine.d.ts +14 -0
- package/dist/types/client/hunter/model.d.ts +4 -0
- package/dist/types/client/hunter/rest.d.ts +7 -0
- package/dist/types/client/hunter.d.ts +7 -164
- package/dist/types/client/render/camera.d.ts +58 -0
- package/dist/types/client/render/constants.d.ts +63 -0
- package/dist/types/client/render/scene.d.ts +58 -0
- package/dist/types/client/render/shader.d.ts +62 -0
- package/dist/types/client/render/shots.d.ts +61 -0
- package/dist/types/client/render/types.d.ts +74 -0
- package/dist/types/client/render.d.ts +9 -277
- package/dist/types/client/sfx/air.d.ts +46 -0
- package/dist/types/client/sfx/anthem.d.ts +27 -0
- package/dist/types/client/sfx/layers.d.ts +6 -0
- package/dist/types/client/sfx/music.d.ts +96 -0
- package/dist/types/client/sfx/render.d.ts +10 -0
- package/dist/types/client/sfx/sounds.d.ts +180 -0
- package/dist/types/client/sfx/synth.d.ts +24 -0
- package/dist/types/client/sfx/voices.d.ts +59 -0
- package/dist/types/client/sfx.d.ts +8 -325
- package/dist/types/client/skin/head.d.ts +120 -0
- package/dist/types/client/skin/lofts.d.ts +145 -0
- package/dist/types/client/skin/pose.d.ts +102 -0
- package/dist/types/client/skin/shape.d.ts +2 -0
- package/dist/types/client/skin.d.ts +4 -179
- package/dist/types/client/soldier/animate.d.ts +12 -0
- package/dist/types/client/soldier/carry.d.ts +28 -0
- package/dist/types/client/soldier/common.d.ts +8 -0
- package/dist/types/client/soldier/draw.d.ts +12 -0
- package/dist/types/client/soldier/grasp.d.ts +28 -0
- package/dist/types/client/soldier/hunter.d.ts +38 -0
- package/dist/types/client/soldier/runner.d.ts +58 -0
- package/dist/types/client/soldier/stance.d.ts +20 -0
- package/dist/types/client/soldier/types.d.ts +107 -0
- package/dist/types/client/soldier.d.ts +9 -236
- package/dist/types/client/xeno/back.d.ts +113 -0
- package/dist/types/client/xeno/body.d.ts +63 -0
- package/dist/types/client/xeno/common.d.ts +28 -0
- package/dist/types/client/xeno/head.d.ts +109 -0
- package/dist/types/client/xeno/limbs.d.ts +62 -0
- package/dist/types/client/xeno/mouth.d.ts +23 -0
- package/dist/types/client/xeno/parts.d.ts +40 -0
- package/dist/types/client/xeno/tail.d.ts +107 -0
- package/dist/types/client/xeno.d.ts +8 -246
- package/package.json +1 -1
- package/dist/landfall-n5tpoRmi.js +0 -21
- package/dist/paint-BBkY8KO0.js +0 -4
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import type { Choice } from '../../shared/types';
|
|
2
|
+
import type { Vec3 } from '../mesh';
|
|
3
|
+
export declare const SKIN: number[];
|
|
4
|
+
/** The suit's near black under its armour (the user, 2026-11-10: white, then a mid grey so the plates stand out; 2026-11-13: dark, on a picture of a trooper's armour) and its black (gloves, boots, belt): see palette(). */
|
|
5
|
+
export declare const SUIT: number[];
|
|
6
|
+
export declare const BLACK: number[];
|
|
7
|
+
/** The colour regions of a palette. */
|
|
8
|
+
export declare const JACKET: number, TRIM: number, PANTS: number, FLESH: number, HAIR: number, UPPER: number, SOLE: number, GLOVE: number, WHITE: number, IRIS: number, LIP: number, SHADE: number, BROW: number, STUBBLE: number, LINE: number, STRIPE: number, STRIPE_LOW: number, BELT: number, GLINT: number, CAP: number, PUPIL: number, LASH: number, BLUSH: number, TEETH: number, INNER: number;
|
|
9
|
+
/** The regions a runner's outfit is recoloured or covered by: the skin, the trousers, the boots, the gloves, the stripes and the belt. */
|
|
10
|
+
export declare const REGION: {
|
|
11
|
+
FLESH: number;
|
|
12
|
+
PANTS: number;
|
|
13
|
+
UPPER: number;
|
|
14
|
+
GLOVE: number;
|
|
15
|
+
STRIPE: number;
|
|
16
|
+
STRIPE_LOW: number;
|
|
17
|
+
BELT: number;
|
|
18
|
+
HAIR: number;
|
|
19
|
+
JACKET: number;
|
|
20
|
+
TRIM: number;
|
|
21
|
+
SOLE: number;
|
|
22
|
+
CAP: number;
|
|
23
|
+
};
|
|
24
|
+
/** The palette's colours that glow, unlit (the eyes' specks, a cut's face), and its size. */
|
|
25
|
+
export declare const UNLIT: number[], COLOURS: number;
|
|
26
|
+
/** Hair colours, one per runner (hairOf(), by his skin too): black, dark and mid brown, chestnut, red, dark and light blond, grey, and a shaved head, the skin's in its shadow. */
|
|
27
|
+
export declare const HAIRS: number[][];
|
|
28
|
+
/** Iris colours, one per runner (eyesOf()): dark and mid brown, hazel, grey-blue, pale blue. */
|
|
29
|
+
export declare const IRISES: number[][];
|
|
30
|
+
export declare const pick: (id: number, salt: number, n: number) => number;
|
|
31
|
+
/** A hair colour for the runner `id`, picked at random from HAIRS but the same for everyone who sees him; his haircut (`c.hair`, look.ts) says whether he is shaved. */
|
|
32
|
+
export declare const hairOf: (id: number, c?: Choice) => number[];
|
|
33
|
+
/** The hair colour of the woman `id`: as hairOf(), never the shaved head's (her hair is a style of hair.ts). */
|
|
34
|
+
export declare const tressOf: (id: number, c?: Choice) => number[];
|
|
35
|
+
export declare const dark: (id: number, c?: Choice) => boolean;
|
|
36
|
+
/** How dark the shaved beard of the runner `id` is, 0 (none) to 1. */
|
|
37
|
+
export declare const beardOf: (id: number) => number;
|
|
38
|
+
/** Whether the runner `id` has a shaved head (the last of HAIRS): no hair to give a length to. */
|
|
39
|
+
export declare const shaved: (id: number, c?: Choice) => boolean;
|
|
40
|
+
/** An iris colour for the runner `id`, as hairOf(). */
|
|
41
|
+
export declare const eyesOf: (id: number, c?: Choice) => number[];
|
|
42
|
+
/** Jacket, its darker trim, trousers (the suit's legs, darker), skin, hair, boots, sole, gloves, the whites of the eyes and their irises, the lips, the skin in its folds (nostrils, the mouth, the ears' hollows), the brows, between the hair and the skin, the shaved beard's shadow and its edge, the line between the lips (as the folds), the side stripe on the jacket and on the trousers and the belt (the jacket's and the trousers' own colours but on a space suit), the light caught in the eyes, which glows, and the cut's cauterized face, which glows too. */
|
|
43
|
+
/**
|
|
44
|
+
* With `suit` (the moon's, the user 2026-11-10), a dark grey space suit under white armour: the
|
|
45
|
+
* team's colour only in a stripe down each side, black gloves, boots and belt. Then the pupils,
|
|
46
|
+
* the lashes, the cheeks' flush and the teeth. `tone` is the skin's (toneOf()), `beard` how dark
|
|
47
|
+
* the shaved beard is on it, 0 to 1. `fem` (the woman's): redder lips, darker lashes.
|
|
48
|
+
*/
|
|
49
|
+
export declare const palette: (jacket: number[], hair?: number[], eyes?: number[], suit?: boolean, tone?: number[], beard?: number, fem?: boolean) => number[][];
|
|
50
|
+
export declare const NECK_Y: number, CROWN: number;
|
|
51
|
+
/**
|
|
52
|
+
* 1 while the woman's skin is generated: the head's functions below carve her face. A lower face
|
|
53
|
+
* that tapers to a narrower chin, a lighter brow ridge and shallower sockets, higher cheekbones, no
|
|
54
|
+
* jaw corners, a smaller nose, fuller lips, thinner arched brows, a lash line on the lids.
|
|
55
|
+
*/
|
|
56
|
+
export declare let fem: number;
|
|
57
|
+
/** Sets fem for generate(): a module cannot assign another module's binding. */
|
|
58
|
+
export declare const female: (v: number) => void;
|
|
59
|
+
export declare const SKULL: number[][];
|
|
60
|
+
/**
|
|
61
|
+
* The back of the skull above its fullest (the occiput, at the brow's height): one round curve up to
|
|
62
|
+
* the crown, not the dome's, which stood straight up the back and turned at the top (the user,
|
|
63
|
+
* 2026-11-14: too stiff behind). Below it SKULL bulges out over the nape.
|
|
64
|
+
*/
|
|
65
|
+
export declare const OCCIPUT: number[];
|
|
66
|
+
/** The neck's section under the jaw (half width, front and back depth), the trunk's last ring's. */
|
|
67
|
+
export declare const NECK: number[];
|
|
68
|
+
/**
|
|
69
|
+
* The jaw line by the angle from the front: under the chin, low along the jaw to its angle a little
|
|
70
|
+
* in front of the ear, then straight up behind it to under the ear (the user, 2026-11-14: an angle
|
|
71
|
+
* before it rises to the ears), then the base of the skull behind; and how wide the blend from the
|
|
72
|
+
* neck to the head is there, sharp under the jaw, soft at the nape.
|
|
73
|
+
*/
|
|
74
|
+
export declare const jaw: (aq: number) => number[];
|
|
75
|
+
export declare const DOME: number;
|
|
76
|
+
/** [half width, front depth, back depth, centre z] at height y: a smooth curve through SKULL, a dome above it. */
|
|
77
|
+
export declare const section: (y: number) => number[];
|
|
78
|
+
/** section() but for the back above the occiput. */
|
|
79
|
+
export declare const arch: (y: number) => number[];
|
|
80
|
+
/**
|
|
81
|
+
* How much narrower the head is at height `y` on a side `cs` of it (the cosine from the front): the
|
|
82
|
+
* back below the ears goes in to the neck, not a block as wide as the face (the user, 2026-11-14).
|
|
83
|
+
*/
|
|
84
|
+
export declare const nape: (y: number, cs: number) => number;
|
|
85
|
+
/**
|
|
86
|
+
* A point of the man's skull at rest, `a` radians round it from the front (+ toward +x) at height
|
|
87
|
+
* `y`, `off` metres out of it along its normal: what hair.ts lays a woman's hair on.
|
|
88
|
+
*/
|
|
89
|
+
export declare const scalp: (a: number, y: number, off?: number) => Vec3;
|
|
90
|
+
/** The crown of the man's head at rest, metres. */
|
|
91
|
+
export declare const TOP = 1.803;
|
|
92
|
+
/** Where the hair starts, by the angle from the front (0 to pi): the forehead, the temples, a short sideburn, over the ear, the nape. */
|
|
93
|
+
export declare const HAIRLINE_M: number[][];
|
|
94
|
+
/** The woman's: a higher, rounder forehead, no sideburn, clear of the ear, a higher nape. hair.ts lays her styles down to it. */
|
|
95
|
+
export declare const HAIRLINE_F: number[][];
|
|
96
|
+
export declare const hairline: (aq: number) => number;
|
|
97
|
+
export declare const bell: (a: number, s: number) => number;
|
|
98
|
+
/** 0 below a, 1 above b, smooth between. */
|
|
99
|
+
export declare const step: (a: number, b: number, v: number) => number;
|
|
100
|
+
/** The middle of the groove between the nose and the upper lip, metres up. */
|
|
101
|
+
export declare const PHILTRUM = 1.641;
|
|
102
|
+
/** The brow ridge's crest at ax across: an arch over each eye, down to the nose and the temple. The brows follow it. */
|
|
103
|
+
export declare const arcade: (ax: number) => number;
|
|
104
|
+
/**
|
|
105
|
+
* How far the surface of the head stands out of its section at (x, y), aq radians from the front:
|
|
106
|
+
* the hair's thickness, fuller on top, and near the features of the face (centimetres, as bells).
|
|
107
|
+
*/
|
|
108
|
+
export declare const face: (x: number, y: number, aq: number, fine: boolean) => number;
|
|
109
|
+
/** A brow's middle line at x across and its half height there. */
|
|
110
|
+
export declare const browAt: (x: number) => number[];
|
|
111
|
+
/**
|
|
112
|
+
* The colour of the head at a point of it: a palette colour, a second one and how much of it (the
|
|
113
|
+
* two blend, so the hairline, the beard and the lips have soft edges on any grid). Hair above the
|
|
114
|
+
* hairline, the lips, the shaved beard, a flush on the cheeks and the nose.
|
|
115
|
+
*/
|
|
116
|
+
export declare const tint: (x: number, y: number, aq: number, fine: boolean) => number[];
|
|
117
|
+
export declare const sgn: (v: number, e: number) => number;
|
|
118
|
+
export declare const clamp: (v: number) => number;
|
|
119
|
+
/** How far out the face is (its z) at x across, height y: the carved surface, found by halving. */
|
|
120
|
+
export declare const onHead: (x: number, y: number) => number;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A ring: where it is along the loft (y, or z), the centre of its ellipse across the loft (x, then
|
|
3
|
+
* z, or y), its half widths in the same order (x first), `u` its place along the loft's chain of
|
|
4
|
+
* joints (its integer part the joint, the rest the blend toward the next), the colour of the strip
|
|
5
|
+
* after it, then rules for that strip: [limit, colour] pairs on the angle in degrees from the loft's
|
|
6
|
+
* first side, beyond a positive limit, within a negative one. A ring with no radius is a point.
|
|
7
|
+
*/
|
|
8
|
+
export type Ring = number[];
|
|
9
|
+
export interface Loft {
|
|
10
|
+
rings: Ring[];
|
|
11
|
+
/** The joints u runs along. */
|
|
12
|
+
chain: number[];
|
|
13
|
+
/** Sides around, far, near then close (and the eye's); the rings kept in the far level. */
|
|
14
|
+
n: [number, number, number];
|
|
15
|
+
far: number[];
|
|
16
|
+
/** Superellipse exponent of the cross-section, 2 an ellipse. */
|
|
17
|
+
e?: number;
|
|
18
|
+
/** Rings run along z, not y. */
|
|
19
|
+
z?: boolean;
|
|
20
|
+
/** Rings run along x (out to the right), across them y then z. */
|
|
21
|
+
x?: boolean;
|
|
22
|
+
/** Built twice, the second time mirrored for the left side. */
|
|
23
|
+
m?: boolean;
|
|
24
|
+
}
|
|
25
|
+
/** The rest mesh: per vertex a position and a normal, two joints and the weight of the second. */
|
|
26
|
+
export interface Skin {
|
|
27
|
+
v: Float32Array;
|
|
28
|
+
j: Uint8Array;
|
|
29
|
+
w: Float32Array;
|
|
30
|
+
/** Three vertex indices per triangle, and the palette colour of each of its corners: the colour blends across it. */
|
|
31
|
+
t: Uint16Array;
|
|
32
|
+
c: Uint8Array;
|
|
33
|
+
/** Per vertex the light it gets, 1 in the open and less in another part's shadow. */
|
|
34
|
+
o: Float32Array;
|
|
35
|
+
/** Per triangle the LIMB it comes off with, NONE for the trunk's. */
|
|
36
|
+
l?: Uint8Array;
|
|
37
|
+
/** Per corner a second palette colour and how much of it is blended into the first. */
|
|
38
|
+
c2: Uint8Array;
|
|
39
|
+
cm: Float32Array;
|
|
40
|
+
/** Per vertex the KIND of part it is (features.ts). */
|
|
41
|
+
g: Uint8Array;
|
|
42
|
+
/** The BUILD it is (rig.ts), the man's when absent; and, for another, the man's rest mesh it was made from, as `v`: the armour's regions are written on him. */
|
|
43
|
+
b?: number;
|
|
44
|
+
u?: Float32Array;
|
|
45
|
+
/**
|
|
46
|
+
* Per channel (CH in features.ts) the vertices it moves and, six floats each, how far at full
|
|
47
|
+
* weight: the position's shift, then the normal's. skin() adds them to the rest mesh.
|
|
48
|
+
*/
|
|
49
|
+
m: {
|
|
50
|
+
i: Uint16Array;
|
|
51
|
+
d: Float32Array;
|
|
52
|
+
}[];
|
|
53
|
+
/**
|
|
54
|
+
* The eye's own body only: the vertices round its shoulders that skin() relaxes once posed, how
|
|
55
|
+
* much (0 to 1), and per each (offsets into the lists) its neighbours and its triangles.
|
|
56
|
+
*/
|
|
57
|
+
r?: {
|
|
58
|
+
k: Uint32Array;
|
|
59
|
+
g: Float32Array;
|
|
60
|
+
no: Uint32Array;
|
|
61
|
+
n: Uint32Array;
|
|
62
|
+
to: Uint32Array;
|
|
63
|
+
t: Uint32Array;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Rules for a side stripe (angle 0 the front, 90 the sides), in the jacket's or the trousers'
|
|
68
|
+
* stripe colour: their own but on a space suit.
|
|
69
|
+
*/
|
|
70
|
+
export declare const SIDE: number[];
|
|
71
|
+
export declare const SIDE_LOW: number[];
|
|
72
|
+
/** The height of the armpits, where the trunk splits into the shoulders and the arms hang. */
|
|
73
|
+
export declare const SPLIT = 1.41;
|
|
74
|
+
export declare const TRUNK: Loft;
|
|
75
|
+
export declare const LEG: Loft;
|
|
76
|
+
/**
|
|
77
|
+
* Two joints of the skin's own after the rig's, the right then the left: the upper arm without its
|
|
78
|
+
* turn about itself, which the deltoid over the shoulder takes (skin() makes them). A humerus
|
|
79
|
+
* turns in its socket under the shoulder's cap; the turn shows down the arm, to the elbow.
|
|
80
|
+
*/
|
|
81
|
+
export declare const SWING_R: number, SWING_L: number;
|
|
82
|
+
export declare const ARM: Loft;
|
|
83
|
+
/** The ring where a sleeve ends in the glove, which body.ts starts the palm on, and its sides: the close ones (the eye's body is close), and the near ones. A thin wrist (3.2 cm until the user, 2026-11-09). */
|
|
84
|
+
export declare const CUFF: number[];
|
|
85
|
+
export declare const CUFF_SIDES: number;
|
|
86
|
+
export declare const CUFF_NEAR: number;
|
|
87
|
+
/**
|
|
88
|
+
* The rings with one more between each two, on a Catmull-Rom curve through them, for the near
|
|
89
|
+
* level. None across a split (two rings at one height) or out of a limb's first ring (the trunk's
|
|
90
|
+
* row); the new ring takes the colour and the rules of the strip it splits.
|
|
91
|
+
*/
|
|
92
|
+
export declare const finer: (rings: Ring[], limb: boolean) => Ring[];
|
|
93
|
+
export declare const LOFTS: Loft[];
|
|
94
|
+
/** A loft with its rings remade by `f`, the rest as `L`'s, or as `more` says. */
|
|
95
|
+
export declare const remake: (L: Loft, f: (r: Ring) => Ring, more?: Partial<Loft>) => Loft;
|
|
96
|
+
export declare const TRUNK_0: Loft;
|
|
97
|
+
export declare const LEG_0: Loft;
|
|
98
|
+
export declare const ARM_0: Loft;
|
|
99
|
+
export declare const TRUNK_X: Loft;
|
|
100
|
+
export declare const LEG_X: Loft;
|
|
101
|
+
export declare const ARM_X: Loft;
|
|
102
|
+
/**
|
|
103
|
+
* Its skull's dome, on the head joint, from the back to the middle of the head (rings along z):
|
|
104
|
+
* long, swelling then tapering as it sweeps back over the crown and curves down toward the nape
|
|
105
|
+
* (the user, 2026-11-15: more curves, the back bending down, not up). Its front ring is the edge of its face, xeno.ts's
|
|
106
|
+
* skull(), a human skull's, which covers the front half: one smooth block, no seam.
|
|
107
|
+
*/
|
|
108
|
+
/**
|
|
109
|
+
* The xenomorph's dome's profile (the user, 2026-11-15: the back's curve carrying on the front's): its length
|
|
110
|
+
* behind the face's edge, the height of the face's middle (xeno.ts: EY over the head joint), how far
|
|
111
|
+
* the tip falls, and the face's half width and height (EA, EB). Its top runs on from the face's own
|
|
112
|
+
* ellipse, level where they meet, and falls along one arc to the tip; its underside rises faster,
|
|
113
|
+
* clear of the neck.
|
|
114
|
+
*/
|
|
115
|
+
export declare const PROFILE: number[];
|
|
116
|
+
/** The exponent of the dome's sections, 2 an ellipse: over it, a flatter top and fuller corners (the user, 2026-11-24: flatten the top a little, no egg). */
|
|
117
|
+
export declare const CREST_E = 2.5;
|
|
118
|
+
/**
|
|
119
|
+
* How much larger its head is than it was drawn (the user, 2026-11-16: a bigger head, 2026-11-24:
|
|
120
|
+
* a little bigger still), about the head joint: the dome here (CREST), the face's pieces in xeno.ts (grow()).
|
|
121
|
+
*/
|
|
122
|
+
export declare const HEAD_K = 1.2;
|
|
123
|
+
/** And how much narrower (the user, 2026-11-16: less round, the sides in), across it alone. */
|
|
124
|
+
export declare const HEAD_X = 0.78;
|
|
125
|
+
/** The dome's length behind the face's edge, metres, before the head is grown. */
|
|
126
|
+
export declare const CREST_LEN: number;
|
|
127
|
+
/** The radius of the round end of the dome, and the banana's thickness and half width behind the face. */
|
|
128
|
+
export declare const TIP = 0.062;
|
|
129
|
+
export declare const BANANA: number[];
|
|
130
|
+
/**
|
|
131
|
+
* The dome's section `z` behind the face's edge (0 to PROFILE[0]), in the rest pose: its centre's
|
|
132
|
+
* height, half width and half height (a superellipse of exponent CREST_E). xeno.ts lays its hoses on it.
|
|
133
|
+
*/
|
|
134
|
+
export declare const domeAt: (z: number) => [number, number, number];
|
|
135
|
+
export declare const CREST: Loft;
|
|
136
|
+
/**
|
|
137
|
+
* How the dome's section changes a metre behind the face's edge, over its first strip, before the
|
|
138
|
+
* head is grown: its centre's height, half width and half height. The face's rim takes its normal
|
|
139
|
+
* from it (skull() in xeno.ts).
|
|
140
|
+
*/
|
|
141
|
+
export declare const RIM: number[];
|
|
142
|
+
/** How high the xenomorph's hip bones rise at their outer ends, metres. */
|
|
143
|
+
export declare const WING = 0.05;
|
|
144
|
+
/** How deep the front of its pelvis is sunk in at the middle, metres. */
|
|
145
|
+
export declare const BOWL = 0.05;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type { Quat } from '../rig';
|
|
2
|
+
import type { Vec3 } from '../mesh';
|
|
3
|
+
import type { Out } from '../verts';
|
|
4
|
+
import type { Skin } from './lofts';
|
|
5
|
+
/**
|
|
6
|
+
* Per joint how the woman's parts scale about it from the man's (across, along y, in depth), the
|
|
7
|
+
* skin's two swing joints last: a narrower waist and ribs on hips a little wider, a slimmer neck,
|
|
8
|
+
* a head 4 % smaller, slimmer and shorter arms, smaller hands, slimmer shins, smaller feet.
|
|
9
|
+
*/
|
|
10
|
+
export declare const SCALE: number[][];
|
|
11
|
+
/**
|
|
12
|
+
* The woman's skin from the man's, vertex for vertex (the same triangles, weights and channels):
|
|
13
|
+
* her volumes are shaped on his rest mesh (a bust under the ribs' line, hips and buttocks fuller,
|
|
14
|
+
* the waist drawn in higher), then each vertex goes where its joints' own scales about their binds
|
|
15
|
+
* carry it, mixed by its weights, onto her skeleton (RESTS). The man's mesh is kept as `u`.
|
|
16
|
+
*/
|
|
17
|
+
export declare const retarget: (s: Skin, build: number) => Skin;
|
|
18
|
+
/** How far out the woman's bust stands at its fullest, on the man's rest mesh, metres. */
|
|
19
|
+
export declare const BUST = 0.028;
|
|
20
|
+
/** Where it is fullest, metres up (the user, 2026-11-11: a little higher; it was 1.345). */
|
|
21
|
+
export declare const BUST_Y = 1.37;
|
|
22
|
+
/** How much larger her eyes are than his. */
|
|
23
|
+
export declare const EYES = 0.09;
|
|
24
|
+
export declare const generate: (lod: number, build: number, xeno?: boolean) => Skin;
|
|
25
|
+
export declare const skins: Skin[];
|
|
26
|
+
/**
|
|
27
|
+
* The skin at a level of detail: 0 far, 1 near (see DETAIL in mesh.ts), 2 near, headless, for the
|
|
28
|
+
* eye, 3 close (CLOSE in render.ts), twice the rings and half more sides, the face carved finest.
|
|
29
|
+
* Only the far one has hands, mittens: the others end at the wrists, where hands() goes. Built once.
|
|
30
|
+
*/
|
|
31
|
+
export declare const body: (lod: number, build?: number) => Skin;
|
|
32
|
+
/** The xenomorph's skin at a level of detail, as body()'s: on the man's joints and binds, no face. */
|
|
33
|
+
export declare const beast: (lod: number) => Skin;
|
|
34
|
+
/** Per LIMB the joint the centre of its cut face hangs on. */
|
|
35
|
+
export declare const ROOT: number[];
|
|
36
|
+
/**
|
|
37
|
+
* The skin less a limb, and the limb alone. The edges of the limb's triangles whose other side is
|
|
38
|
+
* the body's are the cut; a fan from one new vertex at its middle closes each side in CAP.
|
|
39
|
+
*/
|
|
40
|
+
export declare const sever: (s: Skin, limb: number) => Skin[];
|
|
41
|
+
export declare const parts: Skin[][];
|
|
42
|
+
/**
|
|
43
|
+
* The skin at a level of detail without the LIMB `limb`, then the limb alone, each closed by a
|
|
44
|
+
* glowing cut face whose middle is the last vertex of the last triangle. Built once.
|
|
45
|
+
*/
|
|
46
|
+
export declare const cut: (lod: number, limb: number, build?: number) => Skin[];
|
|
47
|
+
/** Per BUILD the joints' places at rest, the skin's two swing joints (the shoulders') last. */
|
|
48
|
+
export declare const BINDS: Vec3[][];
|
|
49
|
+
/** A build's joints at rest (solve() of its rest pose), for what is placed on its body. */
|
|
50
|
+
export declare const bindOf: (build?: number) => Vec3[];
|
|
51
|
+
/**
|
|
52
|
+
* The upper arm of shoulder joint `j` in the world without its turn about itself: the swing of
|
|
53
|
+
* its rotation from the collarbone's, about the bone's rest axis, on the collarbone's.
|
|
54
|
+
*/
|
|
55
|
+
export declare const swing: (rot: Quat[], j: number, build?: number) => Quat;
|
|
56
|
+
/** The inside of an open mouth. */
|
|
57
|
+
export declare const MOUTH: number[];
|
|
58
|
+
/**
|
|
59
|
+
* The posed vertices `r` lists (Q) relaxed: drawn toward the mean of their neighbours, the
|
|
60
|
+
* shrinking undone every other pass (Taubin), then their normals the area-weighted mean of their
|
|
61
|
+
* triangles' again.
|
|
62
|
+
*/
|
|
63
|
+
export declare const relax: (s: Skin, r: NonNullable<Skin["r"]>) => void;
|
|
64
|
+
/** relax()'s moved places, kept from call to call. */
|
|
65
|
+
export declare let MOVED: Float32Array<ArrayBuffer>;
|
|
66
|
+
/** Per joint the dual quaternion that carries the rest pose to the pose: the rotation, then its dual. */
|
|
67
|
+
export declare const D: Float64Array<ArrayBuffer>;
|
|
68
|
+
export declare const E: Float64Array<ArrayBuffer>;
|
|
69
|
+
export declare let Q: Float32Array<ArrayBuffer>;
|
|
70
|
+
/** The rest mesh with the face's channels added. */
|
|
71
|
+
export declare let R: Float32Array<ArrayBuffer>;
|
|
72
|
+
/** The palette regions that are bare skin: the shader's skin pass (SKIN_LAYER) takes them. */
|
|
73
|
+
export declare const BARE_REGIONS: number[];
|
|
74
|
+
/**
|
|
75
|
+
* The dual quaternions that carry the rest pose of the skin `s` to the pose, joint by joint and
|
|
76
|
+
* then its two swings (the shoulders'): eight numbers each, the rotation then its dual.
|
|
77
|
+
*/
|
|
78
|
+
export declare const duals: (s: Skin, { pos, rot }: {
|
|
79
|
+
pos: Vec3[];
|
|
80
|
+
rot: Quat[];
|
|
81
|
+
}) => Float64Array<ArrayBuffer>;
|
|
82
|
+
/**
|
|
83
|
+
* Where skin() puts the middle of the cut face of a skin cut() made, in the pose `pose`: its last
|
|
84
|
+
* vertex, which hangs on one joint alone (sever()). The shader draws the skin, so nothing on the
|
|
85
|
+
* CPU reads it back from the frame.
|
|
86
|
+
*/
|
|
87
|
+
export declare const capOf: (s: Skin, { pos, rot }: {
|
|
88
|
+
pos: Vec3[];
|
|
89
|
+
rot: Quat[];
|
|
90
|
+
}) => Vec3;
|
|
91
|
+
/** The palette `colors` as the face `face` shows it: the line between the lips dark as the mouth opens (the teeth are pieces of their own, close). */
|
|
92
|
+
export declare const mouthed: (colors: number[][], face?: ArrayLike<number>) => number[][];
|
|
93
|
+
/**
|
|
94
|
+
* Appends the skin in the pose `solved` (see solve()) to `out` as triangles in the renderer's
|
|
95
|
+
* vertex format, each in its palette colour: a vertex goes where the two joints it hangs on would
|
|
96
|
+
* carry it, their dual quaternions mixed by the weights (so a bent joint keeps its thickness), its
|
|
97
|
+
* normal turned the same way.
|
|
98
|
+
*/
|
|
99
|
+
export declare const skin: (out: Out, s: Skin, { pos, rot }: {
|
|
100
|
+
pos: Vec3[];
|
|
101
|
+
rot: Quat[];
|
|
102
|
+
}, colors: number[][], face?: ArrayLike<number>) => void;
|
|
@@ -1,179 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
/** The regions a runner's outfit is recoloured or covered by: the skin, the trousers, the boots, the gloves, the stripes and the belt. */
|
|
6
|
-
export declare const REGION: {
|
|
7
|
-
FLESH: number;
|
|
8
|
-
PANTS: number;
|
|
9
|
-
UPPER: number;
|
|
10
|
-
GLOVE: number;
|
|
11
|
-
STRIPE: number;
|
|
12
|
-
STRIPE_LOW: number;
|
|
13
|
-
BELT: number;
|
|
14
|
-
HAIR: number;
|
|
15
|
-
JACKET: number;
|
|
16
|
-
TRIM: number;
|
|
17
|
-
SOLE: number;
|
|
18
|
-
CAP: number;
|
|
19
|
-
};
|
|
20
|
-
/** The palette's colours that glow, unlit (the eyes' specks, a cut's face), and its size. */
|
|
21
|
-
export declare const UNLIT: number[], COLOURS: number;
|
|
22
|
-
/** A hair colour for the runner `id`, picked at random from HAIRS but the same for everyone who sees him; his haircut (`c.hair`, look.ts) says whether he is shaved. */
|
|
23
|
-
export declare const hairOf: (id: number, c?: Choice) => number[];
|
|
24
|
-
/** The hair colour of the woman `id`: as hairOf(), never the shaved head's (her hair is a style of hair.ts). */
|
|
25
|
-
export declare const tressOf: (id: number, c?: Choice) => number[];
|
|
26
|
-
/** How dark the shaved beard of the runner `id` is, 0 (none) to 1. */
|
|
27
|
-
export declare const beardOf: (id: number) => number;
|
|
28
|
-
/** Whether the runner `id` has a shaved head (the last of HAIRS): no hair to give a length to. */
|
|
29
|
-
export declare const shaved: (id: number, c?: Choice) => boolean;
|
|
30
|
-
/** An iris colour for the runner `id`, as hairOf(). */
|
|
31
|
-
export declare const eyesOf: (id: number, c?: Choice) => number[];
|
|
32
|
-
/** Jacket, its darker trim, trousers (the suit's legs, darker), skin, hair, boots, sole, gloves, the whites of the eyes and their irises, the lips, the skin in its folds (nostrils, the mouth, the ears' hollows), the brows, between the hair and the skin, the shaved beard's shadow and its edge, the line between the lips (as the folds), the side stripe on the jacket and on the trousers and the belt (the jacket's and the trousers' own colours but on a space suit), the light caught in the eyes, which glows, and the cut's cauterized face, which glows too. */
|
|
33
|
-
/**
|
|
34
|
-
* With `suit` (the moon's, the user 2026-11-10), a dark grey space suit under white armour: the
|
|
35
|
-
* team's colour only in a stripe down each side, black gloves, boots and belt. Then the pupils,
|
|
36
|
-
* the lashes, the cheeks' flush and the teeth. `tone` is the skin's (toneOf()), `beard` how dark
|
|
37
|
-
* the shaved beard is on it, 0 to 1. `fem` (the woman's): redder lips, darker lashes.
|
|
38
|
-
*/
|
|
39
|
-
export declare const palette: (jacket: number[], hair?: number[], eyes?: number[], suit?: boolean, tone?: number[], beard?: number, fem?: boolean) => number[][];
|
|
40
|
-
/** The ring where a sleeve ends in the glove, which body.ts starts the palm on, and its sides: the close ones (the eye's body is close), and the near ones. A thin wrist (3.2 cm until the user, 2026-11-09). */
|
|
41
|
-
export declare const CUFF: number[];
|
|
42
|
-
export declare const CUFF_SIDES: number;
|
|
43
|
-
export declare const CUFF_NEAR: number;
|
|
44
|
-
/**
|
|
45
|
-
* The jaw line by the angle from the front: under the chin, low along the jaw to its angle a little
|
|
46
|
-
* in front of the ear, then straight up behind it to under the ear (the user, 2026-11-14: an angle
|
|
47
|
-
* before it rises to the ears), then the base of the skull behind; and how wide the blend from the
|
|
48
|
-
* neck to the head is there, sharp under the jaw, soft at the nape.
|
|
49
|
-
*/
|
|
50
|
-
export declare const jaw: (aq: number) => number[];
|
|
51
|
-
/**
|
|
52
|
-
* A point of the man's skull at rest, `a` radians round it from the front (+ toward +x) at height
|
|
53
|
-
* `y`, `off` metres out of it along its normal: what hair.ts lays a woman's hair on.
|
|
54
|
-
*/
|
|
55
|
-
export declare const scalp: (a: number, y: number, off?: number) => Vec3;
|
|
56
|
-
/** The crown of the man's head at rest, metres. */
|
|
57
|
-
export declare const TOP = 1.803;
|
|
58
|
-
/** The woman's: a higher, rounder forehead, no sideburn, clear of the ear, a higher nape. hair.ts lays her styles down to it. */
|
|
59
|
-
export declare const HAIRLINE_F: number[][];
|
|
60
|
-
/** The rest mesh: per vertex a position and a normal, two joints and the weight of the second. */
|
|
61
|
-
export interface Skin {
|
|
62
|
-
v: Float32Array;
|
|
63
|
-
j: Uint8Array;
|
|
64
|
-
w: Float32Array;
|
|
65
|
-
/** Three vertex indices per triangle, and the palette colour of each of its corners: the colour blends across it. */
|
|
66
|
-
t: Uint16Array;
|
|
67
|
-
c: Uint8Array;
|
|
68
|
-
/** Per vertex the light it gets, 1 in the open and less in another part's shadow. */
|
|
69
|
-
o: Float32Array;
|
|
70
|
-
/** Per triangle the LIMB it comes off with, NONE for the trunk's. */
|
|
71
|
-
l?: Uint8Array;
|
|
72
|
-
/** Per corner a second palette colour and how much of it is blended into the first. */
|
|
73
|
-
c2: Uint8Array;
|
|
74
|
-
cm: Float32Array;
|
|
75
|
-
/** Per vertex the KIND of part it is (features.ts). */
|
|
76
|
-
g: Uint8Array;
|
|
77
|
-
/** The BUILD it is (rig.ts), the man's when absent; and, for another, the man's rest mesh it was made from, as `v`: the armour's regions are written on him. */
|
|
78
|
-
b?: number;
|
|
79
|
-
u?: Float32Array;
|
|
80
|
-
/**
|
|
81
|
-
* Per channel (CH in features.ts) the vertices it moves and, six floats each, how far at full
|
|
82
|
-
* weight: the position's shift, then the normal's. skin() adds them to the rest mesh.
|
|
83
|
-
*/
|
|
84
|
-
m: {
|
|
85
|
-
i: Uint16Array;
|
|
86
|
-
d: Float32Array;
|
|
87
|
-
}[];
|
|
88
|
-
/**
|
|
89
|
-
* The eye's own body only: the vertices round its shoulders that skin() relaxes once posed, how
|
|
90
|
-
* much (0 to 1), and per each (offsets into the lists) its neighbours and its triangles.
|
|
91
|
-
*/
|
|
92
|
-
r?: {
|
|
93
|
-
k: Uint32Array;
|
|
94
|
-
g: Float32Array;
|
|
95
|
-
no: Uint32Array;
|
|
96
|
-
n: Uint32Array;
|
|
97
|
-
to: Uint32Array;
|
|
98
|
-
t: Uint32Array;
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
/** How far out the face is (its z) at x across, height y: the carved surface, found by halving. */
|
|
102
|
-
export declare const onHead: (x: number, y: number) => number;
|
|
103
|
-
/** The exponent of the dome's sections, 2 an ellipse: over it, a flatter top and fuller corners (the user, 2026-11-24: flatten the top a little, no egg). */
|
|
104
|
-
export declare const CREST_E = 2.5;
|
|
105
|
-
/**
|
|
106
|
-
* How much larger its head is than it was drawn (the user, 2026-11-16: a bigger head, 2026-11-24:
|
|
107
|
-
* a little bigger still), about the head joint: the dome here (CREST), the face's pieces in xeno.ts (grow()).
|
|
108
|
-
*/
|
|
109
|
-
export declare const HEAD_K = 1.2;
|
|
110
|
-
/** And how much narrower (the user, 2026-11-16: less round, the sides in), across it alone. */
|
|
111
|
-
export declare const HEAD_X = 0.78;
|
|
112
|
-
/** The dome's length behind the face's edge, metres, before the head is grown. */
|
|
113
|
-
export declare const CREST_LEN: number;
|
|
114
|
-
/**
|
|
115
|
-
* The dome's section `z` behind the face's edge (0 to PROFILE[0]), in the rest pose: its centre's
|
|
116
|
-
* height, half width and half height (a superellipse of exponent CREST_E). xeno.ts lays its hoses on it.
|
|
117
|
-
*/
|
|
118
|
-
export declare const domeAt: (z: number) => [number, number, number];
|
|
119
|
-
/**
|
|
120
|
-
* How the dome's section changes a metre behind the face's edge, over its first strip, before the
|
|
121
|
-
* head is grown: its centre's height, half width and half height. The face's rim takes its normal
|
|
122
|
-
* from it (skull() in xeno.ts).
|
|
123
|
-
*/
|
|
124
|
-
export declare const RIM: number[];
|
|
125
|
-
/** How far out the woman's bust stands at its fullest, on the man's rest mesh, metres. */
|
|
126
|
-
export declare const BUST = 0.028;
|
|
127
|
-
/** Where it is fullest, metres up (the user, 2026-11-11: a little higher; it was 1.345). */
|
|
128
|
-
export declare const BUST_Y = 1.37;
|
|
129
|
-
/**
|
|
130
|
-
* The skin at a level of detail: 0 far, 1 near (see DETAIL in mesh.ts), 2 near, headless, for the
|
|
131
|
-
* eye, 3 close (CLOSE in render.ts), twice the rings and half more sides, the face carved finest.
|
|
132
|
-
* Only the far one has hands, mittens: the others end at the wrists, where hands() goes. Built once.
|
|
133
|
-
*/
|
|
134
|
-
export declare const body: (lod: number, build?: number) => Skin;
|
|
135
|
-
/** The xenomorph's skin at a level of detail, as body()'s: on the man's joints and binds, no face. */
|
|
136
|
-
export declare const beast: (lod: number) => Skin;
|
|
137
|
-
/**
|
|
138
|
-
* The skin at a level of detail without the LIMB `limb`, then the limb alone, each closed by a
|
|
139
|
-
* glowing cut face whose middle is the last vertex of the last triangle. Built once.
|
|
140
|
-
*/
|
|
141
|
-
export declare const cut: (lod: number, limb: number, build?: number) => Skin[];
|
|
142
|
-
/** A build's joints at rest (solve() of its rest pose), for what is placed on its body. */
|
|
143
|
-
export declare const bindOf: (build?: number) => Vec3[];
|
|
144
|
-
/**
|
|
145
|
-
* The upper arm of shoulder joint `j` in the world without its turn about itself: the swing of
|
|
146
|
-
* its rotation from the collarbone's, about the bone's rest axis, on the collarbone's.
|
|
147
|
-
*/
|
|
148
|
-
export declare const swing: (rot: Quat[], j: number, build?: number) => Quat;
|
|
149
|
-
/** The palette regions that are bare skin: the shader's skin pass (SKIN_LAYER) takes them. */
|
|
150
|
-
export declare const BARE_REGIONS: number[];
|
|
151
|
-
/**
|
|
152
|
-
* The dual quaternions that carry the rest pose of the skin `s` to the pose, joint by joint and
|
|
153
|
-
* then its two swings (the shoulders'): eight numbers each, the rotation then its dual.
|
|
154
|
-
*/
|
|
155
|
-
export declare const duals: (s: Skin, { pos, rot }: {
|
|
156
|
-
pos: Vec3[];
|
|
157
|
-
rot: Quat[];
|
|
158
|
-
}) => Float64Array<ArrayBuffer>;
|
|
159
|
-
/**
|
|
160
|
-
* Where skin() puts the middle of the cut face of a skin cut() made, in the pose `pose`: its last
|
|
161
|
-
* vertex, which hangs on one joint alone (sever()). The shader draws the skin, so nothing on the
|
|
162
|
-
* CPU reads it back from the frame.
|
|
163
|
-
*/
|
|
164
|
-
export declare const capOf: (s: Skin, { pos, rot }: {
|
|
165
|
-
pos: Vec3[];
|
|
166
|
-
rot: Quat[];
|
|
167
|
-
}) => Vec3;
|
|
168
|
-
/** The palette `colors` as the face `face` shows it: the line between the lips dark as the mouth opens (the teeth are pieces of their own, close). */
|
|
169
|
-
export declare const mouthed: (colors: number[][], face?: ArrayLike<number>) => number[][];
|
|
170
|
-
/**
|
|
171
|
-
* Appends the skin in the pose `solved` (see solve()) to `out` as triangles in the renderer's
|
|
172
|
-
* vertex format, each in its palette colour: a vertex goes where the two joints it hangs on would
|
|
173
|
-
* carry it, their dual quaternions mixed by the weights (so a bent joint keeps its thickness), its
|
|
174
|
-
* normal turned the same way.
|
|
175
|
-
*/
|
|
176
|
-
export declare const skin: (out: Out, s: Skin, { pos, rot }: {
|
|
177
|
-
pos: Vec3[];
|
|
178
|
-
rot: Quat[];
|
|
179
|
-
}, colors: number[][], face?: ArrayLike<number>) => void;
|
|
1
|
+
export * from './skin/head';
|
|
2
|
+
export * from './skin/lofts';
|
|
3
|
+
export * from './skin/shape';
|
|
4
|
+
export * from './skin/pose';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Choice, PlayerState, Rover } from '../../shared/types';
|
|
2
|
+
import type { World } from '../../shared/world';
|
|
3
|
+
import type { Tracer } from '../beams';
|
|
4
|
+
import type { Vec3 } from '../mesh';
|
|
5
|
+
import { solve } from '../rig';
|
|
6
|
+
import type { Pose } from '../rig';
|
|
7
|
+
import type { Runner } from './types';
|
|
8
|
+
/** A blow taken: seconds it lasts, and how far it throws the head and the chest back (radians). */
|
|
9
|
+
export declare const FLINCH: number[];
|
|
10
|
+
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;
|
|
11
|
+
/** The pose with the right arm `k` of the way to holding the gun's grip at `grip`, its axes `ax` (aimed(), shouldered()). */
|
|
12
|
+
export declare const lifted: (pose: Pose, s: ReturnType<typeof solve>, [grip, ax]: [Vec3, Vec3[]], k: number, kind?: number) => Pose;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { PlayerState } from '../../shared/types';
|
|
2
|
+
import type { Vec3 } from '../mesh';
|
|
3
|
+
import { solve } from '../rig';
|
|
4
|
+
import type { Pose } from '../rig';
|
|
5
|
+
import type { Runner } from './types';
|
|
6
|
+
/**
|
|
7
|
+
* A long gun's butt plate in the hollow of the right shoulder: from the shoulder joint, in the
|
|
8
|
+
* chest's frame (to its right, up, back). The gun goes from there along the look, so it is
|
|
9
|
+
* shouldered whatever the pitch (the user, 2026-11-10: it hung across the belly).
|
|
10
|
+
*/
|
|
11
|
+
export declare const POCKET: Vec3;
|
|
12
|
+
export declare const ease: (v: number) => number;
|
|
13
|
+
/** How far a runner has his long gun down to the low ready, 0 to 1: in a sprint, when he is not firing. */
|
|
14
|
+
export declare const lowered: (r: Runner) => number;
|
|
15
|
+
/**
|
|
16
|
+
* The pose `from` (solved: `s0`) with the runner's long gun in both hands: the butt in the right
|
|
17
|
+
* shoulder, the barrel along the look (at the shot while it fires) or down and across at the low
|
|
18
|
+
* ready of a sprint, the left hand on its front grip. The trunk turns about the vertical behind
|
|
19
|
+
* the gun until the left arm reaches its grip bent (BENT), and leans with the barrel's pitch; the
|
|
20
|
+
* head stays on the look.
|
|
21
|
+
*/
|
|
22
|
+
export declare const carried: (from: Pose, s0: ReturnType<typeof solve>, r: Runner) => Pose;
|
|
23
|
+
/**
|
|
24
|
+
* The pose with the katana in both hands: in the guard, or in a cut, which is the first person's cut
|
|
25
|
+
* seen from the runner's eye (the share `e` of it, so that it is drawn from the guard and back to
|
|
26
|
+
* it), and the trunk twisting, bending and leaning through it (trunk()).
|
|
27
|
+
*/
|
|
28
|
+
export declare const brandish: (from: Pose, p: PlayerState, prog: number, ph: number, t?: number, parry?: number, oneHand?: boolean) => Pose;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PlayerState } from '../../shared/types';
|
|
2
|
+
import type { Vec3 } from '../mesh';
|
|
3
|
+
/** How fast the dash streaks grow and fade, 1 / s. */
|
|
4
|
+
export declare const DASH_RATE = 14;
|
|
5
|
+
/** The neck a xenomorph bit the head off (LIMB.EATEN): raw, dark red where a katana's cut glows. */
|
|
6
|
+
export declare const RAW: number[];
|
|
7
|
+
/** A point 30 m along the look of `p`, for a runner that has not shot yet. */
|
|
8
|
+
export declare const far: (p: PlayerState) => Vec3;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Vec3 } from '../mesh';
|
|
2
|
+
import type { Quat } from '../rig';
|
|
3
|
+
import type { Pieces } from '../store';
|
|
4
|
+
import type { Out } from '../verts';
|
|
5
|
+
import type { Runner } from './types';
|
|
6
|
+
/** Draws the runner and gives back its solved skeleton, or nothing once a bolt has burnt it away. */
|
|
7
|
+
export declare const soldier: (out: Out, r: Runner, color: number[], lod?: number, helmets?: boolean, armored?: boolean,
|
|
8
|
+
/** The frame's pieces of the store: the rigid ones go there (store.ts), but on one coming apart. */
|
|
9
|
+
list?: Pieces) => {
|
|
10
|
+
pos: Vec3[];
|
|
11
|
+
rot: Quat[];
|
|
12
|
+
} | undefined;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { PlayerState } from '../../shared/types';
|
|
2
|
+
import type { Seat } from '../gait';
|
|
3
|
+
import type { Vec3 } from '../mesh';
|
|
4
|
+
import type { Out } from '../verts';
|
|
5
|
+
import type { Runner } from './types';
|
|
6
|
+
/** A dash trails three streaks: thin glowing (layer -2) spikes, a pair of crossed triangles each. */
|
|
7
|
+
export declare const streaks: (out: Out, r: Runner, color: number[], at: (v: Vec3) => Vec3) => void;
|
|
8
|
+
/** Whether the runner is at a rover's wheel: unarmed, his weapons put away. */
|
|
9
|
+
export declare const driving: (r: Pick<Runner, "p" | "seat">) => boolean;
|
|
10
|
+
/** How fast a hand closes or opens, 1 / s. */
|
|
11
|
+
export declare const CLOSE = 14;
|
|
12
|
+
/**
|
|
13
|
+
* How closed the hands of `p` are, left then right (hand() in body.ts: 0 flat, 0.9 round a grip, 1
|
|
14
|
+
* a fist), as the own body closes its own: round what they hold and on the wheel, fists with
|
|
15
|
+
* nothing in them (the guard), a loose fist on a run, tighter at a sprint, open in the air, flat
|
|
16
|
+
* on a ledge, a wall or the floor, limp lying down.
|
|
17
|
+
*/
|
|
18
|
+
export declare const grasp: (p: PlayerState, seat?: Seat, hunter?: boolean) => number[];
|
|
19
|
+
/** Seconds a runner the rail gun's bolt put down takes to come apart. */
|
|
20
|
+
export declare const FRY = 0.9;
|
|
21
|
+
/** How far a runner has come apart, 0 (whole, or not fried) to 1 (gone). */
|
|
22
|
+
export declare const fried: (p: PlayerState) => number;
|
|
23
|
+
/**
|
|
24
|
+
* The triangles of `out` from `from` coming apart `k` of the way (0 to 1): they glow violet white
|
|
25
|
+
* at once, each drifts up and out on its own, and goes when `k` passes its own share, so the body
|
|
26
|
+
* thins to nothing.
|
|
27
|
+
*/
|
|
28
|
+
export declare const dissolve: (out: Out, from: number, k: number) => void;
|