@korial29/tiny-fps 0.168.0 → 0.169.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.
- package/dist/index.js +18 -18
- package/dist/types/client/effects.d.ts +11 -0
- package/dist/types/client/hud.d.ts +2 -0
- package/package.json +1 -1
|
@@ -23,12 +23,16 @@ export interface Effects {
|
|
|
23
23
|
kick: number;
|
|
24
24
|
/** 0 to 1: how far the view has gone down to the floor, while the own player is down. */
|
|
25
25
|
lie: number;
|
|
26
|
+
/** 0 to 1: the white light of the orbital station's lasers on the own player (glareAt()). */
|
|
27
|
+
glare: number;
|
|
26
28
|
/** The own player fired a shot of `power` (1 to CHARGE_MAX): a shake of the eye, the look and the roll, and the kick of the gun, much stronger for a charged one. */
|
|
27
29
|
fire(power?: number): void;
|
|
28
30
|
/** The own player was hit: the red vignette and a small knock. */
|
|
29
31
|
wound(): void;
|
|
30
32
|
/** The own player was tackled: a hard jolt of the eye, the look and the roll, and the vignette. */
|
|
31
33
|
jolt(): void;
|
|
34
|
+
/** The orbital station's lasers came down on the own player: the light that blinds him starts. */
|
|
35
|
+
blind(): void;
|
|
32
36
|
/** A grenade burst near the own player, `k` 0 to 1 as it is nearer: the view is shaken as hard as a tackle at 1. */
|
|
33
37
|
quake(k: number): void;
|
|
34
38
|
/** The own player tackled someone: a small punch of the look and the field of view. */
|
|
@@ -52,4 +56,11 @@ export interface Effects {
|
|
|
52
56
|
export declare const stepLength: (v: number) => number;
|
|
53
57
|
/** Taking steps: on a floor, or along a wall. */
|
|
54
58
|
export declare const stepping: (s?: PlayerState) => boolean;
|
|
59
|
+
/**
|
|
60
|
+
* The orbital strike's light on the own player: seconds it grows to white (while the lasers burn,
|
|
61
|
+
* RAY in beams.ts), stays white, and clears off the DISINTEGRATED screen.
|
|
62
|
+
*/
|
|
63
|
+
export declare const BLIND: number[];
|
|
64
|
+
/** The strike's light `t` seconds after it came down: ever faster up to 1, held, then eased away. */
|
|
65
|
+
export declare const glareAt: (t: number) => number;
|
|
55
66
|
export declare const createEffects: () => Effects;
|
|
@@ -78,6 +78,8 @@ export interface Hud {
|
|
|
78
78
|
visor(on: boolean): void;
|
|
79
79
|
/** The red vignette of a tackle, 0 (none) to 1 (full). */
|
|
80
80
|
hurt(level: number): void;
|
|
81
|
+
/** The orbital strike's light over the view, 0 (none) to 1 (all white), over the down screen. */
|
|
82
|
+
glare(level: number): void;
|
|
81
83
|
/**
|
|
82
84
|
* The health as pips out of HP_MAX, and the weapon in hand: the ammo counter with the gun glyph,
|
|
83
85
|
* the katana glyph when `wield` (or when it is all there is), or the rail gun's lightning left
|
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.
|
|
5
|
+
"version": "0.169.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist"
|