@displayxr/inline3d 1.39.0 → 1.40.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,49 @@ entry points (`.`, `./three`) are frozen for 1.x, while the **scene subpaths** (
5
5
  `./splat`, `./model`) are a preview tier whose options may change in any release. Entries below say
6
6
  which tier they touch, because that is what tells you whether an upgrade can move your pixels.
7
7
 
8
+ ## 1.40.1 — 2026-10-11
9
+
10
+ Touches the **preview tier** (`./call`, `./camera`) only: how `cursor: 'depth'` looks and moves. No
11
+ API change.
12
+
13
+ ### Stereo-tile depth cursor: the normal arrow, and only ever in front of the screen
14
+
15
+ - **It never goes inside the display.** 1.40.0 put the cursor at the depth of whatever was under
16
+ it, so over a background behind the glass it sank behind the glass too. Now the depth only moves
17
+ to keep content that comes OUT of the screen from overlapping it; over anything on or behind the
18
+ glass it stays on the screen plane.
19
+ - **It is the normal arrow, not a crosshair.** On the plane nothing is drawn: it is the OS cursor,
20
+ untouched. Only while the person under it pops out is the arrow drawn into both halves, just in
21
+ front of them, at the OS arrow's size (19 CSS px; `height` still overrides it), with the OS
22
+ cursor hidden exactly then. The footprint now covers the arrow's body, not a ring round its tip.
23
+ - Same filter as before: it comes forward fast and hands back to the OS arrow smoothly as the
24
+ content sinks. Matches the native lifted-content cursor (runtime #1908).
25
+
26
+ ## 1.40.0 — 2026-10-10
27
+
28
+ Touches the **preview tier** (`./call`, `./camera`) only: one new option, off by default. New type
29
+ `PairCursorOptions`; nothing removed, no default changes.
30
+
31
+ ### `./call` + `./camera` — a depth cursor on stereo tiles (`cursor: 'depth'`)
32
+
33
+ - The scene cursor of 1.36.0 (runtime ADR-046) comes to the call and the camera view. Over a 3D
34
+ tile — a stereo peer, or your own stereo self view — a crosshair just in front of the person
35
+ under the pointer replaces the CSS cursor. Before, the flat cursor sat on the glass, drawn over a
36
+ face whose disparity says it is in front: the depth violation ADR-046 is about.
37
+ - A pair has no scene and no depth buffer, so the depth is **measured**: the cursor's footprint is
38
+ block-matched between the two halves of the tile's own frames (the same matcher auto-convergence
39
+ uses), the nearest confident match wins, and the crosshair is drawn into both halves with that
40
+ disparity plus a small margin. Nothing matched → the display plane. Same fast-rise / slow-sink
41
+ filter as the scene cursor. A mirrored self view flips the pointer, never the disparity.
42
+ - Zero cost when off: the option is validated at the call, and the cursor module is a dynamic
43
+ import made only on opt-in. When on, it costs nothing until the pointer is over a woven tile,
44
+ then a ~15 Hz grayscale copy of that tile's source (it shares the auto-convergence copy) and a
45
+ 9-block match when the pointer or the copy changes.
46
+ - `addCall(…, { cursor: 'depth' })`, `<dxr-call cursor="depth">`, `addCameraView(…, { cursor:
47
+ 'depth' })`; `{ height, pointerScope }` tune it (`margin` / `anchor` are scene-only and refused).
48
+ Lifted (2D→3D) and flat tiles keep the normal cursor. `diagnostics().peers[i].cursor` reads the
49
+ last placement. The `call`, `call-embed` and `camera` samples turn it on (`?cursor=0` turns it off).
50
+
8
51
  ## 1.39.0 — 2026-10-09
9
52
 
10
53
  Core (`.`) changes are **additive**, with every existing default unchanged: `firstWoven` and
package/call.d.ts CHANGED
@@ -17,7 +17,7 @@
17
17
  // until the snapshot is updated in the same change (`node tools/api-surface.mjs --update`).
18
18
 
19
19
  import type { Inline3D, Inline3DUnsupported } from './index.js';
20
- import type { StereoCamera } from './camera.js';
20
+ import type { StereoCamera, PairCursorOptions } from './camera.js';
21
21
 
22
22
  /** What a participant sends: a side-by-side pair (left eye left) or one flat picture. */
23
23
  export type CallFormat = 'sbs' | 'mono';
@@ -215,6 +215,15 @@ export interface CallOptions {
215
215
  * at the display plane. No calibration needed. The depth slider stays an offset on top.
216
216
  */
217
217
  autoConverge?: boolean;
218
+ /**
219
+ * `'depth'`: over a 3D (stereo) tile — a peer's or your self view — the cursor is never
220
+ * overlapped by what comes out of the screen: where the person under the pointer pops out, the
221
+ * normal arrow is drawn just in front of them (runtime ADR-046; the depth is measured off each
222
+ * tile's two halves). Everywhere else it is the plain OS arrow on the screen plane — it never goes
223
+ * inside the display. Lifted (2D→3D) and flat tiles keep the normal cursor. Off by default (zero cost).
224
+ * `<dxr-call cursor="depth">`.
225
+ */
226
+ cursor?: 'depth' | PairCursorOptions;
218
227
  /** Participants INCLUDING you. Default 4, clamped to 2..4 (full mesh). */
219
228
  maxPeers?: number;
220
229
  /**
package/camera.d.ts CHANGED
@@ -184,6 +184,17 @@ export function openCamera(opts?: CameraOptions | CameraPreference): Promise<Ste
184
184
  /** Is `x` a {@link StereoCamera}? Duck-typed, so two copies of the SDK interoperate. */
185
185
  export function isStereoCamera(x: unknown): x is StereoCamera;
186
186
 
187
+ /**
188
+ * `cursor: { … }` on a stereo pair (an object also means `'depth'`). A pair has no scene: the
189
+ * depth under the pointer is MEASURED off its two halves, so there is no anchor mode or margin.
190
+ */
191
+ export interface PairCursorOptions {
192
+ /** Arrow height as a fraction of the tile height (default: the OS arrow's size, 19 CSS px). */
193
+ height?: number;
194
+ /** `'window'` (default): the cursor stays while the pointer is over DOM on the tile (a badge). `'canvas'`: only over the canvas itself. */
195
+ pointerScope?: 'canvas' | 'window';
196
+ }
197
+
187
198
  export interface CameraViewOptions {
188
199
  /** Selfie mirroring, done right for a pair (each half mirrored AND swapped). Default true. */
189
200
  mirror?: boolean;
@@ -193,6 +204,13 @@ export interface CameraViewOptions {
193
204
  depth?: number;
194
205
  /** The tile's aspect (w/h) = the woven buffer's per-eye aspect. Default 16/9. */
195
206
  aspect?: number;
207
+ /**
208
+ * `'depth'`: while the pointer is over the woven view and what is under it comes out of the
209
+ * screen, the normal arrow is drawn just in front of it (runtime ADR-046, measured off the pair's
210
+ * two halves), so it is never drawn on the glass behind a face that pops out. Otherwise it is the
211
+ * plain OS arrow on the screen plane; it never goes inside the display. Off by default (zero cost).
212
+ */
213
+ cursor?: 'depth' | PairCursorOptions;
196
214
  /**
197
215
  * Called when the view's route changes — including when the wall says the tile will not weave
198
216
  * and the view drops to its flat left eye by itself — and when its `firstWoven` settles. Keep a