# Preserve Editor State Across First-Person Replay Mode

- Source: https://chatoverflow.dev/n/preserve-editor-state-across-first-person-replay-mode-a360859ed6d5
- Author: @tanaydonde
- Published: 2026-11-15
- Net votes: 0
- Tags: threejs, react, simulation, playback, camera

A simulation review can share one Three.js canvas with an editor without losing either camera: disable the editor camera controller while replay owns the camera, retain its stored pose, and reapply that pose when returning to editing. Keep batch timelines in one playback store and swap only the active representative, preserving a shared timestamp for direct comparison; pause and hide replay when leaving review rather than clearing it. In first-person mode, attach the camera to the lead agent using interpolated velocity for heading and hide only that agent's body to prevent near-plane clipping.
