@series-inc/rundot-syncplay 5.28.0-beta.5 → 6.0.0-rc.100
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 +283 -64
- package/bench/wreck-yard-sleeping-contacts.json +855 -0
- package/core/baker.d.ts +0 -2
- package/core/build-native.d.ts +0 -2
- package/core/build-wasm-physics.d.ts +0 -3
- package/core/compiler.d.ts +0 -2
- package/core/deterministic-math.d.ts +75 -5
- package/core/deterministic-stdlib.d.ts +21 -1
- package/core/envelope.d.ts +0 -2
- package/core/f64-bits.d.ts +0 -2
- package/core/index.d.ts +0 -59
- package/core/native/fixed_math.cpp +161 -0
- package/core/native/fixed_math.hpp +12 -0
- package/core/native/instance_ledger.hpp +1095 -0
- package/core/native/kinetix-native-main.cpp +50 -15
- package/core/native/legacy_checkpoint_ids.hpp +107 -0
- package/core/native/mobile/box3d_probe_scenario.cpp +2 -2
- package/core/native/physics/abi.cpp +81 -216
- package/core/native/physics/abi.hpp +4 -6
- package/core/native/physics/articulation.cpp +3 -2
- package/core/native/physics/box3d_adapter.cpp +16080 -0
- package/core/native/physics/box3d_adapter.hpp +1427 -0
- package/core/native/physics/box3d_checkpoint.cpp +62 -0
- package/core/native/physics/box3d_checkpoint.hpp +105 -0
- package/core/native/physics/box3d_deformable.cpp +3184 -0
- package/core/native/physics/box3d_deformable.hpp +210 -0
- package/core/native/physics/box3d_digest.cpp +62 -0
- package/core/native/physics/box3d_digest.hpp +50 -0
- package/core/native/physics/box3d_portal.cpp +2972 -0
- package/core/native/physics/box3d_portal.hpp +496 -0
- package/core/native/physics/box3d_step_phase.hpp +96 -0
- package/core/native/physics/box3d_world_backend.cpp +11562 -0
- package/core/native/physics/box3d_world_backend_kcc.hpp +107 -0
- package/core/native/physics/buoyancy.cpp +1366 -87
- package/core/native/physics/buoyancy.hpp +123 -9
- package/core/native/physics/capsule_triangle.cpp +168 -0
- package/core/native/physics/capsule_triangle.hpp +40 -0
- package/core/native/physics/capsule_triangle_native.inc +347 -0
- package/core/native/physics/cellular_field3d.cpp +16 -0
- package/core/native/physics/cellular_field3d.hpp +654 -0
- package/core/native/physics/cellular_field3d_abi_setup.inc +893 -0
- package/core/native/physics/cellular_field3d_checkpoints.inc +577 -0
- package/core/native/physics/cellular_field3d_codec.inc +1497 -0
- package/core/native/physics/cellular_field3d_dirty.inc +389 -0
- package/core/native/physics/cellular_field3d_edits.inc +838 -0
- package/core/native/physics/cellular_field3d_internal.hpp +1097 -0
- package/core/native/physics/cellular_field3d_lifecycle.inc +534 -0
- package/core/native/physics/cellular_field3d_pages.inc +1541 -0
- package/core/native/physics/cellular_field3d_queries.inc +568 -0
- package/core/native/physics/cellular_field3d_serialize.inc +1032 -0
- package/core/native/physics/cellular_field3d_step.inc +2021 -0
- package/core/native/physics/cellular_mesher3d.cpp +1118 -0
- package/core/native/physics/cellular_mesher3d.hpp +184 -0
- package/core/native/physics/cellular_teardown3d.cpp +736 -0
- package/core/native/physics/cellular_teardown3d.hpp +207 -0
- package/core/native/physics/cellular_teardown3d_delta.inc +99 -0
- package/core/native/physics/cellular_teardown3d_islands.inc +357 -0
- package/core/native/physics/cellular_teardown3d_pages.inc +494 -0
- package/core/native/physics/cellular_teardown3d_snapshot.inc +416 -0
- package/core/native/physics/cellular_teardown3d_stream.inc +267 -0
- package/core/native/physics/certified_sum.hpp +218 -0
- package/core/native/physics/character.cpp +5 -4
- package/core/native/physics/checkpoint_schema.hpp +568 -0
- package/core/native/physics/cloth.cpp +2 -1
- package/core/native/physics/constraint_rows.cpp +1115 -43
- package/core/native/physics/constraint_rows.hpp +198 -4
- package/core/native/physics/contact_material_store.cpp +803 -0
- package/core/native/physics/contact_material_store.hpp +315 -0
- package/core/native/physics/deformable_abi.cpp +389 -0
- package/core/native/physics/deformable_abi.hpp +122 -0
- package/core/native/physics/deformable_geometry.hpp +1949 -0
- package/core/native/physics/deformable_world_bridge.hpp +69 -0
- package/core/native/physics/deterministic_composite_math.hpp +50 -0
- package/core/native/physics/distance.cpp +3 -0
- package/core/native/physics/distance.hpp +1 -1
- package/core/native/physics/exact/exact-applied.cpp +101 -0
- package/core/native/physics/exact/exact-applied.hpp +112 -0
- package/core/native/physics/exact/exact-dyadic.cpp +691 -0
- package/core/native/physics/exact/exact-dyadic.hpp +58 -0
- package/core/native/physics/exact/exact-operation.hpp +51 -0
- package/core/native/physics/exact/word-core.hpp +262 -0
- package/core/native/physics/extended_abi.cpp +90 -5
- package/core/native/physics/extended_abi.hpp +31 -0
- package/core/native/physics/extended_abi_core_features.cpp +11 -9
- package/core/native/physics/extended_abi_deformables.cpp +0 -127
- package/core/native/physics/extended_abi_deformables.hpp +0 -67
- package/core/native/physics/fixed_error_text.hpp +58 -0
- package/core/native/physics/gear.cpp +7 -1
- package/core/native/physics/geometry_memory.hpp +476 -0
- package/core/native/physics/geometry_store.cpp +1106 -0
- package/core/native/physics/geometry_store.hpp +255 -0
- package/core/native/physics/hull_cook.hpp +122 -0
- package/core/native/physics/hull_cook.inc +1214 -0
- package/core/native/physics/hull_manifold.inc +661 -0
- package/core/native/physics/lag_compensation.cpp +4 -3
- package/core/native/physics/mass_properties.cpp +317 -0
- package/core/native/physics/mass_properties.hpp +34 -0
- package/core/native/physics/material_pose.hpp +971 -0
- package/core/native/physics/particles.cpp +9 -8
- package/core/native/physics/path_joint.cpp +4 -3
- package/core/native/physics/physics.cpp +22480 -4669
- package/core/native/physics/physics.hpp +980 -24
- package/core/native/physics/planar_deformable.cpp +9 -8
- package/core/native/physics/platformer_2d.cpp +11 -10
- package/core/native/physics/powered_ragdoll.cpp +11 -7
- package/core/native/physics/ragdoll.cpp +6 -5
- package/core/native/physics/ragdoll.hpp +6 -4
- package/core/native/physics/rope.cpp +24 -3
- package/core/native/physics/rope.hpp +1 -1
- package/core/native/physics/sdf_geometry.cpp +17 -16
- package/core/native/physics/soft_collision.cpp +45 -21
- package/core/native/physics/step_sort.hpp +122 -0
- package/core/native/physics/surface_velocity.cpp +817 -13
- package/core/native/physics/surface_velocity.hpp +283 -67
- package/core/native/physics/surface_velocity_math.hpp +91 -0
- package/core/native/physics/topology.cpp +532 -42
- package/core/native/physics/topology.hpp +153 -6
- package/core/native/physics/tracks.cpp +11 -10
- package/core/native/physics/voxel_cooking.cpp +150 -87
- package/core/native/physics/voxel_cooking.hpp +12 -12
- package/core/native/physics/world.cpp +14691 -1265
- package/core/native/physics/world.hpp +2634 -17
- package/core/native/physics/world_abi.cpp +7005 -309
- package/core/native/physics/world_abi.hpp +1080 -10
- package/core/native/physics/world_digest_visitor.hpp +378 -0
- package/core/native/physics/world_strong_digest.hpp +698 -0
- package/core/native/physics2d/ccd.cpp +403 -72
- package/core/native/physics2d/ccd.hpp +25 -0
- package/core/native/physics2d/checkpoint_memory.hpp +349 -0
- package/core/native/physics2d/clock_primitives.hpp +138 -0
- package/core/native/physics2d/commands.cpp +174 -28
- package/core/native/physics2d/commands.hpp +3 -1
- package/core/native/physics2d/contour.cpp +325 -0
- package/core/native/physics2d/contour.hpp +143 -0
- package/core/native/physics2d/fluid.cpp +0 -2
- package/core/native/physics2d/fluid.hpp +0 -1
- package/core/native/physics2d/frame_scope.hpp +124 -0
- package/core/native/physics2d/joint_phases.hpp +93 -0
- package/core/native/physics2d/joints.cpp +587 -150
- package/core/native/physics2d/joints.hpp +5 -0
- package/core/native/physics2d/memory_private.hpp +125 -0
- package/core/native/physics2d/owned_abi.cpp +1385 -766
- package/core/native/physics2d/owned_abi.hpp +230 -46
- package/core/native/physics2d/phase_test_hooks.hpp +17 -0
- package/core/native/physics2d/physics2d.cpp +2073 -120
- package/core/native/physics2d/physics2d.hpp +154 -2
- package/core/native/physics2d/queries.cpp +1055 -79
- package/core/native/physics2d/queries.hpp +71 -5
- package/core/native/physics2d/world.cpp +1464 -140
- package/core/native/physics2d/world.hpp +138 -13
- package/core/native/sha256/sha256_compress_unsigned.hpp +158 -0
- package/core/native/sha256/sha256_fips_constants.hpp +24 -0
- package/core/native/sha256/sha256_length.hpp +56 -0
- package/core/native/sha256/sha256_memo.hpp +48 -0
- package/core/native/sha256/sha256_sink.hpp +234 -0
- package/core/native-product.d.ts +0 -2
- package/core/physics2d-owned.d.ts +468 -124
- package/core/render-projection.d.ts +142 -3
- package/core/render-records.d.ts +0 -2
- package/core/runtime.d.ts +261 -19
- package/core/scripts/box3d-native-build.mjs +891 -0
- package/core/scripts/build-box3d-adapter.mjs +357 -0
- package/core/scripts/build-box3d-browser-checkpoint.mjs +115 -0
- package/core/scripts/build-box3d-deformable.mjs +225 -0
- package/core/scripts/build-box3d-first-impact.mjs +193 -0
- package/core/scripts/build-box3d-fluid-round.mjs +221 -0
- package/core/scripts/build-box3d-host-filter-ccd.mjs +210 -0
- package/core/scripts/build-box3d-kcc-vehicle.mjs +238 -0
- package/core/scripts/build-box3d-pair-filters.mjs +253 -0
- package/core/scripts/build-box3d-perf.mjs +46 -0
- package/core/scripts/build-box3d-portal.mjs +395 -0
- package/core/scripts/build-box3d-rigid-solver.mjs +196 -0
- package/core/scripts/build-box3d-shapes-profile.mjs +337 -0
- package/core/scripts/build-box3d-support-substeps.mjs +254 -0
- package/core/scripts/build-native.mjs +186 -16
- package/core/scripts/build-wasm-physics.mjs +1139 -750
- package/core/scripts/extended-physics-profile.mjs +625 -0
- package/core/scripts/generate-physics2d-vectors.mjs +59 -0
- package/core/src/engine-math.d.mts +23 -0
- package/core/src/engine-math.mjs +1060 -0
- package/core/src/index.mjs +0 -35
- package/core/src/kinetix-deterministic-math.d.ts +2 -0
- package/core/src/kinetix-deterministic-math.mjs +583 -27
- package/core/src/kinetix-deterministic-stdlib.mjs +120 -0
- package/core/src/kinetix-owned-runtime-adapter.mjs +1141 -0
- package/core/src/kinetix-render-projection.mjs +414 -0
- package/core/src/kinetix-runtime-adapter-utils.mjs +301 -8
- package/core/src/kinetix-runtime-contract.mjs +74 -9
- package/core/src/kinetix-runtime-identity.mjs +12 -1
- package/core/src/kinetix-session-config.mjs +7 -2
- package/core/src/kinetix-state-report.mjs +36 -0
- package/core/src/physics/abi-constants.mjs +7 -4
- package/core/src/physics/articulation.d.mts +194 -0
- package/core/src/physics/articulation.mjs +10 -19
- package/core/src/physics/box3d-probe.mjs +8 -18
- package/core/src/physics/buoyancy.d.mts +143 -0
- package/core/src/physics/buoyancy.mjs +268 -0
- package/core/src/physics/cellular-field3d.d.mts +495 -0
- package/core/src/physics/cellular-field3d.mjs +2311 -0
- package/core/src/physics/cellular-mesher3d.d.mts +196 -0
- package/core/src/physics/cellular-mesher3d.mjs +1291 -0
- package/core/src/physics/cellular-teardown-lz4.d.mts +17 -0
- package/core/src/physics/cellular-teardown-lz4.mjs +235 -0
- package/core/src/physics/cellular-teardown3d.d.mts +211 -0
- package/core/src/physics/cellular-teardown3d.mjs +737 -0
- package/core/src/physics/cloth.d.mts +321 -0
- package/core/src/physics/cloth.mjs +53 -19
- package/core/src/physics/deformable-query.d.mts +221 -0
- package/core/src/physics/deformable-query.mjs +32 -27
- package/core/src/physics/deformable-world.d.mts +174 -0
- package/core/src/physics/deformable-world.mjs +915 -0
- package/core/src/physics/distance.d.mts +160 -0
- package/core/src/physics/distance.mjs +155 -649
- package/core/src/physics/extended-wasm-instance.d.mts +5 -0
- package/core/src/physics/extended-wasm-instance.mjs +40 -174
- package/core/src/physics/feature-api.d.mts +76 -0
- package/core/src/physics/feature-api.mjs +110 -0
- package/core/src/physics/fracture.d.mts +137 -0
- package/core/src/physics/fracture.mjs +19 -17
- package/core/src/physics/gear.d.mts +585 -0
- package/core/src/physics/gear.mjs +4 -19
- package/core/src/physics/hull-cook.d.mts +23 -0
- package/core/src/physics/hull-cook.mjs +40 -0
- package/core/src/physics/lag-compensation.d.mts +101 -0
- package/core/src/physics/lag-compensation.mjs +2 -17
- package/core/src/physics/mass-properties.d.mts +114 -0
- package/core/src/physics/mass-properties.mjs +140 -468
- package/core/src/physics/particles.d.mts +182 -0
- package/core/src/physics/particles.mjs +35 -21
- package/core/src/physics/path-joint.d.mts +171 -0
- package/core/src/physics/path-joint.mjs +10 -20
- package/core/src/physics/physics-extended-wasm-module.generated.mjs +7 -8
- package/core/src/physics/physics-profile-wasm-module.generated.mjs +72 -0
- package/core/src/physics/physics-profile.wasm +0 -0
- package/core/src/physics/physics-wasm-module.generated.mjs +60 -7
- package/core/src/physics/physics.wasm +0 -0
- package/core/src/physics/powered-ragdoll.d.mts +188 -0
- package/core/src/physics/powered-ragdoll.mjs +16 -24
- package/core/src/physics/powertrain.d.mts +260 -0
- package/core/src/physics/powertrain.mjs +2 -15
- package/core/src/physics/profile.d.mts +2 -0
- package/core/src/physics/profile.mjs +14 -0
- package/core/src/physics/pulley.d.mts +98 -0
- package/core/src/physics/pulley.mjs +2 -15
- package/core/src/physics/ragdoll.d.mts +289 -0
- package/core/src/physics/ragdoll.mjs +25 -26
- package/core/src/physics/rope.d.mts +246 -0
- package/core/src/physics/rope.mjs +303 -373
- package/core/src/physics/rounded-convex.d.mts +328 -0
- package/core/src/physics/rounded-convex.mjs +3 -18
- package/core/src/physics/sdf-geometry.d.mts +122 -0
- package/core/src/physics/sdf-geometry.mjs +49 -17
- package/core/src/physics/soft-collision.d.mts +651 -0
- package/core/src/physics/soft-collision.mjs +24 -28
- package/core/src/physics/surface-velocity.d.mts +198 -0
- package/core/src/physics/surface-velocity.mjs +918 -298
- package/core/src/physics/tracks.d.mts +411 -0
- package/core/src/physics/tracks.mjs +18 -23
- package/core/src/physics/vehicle.d.mts +3 -0
- package/core/src/physics/vehicle.mjs +154 -403
- package/core/src/physics/voxel-cooking.d.mts +226 -0
- package/core/src/physics/voxel-cooking.mjs +396 -356
- package/core/src/physics/voxel-swept-quad.mjs +110 -0
- package/core/src/physics/wasm-instance.mjs +184 -32
- package/core/src/physics/world.d.mts +208 -0
- package/core/src/physics/world.mjs +4908 -196
- package/core/src/physics2d/body-state.mjs +218 -15
- package/core/src/physics2d/collision.d.mts +52 -0
- package/core/src/physics2d/collision.mjs +236 -0
- package/core/src/physics2d/compound.mjs +4 -2
- package/core/src/physics2d/contour-state.mjs +773 -0
- package/core/src/physics2d/feature-api.d.mts +211 -0
- package/core/src/physics2d/feature-api.mjs +3 -0
- package/core/src/physics2d/joint-state.mjs +1 -1
- package/core/src/physics2d/owned-queries.mjs +3 -1
- package/core/src/physics2d/owned-transport.mjs +397 -116
- package/core/src/physics2d/owned-world.d.mts +9 -0
- package/core/src/physics2d/owned-world.mjs +331 -745
- package/core/src/physics2d/particle-fluid.d.mts +152 -0
- package/core/src/physics2d/particle-fluid.mjs +236 -0
- package/core/src/physics2d/physics2d-wasm-module.generated.mjs +31 -10
- package/core/src/physics2d/physics2d.wasm +0 -0
- package/core/src/physics2d/query-codec.mjs +61 -13
- package/core/src/physics2d/submerged-geometry.d.mts +51 -0
- package/core/src/physics2d/submerged-geometry.mjs +186 -0
- package/core/src/physics2d/wasm-instance.mjs +14 -181
- package/core/src/runtime.mjs +24 -0
- package/core/src/shared/bytes.d.mts +2 -0
- package/core/src/shared/bytes.mjs +33 -0
- package/core/src/shared/sha256.d.mts +3 -0
- package/core/src/shared/sha256.mjs +170 -55
- package/core/src/shared/wasm-artifact.d.mts +9 -0
- package/core/src/shared/wasm-artifact.mjs +185 -0
- package/core/units.d.ts +50 -0
- package/core/world-kernel.d.ts +0 -2
- package/core/world.d.ts +863 -5
- package/dist/api-deprecations.generated.d.ts +27 -3
- package/dist/api-deprecations.generated.js +27 -3
- package/dist/authority-room.d.ts +335 -12
- package/dist/authority-room.js +2222 -111
- package/dist/browser.d.ts +25 -25
- package/dist/browser.js +14 -14
- package/dist/cadence.d.ts +7 -0
- package/dist/cadence.js +19 -0
- package/dist/canonical.d.ts +14 -0
- package/dist/canonical.js +224 -12
- package/dist/checksum-policy.d.ts +10 -0
- package/dist/checksum-policy.js +14 -0
- package/dist/collections.d.ts +2 -0
- package/dist/collections.js +28 -1
- package/dist/collider-cooking-hull.d.ts +18 -0
- package/dist/{physics3d-hull.js → collider-cooking-hull.js} +1 -174
- package/dist/collider-cooking.d.ts +13 -14
- package/dist/collider-cooking.js +2 -37
- package/dist/collider-preparation.d.ts +31 -0
- package/dist/collider-preparation.js +507 -0
- package/dist/compat/v5.d.ts +121 -0
- package/dist/compat/v5.js +479 -0
- package/dist/creator.d.ts +10 -16
- package/dist/creator.js +5 -12
- package/dist/dev-authority-room.d.ts +14 -1
- package/dist/dev-authority-room.js +60 -55
- package/dist/engine-runtime.js +5 -8
- package/dist/extensions/hub/airlock.d.ts +153 -0
- package/dist/extensions/hub/airlock.js +500 -0
- package/dist/extensions/hub/contracts.d.ts +369 -0
- package/dist/extensions/hub/contracts.js +106 -0
- package/dist/extensions/hub/exfil.d.ts +54 -0
- package/dist/extensions/hub/exfil.js +110 -0
- package/dist/extensions/hub/handoff.d.ts +84 -0
- package/dist/extensions/hub/handoff.js +161 -0
- package/dist/extensions/hub/index.d.ts +12 -0
- package/dist/extensions/hub/index.js +12 -0
- package/dist/extensions/hub/inventory.d.ts +86 -0
- package/dist/extensions/hub/inventory.js +288 -0
- package/dist/extensions/hub/party.d.ts +43 -0
- package/dist/extensions/hub/party.js +58 -0
- package/dist/extensions/hub/plugin.d.ts +23 -0
- package/dist/extensions/hub/plugin.js +37 -0
- package/dist/extensions/hub/settlement.d.ts +42 -0
- package/dist/extensions/hub/settlement.js +121 -0
- package/dist/extractionFingerprint.d.ts +1 -0
- package/dist/extractionFingerprint.js +30 -0
- package/dist/game-byte-section.d.ts +36 -0
- package/dist/game-byte-section.js +350 -0
- package/dist/index.d.ts +43 -37
- package/dist/index.js +31 -18
- package/dist/input-authority.d.ts +33 -1
- package/dist/input-authority.js +291 -30
- package/dist/instant-replay.d.ts +27 -2
- package/dist/instant-replay.js +91 -16
- package/dist/lag-compensation3d.d.ts +44 -11
- package/dist/lag-compensation3d.js +468 -89
- package/dist/local-authority-wire.d.ts +24 -0
- package/dist/local-authority-wire.js +258 -4
- package/dist/local-prediction-presentation.d.ts +24 -0
- package/dist/local-prediction-presentation.js +150 -0
- package/dist/local-prediction.d.ts +50 -0
- package/dist/local-prediction.js +130 -0
- package/dist/match-log.d.ts +41 -5
- package/dist/match-log.js +95 -9
- package/dist/math.d.ts +23 -1
- package/dist/math.js +120 -0
- package/dist/modules/character-3d.d.ts +16 -1
- package/dist/modules/character-3d.js +42 -5
- package/dist/modules/combat.d.ts +7 -5
- package/dist/modules/combat.js +25 -17
- package/dist/modules/entity-registry.d.ts +1 -0
- package/dist/modules/extraction.d.ts +149 -0
- package/dist/modules/extraction.js +350 -0
- package/dist/modules/gameplay-effects.js +2 -2
- package/dist/modules/inventory-equipment.js +19 -7
- package/dist/modules/module-contract.js +2 -2
- package/dist/modules/module-event.js +2 -2
- package/dist/modules/physical-assembly.d.ts +154 -0
- package/dist/modules/physical-assembly.js +893 -0
- package/dist/modules/rts.js +94 -32
- package/dist/modules/spatial-interaction.js +2 -4
- package/dist/modules/stats-abilities.js +10 -8
- package/dist/modules/unit-control.js +2 -2
- package/dist/movement.d.ts +4 -0
- package/dist/movement.js +13 -4
- package/dist/movement3d-common.d.ts +57 -0
- package/dist/movement3d-common.js +218 -0
- package/dist/movement3d-revision1.d.ts +2 -0
- package/dist/movement3d-revision1.js +973 -0
- package/dist/movement3d-revision3.d.ts +2 -0
- package/dist/movement3d-revision3.js +844 -0
- package/dist/movement3d.d.ts +119 -16
- package/dist/movement3d.js +1560 -690
- package/dist/navmesh.d.ts +32 -0
- package/dist/navmesh.js +238 -0
- package/dist/networked-client.d.ts +160 -9
- package/dist/networked-client.js +2013 -246
- package/dist/node.d.ts +10 -4
- package/dist/node.js +7 -2
- package/dist/noise.d.ts +9 -0
- package/dist/noise.js +82 -0
- package/dist/ownership-audit.d.ts +25 -0
- package/dist/ownership-audit.js +103 -0
- package/dist/periodic-domain.d.ts +10 -0
- package/dist/periodic-domain.js +13 -0
- package/dist/physics/2d.d.ts +114 -0
- package/dist/physics/2d.js +243 -0
- package/dist/physics/3d/assembly-bridge.d.ts +19 -0
- package/dist/physics/3d/assembly-bridge.js +238 -0
- package/dist/physics/3d/profile.d.ts +2 -0
- package/dist/physics/3d/profile.js +2 -0
- package/dist/physics/3d.d.ts +2530 -0
- package/dist/physics/3d.js +12069 -0
- package/dist/physics/body-forces3d.d.ts +68 -0
- package/dist/physics/body-forces3d.js +395 -0
- package/dist/physics/cellular-field3d.d.ts +58 -0
- package/dist/physics/cellular-field3d.js +14 -0
- package/dist/physics/cellular-mesher3d.d.ts +1 -0
- package/dist/physics/cellular-mesher3d.js +1 -0
- package/dist/physics/cellular-teardown-snapshot-codec3d.d.ts +14 -0
- package/dist/physics/cellular-teardown-snapshot-codec3d.js +10 -0
- package/dist/physics/cellular-teardown-worker3d.d.ts +21 -0
- package/dist/physics/cellular-teardown-worker3d.js +245 -0
- package/dist/physics/cellular-teardown3d.d.ts +214 -0
- package/dist/physics/cellular-teardown3d.js +699 -0
- package/dist/physics/contact-materials3d.d.ts +435 -0
- package/dist/physics/contact-materials3d.js +776 -0
- package/dist/physics/debug-overlay3d.d.ts +117 -0
- package/dist/physics/debug-overlay3d.js +563 -0
- package/dist/physics/edit-result-graph.d.ts +36 -0
- package/dist/physics/edit-result-graph.js +141 -0
- package/dist/physics/game-codec3d.d.ts +41 -0
- package/dist/physics/game-codec3d.js +544 -0
- package/dist/physics/hot-path-stats3d.d.ts +9 -0
- package/dist/physics/hot-path-stats3d.js +3 -0
- package/dist/physics/installed-checkpoint3d.d.ts +33 -0
- package/dist/physics/installed-checkpoint3d.js +262 -0
- package/dist/physics/installed-runtime3d.d.ts +76 -0
- package/dist/physics/installed-runtime3d.js +669 -0
- package/dist/physics/installed-state-commitment3d.d.ts +8 -0
- package/dist/physics/installed-state-commitment3d.js +78 -0
- package/dist/physics/native-error-code.d.ts +1 -0
- package/dist/physics/native-error-code.js +29 -0
- package/dist/physics/portal-far-rows3d.d.ts +31 -0
- package/dist/physics/portal-far-rows3d.js +134 -0
- package/dist/physics/portal-render3d.d.ts +328 -0
- package/dist/physics/portal-render3d.js +751 -0
- package/dist/physics/shape-mass3d.d.ts +134 -0
- package/dist/physics/shape-mass3d.js +526 -0
- package/dist/physics/units.d.ts +103 -0
- package/dist/physics/units.js +142 -0
- package/dist/physics/vehicle-state2d.d.ts +104 -0
- package/dist/physics/vehicle-state2d.js +758 -0
- package/dist/physics/vehicle-state3d.d.ts +103 -0
- package/dist/physics/vehicle-state3d.js +1803 -0
- package/dist/physics/voxel-body-split.d.ts +46 -0
- package/dist/physics/voxel-body-split.js +327 -0
- package/dist/physics/voxel-body-state.d.ts +106 -0
- package/dist/physics/voxel-body-state.js +614 -0
- package/dist/plugins/index.d.ts +27 -0
- package/dist/plugins/index.js +114 -0
- package/dist/plugins/types.d.ts +34 -0
- package/dist/plugins/types.js +5 -0
- package/dist/presentation-ik.d.ts +44 -0
- package/dist/presentation-ik.js +154 -0
- package/dist/presentation.d.ts +51 -0
- package/dist/presentation.js +98 -0
- package/dist/r3f-render-adapter.d.ts +167 -1
- package/dist/r3f-render-adapter.js +535 -2
- package/dist/replay.d.ts +13 -0
- package/dist/replay.js +98 -70
- package/dist/rooms-config-keys.d.ts +1 -1
- package/dist/rooms-config-keys.js +4 -0
- package/dist/run-room-transport.d.ts +26 -1
- package/dist/run-room-transport.js +151 -16
- package/dist/runner-harness.js +3 -2
- package/dist/runner.d.ts +85 -13
- package/dist/runner.js +640 -107
- package/dist/runtime-cleanup.d.ts +54 -0
- package/dist/runtime-cleanup.js +266 -0
- package/dist/runtime-lease.d.ts +11 -1
- package/dist/runtime-lease.js +23 -10
- package/dist/runtime-room-metadata.d.ts +5 -8
- package/dist/runtime-room-metadata.js +15 -16
- package/dist/runtime-session.d.ts +88 -4
- package/dist/runtime-session.js +619 -66
- package/dist/schema-codegen.js +3 -0
- package/dist/schema-dsl-binary.d.ts +10 -4
- package/dist/schema-dsl-binary.js +375 -76
- package/dist/scratch-pool.d.ts +32 -0
- package/dist/scratch-pool.js +60 -0
- package/dist/sdk-session.d.ts +8 -1
- package/dist/sdk-session.js +15 -1
- package/dist/seat-control.d.ts +159 -0
- package/dist/seat-control.js +631 -0
- package/dist/secret-authority.d.ts +19 -4
- package/dist/secret-authority.js +290 -36
- package/dist/secret-client.d.ts +2 -1
- package/dist/secret-client.js +73 -26
- package/dist/secret-config.d.ts +1 -1
- package/dist/secret-config.js +40 -93
- package/dist/secret-crypto.js +70 -36
- package/dist/secret-protocol.d.ts +3 -0
- package/dist/secret-protocol.js +14 -7
- package/dist/session-promotion.d.ts +19 -1
- package/dist/session-promotion.js +37 -6
- package/dist/session-snapshot.d.ts +76 -28
- package/dist/session-snapshot.js +617 -80
- package/dist/session-wire.d.ts +33 -1
- package/dist/session-wire.js +149 -38
- package/dist/shot-rewind.d.ts +2 -0
- package/dist/shot-rewind.js +17 -0
- package/dist/snapshot-baseline-delta.d.ts +65 -0
- package/dist/snapshot-baseline-delta.js +605 -0
- package/dist/snapshot-compression.d.ts +48 -0
- package/dist/snapshot-compression.js +433 -0
- package/dist/snapshot-config.d.ts +116 -0
- package/dist/snapshot-config.js +215 -0
- package/dist/snapshot-worker.d.ts +47 -0
- package/dist/snapshot-worker.js +804 -0
- package/dist/sorted-free-id.d.ts +1 -0
- package/dist/sorted-free-id.js +38 -0
- package/dist/sparse-set.d.ts +1 -0
- package/dist/sparse-set.js +22 -0
- package/dist/spatial/spatial-grid-3d.d.ts +45 -0
- package/dist/spatial/spatial-grid-3d.js +217 -0
- package/dist/state-digest.d.ts +8 -0
- package/dist/state-digest.js +34 -0
- package/dist/synctest.d.ts +9 -0
- package/dist/synctest.js +106 -17
- package/dist/testing-network.d.ts +7 -0
- package/dist/testing-network.js +126 -19
- package/dist/testing.d.ts +27 -6
- package/dist/testing.js +297 -56
- package/dist/tools/index.d.ts +3 -2
- package/dist/tools/index.js +3 -2
- package/dist/tools/module-certification.d.ts +6 -0
- package/dist/tools/module-certification.js +27 -2
- package/dist/tools/static-checker.js +9 -2
- package/dist/tools/vite-plugin.d.ts +12 -0
- package/dist/tools/vite-plugin.js +17 -1
- package/dist/types.d.ts +14 -0
- package/dist/ws-frame.d.ts +7 -1
- package/dist/ws-frame.js +113 -10
- package/extensions/hub/package.json +1 -0
- package/hub/package.json +1 -0
- package/package.json +146 -53
- package/plugins/package.json +1 -0
- package/third_party/box3d/LICENSE +21 -0
- package/third_party/box3d/PROVENANCE.md +219 -0
- package/third_party/box3d/UPSTREAM.json +20 -0
- package/third_party/box3d/port/c-sources.txt +54 -0
- package/third_party/box3d/port/syncplay-sources.txt +7 -0
- package/third_party/box3d/port/test-sources.txt +36 -0
- package/third_party/box3d/scripts/box3d-profile.mjs +185 -0
- package/third_party/box3d/tree/include/box3d/base.h +206 -0
- package/third_party/box3d/tree/include/box3d/box3d.h +1968 -0
- package/third_party/box3d/tree/include/box3d/collision.h +692 -0
- package/third_party/box3d/tree/include/box3d/config.h +33 -0
- package/third_party/box3d/tree/include/box3d/constants.h +146 -0
- package/third_party/box3d/tree/include/box3d/id.h +179 -0
- package/third_party/box3d/tree/include/box3d/math_functions.h +1220 -0
- package/third_party/box3d/tree/include/box3d/types.h +3251 -0
- package/third_party/box3d/tree/src/CMakeLists.txt +324 -0
- package/third_party/box3d/tree/src/aabb.c +176 -0
- package/third_party/box3d/tree/src/aabb.h +80 -0
- package/third_party/box3d/tree/src/algorithm.h +19 -0
- package/third_party/box3d/tree/src/arena_allocator.c +178 -0
- package/third_party/box3d/tree/src/arena_allocator.h +114 -0
- package/third_party/box3d/tree/src/bitset.c +66 -0
- package/third_party/box3d/tree/src/bitset.h +67 -0
- package/third_party/box3d/tree/src/block_allocator.c +95 -0
- package/third_party/box3d/tree/src/block_allocator.h +36 -0
- package/third_party/box3d/tree/src/body.c +2729 -0
- package/third_party/box3d/tree/src/body.h +303 -0
- package/third_party/box3d/tree/src/box3d.natvis +147 -0
- package/third_party/box3d/tree/src/box3d.pc.in +11 -0
- package/third_party/box3d/tree/src/broad_phase.c +823 -0
- package/third_party/box3d/tree/src/broad_phase.h +66 -0
- package/third_party/box3d/tree/src/capsule.c +385 -0
- package/third_party/box3d/tree/src/compound.c +1208 -0
- package/third_party/box3d/tree/src/compound.h +25 -0
- package/third_party/box3d/tree/src/constraint_graph.c +328 -0
- package/third_party/box3d/tree/src/constraint_graph.h +79 -0
- package/third_party/box3d/tree/src/contact.c +912 -0
- package/third_party/box3d/tree/src/contact.h +194 -0
- package/third_party/box3d/tree/src/contact_solver.c +1237 -0
- package/third_party/box3d/tree/src/contact_solver.h +122 -0
- package/third_party/box3d/tree/src/contact_solver_wide.inl +1670 -0
- package/third_party/box3d/tree/src/container.h +185 -0
- package/third_party/box3d/tree/src/convex_manifold.c +1602 -0
- package/third_party/box3d/tree/src/convex_manifold_wide.inl +825 -0
- package/third_party/box3d/tree/src/core.c +303 -0
- package/third_party/box3d/tree/src/core.h +189 -0
- package/third_party/box3d/tree/src/ctz.h +134 -0
- package/third_party/box3d/tree/src/distance.c +1954 -0
- package/third_party/box3d/tree/src/distance_joint.c +585 -0
- package/third_party/box3d/tree/src/dynamic_tree.c +2525 -0
- package/third_party/box3d/tree/src/dynamic_tree.h +113 -0
- package/third_party/box3d/tree/src/height_field.c +1629 -0
- package/third_party/box3d/tree/src/hull.c +3226 -0
- package/third_party/box3d/tree/src/hull.h +30 -0
- package/third_party/box3d/tree/src/id_pool.c +73 -0
- package/third_party/box3d/tree/src/id_pool.h +34 -0
- package/third_party/box3d/tree/src/island.c +735 -0
- package/third_party/box3d/tree/src/island.h +101 -0
- package/third_party/box3d/tree/src/joint.c +2324 -0
- package/third_party/box3d/tree/src/joint.h +661 -0
- package/third_party/box3d/tree/src/manifold.c +196 -0
- package/third_party/box3d/tree/src/manifold.h +92 -0
- package/third_party/box3d/tree/src/math_functions.c +616 -0
- package/third_party/box3d/tree/src/math_internal.h +471 -0
- package/third_party/box3d/tree/src/mesh.c +2492 -0
- package/third_party/box3d/tree/src/mesh_contact.c +1338 -0
- package/third_party/box3d/tree/src/motor_joint.c +420 -0
- package/third_party/box3d/tree/src/mover.c +70 -0
- package/third_party/box3d/tree/src/mover_joint.c +288 -0
- package/third_party/box3d/tree/src/name_cache.c +155 -0
- package/third_party/box3d/tree/src/name_cache.h +42 -0
- package/third_party/box3d/tree/src/parallel_for.c +138 -0
- package/third_party/box3d/tree/src/parallel_for.h +23 -0
- package/third_party/box3d/tree/src/parallel_joint.c +254 -0
- package/third_party/box3d/tree/src/physics_world.c +4432 -0
- package/third_party/box3d/tree/src/physics_world.h +369 -0
- package/third_party/box3d/tree/src/platform.h +165 -0
- package/third_party/box3d/tree/src/pogo_joint.c +451 -0
- package/third_party/box3d/tree/src/prismatic_joint.c +720 -0
- package/third_party/box3d/tree/src/qsort.h +186 -0
- package/third_party/box3d/tree/src/rapidhash.h +568 -0
- package/third_party/box3d/tree/src/recording.c +1250 -0
- package/third_party/box3d/tree/src/recording.h +390 -0
- package/third_party/box3d/tree/src/recording_ops.inl +254 -0
- package/third_party/box3d/tree/src/replay.c +3791 -0
- package/third_party/box3d/tree/src/replay.h +286 -0
- package/third_party/box3d/tree/src/revolute_joint.c +672 -0
- package/third_party/box3d/tree/src/scheduler.c +198 -0
- package/third_party/box3d/tree/src/scheduler.h +15 -0
- package/third_party/box3d/tree/src/sensor.c +451 -0
- package/third_party/box3d/tree/src/sensor.h +41 -0
- package/third_party/box3d/tree/src/shape.c +2448 -0
- package/third_party/box3d/tree/src/shape.h +206 -0
- package/third_party/box3d/tree/src/simd.c +310 -0
- package/third_party/box3d/tree/src/simd.h +401 -0
- package/third_party/box3d/tree/src/simd_avx2.h +208 -0
- package/third_party/box3d/tree/src/simd_neon.h +265 -0
- package/third_party/box3d/tree/src/simd_scalar.h +286 -0
- package/third_party/box3d/tree/src/simd_sse2.h +411 -0
- package/third_party/box3d/tree/src/simd_wide.h +67 -0
- package/third_party/box3d/tree/src/six_dof_joint.c +1257 -0
- package/third_party/box3d/tree/src/solver.c +2380 -0
- package/third_party/box3d/tree/src/solver.h +314 -0
- package/third_party/box3d/tree/src/solver_set.c +682 -0
- package/third_party/box3d/tree/src/solver_set.h +67 -0
- package/third_party/box3d/tree/src/sphere.c +247 -0
- package/third_party/box3d/tree/src/spherical_joint.c +738 -0
- package/third_party/box3d/tree/src/syncplay_contact.c +186 -0
- package/third_party/box3d/tree/src/syncplay_contact.h +97 -0
- package/third_party/box3d/tree/src/syncplay_digest.c +24 -0
- package/third_party/box3d/tree/src/syncplay_digest.h +31 -0
- package/third_party/box3d/tree/src/syncplay_impact.c +67 -0
- package/third_party/box3d/tree/src/syncplay_impact.h +71 -0
- package/third_party/box3d/tree/src/syncplay_six_dof.h +103 -0
- package/third_party/box3d/tree/src/syncplay_snapshot.c +949 -0
- package/third_party/box3d/tree/src/syncplay_snapshot.h +266 -0
- package/third_party/box3d/tree/src/table.c +238 -0
- package/third_party/box3d/tree/src/table.h +74 -0
- package/third_party/box3d/tree/src/timer.c +834 -0
- package/third_party/box3d/tree/src/triangle_manifold.c +1334 -0
- package/third_party/box3d/tree/src/types.c +159 -0
- package/third_party/box3d/tree/src/verstable.h +2069 -0
- package/third_party/box3d/tree/src/weld_joint.c +304 -0
- package/third_party/box3d/tree/src/wheel_joint.c +1124 -0
- package/third_party/box3d/tree/src/wide4.c +6 -0
- package/third_party/box3d/tree/src/wide8.c +23 -0
- package/third_party/box3d/tree/src/world_snapshot.c +1840 -0
- package/third_party/box3d/tree/src/world_snapshot.h +21 -0
- package/third_party/lzma/README.md +29 -0
- package/third_party/lzma/src/7zTypes.h +600 -0
- package/third_party/lzma/src/Alloc.c +774 -0
- package/third_party/lzma/src/Alloc.h +76 -0
- package/third_party/lzma/src/Compiler.h +287 -0
- package/third_party/lzma/src/CpuArch.c +970 -0
- package/third_party/lzma/src/CpuArch.h +719 -0
- package/third_party/lzma/src/LzFind.c +1746 -0
- package/third_party/lzma/src/LzFind.h +160 -0
- package/third_party/lzma/src/LzHash.h +34 -0
- package/third_party/lzma/src/LzmaDec.c +1367 -0
- package/third_party/lzma/src/LzmaDec.h +237 -0
- package/third_party/lzma/src/LzmaEnc.c +3154 -0
- package/third_party/lzma/src/LzmaEnc.h +85 -0
- package/third_party/lzma/src/LzmaLib.c +42 -0
- package/third_party/lzma/src/LzmaLib.h +138 -0
- package/third_party/lzma/src/Precomp.h +127 -0
- package/core/box3d-probe.d.ts +0 -22
- package/core/build-mobile-native.d.ts +0 -8
- package/core/native/mobile/syncplay_native_probe.cpp +0 -114
- package/core/native/mobile/syncplay_native_probe_abi.h +0 -46
- package/core/native/physics/buoyancy_probe.cpp +0 -240
- package/core/native/physics/extended_world.cpp +0 -2715
- package/core/native/physics/extended_world.hpp +0 -429
- package/core/native/physics/extended_world_abi.cpp +0 -900
- package/core/native/physics/extended_world_abi.hpp +0 -215
- package/core/native/physics/joint_warm_probe.cpp +0 -1090
- package/core/native/physics/soft_body.cpp +0 -1449
- package/core/native/physics/soft_body.hpp +0 -328
- package/core/native/physics2d/buoyancy_probe.cpp +0 -382
- package/core/native/physics2d/contact_feature_probe.cpp +0 -354
- package/core/native/physics2d/fluid_probe.cpp +0 -321
- package/core/native/physics2d/gear_probe.cpp +0 -371
- package/core/native/physics2d/joints_probe.cpp +0 -927
- package/core/native/physics2d/physics2d_probe.cpp +0 -659
- package/core/native/physics2d/platformer.hpp +0 -3
- package/core/native/physics2d/pulley_probe.cpp +0 -680
- package/core/native/physics2d/query_probe.cpp +0 -874
- package/core/native/physics2d/world_probe.cpp +0 -1017
- package/core/physics.d.ts +0 -1581
- package/core/physics2d.d.ts +0 -632
- package/core/scripts/build-mobile-native.mjs +0 -127
- package/core/scripts/run-box3d-benchmark.mjs +0 -350
- package/core/src/physics/character.mjs +0 -461
- package/core/src/physics/extended-world.mjs +0 -911
- package/core/src/physics/index.mjs +0 -3931
- package/core/src/physics/planar-deformable.mjs +0 -1275
- package/core/src/physics/platformer-2d.mjs +0 -1137
- package/core/src/physics/sixdof.mjs +0 -386
- package/core/src/physics/soft-body.mjs +0 -1285
- package/core/src/physics2d/ccd.mjs +0 -632
- package/core/src/physics2d/index.mjs +0 -1463
- package/core/src/physics2d/queries.mjs +0 -124
- package/dist/api-v1.generated.d.ts +0 -257
- package/dist/api-v1.generated.js +0 -730
- package/dist/cosmetic-physics3d.d.ts +0 -41
- package/dist/cosmetic-physics3d.js +0 -196
- package/dist/debug-wireframe.d.ts +0 -22
- package/dist/debug-wireframe.js +0 -226
- package/dist/engine-core-proof.d.ts +0 -26
- package/dist/engine-core-proof.js +0 -66
- package/dist/physics-cert.d.ts +0 -40
- package/dist/physics-cert.js +0 -535
- package/dist/physics2d.d.ts +0 -142
- package/dist/physics2d.js +0 -747
- package/dist/physics3d-destruction-cert.d.ts +0 -35
- package/dist/physics3d-destruction-cert.js +0 -283
- package/dist/physics3d-heightfield.d.ts +0 -27
- package/dist/physics3d-heightfield.js +0 -80
- package/dist/physics3d-hull.d.ts +0 -67
- package/dist/physics3d-joints.d.ts +0 -115
- package/dist/physics3d-joints.js +0 -1005
- package/dist/physics3d-mass.d.ts +0 -11
- package/dist/physics3d-mass.js +0 -126
- package/dist/physics3d-recipes.d.ts +0 -29
- package/dist/physics3d-recipes.js +0 -193
- package/dist/physics3d-solver.d.ts +0 -326
- package/dist/physics3d-solver.js +0 -2512
- package/dist/physics3d-stacking.d.ts +0 -26
- package/dist/physics3d-stacking.js +0 -147
- package/dist/physics3d-toi.d.ts +0 -79
- package/dist/physics3d-toi.js +0 -267
- package/dist/physics3d-vehicle.d.ts +0 -84
- package/dist/physics3d-vehicle.js +0 -488
- package/dist/physics3d-voxel.d.ts +0 -131
- package/dist/physics3d-voxel.js +0 -819
- package/dist/physics3d.d.ts +0 -565
- package/dist/physics3d.js +0 -4133
- package/dist/sample-scenes.d.ts +0 -86
- package/dist/sample-scenes.js +0 -732
package/README.md
CHANGED
|
@@ -1,11 +1,72 @@
|
|
|
1
1
|
# RUN Syncplay
|
|
2
2
|
|
|
3
|
-
Syncplay is the orchestration layer over a signed deterministic runtime.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
Syncplay is the orchestration layer over a signed deterministic runtime. Public
|
|
4
|
+
runtime utilities use the `/core` subpaths. Public physics uses `/physics/2d`
|
|
5
|
+
and `/physics/3d`. Both physics APIs use the canonical C++ core compiled to
|
|
6
|
+
WASM. Syncplay owns inputs, prediction, confirmation, rollback policy, replay
|
|
7
|
+
logs, late join, secrets, and transport.
|
|
8
|
+
|
|
9
|
+
## Periodic math and presentation
|
|
10
|
+
|
|
11
|
+
The root entry provides periodic fixed math, value noise, fBm, render helpers,
|
|
12
|
+
and an optional periodic xz point grid. `createPhysicsWorld3D({ periodicDomain })`
|
|
13
|
+
adds periodic raycasts, overlaps, and shape casts with an `image` on each hit.
|
|
14
|
+
The domain is flat. These utilities do not add globe curvature or contact
|
|
15
|
+
across a seam. Every peer of a periodic world needs the same domain and native
|
|
16
|
+
world ABI 26. Read the [periodic-space guide](docs/periodic-space.md) for units,
|
|
17
|
+
limits, and examples.
|
|
18
|
+
|
|
19
|
+
## Physics profiling
|
|
20
|
+
|
|
21
|
+
Normal physics initialization loads the production WASM artifact. Game builds
|
|
22
|
+
that use the normal entries do not include the named profiling artifact.
|
|
23
|
+
|
|
24
|
+
Profiling is an explicit build option. Register its loader before initialization:
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
import { initPhysics3D } from '@series-inc/rundot-syncplay/physics/3d';
|
|
28
|
+
import { registerPhysicsProfileArtifact } from '@series-inc/rundot-syncplay/physics/3d/profile';
|
|
29
|
+
|
|
30
|
+
registerPhysicsProfileArtifact();
|
|
31
|
+
await initPhysics3D({ artifact: 'profile' });
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Migration: existing calls with `artifact: 'profile'` need the new import and
|
|
35
|
+
registration call. Registration is idempotent. Importing the entry alone does
|
|
36
|
+
not register the loader. Registration does not select or initialize an artifact.
|
|
37
|
+
The same registration works before low-level core initialization. It cannot
|
|
38
|
+
switch an initialized production instance to profiling.
|
|
39
|
+
|
|
40
|
+
The profiling entry keeps the named WASM file in the game build. Keep it out of
|
|
41
|
+
release imports to exclude that file. The npm package still includes both
|
|
42
|
+
artifacts. Profiling uses the same simulation source and digest rules.
|
|
43
|
+
|
|
44
|
+
## Physics WASM files
|
|
45
|
+
|
|
46
|
+
Each artifact ships as a binary file beside its generated metadata module:
|
|
47
|
+
`core/src/physics/physics.wasm`, `core/src/physics/physics-profile.wasm`, and
|
|
48
|
+
`core/src/physics2d/physics2d.wasm`. The loader resolves the file with
|
|
49
|
+
`new URL('./<name>.wasm', import.meta.url)`, reads it (Node reads the file,
|
|
50
|
+
browsers and workers fetch it), and verifies it before use: the WASM magic
|
|
51
|
+
number, SHA-256 equal to `wasmSha256` in the metadata, and an empty import list.
|
|
52
|
+
Any mismatch stops initialization with a `KINETIX_WASM_*` error. There is no
|
|
53
|
+
base64 copy in JavaScript and no fallback.
|
|
54
|
+
|
|
55
|
+
Vite builds copy the file. Vite dev needs
|
|
56
|
+
`optimizeDeps.exclude: ['@series-inc/rundot-syncplay']`, which
|
|
57
|
+
`rundotSyncplayPlugin()` adds. Other bundlers must copy the referenced `.wasm`
|
|
58
|
+
files beside the output chunks. In a browser, synchronous physics calls need an
|
|
59
|
+
earlier `await initPhysics3D()`; Node can load synchronously.
|
|
60
|
+
|
|
61
|
+
## Dynamic seat control & player-keyed secrets
|
|
62
|
+
|
|
63
|
+
Syncplay supports deterministic dynamic seating across any valid simulation capacity X via `deterministic.seatPolicy`:
|
|
64
|
+
- Transitions S1 through S6 govern empty, bot, and human controller states.
|
|
65
|
+
- Policy fields include `recycleVacatedSeats`, `allowHumanClaimBot` (enabling human takeover of bot seats for S3), `onHumanLeave` (`'empty' | 'bot'`), and `initialBotSlots`. Retained owners can always reclaim their own seats without `allowHumanClaimBot`.
|
|
66
|
+
- Controller leases are authority-issued and room-scoped (`claimId`, `botLeaseId`, `controlEpoch`).
|
|
67
|
+
- Private secret holdings (cards, items, secret roles, and choices) are strictly bound to authenticated `playerId` and `claimId`.
|
|
68
|
+
- Unconsumed holdings are permanently revoked when a human releases a recyclable seat (`recycleVacatedSeats: true`).
|
|
69
|
+
- A successor player occupying a vacated seat never inherits prior items, secret values, or roles.
|
|
9
70
|
|
|
10
71
|
## Installation
|
|
11
72
|
|
|
@@ -134,7 +195,8 @@ The published JavaScript graph has a committed exhaustive side-effect audit.
|
|
|
134
195
|
effects and are preserved through the package's precise `sideEffects` allowlist.
|
|
135
196
|
|
|
136
197
|
> **Upgrading an existing game?** See
|
|
137
|
-
> [
|
|
198
|
+
> [the RC1 migration guide](https://github.com/series-ai/venus/blob/develop/packages/sdk-docs/rundot-developer-platform/api/SYNCPLAY-RC1-MIGRATION.md)
|
|
199
|
+
> and [the session primitive guide](https://github.com/series-ai/venus/blob/develop/packages/syncplay/MIGRATING-SESSION-PRIMITIVES.md). Two
|
|
138
200
|
> changes are not additive: the runner now rejects an unsafe input codec at
|
|
139
201
|
> construction, and the effects adapter now dedupes on your event `dedupeKey`.
|
|
140
202
|
|
|
@@ -158,8 +220,9 @@ dependency float cannot keep the same engine hash.
|
|
|
158
220
|
| Subpath | Role |
|
|
159
221
|
|---------|------|
|
|
160
222
|
| `/core/runtime` | `createInstalledRuntimeAdapter`, identity helpers |
|
|
161
|
-
| `/
|
|
162
|
-
|
|
|
223
|
+
| `/physics/2d` | Canonical TypeScript 2D API over the C++/WASM core |
|
|
224
|
+
| `/physics/3d` | Canonical TypeScript 3D API over the C++/WASM core |
|
|
225
|
+
| `/` or `/browser` | Runner, session, and 3D character movement |
|
|
163
226
|
| `/testing` | Simulated multi-peer / synctest |
|
|
164
227
|
| `/node` | Authority room helpers (not for browser bundles) |
|
|
165
228
|
|
|
@@ -221,6 +284,13 @@ metadata never silently passes negotiation.
|
|
|
221
284
|
|
|
222
285
|
## Presentation frames
|
|
223
286
|
|
|
287
|
+
The optional `@series-inc/rundot-syncplay/presentation` entry provides reusable
|
|
288
|
+
2D pose and 3D motion buffers, plus helpers for Three.js instanced matrices and PixiJS 2D
|
|
289
|
+
transforms. It imports neither renderer. See
|
|
290
|
+
[`SYNCPLAY-PRESENTATION.md`](../sdk-docs/rundot-developer-platform/api/SYNCPLAY-PRESENTATION.md)
|
|
291
|
+
for buffer ownership, slot mapping, and examples. This entry is staged
|
|
292
|
+
for 6.0.0-rc.91. Use it after that version is published.
|
|
293
|
+
|
|
224
294
|
`session.getState()` returns a detached deep copy of the current frame, which
|
|
225
295
|
costs O(state) per read and is unaffordable for a large mutable world (a
|
|
226
296
|
destructible voxel city, a big streaming map).
|
|
@@ -415,7 +485,18 @@ battery of hostile payloads, failing with `SYNCPLAY_INPUT_CODEC_UNSAFE`.
|
|
|
415
485
|
|
|
416
486
|
**Capacity and late-join budgets.** Snapshot transfer defaults are **256 KiB**
|
|
417
487
|
chunks and a **4 MiB** total ceiling; the immutable level payload is fetched and
|
|
418
|
-
verified separately and never rides a snapshot.
|
|
488
|
+
verified separately and never rides a snapshot.
|
|
489
|
+
|
|
490
|
+
**Snapshots for late join.** A joiner gets the newest stored snapshot and
|
|
491
|
+
replays the tail after it, so it can replay up to one background interval of
|
|
492
|
+
ticks. The background snapshot (`snapshotCadenceTicks`, 60 s of ticks, or
|
|
493
|
+
`'off'`) keeps the recovery record, and a retention trigger asks for a snapshot
|
|
494
|
+
when the replay tail fills half of the history ring. A fresh snapshot on join is
|
|
495
|
+
planned for a later release. A hosted room sets these with the
|
|
496
|
+
`deterministic.snapshots` block, which `parseSyncplaySnapshotConfig()` (from
|
|
497
|
+
`/node`) validates; see SYNCPLAY.md, "Snapshot configuration". The `config.*`
|
|
498
|
+
snapshot tick keys were removed in 6.0.0-rc.99 (see MIGRATING-RC98-TO-RC99.md).
|
|
499
|
+
`maxPredictionTicks` is a
|
|
419
500
|
rollback/latency budget, not a player-count limit. 128 slots is the tested
|
|
420
501
|
protocol/load ceiling, not a 60 Hz performance guarantee for an arbitrary game.
|
|
421
502
|
|
|
@@ -447,57 +528,195 @@ and `assertPresentationParity` cover the runner seam — a real runner driven on
|
|
|
447
528
|
a fully controlled clock against the simulated match. Failures name the phase,
|
|
448
529
|
frame, and disagreeing checksums.
|
|
449
530
|
|
|
450
|
-
## Physics
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
the
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
531
|
+
## Physics API v1
|
|
532
|
+
|
|
533
|
+
Syncplay has one public TypeScript API for each physics dimension. Import
|
|
534
|
+
2D physics from `@series-inc/rundot-syncplay/physics/2d`. Import 3D physics from
|
|
535
|
+
`@series-inc/rundot-syncplay/physics/3d`. Do not import a raw physics adapter
|
|
536
|
+
from `/core`.
|
|
537
|
+
|
|
538
|
+
Call `initPhysics2D()` or `initPhysics3D()` before world creation. Create an
|
|
539
|
+
owned world with `createPhysicsWorld2D()` or `createPhysicsWorld3D()`. Each
|
|
540
|
+
world provides fixed stepping, atomic edits, retained queries, opaque native
|
|
541
|
+
checkpoints, portable checkpoint bytes, a state digest, and explicit disposal.
|
|
542
|
+
The 2D engine supports circle, box, capsule, polygon, segment, chain, piecewise
|
|
543
|
+
contour loops, and circular quadrant arcs with the free-side collision rule and
|
|
544
|
+
strict deterministic query tie-ordering.
|
|
545
|
+
|
|
546
|
+
Store logical body IDs in checkpointed game state. A hit has `bodyId`. A
|
|
547
|
+
contact has `bodyA` and `bodyB`. Keep an application `Map` from these `bigint`
|
|
548
|
+
IDs to entities. Each contact then uses `entities.get(contact.bodyA)` and
|
|
549
|
+
`entities.get(contact.bodyB)`. It requires no body-name scan.
|
|
550
|
+
|
|
551
|
+
Resolve a fresh handle with `world.resolveBody(id)` after a restore. Old
|
|
552
|
+
handles are stale. Transfer IDs as decimal strings if the game codec does not
|
|
553
|
+
support `bigint`. Convert them with `BigInt(text)`, never `Number(text)`.
|
|
554
|
+
Rebuild the lookup from the restored game state before processing contacts.
|
|
555
|
+
Physics checkpoints do not contain the application's entity table. Transfer
|
|
556
|
+
and restore both parts of the same frame.
|
|
557
|
+
|
|
558
|
+
### Grab servo revision 2
|
|
559
|
+
|
|
560
|
+
Set `behaviorRevision: 2` to use gravity compensation, target velocity,
|
|
561
|
+
angular damping, and the corrected local anchor. Revision 2 rotates the local
|
|
562
|
+
anchor with the body orientation. Existing calls use revision 1.
|
|
563
|
+
|
|
564
|
+
Use `createGrabServoState3D()` and `stepGrabServo3D()` for explicit game state.
|
|
565
|
+
Store the returned state with the physics checkpoint. The object wrapper
|
|
566
|
+
provides `capture()` and `restore()` for the same state. Restore both parts of
|
|
567
|
+
the same frame. The servo resolves the body ID after a physics restore.
|
|
568
|
+
|
|
569
|
+
Force and acceleration limits apply to the total force in revision 2.
|
|
570
|
+
This includes gravity compensation. Torque limits apply to total torque.
|
|
571
|
+
One scale applies to all three components. A limit can reduce compensation,
|
|
572
|
+
so the body can fall. The default force limit is 1000 N. A 150 kg body under
|
|
573
|
+
9.81 m/s² gravity requires more than this limit to hold its position.
|
|
574
|
+
Choose limits for the body's mass and gravity. A binding limit cannot promise
|
|
575
|
+
position holding. Revision 1 keeps its earlier acceleration-limit rule.
|
|
576
|
+
|
|
577
|
+
Include the helper revision in canonical session configuration and the game
|
|
578
|
+
deterministic version. Store targets, tuning, force limits, release state,
|
|
579
|
+
and body IDs in checkpointed game state.
|
|
580
|
+
|
|
581
|
+
The TypeScript facade does not contain a second solver. Both dimensions run in
|
|
582
|
+
the canonical C++ core compiled to WASM. The internal solver algorithm, state
|
|
583
|
+
layout, WASM boundary, schedule, and checkpoint representation can change when
|
|
584
|
+
a complete benchmark proves a faster design. Each replacement must keep the
|
|
585
|
+
public contract, deterministic results, rollback controls, and bounded memory.
|
|
586
|
+
|
|
587
|
+
Version 6.0.0-rc.82 (the same physics as 6.0.0-rc.81) runs 3D physics on the soft-step engine, with physics ABI 26
|
|
588
|
+
and digest algorithm revision 4. A world with a mesh above 512 triangles or a
|
|
589
|
+
heightfield above 2,048 triangles still runs on the public solver.
|
|
590
|
+
`world.rigidRouteState?.()` tells which route the next step uses.
|
|
591
|
+
Do not restore a checkpoint or load a replay from rc.80 or older. Those builds
|
|
592
|
+
use physics ABI 25 or earlier, and the world profile check rejects them. Every
|
|
593
|
+
peer in a match must use rc.81. Change the game deterministic version,
|
|
594
|
+
record golden digests again, and start new rollback, replay, and late-join history.
|
|
595
|
+
Read [MIGRATING-RC80-TO-RC81.md](MIGRATING-RC80-TO-RC81.md) for the changes to
|
|
596
|
+
contact events, sleep, round shapes, and performance.
|
|
597
|
+
|
|
598
|
+
Read the [2D guide](https://github.com/series-ai/venus/blob/develop/packages/sdk-docs/rundot-developer-platform/api/SYNCPLAY-PHYSICS-2D.md),
|
|
599
|
+
the [3D guide](https://github.com/series-ai/venus/blob/develop/packages/sdk-docs/rundot-developer-platform/api/SYNCPLAY-PHYSICS.md), and
|
|
600
|
+
the [RC1 migration helper](https://github.com/series-ai/venus/blob/develop/packages/sdk-docs/rundot-developer-platform/api/SYNCPLAY-RC1-MIGRATION.md).
|
|
601
|
+
Physical-phone performance remains a release gate. Do not infer phone results
|
|
602
|
+
from desktop measurements.
|
|
603
|
+
|
|
604
|
+
Restore the physics world before you restore a grab servo state. Revision 2 accepts
|
|
605
|
+
an active state whose body was removed in the same tick. Its next step changes
|
|
606
|
+
the state to `released` with reason `body-removed`. That step applies no force.
|
|
607
|
+
`isBroken()` reads the current condition. It does not change the captured state.
|
|
608
|
+
|
|
609
|
+
Revision 1 keeps its body handle until you restore the servo state. A physics
|
|
610
|
+
restore makes the old handle stale. Restore both states before the next step.
|
|
611
|
+
|
|
612
|
+
### SI types
|
|
613
|
+
|
|
614
|
+
Use the SI constructors for each quantity: `meters()` for positions,
|
|
615
|
+
`kilograms()` for mass, `metersPerSecond()` for linear velocity, and
|
|
616
|
+
`newtons()` for force. Use `perSecond()` for a damping rate. Use
|
|
617
|
+
`frameVelocity()` and `frameGravity()` for frame quantities. Each constructor
|
|
618
|
+
keeps the bits of a finite input. It rejects NaN and infinity. Some body input
|
|
619
|
+
fields accept a plain number as well. The type of each field states which form
|
|
620
|
+
it takes. Revision 1 helper behavior remains selected by default.
|
|
621
|
+
|
|
622
|
+
For the character controller (`stepDeterministicKcc3D`), set `behaviorRevision: 3`
|
|
623
|
+
to recover from contact penetration after a landing.
|
|
624
|
+
This revision includes slope clearance for dynamic supports. It keeps the
|
|
625
|
+
revision 1 result shape and uses required checksums by default. Revision 1
|
|
626
|
+
remains the default. Revision 2 keeps its support state and portal movement.
|
|
627
|
+
|
|
628
|
+
New helper behavior requires an explicit revision selection.
|
|
629
|
+
|
|
630
|
+
### Shape-preserving body changes
|
|
631
|
+
|
|
632
|
+
Use `world.setBodyTransform(idOrHandle, { position, orientation })` to change a pose.
|
|
633
|
+
Use `meters()` for each position component.
|
|
634
|
+
The world normalizes the quaternion.
|
|
635
|
+
The operation keeps the shape, mass, inertia, logical ID, and velocities.
|
|
636
|
+
An identical normalized pose preserves sleep and the mutation revision.
|
|
637
|
+
A changed pose wakes the affected dynamic joint group.
|
|
638
|
+
|
|
639
|
+
Use `world.setBodyLinearDamping(idOrHandle, damping)` to change linear damping.
|
|
640
|
+
The value is a rate in 1/s, built with `perSecond(value)`. Each substep of length
|
|
641
|
+
`h` multiplies the velocity by `1 / (1 + h × damping)`. The default is 0 (no
|
|
642
|
+
damping). `setBodyAngularDamping` and `setBodyDamping` use the same unit. To
|
|
643
|
+
convert an old per-tick keep fraction k at tick rate R, use (1 / k - 1) * R.
|
|
644
|
+
The operation preserves sleep.
|
|
645
|
+
Use `world.wakeBody(idOrHandle)` to wake a dynamic body without a velocity change.
|
|
646
|
+
Resolve a new handle after a checkpoint restore, or use the logical ID.
|
|
647
|
+
|
|
648
|
+
### Batch motion output
|
|
649
|
+
|
|
650
|
+
`world.writeBodyMotionInto(poses, velocities, ids, status, teleports?)` returns the body
|
|
651
|
+
count, mutation `revision`, and `restoreEpoch`. The optional `teleports` output is a
|
|
652
|
+
`Uint32Array` of teleport counters, one per body, at least as long as the body count.
|
|
653
|
+
Use `Float64Array` for poses and velocities.
|
|
654
|
+
Use `BigUint64Array` for logical IDs.
|
|
655
|
+
Use `Uint8Array` for status.
|
|
656
|
+
The output orders bodies by ascending logical ID.
|
|
657
|
+
|
|
658
|
+
Each pose has seven values: x, y, z, qx, qy, qz, qw.
|
|
659
|
+
Each velocity has six values: vx, vy, vz, wx, wy, wz.
|
|
660
|
+
Positions use meters.
|
|
661
|
+
Linear velocities use meters per second.
|
|
662
|
+
Angular velocities use radians per second.
|
|
663
|
+
Quaternion components have no unit.
|
|
664
|
+
|
|
665
|
+
Status bits 0 and 1 contain the body kind: static 0, dynamic 1, or kinematic 2.
|
|
666
|
+
Bit 2 means trigger.
|
|
667
|
+
Bit 3 means sensor.
|
|
668
|
+
Bit 4 means sleeping.
|
|
669
|
+
Bit 5 means angular motion is enabled.
|
|
670
|
+
The operation checks all buffers before it writes a value.
|
|
671
|
+
It preserves the unused output suffix.
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
Engine RPM values use `turnsPerMinute(value)`.
|
|
675
|
+
The powertrain reverse-gear check takes `metersPerSecond(value)`.
|
|
676
|
+
These constructors preserve finite values and reject NaN and infinity.
|
|
677
|
+
|
|
678
|
+
The 2D particle emitter preserves a supplied particle ID.
|
|
679
|
+
An omitted ID or zero requests the next automatic ID.
|
|
680
|
+
A supplied ID must be unique and from 1 through 4294967294.
|
|
681
|
+
Particle records stay in increasing ID order.
|
|
682
|
+
|
|
683
|
+
`createVoxelBody3D` creates a native body and immutable voxel state.
|
|
684
|
+
Store the returned state in the captured game state.
|
|
685
|
+
`carveVoxelBody3D` stages a cut and publishes one body edit after cooking succeeds.
|
|
686
|
+
Use its returned state for the next cut.
|
|
687
|
+
`paintVoxelBody3D` changes material IDs and keeps the same collision children.
|
|
688
|
+
`hydrateVoxelBodyState3D` checks the stored partition against the restored native body.
|
|
689
|
+
It does not replace that partition with a full cook.
|
|
690
|
+
|
|
691
|
+
Body-level sphere, capsule, and swept-quad regions use body-local meters.
|
|
692
|
+
Box regions use integer cell indices.
|
|
693
|
+
The body API accounts for `originOffset` in SI regions.
|
|
694
|
+
Occupancy must contain only zero and one.
|
|
695
|
+
Each occupied cell keeps its initial mass when a cut removes other cells.
|
|
696
|
+
A cut preserves the velocity of retained material when the center of mass changes.
|
|
697
|
+
Locked velocity components stay zero.
|
|
698
|
+
|
|
699
|
+
A removed voxel state keeps only its body ID, format, revision, and removed status.
|
|
700
|
+
Hydration checks that its revision is positive and its body ID is absent.
|
|
701
|
+
This absence check does not prove which world first allocated the removed ID.
|
|
702
|
+
|
|
703
|
+
`voxelBodyDigest3D(state)` returns the cached SHA-256 content digest. Creation, edits, and hydration compute this digest once per immutable root. Repeated reads do not scan cells or cooked children. The digest includes the body ID, revision, dimensions, occupancy, materials, child IDs and descriptors, next ID, cell mass, origin offset, and child limit. Hydrate a copied or decoded root before you read its digest or use it in carve, paint, or remove. These operations accept only roots registered by this module instance. If two package copies load, hydrate the root in the receiving copy.
|
|
704
|
+
|
|
705
|
+
Pass the current voxel root to each edit. Native validation detects differences in geometry and mass. It cannot detect a stale root that differs only in paint. Keep the returned root in canonical game state. Use that root for each later cut, paint, or removal.
|
|
706
|
+
|
|
707
|
+
## Voxel simulation and binary snapshots
|
|
708
|
+
|
|
709
|
+
`/physics/3d` provides native `CellularField3D`, greedy AO meshing with packed
|
|
710
|
+
16-byte vertices, and a separate sparse `CellularTeardownArena3D`. The
|
|
711
|
+
[physics reference](../sdk-docs/rundot-developer-platform/api/SYNCPLAY-PHYSICS.md#cellular-voxel-fields-and-sparse-destruction-arenas)
|
|
712
|
+
gives the APIs, ownership, and limits. The render adapter supplies dirty-chunk
|
|
713
|
+
projection and packed attribute data. The game connects those outputs to its
|
|
714
|
+
renderer.
|
|
715
|
+
|
|
716
|
+
Session snapshots use binary transfer, LZ4-style compression, and optional
|
|
717
|
+
pinned asynchronous donation. Installed voxel runtimes can use native deltas
|
|
718
|
+
against retained tick-0 checkpoints. Unchanged chunks use no record. A
|
|
719
|
+
Teardown chunk with only solid-to-air changes can use one bit per changed
|
|
720
|
+
brick cell. Read
|
|
721
|
+
[binary snapshots](../sdk-docs/rundot-developer-platform/api/SYNCPLAY.md#binary-snapshots-and-baseline-deltas)
|
|
722
|
+
before you change the transport or the size limits.
|