@korial29/tiny-fps 0.218.0 → 0.219.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 +5 -5
- package/dist/local.js +1 -1
- package/dist/server.js +9 -5
- package/dist/types/client/computer.d.ts +2 -2
- package/dist/types/client/feast.d.ts +3 -2
- package/dist/types/client/soldier.d.ts +2 -0
- package/dist/types/shared/constants.d.ts +1 -1
- package/dist/types/shared/kit.d.ts +7 -0
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -231,7 +231,7 @@ var [GLORY_HP, GLORY_REACH, GLORY_ARC, GLORY_TICKS] = [
|
|
|
231
231
|
var EXEC = {
|
|
232
232
|
TICKS: 88,
|
|
233
233
|
REACH: 1.3,
|
|
234
|
-
FIST: .
|
|
234
|
+
FIST: .85,
|
|
235
235
|
CUTS: [26, 71],
|
|
236
236
|
KILLER: 1,
|
|
237
237
|
VICTIM: 2
|
|
@@ -834,7 +834,8 @@ var KITS = [
|
|
|
834
834
|
clip: 0,
|
|
835
835
|
hp: 12,
|
|
836
836
|
gear: false,
|
|
837
|
-
xeno: true
|
|
837
|
+
xeno: true,
|
|
838
|
+
girth: .1
|
|
838
839
|
},
|
|
839
840
|
{
|
|
840
841
|
...MARINE,
|
|
@@ -843,7 +844,9 @@ var KITS = [
|
|
|
843
844
|
ammo: 12,
|
|
844
845
|
mag: 1,
|
|
845
846
|
cap: 15,
|
|
846
|
-
rail: 90
|
|
847
|
+
rail: 90,
|
|
848
|
+
girth: .25,
|
|
849
|
+
size: 1.2
|
|
847
850
|
}
|
|
848
851
|
];
|
|
849
852
|
/**
|
|
@@ -10645,7 +10648,8 @@ var Room = class {
|
|
|
10645
10648
|
const [dx, dz] = [seen.x - me.x, seen.z - me.z];
|
|
10646
10649
|
const d = Math.hypot(dx, dz) || 1;
|
|
10647
10650
|
this.drop(foe.info.id);
|
|
10648
|
-
const
|
|
10651
|
+
const girth = (this.kit(p).girth ?? 0) + (this.kit(foe).girth ?? 0);
|
|
10652
|
+
const [lock, near] = xeno ? [GLORY_TICKS, 1] : [EXEC.TICKS, (me.wield ? EXEC.REACH : EXEC.FIST) + girth];
|
|
10649
10653
|
for (const [a, b, exec] of [[
|
|
10650
10654
|
p,
|
|
10651
10655
|
foe,
|
|
@@ -10671,7 +10675,7 @@ var Room = class {
|
|
|
10671
10675
|
});
|
|
10672
10676
|
a.state.exec = xeno ? 0 : exec;
|
|
10673
10677
|
}
|
|
10674
|
-
const v =
|
|
10678
|
+
const v = (d - near) * 60 / 20 / d;
|
|
10675
10679
|
[me.vx, me.vz] = [Math.fround(dx * v), Math.fround(dz * v)];
|
|
10676
10680
|
return true;
|
|
10677
10681
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Vec3 } from './mesh';
|
|
2
|
-
/**
|
|
3
|
-
export declare const
|
|
2
|
+
/** The cannon's shots each cell counts, from the elbow's to the wrist's: HUNTER_CELLS in all. */
|
|
3
|
+
export declare const SHOTS: number[];
|
|
4
4
|
/** The fire key, in the forearm's frame (the right hand presses it). */
|
|
5
5
|
export declare const FIRE_KEY: Vec3;
|
|
6
6
|
/** The computer with `shots` of the cannon's shots left, in the left forearm's frame; made once each. */
|
|
@@ -68,8 +68,9 @@ export declare const mounted: (lock: number) => number;
|
|
|
68
68
|
/**
|
|
69
69
|
* The xenomorph's `pose` on its prey, whose feet are at `prey`, by the share `m` (mounted()): turned
|
|
70
70
|
* to him and up on him, its feet on his thighs, its claws over his shoulders, leaning over his head.
|
|
71
|
+
* `size` is his body's to a man's (Kit size): its holds and its climb go with it.
|
|
71
72
|
*/
|
|
72
|
-
export declare const seize: (pose: Pose, prey: Vec3, m: number, sway?: number, hop?: number) => Pose;
|
|
73
|
+
export declare const seize: (pose: Pose, prey: Vec3, m: number, sway?: number, hop?: number, size?: number) => Pose;
|
|
73
74
|
/**
|
|
74
75
|
* The prey's `pose` under the xenomorph whose feet are at `eater`, by the share `m`: turned to it,
|
|
75
76
|
* bent back with his hips sunk, his feet where they were, his arms raised against it (his hands on
|
|
@@ -193,7 +194,7 @@ export declare const PUMMEL: {
|
|
|
193
194
|
readonly PAST: readonly [0.1, 0.5, 0.72];
|
|
194
195
|
readonly BELLY: 0.19;
|
|
195
196
|
readonly FACE: readonly [0.12, 0.06];
|
|
196
|
-
readonly NAPE: readonly [0.
|
|
197
|
+
readonly NAPE: readonly [-0.1, 0.12];
|
|
197
198
|
/** Drops of blood as the head bursts, and how fast they fly; a spurt from the belly and the mouth on the gut punch. */
|
|
198
199
|
readonly BURST: readonly [140, 4.5];
|
|
199
200
|
readonly SPURT: readonly [14, 8];
|
|
@@ -72,6 +72,8 @@ export interface Runner {
|
|
|
72
72
|
*/
|
|
73
73
|
mate?: number;
|
|
74
74
|
mount?: number;
|
|
75
|
+
/** The size of its prey's body to a man's (Kit size), for the xenomorph's holds on him. */
|
|
76
|
+
size?: number;
|
|
75
77
|
with?: Vec3;
|
|
76
78
|
/** The xenomorph's belly as last drawn, for its prey's hands; the seconds it eats on after the kill. */
|
|
77
79
|
bust?: Vec3;
|
|
@@ -321,7 +321,7 @@ export declare const XENO_FEED = 1;
|
|
|
321
321
|
export declare const EXEC: {
|
|
322
322
|
readonly TICKS: 88;
|
|
323
323
|
readonly REACH: 1.3;
|
|
324
|
-
readonly FIST: 0.
|
|
324
|
+
readonly FIST: 0.85;
|
|
325
325
|
readonly CUTS: readonly [26, 71];
|
|
326
326
|
readonly KILLER: 1;
|
|
327
327
|
readonly VICTIM: 2;
|
|
@@ -51,6 +51,13 @@ export interface Kit {
|
|
|
51
51
|
xeno: boolean;
|
|
52
52
|
/** The Hunter's class identity, used for its weapons and alternate vision modes. */
|
|
53
53
|
hunter?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* A glory kill's spacing (room.ts feast()): metres this body stands further from the other one
|
|
56
|
+
* than a man's would, front to back, so the two do not go into each other (the user, 2026-11-24).
|
|
57
|
+
*/
|
|
58
|
+
girth?: number;
|
|
59
|
+
/** His body's size to a man's (the Hunter's model is 1.2 times as tall): the xenomorph climbs him to scale. */
|
|
60
|
+
size?: number;
|
|
54
61
|
}
|
|
55
62
|
/** By ROLE. The astronaut moves and fights as the marine: the moon's gravity is the map's. */
|
|
56
63
|
export declare const KITS: readonly Kit[];
|
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.219.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist"
|