@korial29/tiny-fps 0.147.3 → 0.147.4
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 +20 -19
- package/dist/types/client/flesh.d.ts +12 -8
- package/dist/types/client/mask.d.ts +2 -0
- package/dist/types/client/store.d.ts +1 -1
- package/package.json +1 -1
|
@@ -5,12 +5,13 @@ import type { Vec3 } from './mesh';
|
|
|
5
5
|
/** Texels a skin vertex takes (then its face's records, two each), a corner, an armour vertex. */
|
|
6
6
|
export declare const VERT: number, CORN: number, PLATE: number;
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
8
|
+
* Where the skin `s` is in `data`, made once: its vertices and its corners (a corner: its vertex, its
|
|
9
|
+
* colour, the colour it fades to and how far). With `hood`, the ninja's (build and face): dress() at
|
|
10
|
+
* rest on the skin his face's traits have shaped, its pressed places taken as the rest's, and only
|
|
11
|
+
* the face's expressions left for the shader, none under the guard (hidden there, and the jaw would
|
|
12
|
+
* push the face through it).
|
|
12
13
|
*/
|
|
13
|
-
export declare const skinOf: (s: Skin) => [number, number];
|
|
14
|
+
export declare const skinOf: (s: Skin, hood?: [number, ArrayLike<number>]) => [number, number];
|
|
14
15
|
/**
|
|
15
16
|
* The armour armor() cuts out of the skin `s`, made once into `data`, its vertices of PLATE texels:
|
|
16
17
|
* [its skin triangle, its corner in its triangle, the triangle's kind, its layer], each corner's
|
|
@@ -19,8 +20,9 @@ export declare const skinOf: (s: Skin) => [number, number];
|
|
|
19
20
|
*/
|
|
20
21
|
export declare const armourOf: (s: Skin, fine: boolean, ninja: boolean, astro: boolean, bare: boolean) => [number, number];
|
|
21
22
|
/**
|
|
22
|
-
* Draws the skin `s` in the pose `pose` and, `
|
|
23
|
-
* shader: into `list`, as skin() and armor() would into the
|
|
23
|
+
* Draws the skin `s` in the pose `pose` and, with `armour`, the armour cut out of it, posed by the
|
|
24
|
+
* shader: into `list`, as skin(), dress() (`hood`: the ninja's build) and armor() would into the
|
|
25
|
+
* frame's vertices.
|
|
24
26
|
*/
|
|
25
27
|
export declare const flesh: (list: Pieces, s: Skin, pose: {
|
|
26
28
|
pos: Vec3[];
|
|
@@ -29,4 +31,6 @@ export declare const flesh: (list: Pieces, s: Skin, pose: {
|
|
|
29
31
|
fine: boolean;
|
|
30
32
|
plate?: number[];
|
|
31
33
|
accent: number[];
|
|
32
|
-
|
|
34
|
+
ninja?: boolean;
|
|
35
|
+
bare?: boolean;
|
|
36
|
+
}, hood?: number) => void;
|
|
@@ -22,6 +22,8 @@ export declare const MOUTH: {
|
|
|
22
22
|
* the face under the guard pressed in behind it.
|
|
23
23
|
*/
|
|
24
24
|
export declare const dress: (out: Out, from: number, s: Skin, at: Vec3, q: Quat, build?: number) => void;
|
|
25
|
+
/** What the last dress() made of each of the `n` vertices of its skin: its bare share (-1: none), where it was pressed in (NaN: not). */
|
|
26
|
+
export declare const dressedOf: (n: number) => [Float64Array, Float64Array];
|
|
25
27
|
/** Appends the guard and the ideograms on the head joint at `at` turned by `q` (see solve()), on the woman's smaller head with `build`, in the team's `color`. */
|
|
26
28
|
export declare const mask: (out: Out, at: Vec3, q: Quat, build?: number, color?: number[],
|
|
27
29
|
/** A far runner's: fewer quads. */
|
|
@@ -40,7 +40,7 @@ export declare let stored: Float32Array<ArrayBuffer>;
|
|
|
40
40
|
/** The floats of `stored` written: a renderer uploads what it has not yet. */
|
|
41
41
|
export declare let filled: number;
|
|
42
42
|
/** The piece `key`, made by `make` (into an empty array, at the origin) the first time it is asked for. */
|
|
43
|
-
export declare const mesh: (key: string, make: (out:
|
|
43
|
+
export declare const mesh: (key: string, make: (out: Out) => void) => Mesh;
|
|
44
44
|
/** The frame's pieces, drawn after its other vertices. */
|
|
45
45
|
export type Pieces = Draw[];
|
|
46
46
|
/** The turn and the place of no move: a rigid piece made with them is at the origin. */
|
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.147.
|
|
5
|
+
"version": "0.147.4",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist"
|