@series-inc/rundot-syncplay 6.0.0-rc.21 → 6.0.0-rc.22
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/core/src/physics/physics-wasm-module.generated.mjs +1 -1
- package/core/src/physics2d/physics2d-wasm-module.generated.mjs +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/movement3d.d.ts +4 -0
- package/dist/movement3d.js +126 -1
- package/dist/physics/units.d.ts +57 -1
- package/dist/physics/units.js +36 -0
- package/dist/physics/vehicle-state3d.d.ts +4 -0
- package/dist/physics/vehicle-state3d.js +163 -38
- package/package.json +2 -2
|
@@ -23,7 +23,7 @@ export const physicsWasmMetadata = Object.freeze({
|
|
|
23
23
|
"sourceHash": "30d67b9dfdb77f788603b2a93728e54bec583b44178914b495ed5722b10e15e7",
|
|
24
24
|
"wasmSha256": "c5270d88e727d25069dd211f1994e04e9a1d6dfcb481b38244d7c0165888ad42",
|
|
25
25
|
"artifact": "production",
|
|
26
|
-
"packageVersion": "6.0.0-rc.
|
|
26
|
+
"packageVersion": "6.0.0-rc.22",
|
|
27
27
|
"compilerFlags": [
|
|
28
28
|
"-std=c++20",
|
|
29
29
|
"-O3",
|
|
@@ -50,7 +50,7 @@ export const physics2dWasmMetadata = Object.freeze({
|
|
|
50
50
|
"sourceHash": "faa090a03a6fddaf79c704fb1d76f810955ff35597449c8cec9541a75905a37e",
|
|
51
51
|
"wasmSha256": "49cb90541deed40f5fff1015bb578e13ec9a793d51931c1227e3e5a11bbfa3f7",
|
|
52
52
|
"artifact": "production",
|
|
53
|
-
"packageVersion": "6.0.0-rc.
|
|
53
|
+
"packageVersion": "6.0.0-rc.22",
|
|
54
54
|
"compilerFlags": [
|
|
55
55
|
"-std=c++20",
|
|
56
56
|
"-O3",
|
package/dist/index.d.ts
CHANGED
|
@@ -22,7 +22,9 @@ export { buildDeterministicLagCompensatedHitboxProxies3D, createDeterministicLag
|
|
|
22
22
|
export { createDeterministicLocalAuthoritySnapshotChunkEnvelope, createDeterministicLocalAuthoritySnapshotCompleteEnvelope, createDeterministicLocalAuthoritySnapshotOfferEnvelope, createDeterministicLocalAuthoritySnapshotRequestEnvelope, decodeDeterministicLocalAuthorityWireEnvelope, deterministicLocalAuthorityWireProtocol, encodeDeterministicLocalAuthorityWireEnvelope } from './local-authority-wire.js';
|
|
23
23
|
export { createDeterministicMath, isDeterministicMathInstalled } from './math.js';
|
|
24
24
|
export { rewindDeterministicTargets, runDeterministicMovementCrowdSimulation, runDeterministicMovementSimulation, stepDeterministicFpsAim, stepDeterministicKcc2D, stepDeterministicTopDownMover, validateDeterministicLagCompensatedHit } from './movement.js';
|
|
25
|
-
export { stepDeterministicCarry3D, stepDeterministicKcc3D } from './movement3d.js';
|
|
25
|
+
export { stepDeterministicCarry3D, stepDeterministicKcc3D, type DeterministicKccSupport3D, encodeDeterministicKccSupport3D, decodeDeterministicKccSupport3D, encodeDeterministicKccSupport3DBytes, decodeDeterministicKccSupport3DBytes, } from './movement3d.js';
|
|
26
|
+
export { encodeDeterministicVehicleState3D, decodeDeterministicVehicleState3D, encodeDeterministicVehicleState3DBytes, decodeDeterministicVehicleState3DBytes, } from './physics/vehicle-state3d.js';
|
|
27
|
+
export { vec3, meters3, radians3, metersPerSecond3, metersPerSecondSquared3, newtons3, vec2, meters2, radians2, metersPerSecond2, } from './physics/units.js';
|
|
26
28
|
export { applyDeterministicReciprocalAvoidance, cookDeterministicNavigationGraph, cookTilemapNavigationGraph, createDeterministicFlowField, findDeterministicPath, smoothDeterministicPath, stepDeterministicNavigationAgents } from './navigation.js';
|
|
27
29
|
export { cookDeterministicNavmesh, cookImportedDeterministicNavmesh, findDeterministicNavmeshPath, findDeterministicNavmeshPointPath, locateDeterministicNavmeshPolygon, runDeterministicNavmeshStress, smoothDeterministicNavmeshPath, stepDeterministicNavmeshAgents, stepDeterministicNavmeshOffMeshTraversal } from './navmesh.js';
|
|
28
30
|
export { createNetworkedSyncplayClient, prepareNetworkedSyncplayTransport } from './networked-client.js';
|
package/dist/index.js
CHANGED
|
@@ -22,7 +22,9 @@ export { buildDeterministicLagCompensatedHitboxProxies3D, createDeterministicLag
|
|
|
22
22
|
export { createDeterministicLocalAuthoritySnapshotChunkEnvelope, createDeterministicLocalAuthoritySnapshotCompleteEnvelope, createDeterministicLocalAuthoritySnapshotOfferEnvelope, createDeterministicLocalAuthoritySnapshotRequestEnvelope, decodeDeterministicLocalAuthorityWireEnvelope, deterministicLocalAuthorityWireProtocol, encodeDeterministicLocalAuthorityWireEnvelope } from './local-authority-wire.js';
|
|
23
23
|
export { createDeterministicMath, isDeterministicMathInstalled } from './math.js';
|
|
24
24
|
export { rewindDeterministicTargets, runDeterministicMovementCrowdSimulation, runDeterministicMovementSimulation, stepDeterministicFpsAim, stepDeterministicKcc2D, stepDeterministicTopDownMover, validateDeterministicLagCompensatedHit } from './movement.js';
|
|
25
|
-
export { stepDeterministicCarry3D, stepDeterministicKcc3D } from './movement3d.js';
|
|
25
|
+
export { stepDeterministicCarry3D, stepDeterministicKcc3D, encodeDeterministicKccSupport3D, decodeDeterministicKccSupport3D, encodeDeterministicKccSupport3DBytes, decodeDeterministicKccSupport3DBytes, } from './movement3d.js';
|
|
26
|
+
export { encodeDeterministicVehicleState3D, decodeDeterministicVehicleState3D, encodeDeterministicVehicleState3DBytes, decodeDeterministicVehicleState3DBytes, } from './physics/vehicle-state3d.js';
|
|
27
|
+
export { vec3, meters3, radians3, metersPerSecond3, metersPerSecondSquared3, newtons3, vec2, meters2, radians2, metersPerSecond2, } from './physics/units.js';
|
|
26
28
|
export { applyDeterministicReciprocalAvoidance, cookDeterministicNavigationGraph, cookTilemapNavigationGraph, createDeterministicFlowField, findDeterministicPath, smoothDeterministicPath, stepDeterministicNavigationAgents } from './navigation.js';
|
|
27
29
|
export { cookDeterministicNavmesh, cookImportedDeterministicNavmesh, findDeterministicNavmeshPath, findDeterministicNavmeshPointPath, locateDeterministicNavmeshPolygon, runDeterministicNavmeshStress, smoothDeterministicNavmeshPath, stepDeterministicNavmeshAgents, stepDeterministicNavmeshOffMeshTraversal } from './navmesh.js';
|
|
28
30
|
export { createNetworkedSyncplayClient, prepareNetworkedSyncplayTransport } from './networked-client.js';
|
package/dist/movement3d.d.ts
CHANGED
|
@@ -347,3 +347,7 @@ export declare function runDeterministicKcc3DCrowdFixture(players: number, frame
|
|
|
347
347
|
}>;
|
|
348
348
|
export declare function runDeterministicKcc3DAdversarialFixture(): Promise<DeterministicKcc3DAdversarialFixtureResult>;
|
|
349
349
|
export declare function runDeterministicKcc3DGeometryFixture(): Promise<DeterministicKcc3DGeometryFixtureResult>;
|
|
350
|
+
export declare function encodeDeterministicKccSupport3D(support: DeterministicKccSupport3D): string;
|
|
351
|
+
export declare function decodeDeterministicKccSupport3D(json: string): DeterministicKccSupport3D;
|
|
352
|
+
export declare function encodeDeterministicKccSupport3DBytes(support: DeterministicKccSupport3D): Uint8Array;
|
|
353
|
+
export declare function decodeDeterministicKccSupport3DBytes(bytes: Uint8Array): DeterministicKccSupport3D;
|
package/dist/movement3d.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { defaultChecksum } from './canonical.js';
|
|
1
|
+
import { canonicalParse, canonicalStringify, decodeCanonicalBytes, defaultChecksum, encodeCanonicalBytes, } from './canonical.js';
|
|
2
|
+
import { SyncplayError } from './errors.js';
|
|
2
3
|
import { stepDeterministicKccRevision1_3D } from './movement3d-revision1.js';
|
|
3
4
|
import { createPhysicsWorld3D, initPhysics3D, } from './physics/3d.js';
|
|
4
5
|
import { meters, metersPerSecond, metersPerSecondSquared, } from './physics/units.js';
|
|
@@ -2474,3 +2475,127 @@ function stableKeys(record) {
|
|
|
2474
2475
|
function compareStrings(left, right) {
|
|
2475
2476
|
return left < right ? -1 : left > right ? 1 : 0;
|
|
2476
2477
|
}
|
|
2478
|
+
export function encodeDeterministicKccSupport3D(support) {
|
|
2479
|
+
if (!support || typeof support !== "object" || !("kind" in support)) {
|
|
2480
|
+
throw new SyncplayError("Deterministic KCC support is invalid", {
|
|
2481
|
+
code: "kinetix.kcc.support-invalid",
|
|
2482
|
+
});
|
|
2483
|
+
}
|
|
2484
|
+
if (support.kind === "physics" && (typeof support.bodyId !== "bigint" || support.bodyId <= 0n)) {
|
|
2485
|
+
throw new SyncplayError("Deterministic KCC physics support requires a positive bigint bodyId", {
|
|
2486
|
+
code: "kinetix.kcc.support-invalid",
|
|
2487
|
+
});
|
|
2488
|
+
}
|
|
2489
|
+
if (support.kind === "analytic" && (typeof support.id !== "string" || support.id.length === 0)) {
|
|
2490
|
+
throw new SyncplayError("Deterministic KCC analytic support requires a non-empty id", {
|
|
2491
|
+
code: "kinetix.kcc.support-invalid",
|
|
2492
|
+
});
|
|
2493
|
+
}
|
|
2494
|
+
if (support.kind !== "none" && support.kind !== "analytic" && support.kind !== "physics") {
|
|
2495
|
+
throw new SyncplayError("Deterministic KCC support kind is invalid", {
|
|
2496
|
+
code: "kinetix.kcc.support-invalid",
|
|
2497
|
+
});
|
|
2498
|
+
}
|
|
2499
|
+
return canonicalStringify(support);
|
|
2500
|
+
}
|
|
2501
|
+
export function decodeDeterministicKccSupport3D(json) {
|
|
2502
|
+
if (typeof json !== "string") {
|
|
2503
|
+
throw new SyncplayError("KCC support payload must be a string", {
|
|
2504
|
+
code: "kinetix.kcc.payload-invalid",
|
|
2505
|
+
});
|
|
2506
|
+
}
|
|
2507
|
+
let decoded;
|
|
2508
|
+
try {
|
|
2509
|
+
decoded = canonicalParse(json);
|
|
2510
|
+
}
|
|
2511
|
+
catch (cause) {
|
|
2512
|
+
throw new SyncplayError("Failed to parse KCC support JSON", {
|
|
2513
|
+
code: "kinetix.kcc.payload-invalid",
|
|
2514
|
+
cause,
|
|
2515
|
+
});
|
|
2516
|
+
}
|
|
2517
|
+
if (!decoded || typeof decoded !== "object" || !("kind" in decoded)) {
|
|
2518
|
+
throw new SyncplayError("Deterministic KCC support payload is invalid", {
|
|
2519
|
+
code: "kinetix.kcc.payload-invalid",
|
|
2520
|
+
});
|
|
2521
|
+
}
|
|
2522
|
+
const s = decoded;
|
|
2523
|
+
if (s.kind !== "none" && s.kind !== "analytic" && s.kind !== "physics") {
|
|
2524
|
+
throw new SyncplayError("Deterministic KCC support payload kind is invalid", {
|
|
2525
|
+
code: "kinetix.kcc.payload-invalid",
|
|
2526
|
+
});
|
|
2527
|
+
}
|
|
2528
|
+
if (s.kind === "physics" && (typeof s.bodyId !== "bigint" || s.bodyId <= 0n)) {
|
|
2529
|
+
throw new SyncplayError("Deterministic KCC physics support payload requires a positive bigint bodyId", {
|
|
2530
|
+
code: "kinetix.kcc.payload-invalid",
|
|
2531
|
+
});
|
|
2532
|
+
}
|
|
2533
|
+
if (s.kind === "analytic" && (typeof s.id !== "string" || s.id.length === 0)) {
|
|
2534
|
+
throw new SyncplayError("Deterministic KCC analytic support payload requires a non-empty id", {
|
|
2535
|
+
code: "kinetix.kcc.payload-invalid",
|
|
2536
|
+
});
|
|
2537
|
+
}
|
|
2538
|
+
return s;
|
|
2539
|
+
}
|
|
2540
|
+
export function encodeDeterministicKccSupport3DBytes(support) {
|
|
2541
|
+
if (!support || typeof support !== "object" || !("kind" in support)) {
|
|
2542
|
+
throw new SyncplayError("Deterministic KCC support is invalid", {
|
|
2543
|
+
code: "kinetix.kcc.support-invalid",
|
|
2544
|
+
});
|
|
2545
|
+
}
|
|
2546
|
+
if (support.kind === "physics" && (typeof support.bodyId !== "bigint" || support.bodyId <= 0n)) {
|
|
2547
|
+
throw new SyncplayError("Deterministic KCC physics support requires a positive bigint bodyId", {
|
|
2548
|
+
code: "kinetix.kcc.support-invalid",
|
|
2549
|
+
});
|
|
2550
|
+
}
|
|
2551
|
+
if (support.kind === "analytic" && (typeof support.id !== "string" || support.id.length === 0)) {
|
|
2552
|
+
throw new SyncplayError("Deterministic KCC analytic support requires a non-empty id", {
|
|
2553
|
+
code: "kinetix.kcc.support-invalid",
|
|
2554
|
+
});
|
|
2555
|
+
}
|
|
2556
|
+
if (support.kind !== "none" && support.kind !== "analytic" && support.kind !== "physics") {
|
|
2557
|
+
throw new SyncplayError("Deterministic KCC support kind is invalid", {
|
|
2558
|
+
code: "kinetix.kcc.support-invalid",
|
|
2559
|
+
});
|
|
2560
|
+
}
|
|
2561
|
+
return encodeCanonicalBytes(support);
|
|
2562
|
+
}
|
|
2563
|
+
export function decodeDeterministicKccSupport3DBytes(bytes) {
|
|
2564
|
+
if (!(bytes instanceof Uint8Array)) {
|
|
2565
|
+
throw new SyncplayError("KCC support byte payload must be a Uint8Array", {
|
|
2566
|
+
code: "kinetix.kcc.payload-invalid",
|
|
2567
|
+
});
|
|
2568
|
+
}
|
|
2569
|
+
let decoded;
|
|
2570
|
+
try {
|
|
2571
|
+
decoded = decodeCanonicalBytes(bytes);
|
|
2572
|
+
}
|
|
2573
|
+
catch (cause) {
|
|
2574
|
+
throw new SyncplayError("Failed to parse KCC support byte payload", {
|
|
2575
|
+
code: "kinetix.kcc.payload-invalid",
|
|
2576
|
+
cause,
|
|
2577
|
+
});
|
|
2578
|
+
}
|
|
2579
|
+
if (!decoded || typeof decoded !== "object" || !("kind" in decoded)) {
|
|
2580
|
+
throw new SyncplayError("Deterministic KCC support byte payload is invalid", {
|
|
2581
|
+
code: "kinetix.kcc.payload-invalid",
|
|
2582
|
+
});
|
|
2583
|
+
}
|
|
2584
|
+
const s = decoded;
|
|
2585
|
+
if (s.kind !== "none" && s.kind !== "analytic" && s.kind !== "physics") {
|
|
2586
|
+
throw new SyncplayError("Deterministic KCC support byte payload kind is invalid", {
|
|
2587
|
+
code: "kinetix.kcc.payload-invalid",
|
|
2588
|
+
});
|
|
2589
|
+
}
|
|
2590
|
+
if (s.kind === "physics" && (typeof s.bodyId !== "bigint" || s.bodyId <= 0n)) {
|
|
2591
|
+
throw new SyncplayError("Deterministic KCC physics support byte payload requires a positive bigint bodyId", {
|
|
2592
|
+
code: "kinetix.kcc.payload-invalid",
|
|
2593
|
+
});
|
|
2594
|
+
}
|
|
2595
|
+
if (s.kind === "analytic" && (typeof s.id !== "string" || s.id.length === 0)) {
|
|
2596
|
+
throw new SyncplayError("Deterministic KCC analytic support byte payload requires a non-empty id", {
|
|
2597
|
+
code: "kinetix.kcc.payload-invalid",
|
|
2598
|
+
});
|
|
2599
|
+
}
|
|
2600
|
+
return s;
|
|
2601
|
+
}
|
package/dist/physics/units.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Meters, Radians, MetersPerSecond, MetersPerSecondSquared, RadiansPerSecond, Newtons, NewtonMeters, NewtonSeconds, FrameVelocity, FrameGravity, Seconds, Hertz, Kilograms, InverseKilograms, InverseKilogramMetersSquared, SquareMeters, CubicMeters, KilogramMetersSquared, KilogramsPerCubicMeter, KilogramsPerSquareMeter, NewtonsPerMeter, NewtonSecondsPerMeter, Turns, TurnsPerSecond, TurnsPerMinute, PerSecond, PerSecondSquared, SquareMetersPerSecondSquared, NewtonMeterSeconds, MetersPerRadian, RadiansPerMeter, NewtonMeterSecondsPerRadian } from '../../core/units.js';
|
|
1
|
+
import type { Meters, Radians, MetersPerSecond, MetersPerSecondSquared, RadiansPerSecond, Newtons, NewtonMeters, NewtonSeconds, FrameVelocity, FrameGravity, Seconds, Hertz, Kilograms, InverseKilograms, InverseKilogramMetersSquared, SquareMeters, CubicMeters, KilogramMetersSquared, KilogramsPerCubicMeter, KilogramsPerSquareMeter, NewtonsPerMeter, NewtonSecondsPerMeter, Turns, TurnsPerSecond, TurnsPerMinute, PerSecond, PerSecondSquared, SquareMetersPerSecondSquared, NewtonMeterSeconds, MetersPerRadian, RadiansPerMeter, NewtonMeterSecondsPerRadian, UnitVector2, UnitVector3 } from '../../core/units.js';
|
|
2
2
|
export type { Quantity, Meters, Radians, MetersPerSecond, MetersPerSecondSquared, RadiansPerSecond, Newtons, NewtonMeters, NewtonSeconds, FrameVelocity, FrameGravity, Dimensionless, Seconds, Hertz, Kilograms, InverseKilograms, InverseKilogramMetersSquared, SquareMeters, CubicMeters, KilogramMetersSquared, KilogramsPerCubicMeter, KilogramsPerSquareMeter, NewtonsPerMeter, NewtonSecondsPerMeter, Turns, TurnsPerSecond, TurnsPerMinute, PerSecond, PerSecondSquared, SquareMetersPerSecondSquared, NewtonMeterSeconds, MetersPerRadian, RadiansPerMeter, NewtonMeterSecondsPerRadian, UnitVector2, UnitVector3, } from '../../core/units.js';
|
|
3
3
|
export declare const meters: (value: number) => Meters;
|
|
4
4
|
export declare const radians: (value: number) => Radians;
|
|
@@ -36,3 +36,59 @@ export declare function velocityToFrame(value: MetersPerSecond, tickRate: number
|
|
|
36
36
|
export declare function velocityToSeconds(value: FrameVelocity, tickRate: number): MetersPerSecond;
|
|
37
37
|
export declare function gravityToFrame(value: MetersPerSecondSquared, tickRate: number): FrameGravity;
|
|
38
38
|
export declare function gravityToSeconds(value: FrameGravity, tickRate: number): MetersPerSecondSquared;
|
|
39
|
+
export declare function vec3<Quantity extends number>(brand: (value: number) => Quantity, x: number, y: number, z: number): UnitVector3<Quantity>;
|
|
40
|
+
export declare function vec3<Quantity extends number>(brand: (value: number) => Quantity, v: {
|
|
41
|
+
readonly x: number;
|
|
42
|
+
readonly y: number;
|
|
43
|
+
readonly z: number;
|
|
44
|
+
}): UnitVector3<Quantity>;
|
|
45
|
+
export declare function vec2<Quantity extends number>(brand: (value: number) => Quantity, x: number, y: number): UnitVector2<Quantity>;
|
|
46
|
+
export declare function vec2<Quantity extends number>(brand: (value: number) => Quantity, v: {
|
|
47
|
+
readonly x: number;
|
|
48
|
+
readonly y: number;
|
|
49
|
+
}): UnitVector2<Quantity>;
|
|
50
|
+
export declare function meters3(x: number, y: number, z: number): UnitVector3<Meters>;
|
|
51
|
+
export declare function meters3(v: {
|
|
52
|
+
readonly x: number;
|
|
53
|
+
readonly y: number;
|
|
54
|
+
readonly z: number;
|
|
55
|
+
}): UnitVector3<Meters>;
|
|
56
|
+
export declare function radians3(x: number, y: number, z: number): UnitVector3<Radians>;
|
|
57
|
+
export declare function radians3(v: {
|
|
58
|
+
readonly x: number;
|
|
59
|
+
readonly y: number;
|
|
60
|
+
readonly z: number;
|
|
61
|
+
}): UnitVector3<Radians>;
|
|
62
|
+
export declare function metersPerSecond3(x: number, y: number, z: number): UnitVector3<MetersPerSecond>;
|
|
63
|
+
export declare function metersPerSecond3(v: {
|
|
64
|
+
readonly x: number;
|
|
65
|
+
readonly y: number;
|
|
66
|
+
readonly z: number;
|
|
67
|
+
}): UnitVector3<MetersPerSecond>;
|
|
68
|
+
export declare function metersPerSecondSquared3(x: number, y: number, z: number): UnitVector3<MetersPerSecondSquared>;
|
|
69
|
+
export declare function metersPerSecondSquared3(v: {
|
|
70
|
+
readonly x: number;
|
|
71
|
+
readonly y: number;
|
|
72
|
+
readonly z: number;
|
|
73
|
+
}): UnitVector3<MetersPerSecondSquared>;
|
|
74
|
+
export declare function newtons3(x: number, y: number, z: number): UnitVector3<Newtons>;
|
|
75
|
+
export declare function newtons3(v: {
|
|
76
|
+
readonly x: number;
|
|
77
|
+
readonly y: number;
|
|
78
|
+
readonly z: number;
|
|
79
|
+
}): UnitVector3<Newtons>;
|
|
80
|
+
export declare function meters2(x: number, y: number): UnitVector2<Meters>;
|
|
81
|
+
export declare function meters2(v: {
|
|
82
|
+
readonly x: number;
|
|
83
|
+
readonly y: number;
|
|
84
|
+
}): UnitVector2<Meters>;
|
|
85
|
+
export declare function radians2(x: number, y: number): UnitVector2<Radians>;
|
|
86
|
+
export declare function radians2(v: {
|
|
87
|
+
readonly x: number;
|
|
88
|
+
readonly y: number;
|
|
89
|
+
}): UnitVector2<Radians>;
|
|
90
|
+
export declare function metersPerSecond2(x: number, y: number): UnitVector2<MetersPerSecond>;
|
|
91
|
+
export declare function metersPerSecond2(v: {
|
|
92
|
+
readonly x: number;
|
|
93
|
+
readonly y: number;
|
|
94
|
+
}): UnitVector2<MetersPerSecond>;
|
package/dist/physics/units.js
CHANGED
|
@@ -54,3 +54,39 @@ export function gravityToSeconds(value, tickRate) {
|
|
|
54
54
|
const rate = validTickRate(tickRate);
|
|
55
55
|
return metersPerSecondSquared(value * rate * rate);
|
|
56
56
|
}
|
|
57
|
+
export function vec3(brand, xOrVec, y, z) {
|
|
58
|
+
if (typeof xOrVec === 'object' && xOrVec !== null) {
|
|
59
|
+
return Object.freeze({ x: brand(xOrVec.x), y: brand(xOrVec.y), z: brand(xOrVec.z) });
|
|
60
|
+
}
|
|
61
|
+
return Object.freeze({ x: brand(xOrVec), y: brand(y), z: brand(z) });
|
|
62
|
+
}
|
|
63
|
+
export function vec2(brand, xOrVec, y) {
|
|
64
|
+
if (typeof xOrVec === 'object' && xOrVec !== null) {
|
|
65
|
+
return Object.freeze({ x: brand(xOrVec.x), y: brand(xOrVec.y) });
|
|
66
|
+
}
|
|
67
|
+
return Object.freeze({ x: brand(xOrVec), y: brand(y) });
|
|
68
|
+
}
|
|
69
|
+
export function meters3(xOrVec, y, z) {
|
|
70
|
+
return typeof xOrVec === 'object' && xOrVec !== null ? vec3(meters, xOrVec) : vec3(meters, xOrVec, y, z);
|
|
71
|
+
}
|
|
72
|
+
export function radians3(xOrVec, y, z) {
|
|
73
|
+
return typeof xOrVec === 'object' && xOrVec !== null ? vec3(radians, xOrVec) : vec3(radians, xOrVec, y, z);
|
|
74
|
+
}
|
|
75
|
+
export function metersPerSecond3(xOrVec, y, z) {
|
|
76
|
+
return typeof xOrVec === 'object' && xOrVec !== null ? vec3(metersPerSecond, xOrVec) : vec3(metersPerSecond, xOrVec, y, z);
|
|
77
|
+
}
|
|
78
|
+
export function metersPerSecondSquared3(xOrVec, y, z) {
|
|
79
|
+
return typeof xOrVec === 'object' && xOrVec !== null ? vec3(metersPerSecondSquared, xOrVec) : vec3(metersPerSecondSquared, xOrVec, y, z);
|
|
80
|
+
}
|
|
81
|
+
export function newtons3(xOrVec, y, z) {
|
|
82
|
+
return typeof xOrVec === 'object' && xOrVec !== null ? vec3(newtons, xOrVec) : vec3(newtons, xOrVec, y, z);
|
|
83
|
+
}
|
|
84
|
+
export function meters2(xOrVec, y) {
|
|
85
|
+
return typeof xOrVec === 'object' && xOrVec !== null ? vec2(meters, xOrVec) : vec2(meters, xOrVec, y);
|
|
86
|
+
}
|
|
87
|
+
export function radians2(xOrVec, y) {
|
|
88
|
+
return typeof xOrVec === 'object' && xOrVec !== null ? vec2(radians, xOrVec) : vec2(radians, xOrVec, y);
|
|
89
|
+
}
|
|
90
|
+
export function metersPerSecond2(xOrVec, y) {
|
|
91
|
+
return typeof xOrVec === 'object' && xOrVec !== null ? vec2(metersPerSecond, xOrVec) : vec2(metersPerSecond, xOrVec, y);
|
|
92
|
+
}
|
|
@@ -90,4 +90,8 @@ export declare function stepDeterministicVehicleState3D(definition: Deterministi
|
|
|
90
90
|
readonly checksumMode?: 'required';
|
|
91
91
|
}): DeterministicVehicleStateStepWithChecksum3D;
|
|
92
92
|
export declare function stepDeterministicVehicleState3D(definition: DeterministicVehicleDefinition3D, state: DeterministicVehicleState3D, input: DeterministicVehicleInput3D, world: PhysicsWorld3D, options?: DeterministicVehicleStateStepOptions3D): DeterministicVehicleStateStepResult3D;
|
|
93
|
+
export declare function encodeDeterministicVehicleState3D(state: DeterministicVehicleState3D): string;
|
|
94
|
+
export declare function decodeDeterministicVehicleState3D(json: string): DeterministicVehicleState3D;
|
|
95
|
+
export declare function encodeDeterministicVehicleState3DBytes(state: DeterministicVehicleState3D): Uint8Array;
|
|
96
|
+
export declare function decodeDeterministicVehicleState3DBytes(bytes: Uint8Array): DeterministicVehicleState3D;
|
|
93
97
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defaultChecksum } from '../canonical.js';
|
|
1
|
+
import { canonicalParse, canonicalStringify, decodeCanonicalBytes, defaultChecksum, encodeCanonicalBytes, } from '../canonical.js';
|
|
2
2
|
import { SyncplayError } from '../errors.js';
|
|
3
3
|
import { meters, newtons, newtonSecondsPerMeter, newtonsPerMeter, turns, } from './units.js';
|
|
4
4
|
const fixedScale = 1000;
|
|
@@ -132,15 +132,22 @@ function directionalMobility(mobility, arm, direction) {
|
|
|
132
132
|
+ direction.z * direction.z * mobility.inverseLinear.z
|
|
133
133
|
+ dot(angularArm, response);
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function integrateDirect(body, ix, iy, iz, arm) {
|
|
136
136
|
if (!body.dynamic)
|
|
137
137
|
return;
|
|
138
|
-
body.velocity.linear
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
138
|
+
body.velocity.linear.x += body.mobility.inverseLinear.x * ix;
|
|
139
|
+
body.velocity.linear.y += body.mobility.inverseLinear.y * iy;
|
|
140
|
+
body.velocity.linear.z += body.mobility.inverseLinear.z * iz;
|
|
141
|
+
const tx = arm.y * iz - arm.z * iy;
|
|
142
|
+
const ty = arm.z * ix - arm.x * iz;
|
|
143
|
+
const tz = arm.x * iy - arm.y * ix;
|
|
144
|
+
const ia = body.mobility.inverseAngular;
|
|
145
|
+
body.velocity.angular.x += ia[0] * tx + ia[1] * ty + ia[2] * tz;
|
|
146
|
+
body.velocity.angular.y += ia[1] * tx + ia[3] * ty + ia[4] * tz;
|
|
147
|
+
body.velocity.angular.z += ia[2] * tx + ia[4] * ty + ia[5] * tz;
|
|
148
|
+
}
|
|
149
|
+
function integrate(body, impulse, arm) {
|
|
150
|
+
integrateDirect(body, impulse.x, impulse.y, impulse.z, arm);
|
|
144
151
|
}
|
|
145
152
|
function pointVelocity(body, point) {
|
|
146
153
|
const arm = sub(point, body.com);
|
|
@@ -172,31 +179,41 @@ function exactZero(value) {
|
|
|
172
179
|
function sameBits(left, right) {
|
|
173
180
|
return Object.is(left, right);
|
|
174
181
|
}
|
|
182
|
+
const clippedDiskResult = { forward: 0, side: 0 };
|
|
175
183
|
function clipDisk(oldForward, oldSide, nextForward, nextSide, radius) {
|
|
176
184
|
if (nextForward * nextForward + nextSide * nextSide <= radius * radius) {
|
|
177
|
-
|
|
185
|
+
clippedDiskResult.forward = nextForward;
|
|
186
|
+
clippedDiskResult.side = nextSide;
|
|
187
|
+
return clippedDiskResult;
|
|
178
188
|
}
|
|
179
189
|
const deltaForward = nextForward - oldForward;
|
|
180
190
|
const deltaSide = nextSide - oldSide;
|
|
181
191
|
const a = deltaForward * deltaForward + deltaSide * deltaSide;
|
|
182
192
|
const b = 2 * (oldForward * deltaForward + oldSide * deltaSide);
|
|
183
193
|
const c = oldForward * oldForward + oldSide * oldSide - radius * radius;
|
|
184
|
-
if (!(a > 0))
|
|
185
|
-
|
|
194
|
+
if (!(a > 0)) {
|
|
195
|
+
clippedDiskResult.forward = oldForward;
|
|
196
|
+
clippedDiskResult.side = oldSide;
|
|
197
|
+
return clippedDiskResult;
|
|
198
|
+
}
|
|
186
199
|
const discriminant = b * b - 4 * a * c;
|
|
187
|
-
if (!(discriminant >= 0))
|
|
188
|
-
|
|
200
|
+
if (!(discriminant >= 0)) {
|
|
201
|
+
clippedDiskResult.forward = oldForward;
|
|
202
|
+
clippedDiskResult.side = oldSide;
|
|
203
|
+
return clippedDiskResult;
|
|
204
|
+
}
|
|
189
205
|
const root = Math.sqrt(discriminant);
|
|
190
206
|
const first = (-b - root) / (2 * a);
|
|
191
207
|
const second = (-b + root) / (2 * a);
|
|
192
|
-
const
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
208
|
+
const parameter = first >= 0 && first <= 1 ? first : (second >= 0 && second <= 1 ? second : Number.NaN);
|
|
209
|
+
if (!Number.isFinite(parameter)) {
|
|
210
|
+
clippedDiskResult.forward = oldForward;
|
|
211
|
+
clippedDiskResult.side = oldSide;
|
|
212
|
+
return clippedDiskResult;
|
|
213
|
+
}
|
|
214
|
+
clippedDiskResult.forward = oldForward + parameter * deltaForward;
|
|
215
|
+
clippedDiskResult.side = oldSide + parameter * deltaSide;
|
|
216
|
+
return clippedDiskResult;
|
|
200
217
|
}
|
|
201
218
|
function finiteNumber(value, label) {
|
|
202
219
|
if (typeof value !== 'number' || !Number.isFinite(value)) {
|
|
@@ -798,9 +815,13 @@ function solveActive(world, chassisId, chassisHandle, chassisMotion, definition,
|
|
|
798
815
|
}
|
|
799
816
|
return { wheels, tires, chassis };
|
|
800
817
|
}
|
|
818
|
+
function applyTireDirect(chassis, tire, ix, iy, iz) {
|
|
819
|
+
integrateDirect(chassis, ix, iy, iz, tire.chassisArm);
|
|
820
|
+
integrateDirect(tire.support, -ix, -iy, -iz, tire.supportArm);
|
|
821
|
+
}
|
|
801
822
|
function applyTire(chassis, tire, impulse) {
|
|
802
|
-
|
|
803
|
-
|
|
823
|
+
integrateDirect(chassis, impulse.x, impulse.y, impulse.z, tire.chassisArm);
|
|
824
|
+
integrateDirect(tire.support, -impulse.x, -impulse.y, -impulse.z, tire.supportArm);
|
|
804
825
|
}
|
|
805
826
|
function solveTires(chassis, tires) {
|
|
806
827
|
for (let iteration = 0; iteration < tireIterations; iteration += 1) {
|
|
@@ -809,30 +830,56 @@ function solveTires(chassis, tires) {
|
|
|
809
830
|
fail('physics.vehicle-invalid', 'tire mobility is not finite.');
|
|
810
831
|
}
|
|
811
832
|
if (iteration === 0 && tire.drive !== 0) {
|
|
812
|
-
|
|
813
|
-
const
|
|
814
|
-
|
|
815
|
-
tire.
|
|
816
|
-
tire.
|
|
817
|
-
tire.
|
|
833
|
+
clipDisk(tire.lambdaForward, tire.lambdaSide, tire.lambdaForward + tire.drive, tire.lambdaSide, tire.disk);
|
|
834
|
+
const df = clippedDiskResult.forward - tire.lambdaForward;
|
|
835
|
+
const ds = clippedDiskResult.side - tire.lambdaSide;
|
|
836
|
+
const ix = tire.forward.x * df + tire.side.x * ds;
|
|
837
|
+
const iy = tire.forward.y * df + tire.side.y * ds;
|
|
838
|
+
const iz = tire.forward.z * df + tire.side.z * ds;
|
|
839
|
+
applyTireDirect(chassis, tire, ix, iy, iz);
|
|
840
|
+
tire.lambdaForward = clippedDiskResult.forward;
|
|
841
|
+
tire.lambdaSide = clippedDiskResult.side;
|
|
842
|
+
tire.driveAdded = clippedDiskResult.forward;
|
|
818
843
|
}
|
|
819
844
|
const oldForward = tire.lambdaForward;
|
|
820
845
|
const oldSide = tire.lambdaSide;
|
|
821
|
-
const
|
|
846
|
+
const armCx = tire.point.x - chassis.com.x;
|
|
847
|
+
const armCy = tire.point.y - chassis.com.y;
|
|
848
|
+
const armCz = tire.point.z - chassis.com.z;
|
|
849
|
+
const vCx = chassis.velocity.linear.x + (chassis.velocity.angular.y * armCz - chassis.velocity.angular.z * armCy) + chassis.surface.x;
|
|
850
|
+
const vCy = chassis.velocity.linear.y + (chassis.velocity.angular.z * armCx - chassis.velocity.angular.x * armCz) + chassis.surface.y;
|
|
851
|
+
const vCz = chassis.velocity.linear.z + (chassis.velocity.angular.x * armCy - chassis.velocity.angular.y * armCx) + chassis.surface.z;
|
|
852
|
+
const support = tire.support;
|
|
853
|
+
const armSx = tire.point.x - support.com.x;
|
|
854
|
+
const armSy = tire.point.y - support.com.y;
|
|
855
|
+
const armSz = tire.point.z - support.com.z;
|
|
856
|
+
const vSx = support.velocity.linear.x + (support.velocity.angular.y * armSz - support.velocity.angular.z * armSy) + support.surface.x;
|
|
857
|
+
const vSy = support.velocity.linear.y + (support.velocity.angular.z * armSx - support.velocity.angular.x * armSz) + support.surface.y;
|
|
858
|
+
const vSz = support.velocity.linear.z + (support.velocity.angular.x * armSy - support.velocity.angular.y * armSx) + support.surface.z;
|
|
859
|
+
const relX = vCx - vSx;
|
|
860
|
+
const relY = vCy - vSy;
|
|
861
|
+
const relZ = vCz - vSz;
|
|
862
|
+
const dotForward = relX * tire.forward.x + relY * tire.forward.y + relZ * tire.forward.z;
|
|
863
|
+
const dotSide = relX * tire.side.x + relY * tire.side.y + relZ * tire.side.z;
|
|
822
864
|
let passive = tire.lambdaForward - tire.driveAdded;
|
|
823
865
|
if (tire.kForward > 0)
|
|
824
|
-
passive += -
|
|
866
|
+
passive += -dotForward / tire.kForward;
|
|
825
867
|
if (passive > tire.box)
|
|
826
868
|
passive = tire.box;
|
|
827
869
|
if (passive < -tire.box)
|
|
828
870
|
passive = -tire.box;
|
|
829
871
|
let nextSide = tire.lambdaSide;
|
|
830
872
|
if (tire.kSide > 0)
|
|
831
|
-
nextSide += -
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
tire.
|
|
873
|
+
nextSide += -dotSide / tire.kSide;
|
|
874
|
+
clipDisk(oldForward, oldSide, tire.driveAdded + passive, nextSide, tire.disk);
|
|
875
|
+
const df = clippedDiskResult.forward - oldForward;
|
|
876
|
+
const ds = clippedDiskResult.side - oldSide;
|
|
877
|
+
const ix = tire.forward.x * df + tire.side.x * ds;
|
|
878
|
+
const iy = tire.forward.y * df + tire.side.y * ds;
|
|
879
|
+
const iz = tire.forward.z * df + tire.side.z * ds;
|
|
880
|
+
applyTireDirect(chassis, tire, ix, iy, iz);
|
|
881
|
+
tire.lambdaForward = clippedDiskResult.forward;
|
|
882
|
+
tire.lambdaSide = clippedDiskResult.side;
|
|
836
883
|
}
|
|
837
884
|
}
|
|
838
885
|
}
|
|
@@ -1083,8 +1130,24 @@ export function stepDeterministicVehicleState3D(definition, state, input, world,
|
|
|
1083
1130
|
}
|
|
1084
1131
|
}
|
|
1085
1132
|
for (const tire of active.tires) {
|
|
1086
|
-
const
|
|
1087
|
-
const
|
|
1133
|
+
const armCx = tire.point.x - active.chassis.com.x;
|
|
1134
|
+
const armCy = tire.point.y - active.chassis.com.y;
|
|
1135
|
+
const armCz = tire.point.z - active.chassis.com.z;
|
|
1136
|
+
const vCx = active.chassis.velocity.linear.x + (active.chassis.velocity.angular.y * armCz - active.chassis.velocity.angular.z * armCy) + active.chassis.surface.x;
|
|
1137
|
+
const vCy = active.chassis.velocity.linear.y + (active.chassis.velocity.angular.z * armCx - active.chassis.velocity.angular.x * armCz) + active.chassis.surface.y;
|
|
1138
|
+
const vCz = active.chassis.velocity.linear.z + (active.chassis.velocity.angular.x * armCy - active.chassis.velocity.angular.y * armCx) + active.chassis.surface.z;
|
|
1139
|
+
const support = tire.support;
|
|
1140
|
+
const armSx = tire.point.x - support.com.x;
|
|
1141
|
+
const armSy = tire.point.y - support.com.y;
|
|
1142
|
+
const armSz = tire.point.z - support.com.z;
|
|
1143
|
+
const vSx = support.velocity.linear.x + (support.velocity.angular.y * armSz - support.velocity.angular.z * armSy) + support.surface.x;
|
|
1144
|
+
const vSy = support.velocity.linear.y + (support.velocity.angular.z * armSx - support.velocity.angular.x * armSz) + support.surface.y;
|
|
1145
|
+
const vSz = support.velocity.linear.z + (support.velocity.angular.x * armSy - support.velocity.angular.y * armSx) + support.surface.z;
|
|
1146
|
+
const relX = vCx - vSx;
|
|
1147
|
+
const relY = vCy - vSy;
|
|
1148
|
+
const relZ = vCz - vSz;
|
|
1149
|
+
const dotForward = relX * tire.forward.x + relY * tire.forward.y + relZ * tire.forward.z;
|
|
1150
|
+
const delta = roundHalfUp(1_000_000 * info.dt * dotForward / (2 * Math.PI * active.wheels[tire.index].spec.radius));
|
|
1088
1151
|
spinDelta[tire.index] = delta;
|
|
1089
1152
|
micros[tire.index] = addMicro(micros[tire.index], delta);
|
|
1090
1153
|
}
|
|
@@ -1189,3 +1252,65 @@ function restoreVelocities(chassis, tires, saved) {
|
|
|
1189
1252
|
tire.support.velocity = cloneVelocity(velocity);
|
|
1190
1253
|
}
|
|
1191
1254
|
}
|
|
1255
|
+
export function encodeDeterministicVehicleState3D(state) {
|
|
1256
|
+
if (!state || typeof state !== "object" || state.behaviorRevision !== 2 || typeof state.chassisId !== "bigint" || !Array.isArray(state.wheels)) {
|
|
1257
|
+
throw new SyncplayError("Deterministic vehicle state is invalid", {
|
|
1258
|
+
code: "kinetix.vehicle.state-invalid",
|
|
1259
|
+
});
|
|
1260
|
+
}
|
|
1261
|
+
return canonicalStringify(state);
|
|
1262
|
+
}
|
|
1263
|
+
export function decodeDeterministicVehicleState3D(json) {
|
|
1264
|
+
if (typeof json !== "string") {
|
|
1265
|
+
throw new SyncplayError("Vehicle state payload must be a string", {
|
|
1266
|
+
code: "kinetix.vehicle.payload-invalid",
|
|
1267
|
+
});
|
|
1268
|
+
}
|
|
1269
|
+
let decoded;
|
|
1270
|
+
try {
|
|
1271
|
+
decoded = canonicalParse(json);
|
|
1272
|
+
}
|
|
1273
|
+
catch (cause) {
|
|
1274
|
+
throw new SyncplayError("Failed to parse vehicle state JSON", {
|
|
1275
|
+
code: "kinetix.vehicle.payload-invalid",
|
|
1276
|
+
cause,
|
|
1277
|
+
});
|
|
1278
|
+
}
|
|
1279
|
+
if (!decoded || typeof decoded !== "object" || decoded.behaviorRevision !== 2 || typeof decoded.chassisId !== "bigint" || !Array.isArray(decoded.wheels)) {
|
|
1280
|
+
throw new SyncplayError("Deterministic vehicle state payload does not conform to revision 2", {
|
|
1281
|
+
code: "kinetix.vehicle.payload-invalid",
|
|
1282
|
+
});
|
|
1283
|
+
}
|
|
1284
|
+
return decoded;
|
|
1285
|
+
}
|
|
1286
|
+
export function encodeDeterministicVehicleState3DBytes(state) {
|
|
1287
|
+
if (!state || typeof state !== "object" || state.behaviorRevision !== 2 || typeof state.chassisId !== "bigint" || !Array.isArray(state.wheels)) {
|
|
1288
|
+
throw new SyncplayError("Deterministic vehicle state is invalid", {
|
|
1289
|
+
code: "kinetix.vehicle.state-invalid",
|
|
1290
|
+
});
|
|
1291
|
+
}
|
|
1292
|
+
return encodeCanonicalBytes(state);
|
|
1293
|
+
}
|
|
1294
|
+
export function decodeDeterministicVehicleState3DBytes(bytes) {
|
|
1295
|
+
if (!(bytes instanceof Uint8Array)) {
|
|
1296
|
+
throw new SyncplayError("Vehicle state byte payload must be a Uint8Array", {
|
|
1297
|
+
code: "kinetix.vehicle.payload-invalid",
|
|
1298
|
+
});
|
|
1299
|
+
}
|
|
1300
|
+
let decoded;
|
|
1301
|
+
try {
|
|
1302
|
+
decoded = decodeCanonicalBytes(bytes);
|
|
1303
|
+
}
|
|
1304
|
+
catch (cause) {
|
|
1305
|
+
throw new SyncplayError("Failed to parse vehicle state byte payload", {
|
|
1306
|
+
code: "kinetix.vehicle.payload-invalid",
|
|
1307
|
+
cause,
|
|
1308
|
+
});
|
|
1309
|
+
}
|
|
1310
|
+
if (!decoded || typeof decoded !== "object" || decoded.behaviorRevision !== 2 || typeof decoded.chassisId !== "bigint" || !Array.isArray(decoded.wheels)) {
|
|
1311
|
+
throw new SyncplayError("Deterministic vehicle state byte payload does not conform to revision 2", {
|
|
1312
|
+
code: "kinetix.vehicle.payload-invalid",
|
|
1313
|
+
});
|
|
1314
|
+
}
|
|
1315
|
+
return decoded;
|
|
1316
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@series-inc/rundot-syncplay",
|
|
3
|
-
"version": "6.0.0-rc.
|
|
3
|
+
"version": "6.0.0-rc.22",
|
|
4
4
|
"description": "Kinetix orchestration, rollback, replay, late-join, and deterministic networking for RUN.game",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -215,7 +215,7 @@
|
|
|
215
215
|
"build": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.json",
|
|
216
216
|
"test": "npm run test:core && npm run test:capability-restoration && npm run test:unit-control && npm run test:entity-registry",
|
|
217
217
|
"test:module-promotion": "node --expose-gc --import tsx --test tests/module-promotion.test.ts tests/module-docs.test.ts tests/module-bundle-budget.test.ts scripts/prove-module-promotion.test.mjs",
|
|
218
|
-
"test:core": "node --expose-gc --import tsx --test --test-concurrency=1 tests/canonical.test.ts tests/canonical-portability.test.ts tests/runtime-session.test.ts tests/kinetix-runtime-session.test.ts tests/runtime-support.test.ts tests/runtime-guards.test.ts tests/r3f-render-adapter.test.ts tests/snapshot-cost.test.ts tests/sdkSession.test.ts tests/input-authority.test.ts tests/session-wire.test.ts tests/runtime-room-metadata.test.ts tests/session-snapshot.test.ts tests/authority-room.test.ts tests/networked-client-snapshot.test.ts tests/runner.test.ts tests/testing.test.ts tests/browser-session.test.ts tests/secret-config.test.ts tests/secret-protocol.test.ts tests/secret-authority.test.ts tests/secret-client.test.ts tests/late-join-checksum.test.ts tests/late-join-input-backfill.test.ts tests/replay-scoring.test.ts tests/bot-backfill.test.ts tests/latency-simulation.test.ts tests/production-input-budget.test.ts tests/time-sync.test.ts tests/match-log.test.ts tests/spectator.test.ts tests/synctest.test.ts tests/instant-replay.test.ts tests/session-promotion.test.ts tests/entrypoints.test.ts tests/export-surface.test.ts tests/module-seam.test.ts tests/module-contract-portability.test.ts tests/module-identity.test.ts tests/module-corpus.test.ts tests/component-model.test.ts tests/component-model-rollback.test.ts tests/component-model-integration.test.ts tests/actors-ai.test.ts tests/character-3d.test.ts tests/character-3d-certification.test.ts tests/combat-modules.test.ts tests/combat-modules-integration.test.ts tests/firearm.test.ts tests/gameplay-effects.test.ts tests/spatial-interaction.test.ts tests/stats-abilities.test.ts tests/inventory-equipment.test.ts tests/inventory-equipment-certification.test.ts tests/platformer-2d.test.ts tests/platformer-2d-certification.test.ts tests/module-promotion.test.ts tests/module-docs.test.ts tests/module-bundle-budget.test.ts tests/published-side-effects.test.ts tests/host-timing.test.ts tests/test-manifest.test.ts tests/coarse-region.test.ts tests/input-codec.test.ts tests/command-ingress.test.ts tests/session-reconfigure.test.ts tests/prediction-mode.test.ts tests/ephemeral-channel.test.ts tests/runner-surface.test.ts tests/runner-harness.test.ts tests/effects-adapter-bounds.test.ts tests/simulated-match-secrets.test.ts tests/run-glue-surface.test.mjs core/tests/core-boundary.test.mjs tests/math-core-parity.test.ts tests/math-profile.test.ts tests/movement3d-kcc-unit-contract.test.ts tests/movement3d-static-ground.test.ts tests/state-digest.test.ts tests/large-blob-state.test.ts tests/math-installation-order.test.ts tests/networked-blob-state.test.ts tests/networked-checksum-burst.test.ts tests/networked-runtime-commit.test.ts tests/physics-helper-motion-reads.test.ts tests/physics-unit-conversions.test.ts tests/physics-checkpoint-capacity.test.ts tests/runner-cleanup.test.ts tests/runtime-release-outcome.test.ts tests/session-checkpoint-budget.test.ts tests/session-owned-cleanup.test.ts tests/tool-owned-adapter.test.ts tests/tool-runtime-lifetime.test.ts tests/movement3d-revision1-baseline.test.ts tests/movement3d-revision1-corpus.test.ts tests/legacy-query-revision1-corpus.test.ts tests/physics-support-boundary.test.ts tests/kcc-corpus-encoding.test.ts tests/voxel-swept-quad-paint.test.ts tests/physics-support-artifact.test.ts tests/movement3d-revision1-binding.test.ts tests/physics-si-pulley-runtime.test.ts tests/vehicle-state3d.test.ts tests/vehicle-state3d-artifact.test.ts tests/physics-si-rope-gear-powertrain-runtime.test.ts tests/voxel-body-state.test.ts",
|
|
218
|
+
"test:core": "node --expose-gc --import tsx --test --test-concurrency=1 tests/canonical.test.ts tests/canonical-portability.test.ts tests/runtime-session.test.ts tests/kinetix-runtime-session.test.ts tests/runtime-support.test.ts tests/runtime-guards.test.ts tests/r3f-render-adapter.test.ts tests/snapshot-cost.test.ts tests/sdkSession.test.ts tests/input-authority.test.ts tests/session-wire.test.ts tests/runtime-room-metadata.test.ts tests/session-snapshot.test.ts tests/authority-room.test.ts tests/networked-client-snapshot.test.ts tests/runner.test.ts tests/testing.test.ts tests/browser-session.test.ts tests/secret-config.test.ts tests/secret-protocol.test.ts tests/secret-authority.test.ts tests/secret-client.test.ts tests/late-join-checksum.test.ts tests/late-join-input-backfill.test.ts tests/replay-scoring.test.ts tests/bot-backfill.test.ts tests/latency-simulation.test.ts tests/production-input-budget.test.ts tests/time-sync.test.ts tests/match-log.test.ts tests/spectator.test.ts tests/synctest.test.ts tests/instant-replay.test.ts tests/session-promotion.test.ts tests/entrypoints.test.ts tests/export-surface.test.ts tests/module-seam.test.ts tests/module-contract-portability.test.ts tests/module-identity.test.ts tests/module-corpus.test.ts tests/component-model.test.ts tests/component-model-rollback.test.ts tests/component-model-integration.test.ts tests/actors-ai.test.ts tests/character-3d.test.ts tests/character-3d-certification.test.ts tests/combat-modules.test.ts tests/combat-modules-integration.test.ts tests/firearm.test.ts tests/gameplay-effects.test.ts tests/spatial-interaction.test.ts tests/stats-abilities.test.ts tests/inventory-equipment.test.ts tests/inventory-equipment-certification.test.ts tests/platformer-2d.test.ts tests/platformer-2d-certification.test.ts tests/module-promotion.test.ts tests/module-docs.test.ts tests/module-bundle-budget.test.ts tests/published-side-effects.test.ts tests/host-timing.test.ts tests/test-manifest.test.ts tests/coarse-region.test.ts tests/input-codec.test.ts tests/command-ingress.test.ts tests/session-reconfigure.test.ts tests/prediction-mode.test.ts tests/ephemeral-channel.test.ts tests/runner-surface.test.ts tests/runner-harness.test.ts tests/effects-adapter-bounds.test.ts tests/simulated-match-secrets.test.ts tests/run-glue-surface.test.mjs core/tests/core-boundary.test.mjs tests/math-core-parity.test.ts tests/math-profile.test.ts tests/movement3d-kcc-unit-contract.test.ts tests/movement3d-static-ground.test.ts tests/state-digest.test.ts tests/large-blob-state.test.ts tests/math-installation-order.test.ts tests/networked-blob-state.test.ts tests/networked-checksum-burst.test.ts tests/networked-runtime-commit.test.ts tests/physics-helper-motion-reads.test.ts tests/physics-unit-conversions.test.ts tests/physics-checkpoint-capacity.test.ts tests/runner-cleanup.test.ts tests/runtime-release-outcome.test.ts tests/session-checkpoint-budget.test.ts tests/session-owned-cleanup.test.ts tests/tool-owned-adapter.test.ts tests/tool-runtime-lifetime.test.ts tests/movement3d-revision1-baseline.test.ts tests/movement3d-revision1-corpus.test.ts tests/legacy-query-revision1-corpus.test.ts tests/physics-support-boundary.test.ts tests/kcc-corpus-encoding.test.ts tests/voxel-swept-quad-paint.test.ts tests/physics-support-artifact.test.ts tests/movement3d-revision1-binding.test.ts tests/physics-si-pulley-runtime.test.ts tests/vehicle-state3d.test.ts tests/vehicle-state3d-artifact.test.ts tests/partner-rc22-codecs-units.test.ts tests/vehicle-acceptance-matrix.test.ts tests/partner-tarball-closure.test.ts tests/physics-si-rope-gear-powertrain-runtime.test.ts tests/voxel-body-state.test.ts",
|
|
219
219
|
"test:sdk-contract": "node --import tsx --test tests/sdk-runtime-contract.test.ts",
|
|
220
220
|
"test:soak": "tsx --test tests/runtime-soak.test.ts",
|
|
221
221
|
"test:extended": "node --expose-gc --import tsx --test tests/performance-primitives.test.ts && tsx --test tests/animation.test.ts tests/asset-cooking.test.ts tests/backend-proof-checksum-vectors.test.ts tests/bot-documents.test.ts tests/bot-primitives.test.ts tests/collision.test.ts tests/command-timeline.test.ts tests/config-bundle.test.ts tests/deterministic-primitives.test.ts tests/ecs-lite.test.ts tests/effects-adapter.test.ts tests/engine-runtime.test.ts tests/errors.test.ts tests/events.test.ts tests/input-button.test.ts tests/load-128-players.test.ts tests/math.test.ts tests/movement.test.ts tests/movement3d.test.ts tests/multiclient-authority.test.ts tests/navigation.test.ts tests/noise.test.ts tests/physics3d-geometry-limits.test.ts tests/physics3d-shared.test.ts tests/physics3d-static-memoization.test.ts tests/random.test.ts tests/rollback-history.test.ts tests/schema-artifacts.test.ts tests/schema-codegen.test.ts tests/schema-dsl-binary.test.ts tests/schema.test.ts tests/signals.test.ts tests/sparse-set.test.ts tests/static-checker.test.ts tests/system-lifecycle.test.ts tests/wire-canonical-sentinels.test.ts tests/ws-frame.test.ts tests/wreck-yard-defects.test.ts tests/wreck-yard-performance-harness.test.ts tests/wreck-yard-partner-verification-rc15.test.ts",
|