@series-inc/rundot-syncplay 6.0.0-rc.12 → 6.0.0-rc.121

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.
Files changed (658) hide show
  1. package/README.md +311 -5
  2. package/bench/wreck-yard-sleeping-contacts.json +855 -0
  3. package/core/deterministic-math.d.ts +75 -1
  4. package/core/deterministic-stdlib.d.ts +21 -1
  5. package/core/native/fixed_math.cpp +161 -0
  6. package/core/native/fixed_math.hpp +12 -0
  7. package/core/native/instance_ledger.hpp +1095 -0
  8. package/core/native/kinetix-native-main.cpp +42 -4
  9. package/core/native/legacy_checkpoint_ids.hpp +107 -0
  10. package/core/native/mobile/box3d_probe_scenario.cpp +2 -2
  11. package/core/native/physics/abi.cpp +42 -8
  12. package/core/native/physics/abi.hpp +2 -0
  13. package/core/native/physics/articulation.cpp +3 -2
  14. package/core/native/physics/box3d_adapter.cpp +16111 -0
  15. package/core/native/physics/box3d_adapter.hpp +1430 -0
  16. package/core/native/physics/box3d_checkpoint.cpp +62 -0
  17. package/core/native/physics/box3d_checkpoint.hpp +105 -0
  18. package/core/native/physics/box3d_deformable.cpp +3184 -0
  19. package/core/native/physics/box3d_deformable.hpp +210 -0
  20. package/core/native/physics/box3d_digest.cpp +62 -0
  21. package/core/native/physics/box3d_digest.hpp +50 -0
  22. package/core/native/physics/box3d_portal.cpp +2972 -0
  23. package/core/native/physics/box3d_portal.hpp +496 -0
  24. package/core/native/physics/box3d_step_phase.hpp +96 -0
  25. package/core/native/physics/box3d_world_backend.cpp +11642 -0
  26. package/core/native/physics/box3d_world_backend_kcc.hpp +107 -0
  27. package/core/native/physics/buoyancy.cpp +732 -26
  28. package/core/native/physics/buoyancy.hpp +56 -0
  29. package/core/native/physics/capsule_triangle_native.inc +121 -45
  30. package/core/native/physics/cellular_field3d.cpp +16 -0
  31. package/core/native/physics/cellular_field3d.hpp +654 -0
  32. package/core/native/physics/cellular_field3d_abi_setup.inc +893 -0
  33. package/core/native/physics/cellular_field3d_checkpoints.inc +577 -0
  34. package/core/native/physics/cellular_field3d_codec.inc +1497 -0
  35. package/core/native/physics/cellular_field3d_dirty.inc +389 -0
  36. package/core/native/physics/cellular_field3d_edits.inc +838 -0
  37. package/core/native/physics/cellular_field3d_internal.hpp +1097 -0
  38. package/core/native/physics/cellular_field3d_lifecycle.inc +534 -0
  39. package/core/native/physics/cellular_field3d_pages.inc +1541 -0
  40. package/core/native/physics/cellular_field3d_queries.inc +568 -0
  41. package/core/native/physics/cellular_field3d_serialize.inc +1032 -0
  42. package/core/native/physics/cellular_field3d_step.inc +2021 -0
  43. package/core/native/physics/cellular_mesher3d.cpp +1118 -0
  44. package/core/native/physics/cellular_mesher3d.hpp +184 -0
  45. package/core/native/physics/cellular_teardown3d.cpp +736 -0
  46. package/core/native/physics/cellular_teardown3d.hpp +207 -0
  47. package/core/native/physics/cellular_teardown3d_delta.inc +99 -0
  48. package/core/native/physics/cellular_teardown3d_islands.inc +357 -0
  49. package/core/native/physics/cellular_teardown3d_pages.inc +494 -0
  50. package/core/native/physics/cellular_teardown3d_snapshot.inc +400 -0
  51. package/core/native/physics/cellular_teardown3d_stream.inc +267 -0
  52. package/core/native/physics/certified_sum.hpp +218 -0
  53. package/core/native/physics/character.cpp +5 -4
  54. package/core/native/physics/checkpoint_schema.hpp +597 -0
  55. package/core/native/physics/cloth.cpp +2 -1
  56. package/core/native/physics/constraint_rows.cpp +982 -271
  57. package/core/native/physics/constraint_rows.hpp +146 -19
  58. package/core/native/physics/contact_material_store.cpp +803 -0
  59. package/core/native/physics/contact_material_store.hpp +315 -0
  60. package/core/native/physics/deformable_abi.cpp +389 -0
  61. package/core/native/physics/deformable_abi.hpp +122 -0
  62. package/core/native/physics/deformable_geometry.hpp +1949 -0
  63. package/core/native/physics/deformable_world_bridge.hpp +69 -0
  64. package/core/native/physics/deterministic_composite_math.hpp +50 -0
  65. package/core/native/physics/exact/exact-applied.hpp +57 -1
  66. package/core/native/physics/exact/word-core.hpp +1 -0
  67. package/core/native/physics/extended_abi.cpp +90 -5
  68. package/core/native/physics/extended_abi.hpp +31 -0
  69. package/core/native/physics/extended_abi_deformables.cpp +0 -127
  70. package/core/native/physics/extended_abi_deformables.hpp +0 -67
  71. package/core/native/physics/fixed_error_text.hpp +58 -0
  72. package/core/native/physics/gear.cpp +7 -1
  73. package/core/native/physics/geometry_memory.hpp +446 -10
  74. package/core/native/physics/geometry_store.cpp +770 -15
  75. package/core/native/physics/geometry_store.hpp +154 -2
  76. package/core/native/physics/hull_cook.hpp +122 -0
  77. package/core/native/physics/hull_cook.inc +1214 -0
  78. package/core/native/physics/hull_manifold.inc +661 -0
  79. package/core/native/physics/lag_compensation.cpp +4 -3
  80. package/core/native/physics/mass_properties.cpp +49 -181
  81. package/core/native/physics/mass_properties.hpp +11 -0
  82. package/core/native/physics/material_pose.hpp +627 -336
  83. package/core/native/physics/particles.cpp +9 -8
  84. package/core/native/physics/path_joint.cpp +4 -3
  85. package/core/native/physics/physics.cpp +20014 -14750
  86. package/core/native/physics/physics.hpp +894 -42
  87. package/core/native/physics/planar_deformable.cpp +9 -8
  88. package/core/native/physics/platformer_2d.cpp +11 -10
  89. package/core/native/physics/powered_ragdoll.cpp +11 -7
  90. package/core/native/physics/ragdoll.cpp +6 -5
  91. package/core/native/physics/ragdoll.hpp +6 -4
  92. package/core/native/physics/rope.cpp +4 -3
  93. package/core/native/physics/sdf_geometry.cpp +17 -16
  94. package/core/native/physics/soft_collision.cpp +45 -21
  95. package/core/native/physics/step_sort.hpp +122 -0
  96. package/core/native/physics/surface_velocity.cpp +817 -13
  97. package/core/native/physics/surface_velocity.hpp +283 -67
  98. package/core/native/physics/surface_velocity_math.hpp +91 -0
  99. package/core/native/physics/topology.cpp +176 -4
  100. package/core/native/physics/topology.hpp +57 -1
  101. package/core/native/physics/tracks.cpp +11 -10
  102. package/core/native/physics/voxel_cooking.cpp +50 -14
  103. package/core/native/physics/world.cpp +13480 -1705
  104. package/core/native/physics/world.hpp +2617 -26
  105. package/core/native/physics/world_abi.cpp +6616 -813
  106. package/core/native/physics/world_abi.hpp +913 -10
  107. package/core/native/physics/world_digest_visitor.hpp +378 -0
  108. package/core/native/physics/world_strong_digest.hpp +1069 -0
  109. package/core/native/physics2d/ccd.cpp +79 -1
  110. package/core/native/physics2d/checkpoint_memory.hpp +349 -0
  111. package/core/native/physics2d/commands.cpp +163 -25
  112. package/core/native/physics2d/commands.hpp +2 -0
  113. package/core/native/physics2d/contour.cpp +325 -0
  114. package/core/native/physics2d/contour.hpp +143 -0
  115. package/core/native/physics2d/joints.cpp +14 -23
  116. package/core/native/physics2d/memory_private.hpp +125 -0
  117. package/core/native/physics2d/owned_abi.cpp +1378 -904
  118. package/core/native/physics2d/owned_abi.hpp +187 -45
  119. package/core/native/physics2d/physics2d.cpp +1102 -53
  120. package/core/native/physics2d/physics2d.hpp +79 -1
  121. package/core/native/physics2d/queries.cpp +564 -10
  122. package/core/native/physics2d/queries.hpp +13 -0
  123. package/core/native/physics2d/world.cpp +963 -358
  124. package/core/native/physics2d/world.hpp +102 -11
  125. package/core/native/sha256/sha256_compress_unsigned.hpp +158 -0
  126. package/core/native/sha256/sha256_fips_constants.hpp +24 -0
  127. package/core/native/sha256/sha256_length.hpp +56 -0
  128. package/core/native/sha256/sha256_memo.hpp +48 -0
  129. package/core/native/sha256/sha256_sink.hpp +234 -0
  130. package/core/native/snapshot/lzma.c +22 -0
  131. package/core/physics2d-owned.d.ts +318 -158
  132. package/core/render-projection.d.ts +142 -1
  133. package/core/runtime.d.ts +277 -21
  134. package/core/scripts/box3d-native-build.mjs +891 -0
  135. package/core/scripts/build-box3d-adapter.mjs +357 -0
  136. package/core/scripts/build-box3d-browser-checkpoint.mjs +115 -0
  137. package/core/scripts/build-box3d-deformable.mjs +225 -0
  138. package/core/scripts/build-box3d-first-impact.mjs +193 -0
  139. package/core/scripts/build-box3d-fluid-round.mjs +221 -0
  140. package/core/scripts/build-box3d-host-filter-ccd.mjs +210 -0
  141. package/core/scripts/build-box3d-kcc-vehicle.mjs +238 -0
  142. package/core/scripts/build-box3d-pair-filters.mjs +253 -0
  143. package/core/scripts/build-box3d-perf.mjs +46 -0
  144. package/core/scripts/build-box3d-portal.mjs +395 -0
  145. package/core/scripts/build-box3d-rigid-solver.mjs +196 -0
  146. package/core/scripts/build-box3d-shapes-profile.mjs +337 -0
  147. package/core/scripts/build-box3d-support-substeps.mjs +254 -0
  148. package/core/scripts/build-native.mjs +164 -14
  149. package/core/scripts/build-wasm-physics.mjs +1011 -64
  150. package/core/scripts/extended-physics-profile.mjs +13 -22
  151. package/core/scripts/generate-physics2d-vectors.mjs +59 -0
  152. package/core/src/engine-math.d.mts +23 -0
  153. package/core/src/engine-math.mjs +1060 -0
  154. package/core/src/kinetix-deterministic-math.mjs +583 -27
  155. package/core/src/kinetix-deterministic-stdlib.mjs +120 -0
  156. package/core/src/kinetix-owned-runtime-adapter.mjs +1200 -0
  157. package/core/src/kinetix-render-projection.mjs +414 -0
  158. package/core/src/kinetix-runtime-adapter-utils.mjs +340 -6
  159. package/core/src/kinetix-runtime-contract.mjs +74 -9
  160. package/core/src/kinetix-runtime-identity.mjs +12 -1
  161. package/core/src/kinetix-state-report.mjs +36 -0
  162. package/core/src/physics/abi-constants.mjs +7 -3
  163. package/core/src/physics/articulation.mjs +10 -19
  164. package/core/src/physics/box3d-probe.mjs +8 -18
  165. package/core/src/physics/buoyancy.d.mts +132 -59
  166. package/core/src/physics/cellular-field3d.d.mts +495 -0
  167. package/core/src/physics/cellular-field3d.mjs +2311 -0
  168. package/core/src/physics/cellular-mesher3d.d.mts +196 -0
  169. package/core/src/physics/cellular-mesher3d.mjs +1291 -0
  170. package/core/src/physics/cellular-teardown-lz4.d.mts +17 -0
  171. package/core/src/physics/cellular-teardown-lz4.mjs +235 -0
  172. package/core/src/physics/cellular-teardown3d.d.mts +212 -0
  173. package/core/src/physics/cellular-teardown3d.mjs +749 -0
  174. package/core/src/physics/cloth.d.mts +7 -0
  175. package/core/src/physics/cloth.mjs +53 -19
  176. package/core/src/physics/deformable-query.d.mts +4 -0
  177. package/core/src/physics/deformable-query.mjs +32 -27
  178. package/core/src/physics/deformable-world.d.mts +174 -0
  179. package/core/src/physics/deformable-world.mjs +915 -0
  180. package/core/src/physics/distance.d.mts +160 -7
  181. package/core/src/physics/distance.mjs +4 -2
  182. package/core/src/physics/extended-wasm-instance.mjs +6 -1
  183. package/core/src/physics/feature-api.d.mts +17 -587
  184. package/core/src/physics/feature-api.mjs +15 -3
  185. package/core/src/physics/fracture.d.mts +4 -0
  186. package/core/src/physics/fracture.mjs +19 -17
  187. package/core/src/physics/gear.d.mts +544 -301
  188. package/core/src/physics/gear.mjs +4 -18
  189. package/core/src/physics/hull-cook.d.mts +23 -0
  190. package/core/src/physics/hull-cook.mjs +40 -0
  191. package/core/src/physics/lag-compensation.mjs +2 -17
  192. package/core/src/physics/mass-properties.d.mts +114 -3
  193. package/core/src/physics/mass-properties.mjs +6 -3
  194. package/core/src/physics/particles.d.mts +5 -0
  195. package/core/src/physics/particles.mjs +35 -21
  196. package/core/src/physics/path-joint.mjs +10 -20
  197. package/core/src/physics/physics-extended-wasm-module.generated.mjs +1 -5
  198. package/core/src/physics/physics-profile-wasm-module.generated.mjs +72 -0
  199. package/core/src/physics/physics-profile.wasm +0 -0
  200. package/core/src/physics/physics-wasm-module.generated.mjs +60 -8
  201. package/core/src/physics/physics.wasm +0 -0
  202. package/core/src/physics/powered-ragdoll.mjs +16 -24
  203. package/core/src/physics/powertrain.d.mts +256 -226
  204. package/core/src/physics/powertrain.mjs +2 -15
  205. package/core/src/physics/profile.d.mts +2 -0
  206. package/core/src/physics/profile.mjs +14 -0
  207. package/core/src/physics/pulley.d.mts +92 -349
  208. package/core/src/physics/pulley.mjs +2 -15
  209. package/core/src/physics/ragdoll.mjs +25 -26
  210. package/core/src/physics/rope.d.mts +235 -29
  211. package/core/src/physics/rope.mjs +37 -3
  212. package/core/src/physics/rounded-convex.mjs +2 -17
  213. package/core/src/physics/sdf-geometry.d.mts +5 -0
  214. package/core/src/physics/sdf-geometry.mjs +49 -17
  215. package/core/src/physics/soft-collision.mjs +24 -28
  216. package/core/src/physics/surface-velocity.d.mts +194 -196
  217. package/core/src/physics/surface-velocity.mjs +918 -135
  218. package/core/src/physics/tracks.mjs +18 -23
  219. package/core/src/physics/vehicle.mjs +4 -2
  220. package/core/src/physics/voxel-cooking.d.mts +42 -19
  221. package/core/src/physics/voxel-cooking.mjs +80 -9
  222. package/core/src/physics/voxel-swept-quad.mjs +110 -0
  223. package/core/src/physics/wasm-instance.mjs +166 -37
  224. package/core/src/physics/world.d.mts +191 -0
  225. package/core/src/physics/world.mjs +4207 -360
  226. package/core/src/physics2d/body-state.mjs +45 -5
  227. package/core/src/physics2d/collision.d.mts +13 -11
  228. package/core/src/physics2d/collision.mjs +43 -5
  229. package/core/src/physics2d/compound.mjs +4 -2
  230. package/core/src/physics2d/contour-state.mjs +773 -0
  231. package/core/src/physics2d/feature-api.d.mts +207 -1
  232. package/core/src/physics2d/owned-transport.mjs +273 -112
  233. package/core/src/physics2d/owned-world.mjs +153 -27
  234. package/core/src/physics2d/particle-fluid.d.mts +139 -30
  235. package/core/src/physics2d/particle-fluid.mjs +74 -35
  236. package/core/src/physics2d/physics2d-wasm-module.generated.mjs +29 -8
  237. package/core/src/physics2d/physics2d.wasm +0 -0
  238. package/core/src/physics2d/query-codec.mjs +2 -2
  239. package/core/src/physics2d/submerged-geometry.d.mts +35 -16
  240. package/core/src/physics2d/wasm-instance.mjs +9 -13
  241. package/core/src/runtime.mjs +20 -0
  242. package/core/src/shared/bytes.d.mts +2 -0
  243. package/core/src/shared/bytes.mjs +33 -0
  244. package/core/src/shared/sha256.d.mts +4 -0
  245. package/core/src/shared/sha256.mjs +170 -55
  246. package/core/src/shared/wasm-artifact.d.mts +9 -0
  247. package/core/src/shared/wasm-artifact.mjs +185 -0
  248. package/core/units.d.ts +50 -0
  249. package/core/world.d.ts +665 -14
  250. package/dist/api-deprecations.generated.d.ts +24 -0
  251. package/dist/api-deprecations.generated.js +24 -0
  252. package/dist/api-diagnostics.d.ts +17 -1
  253. package/dist/api-diagnostics.js +13 -8
  254. package/dist/authority-room.d.ts +411 -17
  255. package/dist/authority-room.js +2423 -131
  256. package/dist/browser.d.ts +29 -11
  257. package/dist/browser.js +16 -7
  258. package/dist/browserSession.d.ts +1 -0
  259. package/dist/browserSession.js +45 -4
  260. package/dist/canonical.d.ts +14 -0
  261. package/dist/canonical.js +224 -12
  262. package/dist/checkpoint-archive.d.ts +45 -0
  263. package/dist/checkpoint-archive.js +584 -0
  264. package/dist/checksum-policy.d.ts +17 -0
  265. package/dist/checksum-policy.js +21 -0
  266. package/dist/collections.d.ts +2 -0
  267. package/dist/collections.js +28 -1
  268. package/dist/collider-preparation.d.ts +31 -0
  269. package/dist/collider-preparation.js +507 -0
  270. package/dist/compat/v5.d.ts +5 -1
  271. package/dist/compat/v5.js +52 -9
  272. package/dist/creator.d.ts +10 -6
  273. package/dist/creator.js +5 -3
  274. package/dist/dev-authority-room.d.ts +49 -2
  275. package/dist/dev-authority-room.js +165 -62
  276. package/dist/engine-runtime.js +5 -8
  277. package/dist/errors.d.ts +9 -0
  278. package/dist/errors.js +9 -0
  279. package/dist/extensions/hub/airlock.d.ts +153 -0
  280. package/dist/extensions/hub/airlock.js +500 -0
  281. package/dist/extensions/hub/contracts.d.ts +369 -0
  282. package/dist/extensions/hub/contracts.js +106 -0
  283. package/dist/extensions/hub/exfil.d.ts +54 -0
  284. package/dist/extensions/hub/exfil.js +110 -0
  285. package/dist/extensions/hub/handoff.d.ts +84 -0
  286. package/dist/extensions/hub/handoff.js +161 -0
  287. package/dist/extensions/hub/index.d.ts +12 -0
  288. package/dist/extensions/hub/index.js +12 -0
  289. package/dist/extensions/hub/inventory.d.ts +86 -0
  290. package/dist/extensions/hub/inventory.js +288 -0
  291. package/dist/extensions/hub/party.d.ts +43 -0
  292. package/dist/extensions/hub/party.js +58 -0
  293. package/dist/extensions/hub/plugin.d.ts +23 -0
  294. package/dist/extensions/hub/plugin.js +37 -0
  295. package/dist/extensions/hub/settlement.d.ts +42 -0
  296. package/dist/extensions/hub/settlement.js +121 -0
  297. package/dist/extractionFingerprint.d.ts +1 -0
  298. package/dist/extractionFingerprint.js +30 -0
  299. package/dist/fresh-join.d.ts +106 -0
  300. package/dist/fresh-join.js +158 -0
  301. package/dist/game-byte-section.d.ts +36 -0
  302. package/dist/game-byte-section.js +350 -0
  303. package/dist/index.d.ts +43 -20
  304. package/dist/index.js +30 -10
  305. package/dist/input-authority.d.ts +33 -1
  306. package/dist/input-authority.js +291 -30
  307. package/dist/instant-replay.d.ts +27 -2
  308. package/dist/instant-replay.js +91 -16
  309. package/dist/lag-compensation3d.d.ts +22 -0
  310. package/dist/lag-compensation3d.js +423 -66
  311. package/dist/local-authority-wire.d.ts +38 -3
  312. package/dist/local-authority-wire.js +305 -7
  313. package/dist/local-prediction-presentation.d.ts +24 -0
  314. package/dist/local-prediction-presentation.js +162 -0
  315. package/dist/local-prediction.d.ts +50 -0
  316. package/dist/local-prediction.js +130 -0
  317. package/dist/match-log.d.ts +41 -5
  318. package/dist/match-log.js +95 -9
  319. package/dist/math.d.ts +23 -1
  320. package/dist/math.js +120 -0
  321. package/dist/modules/character-3d.d.ts +16 -1
  322. package/dist/modules/character-3d.js +45 -8
  323. package/dist/modules/combat.js +6 -5
  324. package/dist/modules/component-model.js +2 -2
  325. package/dist/modules/extraction.d.ts +149 -0
  326. package/dist/modules/extraction.js +350 -0
  327. package/dist/modules/gameplay-effects.js +2 -2
  328. package/dist/modules/inventory-equipment.js +19 -7
  329. package/dist/modules/module-contract.js +2 -2
  330. package/dist/modules/module-event.js +2 -2
  331. package/dist/modules/physical-assembly.d.ts +154 -0
  332. package/dist/modules/physical-assembly.js +893 -0
  333. package/dist/modules/rts.js +94 -32
  334. package/dist/modules/spatial-interaction.js +2 -4
  335. package/dist/modules/stats-abilities.js +10 -8
  336. package/dist/modules/unit-control.js +2 -2
  337. package/dist/movement.d.ts +4 -0
  338. package/dist/movement.js +13 -4
  339. package/dist/movement3d-common.d.ts +57 -0
  340. package/dist/movement3d-common.js +218 -0
  341. package/dist/movement3d-portal-traversal.d.ts +2 -0
  342. package/dist/movement3d-portal-traversal.js +336 -0
  343. package/dist/movement3d-revision1.d.ts +2 -0
  344. package/dist/movement3d-revision1.js +973 -0
  345. package/dist/movement3d-revision3.d.ts +71 -0
  346. package/dist/movement3d-revision3.js +847 -0
  347. package/dist/movement3d.d.ts +120 -3
  348. package/dist/movement3d.js +1343 -487
  349. package/dist/navmesh.d.ts +32 -0
  350. package/dist/navmesh.js +238 -0
  351. package/dist/networked-client.d.ts +167 -14
  352. package/dist/networked-client.js +2776 -283
  353. package/dist/node.d.ts +17 -5
  354. package/dist/node.js +12 -4
  355. package/dist/noise.d.ts +9 -0
  356. package/dist/noise.js +82 -0
  357. package/dist/ownership-audit.d.ts +25 -0
  358. package/dist/ownership-audit.js +103 -0
  359. package/dist/performance-diagnostics.d.ts +66 -0
  360. package/dist/performance-diagnostics.js +66 -0
  361. package/dist/periodic-domain.d.ts +10 -0
  362. package/dist/periodic-domain.js +13 -0
  363. package/dist/physics/2d.d.ts +17 -4
  364. package/dist/physics/2d.js +33 -6
  365. package/dist/physics/3d/assembly-bridge.d.ts +19 -0
  366. package/dist/physics/3d/assembly-bridge.js +238 -0
  367. package/dist/physics/3d/profile.d.ts +2 -0
  368. package/dist/physics/3d/profile.js +2 -0
  369. package/dist/physics/3d.d.ts +2187 -288
  370. package/dist/physics/3d.js +10956 -517
  371. package/dist/physics/body-forces3d.d.ts +68 -0
  372. package/dist/physics/body-forces3d.js +395 -0
  373. package/dist/physics/cellular-field3d.d.ts +58 -0
  374. package/dist/physics/cellular-field3d.js +14 -0
  375. package/dist/physics/cellular-mesher3d.d.ts +1 -0
  376. package/dist/physics/cellular-mesher3d.js +1 -0
  377. package/dist/physics/cellular-teardown-snapshot-codec3d.d.ts +14 -0
  378. package/dist/physics/cellular-teardown-snapshot-codec3d.js +10 -0
  379. package/dist/physics/cellular-teardown-worker3d.d.ts +21 -0
  380. package/dist/physics/cellular-teardown-worker3d.js +245 -0
  381. package/dist/physics/cellular-teardown3d.d.ts +214 -0
  382. package/dist/physics/cellular-teardown3d.js +785 -0
  383. package/dist/physics/contact-materials3d.d.ts +435 -0
  384. package/dist/physics/contact-materials3d.js +776 -0
  385. package/dist/physics/debug-overlay3d.d.ts +117 -0
  386. package/dist/physics/debug-overlay3d.js +563 -0
  387. package/dist/physics/edit-result-graph.d.ts +36 -0
  388. package/dist/physics/edit-result-graph.js +141 -0
  389. package/dist/physics/game-codec3d.d.ts +41 -0
  390. package/dist/physics/game-codec3d.js +544 -0
  391. package/dist/physics/hot-path-stats3d.d.ts +9 -0
  392. package/dist/physics/hot-path-stats3d.js +3 -0
  393. package/dist/physics/installed-checkpoint3d.d.ts +72 -0
  394. package/dist/physics/installed-checkpoint3d.js +378 -0
  395. package/dist/physics/installed-runtime3d.d.ts +79 -0
  396. package/dist/physics/installed-runtime3d.js +724 -0
  397. package/dist/physics/installed-state-commitment3d.d.ts +8 -0
  398. package/dist/physics/installed-state-commitment3d.js +78 -0
  399. package/dist/physics/native-error-code.d.ts +1 -0
  400. package/dist/physics/native-error-code.js +29 -0
  401. package/dist/physics/portal-far-rows3d.d.ts +31 -0
  402. package/dist/physics/portal-far-rows3d.js +134 -0
  403. package/dist/physics/portal-render3d.d.ts +328 -0
  404. package/dist/physics/portal-render3d.js +751 -0
  405. package/dist/physics/shape-mass3d.d.ts +134 -0
  406. package/dist/physics/shape-mass3d.js +526 -0
  407. package/dist/physics/units.d.ts +103 -0
  408. package/dist/physics/units.js +142 -0
  409. package/dist/physics/vehicle-state2d.d.ts +104 -0
  410. package/dist/physics/vehicle-state2d.js +758 -0
  411. package/dist/physics/vehicle-state3d.d.ts +103 -0
  412. package/dist/physics/vehicle-state3d.js +1803 -0
  413. package/dist/physics/voxel-body-split.d.ts +46 -0
  414. package/dist/physics/voxel-body-split.js +327 -0
  415. package/dist/physics/voxel-body-state.d.ts +106 -0
  416. package/dist/physics/voxel-body-state.js +614 -0
  417. package/dist/plugins/index.d.ts +27 -0
  418. package/dist/plugins/index.js +114 -0
  419. package/dist/plugins/types.d.ts +34 -0
  420. package/dist/plugins/types.js +5 -0
  421. package/dist/presentation-ik.d.ts +44 -0
  422. package/dist/presentation-ik.js +154 -0
  423. package/dist/presentation.d.ts +51 -0
  424. package/dist/presentation.js +98 -0
  425. package/dist/r3f-render-adapter.d.ts +150 -1
  426. package/dist/r3f-render-adapter.js +465 -0
  427. package/dist/replay.d.ts +13 -0
  428. package/dist/replay.js +99 -71
  429. package/dist/rooms-config-keys.d.ts +1 -1
  430. package/dist/rooms-config-keys.js +4 -0
  431. package/dist/run-room-transport.d.ts +46 -2
  432. package/dist/run-room-transport.js +448 -36
  433. package/dist/runner-harness.js +3 -2
  434. package/dist/runner.d.ts +118 -10
  435. package/dist/runner.js +1031 -168
  436. package/dist/runtime-cleanup.d.ts +54 -0
  437. package/dist/runtime-cleanup.js +266 -0
  438. package/dist/runtime-lease.d.ts +11 -1
  439. package/dist/runtime-lease.js +23 -10
  440. package/dist/runtime-room-metadata.d.ts +5 -8
  441. package/dist/runtime-room-metadata.js +10 -15
  442. package/dist/runtime-session.d.ts +94 -5
  443. package/dist/runtime-session.js +706 -71
  444. package/dist/schema-codegen.js +3 -0
  445. package/dist/schema-dsl-binary.d.ts +10 -4
  446. package/dist/schema-dsl-binary.js +375 -76
  447. package/dist/sdk-session.d.ts +10 -1
  448. package/dist/sdk-session.js +13 -3
  449. package/dist/seat-control.d.ts +159 -0
  450. package/dist/seat-control.js +631 -0
  451. package/dist/secret-authority.d.ts +19 -4
  452. package/dist/secret-authority.js +290 -36
  453. package/dist/secret-client.d.ts +2 -1
  454. package/dist/secret-client.js +73 -26
  455. package/dist/secret-config.d.ts +1 -1
  456. package/dist/secret-config.js +40 -93
  457. package/dist/secret-crypto.js +70 -36
  458. package/dist/secret-protocol.d.ts +3 -0
  459. package/dist/secret-protocol.js +14 -7
  460. package/dist/session-promotion.d.ts +19 -1
  461. package/dist/session-promotion.js +40 -9
  462. package/dist/session-snapshot.d.ts +121 -30
  463. package/dist/session-snapshot.js +807 -121
  464. package/dist/session-wire.d.ts +33 -1
  465. package/dist/session-wire.js +143 -36
  466. package/dist/shot-rewind.d.ts +2 -0
  467. package/dist/shot-rewind.js +17 -0
  468. package/dist/snapshot-baseline-delta.d.ts +68 -0
  469. package/dist/snapshot-baseline-delta.js +652 -0
  470. package/dist/snapshot-compression.d.ts +58 -0
  471. package/dist/snapshot-compression.js +547 -0
  472. package/dist/snapshot-config.d.ts +151 -0
  473. package/dist/snapshot-config.js +280 -0
  474. package/dist/snapshot-donation-timing.d.ts +30 -0
  475. package/dist/snapshot-donation-timing.js +81 -0
  476. package/dist/snapshot-limits.d.ts +6 -0
  477. package/dist/snapshot-limits.js +10 -0
  478. package/dist/snapshot-schedule.d.ts +40 -0
  479. package/dist/snapshot-schedule.js +140 -0
  480. package/dist/snapshot-upload.d.ts +40 -0
  481. package/dist/snapshot-upload.js +245 -0
  482. package/dist/snapshot-worker.d.ts +112 -0
  483. package/dist/snapshot-worker.js +1188 -0
  484. package/dist/sorted-free-id.d.ts +1 -0
  485. package/dist/sorted-free-id.js +38 -0
  486. package/dist/spatial/spatial-grid-3d.d.ts +5 -1
  487. package/dist/spatial/spatial-grid-3d.js +105 -3
  488. package/dist/state-digest.d.ts +8 -0
  489. package/dist/state-digest.js +34 -0
  490. package/dist/synctest.d.ts +9 -0
  491. package/dist/synctest.js +106 -17
  492. package/dist/testing-network.d.ts +7 -0
  493. package/dist/testing-network.js +128 -19
  494. package/dist/testing.d.ts +27 -6
  495. package/dist/testing.js +297 -56
  496. package/dist/tools/index.d.ts +3 -2
  497. package/dist/tools/index.js +3 -2
  498. package/dist/tools/module-certification.d.ts +6 -0
  499. package/dist/tools/module-certification.js +27 -2
  500. package/dist/tools/static-checker.js +9 -2
  501. package/dist/tools/vite-plugin.d.ts +12 -0
  502. package/dist/tools/vite-plugin.js +17 -1
  503. package/dist/types.d.ts +14 -0
  504. package/dist/ws-frame.d.ts +7 -1
  505. package/dist/ws-frame.js +113 -10
  506. package/extensions/hub/package.json +1 -0
  507. package/hub/package.json +1 -0
  508. package/package.json +128 -9
  509. package/plugins/package.json +1 -0
  510. package/third_party/box3d/LICENSE +21 -0
  511. package/third_party/box3d/PROVENANCE.md +219 -0
  512. package/third_party/box3d/UPSTREAM.json +20 -0
  513. package/third_party/box3d/port/c-sources.txt +54 -0
  514. package/third_party/box3d/port/syncplay-sources.txt +7 -0
  515. package/third_party/box3d/port/test-sources.txt +36 -0
  516. package/third_party/box3d/scripts/box3d-profile.mjs +185 -0
  517. package/third_party/box3d/tree/include/box3d/base.h +206 -0
  518. package/third_party/box3d/tree/include/box3d/box3d.h +1968 -0
  519. package/third_party/box3d/tree/include/box3d/collision.h +692 -0
  520. package/third_party/box3d/tree/include/box3d/config.h +33 -0
  521. package/third_party/box3d/tree/include/box3d/constants.h +146 -0
  522. package/third_party/box3d/tree/include/box3d/id.h +179 -0
  523. package/third_party/box3d/tree/include/box3d/math_functions.h +1220 -0
  524. package/third_party/box3d/tree/include/box3d/types.h +3251 -0
  525. package/third_party/box3d/tree/src/CMakeLists.txt +324 -0
  526. package/third_party/box3d/tree/src/aabb.c +176 -0
  527. package/third_party/box3d/tree/src/aabb.h +80 -0
  528. package/third_party/box3d/tree/src/algorithm.h +19 -0
  529. package/third_party/box3d/tree/src/arena_allocator.c +178 -0
  530. package/third_party/box3d/tree/src/arena_allocator.h +114 -0
  531. package/third_party/box3d/tree/src/bitset.c +66 -0
  532. package/third_party/box3d/tree/src/bitset.h +67 -0
  533. package/third_party/box3d/tree/src/block_allocator.c +95 -0
  534. package/third_party/box3d/tree/src/block_allocator.h +36 -0
  535. package/third_party/box3d/tree/src/body.c +2729 -0
  536. package/third_party/box3d/tree/src/body.h +303 -0
  537. package/third_party/box3d/tree/src/box3d.natvis +147 -0
  538. package/third_party/box3d/tree/src/box3d.pc.in +11 -0
  539. package/third_party/box3d/tree/src/broad_phase.c +823 -0
  540. package/third_party/box3d/tree/src/broad_phase.h +66 -0
  541. package/third_party/box3d/tree/src/capsule.c +385 -0
  542. package/third_party/box3d/tree/src/compound.c +1208 -0
  543. package/third_party/box3d/tree/src/compound.h +25 -0
  544. package/third_party/box3d/tree/src/constraint_graph.c +328 -0
  545. package/third_party/box3d/tree/src/constraint_graph.h +79 -0
  546. package/third_party/box3d/tree/src/contact.c +912 -0
  547. package/third_party/box3d/tree/src/contact.h +194 -0
  548. package/third_party/box3d/tree/src/contact_solver.c +1237 -0
  549. package/third_party/box3d/tree/src/contact_solver.h +122 -0
  550. package/third_party/box3d/tree/src/contact_solver_wide.inl +1670 -0
  551. package/third_party/box3d/tree/src/container.h +185 -0
  552. package/third_party/box3d/tree/src/convex_manifold.c +1602 -0
  553. package/third_party/box3d/tree/src/convex_manifold_wide.inl +825 -0
  554. package/third_party/box3d/tree/src/core.c +303 -0
  555. package/third_party/box3d/tree/src/core.h +189 -0
  556. package/third_party/box3d/tree/src/ctz.h +134 -0
  557. package/third_party/box3d/tree/src/distance.c +1954 -0
  558. package/third_party/box3d/tree/src/distance_joint.c +585 -0
  559. package/third_party/box3d/tree/src/dynamic_tree.c +2525 -0
  560. package/third_party/box3d/tree/src/dynamic_tree.h +113 -0
  561. package/third_party/box3d/tree/src/height_field.c +1629 -0
  562. package/third_party/box3d/tree/src/hull.c +3226 -0
  563. package/third_party/box3d/tree/src/hull.h +30 -0
  564. package/third_party/box3d/tree/src/id_pool.c +73 -0
  565. package/third_party/box3d/tree/src/id_pool.h +34 -0
  566. package/third_party/box3d/tree/src/island.c +735 -0
  567. package/third_party/box3d/tree/src/island.h +101 -0
  568. package/third_party/box3d/tree/src/joint.c +2324 -0
  569. package/third_party/box3d/tree/src/joint.h +661 -0
  570. package/third_party/box3d/tree/src/manifold.c +196 -0
  571. package/third_party/box3d/tree/src/manifold.h +92 -0
  572. package/third_party/box3d/tree/src/math_functions.c +616 -0
  573. package/third_party/box3d/tree/src/math_internal.h +471 -0
  574. package/third_party/box3d/tree/src/mesh.c +2492 -0
  575. package/third_party/box3d/tree/src/mesh_contact.c +1338 -0
  576. package/third_party/box3d/tree/src/motor_joint.c +420 -0
  577. package/third_party/box3d/tree/src/mover.c +70 -0
  578. package/third_party/box3d/tree/src/mover_joint.c +288 -0
  579. package/third_party/box3d/tree/src/name_cache.c +155 -0
  580. package/third_party/box3d/tree/src/name_cache.h +42 -0
  581. package/third_party/box3d/tree/src/parallel_for.c +138 -0
  582. package/third_party/box3d/tree/src/parallel_for.h +23 -0
  583. package/third_party/box3d/tree/src/parallel_joint.c +254 -0
  584. package/third_party/box3d/tree/src/physics_world.c +4435 -0
  585. package/third_party/box3d/tree/src/physics_world.h +369 -0
  586. package/third_party/box3d/tree/src/platform.h +165 -0
  587. package/third_party/box3d/tree/src/pogo_joint.c +451 -0
  588. package/third_party/box3d/tree/src/prismatic_joint.c +720 -0
  589. package/third_party/box3d/tree/src/qsort.h +186 -0
  590. package/third_party/box3d/tree/src/rapidhash.h +568 -0
  591. package/third_party/box3d/tree/src/recording.c +1250 -0
  592. package/third_party/box3d/tree/src/recording.h +390 -0
  593. package/third_party/box3d/tree/src/recording_ops.inl +254 -0
  594. package/third_party/box3d/tree/src/replay.c +3791 -0
  595. package/third_party/box3d/tree/src/replay.h +286 -0
  596. package/third_party/box3d/tree/src/revolute_joint.c +672 -0
  597. package/third_party/box3d/tree/src/scheduler.c +198 -0
  598. package/third_party/box3d/tree/src/scheduler.h +15 -0
  599. package/third_party/box3d/tree/src/sensor.c +451 -0
  600. package/third_party/box3d/tree/src/sensor.h +41 -0
  601. package/third_party/box3d/tree/src/shape.c +2451 -0
  602. package/third_party/box3d/tree/src/shape.h +206 -0
  603. package/third_party/box3d/tree/src/simd.c +310 -0
  604. package/third_party/box3d/tree/src/simd.h +401 -0
  605. package/third_party/box3d/tree/src/simd_avx2.h +208 -0
  606. package/third_party/box3d/tree/src/simd_neon.h +265 -0
  607. package/third_party/box3d/tree/src/simd_scalar.h +286 -0
  608. package/third_party/box3d/tree/src/simd_sse2.h +411 -0
  609. package/third_party/box3d/tree/src/simd_wide.h +67 -0
  610. package/third_party/box3d/tree/src/six_dof_joint.c +1257 -0
  611. package/third_party/box3d/tree/src/solver.c +2380 -0
  612. package/third_party/box3d/tree/src/solver.h +314 -0
  613. package/third_party/box3d/tree/src/solver_set.c +682 -0
  614. package/third_party/box3d/tree/src/solver_set.h +67 -0
  615. package/third_party/box3d/tree/src/sphere.c +247 -0
  616. package/third_party/box3d/tree/src/spherical_joint.c +738 -0
  617. package/third_party/box3d/tree/src/syncplay_contact.c +186 -0
  618. package/third_party/box3d/tree/src/syncplay_contact.h +97 -0
  619. package/third_party/box3d/tree/src/syncplay_digest.c +24 -0
  620. package/third_party/box3d/tree/src/syncplay_digest.h +31 -0
  621. package/third_party/box3d/tree/src/syncplay_impact.c +67 -0
  622. package/third_party/box3d/tree/src/syncplay_impact.h +71 -0
  623. package/third_party/box3d/tree/src/syncplay_six_dof.h +103 -0
  624. package/third_party/box3d/tree/src/syncplay_snapshot.c +1050 -0
  625. package/third_party/box3d/tree/src/syncplay_snapshot.h +271 -0
  626. package/third_party/box3d/tree/src/table.c +238 -0
  627. package/third_party/box3d/tree/src/table.h +74 -0
  628. package/third_party/box3d/tree/src/timer.c +834 -0
  629. package/third_party/box3d/tree/src/triangle_manifold.c +1334 -0
  630. package/third_party/box3d/tree/src/types.c +159 -0
  631. package/third_party/box3d/tree/src/verstable.h +2069 -0
  632. package/third_party/box3d/tree/src/weld_joint.c +304 -0
  633. package/third_party/box3d/tree/src/wheel_joint.c +1124 -0
  634. package/third_party/box3d/tree/src/wide4.c +6 -0
  635. package/third_party/box3d/tree/src/wide8.c +23 -0
  636. package/third_party/box3d/tree/src/world_snapshot.c +1984 -0
  637. package/third_party/box3d/tree/src/world_snapshot.h +27 -0
  638. package/third_party/lzma/README.md +29 -0
  639. package/third_party/lzma/src/7zTypes.h +600 -0
  640. package/third_party/lzma/src/Alloc.c +774 -0
  641. package/third_party/lzma/src/Alloc.h +76 -0
  642. package/third_party/lzma/src/Compiler.h +287 -0
  643. package/third_party/lzma/src/CpuArch.c +970 -0
  644. package/third_party/lzma/src/CpuArch.h +719 -0
  645. package/third_party/lzma/src/LzFind.c +1746 -0
  646. package/third_party/lzma/src/LzFind.h +160 -0
  647. package/third_party/lzma/src/LzHash.h +34 -0
  648. package/third_party/lzma/src/LzmaDec.c +1367 -0
  649. package/third_party/lzma/src/LzmaDec.h +237 -0
  650. package/third_party/lzma/src/LzmaEnc.c +3154 -0
  651. package/third_party/lzma/src/LzmaEnc.h +85 -0
  652. package/third_party/lzma/src/LzmaLib.c +42 -0
  653. package/third_party/lzma/src/LzmaLib.h +138 -0
  654. package/third_party/lzma/src/Precomp.h +127 -0
  655. package/core/native/physics/soft_body.cpp +0 -1449
  656. package/core/native/physics/soft_body.hpp +0 -328
  657. package/core/src/physics/soft-body.d.mts +0 -144
  658. package/core/src/physics/soft-body.mjs +0 -1285
package/README.md CHANGED
@@ -6,6 +6,68 @@ and `/physics/3d`. Both physics APIs use the canonical C++ core compiled to
6
6
  WASM. Syncplay owns inputs, prediction, confirmation, rollback policy, replay
7
7
  logs, late join, secrets, and transport.
8
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.
70
+
9
71
  ## Installation
10
72
 
11
73
  Install the RUN SDK and Syncplay in the game project. Syncplay uses the
@@ -222,6 +284,13 @@ metadata never silently passes negotiation.
222
284
 
223
285
  ## Presentation frames
224
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
+
225
294
  `session.getState()` returns a detached deep copy of the current frame, which
226
295
  costs O(state) per read and is unaffordable for a large mutable world (a
227
296
  destructible voxel city, a big streaming map).
@@ -416,7 +485,49 @@ battery of hostile payloads, failing with `SYNCPLAY_INPUT_CODEC_UNSAFE`.
416
485
 
417
486
  **Capacity and late-join budgets.** Snapshot transfer defaults are **256 KiB**
418
487
  chunks and a **4 MiB** total ceiling; the immutable level payload is fetched and
419
- verified separately and never rides a snapshot. `maxPredictionTicks` is a
488
+ verified separately and never rides a snapshot.
489
+
490
+ **Snapshots for late join.** Plain matches use fresh snapshots on demand
491
+ by default. The host uses
492
+ `room.requestFreshSnapshot({ maxAgeTicks })` and
493
+ `createSyncplayFreshJoinCoordinator()` from `/node`. The room waits before
494
+ admitting the player for up to `joinWaitSeconds` (2 seconds by default).
495
+ When the wait ends, the joiner gets the best available snapshot and replays
496
+ the remaining inputs. `join: 'stored'` serves the stored snapshot immediately.
497
+
498
+ Plain matches use `join: 'fresh'` and `backgroundSeconds: 300` by default.
499
+ These defaults apply to existing hosted bundles. Persistent rooms,
500
+ raid rooms, rooms with simulation hooks, and rooms that select
501
+ `join: 'stored'` use a 60-second recovery timer by default. Plain matches
502
+ use a five-minute recovery timer. The room also requests a snapshot when
503
+ the replay tail fills half of the history ring.
504
+ A hosted room sets these options with the `deterministic.snapshots` block,
505
+ which `parseSyncplaySnapshotConfig()` (from
506
+ `/node`) validates; see SYNCPLAY.md, "Snapshot configuration". The `config.*`
507
+ snapshot tick keys were removed in 6.0.0-rc.99 (see MIGRATING-RC98-TO-RC99.md).
508
+
509
+ **Checkpoint archive Worker.** A game can set `checkpointArchiveWorker` on
510
+ the runner or networked client to create a dedicated Worker for snapshot
511
+ replay. In the Worker, call `installCheckpointArchiveWorker(self, runtimeFactory)`
512
+ from `/browser` with the same runtime factory used by the game. The Worker
513
+ keeps confirmed inputs and portable anchors. If it cannot supply a requested
514
+ checkpoint, the donor tries its retained checkpoint through the normal
515
+ transfer path. The donor uses that path by default.
516
+
517
+ **Confirmed checksum Worker.** A game with installed 3D physics and no
518
+ cellular fields can set `checkpointChecksumWorker` on the runner or networked
519
+ client. Use a separate Worker with the same installer and runtime factory.
520
+ Call the installer before asynchronous imports. The factory can load the
521
+ simulation modules after the installer starts.
522
+ Allow two checkpoint slots beyond the history, advance batch, and import
523
+ scratch budget for an overlapping checksum and donation. The client stages
524
+ the exact confirmed checkpoint across tasks. The Worker computes the strong
525
+ checksum from that checkpoint. The client computes checksums locally during
526
+ Worker startup or after a failed job. If the room advances by two checksum
527
+ intervals while a job is pending, the client computes that report from the
528
+ same retained checkpoint and resets the Worker for later reports.
529
+
530
+ `maxPredictionTicks` is a
420
531
  rollback/latency budget, not a player-count limit. 128 slots is the tested
421
532
  protocol/load ceiling, not a 60 Hz performance guarantee for an arbitrary game.
422
533
 
@@ -450,7 +561,7 @@ frame, and disagreeing checksums.
450
561
 
451
562
  ## Physics API v1
452
563
 
453
- Syncplay RC1 has one public TypeScript API for each physics dimension. Import
564
+ Syncplay has one public TypeScript API for each physics dimension. Import
454
565
  2D physics from `@series-inc/rundot-syncplay/physics/2d`. Import 3D physics from
455
566
  `@series-inc/rundot-syncplay/physics/3d`. Do not import a raw physics adapter
456
567
  from `/core`.
@@ -459,6 +570,44 @@ Call `initPhysics2D()` or `initPhysics3D()` before world creation. Create an
459
570
  owned world with `createPhysicsWorld2D()` or `createPhysicsWorld3D()`. Each
460
571
  world provides fixed stepping, atomic edits, retained queries, opaque native
461
572
  checkpoints, portable checkpoint bytes, a state digest, and explicit disposal.
573
+ The 2D engine supports circle, box, capsule, polygon, segment, chain, piecewise
574
+ contour loops, and circular quadrant arcs with the free-side collision rule and
575
+ strict deterministic query tie-ordering.
576
+
577
+ Store logical body IDs in checkpointed game state. A hit has `bodyId`. A
578
+ contact has `bodyA` and `bodyB`. Keep an application `Map` from these `bigint`
579
+ IDs to entities. Each contact then uses `entities.get(contact.bodyA)` and
580
+ `entities.get(contact.bodyB)`. It requires no body-name scan.
581
+
582
+ Resolve a fresh handle with `world.resolveBody(id)` after a restore. Old
583
+ handles are stale. Transfer IDs as decimal strings if the game codec does not
584
+ support `bigint`. Convert them with `BigInt(text)`, never `Number(text)`.
585
+ Rebuild the lookup from the restored game state before processing contacts.
586
+ Physics checkpoints do not contain the application's entity table. Transfer
587
+ and restore both parts of the same frame.
588
+
589
+ ### Grab servo revision 2
590
+
591
+ Set `behaviorRevision: 2` to use gravity compensation, target velocity,
592
+ angular damping, and the corrected local anchor. Revision 2 rotates the local
593
+ anchor with the body orientation. Existing calls use revision 1.
594
+
595
+ Use `createGrabServoState3D()` and `stepGrabServo3D()` for explicit game state.
596
+ Store the returned state with the physics checkpoint. The object wrapper
597
+ provides `capture()` and `restore()` for the same state. Restore both parts of
598
+ the same frame. The servo resolves the body ID after a physics restore.
599
+
600
+ Force and acceleration limits apply to the total force in revision 2.
601
+ This includes gravity compensation. Torque limits apply to total torque.
602
+ One scale applies to all three components. A limit can reduce compensation,
603
+ so the body can fall. The default force limit is 1000 N. A 150 kg body under
604
+ 9.81 m/s² gravity requires more than this limit to hold its position.
605
+ Choose limits for the body's mass and gravity. A binding limit cannot promise
606
+ position holding. Revision 1 keeps its earlier acceleration-limit rule.
607
+
608
+ Include the helper revision in canonical session configuration and the game
609
+ deterministic version. Store targets, tuning, force limits, release state,
610
+ and body IDs in checkpointed game state.
462
611
 
463
612
  The TypeScript facade does not contain a second solver. Both dimensions run in
464
613
  the canonical C++ core compiled to WASM. The internal solver algorithm, state
@@ -466,12 +615,169 @@ layout, WASM boundary, schedule, and checkpoint representation can change when
466
615
  a complete benchmark proves a faster design. Each replacement must keep the
467
616
  public contract, deterministic results, rollback controls, and bounded memory.
468
617
 
469
- RC1 starts a new physics numeric epoch. Do not load a beta physics checkpoint
470
- or replay into an RC1 world. Change the game deterministic version. Start new
471
- rollback, replay, and late-join history.
618
+ 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
619
+ and digest algorithm revision 4. A world with a mesh above 512 triangles or a
620
+ heightfield above 2,048 triangles still runs on the public solver.
621
+ `world.rigidRouteState?.()` tells which route the next step uses.
622
+ Do not restore a checkpoint or load a replay from rc.80 or older. Those builds
623
+ use physics ABI 25 or earlier, and the world profile check rejects them. Every
624
+ peer in a match must use rc.81. Change the game deterministic version,
625
+ record golden digests again, and start new rollback, replay, and late-join history.
626
+ Read [MIGRATING-RC80-TO-RC81.md](MIGRATING-RC80-TO-RC81.md) for the changes to
627
+ contact events, sleep, round shapes, and performance.
472
628
 
473
629
  Read the [2D guide](https://github.com/series-ai/venus/blob/develop/packages/sdk-docs/rundot-developer-platform/api/SYNCPLAY-PHYSICS-2D.md),
474
630
  the [3D guide](https://github.com/series-ai/venus/blob/develop/packages/sdk-docs/rundot-developer-platform/api/SYNCPLAY-PHYSICS.md), and
475
631
  the [RC1 migration helper](https://github.com/series-ai/venus/blob/develop/packages/sdk-docs/rundot-developer-platform/api/SYNCPLAY-RC1-MIGRATION.md).
476
632
  Physical-phone performance remains a release gate. Do not infer phone results
477
633
  from desktop measurements.
634
+
635
+ Restore the physics world before you restore a grab servo state. Revision 2 accepts
636
+ an active state whose body was removed in the same tick. Its next step changes
637
+ the state to `released` with reason `body-removed`. That step applies no force.
638
+ `isBroken()` reads the current condition. It does not change the captured state.
639
+
640
+ Revision 1 keeps its body handle until you restore the servo state. A physics
641
+ restore makes the old handle stale. Restore both states before the next step.
642
+
643
+ ### SI types
644
+
645
+ Use the SI constructors for each quantity: `meters()` for positions,
646
+ `kilograms()` for mass, `metersPerSecond()` for linear velocity, and
647
+ `newtons()` for force. Use `perSecond()` for a damping rate. Use
648
+ `frameVelocity()` and `frameGravity()` for frame quantities. Each constructor
649
+ keeps the bits of a finite input. It rejects NaN and infinity. Some body input
650
+ fields accept a plain number as well. The type of each field states which form
651
+ it takes. Revision 1 helper behavior remains selected by default.
652
+
653
+ For the character controller (`stepDeterministicKcc3D`), set `behaviorRevision: 3`
654
+ to recover from contact penetration after a landing.
655
+ This revision includes slope clearance for dynamic supports. It keeps the
656
+ revision 1 result shape and uses required checksums by default. Revision 1
657
+ remains the default. Revision 2 keeps its support state and portal movement.
658
+
659
+ For free-standing portals with upright openings, pass `behaviorRevision: 3`,
660
+ `portalTraversal: 'clearance'`, and a `physics` world to
661
+ `stepDeterministicKcc3D`. The controller checks that the capsule fits both
662
+ openings and that the exit is clear. Read `portalCrossed` for the transformed
663
+ velocity and heading, or `portalBlocked` for the blocked pair and reason.
664
+ Include the opt-in in the game's deterministic version and replay settings.
665
+
666
+ ### Shape-preserving body changes
667
+
668
+ Use `world.setBodyTransform(idOrHandle, { position, orientation })` to change a pose.
669
+ Use `meters()` for each position component.
670
+ The world normalizes the quaternion.
671
+ The operation keeps the shape, mass, inertia, logical ID, and velocities.
672
+ An identical normalized pose preserves sleep and the mutation revision.
673
+ A changed pose wakes the affected dynamic joint group.
674
+
675
+ Use `world.setBodyLinearDamping(idOrHandle, damping)` to change linear damping.
676
+ The value is a rate in 1/s, built with `perSecond(value)`. Each substep of length
677
+ `h` multiplies the velocity by `1 / (1 + h × damping)`. The default is 0 (no
678
+ damping). `setBodyAngularDamping` and `setBodyDamping` use the same unit. To
679
+ convert an old per-tick keep fraction k at tick rate R, use (1 / k - 1) * R.
680
+ The operation preserves sleep.
681
+ Use `world.wakeBody(idOrHandle)` to wake a dynamic body without a velocity change.
682
+ Resolve a new handle after a checkpoint restore, or use the logical ID.
683
+
684
+ ### Batch motion output
685
+
686
+ `world.writeBodyMotionInto(poses, velocities, ids, status, teleports?)` returns the body
687
+ count, mutation `revision`, and `restoreEpoch`. The optional `teleports` output is a
688
+ `Uint32Array` of teleport counters, one per body, at least as long as the body count.
689
+ Use `Float64Array` for poses and velocities.
690
+ Use `BigUint64Array` for logical IDs.
691
+ Use `Uint8Array` for status.
692
+ The output orders bodies by ascending logical ID.
693
+
694
+ Each pose has seven values: x, y, z, qx, qy, qz, qw.
695
+ Each velocity has six values: vx, vy, vz, wx, wy, wz.
696
+ Positions use meters.
697
+ Linear velocities use meters per second.
698
+ Angular velocities use radians per second.
699
+ Quaternion components have no unit.
700
+
701
+ Status bits 0 and 1 contain the body kind: static 0, dynamic 1, or kinematic 2.
702
+ Bit 2 means trigger.
703
+ Bit 3 means sensor.
704
+ Bit 4 means sleeping.
705
+ Bit 5 means angular motion is enabled.
706
+ The operation checks all buffers before it writes a value.
707
+ It preserves the unused output suffix.
708
+
709
+
710
+ Engine RPM values use `turnsPerMinute(value)`.
711
+ The powertrain reverse-gear check takes `metersPerSecond(value)`.
712
+ These constructors preserve finite values and reject NaN and infinity.
713
+
714
+ The 2D particle emitter preserves a supplied particle ID.
715
+ An omitted ID or zero requests the next automatic ID.
716
+ A supplied ID must be unique and from 1 through 4294967294.
717
+ Particle records stay in increasing ID order.
718
+
719
+ `createVoxelBody3D` creates a native body and immutable voxel state.
720
+ Store the returned state in the captured game state.
721
+ `carveVoxelBody3D` stages a cut and publishes one body edit after cooking succeeds.
722
+ Use its returned state for the next cut.
723
+ `paintVoxelBody3D` changes material IDs and keeps the same collision children.
724
+ `hydrateVoxelBodyState3D` checks the stored partition against the restored native body.
725
+ It does not replace that partition with a full cook.
726
+
727
+ Body-level sphere, capsule, and swept-quad regions use body-local meters.
728
+ Box regions use integer cell indices.
729
+ The body API accounts for `originOffset` in SI regions.
730
+ Occupancy must contain only zero and one.
731
+ Each occupied cell keeps its initial mass when a cut removes other cells.
732
+ A cut preserves the velocity of retained material when the center of mass changes.
733
+ Locked velocity components stay zero.
734
+
735
+ A removed voxel state keeps only its body ID, format, revision, and removed status.
736
+ Hydration checks that its revision is positive and its body ID is absent.
737
+ This absence check does not prove which world first allocated the removed ID.
738
+
739
+ `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.
740
+
741
+ 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.
742
+
743
+ ## Voxel simulation and binary snapshots
744
+
745
+ `/physics/3d` provides native `CellularField3D`, greedy AO meshing with packed
746
+ 16-byte vertices, and a separate sparse `CellularTeardownArena3D`. The
747
+ [physics reference](../sdk-docs/rundot-developer-platform/api/SYNCPLAY-PHYSICS.md#cellular-voxel-fields-and-sparse-destruction-arenas)
748
+ gives the APIs, ownership, and limits. The render adapter supplies dirty-chunk
749
+ projection and packed attribute data. The game connects those outputs to its
750
+ renderer.
751
+
752
+ Session snapshots use binary transfer, LZ4-style compression, and
753
+ pinned asynchronous donation. Installed voxel runtimes can use native deltas
754
+ against retained tick-0 checkpoints. Unchanged chunks use no record. A
755
+ Teardown chunk with only solid-to-air changes can use one bit per changed
756
+ brick cell. Read
757
+ [binary snapshots](../sdk-docs/rundot-developer-platform/api/SYNCPLAY.md#binary-snapshots-and-baseline-deltas)
758
+ before you change the transport or the size limits.
759
+
760
+ ## Breaking changes
761
+
762
+ The donor uses a Worker by default. Set `asyncDonorSnapshot: false` to use
763
+ synchronous donation. Update the room and clients together to use physics page
764
+ diffs and compression code 2. The physics page diff limit is 32 MiB by
765
+ default. Set `maxHydratedSnapshotBytes` on the clients and on a self-hosted
766
+ `createDeterministicAuthorityRoom` for larger images. Hosted rooms keep the 32 MiB hydrated limit.
767
+ The default wire transfer limit is 4 MiB. In hosted rooms,
768
+ `deterministic.snapshots.maxBytes` sets the wire limit.
769
+
770
+ The Worker prepares the encoded snapshot and upload chunks. If a Worker is
771
+ unavailable, the client processes the snapshot on local timer turns.
772
+ `donorSnapshotBudgetMs` sets the minimum work grant per local frame.
773
+ It defaults to 2 ms. The client can grant more time based on its progress
774
+ and the time it needs for chunk pacing and the network. The reserve covers
775
+ one measured round trip, or 150 ms before the first RTT sample. The client
776
+ completes the encode even if the room's deadline passes. With no Worker, a
777
+ large state can delay a frame. In the worst case, the remaining work runs
778
+ in one task, as it does for the full snapshot on the synchronous path.
779
+
780
+ The client holds the checkpoint for the tick the authority requests. A game
781
+ can use `pinSnapshot` or `serializeStateAsync` to export a large checkpoint with
782
+ short main-thread tasks. A synchronous serializer or native export can still
783
+ delay a frame.