@korial29/tiny-fps 0.204.1 → 0.204.2
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 +5 -5
- package/dist/types/client/hunter.d.ts +49 -0
- package/package.json +1 -1
|
@@ -6,3 +6,52 @@ export declare const hunterWristEnds: () => Vec3[];
|
|
|
6
6
|
/** Slide and stock travel in opposite directions as the compact back-mounted rifle opens. */
|
|
7
7
|
export declare const drawHarpoon: (out: Out, lod: 0 | 1 | 2, at: Vec3, axes: Vec3[], scale: number, open: number, loaded?: boolean) => void;
|
|
8
8
|
export declare const hunterHarpoon: (lod: 0 | 1 | 2) => number[];
|
|
9
|
+
/**
|
|
10
|
+
* The Hunter's own rest skeleton in model space: the rig's joints on his 1.2 m stature, the arms
|
|
11
|
+
* where the sculpted sleeves hang (wider than the rig's) and the neck under the lowered mask.
|
|
12
|
+
* Rest rotations are the identity, so a joint's rest frame is this point alone.
|
|
13
|
+
*/
|
|
14
|
+
export declare const HUNTER_REST: Vec3[];
|
|
15
|
+
/** A rigid Hunter piece: the vertices that follow `joint`, in that joint's rest frame. */
|
|
16
|
+
export interface HunterPiece {
|
|
17
|
+
joint: number;
|
|
18
|
+
/** Too fine for a shadow (the temple optics and the rangefinder). */
|
|
19
|
+
thin: boolean;
|
|
20
|
+
/** The harpoon on his back, left out while it is in his hand. */
|
|
21
|
+
harpoon: boolean;
|
|
22
|
+
vertices: number[];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The triangles around a bending joint, blended between the parent bone `a` and the child `b`
|
|
26
|
+
* (`w`: each vertex's share of `b`) so the knee, ankle, hip and elbow do not open as they bend.
|
|
27
|
+
* Vertices in model space at rest.
|
|
28
|
+
*/
|
|
29
|
+
export interface HunterBand {
|
|
30
|
+
a: number;
|
|
31
|
+
b: number;
|
|
32
|
+
vertices: Float32Array;
|
|
33
|
+
w: Float32Array;
|
|
34
|
+
}
|
|
35
|
+
/** The Hunter's rigid pieces and, near, his blended joint bands. */
|
|
36
|
+
export interface HunterRig {
|
|
37
|
+
pieces: HunterPiece[];
|
|
38
|
+
bands: HunterBand[];
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The Hunter cut into rigid pieces, one per joint (and shadow flag, and the stowed harpoon), so the runner's animated
|
|
42
|
+
* skeleton can carry him: each triangle goes to the nearest bone its part may follow. Above the
|
|
43
|
+
* far level, the triangles across a bend go to a blended band instead (BENDS).
|
|
44
|
+
* `skip` leaves out parts (the far level's quills and grille).
|
|
45
|
+
*/
|
|
46
|
+
export declare const hunterRig: (lod: 0 | 1 | 2, skip?: (name: string) => boolean) => HunterRig;
|
|
47
|
+
/**
|
|
48
|
+
* Where the Hunter's joints stand in the posed runner `pos`/`rot` (solve()): his own bones
|
|
49
|
+
* (HUNTER_REST) turned as the runner's, from a pelvis that moves as the runner's scaled to his
|
|
50
|
+
* stature. `at` is the runner's feet and `yaw` his heading.
|
|
51
|
+
*/
|
|
52
|
+
export declare const hunterPose: (pos: Vec3[], rot: [number, number, number, number][], at: Vec3, yaw: number, out?: Vec3[]) => Vec3[];
|
|
53
|
+
/**
|
|
54
|
+
* Draws a blended band (HunterBand) on the Hunter's posed joints (hunterPose()) and the runner's
|
|
55
|
+
* rotations: each vertex placed by both bones and mixed by its share, its normal likewise.
|
|
56
|
+
*/
|
|
57
|
+
export declare const blendHunter: (out: Out, band: HunterBand, joints: Vec3[], rot: [number, number, number, number][]) => void;
|
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.2",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist"
|