@korial29/tiny-fps 0.147.1 → 0.147.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.
|
@@ -3,6 +3,7 @@ import type { World } from '../shared/world';
|
|
|
3
3
|
import type { Vec3 } from './mesh';
|
|
4
4
|
import type { Quat } from './rig';
|
|
5
5
|
import type { Out } from './verts';
|
|
6
|
+
import type { Pieces } from './store';
|
|
6
7
|
/**
|
|
7
8
|
* The back of the body and the muzzle, the tip of the nose, in model space (the tail and the front of
|
|
8
9
|
* the emitter): the line through them is the gun's long axis, the way it points and the way the
|
|
@@ -222,6 +223,8 @@ export declare const scope: (n: number, shown?: boolean, nades?: number) => numb
|
|
|
222
223
|
* one in use, then the two in reserve), its heat (0 to 1) and whether it overheated.
|
|
223
224
|
*/
|
|
224
225
|
export interface Lit {
|
|
226
|
+
/** The frame's pieces of the store: the gun's body, lit, goes there (store.ts). */
|
|
227
|
+
list?: Pieces;
|
|
225
228
|
light?: number;
|
|
226
229
|
swap?: number;
|
|
227
230
|
empty?: boolean;
|
|
@@ -254,7 +257,7 @@ export declare const cellsOf: (p: Pick<PlayerState, "rail" | "cap">) => number[]
|
|
|
254
257
|
* given, and the charge gauge at `level`; its battery (capsule) where the swap has it, its glow and
|
|
255
258
|
* its counter dimmed with `light`, and the spark only when it is all on.
|
|
256
259
|
*/
|
|
257
|
-
export declare const held: (out: Out, pos: Vec3, q: Quat, lod: number, k?: number, ammo?: number, level?: number, kind?: boolean | number, t?: number, { light, swap, empty, screen, digits, cells, heat, hot, press, tune, nades, id, floor, vel, carry, }?: Lit) => void;
|
|
260
|
+
export declare const held: (out: Out, pos: Vec3, q: Quat, lod: number, k?: number, ammo?: number, level?: number, kind?: boolean | number, t?: number, { light, swap, empty, screen, digits, cells, heat, hot, press, tune, nades, id, floor, vel, carry, list, }?: Lit) => void;
|
|
258
261
|
/** The muzzle of a gun (the rail gun's or the rifle's by `kind`) whose grip is at `at` and whose axes are [right, up, forward]. */
|
|
259
262
|
export declare const tip: (at: Vec3, [, u, f]: Vec3[], kind?: boolean | number) => Vec3;
|
|
260
263
|
/**
|
|
@@ -2,6 +2,7 @@ import type { PlayerState } from '../shared/types';
|
|
|
2
2
|
import type { Vec3 } from './mesh';
|
|
3
3
|
import type { Quat } from './rig';
|
|
4
4
|
import type { Out } from './verts';
|
|
5
|
+
import type { Pieces } from './store';
|
|
5
6
|
/** Where the blade starts and ends along the model's forward axis, metres from the right hand: a metre from the guard to the point. */
|
|
6
7
|
export declare const BASE: number, TIP: number;
|
|
7
8
|
/** The left hand grips this far behind the right one: a gap between the two fists. */
|
|
@@ -20,7 +21,9 @@ export declare const arcs: (out: Out, at: Vec3, [r, u, f]: Vec3[], t: number, lo
|
|
|
20
21
|
* Appends the katana with its right-hand grip at `at`, axes `[right, up, forward]`, `k` times its
|
|
21
22
|
* size; with the clock `t` (s) it crackles, once its glow is all on (`light`, 0 off to 1).
|
|
22
23
|
*/
|
|
23
|
-
export declare const sword: (out: Out, at: Vec3, ax: Vec3[], lod: number, t?: number, k?: number, light?: number, press?: number
|
|
24
|
+
export declare const sword: (out: Out, at: Vec3, ax: Vec3[], lod: number, t?: number, k?: number, light?: number, press?: number,
|
|
25
|
+
/** The hand's turn and the frame's pieces: the blade, lit, is then made once into the store and placed there (store.ts). */
|
|
26
|
+
q?: Quat, list?: Pieces) => void;
|
|
24
27
|
/** The sword's axes [right, up, forward] for a hand turned by `q` (see body.ts): the back of the hand to its right, the blade off the thumb toward the fingers. */
|
|
25
28
|
export declare const axes: (q: Quat) => Vec3[];
|
|
26
29
|
/** Where the fingers point for a sword with axes `ax`: the inverse of axes(). */
|
|
@@ -28,7 +31,7 @@ export declare const fingers: ([, u, f]: Vec3[]) => Vec3;
|
|
|
28
31
|
/** The right and the left wrist for a sword with its right-hand grip at `at`: the left hand is BEHIND the right one, mirrored. */
|
|
29
32
|
export declare const wrists: (at: Vec3, ax: Vec3[]) => Vec3[];
|
|
30
33
|
/** Appends the katana held in the right hand at `pos` turned by `q`. */
|
|
31
|
-
export declare const held: (out: Out, pos: Vec3, q: Quat, lod: number, t?: number, k?: number, light?: number, press?: number) => void;
|
|
34
|
+
export declare const held: (out: Out, pos: Vec3, q: Quat, lod: number, t?: number, k?: number, light?: number, press?: number, list?: Pieces) => void;
|
|
32
35
|
/** The root of the blade and its point, in the world, for the hand at `pos` turned by `q`. */
|
|
33
36
|
export declare const ends: (pos: Vec3, q: Quat) => Vec3[];
|
|
34
37
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { WorldDef } from '../shared/world';
|
|
2
2
|
import type { Vec3 } from './mesh';
|
|
3
3
|
import type { Out } from './verts';
|
|
4
|
+
import type { Pieces } from './store';
|
|
4
5
|
/** Cars on the roads round the play area, and on the rest of the grid out to MARKS, fewer to the kilometre. */
|
|
5
6
|
export declare const CARS = 64;
|
|
6
7
|
export declare const FAR_CARS = 160;
|
|
@@ -43,4 +44,4 @@ export declare const MODEL: {
|
|
|
43
44
|
* The drawer of a world's traffic: appends the cars in view (in front of the camera, within FAR) at
|
|
44
45
|
* time t, each BODY + CABIN + LAMPS vertices, the cabin only up to NEAR_CAR and the lamps up to LIT.
|
|
45
46
|
*/
|
|
46
|
-
export declare const traffic: (def: WorldDef) => (out: Out, eye: Vec3, fwd: Vec3, t: number) => void;
|
|
47
|
+
export declare const traffic: (def: WorldDef) => (out: Out, eye: Vec3, fwd: Vec3, t: number, pieces?: Pieces) => 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.147.
|
|
5
|
+
"version": "0.147.2",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist"
|