@genex-ai/multiplayer 0.17.1 → 0.17.8
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/PROTOCOL.md +761 -9
- package/README.md +285 -1
- package/WORLD-GLTF.md +109 -0
- package/WORLD-SCENE.md +135 -0
- package/dist/authority/fast-udp.d.ts +15 -0
- package/dist/authority/fast-udp.js +14 -0
- package/dist/authority/fast-webtransport.d.ts +67 -0
- package/dist/authority/fast-webtransport.js +21 -0
- package/dist/authority/index.d.ts +2671 -0
- package/dist/authority/index.js +958 -0
- package/dist/authority/module.d.ts +2 -0
- package/dist/authority/module.js +12 -0
- package/dist/bridge-authority.d.ts +101 -0
- package/dist/bridge-authority.global.js +15 -0
- package/dist/bridge-authority.js +291 -0
- package/dist/bridge-core-Dhc73GC8.d.ts +27 -0
- package/dist/bridge.d.ts +26 -20
- package/dist/bridge.global.js +7 -7
- package/dist/bridge.js +17 -48
- package/dist/chunk-2NGXXQDS.js +1916 -0
- package/dist/chunk-4R7C2TLH.js +68 -0
- package/dist/{chunk-C52XFIB6.js → chunk-CSQEEANB.js} +217 -4
- package/dist/chunk-FPWP22Y7.js +143 -0
- package/dist/chunk-NFMGIKFZ.js +2627 -0
- package/dist/chunk-OD6NRSX2.js +29 -0
- package/dist/{chunk-3ZUPU3GT.js → chunk-QY3QQNDJ.js} +13 -122
- package/dist/chunk-QZOCUQJT.js +6900 -0
- package/dist/chunk-TSYEWPVO.js +44 -0
- package/dist/chunk-TVTVIMIH.js +675 -0
- package/dist/chunk-YWQ3ALYY.js +69 -0
- package/dist/fast-client--A88q0kk.d.ts +546 -0
- package/dist/index.d.ts +3 -5
- package/dist/index.js +3 -2
- package/dist/join-CGoInvUM.d.ts +6 -0
- package/dist/level-build-CbRqrYJq.d.ts +140 -0
- package/dist/module-CSpXrzFc.d.ts +1187 -0
- package/dist/physics-predict-C7ZB1gDG.d.ts +1223 -0
- package/dist/protocol.d.ts +222 -2
- package/dist/protocol.js +47 -1
- package/dist/shot-world-D22tqOUT.d.ts +485 -0
- package/dist/world-fit/index.d.ts +549 -0
- package/dist/world-fit/index.js +4763 -0
- package/dist/world-fit/three.d.ts +77 -0
- package/dist/world-fit/three.js +140 -0
- package/package.json +46 -4
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// src/authority/shot-world.ts
|
|
2
|
+
var WorldKey = { Shot: "shot" };
|
|
3
|
+
var ClaimVerdict = {
|
|
4
|
+
/** Within the tolerance of the shot world's stop: the claim stands. */
|
|
5
|
+
Accepted: "accepted",
|
|
6
|
+
/** Past the shot world's stop by more than the tolerance: the shot stops there. */
|
|
7
|
+
Refused: "refused",
|
|
8
|
+
/** Short of the shot world's stop by more than the tolerance: raised to the tolerance. */
|
|
9
|
+
Capped: "capped",
|
|
10
|
+
/** Past it, through one wall of no more than the weapon's `pierce`. */
|
|
11
|
+
Pierced: "pierced",
|
|
12
|
+
/** The weapon's `rule` said. */
|
|
13
|
+
Ruled: "ruled"
|
|
14
|
+
};
|
|
15
|
+
var ShotWorldCost = {
|
|
16
|
+
/** Eight shots a tick at this cost are one seat's share of a step (16,000 operations, world-cost's budget). */
|
|
17
|
+
MAX_OPS_PER_RAY: 2e3,
|
|
18
|
+
RAYS: 128,
|
|
19
|
+
SEED: 2027,
|
|
20
|
+
/** Solids a room may hold, its world and its shot world together: at the .46 KiB a solid a real room measured (module text included,
|
|
21
|
+
* yard 152 m, 14.9 MiB at 33,233), this leaves the module a tenth of the 25.6 MiB a room is ended at. */
|
|
22
|
+
MAX_ROOM_SOLIDS: 49152,
|
|
23
|
+
/** Surfaces a piercing claim may walk: a wall of a thousand slabs costs what this many do. */
|
|
24
|
+
MAX_CLAIM_WALKS: 8,
|
|
25
|
+
/** The least a ray is taken to face a surface: how far along a graze the tolerance reaches, at most four times itself. Swept on the corpus (world-shots.yml,
|
|
26
|
+
* run 42297695700, at each world's stated tolerance, 38 and 76 m, mean of 8 rows): from 1/2 to 1/4 honest claims refused or capped fall from 8.3% to 7.2% and a
|
|
27
|
+
* hostile reach past a real surface at p99 doubles to 17 units; from 1/4 to 1/16 honest gains .3 more, for a reach of 51 units and a shot through at 48 of 3.1%, 0 before. */
|
|
28
|
+
MIN_CLAIM_FACING: 1 / 4
|
|
29
|
+
};
|
|
30
|
+
function claimToAxis(dist, range) {
|
|
31
|
+
if (dist === null || !(dist < range)) return 1;
|
|
32
|
+
return dist <= 0 ? -1 : 2 * dist / range - 1;
|
|
33
|
+
}
|
|
34
|
+
function axisToClaim(axis, range) {
|
|
35
|
+
return axis >= 1 ? null : (axis + 1) * range / 2;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export {
|
|
39
|
+
WorldKey,
|
|
40
|
+
ClaimVerdict,
|
|
41
|
+
ShotWorldCost,
|
|
42
|
+
claimToAxis,
|
|
43
|
+
axisToClaim
|
|
44
|
+
};
|