@korial29/tiny-fps 0.161.0 → 0.162.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.
|
@@ -28,7 +28,8 @@ export declare const tress: (style: number, fine: boolean) => Float32Array<Array
|
|
|
28
28
|
export declare const sway: (phase: number, speed: number, t: number) => Vec3;
|
|
29
29
|
/**
|
|
30
30
|
* The hair of `style` seen close, at rest in the head's frame, in the store's vertex format with,
|
|
31
|
-
* in place of a colour, how light, how free (swayOf()), the layer and
|
|
31
|
+
* in place of a colour, how light, how free (swayOf()), the layer and how far along (a card's
|
|
32
|
+
* root 0 to tip 1; below -1 the underlayer, -1 - how far down to its hem): first the shell,
|
|
32
33
|
* drawn in a little and dark, the cards' underlayer (it fills what they leave, a phase of -1: it
|
|
33
34
|
* only swings), then the cards (makeCards()). The store keeps it (hair()), and so does the CPU.
|
|
34
35
|
*/
|
|
@@ -40,6 +40,13 @@ export declare const HAIR_ROOT: number, HAIR_SPAN: number;
|
|
|
40
40
|
* to coverage, and the depth passes leave it out.
|
|
41
41
|
*/
|
|
42
42
|
export declare const CARD_BASE: number, CARD_STEP: number;
|
|
43
|
+
/**
|
|
44
|
+
* The layer of bare skin posed by the shader (flesh.ts): lit like -1 (it falls in -1's band of
|
|
45
|
+
* the shader's SPEC row), plus the skin pass on its rest place: pores and grain, mottling, a soft
|
|
46
|
+
* terminator that runs red, an oily sheen. Between -1 and SKIN_LAYER the pass fades in, so an edge
|
|
47
|
+
* to a -1 corner blends. The CPU's skin (the own body, a runner coming apart) stays at -1.
|
|
48
|
+
*/
|
|
49
|
+
export declare const SKIN_LAYER = -1.06;
|
|
43
50
|
/**
|
|
44
51
|
* Camera axes [right, up, forward]: forward is (-sin yaw cos pitch, sin pitch, -cos yaw cos pitch),
|
|
45
52
|
* y up at roll 0. A positive roll leans the camera right: up tilts toward right.
|
|
@@ -113,6 +113,8 @@ export declare const body: (lod: number, build?: number) => Skin;
|
|
|
113
113
|
export declare const cut: (lod: number, limb: number, build?: number) => Skin[];
|
|
114
114
|
/** A build's joints at rest (solve() of its rest pose), for what is placed on its body. */
|
|
115
115
|
export declare const bindOf: (build?: number) => Vec3[];
|
|
116
|
+
/** The palette regions that are bare skin: the shader's skin pass (SKIN_LAYER) takes them. */
|
|
117
|
+
export declare const BARE_REGIONS: number[];
|
|
116
118
|
/**
|
|
117
119
|
* The dual quaternions that carry the rest pose of the skin `s` to the pose, joint by joint and
|
|
118
120
|
* then its two swings (the shoulders'): eight numbers each, the rotation then its dual.
|
|
@@ -36,6 +36,8 @@ export interface Flesh {
|
|
|
36
36
|
face: Float32Array;
|
|
37
37
|
plate?: number[];
|
|
38
38
|
accent?: number[];
|
|
39
|
+
/** The runner's id: the marks of his skin (moles, freckles, scars) in the shader. */
|
|
40
|
+
seed?: number;
|
|
39
41
|
}
|
|
40
42
|
/** What the vertex shader reads by texel (flesh.ts): four floats each, 2048 a row. */
|
|
41
43
|
export declare let data: Float32Array<ArrayBuffer>;
|
|
@@ -56,7 +58,7 @@ export declare const ID: Quat;
|
|
|
56
58
|
export declare const ORIGIN: Vec3;
|
|
57
59
|
/**
|
|
58
60
|
* How far the hair vertex at `v[i]` (closeOf() in hair.ts: its normal at 3, how free at 7, its
|
|
59
|
-
*
|
|
61
|
+
* layer at 8, how far along at 9) moves in the head's frame at the time `t`, swung by `sw` (sway()): a share of the
|
|
60
62
|
* swing, and a flutter of its own on its phase, out from the head too; a phase of -1 only swings.
|
|
61
63
|
* The scene's vertex shader does the same sums (mode 3).
|
|
62
64
|
*/
|
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.162.1",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist"
|