Skip to content

fix(cursor): halve the depth-cursor margin to 0.015 (ADR-046 A.2) - #169

Merged
dfattal merged 1 commit into
mainfrom
fix/cursor-margin-0015
Oct 11, 2026
Merged

dfattal merged 1 commit into
mainfrom
fix/cursor-margin-0015

Conversation

@dfattal

@dfattal dfattal commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

What

David's panel feedback: with the 0.03 default the depth cursor floats too far in front of the content. Runtime ADR-046 Amendment 2 A.2 is halved to 0.015 eye baselines, about 1 mm of crossed on-screen disparity at a 63–65 mm IPD instead of about 2 mm. The runtime makes the same change in DisplayXR/displayxr-runtime#1965, so web and native cursors still agree.

  • js/inline3d-cursor-depth.js: CURSOR_DEFAULT_TUNING.margin 0.03 → 0.015. This is the single source. DepthCursor (./three), cursor: 'depth' on ./model / ./splat (three and PlayCanvas), and the stereo-tile pair cursor js/camera/pair-cursor.js all take the margin from the core. A grep found no local copy left: every margin option is margin > 0 ? {...CURSOR_DEFAULT_TUNING, margin} : CURSOR_DEFAULT_TUNING. The only other 0.03 hits were in comments and JSDoc, and those are updated too.
  • Types and docs: cursor-depth.d.ts, model.d.ts, splat.d.ts, the DepthCursor JSDoc, and the cursor section of docs/authoring-inline-3d.md.
  • CHANGELOG.md: a new ## Unreleased entry marks this as a deliberate default change in both the core and preview tiers. To get the 1.41.0 look back, pass margin: 0.03.
  • Test wording in the e2e harness is updated. The harness already reads the margin from CURSOR_DEFAULT_TUNING.

Evidence

  • npm test: tsc passes, and 918 of 918 tests pass.
  • Mutant: with the core margin restored to 0.03, 4 tests fail: the default-margin pin in cursor-depth.test.mjs, and the target, units and PairCursor tests in pair-cursor.test.mjs.
  • The default-margin test now also checks the behaviour: cursorTarget(T, true, -0.2) === -0.215.
  • npm run -s api:check: the snapshots match.
  • npm run -s check:snippets: 22 files typecheck.
  • npm run -s test:e2e:cursor on the real viewers in headless Chrome: PASS.
    • The model runs playcanvas/model, three/model, playcanvas/model/screen and three/model/world all give cursor −0.1688 with the cube front at −0.1538, which is front − 0.015 exactly.
    • Splat: playcanvas −0.0400, three −0.0410. In every run the off-subject cursor is null (nothing is drawn).

Not tested

  • On a real panel: whether 0.015 reads right through the DisplayXR Browser weave needs an eyeball on the panel. Stock Chrome has no inline 3D.
  • No release or tag is cut. The change ships with the next sdk-v*.

🤖 Generated with Claude Code

Panel feedback: with 0.03 eye baselines (~2 mm crossed on-screen
disparity) the depth cursor floats visibly in front of the content.
Runtime ADR-046 Amendment 2 A.2 is halved to 0.015 (~1 mm at a 63-65 mm
IPD); the runtime makes the same change, so web and native cursors agree.

CURSOR_DEFAULT_TUNING.margin is the single source: DepthCursor,
cursor: 'depth' on ./model and ./splat (both engines) and the
stereo-tile pair cursor all take it from the core; no local copy
remains. `margin` still overrides it. Types, the authoring doc and
CHANGELOG (Unreleased, deliberate default change) are updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dfattal
dfattal merged commit 0d5340a into main Oct 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant