feat(shell): re-apply VR reference-space offset on SceneRack hops (#283) - #284
Merged
Merged
Conversation
In-session VR scene-rack hops were stuck at the prior session's spawn offset, leaving the user ~3.6 m from the new plinth instead of the intended ~1.45 m. Lift `applyVRSpawnOffsetForExhibit` out of the VR-branch closure and call it from `switchExhibitNow` so every cluster hop re-derives the per-scene offset against the stored unoffset reference-space snapshot. Stacking-safe by construction; pancake-mode call site is a `?.` no-op. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Preview deploy ready — commit https://geometer-pr-284.1bradley-martin1.workers.dev Open this URL in the Quest browser to smoke-test in headset. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #283
Summary
Extends the per-scene VR spawn behavior from #263 to also fire on in-session SceneRack hops, not just on
sessionstart. Pre-diff, hoppingquadrics → tangent-planesmid-VR-session stranded the user at world Z ≈ +1.5 while the new plinth sat at Z = -2.125 — a measured ~3.6 m gap instead of the intended ~1.45 m (Brad's #282 smoke verdict). LiftsapplyVRSpawnOffsetForExhibitout of the VR-branch closure into a mode-independentletslot the VR branch populates;switchExhibitNowcalls it after the mount + per-scene rack/camera writes. Stacking-safe by construction — the helper always derives from the unoffsetbaseXRReferenceSpacesnapshot, so N consecutive hops collapse to a single per-scene offset rather than a sum.Test plan
Automated:
npx tsc --noEmitcleannpm run lintcleannpm test— 604/604 pass/spar(Sonnet oppositional review): PUSH, zero findings — stacking, boot-mountisPresentingno-op, pancake-modenullhook,sessionstartdouble-application, disposers, and HMR-generation scoping all verified.Headset smoke on the Cloudflare PR preview (Quest 3S):
quadrics— user-to-plinth-front distance reads ~1.45 m (regression check vs. feat(staging): per-scene plinth + spawn derivation from cutout (#263) #282).quadrics → tangent-planes— distance reads ~1.45 m to the new plinth (not ~3.6 m).quadrics → gradient-levels— ~1.45 m.quadrics → saddle-extrema— ~1.45 m.tangent-planes → quadrics,gradient-levels → quadrics,saddle-extrema → quadrics) — ~1.45 m to the new plinth.quadrics → tangent-planes → gradient-levels → saddle-extrema → quadrics) — no offset stacking; each step lands at ~1.45 m.Pancake regression check (preview URL or
npm run dev):?.no-op whenapplyVRSpawnOffsetForExhibitis null).🤖 Generated with Claude Code