@korial29/tiny-fps 1.4.0 → 1.4.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/room.js CHANGED
@@ -1 +1 @@
1
- export { n as MAPS, r as RULES, t as Room } from "./assets/room-DAxIdWVf.js";
1
+ export { n as MAPS, r as RULES, t as Room } from "./assets/room-CPp_hgii.js";
package/dist/server.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as Room } from "./assets/room-DAxIdWVf.js";
1
+ import { t as Room } from "./assets/room-CPp_hgii.js";
2
2
  import { WebSocketServer } from "ws";
3
3
  // src/server/index.ts
4
4
  /** `/demo` → "demo", `/` → "default". Undecodable paths are kept as is. */
@@ -56,6 +56,11 @@ export interface Effects {
56
56
  export declare const stepLength: (v: number) => number;
57
57
  /** Taking steps: on a floor, or along a wall. */
58
58
  export declare const stepping: (s?: PlayerState) => boolean;
59
+ /**
60
+ * How fast the drawn eye catches up with a step the feet took at once, per second. Over a row of
61
+ * low steps (the wrecked wing on Landfall, 0.15 m each) the eye then rises as on a slope.
62
+ */
63
+ export declare const STEP_EASE = 12;
59
64
  /**
60
65
  * The orbital strike's light on the own player: seconds it grows to white (while the lasers burn,
61
66
  * RAY in beams.ts), stays white, and clears off the DISINTEGRATED screen.
@@ -57,10 +57,15 @@ export declare const end: (l: Leg) => Vec3;
57
57
  /** The height of a rectangle's floor at (x, z). */
58
58
  export declare const heightAt: (w: World, p: Poly, x: number, z: number) => number;
59
59
  /**
60
- * The rectangle a body at `v` stands on, or the nearest one within NEAR metres, at most ABOVE over
61
- * it and BELOW under it, as (index, the point of it to walk to); -1 when none.
60
+ * The rectangle a body at `v` stands on, or the nearest one within `near` metres, at most `above`
61
+ * over it and BELOW under it, as (index, the point of it to walk to); -1 when none.
62
62
  */
63
- export declare const locate: (nav: Nav, w: World, v: Vec3) => [number, Vec3];
63
+ export declare const locate: (nav: Nav, w: World, v: Vec3, above?: number, near?: number) => [number, Vec3];
64
+ /**
65
+ * Where a swimmer at `v` gets out: the nearest floor no higher than a step over his feet, within
66
+ * twice NEAR. He neither jumps nor climbs in the water, so a float's or a box's top is no way out.
67
+ */
68
+ export declare const ashore: (nav: Nav, w: World, v: Vec3) => Vec3 | undefined;
64
69
  /** Whether the bots' map of a world is built. */
65
70
  export declare const navBuilt: (w: World) => boolean;
66
71
  /** The bots' map of a world, built once per world. */
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": "1.4.0",
5
+ "version": "1.4.2",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist"