@korial29/tiny-fps 0.207.1 → 0.207.2
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 +6 -6
- package/dist/local.js +1 -1
- package/dist/server.js +14 -5
- package/dist/types/client/xeno.d.ts +5 -2
- package/dist/types/shared/blade.d.ts +2 -1
- package/dist/types/shared/constants.d.ts +6 -0
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -183,6 +183,12 @@ var TAILS = [
|
|
|
183
183
|
knock: 0
|
|
184
184
|
}
|
|
185
185
|
];
|
|
186
|
+
/**
|
|
187
|
+
* The tail's charged release (the user, 2026-11-23: let go, it goes far at full power): no slower
|
|
188
|
+
* than a tap but TAIL_FAST times its time from the top, and TAIL_FAR metres further, where the
|
|
189
|
+
* katana's heavy release is HEAVY times as slow and HEAVY_REACH further (swingOf()).
|
|
190
|
+
*/
|
|
191
|
+
var [TAIL_FAST, TAIL_FAR] = [.75, 1];
|
|
186
192
|
var [PUNCH_HITS, PUNCH_STUN, PUNCH_MEMORY] = [
|
|
187
193
|
2,
|
|
188
194
|
3,
|
|
@@ -1980,15 +1986,18 @@ var cutOf = (keys, thrust = true) => {
|
|
|
1980
1986
|
/**
|
|
1981
1987
|
* The swing `p` is in, its numbers as CUTS has them (`table`; the xenomorph's is TAILS): the cut's
|
|
1982
1988
|
* own, or, for a heavy release (`heavy`), the rest of it from the top of its wind-up, HEAVY times as
|
|
1983
|
-
* slow, with its own timer from there, and harder and wider.
|
|
1989
|
+
* slow, with its own timer from there, and harder and wider. The tail's (TAILS) is fast and long
|
|
1990
|
+
* instead: TAIL_FAST times its time, TAIL_FAR metres further.
|
|
1984
1991
|
*/
|
|
1985
1992
|
var swingOf = (p, table = CUTS) => {
|
|
1986
1993
|
const c = table[p.cut ?? 0];
|
|
1994
|
+
const tail = table === TAILS;
|
|
1995
|
+
const k = tail ? TAIL_FAST : HEAVY;
|
|
1987
1996
|
return p.heavy ? {
|
|
1988
1997
|
...c,
|
|
1989
|
-
ticks: Math.round((c.ticks - c.hold) *
|
|
1990
|
-
strike: Math.round((c.strike - c.hold) *
|
|
1991
|
-
reach: c.reach + HEAVY_REACH,
|
|
1998
|
+
ticks: Math.round((c.ticks - c.hold) * k),
|
|
1999
|
+
strike: Math.round((c.strike - c.hold) * k),
|
|
2000
|
+
reach: c.reach + (tail ? TAIL_FAR : HEAVY_REACH),
|
|
1992
2001
|
arc: c.arc * HEAVY_ARC,
|
|
1993
2002
|
hp: c.hp + HEAVY_HP
|
|
1994
2003
|
} : c;
|
|
@@ -6920,7 +6929,7 @@ var step = (p, i, w, team, armed = true, bodies = [], kit = KITS[0]) => {
|
|
|
6920
6929
|
p.swing = swingOf(p, table).ticks;
|
|
6921
6930
|
} else if (kit.xeno && top && free && !holding && (p.charge ?? 0) > 0) {
|
|
6922
6931
|
p.charge = 0;
|
|
6923
|
-
p.swing = ticks - 1;
|
|
6932
|
+
p.swing = ticks - hold - 1;
|
|
6924
6933
|
} else {
|
|
6925
6934
|
p.charge = top || kit.xeno && !p.heavy ? 0 : p.charge;
|
|
6926
6935
|
const s = p.swing ?? 0;
|
|
@@ -21,7 +21,9 @@ export declare const TAIL: {
|
|
|
21
21
|
* forward down into the view), its turn about the pelvis' up (radians, to its left: through its
|
|
22
22
|
* right side, a tail pointing back turns forward), its lean to the right, its reach (as a share of
|
|
23
23
|
* its length, a whip stretched), how much of the hook at its tip it keeps, how far its root
|
|
24
|
-
* rises, how far it coils in an S,
|
|
24
|
+
* rises, how far it coils in an S, how strongly its stinger follows the aim, and how far its tip
|
|
25
|
+
* is drawn onto the foe ahead of the eyes (tail(), the user 2026-11-23: in the own view the strike
|
|
26
|
+
* lands on the crosshair).
|
|
25
27
|
*/
|
|
26
28
|
export type Lash = readonly [
|
|
27
29
|
sting: number,
|
|
@@ -31,7 +33,8 @@ export type Lash = readonly [
|
|
|
31
33
|
hook: number,
|
|
32
34
|
rise: number,
|
|
33
35
|
coil?: number,
|
|
34
|
-
aim?: number
|
|
36
|
+
aim?: number,
|
|
37
|
+
pull?: number
|
|
35
38
|
];
|
|
36
39
|
/** At rest: behind, hooked. */
|
|
37
40
|
export declare const HOOKED: Lash;
|
|
@@ -21,7 +21,8 @@ export declare const cutOf: (keys: number, thrust?: boolean) => number;
|
|
|
21
21
|
/**
|
|
22
22
|
* The swing `p` is in, its numbers as CUTS has them (`table`; the xenomorph's is TAILS): the cut's
|
|
23
23
|
* own, or, for a heavy release (`heavy`), the rest of it from the top of its wind-up, HEAVY times as
|
|
24
|
-
* slow, with its own timer from there, and harder and wider.
|
|
24
|
+
* slow, with its own timer from there, and harder and wider. The tail's (TAILS) is fast and long
|
|
25
|
+
* instead: TAIL_FAST times its time, TAIL_FAR metres further.
|
|
25
26
|
*/
|
|
26
27
|
export declare const swingOf: (p: Pick<PlayerState, "cut" | "heavy">, table?: typeof CUTS) => {
|
|
27
28
|
ticks: number;
|
|
@@ -261,6 +261,12 @@ export declare const TAILS: {
|
|
|
261
261
|
knock: number;
|
|
262
262
|
}[];
|
|
263
263
|
export declare const TAIL_LEAP = 10;
|
|
264
|
+
/**
|
|
265
|
+
* The tail's charged release (the user, 2026-11-23: let go, it goes far at full power): no slower
|
|
266
|
+
* than a tap but TAIL_FAST times its time from the top, and TAIL_FAR metres further, where the
|
|
267
|
+
* katana's heavy release is HEAVY times as slow and HEAVY_REACH further (swingOf()).
|
|
268
|
+
*/
|
|
269
|
+
export declare const TAIL_FAST: number, TAIL_FAR: number;
|
|
264
270
|
export declare const PUNCH_HITS: number, PUNCH_STUN: number, PUNCH_MEMORY: number;
|
|
265
271
|
/**
|
|
266
272
|
* The xenomorph (the user, 2026-11-15; kit.ts). XENO_HP health. It clings to a wall it faces with
|
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.207.
|
|
5
|
+
"version": "0.207.2",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist"
|