@displayxr/inline3d 1.39.0 → 1.40.0

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,31 @@ 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.0 — 2026-10-10
9
+
10
+ Touches the **preview tier** (`./call`, `./camera`) only: one new option, off by default. New type
11
+ `PairCursorOptions`; nothing removed, no default changes.
12
+
13
+ ### `./call` + `./camera` — a depth cursor on stereo tiles (`cursor: 'depth'`)
14
+
15
+ - The scene cursor of 1.36.0 (runtime ADR-046) comes to the call and the camera view. Over a 3D
16
+ tile — a stereo peer, or your own stereo self view — a crosshair just in front of the person
17
+ under the pointer replaces the CSS cursor. Before, the flat cursor sat on the glass, drawn over a
18
+ face whose disparity says it is in front: the depth violation ADR-046 is about.
19
+ - A pair has no scene and no depth buffer, so the depth is **measured**: the cursor's footprint is
20
+ block-matched between the two halves of the tile's own frames (the same matcher auto-convergence
21
+ uses), the nearest confident match wins, and the crosshair is drawn into both halves with that
22
+ disparity plus a small margin. Nothing matched → the display plane. Same fast-rise / slow-sink
23
+ filter as the scene cursor. A mirrored self view flips the pointer, never the disparity.
24
+ - Zero cost when off: the option is validated at the call, and the cursor module is a dynamic
25
+ import made only on opt-in. When on, it costs nothing until the pointer is over a woven tile,
26
+ then a ~15 Hz grayscale copy of that tile's source (it shares the auto-convergence copy) and a
27
+ 9-block match when the pointer or the copy changes.
28
+ - `addCall(…, { cursor: 'depth' })`, `<dxr-call cursor="depth">`, `addCameraView(…, { cursor:
29
+ 'depth' })`; `{ height, pointerScope }` tune it (`margin` / `anchor` are scene-only and refused).
30
+ Lifted (2D→3D) and flat tiles keep the normal cursor. `diagnostics().peers[i].cursor` reads the
31
+ last placement. The `call`, `call-embed` and `camera` samples turn it on (`?cursor=0` turns it off).
32
+
8
33
  ## 1.39.0 — 2026-10-09
9
34
 
10
35
  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,14 @@ 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 — a crosshair just in front of
220
+ * the person under the pointer replaces the CSS cursor, instead of the flat cursor drawn on the
221
+ * glass behind them (runtime ADR-046; the depth is measured off each tile's two halves). Lifted
222
+ * (2D→3D) and flat tiles keep the normal cursor. Off by default (zero cost).
223
+ * `<dxr-call cursor="depth">`.
224
+ */
225
+ cursor?: 'depth' | PairCursorOptions;
218
226
  /** Participants INCLUDING you. Default 4, clamped to 2..4 (full mesh). */
219
227
  maxPeers?: number;
220
228
  /**
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
+ /** Sprite height as a fraction of the tile height (default 0.06). */
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,12 @@ 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, a crosshair just in front of whatever is
209
+ * under it (runtime ADR-046, measured off the pair's two halves) replaces the CSS cursor, so it
210
+ * is never drawn on the glass behind a face that sits in front of it. Off by default (zero cost).
211
+ */
212
+ cursor?: 'depth' | PairCursorOptions;
196
213
  /**
197
214
  * Called when the view's route changes — including when the wall says the tile will not weave
198
215
  * and the view drops to its flat left eye by itself — and when its `firstWoven` settles. Keep a