@korial29/tiny-fps 0.116.0 → 0.117.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.
@@ -30,6 +30,11 @@ export interface TeamDef {
30
30
  /** The laser rifle rack, past the rail gun's: walking within RACK_R gives the rifle with RIFLE_MAX rounds. */
31
31
  rifle?: Vec3;
32
32
  }
33
+ /** A sliding door (doors.ts): the box its two panels fill when shut, in a doorway of the brushes. */
34
+ export interface Door {
35
+ min: Vec3;
36
+ max: Vec3;
37
+ }
33
38
  export interface WorldDef {
34
39
  /** Shown on the title screen. */
35
40
  name?: string;
@@ -68,6 +73,8 @@ export interface WorldDef {
68
73
  relief?: ReliefDef;
69
74
  /** Where the rovers (rover.ts) are parked, each as a spawn: the middle of its wheels on the ground and the yaw of its nose. Absent: none. */
70
75
  rovers?: Spawn[];
76
+ /** The automatic doors (doors.ts). Absent: none. */
77
+ doors?: Door[];
71
78
  }
72
79
  /** A world ready for physics and drawing: the definition and a grid of brushes on the floor plane. */
73
80
  export interface World {
@@ -78,6 +85,15 @@ export interface World {
78
85
  grid: Map<number, number[]>;
79
86
  /** The lattice of WorldDef.relief. */
80
87
  relief?: Relief;
88
+ /**
89
+ * The state of each of WorldDef.doors: how far it is open, 0 shut to 1, and the ticks it stays
90
+ * open with nobody near. The host's doors.ts moves it, the client copies it from the snapshot:
91
+ * ray() stops at a door less than half open, a body never does.
92
+ */
93
+ doors?: {
94
+ open: number;
95
+ wait: number;
96
+ }[];
81
97
  }
82
98
  /** The key of the cell with integer coordinates (cx, cz). */
83
99
  export declare const key: (cx: number, cz: number) => number;
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.116.0",
5
+ "version": "0.117.0",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist"