@korial29/tiny-fps 0.161.0 → 0.162.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.
@@ -33,4 +33,6 @@ export declare const flesh: (list: Pieces, s: Skin, pose: {
33
33
  accent: number[];
34
34
  ninja?: boolean;
35
35
  bare?: boolean;
36
- }, hood?: number) => void;
36
+ }, hood?: number,
37
+ /** The runner's id: his skin's marks. */
38
+ seed?: number) => void;
@@ -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>;
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.161.0",
5
+ "version": "0.162.0",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist"