@korial29/tiny-fps 0.172.0 → 0.173.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 +1 -1
- package/dist/local.js +1 -1
- package/dist/server.js +5 -4
- package/dist/types/client/chase.d.ts +7 -2
- package/dist/types/shared/constants.d.ts +1 -1
- package/package.json +3 -2
package/dist/server.js
CHANGED
|
@@ -1627,8 +1627,8 @@ var cling = (p, w, c) => {
|
|
|
1627
1627
|
var tailing = (p) => !!p.swing && p.cut !== BLOW.CLAW_L && p.cut !== BLOW.CLAW_R;
|
|
1628
1628
|
/**
|
|
1629
1629
|
* The xenomorph's dash: DASH held on a floor or a wall, with the dash timer run out, charges a
|
|
1630
|
-
* pounce (`charge`); let go, it leaps
|
|
1631
|
-
* the charge. Anywhere else, or stumbling, the charge is lost.
|
|
1630
|
+
* pounce (`charge`); let go, it leaps toward the keys held (the look with none: the user,
|
|
1631
|
+
* 2026-11-16), at least POUNCE_PITCH up, faster the longer the charge. Anywhere else, or stumbling, the charge is lost.
|
|
1632
1632
|
*/
|
|
1633
1633
|
var pounce = (p, c) => {
|
|
1634
1634
|
if (tailing(p)) return;
|
|
@@ -1644,8 +1644,9 @@ var pounce = (p, c) => {
|
|
|
1644
1644
|
if (p.mode !== MODE.CLING) p.wall = SIDE$1.NONE;
|
|
1645
1645
|
p.ev |= p.mode === MODE.SLIDE ? EV.SLIDE_END : 0;
|
|
1646
1646
|
enter(p, MODE.AIR);
|
|
1647
|
-
|
|
1648
|
-
p.
|
|
1647
|
+
const [dx, dz] = c.wx || c.wz ? [c.wx, c.wz] : [c.fx, c.fz];
|
|
1648
|
+
p.vx = dx * cp * v;
|
|
1649
|
+
p.vz = dz * cp * v;
|
|
1649
1650
|
leap$1(p, Math.sin(pitch) * v);
|
|
1650
1651
|
p.dash = POUNCE_COOL;
|
|
1651
1652
|
p.ev |= EV.DASH;
|
|
@@ -2,10 +2,15 @@ import type { Rover } from '../shared/types';
|
|
|
2
2
|
import type { World } from '../shared/world';
|
|
3
3
|
import type { Vec3 } from './mesh';
|
|
4
4
|
export declare const CHASE: {
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* The pivot above the rover's centre, the camera behind it along the look, and above that line:
|
|
7
|
+
* metres. RISE keeps the view over the rover's roll bar onto what its lasers strike from AIM_MIN
|
|
8
|
+
* on: at 0.6 a strike nearer than some 25 m, and the bolts on their way to it, were behind the
|
|
9
|
+
* rover itself (a level look on the moon's rolling ground meets it that near).
|
|
10
|
+
*/
|
|
6
11
|
readonly UP: 1.6;
|
|
7
12
|
readonly BACK: 6.5;
|
|
8
|
-
readonly RISE:
|
|
13
|
+
readonly RISE: 1.6;
|
|
9
14
|
/** The spring the pivot trails the rover on, and the one the camera backs out on after a wall pulled it in (1 / s). */
|
|
10
15
|
readonly W: 16;
|
|
11
16
|
readonly OUT: 5;
|
|
@@ -261,7 +261,7 @@ export declare const PUNCH_HITS: number, PUNCH_STUN: number, PUNCH_MEMORY: numbe
|
|
|
261
261
|
* forward and the sprint held (MODE.CLING, physics.ts; the sprint since the user, 2026-11-16): CLING_SPEED m/s up, down or along it while the wall rises
|
|
262
262
|
* CLING_HOLD m over its feet; a jump kicks it off along the look at CLING_LEAP m/s. DASH held on a
|
|
263
263
|
* floor or a wall charges a pounce for up to POUNCE_HOLD ticks (PlayerState.charge); let go, it
|
|
264
|
-
* leaps POUNCE_MIN to POUNCE_MAX m/s
|
|
264
|
+
* leaps POUNCE_MIN to POUNCE_MAX m/s toward the keys held (the look with none), at least POUNCE_PITCH up, and the dash timer
|
|
265
265
|
* runs from POUNCE_COOL: the first POUNCE_FLY ticks of it in the air, an enemy it reaches is
|
|
266
266
|
* pinned (room.ts): POUNCE_HP health, his flag dropped, a stumble of POUNCE_STUN ticks. An enemy
|
|
267
267
|
* whose katana or fists hit it loses ACID_HP.
|
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.173.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist"
|
|
@@ -67,7 +67,8 @@
|
|
|
67
67
|
"lint": "npm run lint:prettier && npm run lint:eslint && npm run lint:tsc",
|
|
68
68
|
"format": "npm run format:prettier && npm run format:eslint",
|
|
69
69
|
"test": "vitest run --coverage",
|
|
70
|
-
"test:ci": "vitest run --
|
|
70
|
+
"test:ci": "vitest run --maxWorkers=100% --passWithNoTests",
|
|
71
|
+
"test:durations": "vitest run --reporter=json --outputFile=node_modules/.cache/vitest-report.json && node scripts/durations.mjs node_modules/.cache/vitest-report.json",
|
|
71
72
|
"test:watch": "vitest --watch"
|
|
72
73
|
},
|
|
73
74
|
"devDependencies": {
|