@korial29/tiny-fps 0.17.0 → 0.19.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.
@@ -10,13 +10,22 @@ export interface Brush {
10
10
  /** Colour of its ambient light, linear RGB 0 to 1. Absent: white. */
11
11
  tint?: Vec3;
12
12
  }
13
+ /** Feet x, y, z (standing on a top) and the yaw to face. */
14
+ export type Spawn = [x: number, y: number, z: number, yaw: number];
15
+ /** What one team owns on a map. */
16
+ export interface TeamDef {
17
+ /** Where its flag stands (a point on a top, the foot of the pole) and where its carriers score. */
18
+ base: Vec3;
19
+ /** Where its players start, and come back to after a fall. */
20
+ spawns: Spawn[];
21
+ }
13
22
  export interface WorldDef {
14
23
  /** Shown on the title screen. */
15
24
  name?: string;
16
25
  brushes: Brush[];
17
- /** Feet x, y, z (standing on a top) and the yaw to face. */
18
- spawns: [x: number, y: number, z: number, yaw: number][];
19
- /** Feet below this height have fallen off the roofs: the player is put back at a spawn. */
26
+ /** The red team, then the blue one (TEAM). */
27
+ teams: [red: TeamDef, blue: TeamDef];
28
+ /** Feet below this height have fallen off the roofs: the player is put back at a spawn of the team. */
20
29
  floor: number;
21
30
  /** Unit direction toward the sun, and its colour (linear RGB, may exceed 1). */
22
31
  sun: {
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.17.0",
5
+ "version": "0.19.0",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist"