@displayxr/inline3d 1.47.2 → 1.47.4

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,52 @@ 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
+ ## Unreleased
9
+
10
+ ## 1.47.4 — 2026-10-31
11
+
12
+ ### Fixed — a declared 3D camera with portrait eyes was dropped for a plain one (`./camera`, `./call`)
13
+
14
+ - `openCamera` kept a device as a pair only if it was wider than 2.5:1. A phone's front pair with
15
+ portrait eyes (720x1280 each, so a 1440x1280 frame) failed that test: the SDK stopped the
16
+ "3D Camera (DisplayXR)" track and fell back to the plain default camera. A track whose settings
17
+ say `displayxrStereo.layout === 'side-by-side'` is now a pair whatever its aspect, so the SDK no
18
+ longer falls back once the browser offers a stereo track. Shape is still the guess for devices
19
+ that say nothing (USB pairs).
20
+
21
+ ### Fixed — before camera permission, `openCamera` opened a phone's front (head-tracker) lens (`./camera`, `./call`)
22
+
23
+ Touches `./camera` (`openCamera`'s `auto` / `stereo` probe) and so `./call`'s camera. With camera
24
+ permission already granted, nothing changes.
25
+
26
+ - Without permission the device labels are empty, so the probe used to open the platform default
27
+ camera just to get them: on a phone that is the front lens the head tracker holds, and opening
28
+ it coincided with every camera dropping out for about 2.4 s. It now primes permission on an
29
+ environment-facing camera (`facingMode: { ideal: 'environment' }`), reads the list again, and
30
+ opens a camera that names itself stereo **by id before the default**. A desktop webcam that
31
+ reports no facing is opened once and kept as the mono fallback (no extra camera start); a phone
32
+ with no pair still falls back to the default (front) camera for a self view.
33
+ - `camera-busy` now reads "camera unavailable: in use by another app (e.g. eye tracking) or unable
34
+ to deliver a picture". A 3D camera that is listed but cannot deliver also fails with
35
+ `NotReadableError`, so "every camera is in use" was wrong for it.
36
+
37
+ ## 1.47.3 — 2026-10-31
38
+
39
+ ### Fixed — a rear 3D camera's view was mirrored (`./camera`, `./call`)
40
+
41
+ Touches `./camera` (`addCameraView`, new read-only `StereoCamera.facing`) and `./call` (its self
42
+ tile). Front cameras and webcams behave exactly as before.
43
+
44
+ - `addCameraView`'s `mirror` now defaults to true **unless the track faces the environment**
45
+ (`getSettings().facingMode === 'environment'`, a rear camera). Mirroring is right for a self view
46
+ and wrong for a camera pointed at the world: on a tablet's rear 3D camera the scene came out
47
+ mirrored (each half flipped and the eyes swapped). An unknown facing (most desktop webcams) still
48
+ mirrors; an explicit `mirror` still wins.
49
+ - `StereoCamera.facing`: the track's `facingMode` (`'user'`, `'environment'`, `'left'`, `'right'`)
50
+ or null when the browser does not say.
51
+ - `./call`'s self tile uses the same default (it passed `mirror: true`), and `samples/camera`
52
+ initialises its Mirror checkbox from the view.
53
+
8
54
  ## 1.47.2 — 2026-10-30
9
55
 
10
56
  ### Docs only — two more panel findings in the shipped guide
package/camera.d.ts CHANGED
@@ -157,6 +157,8 @@ export interface StereoCamera {
157
157
  readonly eyeWidth: number;
158
158
  readonly deviceId: string | null;
159
159
  readonly label: string;
160
+ /** The track's `facingMode`: 'user', 'environment', 'left', 'right', or null when the browser does not say. */
161
+ readonly facing: 'user' | 'environment' | 'left' | 'right' | (string & {}) | null;
160
162
  /** True when this module opened the device (and `close()` stops it); false for a page-supplied stream. */
161
163
  readonly owned: boolean;
162
164
  /** Devices tried and not used (busy, denied, not a pair) — the clue a `'camera-busy'` report carries. */
@@ -203,7 +205,10 @@ export interface PairCursorOptions {
203
205
  }
204
206
 
205
207
  export interface CameraViewOptions {
206
- /** Selfie mirroring, done right for a pair (each half mirrored AND swapped). Default true. */
208
+ /**
209
+ * Selfie mirroring, done right for a pair (each half mirrored AND swapped). Default: true unless
210
+ * the camera faces the environment ({@link StereoCamera.facing} `'environment'`, a rear camera).
211
+ */
207
212
  mirror?: boolean;
208
213
  /** Measure the face's disparity ~5×/s and converge on it (the face at the display plane). Default false. */
209
214
  autoConverge?: boolean;