@korial29/tiny-fps 0.169.0 → 0.171.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.
@@ -2,6 +2,12 @@ import type { Ball, PlayerState } from '../shared/types';
2
2
  import type { World } from '../shared/world';
3
3
  import type { Orb } from './beams';
4
4
  import type { Vec3 } from './mesh';
5
+ /**
6
+ * Whether the burst ball `b` burst on the body of `p`, both as the same snapshot has them: its
7
+ * centre within the body's cylinder grown by the ball's radius. A hit the host counts but takes no
8
+ * health for yet (a laser round, a vehicle's bolt) is seen this way.
9
+ */
10
+ export declare const onBody: (b: Ball, p: Pick<PlayerState, "x" | "y" | "z" | "mode">) => boolean;
5
11
  /** Seconds a ball takes to come from the muzzle onto its line, and the metres of its trail. */
6
12
  export declare const CATCH = 0.12;
7
13
  export declare const TRAIL = 1.2;
@@ -17,7 +17,7 @@ export interface Effects {
17
17
  lines: number;
18
18
  /** Steps walked on a floor or a wall: each whole number is a footfall. */
19
19
  stride: number;
20
- /** 0 to 1: the red vignette of a tackle, full at the hit and gone in under a second. */
20
+ /** 0 to 1: the red halo round the view of a hit, of any weapon, or a tackle: full at the hit and gone in under a second. */
21
21
  hurt: number;
22
22
  /** The kick of the gun in the hand, 1 at a shot (up to 3 for a charged one) and gone in a tenth of a second. */
23
23
  kick: number;
@@ -17,6 +17,8 @@ export interface Runner {
17
17
  gait: Gait;
18
18
  /** The xenomorph's gait on all fours (fours.ts): none for the others. */
19
19
  fours?: Fours;
20
+ /** Posed to threaten, the xenomorph of the menu's picture (menace()). */
21
+ menace?: boolean;
20
22
  /** How much of a dash it is in, eased from 0 to 1: the length of the streaks. */
21
23
  dash: number;
22
24
  /** Seconds since its last shot, and how far its gun arm is raised to aim, eased from 0 to 1. */
@@ -54,4 +54,12 @@ export declare const DASH_GAP = 16;
54
54
  export declare const rolesOf: (def: Pick<WorldDef, "helmets">) => number[];
55
55
  /** The class a player plays on the map: his `role` when the map offers it, else the map's default. */
56
56
  export declare const roleOf: (role: number | undefined, def: Pick<WorldDef, "helmets">) => number;
57
+ /**
58
+ * The build (BODY) a player is drawn with: the one picked, but the xenomorph's skin is cut on the
59
+ * man's skeleton (the user, 2026-11-16: no gender for it). The choice is kept for another class.
60
+ */
61
+ export declare const buildOf: (p: {
62
+ role?: number;
63
+ body?: number;
64
+ }, def: Pick<WorldDef, "helmets">) => number;
57
65
  export declare const kitOf: (role: number | undefined, def: Pick<WorldDef, "helmets">) => Kit;
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.169.0",
5
+ "version": "0.171.0",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist"