@displayxr/inline3d 1.27.0 → 1.28.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/player.d.ts CHANGED
@@ -267,7 +267,8 @@ export type PlayerAccent = 'azure' | 'violet' | 'magenta' | 'sunset' | 'amber' |
267
267
 
268
268
  /**
269
269
  * Pick the first source this browser can play from candidates listed best first; each is a URL, or
270
- * `{ src, type }` with a FULL `canPlayType` string (`'video/webm; codecs="vp9, opus"'`). The
271
- * DisplayXR Browser has no H.264/AAC, and a codec-less `'video/mp4'` still answers 'maybe'.
270
+ * `{ src, type }` with a FULL `canPlayType` string (`'video/webm; codecs="vp9, opus"'`). Only
271
+ * DisplayXR Browser 1.0.6+ plays H.264/AAC (via the OS decoders), and a codec-less `'video/mp4'`
272
+ * still answers 'maybe' — so list a VP9 WebM first when you have one.
272
273
  */
273
274
  export function pickSource(candidates: PlayerSource, canPlayType?: (type: string) => string): string | Blob | undefined;
package/splat.d.ts CHANGED
@@ -379,7 +379,11 @@ export interface SplatOptions {
379
379
  * so a long subject still fits once the turntable turns it (default true).
380
380
  */
381
381
  fitSweep?: boolean;
382
- /** Per-eye buffer scale; 0.5–0.7 is usually free (default 1). */
382
+ /**
383
+ * Per-eye buffer scale; 0.5–0.7 is usually free (default 1). Clamped to the device's GL limits: the whole store (2 × eye wide in 3D) is kept within
384
+ * min(MAX_TEXTURE_SIZE, MAX_RENDERBUFFER_SIZE, MAX_VIEWPORT_DIMS), both axes shrunk by one factor,
385
+ * with a one-time console warning. The handle's `renderScale` reports the value in force.
386
+ */
383
387
  renderScale?: number;
384
388
  feather?: number;
385
389
  /**
@@ -1008,11 +1012,18 @@ export interface SplatHandle {
1008
1012
  /**
1009
1013
  * `engine: 'playcanvas'` only. Change the per-eye buffer scale live (the `renderScale` option),
1010
1014
  * in (0, 4]; the backing store is resized on the next animation frame. Throws a RangeError
1011
- * otherwise.
1015
+ * otherwise. The request is kept as given (`renderScaleRequested`); the store is still clamped
1016
+ * to the device's GL limits, and `renderScale` reports what is in force.
1012
1017
  */
1013
1018
  setRenderScale(scale: number): SplatHandle;
1014
- /** `engine: 'playcanvas'` only. The current per-eye buffer scale. */
1019
+ /**
1020
+ * The per-eye buffer scale IN FORCE: the request times the device-limit clamp. E.g. 0.8 for a
1021
+ * request of 1 on a device whose MAX_TEXTURE_SIZE (4096) cannot hold a 5120-wide SBS store.
1022
+ * Both engines.
1023
+ */
1015
1024
  readonly renderScale: number;
1025
+ /** The per-eye buffer scale as requested (the option, or the last `setRenderScale`). Both engines. */
1026
+ readonly renderScaleRequested: number;
1016
1027
  /**
1017
1028
  * `engine: 'playcanvas'` only. The 2D tier's EYE offset — a head-parallax analogue for a flat
1018
1029
  * screen with no tracked eyes (e.g. a phone's tilt). `{x, y}` is normalised in the mono camera's
package/viewer.d.ts CHANGED
@@ -29,7 +29,11 @@ export interface SceneViewerOptions {
29
29
  orbit?: boolean;
30
30
  /** Degrees/second of turntable once idle. Ignored under prefers-reduced-motion. */
31
31
  idleSpin?: number;
32
- /** Per-eye buffer scale; 0.5–0.7 is usually free after the interlace (default 1). */
32
+ /**
33
+ * Per-eye buffer scale; 0.5–0.7 is usually free after the interlace (default 1). Clamped to the device's GL limits: the whole store (2 × eye wide in 3D) is kept within
34
+ * min(MAX_TEXTURE_SIZE, MAX_RENDERBUFFER_SIZE, MAX_VIEWPORT_DIMS), both axes shrunk by one factor,
35
+ * with a one-time console warning. `effectiveRenderScale` reports the value in force.
36
+ */
33
37
  renderScale?: number;
34
38
  /** Edge fade in buffer px (needs EdgeFeather from ./three). */
35
39
  feather?: number;
@@ -96,6 +100,13 @@ export declare class SceneViewer {
96
100
  readonly monoCamera: object;
97
101
  /** True while the side-by-side backing store is in use. */
98
102
  readonly is3D: boolean;
103
+ /** The requested per-eye buffer scale (the `renderScale` option). */
104
+ renderScale: number;
105
+ /**
106
+ * The per-eye buffer scale in force: `renderScale` times the device-limit clamp the last resize
107
+ * applied (1 where the store fits the device's MAX_TEXTURE_SIZE & co.).
108
+ */
109
+ readonly effectiveRenderScale: number;
99
110
 
100
111
  /** Centre the subject on the zero-disparity plane and scale it to the tile. */
101
112
  fitTo(