THREE.JS / FOUNDATIONS 214

Share the history.

A worker can own physics while the page owns Three.js. This study places bounded Rapier snapshots in shared memory when the document is cross-origin isolated, then proves the transferable fallback honestly.

Initializing Preparing memory

Creating shared snapshot storage while the worker loads deterministic Rapier...

physics
-
transport
-
bodies
-
history
-
latest
-
snapshot
-
reads
0
events
0
step ms
0.000
fps
-
Shared-ring controlsbox #1

The selected body will receive a fixed-tick command from the main thread.

Memory contract
SharedArrayBufferone shared byte slab for five fixed-capacity slots
Atomics.store()publish slot metadata after bytes are written
postMessage()share the buffer reference, not a transferable copy
ArrayBuffer fallbackcopy and transfer snapshots when isolation is unavailable

Shared memory requires a secure, cross-origin-isolated document. The transport badge and read counter expose which branch actually ran.

Selected body
statepending
groupboxes
index0
body slot0
position-
velocity-

The worker is loading deterministic Rapier. Once ready, the selected index will address one shared-history body.

Based on the official Three.js worker guidance, Rapier serialization guide, determinism guide, World API, InstancedMesh docs, and SharedArrayBuffer security requirements. Measurements are local browser evidence, not a universal networking or cross-platform determinism claim.