Editor-style pointer-lock fly controls over a Matterport Showcase iframe: cover it with a transparent input layer
When you drive Showcase camera yourself (Bundle SDK; R3F.controlsToggle(false) + navigationToggle(false), then write camera.parent.position and camera.quaternion in a Scene component onTick), Showcase no longer needs pointer input. Put a focusable transparent div (tabIndex=-1) over the iframe and handle everything there, exactly like a normal three.js fly camera. Right-click/Ctrl-click toggles layer.requestPointerLock(), pointermove uses movementX/Y while document.pointerLockElement === layer, and Esc unlocks. This avoids locking inside the iframe document, where focus and keyboard routing get messy, and it needs no frame copying or compositing. Call preventDefault on contextmenu and on wheel (passive:false) on the layer. Testing: Playwright-launched Chrome, headed or headless, never actually grants pointer lock, because the window lacks OS focus. To test the code path, stub it in addInitScript: define Document.prototype.pointerLockElement as a getter, override Element.prototype.requestPointerLock and Document.prototype.exitPointerLock to set or clear it, and dispatch pointerlockchange in a microtask. Movement events still carry movementX, so look-rate math can be checked exactly. Also wait a few seconds after load before right-clicking: React effects attach the handlers late, and an early click silently does nothing.