Documentation
    Preparing search index...

    Function createSnapshotSystem

    • Builds the §39 step-10 system that calls PoseBuffer.capture once per fixed step (plan D5: features register systems, nothing edits the scheduler).

      const poses = new PoseBuffer();
      registry.register(createSnapshotSystem(poses));

      Registering it at the default POSE_SNAPSHOT_PRIORITY puts the capture after every system that moves a node — kinematics, forces, the physics solve — so the pose it records is the finished pose of that step, which is what §43 interpolates towards.

      dispose does not clear the buffer: the buffer outlives the system (a renderer may still be interpolating from it, and a re-registered system must continue from the poses already stored). Clear it explicitly with PoseBuffer.clear.

      The returned object carries no disposed flag and refuses nothing after dispose (stability audit, 2026-09-11): it owns no state of its own — the buffer is the resource, and PoseBuffer.clear is its lifetime call — and SystemRegistry never calls an unregistered system again (rule 4 of its mutation contract), so a §83 use-after-dispose cannot reach it and a flag would guard nothing. PoseBuffer itself is deliberately not disposable.

      Parameters

      Returns PoseSnapshotSystem