@korial29/tiny-fps 0.181.1 → 0.182.1
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 +45 -36
- package/dist/types/client/armor.d.ts +7 -6
- package/dist/types/client/flesh.d.ts +3 -1
- package/dist/types/client/mesh.d.ts +15 -0
- package/dist/types/client/skin.d.ts +7 -0
- package/dist/types/client/store.d.ts +2 -0
- package/dist/types/client/textures.d.ts +10 -0
- package/dist/types/client/xeno.d.ts +6 -6
- package/package.json +1 -1
|
@@ -164,16 +164,17 @@ export declare const BELT: {
|
|
|
164
164
|
* The chest plate's armholes (the user, 2026-11-12: a triangle came through the plate under the
|
|
165
165
|
* armpit; 2026-11-13: small triangles on its sides): the shoulder's skin stands out of the trunk's
|
|
166
166
|
* at the split (1.41 m, skin.ts), and a plate's edge across the two was cut in steps. Its top falls
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
*
|
|
171
|
-
* see TURN in cook().
|
|
167
|
+
* from the neckline's to `low` between the two angles `a`, in one round curve with no corner at
|
|
168
|
+
* either end (the user, 2026-11-17: it fell in two steps, a block and a ledge with walls under the
|
|
169
|
+
* bell), steep enough to be under the split before the shoulder's skin starts (52 degrees). The
|
|
170
|
+
* shoulder's bell (pads.ts) is over what is left bare. The breach that ran across the plate by the
|
|
171
|
+
* armpits (2026-11-13) was the rim of the arm's hole in the trunk's skin: see TURN in cook().
|
|
172
172
|
*/
|
|
173
173
|
export declare const ARMPIT: {
|
|
174
174
|
a: number[];
|
|
175
|
-
y: number;
|
|
176
175
|
low: number;
|
|
176
|
+
round: number[];
|
|
177
|
+
r: number;
|
|
177
178
|
};
|
|
178
179
|
/** 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
180
|
export declare const BLADE: {
|
|
@@ -47,6 +47,21 @@ export declare const CARD_BASE: number, CARD_STEP: number;
|
|
|
47
47
|
* to a -1 corner blends. The CPU's skin (the own body, a runner coming apart) stays at -1.
|
|
48
48
|
*/
|
|
49
49
|
export declare const SKIN_LAYER = -1.06;
|
|
50
|
+
/**
|
|
51
|
+
* The xenomorph's chitin (the user, 2026-11-16: a texture), on its rest place: a shell of small
|
|
52
|
+
* plates with fine seams, a grain, a mottled tone and a wet gloss that varies over it. Its rigid
|
|
53
|
+
* pieces and its skin; not its tail, drawn in the world's frame each frame (it would swim on it).
|
|
54
|
+
* Within SHINE's band of the shader (0.1 round it): it takes polished metal's sky reflection, a
|
|
55
|
+
* blue sheen under a blue sky (the user, 2026-11-16: keep it).
|
|
56
|
+
*/
|
|
57
|
+
export declare const CHITIN = -1.17;
|
|
58
|
+
/**
|
|
59
|
+
* Its striated tubes (the user, 2026-11-16: dark ringed pipes, "the render is top"): rings of
|
|
60
|
+
* grooves round a tube. Its red carries how far along the tube the point is, metres, not a colour
|
|
61
|
+
* (tubed() in xeno.ts); the shader paints its own grey (the user: lighter, to show), with little
|
|
62
|
+
* of SHINE's sheen, whose band it is in.
|
|
63
|
+
*/
|
|
64
|
+
export declare const TUBE = -1.19;
|
|
50
65
|
/**
|
|
51
66
|
* Camera axes [right, up, forward]: forward is (-sin yaw cos pitch, sin pitch, -cos yaw cos pitch),
|
|
52
67
|
* y up at roll 0. A positive roll leans the camera right: up tilts toward right.
|
|
@@ -100,6 +100,13 @@ export interface Skin {
|
|
|
100
100
|
}
|
|
101
101
|
/** How far out the face is (its z) at x across, height y: the carved surface, found by halving. */
|
|
102
102
|
export declare const onHead: (x: number, y: number) => number;
|
|
103
|
+
/**
|
|
104
|
+
* How much larger its head is than it was drawn (the user, 2026-11-16: a bigger head), about the
|
|
105
|
+
* head joint: the dome here (CREST), the face's pieces in xeno.ts (grow()).
|
|
106
|
+
*/
|
|
107
|
+
export declare const HEAD_K = 1.12;
|
|
108
|
+
/** And how much narrower (the user, 2026-11-16: less round, the sides in), across it alone. */
|
|
109
|
+
export declare const HEAD_X = 0.86;
|
|
103
110
|
/**
|
|
104
111
|
* The dome's section `z` behind the face's edge (0 to PROFILE[0]), in the rest pose: its centre's
|
|
105
112
|
* height, half width and half height (an ellipse). xeno.ts lays its veins on it.
|
|
@@ -40,6 +40,8 @@ export interface Flesh {
|
|
|
40
40
|
accent?: number[];
|
|
41
41
|
/** The runner's id: the marks of his skin (moles, freckles, scars) in the shader. */
|
|
42
42
|
seed?: number;
|
|
43
|
+
/** The xenomorph's skin: its chitin (CHITIN in mesh.ts). */
|
|
44
|
+
chitin?: boolean;
|
|
43
45
|
}
|
|
44
46
|
/** What the vertex shader reads by texel (flesh.ts): four floats each, 2048 a row. */
|
|
45
47
|
export declare let data: Float32Array<ArrayBuffer>;
|
|
@@ -4,3 +4,13 @@ export declare const LAYERS: number;
|
|
|
4
4
|
export declare const hash: (x: number, y: number, s: number) => number;
|
|
5
5
|
/** All layers, RGBA, layer after layer, rows top to bottom: the upload of a texture array. */
|
|
6
6
|
export declare const textures: () => Uint8ClampedArray;
|
|
7
|
+
/** The chitin's plates (CHITIN): cells across its 3D texture, which repeats; texels across a cell. */
|
|
8
|
+
export declare const PLATES: number, PLATE_TEXELS: number;
|
|
9
|
+
/**
|
|
10
|
+
* The xenomorph's chitin plates, worked out once (the user, 2026-11-16: in a texture, to cost the
|
|
11
|
+
* GPU less; the shader read 27 cells a pixel): a cube of PLATES cells a side, a jittered point in
|
|
12
|
+
* each, wrapping round; each texel how far it is from the edge between its two nearest points (the
|
|
13
|
+
* second's distance less the first's, in cells, 1 at most) times 255. Its V down to an edge is the
|
|
14
|
+
* groove's crisp line, so PLATE_TEXELS keeps it under a millimetre wide.
|
|
15
|
+
*/
|
|
16
|
+
export declare const plates: () => Uint8Array;
|
|
@@ -108,12 +108,6 @@ export declare const metatarsal: (out: Out, at: Vec3, q: Quat, lod: number) => v
|
|
|
108
108
|
export declare const toes: (out: Out, at: Vec3, q: Quat, lod: number) => void;
|
|
109
109
|
/** Its tendons on a shin joint: the heel's cord down the back of the shin, and one down each side of its front. */
|
|
110
110
|
export declare const sinews: (out: Out, at: Vec3, q: Quat, lod: number) => void;
|
|
111
|
-
/**
|
|
112
|
-
* Its rib cage on the chest joint, standing out of a starved trunk in a lighter chitin: five pairs of ribs from the
|
|
113
|
-
* spine round to the breastbone, each sloping down toward the front, the lower ones shorter, and
|
|
114
|
-
* the keel of the breastbone down the middle. Each row: the height at the spine, the half width and
|
|
115
|
-
* the half depth of the arch (a hair outside the skin's).
|
|
116
|
-
*/
|
|
117
111
|
export declare const ribs: (out: Out, at: Vec3, q: Quat, lod: number, low?: boolean) => void;
|
|
118
112
|
/**
|
|
119
113
|
* Its collarbones on the chest joint (the user, 2026-11-15: standing out, an exoskeleton), in the
|
|
@@ -169,6 +163,12 @@ export declare const teeth: (out: Out, head: Vec3, q: Quat, lod: number) => void
|
|
|
169
163
|
* the back, with a short branch off each; one along each side of the top. Half sunk in the skin.
|
|
170
164
|
*/
|
|
171
165
|
export declare const veins: (out: Out, head: Vec3, q: Quat, lod: number) => void;
|
|
166
|
+
/**
|
|
167
|
+
* Striated tubes blended into the sides of its dome (the user, 2026-11-16), on the head joint: two
|
|
168
|
+
* each side running back from behind the face along the banana's lower flank, half sunk in it and
|
|
169
|
+
* sinking wholly at both ends.
|
|
170
|
+
*/
|
|
171
|
+
export declare const hoses: (out: Out, head: Vec3, q: Quat, lod: number) => void;
|
|
172
172
|
/** Its eyes, glowing slits at the back of the orbits in the team's `color`. */
|
|
173
173
|
export declare const eyes: (out: Out, head: Vec3, q: Quat, color: number[], lod?: number) => void;
|
|
174
174
|
/** A rigid piece made at the origin of its joint's frame, then only placed (store.ts). */
|
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.182.1",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist"
|