@korial29/tiny-fps 0.108.1 → 0.109.1

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.
@@ -33,6 +33,20 @@ export declare const MOUND: number, RISE: number;
33
33
  * starts 12 m behind them.
34
34
  */
35
35
  export declare const FLATS: number[][];
36
+ type V3 = [number, number, number];
37
+ /**
38
+ * The form of a boulder of radius R and height H from a seed: how far it reaches from its middle
39
+ * (a quarter of its height over the ground) along a unit vector. One to three lobes, each a block
40
+ * cut by five leaning planes round it and a nearly level one on top, its corners rounded by an
41
+ * ellipsoid: a main mass, a shoulder beside it half as high from 1.3 m of radius, a low one from
42
+ * 3.2 m. One plane cuts under a side (an overhang), and the whole swells and shrinks by 6 % with
43
+ * the bearing. Only + - * /, Math.sqrt and the hash: the boxes below come from it on every side.
44
+ * `tops` are the lobes' middles (x, z) and the height of their top over the rock's middle.
45
+ */
46
+ export declare const rockOf: (s: number, R: number, H: number) => {
47
+ reach: (u: V3) => number;
48
+ tops: number[][];
49
+ };
36
50
  export declare const LAYOUT: {
37
51
  /** Outside the arena: the boulders (x, z, radius), the dishes, the ramps (the middle of the lip and the unit way up it), the wreck. */
38
52
  rocks: number[][];
@@ -41,6 +55,23 @@ export declare const LAYOUT: {
41
55
  wreck: number[];
42
56
  /** Red's boulders along its walls and the field's stones; blue's are their mirrors, drawn by the scenery's flip. */
43
57
  boulders: number[][];
58
+ /** Red's rocks, in the arena and in the boulder field: blue's are their mirrors. */
59
+ crags: {
60
+ arena: {
61
+ at: number[];
62
+ R: number;
63
+ H: number;
64
+ s: number;
65
+ parts: number[][];
66
+ }[];
67
+ field: {
68
+ at: number[];
69
+ R: number;
70
+ H: number;
71
+ s: number;
72
+ parts: number[][];
73
+ }[];
74
+ };
44
75
  stones: number[][];
45
76
  pillars: number[][];
46
77
  domes: number[][];
@@ -51,3 +82,4 @@ export declare const LAYOUT: {
51
82
  masts: number[][];
52
83
  };
53
84
  export declare const MOON: WorldDef;
85
+ export {};
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.108.1",
5
+ "version": "0.109.1",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist"