@series-inc/rundot-syncplay 5.24.0-beta.1 → 5.24.0-beta.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/README.md +11 -4
- package/dist/authority-room.d.ts +6 -0
- package/dist/authority-room.js +5 -1
- package/dist/browser.d.ts +7 -3
- package/dist/browser.js +3 -1
- package/dist/cjs/authority-room.js +5 -1
- package/dist/cjs/browser.js +9 -2
- package/dist/cjs/cosmetic-physics3d.js +201 -0
- package/dist/cjs/creator.js +26 -1
- package/dist/cjs/engine-complete.js +9 -4
- package/dist/cjs/engine-parity.js +5 -2
- package/dist/cjs/index.js +12 -2
- package/dist/cjs/input-authority.js +33 -1
- package/dist/cjs/math.js +30 -0
- package/dist/cjs/networked-client.js +37 -4
- package/dist/cjs/physics3d-destruction-cert.js +279 -0
- package/dist/cjs/physics3d-solver.js +95 -32
- package/dist/cjs/physics3d-voxel.js +94 -0
- package/dist/cjs/physics3d.js +121 -3
- package/dist/cjs/sdk-session.js +1 -0
- package/dist/cjs/session-wire.js +12 -6
- package/dist/cli.js +47 -3
- package/dist/cosmetic-physics3d.d.ts +41 -0
- package/dist/cosmetic-physics3d.js +196 -0
- package/dist/creator.d.ts +8 -0
- package/dist/creator.js +7 -0
- package/dist/engine-complete.js +9 -4
- package/dist/engine-parity.js +5 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +4 -1
- package/dist/input-authority.d.ts +3 -0
- package/dist/input-authority.js +33 -1
- package/dist/math.d.ts +4 -0
- package/dist/math.js +30 -0
- package/dist/networked-client.d.ts +9 -0
- package/dist/networked-client.js +37 -4
- package/dist/physics3d-destruction-cert.d.ts +35 -0
- package/dist/physics3d-destruction-cert.js +276 -0
- package/dist/physics3d-solver.d.ts +26 -1
- package/dist/physics3d-solver.js +94 -32
- package/dist/physics3d-voxel.d.ts +20 -0
- package/dist/physics3d-voxel.js +91 -0
- package/dist/physics3d.d.ts +30 -2
- package/dist/physics3d.js +120 -3
- package/dist/sdk-session.d.ts +2 -0
- package/dist/sdk-session.js +1 -0
- package/dist/session-wire.js +12 -6
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# RUN Syncplay
|
|
2
2
|
|
|
3
|
-
Offline-first deterministic multiplayer engine for RUN.
|
|
3
|
+
Offline-first deterministic multiplayer engine for RUN.world. You author a
|
|
4
4
|
**deterministic** game (`defineSyncplayGame`, `DeterministicSystem`,
|
|
5
5
|
`DeterministicRandom`) and Syncplay runs it — input authority, prediction, and
|
|
6
6
|
rollback — with no game-specific server logic.
|
|
@@ -182,9 +182,11 @@ Implemented:
|
|
|
182
182
|
tests, `build:sdk`, and built `dist` import checks.
|
|
183
183
|
- Curated creator subpath export at
|
|
184
184
|
`@series-inc/rundot-game-sdk/syncplay/creator` for
|
|
185
|
-
browser-safe offline runtime, descriptors, commands, schema artifacts,
|
|
186
|
-
replay verification
|
|
187
|
-
|
|
185
|
+
browser-safe offline runtime, descriptors, commands, schema artifacts,
|
|
186
|
+
replay verification, and deterministic 3D physics (world create/step/edit,
|
|
187
|
+
voxel-chunk collider cooking, impulses, queries, vehicles) without Node
|
|
188
|
+
tooling, local servers, certification labs, render adapters, or engine
|
|
189
|
+
internals.
|
|
188
190
|
- Manifest-driven H5 creator entrypoint certification that requires game code
|
|
189
191
|
to import the safe `/creator` runtime surface and rejects broad SDK, Node,
|
|
190
192
|
tooling, lab, certification, r3f, and internal runtime imports before release
|
|
@@ -316,6 +318,11 @@ Implemented:
|
|
|
316
318
|
`applyDeterministicImpulse3D` / `setDeterministicBodyVelocity3D`; contact
|
|
317
319
|
events carry `normalImpulse`. The contact/joint caches live in the world and
|
|
318
320
|
are therefore checksummed and rollback-safe.
|
|
321
|
+
- **Render-only cosmetic 3D physics.** `createDeterministicCosmeticPhysicsWorld3D`
|
|
322
|
+
accepts dynamic cosmetic bodies plus static/kinematic authoritative proxies
|
|
323
|
+
and resolves contacts against the cosmetics only. Proxy state and impulses
|
|
324
|
+
are never written back, and the cosmetic layer has no checksum or participation
|
|
325
|
+
in Syncplay state, snapshots, replays, or network traffic.
|
|
319
326
|
- **Deterministic raycast-wheel vehicles.** `stepDeterministicVehicle3D` drives
|
|
320
327
|
a single dynamic chassis with N suspension raycasts (wheels are rays, not
|
|
321
328
|
bodies — Bullet/Godot raycast-vehicle lineage): spring-damper suspension,
|
package/dist/authority-room.d.ts
CHANGED
|
@@ -66,6 +66,12 @@ export interface DeterministicAuthorityRoomConfig {
|
|
|
66
66
|
readonly snapshotCadenceTicks?: number;
|
|
67
67
|
/** Abandon a donor transfer that has not completed after this many ticks. Default 600. */
|
|
68
68
|
readonly transferTimeoutTicks?: number;
|
|
69
|
+
/**
|
|
70
|
+
* Snapshot transfer ceiling in bytes for this room's collector (default
|
|
71
|
+
* DEFAULT_MAX_SNAPSHOT_BYTES). Offers above it are rejected with
|
|
72
|
+
* `snapshot-too-large`; keep it equal to the clients' configured ceiling.
|
|
73
|
+
*/
|
|
74
|
+
readonly maxSnapshotBytes?: number;
|
|
69
75
|
/** Snapshot acquisition telemetry: stored snapshots and rejected/abandoned transfers. */
|
|
70
76
|
readonly onSnapshotEvent?: (event: AuthorityRoomSnapshotEvent) => void;
|
|
71
77
|
/**
|
package/dist/authority-room.js
CHANGED
|
@@ -18,6 +18,9 @@ const DEFAULT_TRANSFER_TIMEOUT_TICKS = 600;
|
|
|
18
18
|
export function createDeterministicAuthorityRoom(transport, config) {
|
|
19
19
|
const sessionMsgType = config.sessionMsgType ?? DEFAULT_SESSION_MSG_TYPE;
|
|
20
20
|
const historyRetentionTicks = config.historyRetentionTicks ?? DEFAULT_HISTORY_RETENTION_TICKS;
|
|
21
|
+
if (config.maxSnapshotBytes !== undefined && (!Number.isInteger(config.maxSnapshotBytes) || config.maxSnapshotBytes < 1)) {
|
|
22
|
+
throw new Error(`createDeterministicAuthorityRoom: maxSnapshotBytes must be a positive integer, received ${config.maxSnapshotBytes}`);
|
|
23
|
+
}
|
|
21
24
|
const authority = createInputAuthority({
|
|
22
25
|
playerCount: config.playerCount,
|
|
23
26
|
hardToleranceTicks: config.hardToleranceTicks,
|
|
@@ -540,7 +543,7 @@ export function createDeterministicAuthorityRoom(transport, config) {
|
|
|
540
543
|
donorId,
|
|
541
544
|
minFrame: tick + 1,
|
|
542
545
|
startedAt: now,
|
|
543
|
-
collector: createSnapshotTransferCollector(),
|
|
546
|
+
collector: createSnapshotTransferCollector(config.maxSnapshotBytes === undefined ? {} : { maxSnapshotBytes: config.maxSnapshotBytes }),
|
|
544
547
|
isRetry,
|
|
545
548
|
};
|
|
546
549
|
transport.sendTo(donorId, sessionMsgType, createDeterministicLocalAuthoritySnapshotRequestEnvelope(nextWireSequence(), { descriptorHash: roomDescriptorHash }, tick + 1));
|
|
@@ -613,6 +616,7 @@ export function createDeterministicAuthorityRoom(transport, config) {
|
|
|
613
616
|
return;
|
|
614
617
|
}
|
|
615
618
|
now += 1;
|
|
619
|
+
authority.recordOccupiedSlots(now, [...slotByPlayer.values()]);
|
|
616
620
|
for (const command of secretAuthority?.onTick(now, [...slotByPlayer.values()]) ?? []) {
|
|
617
621
|
authority.queueCommand(now, command);
|
|
618
622
|
}
|
package/dist/browser.d.ts
CHANGED
|
@@ -29,7 +29,9 @@ export { fbm2D, hash2, hashUint32, valueNoise1D, valueNoise2D } from './noise.js
|
|
|
29
29
|
export { createOfflineSession } from './offline-session.js';
|
|
30
30
|
export { createPauseController } from './pause-resume.js';
|
|
31
31
|
export { circleCastDeterministicPhysics2D, createDeterministicPhysicsWorld2D, nearestDeterministicPhysicsHit2D, queryDeterministicPhysicsAabb2D, queryDeterministicPhysicsShapeOverlap2D, raycastAllDeterministicPhysics2D, raycastDeterministicPhysics2D, stepDeterministicPhysicsWorld2D } from './physics2d.js';
|
|
32
|
-
export { applyDeterministicImpulse3D, applyDeterministicImpulses3D, contactDetailsDeterministicPhysics3D, createDeterministicPhysicsWorld3D, deriveInverseInertia, deterministicPhysicsBodyById3D, deterministicPhysicsCallback3D, overlapDeterministicPhysics3D, raycastDeterministicPhysics3D, raycastDeterministicPhysics3DDetailed, runDeterministicPhysics3DStress, setDeterministicBodyVelocity3D, shapeCastDeterministicPhysics3D, shapeCastDeterministicPhysics3DDetailed, stepDeterministicPhysicsWorld3D } from './physics3d.js';
|
|
32
|
+
export { applyDeterministicImpulse3D, applyDeterministicImpulses3D, applyDeterministicWorldEdit3D, contactDetailsDeterministicPhysics3D, createDeterministicPhysicsWorld3D, deriveInverseInertia, deterministicPhysicsBodyById3D, deterministicPhysicsCallback3D, overlapDeterministicPhysics3D, raycastDeterministicPhysics3D, raycastDeterministicPhysics3DDetailed, runDeterministicPhysics3DStress, setDeterministicBodyVelocity3D, shapeCastDeterministicPhysics3D, shapeCastDeterministicPhysics3DDetailed, stepDeterministicPhysicsWorld3D } from './physics3d.js';
|
|
33
|
+
export { cookDeterministicVoxelChunkCollider3D } from './physics3d-voxel.js';
|
|
34
|
+
export { createDeterministicCosmeticPhysicsWorld3D, setDeterministicCosmeticPhysicsAuthoritativeBodyProxies3D, stepDeterministicCosmeticPhysicsWorld3D } from './cosmetic-physics3d.js';
|
|
33
35
|
export { stepDeterministicVehicle3D } from './physics3d-vehicle.js';
|
|
34
36
|
export { createDeterministicR3fRenderAdapter as createDeterministicR3fAdapter, createDeterministicR3fRenderAdapter, interpolateDeterministicRenderNumber, interpolateDeterministicRenderVec2 } from './r3f-render-adapter.js';
|
|
35
37
|
export { verifyReplayWithDescriptor as verifyDeterministicReplay, verifyReplay } from './replay.js';
|
|
@@ -72,10 +74,12 @@ export type { DeterministicKccBody3D, DeterministicKccCarrierPose3D, Determinist
|
|
|
72
74
|
export type { DeterministicAuthorityCertificationArtifact, DeterministicAuthorityCertificationVerification, DeterministicAuthorityChecksums, SyncplayClient, SyncplayClientConnection, SyncplayClientRole, SyncplayCommand, SyncplayCommandPollOptions, SyncplayCommandSubmitResult, SyncplayInput, SyncplayLifecycleResult, SyncplaySubmitResult } from './multiplayer-service.js';
|
|
73
75
|
export type { CookedDeterministicNavigationGraph, DeterministicFlowField, DeterministicNavEdge, DeterministicNavigationAgent, DeterministicNavigationGraphSource, DeterministicNavigationStepOptions, DeterministicNavigationStepResult, DeterministicNavNode, DeterministicNavRegion, DeterministicPathQuery, DeterministicPathResult, DeterministicTilemapSource } from './navigation.js';
|
|
74
76
|
export type { CookedDeterministicNavmesh, DeterministicNavmeshAgent, DeterministicNavmeshAgentStepResult, DeterministicNavmeshImportSource, DeterministicNavmeshLink, DeterministicNavmeshMovingAvoidanceObstacle, DeterministicNavmeshOffMeshTraversalState, DeterministicNavmeshOffMeshTraversalStep, DeterministicNavmeshPath, DeterministicNavmeshPoint, DeterministicNavmeshPolygon, DeterministicNavmeshSource } from './navmesh.js';
|
|
75
|
-
export type { NetworkedClientTransport, NetworkedSyncplayClient, NetworkedSyncplayClientInputDelayOptions, NetworkedSyncplayClientNetStats, NetworkedSyncplayClientOptions, NetworkedSyncplayClientPacingOptions } from './networked-client.js';
|
|
77
|
+
export type { NetworkedClientTransport, NetworkedSyncplayClient, NetworkedSyncplayClientInputDelayOptions, NetworkedSyncplayClientNetStats, NetworkedSyncplayClientOptions, NetworkedSyncplayClientPacingOptions, NetworkedSyncplaySlotPresence } from './networked-client.js';
|
|
76
78
|
export type { DeterministicPauseController, DeterministicPauseState, DeterministicPauseStatus, PauseControllerOptions, PauseWrappedState } from './pause-resume.js';
|
|
77
79
|
export type { DeterministicBodyKind, DeterministicContactEvent2D, DeterministicContactEventType, DeterministicPhysicsAabbQuery2D, DeterministicPhysicsActivePair2D, DeterministicPhysicsBody2D, DeterministicPhysicsCircleCastQuery2D, DeterministicPhysicsConstraint2D, DeterministicPhysicsHit2D, DeterministicPhysicsQueryOptions2D, DeterministicPhysicsRaycastQuery2D, DeterministicPhysicsShape2D, DeterministicPhysicsShapeOverlapQuery2D, DeterministicPhysicsStepOptions2D, DeterministicPhysicsStepResult2D, DeterministicPhysicsWorld2D } from './physics2d.js';
|
|
78
|
-
export type { DeterministicContactCacheEntry3D, DeterministicJointCacheEntry3D, DeterministicPhysicsActivePair3D, DeterministicPhysicsAxisLock3D, DeterministicPhysicsBody3D, DeterministicPhysicsCallbackMask3D, DeterministicPhysicsCompoundChild3D, DeterministicPhysicsCompoundChildShape3D, DeterministicPhysicsConstraint3D, DeterministicPhysicsContactDetail3D, DeterministicPhysicsContactEvent3D, DeterministicPhysicsDetailedHit3D, DeterministicPhysicsHit3D, DeterministicPhysicsHullShape3D, DeterministicPhysicsImpulseApplication3D, DeterministicPhysicsOverlapQuery3D, DeterministicPhysicsPrimitiveShape3D, DeterministicPhysicsQuaternion3D, DeterministicPhysicsQueryOptions3D, DeterministicPhysicsRaycastQuery3D, DeterministicPhysicsScheduledQuery3D, DeterministicPhysicsShape3D, DeterministicPhysicsShapeCastQuery3D, DeterministicPhysicsStepResult3D, DeterministicPhysicsVec3, DeterministicPhysicsWorld3D } from './physics3d.js';
|
|
80
|
+
export type { DeterministicContactCacheEntry3D, DeterministicJointCacheEntry3D, DeterministicPhysicsActivePair3D, DeterministicPhysicsAxisLock3D, DeterministicPhysicsBody3D, DeterministicPhysicsCallbackMask3D, DeterministicPhysicsCompoundChild3D, DeterministicPhysicsCompoundChildShape3D, DeterministicPhysicsConstraint3D, DeterministicPhysicsContactDetail3D, DeterministicPhysicsContactEvent3D, DeterministicPhysicsDetailedHit3D, DeterministicPhysicsHit3D, DeterministicPhysicsHullShape3D, DeterministicPhysicsImpulseApplication3D, DeterministicPhysicsOverlapQuery3D, DeterministicPhysicsPrimitiveShape3D, DeterministicPhysicsQuaternion3D, DeterministicPhysicsQueryOptions3D, DeterministicPhysicsRaycastQuery3D, DeterministicPhysicsScheduledQuery3D, DeterministicPhysicsShape3D, DeterministicPhysicsShapeCastQuery3D, DeterministicPhysicsStepResult3D, DeterministicPhysicsVec3, DeterministicPhysicsWorld3D, DeterministicPhysicsWorldEdit3D } from './physics3d.js';
|
|
81
|
+
export type { DeterministicVoxelChunk3D, DeterministicVoxelCompoundShape3D } from './physics3d-voxel.js';
|
|
82
|
+
export type { DeterministicAuthoritativeBodyProxy3D, DeterministicCosmeticPhysicsBody3D, DeterministicCosmeticPhysicsStepOptions3D, DeterministicCosmeticPhysicsStepResult3D, DeterministicCosmeticPhysicsWorld3D } from './cosmetic-physics3d.js';
|
|
79
83
|
export type { DeterministicPhysicsJoint3D } from './physics3d-joints.js';
|
|
80
84
|
export type { DeterministicVehicle3D, DeterministicVehicleImpulse3D, DeterministicVehicleInput3D, DeterministicVehicleStepOptions3D, DeterministicVehicleStepResult3D, DeterministicVehicleWheel3D, DeterministicVehicleWheelTelemetry3D } from './physics3d-vehicle.js';
|
|
81
85
|
export type { DeterministicFrameRuntimeReplayBundleOptions, DeterministicFrameRuntimeReplayBundleVerification, DeterministicReplayBundle, DeterministicReplayBundleMismatch, DeterministicReplayBundleVerification, DeterministicReplayDebugTables, DeterministicReplayDesyncMinimization, DeterministicReplayRuntimeBeforeFrameId, DeterministicReplayRuntimeManifest, DeterministicReplayRuntimeManifestSource, DeterministicReplayRuntimeSystemId, DeterministicReplaySemanticModel, DeterministicReplaySemanticOperation, DeterministicReplaySliceOrigin, DeterministicReplaySnapshot, DeterministicReplayVerificationManifest, ReplayScoreVerificationReason, ReplayScoreVerificationResult } from './replay-bundle.js';
|
package/dist/browser.js
CHANGED
|
@@ -30,7 +30,9 @@ export { fbm2D, hash2, hashUint32, valueNoise1D, valueNoise2D } from './noise.js
|
|
|
30
30
|
export { createOfflineSession } from './offline-session.js';
|
|
31
31
|
export { createPauseController } from './pause-resume.js';
|
|
32
32
|
export { circleCastDeterministicPhysics2D, createDeterministicPhysicsWorld2D, nearestDeterministicPhysicsHit2D, queryDeterministicPhysicsAabb2D, queryDeterministicPhysicsShapeOverlap2D, raycastAllDeterministicPhysics2D, raycastDeterministicPhysics2D, stepDeterministicPhysicsWorld2D } from './physics2d.js';
|
|
33
|
-
export { applyDeterministicImpulse3D, applyDeterministicImpulses3D, contactDetailsDeterministicPhysics3D, createDeterministicPhysicsWorld3D, deriveInverseInertia, deterministicPhysicsBodyById3D, deterministicPhysicsCallback3D, overlapDeterministicPhysics3D, raycastDeterministicPhysics3D, raycastDeterministicPhysics3DDetailed, runDeterministicPhysics3DStress, setDeterministicBodyVelocity3D, shapeCastDeterministicPhysics3D, shapeCastDeterministicPhysics3DDetailed, stepDeterministicPhysicsWorld3D } from './physics3d.js';
|
|
33
|
+
export { applyDeterministicImpulse3D, applyDeterministicImpulses3D, applyDeterministicWorldEdit3D, contactDetailsDeterministicPhysics3D, createDeterministicPhysicsWorld3D, deriveInverseInertia, deterministicPhysicsBodyById3D, deterministicPhysicsCallback3D, overlapDeterministicPhysics3D, raycastDeterministicPhysics3D, raycastDeterministicPhysics3DDetailed, runDeterministicPhysics3DStress, setDeterministicBodyVelocity3D, shapeCastDeterministicPhysics3D, shapeCastDeterministicPhysics3DDetailed, stepDeterministicPhysicsWorld3D } from './physics3d.js';
|
|
34
|
+
export { cookDeterministicVoxelChunkCollider3D } from './physics3d-voxel.js';
|
|
35
|
+
export { createDeterministicCosmeticPhysicsWorld3D, setDeterministicCosmeticPhysicsAuthoritativeBodyProxies3D, stepDeterministicCosmeticPhysicsWorld3D } from './cosmetic-physics3d.js';
|
|
34
36
|
export { stepDeterministicVehicle3D } from './physics3d-vehicle.js';
|
|
35
37
|
export { createDeterministicR3fRenderAdapter as createDeterministicR3fAdapter, createDeterministicR3fRenderAdapter, interpolateDeterministicRenderNumber, interpolateDeterministicRenderVec2 } from './r3f-render-adapter.js';
|
|
36
38
|
export { verifyReplayWithDescriptor as verifyDeterministicReplay, verifyReplay } from './replay.js';
|
|
@@ -21,6 +21,9 @@ const DEFAULT_TRANSFER_TIMEOUT_TICKS = 600;
|
|
|
21
21
|
function createDeterministicAuthorityRoom(transport, config) {
|
|
22
22
|
const sessionMsgType = config.sessionMsgType ?? DEFAULT_SESSION_MSG_TYPE;
|
|
23
23
|
const historyRetentionTicks = config.historyRetentionTicks ?? DEFAULT_HISTORY_RETENTION_TICKS;
|
|
24
|
+
if (config.maxSnapshotBytes !== undefined && (!Number.isInteger(config.maxSnapshotBytes) || config.maxSnapshotBytes < 1)) {
|
|
25
|
+
throw new Error(`createDeterministicAuthorityRoom: maxSnapshotBytes must be a positive integer, received ${config.maxSnapshotBytes}`);
|
|
26
|
+
}
|
|
24
27
|
const authority = (0, input_authority_js_1.createInputAuthority)({
|
|
25
28
|
playerCount: config.playerCount,
|
|
26
29
|
hardToleranceTicks: config.hardToleranceTicks,
|
|
@@ -543,7 +546,7 @@ function createDeterministicAuthorityRoom(transport, config) {
|
|
|
543
546
|
donorId,
|
|
544
547
|
minFrame: tick + 1,
|
|
545
548
|
startedAt: now,
|
|
546
|
-
collector: (0, session_snapshot_js_1.createSnapshotTransferCollector)(),
|
|
549
|
+
collector: (0, session_snapshot_js_1.createSnapshotTransferCollector)(config.maxSnapshotBytes === undefined ? {} : { maxSnapshotBytes: config.maxSnapshotBytes }),
|
|
547
550
|
isRetry,
|
|
548
551
|
};
|
|
549
552
|
transport.sendTo(donorId, sessionMsgType, (0, local_authority_wire_js_1.createDeterministicLocalAuthoritySnapshotRequestEnvelope)(nextWireSequence(), { descriptorHash: roomDescriptorHash }, tick + 1));
|
|
@@ -616,6 +619,7 @@ function createDeterministicAuthorityRoom(transport, config) {
|
|
|
616
619
|
return;
|
|
617
620
|
}
|
|
618
621
|
now += 1;
|
|
622
|
+
authority.recordOccupiedSlots(now, [...slotByPlayer.values()]);
|
|
619
623
|
for (const command of secretAuthority?.onTick(now, [...slotByPlayer.values()]) ?? []) {
|
|
620
624
|
authority.queueCommand(now, command);
|
|
621
625
|
}
|
package/dist/cjs/browser.js
CHANGED
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.sortAabbsByStableId = exports.segmentsIntersect = exports.segmentSegmentDistance = exports.segmentPointDistance = exports.pointOnSegment = exports.orientation = exports.fixedVec2 = exports.fixedCircle = exports.fixedAabb = exports.closestPointOnSegment = exports.circleIntersectsAabb = exports.circleIntersects = exports.aabbIntersects = exports.aabbContainsPoint = exports.stableSortedKeys = exports.stableEntries = exports.deterministicShuffle = exports.createStableIndexedMap = exports.encodeUtf8 = exports.encodeCanonicalBytes = exports.defaultChecksum = exports.decodeUtf8 = exports.decodeCanonicalValue = exports.decodeCanonicalBytes = exports.cloneCanonical = exports.canonicalStringify = exports.canonicalize = exports.tickDeterministicHfsm = exports.tickDeterministicBehaviorTreeWithMemory = exports.tickDeterministicBehaviorTree = exports.selectDeterministicUtility = exports.runDeterministicBotSimulation = exports.getBlackboardValue = exports.createDeterministicBotBlackboard = exports.cookDeterministicBotAsset = exports.traceDeterministicBotDocument = exports.summarizeDeterministicBotDocumentTraceCoverage = exports.summarizeDeterministicBotDocumentTraceCounterDelta = exports.compileDeterministicBotDocument = exports.createDeterministicAuthorityRoom = exports.validatePrototypeEntitiesAgainstFrameRuntime = exports.stableAssetCookJson = exports.materializePrototypeEntities = exports.materializeDeterministicMapEntities = exports.cookDeterministicAssets = exports.assertAssetManifestMatches = exports.stepDeterministicAnimation = exports.reconstructDeterministicAnimationEvents = exports.createDeterministicAnimationRuntimeState = exports.cookDeterministicAnimation = void 0;
|
|
5
5
|
exports.createDeterministicLocalAuthoritySnapshotOfferEnvelope = exports.createDeterministicLocalAuthoritySnapshotEnvelope = exports.createDeterministicLocalAuthoritySnapshotCompleteEnvelope = exports.createDeterministicLocalAuthoritySnapshotChunkEnvelope = exports.createDeterministicLocalAuthorityInputBundleEnvelope = exports.createDeterministicLocalAuthorityCorrectionEnvelope = exports.createDeterministicLocalAuthorityCommandBundleEnvelope = exports.createDeterministicLocalAuthorityAckEnvelope = exports.applyDeterministicLocalAuthorityInputBundleEnvelope = exports.applyDeterministicLocalAuthorityCommandBundleEnvelope = exports.createDeterministicLocalAuthorityRuntime = exports.validateDeterministicLagCompensatedShot3D = exports.validateDeterministicAuthoritativeLagCompensatedShot3D = exports.rewindDeterministicLagCompensatedTargets3D = exports.createDeterministicLagCompensation3DHistory = exports.buildDeterministicLagCompensatedHitboxProxies3D = exports.runInstantReplay = exports.createInstantReplayRunner = exports.sortDeterministicInputTimelineFlags = exports.evaluateDeterministicInputTimelineResult = exports.accumulateDeterministicInputTimelineState = exports.createInputAuthority = exports.filterDeterministicEventsForPlayer = exports.createDeterministicEventTimeline = exports.validateDeterministicFrameSystemsStateless = exports.runDeterministicFrameRuntimeMutationCorpus = exports.isDeterministicFrameHeapStaleHandleError = exports.generateDeterministicFrameRuntimeSource = exports.createDeterministicSparseSetFrameRuntime = exports.createDeterministicSlotMap = exports.createDeterministicFrameRuntimeAccessors = exports.createDeterministicFrameRuntime = exports.createDeterministicBitset = exports.compileDeterministicDslRuntimeDescriptor = exports.assertDeterministicFrameSystemsStateless = exports.assertDeterministicFrameHeapStaleHandleError = exports.createDeterministicEventEffectsAdapter = exports.verifyDeterministicSessionRuntimeReplay = exports.createDeterministicSessionReplayBundle = exports.createDeterministicSessionCore = exports.verifyDeterministicConfigBundle = exports.summarizeDeterministicConfigBundleFailureReasons = exports.evaluateDeterministicConfigBundleParityResult = exports.cookDeterministicConfigBundle = exports.evaluateDeterministicCommandTimelineMigrationResult = exports.deterministicPayloadMatchesFields = exports.createDeterministicCommandTimelineSnapshot = exports.createDeterministicCommandTimeline = exports.assertDeterministicPayloadFields = exports.translateAabb = void 0;
|
|
6
6
|
exports.stepDeterministicPhysicsWorld2D = exports.raycastDeterministicPhysics2D = exports.raycastAllDeterministicPhysics2D = exports.queryDeterministicPhysicsShapeOverlap2D = exports.queryDeterministicPhysicsAabb2D = exports.nearestDeterministicPhysicsHit2D = exports.createDeterministicPhysicsWorld2D = exports.circleCastDeterministicPhysics2D = exports.createPauseController = exports.createOfflineSession = exports.valueNoise2D = exports.valueNoise1D = exports.hashUint32 = exports.hash2 = exports.fbm2D = exports.createNetworkedSyncplayClient = exports.stepDeterministicNavmeshOffMeshTraversal = exports.stepDeterministicNavmeshAgents = exports.smoothDeterministicNavmeshPath = exports.runDeterministicNavmeshStress = exports.locateDeterministicNavmeshPolygon = exports.findDeterministicNavmeshPointPath = exports.findDeterministicNavmeshPath = exports.cookImportedDeterministicNavmesh = exports.cookDeterministicNavmesh = exports.stepDeterministicNavigationAgents = exports.smoothDeterministicPath = exports.findDeterministicPath = exports.createDeterministicFlowField = exports.cookTilemapNavigationGraph = exports.cookDeterministicNavigationGraph = exports.applyDeterministicReciprocalAvoidance = exports.createSyncplayClient = exports.stepDeterministicKcc3D = exports.stepDeterministicCarry3D = exports.validateDeterministicLagCompensatedHit = exports.stepDeterministicTopDownMover = exports.stepDeterministicKcc2D = exports.stepDeterministicFpsAim = exports.runDeterministicMovementSimulation = exports.runDeterministicMovementCrowdSimulation = exports.rewindDeterministicTargets = exports.createDeterministicMath = exports.encodeDeterministicLocalAuthorityWireEnvelope = exports.deterministicLocalAuthorityWireProtocol = exports.decodeDeterministicLocalAuthorityWireEnvelope = exports.createDeterministicLocalAuthorityWireReceiver = exports.createDeterministicLocalAuthorityWireAuth = exports.createDeterministicLocalAuthoritySnapshotTransfer = exports.createDeterministicLocalAuthoritySnapshotRequestEnvelope = void 0;
|
|
7
|
-
exports.
|
|
8
|
-
exports.createSyncplaySecretsClient = exports.createSyncplaySecretEventReader = exports.verifySyncplaySignedReceipt = exports.createBrowserSyncplaySecretCrypto = exports.syncplaySecretProtocol = exports.isSyncplaySecretCommand = exports.decodeSyncplaySecretPrivateMessage = exports.validateSyncplaySecretSystemsConfig = exports.syncplaySecretLimits = exports.syncplaySecretConfigHash = exports.summarizeDeterministicLifecycleCounters = exports.createDeterministicLifecycleRunner = exports.createDeterministicSparseSet = exports.createDeterministicSignalBus = exports.encodeDeterministicSessionMessage = exports.deterministicSessionWireVersion = exports.decodeDeterministicSessionMessage = exports.encodeDeterministicStateSnapshot = exports.deterministicRoomDescriptorHash = exports.DEFAULT_SNAPSHOT_CHUNK_SIZE = exports.DEFAULT_MAX_SNAPSHOT_BYTES = exports.decodeDeterministicStateSnapshot = exports.createSnapshotTransferFromBytes = exports.createSnapshotTransferCollector = void 0;
|
|
7
|
+
exports.createSyncplayOfflineRuntime = exports.createSyncplayGameRuntime = exports.stableDeterministicDslSchemaJson = exports.parseDeterministicSchemaDsl = exports.deterministicDslMaxPlayers = exports.createDeterministicBinarySerializer = exports.proveSchemaBinaryRoundTrip = exports.generateSchemaTypes = exports.generateSchemaBinarySource = exports.createDeterministicDescriptorBinarySchema = exports.createSchemaArtifacts = exports.stableDescriptorId = exports.defineSyncplayGame = exports.verifyReplayScoreAgainstTrustedRuntime = exports.verifyDeterministicSelfContainedFrameRuntimeReplayBundle = exports.verifyDeterministicReplayBundle = exports.verifyDeterministicFrameRuntimeReplayBundle = exports.sliceDeterministicReplayBundle = exports.minimizeDeterministicReplayDesyncBundle = exports.minimizeDeterministicReplayDesync = exports.createDeterministicReplayRuntimeManifest = exports.createDeterministicReplayDebugTables = exports.createDeterministicReplayBundle = exports.verifyReplay = exports.verifyDeterministicReplay = exports.interpolateDeterministicRenderVec2 = exports.interpolateDeterministicRenderNumber = exports.createDeterministicR3fRenderAdapter = exports.createDeterministicR3fAdapter = exports.stepDeterministicVehicle3D = exports.stepDeterministicCosmeticPhysicsWorld3D = exports.setDeterministicCosmeticPhysicsAuthoritativeBodyProxies3D = exports.createDeterministicCosmeticPhysicsWorld3D = exports.cookDeterministicVoxelChunkCollider3D = exports.stepDeterministicPhysicsWorld3D = exports.shapeCastDeterministicPhysics3DDetailed = exports.shapeCastDeterministicPhysics3D = exports.setDeterministicBodyVelocity3D = exports.runDeterministicPhysics3DStress = exports.raycastDeterministicPhysics3DDetailed = exports.raycastDeterministicPhysics3D = exports.overlapDeterministicPhysics3D = exports.deterministicPhysicsCallback3D = exports.deterministicPhysicsBodyById3D = exports.deriveInverseInertia = exports.createDeterministicPhysicsWorld3D = exports.contactDetailsDeterministicPhysics3D = exports.applyDeterministicWorldEdit3D = exports.applyDeterministicImpulses3D = exports.applyDeterministicImpulse3D = void 0;
|
|
8
|
+
exports.createSyncplaySecretsClient = exports.createSyncplaySecretEventReader = exports.verifySyncplaySignedReceipt = exports.createBrowserSyncplaySecretCrypto = exports.syncplaySecretProtocol = exports.isSyncplaySecretCommand = exports.decodeSyncplaySecretPrivateMessage = exports.validateSyncplaySecretSystemsConfig = exports.syncplaySecretLimits = exports.syncplaySecretConfigHash = exports.summarizeDeterministicLifecycleCounters = exports.createDeterministicLifecycleRunner = exports.createDeterministicSparseSet = exports.createDeterministicSignalBus = exports.encodeDeterministicSessionMessage = exports.deterministicSessionWireVersion = exports.decodeDeterministicSessionMessage = exports.encodeDeterministicStateSnapshot = exports.deterministicRoomDescriptorHash = exports.DEFAULT_SNAPSHOT_CHUNK_SIZE = exports.DEFAULT_MAX_SNAPSHOT_BYTES = exports.decodeDeterministicStateSnapshot = exports.createSnapshotTransferFromBytes = exports.createSnapshotTransferCollector = exports.bytesToBase64 = exports.base64ToBytes = exports.exportPromotionSnapshot = exports.createSessionFromPromotionSnapshot = exports.createSyncplaySession = void 0;
|
|
9
9
|
var animation_js_1 = require("./animation.js");
|
|
10
10
|
Object.defineProperty(exports, "cookDeterministicAnimation", { enumerable: true, get: function () { return animation_js_1.cookDeterministicAnimation; } });
|
|
11
11
|
Object.defineProperty(exports, "createDeterministicAnimationRuntimeState", { enumerable: true, get: function () { return animation_js_1.createDeterministicAnimationRuntimeState; } });
|
|
@@ -190,6 +190,7 @@ Object.defineProperty(exports, "stepDeterministicPhysicsWorld2D", { enumerable:
|
|
|
190
190
|
var physics3d_js_1 = require("./physics3d.js");
|
|
191
191
|
Object.defineProperty(exports, "applyDeterministicImpulse3D", { enumerable: true, get: function () { return physics3d_js_1.applyDeterministicImpulse3D; } });
|
|
192
192
|
Object.defineProperty(exports, "applyDeterministicImpulses3D", { enumerable: true, get: function () { return physics3d_js_1.applyDeterministicImpulses3D; } });
|
|
193
|
+
Object.defineProperty(exports, "applyDeterministicWorldEdit3D", { enumerable: true, get: function () { return physics3d_js_1.applyDeterministicWorldEdit3D; } });
|
|
193
194
|
Object.defineProperty(exports, "contactDetailsDeterministicPhysics3D", { enumerable: true, get: function () { return physics3d_js_1.contactDetailsDeterministicPhysics3D; } });
|
|
194
195
|
Object.defineProperty(exports, "createDeterministicPhysicsWorld3D", { enumerable: true, get: function () { return physics3d_js_1.createDeterministicPhysicsWorld3D; } });
|
|
195
196
|
Object.defineProperty(exports, "deriveInverseInertia", { enumerable: true, get: function () { return physics3d_js_1.deriveInverseInertia; } });
|
|
@@ -203,6 +204,12 @@ Object.defineProperty(exports, "setDeterministicBodyVelocity3D", { enumerable: t
|
|
|
203
204
|
Object.defineProperty(exports, "shapeCastDeterministicPhysics3D", { enumerable: true, get: function () { return physics3d_js_1.shapeCastDeterministicPhysics3D; } });
|
|
204
205
|
Object.defineProperty(exports, "shapeCastDeterministicPhysics3DDetailed", { enumerable: true, get: function () { return physics3d_js_1.shapeCastDeterministicPhysics3DDetailed; } });
|
|
205
206
|
Object.defineProperty(exports, "stepDeterministicPhysicsWorld3D", { enumerable: true, get: function () { return physics3d_js_1.stepDeterministicPhysicsWorld3D; } });
|
|
207
|
+
var physics3d_voxel_js_1 = require("./physics3d-voxel.js");
|
|
208
|
+
Object.defineProperty(exports, "cookDeterministicVoxelChunkCollider3D", { enumerable: true, get: function () { return physics3d_voxel_js_1.cookDeterministicVoxelChunkCollider3D; } });
|
|
209
|
+
var cosmetic_physics3d_js_1 = require("./cosmetic-physics3d.js");
|
|
210
|
+
Object.defineProperty(exports, "createDeterministicCosmeticPhysicsWorld3D", { enumerable: true, get: function () { return cosmetic_physics3d_js_1.createDeterministicCosmeticPhysicsWorld3D; } });
|
|
211
|
+
Object.defineProperty(exports, "setDeterministicCosmeticPhysicsAuthoritativeBodyProxies3D", { enumerable: true, get: function () { return cosmetic_physics3d_js_1.setDeterministicCosmeticPhysicsAuthoritativeBodyProxies3D; } });
|
|
212
|
+
Object.defineProperty(exports, "stepDeterministicCosmeticPhysicsWorld3D", { enumerable: true, get: function () { return cosmetic_physics3d_js_1.stepDeterministicCosmeticPhysicsWorld3D; } });
|
|
206
213
|
var physics3d_vehicle_js_1 = require("./physics3d-vehicle.js");
|
|
207
214
|
Object.defineProperty(exports, "stepDeterministicVehicle3D", { enumerable: true, get: function () { return physics3d_vehicle_js_1.stepDeterministicVehicle3D; } });
|
|
208
215
|
var r3f_render_adapter_js_1 = require("./r3f-render-adapter.js");
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createDeterministicCosmeticPhysicsWorld3D = createDeterministicCosmeticPhysicsWorld3D;
|
|
4
|
+
exports.setDeterministicCosmeticPhysicsAuthoritativeBodyProxies3D = setDeterministicCosmeticPhysicsAuthoritativeBodyProxies3D;
|
|
5
|
+
exports.stepDeterministicCosmeticPhysicsWorld3D = stepDeterministicCosmeticPhysicsWorld3D;
|
|
6
|
+
const physics3d_js_1 = require("./physics3d.js");
|
|
7
|
+
const internalPhysicsWorldByCosmeticWorld = new WeakMap();
|
|
8
|
+
function createDeterministicCosmeticPhysicsWorld3D(bodies, authoritativeBodyProxies = []) {
|
|
9
|
+
const normalized = normalizeCosmeticBodies(bodies, authoritativeBodyProxies);
|
|
10
|
+
const world = {
|
|
11
|
+
frame: 0,
|
|
12
|
+
bodies: normalized.bodies,
|
|
13
|
+
authoritativeBodyProxies: normalized.authoritativeBodyProxies,
|
|
14
|
+
};
|
|
15
|
+
internalPhysicsWorldByCosmeticWorld.set(world, createSimulationWorld(normalized));
|
|
16
|
+
return world;
|
|
17
|
+
}
|
|
18
|
+
function setDeterministicCosmeticPhysicsAuthoritativeBodyProxies3D(world, authoritativeBodyProxies) {
|
|
19
|
+
const normalized = normalizeCosmeticBodies(world.bodies, authoritativeBodyProxies);
|
|
20
|
+
const nextWorld = {
|
|
21
|
+
frame: world.frame,
|
|
22
|
+
bodies: normalized.bodies,
|
|
23
|
+
authoritativeBodyProxies: normalized.authoritativeBodyProxies,
|
|
24
|
+
};
|
|
25
|
+
const previousSimulationWorld = internalPhysicsWorldByCosmeticWorld.get(world);
|
|
26
|
+
if (previousSimulationWorld !== undefined) {
|
|
27
|
+
internalPhysicsWorldByCosmeticWorld.set(nextWorld, previousSimulationWorld);
|
|
28
|
+
}
|
|
29
|
+
return nextWorld;
|
|
30
|
+
}
|
|
31
|
+
function stepDeterministicCosmeticPhysicsWorld3D(world, options = {}) {
|
|
32
|
+
const normalized = normalizeCosmeticBodies(world.bodies, world.authoritativeBodyProxies);
|
|
33
|
+
const previousSimulationWorld = internalPhysicsWorldByCosmeticWorld.get(world);
|
|
34
|
+
const baseSimulationWorld = createSimulationWorld(normalized, previousSimulationWorld);
|
|
35
|
+
const movedProxyIds = movedAuthoritativeBodyProxyIds(previousSimulationWorld, normalized.authoritativeBodyProxies);
|
|
36
|
+
const simulationWorld = wakeSleepingCosmeticBodies(baseSimulationWorld, previousSimulationWorld, movedProxyIds);
|
|
37
|
+
const stepped = (0, physics3d_js_1.stepDeterministicPhysicsWorld3D)(simulationWorld, {
|
|
38
|
+
gravityY: options.gravityY,
|
|
39
|
+
dtTicks: options.dtTicks,
|
|
40
|
+
velocityIterations: options.velocityIterations,
|
|
41
|
+
substeps: options.substeps,
|
|
42
|
+
computeChecksum: false,
|
|
43
|
+
computeBroadphasePairs: options.computeBroadphasePairs,
|
|
44
|
+
});
|
|
45
|
+
const nextBodies = stepped.world.bodies.filter((body) => body.kind === 'dynamic');
|
|
46
|
+
const cosmeticBodyIds = new Set([
|
|
47
|
+
...normalized.bodies.map((body) => body.id),
|
|
48
|
+
...(previousSimulationWorld?.bodies ?? [])
|
|
49
|
+
.filter((body) => body.kind === 'dynamic')
|
|
50
|
+
.map((body) => body.id),
|
|
51
|
+
]);
|
|
52
|
+
const nextWorld = {
|
|
53
|
+
frame: world.frame + 1,
|
|
54
|
+
bodies: nextBodies,
|
|
55
|
+
authoritativeBodyProxies: normalized.authoritativeBodyProxies,
|
|
56
|
+
};
|
|
57
|
+
internalPhysicsWorldByCosmeticWorld.set(nextWorld, stepped.world);
|
|
58
|
+
return {
|
|
59
|
+
world: nextWorld,
|
|
60
|
+
contacts: stepped.contacts.filter((contact) => cosmeticBodyIds.has(contact.a) || cosmeticBodyIds.has(contact.b)),
|
|
61
|
+
broadphasePairs: stepped.broadphasePairs,
|
|
62
|
+
narrowphaseContacts: stepped.narrowphaseContacts,
|
|
63
|
+
solverCorrections: stepped.solverCorrections,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function normalizeCosmeticBodies(bodies, authoritativeBodyProxies) {
|
|
67
|
+
for (const body of bodies) {
|
|
68
|
+
if (body.kind !== 'dynamic') {
|
|
69
|
+
throw new Error(`Cosmetic physics body ${body.id} must be dynamic`);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
for (const proxy of authoritativeBodyProxies) {
|
|
73
|
+
if (proxy.kind !== 'static' && proxy.kind !== 'kinematic') {
|
|
74
|
+
throw new Error(`Authoritative cosmetic physics proxy ${proxy.id} must be static or kinematic`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
const normalized = (0, physics3d_js_1.createDeterministicPhysicsWorld3D)([
|
|
78
|
+
...authoritativeBodyProxies,
|
|
79
|
+
...bodies,
|
|
80
|
+
]);
|
|
81
|
+
return {
|
|
82
|
+
allBodies: normalized.bodies,
|
|
83
|
+
bodies: normalized.bodies.filter((body) => body.kind === 'dynamic'),
|
|
84
|
+
authoritativeBodyProxies: normalized.bodies.filter((body) => body.kind === 'static' || body.kind === 'kinematic'),
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
function createSimulationWorld(normalized, previous) {
|
|
88
|
+
const base = {
|
|
89
|
+
frame: 0,
|
|
90
|
+
bodies: normalized.allBodies,
|
|
91
|
+
activePairs: [],
|
|
92
|
+
activePairMetadata: [],
|
|
93
|
+
contactCache: [],
|
|
94
|
+
jointCache: [],
|
|
95
|
+
};
|
|
96
|
+
if (previous === undefined) {
|
|
97
|
+
return base;
|
|
98
|
+
}
|
|
99
|
+
const bodyIds = new Set(base.bodies.map((body) => body.id));
|
|
100
|
+
// Keep removed endpoints in the previous-pair history so the solver can
|
|
101
|
+
// emit their exit event; missing bodies are safe here because event masks
|
|
102
|
+
// default to enabled and the warm cache below only keeps live pairs.
|
|
103
|
+
const activePairMetadata = previous.activePairMetadata;
|
|
104
|
+
const livePairIds = new Set(activePairMetadata
|
|
105
|
+
.filter((pair) => bodyIds.has(pair.a) && bodyIds.has(pair.b))
|
|
106
|
+
.map((pair) => pair.pair));
|
|
107
|
+
return {
|
|
108
|
+
...base,
|
|
109
|
+
activePairs: previous.activePairs,
|
|
110
|
+
activePairMetadata,
|
|
111
|
+
contactCache: previous.contactCache.filter((entry) => livePairIds.has(entry.pair)),
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
function movedAuthoritativeBodyProxyIds(previous, current) {
|
|
115
|
+
const previousById = new Map((previous?.bodies ?? [])
|
|
116
|
+
.filter((body) => body.kind === 'static' || body.kind === 'kinematic')
|
|
117
|
+
.map((body) => [body.id, body]));
|
|
118
|
+
const currentById = new Map(current.map((proxy) => [proxy.id, proxy]));
|
|
119
|
+
const moved = new Set();
|
|
120
|
+
for (const id of new Set([...previousById.keys(), ...currentById.keys()])) {
|
|
121
|
+
const prior = previousById.get(id);
|
|
122
|
+
const next = currentById.get(id);
|
|
123
|
+
if (prior === undefined || next === undefined || !sameBodyPose(prior, next)) {
|
|
124
|
+
moved.add(id);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return moved;
|
|
128
|
+
}
|
|
129
|
+
function sameBodyPose(left, right) {
|
|
130
|
+
return left.x === right.x
|
|
131
|
+
&& left.y === right.y
|
|
132
|
+
&& left.z === right.z
|
|
133
|
+
&& left.rx === right.rx
|
|
134
|
+
&& left.ry === right.ry
|
|
135
|
+
&& left.rz === right.rz
|
|
136
|
+
&& sameOrientation(left.orientation, right.orientation);
|
|
137
|
+
}
|
|
138
|
+
function sameOrientation(left, right) {
|
|
139
|
+
if (left === undefined || right === undefined) {
|
|
140
|
+
return left === right;
|
|
141
|
+
}
|
|
142
|
+
return left.x === right.x
|
|
143
|
+
&& left.y === right.y
|
|
144
|
+
&& left.z === right.z
|
|
145
|
+
&& left.w === right.w;
|
|
146
|
+
}
|
|
147
|
+
function wakeSleepingCosmeticBodies(world, previous, movedProxyIds) {
|
|
148
|
+
if (movedProxyIds.size === 0) {
|
|
149
|
+
return world;
|
|
150
|
+
}
|
|
151
|
+
const dynamicBodyIds = new Set(world.bodies.filter((body) => body.kind === 'dynamic').map((body) => body.id));
|
|
152
|
+
const dynamicContactGraph = new Map();
|
|
153
|
+
const directlySupportedIds = new Set();
|
|
154
|
+
const contacts = [
|
|
155
|
+
...(0, physics3d_js_1.contactDetailsDeterministicPhysics3D)(world),
|
|
156
|
+
...(previous?.activePairMetadata ?? []),
|
|
157
|
+
];
|
|
158
|
+
for (const contact of contacts) {
|
|
159
|
+
if (contact.trigger || contact.sensor) {
|
|
160
|
+
continue;
|
|
161
|
+
}
|
|
162
|
+
const leftDynamic = dynamicBodyIds.has(contact.a);
|
|
163
|
+
const rightDynamic = dynamicBodyIds.has(contact.b);
|
|
164
|
+
if (movedProxyIds.has(contact.a) && rightDynamic) {
|
|
165
|
+
directlySupportedIds.add(contact.b);
|
|
166
|
+
}
|
|
167
|
+
if (movedProxyIds.has(contact.b) && leftDynamic) {
|
|
168
|
+
directlySupportedIds.add(contact.a);
|
|
169
|
+
}
|
|
170
|
+
if (!leftDynamic || !rightDynamic) {
|
|
171
|
+
continue;
|
|
172
|
+
}
|
|
173
|
+
const leftNeighbors = dynamicContactGraph.get(contact.a) ?? new Set();
|
|
174
|
+
leftNeighbors.add(contact.b);
|
|
175
|
+
dynamicContactGraph.set(contact.a, leftNeighbors);
|
|
176
|
+
const rightNeighbors = dynamicContactGraph.get(contact.b) ?? new Set();
|
|
177
|
+
rightNeighbors.add(contact.a);
|
|
178
|
+
dynamicContactGraph.set(contact.b, rightNeighbors);
|
|
179
|
+
}
|
|
180
|
+
const wakeIds = new Set(directlySupportedIds);
|
|
181
|
+
const pending = [...directlySupportedIds];
|
|
182
|
+
for (let index = 0; index < pending.length; index += 1) {
|
|
183
|
+
const bodyId = pending[index];
|
|
184
|
+
for (const neighbor of dynamicContactGraph.get(bodyId) ?? []) {
|
|
185
|
+
if (wakeIds.has(neighbor)) {
|
|
186
|
+
continue;
|
|
187
|
+
}
|
|
188
|
+
wakeIds.add(neighbor);
|
|
189
|
+
pending.push(neighbor);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
let wokeBody = false;
|
|
193
|
+
const bodies = world.bodies.map((body) => {
|
|
194
|
+
if (body.kind !== 'dynamic' || body.sleeping !== true || !wakeIds.has(body.id)) {
|
|
195
|
+
return body;
|
|
196
|
+
}
|
|
197
|
+
wokeBody = true;
|
|
198
|
+
return { ...body, sleeping: false, lowVelFrames: 0 };
|
|
199
|
+
});
|
|
200
|
+
return wokeBody ? { ...world, bodies } : world;
|
|
201
|
+
}
|
package/dist/cjs/creator.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.runSyncplaySynctest = exports.createSyncplayGameRuntime = exports.createSyncplayOfflineRuntime = exports.createSchemaArtifacts = exports.defineSyncplayGame = exports.verifyReplayWithDescriptor = exports.verifyReplay = exports.exportPromotionSnapshot = exports.createSessionFromPromotionSnapshot = exports.createPauseController = exports.createOfflineSession = exports.runInstantReplay = exports.createInstantReplayRunner = exports.createDeterministicCommandTimeline = exports.defaultChecksum = exports.canonicalStringify = exports.canonicalize = void 0;
|
|
3
|
+
exports.stepDeterministicVehicle3D = exports.cookDeterministicVoxelChunkCollider3D = exports.stepDeterministicPhysicsWorld3D = exports.shapeCastDeterministicPhysics3DDetailed = exports.shapeCastDeterministicPhysics3D = exports.setDeterministicBodyVelocity3D = exports.runDeterministicPhysics3DStress = exports.raycastDeterministicPhysics3DDetailed = exports.raycastDeterministicPhysics3D = exports.overlapDeterministicPhysics3D = exports.deterministicPhysicsCallback3D = exports.deterministicPhysicsBodyById3D = exports.deriveInverseInertia = exports.createDeterministicPhysicsWorld3D = exports.contactDetailsDeterministicPhysics3D = exports.applyDeterministicWorldEdit3D = exports.applyDeterministicImpulses3D = exports.applyDeterministicImpulse3D = exports.runSyncplaySynctest = exports.createSyncplayGameRuntime = exports.createSyncplayOfflineRuntime = exports.createSchemaArtifacts = exports.defineSyncplayGame = exports.verifyReplayWithDescriptor = exports.verifyReplay = exports.exportPromotionSnapshot = exports.createSessionFromPromotionSnapshot = exports.createPauseController = exports.createOfflineSession = exports.runInstantReplay = exports.createInstantReplayRunner = exports.createDeterministicCommandTimeline = exports.defaultChecksum = exports.canonicalStringify = exports.canonicalize = void 0;
|
|
4
4
|
var canonical_js_1 = require("./canonical.js");
|
|
5
5
|
Object.defineProperty(exports, "canonicalize", { enumerable: true, get: function () { return canonical_js_1.canonicalize; } });
|
|
6
6
|
Object.defineProperty(exports, "canonicalStringify", { enumerable: true, get: function () { return canonical_js_1.canonicalStringify; } });
|
|
@@ -29,3 +29,28 @@ Object.defineProperty(exports, "createSyncplayOfflineRuntime", { enumerable: tru
|
|
|
29
29
|
Object.defineProperty(exports, "createSyncplayGameRuntime", { enumerable: true, get: function () { return sdk_offline_js_1.createSyncplayOfflineRuntime; } });
|
|
30
30
|
var synctest_js_1 = require("./synctest.js");
|
|
31
31
|
Object.defineProperty(exports, "runSyncplaySynctest", { enumerable: true, get: function () { return synctest_js_1.runSyncplaySynctest; } });
|
|
32
|
+
// Deterministic 3D physics is supported creator/H5 surface. Curated: world
|
|
33
|
+
// create/step/edit, impulses, queries, vehicles, and voxel-chunk collider
|
|
34
|
+
// cooking. Cosmetic physics, KCC (movement3d), and the destruction-cert runner
|
|
35
|
+
// stay off it — the first two are not requested, the third reads wall clock.
|
|
36
|
+
var physics3d_js_1 = require("./physics3d.js");
|
|
37
|
+
Object.defineProperty(exports, "applyDeterministicImpulse3D", { enumerable: true, get: function () { return physics3d_js_1.applyDeterministicImpulse3D; } });
|
|
38
|
+
Object.defineProperty(exports, "applyDeterministicImpulses3D", { enumerable: true, get: function () { return physics3d_js_1.applyDeterministicImpulses3D; } });
|
|
39
|
+
Object.defineProperty(exports, "applyDeterministicWorldEdit3D", { enumerable: true, get: function () { return physics3d_js_1.applyDeterministicWorldEdit3D; } });
|
|
40
|
+
Object.defineProperty(exports, "contactDetailsDeterministicPhysics3D", { enumerable: true, get: function () { return physics3d_js_1.contactDetailsDeterministicPhysics3D; } });
|
|
41
|
+
Object.defineProperty(exports, "createDeterministicPhysicsWorld3D", { enumerable: true, get: function () { return physics3d_js_1.createDeterministicPhysicsWorld3D; } });
|
|
42
|
+
Object.defineProperty(exports, "deriveInverseInertia", { enumerable: true, get: function () { return physics3d_js_1.deriveInverseInertia; } });
|
|
43
|
+
Object.defineProperty(exports, "deterministicPhysicsBodyById3D", { enumerable: true, get: function () { return physics3d_js_1.deterministicPhysicsBodyById3D; } });
|
|
44
|
+
Object.defineProperty(exports, "deterministicPhysicsCallback3D", { enumerable: true, get: function () { return physics3d_js_1.deterministicPhysicsCallback3D; } });
|
|
45
|
+
Object.defineProperty(exports, "overlapDeterministicPhysics3D", { enumerable: true, get: function () { return physics3d_js_1.overlapDeterministicPhysics3D; } });
|
|
46
|
+
Object.defineProperty(exports, "raycastDeterministicPhysics3D", { enumerable: true, get: function () { return physics3d_js_1.raycastDeterministicPhysics3D; } });
|
|
47
|
+
Object.defineProperty(exports, "raycastDeterministicPhysics3DDetailed", { enumerable: true, get: function () { return physics3d_js_1.raycastDeterministicPhysics3DDetailed; } });
|
|
48
|
+
Object.defineProperty(exports, "runDeterministicPhysics3DStress", { enumerable: true, get: function () { return physics3d_js_1.runDeterministicPhysics3DStress; } });
|
|
49
|
+
Object.defineProperty(exports, "setDeterministicBodyVelocity3D", { enumerable: true, get: function () { return physics3d_js_1.setDeterministicBodyVelocity3D; } });
|
|
50
|
+
Object.defineProperty(exports, "shapeCastDeterministicPhysics3D", { enumerable: true, get: function () { return physics3d_js_1.shapeCastDeterministicPhysics3D; } });
|
|
51
|
+
Object.defineProperty(exports, "shapeCastDeterministicPhysics3DDetailed", { enumerable: true, get: function () { return physics3d_js_1.shapeCastDeterministicPhysics3DDetailed; } });
|
|
52
|
+
Object.defineProperty(exports, "stepDeterministicPhysicsWorld3D", { enumerable: true, get: function () { return physics3d_js_1.stepDeterministicPhysicsWorld3D; } });
|
|
53
|
+
var physics3d_voxel_js_1 = require("./physics3d-voxel.js");
|
|
54
|
+
Object.defineProperty(exports, "cookDeterministicVoxelChunkCollider3D", { enumerable: true, get: function () { return physics3d_voxel_js_1.cookDeterministicVoxelChunkCollider3D; } });
|
|
55
|
+
var physics3d_vehicle_js_1 = require("./physics3d-vehicle.js");
|
|
56
|
+
Object.defineProperty(exports, "stepDeterministicVehicle3D", { enumerable: true, get: function () { return physics3d_vehicle_js_1.stepDeterministicVehicle3D; } });
|
|
@@ -1213,7 +1213,10 @@ function createComponentReplayBundle() {
|
|
|
1213
1213
|
});
|
|
1214
1214
|
}
|
|
1215
1215
|
function physicsCategory(bodies, requestedFrames, executedFrames, enforceThresholds, benchmark, noFastStress) {
|
|
1216
|
-
const metrics = (0, physics3d_js_1.runDeterministicPhysics3DStress)(bodies, executedFrames, {
|
|
1216
|
+
const metrics = (0, physics3d_js_1.runDeterministicPhysics3DStress)(bodies, executedFrames, {
|
|
1217
|
+
allowFastStress: !noFastStress,
|
|
1218
|
+
now: engineCompleteNowMs,
|
|
1219
|
+
});
|
|
1217
1220
|
const callbackMasks = (0, physics3d_js_1.runDeterministicPhysics3DCallbackMaskFixture)();
|
|
1218
1221
|
const queryOptions = (0, physics3d_js_1.runDeterministicPhysics3DQueryOptionsFixture)();
|
|
1219
1222
|
const materials = (0, physics3d_js_1.runDeterministicPhysics3DMaterialFixture)();
|
|
@@ -1228,8 +1231,8 @@ function physicsCategory(bodies, requestedFrames, executedFrames, enforceThresho
|
|
|
1228
1231
|
// the per-frame mean budget; short ad-hoc runs skip it (gates default true).
|
|
1229
1232
|
const rigidPile = benchmark && requestedFrames >= 2000 ? runPhysics3DRigidPileMeasurementFixture(128, 200) : undefined;
|
|
1230
1233
|
const vehicleFleet = benchmark && requestedFrames >= 2000 ? runVehicle3DFleetMeasurementFixture(16, 200) : undefined;
|
|
1231
|
-
const highBodySample512 = requestedFrames > 512 ? (0, physics3d_js_1.runDeterministicPhysics3DStress)(512, 128) : undefined;
|
|
1232
|
-
const highBodySample2048 = requestedFrames > 512 ? (0, physics3d_js_1.runDeterministicPhysics3DStress)(2048, 32) : undefined;
|
|
1234
|
+
const highBodySample512 = requestedFrames > 512 ? (0, physics3d_js_1.runDeterministicPhysics3DStress)(512, 128, { now: engineCompleteNowMs }) : undefined;
|
|
1235
|
+
const highBodySample2048 = requestedFrames > 512 ? (0, physics3d_js_1.runDeterministicPhysics3DStress)(2048, 32, { now: engineCompleteNowMs }) : undefined;
|
|
1233
1236
|
return categoryReport('physics3d', (0, canonical_js_1.defaultChecksum)({
|
|
1234
1237
|
stress: metrics.checksum,
|
|
1235
1238
|
materials: materials.checksum,
|
|
@@ -1344,7 +1347,9 @@ function physicsCategory(bodies, requestedFrames, executedFrames, enforceThresho
|
|
|
1344
1347
|
? metrics.fullPhysicsStepFrames === metrics.frames && metrics.optimizedStressFrames === 0 && metrics.extrapolatedStress === false
|
|
1345
1348
|
: true,
|
|
1346
1349
|
optimizedStressFramesDeclared: metrics.optimizedStressFrames === Math.max(0, metrics.frames - metrics.fullPhysicsStepFrames),
|
|
1347
|
-
|
|
1350
|
+
// A missing p99StepMs means the stress ran untimed — fail loud rather than
|
|
1351
|
+
// pass a threshold gate that measured nothing.
|
|
1352
|
+
measuredP99WithinThreshold: enforceThresholds ? (metrics.p99StepMs ?? Number.POSITIVE_INFINITY) < 25 : true,
|
|
1348
1353
|
physicsStressProofMode: metrics.extrapolatedStress ? 'optimized-tail' : 'full-step',
|
|
1349
1354
|
}, withFrameMetrics({
|
|
1350
1355
|
...metrics,
|
|
@@ -891,8 +891,11 @@ function runPhysicsCategory(config) {
|
|
|
891
891
|
physics3DStressScheduledPostQueries: physics3DStress.scheduledPostPhysicsQueries,
|
|
892
892
|
physics3DStressScheduledShapeCasts: physics3DStress.scheduledShapeCastQueries,
|
|
893
893
|
physics3DStressScheduledResults: physics3DStress.scheduledQueryResultCount,
|
|
894
|
-
|
|
895
|
-
|
|
894
|
+
// Synthetic deterministic score, never wall clock: this metrics object is
|
|
895
|
+
// checksummed and compared across runtimes, so a real timing would make
|
|
896
|
+
// parity drift run to run.
|
|
897
|
+
physics3DStressP95StepCost: physics3DStress.p95StepCost,
|
|
898
|
+
physics3DStressP99StepCost: physics3DStress.p99StepCost,
|
|
896
899
|
physics3DStressAngularBodies: physics3DStress.angularBodies,
|
|
897
900
|
physics3DStressMeshStaticColliders: physics3DStress.meshStaticColliders,
|
|
898
901
|
physics3DStressExactMeshRaycasts: physics3DStress.exactMeshRaycasts,
|
package/dist/cjs/index.js
CHANGED
|
@@ -4,8 +4,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.createDeterministicCommandTimelineSnapshot = exports.createDeterministicCommandTimeline = exports.assertDeterministicPayloadFields = exports.translateAabb = exports.sortAabbsByStableId = exports.segmentsIntersect = exports.segmentSegmentDistance = exports.segmentPointDistance = exports.pointOnSegment = exports.orientation = exports.fixedVec2 = exports.fixedCircle = exports.fixedAabb = exports.closestPointOnSegment = exports.circleIntersectsAabb = exports.circleIntersects = exports.aabbIntersects = exports.aabbContainsPoint = exports.stableSortedKeys = exports.stableEntries = exports.deterministicShuffle = exports.createStableIndexedMap = exports.encodeUtf8 = exports.defaultChecksum = exports.decodeUtf8 = exports.decodeCanonicalValue = exports.cloneCanonical = exports.canonicalStringify = exports.canonicalize = exports.tickDeterministicHfsm = exports.tickDeterministicBehaviorTreeWithMemory = exports.tickDeterministicBehaviorTree = exports.selectDeterministicUtility = exports.runDeterministicBotSimulation = exports.getBlackboardValue = exports.createDeterministicBotBlackboard = exports.cookDeterministicBotAsset = exports.traceDeterministicBotDocument = exports.summarizeDeterministicBotDocumentTraceCoverage = exports.summarizeDeterministicBotDocumentTraceCounterDelta = exports.compileDeterministicBotDocument = exports.createDeterministicAuthorityRoom = exports.stableAssetCookJson = exports.materializePrototypeEntities = exports.cookDeterministicAssets = exports.assertAssetManifestMatches = exports.stepDeterministicAnimation = exports.reconstructDeterministicAnimationEvents = exports.createDeterministicAnimationRuntimeState = exports.cookDeterministicAnimation = void 0;
|
|
5
5
|
exports.createDeterministicLocalAuthorityCorrectionEnvelope = exports.createDeterministicLocalAuthorityCommandBundleEnvelope = exports.createDeterministicLocalAuthorityAckEnvelope = exports.applyDeterministicLocalAuthorityInputBundleEnvelope = exports.applyDeterministicLocalAuthorityCommandBundleEnvelope = exports.createDeterministicLocalAuthorityRuntime = exports.validateDeterministicLagCompensatedShot3D = exports.validateDeterministicAuthoritativeLagCompensatedShot3D = exports.rewindDeterministicLagCompensatedTargets3D = exports.createDeterministicLagCompensation3DHistory = exports.buildDeterministicLagCompensatedHitboxProxies3D = exports.sortDeterministicInputTimelineFlags = exports.evaluateDeterministicInputTimelineResult = exports.accumulateDeterministicInputTimelineState = exports.createInputAuthority = exports.filterDeterministicEventsForPlayer = exports.createDeterministicEventTimeline = exports.SyncplayError = exports.validateDeterministicFrameSystemsStateless = exports.runDeterministicFrameRuntimeMutationCorpus = exports.isDeterministicFrameHeapStaleHandleError = exports.generateDeterministicFrameRuntimeSource = exports.createDeterministicSparseSetFrameRuntime = exports.createDeterministicSlotMap = exports.createDeterministicFrameRuntimeAccessors = exports.createDeterministicFrameRuntime = exports.createDeterministicBitset = exports.compileDeterministicDslRuntimeDescriptor = exports.assertDeterministicFrameSystemsStateless = exports.assertDeterministicFrameHeapStaleHandleError = exports.stableDeterministicEngineCompleteJson = exports.runDeterministicEngineCompleteSuite = exports.engineCompleteExecutionProofHash = exports.createDeterministicEventEffectsAdapter = exports.createEcsLiteWorld = exports.verifyDeterministicSessionRuntimeReplay = exports.createDeterministicSessionReplayBundle = exports.createDeterministicSessionCore = exports.stepTopDownBody = exports.stepKccLiteBody = exports.quantizeFpsAim = exports.detectVerticalCcdHit = exports.cookStaticColliders = exports.combineDeterministicPhysicsMaterial = exports.verifyDeterministicConfigBundle = exports.summarizeDeterministicConfigBundleFailureReasons = exports.evaluateDeterministicConfigBundleParityResult = exports.cookDeterministicConfigBundle = exports.evaluateDeterministicCommandTimelineMigrationResult = exports.deterministicPayloadMatchesFields = void 0;
|
|
6
6
|
exports.queryDeterministicPhysicsShapeOverlap2D = exports.queryDeterministicPhysicsAabb2D = exports.nearestDeterministicPhysicsHit2D = exports.createDeterministicPhysicsWorld2D = exports.circleCastDeterministicPhysics2D = exports.createOfflineSession = exports.valueNoise2D = exports.valueNoise1D = exports.hashUint32 = exports.hash2 = exports.fbm2D = exports.createNetworkedSyncplayClient = exports.stepDeterministicNavmeshOffMeshTraversal = exports.stepDeterministicNavmeshAgents = exports.smoothDeterministicNavmeshPath = exports.runDeterministicNavmeshStress = exports.locateDeterministicNavmeshPolygon = exports.findDeterministicNavmeshPointPath = exports.findDeterministicNavmeshPath = exports.cookImportedDeterministicNavmesh = exports.cookDeterministicNavmesh = exports.stepDeterministicNavigationAgents = exports.smoothDeterministicPath = exports.findDeterministicPath = exports.createDeterministicFlowField = exports.cookTilemapNavigationGraph = exports.cookDeterministicNavigationGraph = exports.applyDeterministicReciprocalAvoidance = exports.stepDeterministicKcc3D = exports.stepDeterministicCarry3D = exports.validateDeterministicLagCompensatedHit = exports.stepDeterministicTopDownMover = exports.stepDeterministicKcc2D = exports.stepDeterministicFpsAim = exports.runDeterministicMovementSimulation = exports.runDeterministicMovementCrowdSimulation = exports.rewindDeterministicTargets = exports.createDeterministicMath = exports.encodeDeterministicLocalAuthorityWireEnvelope = exports.deterministicLocalAuthorityWireProtocol = exports.decodeDeterministicLocalAuthorityWireEnvelope = exports.createDeterministicLocalAuthorityWireReceiver = exports.createDeterministicLocalAuthorityWireAuth = exports.createDeterministicLocalAuthoritySnapshotTransfer = exports.createDeterministicLocalAuthoritySnapshotRequestEnvelope = exports.createDeterministicLocalAuthoritySnapshotOfferEnvelope = exports.createDeterministicLocalAuthoritySnapshotEnvelope = exports.createDeterministicLocalAuthoritySnapshotCompleteEnvelope = exports.createDeterministicLocalAuthoritySnapshotChunkEnvelope = exports.createDeterministicLocalAuthorityInputBundleEnvelope = void 0;
|
|
7
|
-
exports.
|
|
8
|
-
exports.
|
|
7
|
+
exports.inspectReplayFrame = exports.explainReplayChecksum = exports.diffReplayFrames = exports.verifyReplayScoreAgainstTrustedRuntime = exports.verifyDeterministicSelfContainedFrameRuntimeReplayBundle = exports.verifyDeterministicReplayBundle = exports.verifyDeterministicFrameRuntimeReplayBundle = exports.sliceDeterministicReplayBundle = exports.minimizeDeterministicReplayDesyncBundle = exports.minimizeDeterministicReplayDesync = exports.createDeterministicReplayRuntimeManifest = exports.createDeterministicReplayDebugTables = exports.createDeterministicReplayBundle = exports.verifyReplayWithDescriptor = exports.verifyReplay = exports.DeterministicRandom = exports.interpolateDeterministicRenderVec2 = exports.interpolateDeterministicRenderNumber = exports.createDeterministicR3fRenderAdapter = exports.createDeterministicR3fDebugOverlay = exports.stepDeterministicVehicle3D = exports.runDeterministicTower3DScenario = exports.runDeterministicStackingSuite3D = exports.runDeterministicPyramid3DScenario = exports.runDeterministicMassRatio3DScenario = exports.runDeterministicKickRecovery3DScenario = exports.stepDeterministicCosmeticPhysicsWorld3D = exports.setDeterministicCosmeticPhysicsAuthoritativeBodyProxies3D = exports.createDeterministicCosmeticPhysicsWorld3D = exports.runDeterministicPhysics3DDestructionCert = exports.cookDeterministicVoxelChunkCollider3D = exports.stepDeterministicPhysicsWorld3D = exports.shapeCastDeterministicPhysics3DDetailed = exports.shapeCastDeterministicPhysics3D = exports.setDeterministicBodyVelocity3D = exports.runDeterministicPhysics3DStress = exports.raycastDeterministicPhysics3DDetailed = exports.raycastDeterministicPhysics3D = exports.overlapDeterministicPhysics3D = exports.deterministicPhysicsCallback3D = exports.deterministicPhysicsBodyById3D = exports.deriveInverseInertia = exports.createDeterministicPhysicsWorld3D = exports.contactDetailsDeterministicPhysics3D = exports.applyDeterministicWorldEdit3D = exports.applyDeterministicImpulses3D = exports.applyDeterministicImpulse3D = exports.stepDeterministicPhysicsWorld2D = exports.raycastDeterministicPhysics2D = exports.raycastAllDeterministicPhysics2D = void 0;
|
|
8
|
+
exports.isSyncplaySecretCommand = exports.decodeSyncplaySecretPrivateMessage = exports.validateSyncplaySecretSystemsConfig = exports.syncplaySecretLimits = exports.syncplaySecretConfigHash = exports.tickCooldown = exports.scheduleFrameEvent = exports.popDueFrameEvents = exports.millisecondsToFrames = exports.framesToMilliseconds = exports.createCooldown = exports.summarizeDeterministicLifecycleCounters = exports.createDeterministicLifecycleRunner = exports.createDeterministicSparseSet = exports.createDeterministicSignalBus = exports.encodeDeterministicSessionMessage = exports.deterministicSessionWireVersion = exports.decodeDeterministicSessionMessage = exports.encodeDeterministicStateSnapshot = exports.deterministicRoomDescriptorHash = exports.DEFAULT_SNAPSHOT_CHUNK_SIZE = exports.DEFAULT_MAX_SNAPSHOT_BYTES = exports.decodeDeterministicStateSnapshot = exports.createSnapshotTransferFromBytes = exports.createSnapshotTransferCollector = exports.bytesToBase64 = exports.base64ToBytes = exports.createSyncplayOfflineRuntime = exports.stableDeterministicDslSchemaJson = exports.parseDeterministicSchemaDsl = exports.deterministicDslMaxPlayers = exports.createDeterministicBinarySerializer = exports.proveSchemaBinaryRoundTrip = exports.generateSchemaTypes = exports.generateSchemaBinarySource = exports.createDeterministicDescriptorBinarySchema = exports.createSchemaArtifacts = exports.stableDescriptorId = exports.defineSyncplayGame = exports.withRuntimeDeterminismGuards = exports.createDeterministicRollbackHistory = exports.stableReportJson = exports.stableReportDiffJson = exports.renderDeterministicReportHtml = exports.diffDeterministicReports = exports.createProtocolRollbackReport = exports.verifyScoredReplay = exports.stableFrameDumpJson = exports.stableFrameDiffJson = exports.inspectReplayFrameWithDescriptor = void 0;
|
|
9
|
+
exports.createSyncplaySecretsClient = exports.createSyncplaySecretEventReader = exports.createSyncplaySecretAuthority = exports.verifySyncplaySignedReceipt = exports.createBrowserSyncplaySecretCrypto = exports.syncplaySecretProtocol = void 0;
|
|
9
10
|
var animation_js_1 = require("./animation.js");
|
|
10
11
|
Object.defineProperty(exports, "cookDeterministicAnimation", { enumerable: true, get: function () { return animation_js_1.cookDeterministicAnimation; } });
|
|
11
12
|
Object.defineProperty(exports, "createDeterministicAnimationRuntimeState", { enumerable: true, get: function () { return animation_js_1.createDeterministicAnimationRuntimeState; } });
|
|
@@ -194,6 +195,7 @@ Object.defineProperty(exports, "stepDeterministicPhysicsWorld2D", { enumerable:
|
|
|
194
195
|
var physics3d_js_1 = require("./physics3d.js");
|
|
195
196
|
Object.defineProperty(exports, "applyDeterministicImpulse3D", { enumerable: true, get: function () { return physics3d_js_1.applyDeterministicImpulse3D; } });
|
|
196
197
|
Object.defineProperty(exports, "applyDeterministicImpulses3D", { enumerable: true, get: function () { return physics3d_js_1.applyDeterministicImpulses3D; } });
|
|
198
|
+
Object.defineProperty(exports, "applyDeterministicWorldEdit3D", { enumerable: true, get: function () { return physics3d_js_1.applyDeterministicWorldEdit3D; } });
|
|
197
199
|
Object.defineProperty(exports, "contactDetailsDeterministicPhysics3D", { enumerable: true, get: function () { return physics3d_js_1.contactDetailsDeterministicPhysics3D; } });
|
|
198
200
|
Object.defineProperty(exports, "createDeterministicPhysicsWorld3D", { enumerable: true, get: function () { return physics3d_js_1.createDeterministicPhysicsWorld3D; } });
|
|
199
201
|
Object.defineProperty(exports, "deriveInverseInertia", { enumerable: true, get: function () { return physics3d_js_1.deriveInverseInertia; } });
|
|
@@ -207,6 +209,14 @@ Object.defineProperty(exports, "setDeterministicBodyVelocity3D", { enumerable: t
|
|
|
207
209
|
Object.defineProperty(exports, "shapeCastDeterministicPhysics3D", { enumerable: true, get: function () { return physics3d_js_1.shapeCastDeterministicPhysics3D; } });
|
|
208
210
|
Object.defineProperty(exports, "shapeCastDeterministicPhysics3DDetailed", { enumerable: true, get: function () { return physics3d_js_1.shapeCastDeterministicPhysics3DDetailed; } });
|
|
209
211
|
Object.defineProperty(exports, "stepDeterministicPhysicsWorld3D", { enumerable: true, get: function () { return physics3d_js_1.stepDeterministicPhysicsWorld3D; } });
|
|
212
|
+
var physics3d_voxel_js_1 = require("./physics3d-voxel.js");
|
|
213
|
+
Object.defineProperty(exports, "cookDeterministicVoxelChunkCollider3D", { enumerable: true, get: function () { return physics3d_voxel_js_1.cookDeterministicVoxelChunkCollider3D; } });
|
|
214
|
+
var physics3d_destruction_cert_js_1 = require("./physics3d-destruction-cert.js");
|
|
215
|
+
Object.defineProperty(exports, "runDeterministicPhysics3DDestructionCert", { enumerable: true, get: function () { return physics3d_destruction_cert_js_1.runDeterministicPhysics3DDestructionCert; } });
|
|
216
|
+
var cosmetic_physics3d_js_1 = require("./cosmetic-physics3d.js");
|
|
217
|
+
Object.defineProperty(exports, "createDeterministicCosmeticPhysicsWorld3D", { enumerable: true, get: function () { return cosmetic_physics3d_js_1.createDeterministicCosmeticPhysicsWorld3D; } });
|
|
218
|
+
Object.defineProperty(exports, "setDeterministicCosmeticPhysicsAuthoritativeBodyProxies3D", { enumerable: true, get: function () { return cosmetic_physics3d_js_1.setDeterministicCosmeticPhysicsAuthoritativeBodyProxies3D; } });
|
|
219
|
+
Object.defineProperty(exports, "stepDeterministicCosmeticPhysicsWorld3D", { enumerable: true, get: function () { return cosmetic_physics3d_js_1.stepDeterministicCosmeticPhysicsWorld3D; } });
|
|
210
220
|
var physics3d_stacking_js_1 = require("./physics3d-stacking.js");
|
|
211
221
|
Object.defineProperty(exports, "runDeterministicKickRecovery3DScenario", { enumerable: true, get: function () { return physics3d_stacking_js_1.runDeterministicKickRecovery3DScenario; } });
|
|
212
222
|
Object.defineProperty(exports, "runDeterministicMassRatio3DScenario", { enumerable: true, get: function () { return physics3d_stacking_js_1.runDeterministicMassRatio3DScenario; } });
|