@korial29/tiny-fps 0.184.0 → 0.185.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 +19 -19
- package/dist/types/client/gloryfx.d.ts +29 -0
- package/package.json +1 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { PlayerState } from '../shared/types';
|
|
2
|
+
import type { Vec3 } from './mesh';
|
|
3
|
+
/**
|
|
4
|
+
* A cue: the tick of the lock it plays on, the sound, on the killer (0) or the victim (1), its gain
|
|
5
|
+
* and rate, and, to repeat it, every so many ticks up to a last; a victim's cue `voiced` is said in
|
|
6
|
+
* his own voice (its rate times voiceOf()).
|
|
7
|
+
*/
|
|
8
|
+
export type Cue = [
|
|
9
|
+
tick: number,
|
|
10
|
+
sound: number,
|
|
11
|
+
on: number,
|
|
12
|
+
gain: number,
|
|
13
|
+
rate: number,
|
|
14
|
+
every?: number,
|
|
15
|
+
last?: number,
|
|
16
|
+
voiced?: boolean
|
|
17
|
+
];
|
|
18
|
+
/** The xenomorph's, over GLORY_TICKS: on him at 18, its head back from 46, the bite home at 114. */
|
|
19
|
+
export declare const FEAST_CUES: Cue[];
|
|
20
|
+
/** The katana's, over EXEC.TICKS: the cut down bites at 36, he is on his knee at 46. */
|
|
21
|
+
export declare const EXEC_CUES: Cue[];
|
|
22
|
+
/** After the kill: seconds, then as a cue (on the place each stood). */
|
|
23
|
+
export declare const FEAST_AFTER: [number, number, number, number, number][];
|
|
24
|
+
export declare const EXEC_AFTER: [number, number, number, number, number][];
|
|
25
|
+
export interface GloryFx {
|
|
26
|
+
/** Plays what the glory kills of `players` (the own one among them) cue since the last frame. */
|
|
27
|
+
frame(players: PlayerState[]): void;
|
|
28
|
+
}
|
|
29
|
+
export declare const createGloryFx: (play: (id: number, at: Vec3, gain: number, rate: number) => void, voice: (id: number) => number, xeno: (id: number) => boolean, later?: (f: () => void, ms: number) => void) => GloryFx;
|
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.185.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist"
|