@korial29/tiny-fps 0.204.2 → 0.204.3
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 +1 -1
- package/dist/types/client/limbs.d.ts +10 -2
- package/dist/types/client/skin.d.ts +9 -0
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ import type { Gait } from './gait';
|
|
|
5
5
|
import type { Vec3 } from './mesh';
|
|
6
6
|
import { solve } from './rig';
|
|
7
7
|
import type { Quat } from './rig';
|
|
8
|
+
import type { Skin } from './skin';
|
|
8
9
|
import type { Out } from './verts';
|
|
9
10
|
/** How closed the hand of an arm cut off is (hand() in body.ts). */
|
|
10
11
|
export declare const LIMP = 0.35;
|
|
@@ -57,8 +58,15 @@ export declare const track: (r: {
|
|
|
57
58
|
/** The skeleton as last drawn, which the limb leaves from: the gait's pose without it. */
|
|
58
59
|
s?: ReturnType<typeof solve>;
|
|
59
60
|
}, dt: number, floor: Ground, fresh: boolean, tracer?: Pick<Tracer, "shock" | "spit">) => void;
|
|
61
|
+
/**
|
|
62
|
+
* The skeleton the piece is skinned with, where it lies now: the pose of the cut carried by the
|
|
63
|
+
* piece's own turn and place, sunk by `sink`. Skinned with it, the limb lands where piece() moves
|
|
64
|
+
* the limb skinned in the pose of the cut (dual quaternions follow a turn of all their joints).
|
|
65
|
+
*/
|
|
66
|
+
export declare const placed: (c: Piece, sink: number) => ReturnType<typeof solve>;
|
|
60
67
|
/**
|
|
61
68
|
* Appends the piece at level of detail `lod`, in `colors` (see palette()), sunk by `sink` metres with
|
|
62
|
-
* the body; an arm with its hand, limp, in a space suit's glove on `suit`.
|
|
69
|
+
* the body; an arm with its hand, limp, in a space suit's glove on `suit`. With `gpu`, its skin goes
|
|
70
|
+
* there, in the skeleton where it lies (posed by the shader, flesh.ts), and the hand to `out`.
|
|
63
71
|
*/
|
|
64
|
-
export declare const piece: (out: Out, c: Piece, colors: number[][], lod: number, sink: number, face?: ArrayLike<number>, suit?: boolean) => void;
|
|
72
|
+
export declare const piece: (out: Out, c: Piece, colors: number[][], lod: number, sink: number, face?: ArrayLike<number>, suit?: boolean, gpu?: (limb: Skin, at: ReturnType<typeof solve>) => void) => void;
|
|
@@ -146,6 +146,15 @@ export declare const duals: (s: Skin, { pos, rot }: {
|
|
|
146
146
|
pos: Vec3[];
|
|
147
147
|
rot: Quat[];
|
|
148
148
|
}) => Float64Array<ArrayBuffer>;
|
|
149
|
+
/**
|
|
150
|
+
* Where skin() puts the middle of the cut face of a skin cut() made, in the pose `pose`: its last
|
|
151
|
+
* vertex, which hangs on one joint alone (sever()). The shader draws the skin, so nothing on the
|
|
152
|
+
* CPU reads it back from the frame.
|
|
153
|
+
*/
|
|
154
|
+
export declare const capOf: (s: Skin, { pos, rot }: {
|
|
155
|
+
pos: Vec3[];
|
|
156
|
+
rot: Quat[];
|
|
157
|
+
}) => Vec3;
|
|
149
158
|
/** 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). */
|
|
150
159
|
export declare const mouthed: (colors: number[][], face?: ArrayLike<number>) => number[][];
|
|
151
160
|
/**
|
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.204.
|
|
5
|
+
"version": "0.204.3",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist"
|