@displayxr/inline3d 1.25.0 → 1.25.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 +11 -0
- package/js/inline3d-splat-playcanvas.js +18 -0
- package/package.json +1 -1
- package/splat.d.ts +8 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,17 @@ 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.25.1 — 2026-09-25
|
|
9
|
+
|
|
10
|
+
Touches the **preview tier** (`./splat`, `engine: 'playcanvas'` only). Additive; nothing changes
|
|
11
|
+
for a page that does not call it.
|
|
12
|
+
|
|
13
|
+
- **`handle.setRenderScale(s)`** changes the per-eye buffer scale (the `renderScale` option) live,
|
|
14
|
+
in (0, 4], and resizes the backing store on the next animation frame; **`handle.renderScale`**
|
|
15
|
+
reads it back. For an app whose screens differ: full resolution where the splat is hidden and
|
|
16
|
+
only stage quads draw, a lower scale where a large splat is on screen. Replaces poking the
|
|
17
|
+
viewer's internal field.
|
|
18
|
+
|
|
8
19
|
## 1.25.0 — 2026-09-25
|
|
9
20
|
|
|
10
21
|
Touches the **preview tier** (a new subpath, `./player`) and the **core** (`.`, frozen tier): new
|
|
@@ -2981,6 +2981,9 @@ export function attachPlayCanvasSplat(out, wall, canvas, src, opts, pending = []
|
|
|
2981
2981
|
let cancelPendingVideo = null;
|
|
2982
2982
|
let warnedAutoplayMuted = false;
|
|
2983
2983
|
|
|
2984
|
+
// The current per-eye buffer scale (the `renderScale` option, or the last setRenderScale). A
|
|
2985
|
+
// real accessor: Object.assign below would copy a getter's value once.
|
|
2986
|
+
Object.defineProperty(out, 'renderScale', { get: () => viewer.renderScale, enumerable: true, configurable: true });
|
|
2984
2987
|
Object.assign(out, {
|
|
2985
2988
|
backend: 'playcanvas',
|
|
2986
2989
|
engine: null, // { app, root, camera } once the engine has booted — see below
|
|
@@ -3065,6 +3068,21 @@ export function attachPlayCanvasSplat(out, wall, canvas, src, opts, pending = []
|
|
|
3065
3068
|
layerRigs().set(layer, r.rig, r.opts);
|
|
3066
3069
|
return out;
|
|
3067
3070
|
},
|
|
3071
|
+
/**
|
|
3072
|
+
* Change the per-eye buffer scale live (the `renderScale` option): e.g. full resolution on a
|
|
3073
|
+
* screen that hides the splat and draws only stage quads, 0.6 elsewhere. The backing store is
|
|
3074
|
+
* resized on the next animation frame (never mid-frame). Returns the handle.
|
|
3075
|
+
*/
|
|
3076
|
+
setRenderScale(s) {
|
|
3077
|
+
if (typeof s !== 'number' || !Number.isFinite(s) || s <= 0 || s > 4) {
|
|
3078
|
+
throw new RangeError('@displayxr/inline3d/splat: setRenderScale takes a number in (0, 4].');
|
|
3079
|
+
}
|
|
3080
|
+
if (viewer.renderScale !== s) {
|
|
3081
|
+
viewer.renderScale = s;
|
|
3082
|
+
viewer._scheduleResize();
|
|
3083
|
+
}
|
|
3084
|
+
return out;
|
|
3085
|
+
},
|
|
3068
3086
|
/** Change the layer rig's tile-wide options live (no layer change): merge, `null` clears. */
|
|
3069
3087
|
setLayerRigOptions(o = {}) {
|
|
3070
3088
|
layerRigs().setOptions(validateLayerRigOptions(o, 'setLayerRigOptions'));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@displayxr/inline3d",
|
|
3
|
-
"version": "1.25.
|
|
3
|
+
"version": "1.25.1",
|
|
4
4
|
"description": "Turn any HTML <canvas> into a glasses-free-3D window on a DisplayXR display, inside an ordinary web page. Dependency-free; progressive enhancement (falls back to plain 2D everywhere else).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./index.d.ts",
|
package/splat.d.ts
CHANGED
|
@@ -994,6 +994,14 @@ export interface SplatHandle {
|
|
|
994
994
|
* `?dxrdiag=nolayerrig`. Callable before `ready`. docs/proposals/layer-display-rig.md.
|
|
995
995
|
*/
|
|
996
996
|
setLayerRig(layer: string | number | { id: number }, rig: 'display' | 'camera', opts?: SplatLayerRigOptions): SplatHandle;
|
|
997
|
+
/**
|
|
998
|
+
* `engine: 'playcanvas'` only. Change the per-eye buffer scale live (the `renderScale` option),
|
|
999
|
+
* in (0, 4]; the backing store is resized on the next animation frame. Throws a RangeError
|
|
1000
|
+
* otherwise.
|
|
1001
|
+
*/
|
|
1002
|
+
setRenderScale(scale: number): SplatHandle;
|
|
1003
|
+
/** `engine: 'playcanvas'` only. The current per-eye buffer scale. */
|
|
1004
|
+
readonly renderScale: number;
|
|
997
1005
|
/** `engine: 'playcanvas'` only. Change the layer rig's tile-wide options live (merge; `null` clears). */
|
|
998
1006
|
setLayerRigOptions(opts: SplatLayerRigOptions): SplatHandle;
|
|
999
1007
|
/**
|