@korial29/tiny-fps 0.154.0 → 0.155.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.
@@ -0,0 +1,20 @@
1
+ import type { WorldDef } from '../shared/world';
2
+ /**
3
+ * The steps of a map's loading, in order: its label, the share of the bar done at its end, and
4
+ * about how long it takes (ms, measured on a laptop). The last is the first frame drawn.
5
+ */
6
+ export declare const STEPS: readonly (readonly [string, number, number])[];
7
+ /** The share filled at `t` (ms) by the animation `[from, to, since, ms]`. */
8
+ export declare const fillAt: ([from, to, since, ms]: number[], t: number) => number;
9
+ /** The bar's goal while step `i` runs (`i` past the last: full), and how long it takes to get there. */
10
+ export declare const goal: (i: number) => [number, number];
11
+ export interface Loader {
12
+ /** The screen, last in the container so that it lies over the game. */
13
+ el: HTMLElement;
14
+ /** Step `i` of STEPS has started; STEPS.length or more: everything is done, the screen fades out. */
15
+ step(i: number): void;
16
+ /** Removed at once. */
17
+ destroy(): void;
18
+ }
19
+ /** The loading screen over `container` while the map `def` is built: its name, a bar and the step. */
20
+ export declare const createLoader: (container: HTMLElement, def: WorldDef) => Loader;
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.154.0",
5
+ "version": "0.155.0",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist"