@displayxr/inline3d 1.23.0 → 1.25.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 +139 -0
- package/README.md +15 -0
- package/index.d.ts +57 -0
- package/js/inline3d-player.js +2219 -0
- package/js/inline3d-splat-diag.js +15 -1
- package/js/inline3d-splat-layer-rig.js +343 -125
- package/js/inline3d-splat-live.js +87 -7
- package/js/inline3d-splat-playcanvas.js +128 -24
- package/js/inline3d-splat-rig-map.js +369 -0
- package/js/inline3d-splat.js +8 -1
- package/js/inline3d.js +208 -12
- package/package.json +8 -1
- package/player.d.ts +273 -0
- package/splat.d.ts +41 -9
package/splat.d.ts
CHANGED
|
@@ -179,15 +179,27 @@ export interface ResolvedRig {
|
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
/**
|
|
182
|
-
* `handle.setLayerRig` options —
|
|
183
|
-
*
|
|
184
|
-
*
|
|
182
|
+
* `handle.setLayerRig` / `handle.setLayerRigOptions` options — tile-wide; they MERGE across calls
|
|
183
|
+
* (a key given replaces, `null` clears it back to its default). The rounding gain is
|
|
184
|
+
* k = D / (metersToVirtual · viewerDistance): the photo rig's convergence distance over the
|
|
185
|
+
* viewer's. docs/proposals/layer-display-rig.md.
|
|
185
186
|
*/
|
|
186
187
|
export interface SplatLayerRigOptions {
|
|
187
188
|
/** Nominal viewer distance in metres (default 0.6, the browser's own nominal). */
|
|
188
|
-
viewerDistance?: number;
|
|
189
|
+
viewerDistance?: number | null;
|
|
189
190
|
/** An explicit gain k instead (1 = exactly the photo rig; larger = rounder). */
|
|
190
|
-
gain?: number;
|
|
191
|
+
gain?: number | null;
|
|
192
|
+
/**
|
|
193
|
+
* Metres ON THE PANEL (display space), + = toward the viewer: moves the display-rig stage
|
|
194
|
+
* forward by this much. The plane that lands on the glass moves back from the photo's
|
|
195
|
+
* convergence plane by planeOffset·D/viewerDistance (world units). Default 0.
|
|
196
|
+
*/
|
|
197
|
+
planeOffset?: number | null;
|
|
198
|
+
/**
|
|
199
|
+
* The plane that lands on the glass, as a distance from the photo's camera in world units
|
|
200
|
+
* (wins over planeOffset). Default: the photo's convergence distance D.
|
|
201
|
+
*/
|
|
202
|
+
planeDistance?: number | null;
|
|
191
203
|
}
|
|
192
204
|
|
|
193
205
|
/** `handle.layerRigState()`. */
|
|
@@ -196,10 +208,24 @@ export interface SplatLayerRigState {
|
|
|
196
208
|
display: Array<string | number>;
|
|
197
209
|
/** The `nolayerrig` kill switch is on (requests recorded, never applied). */
|
|
198
210
|
disabled: boolean;
|
|
199
|
-
/** The last drawn frame
|
|
211
|
+
/** The view path of the last drawn frame: RenderViews, the N-camera fallback, or one view. */
|
|
212
|
+
path: 'renderviews' | 'ncamera' | 'mono' | null;
|
|
213
|
+
/** The display-rig views were actually applied on the last drawn frame. */
|
|
214
|
+
engaged: boolean;
|
|
215
|
+
/** Same as `engaged` (the 1.23 name). */
|
|
200
216
|
rounded: boolean;
|
|
217
|
+
/** Why not engaged (or what is wrong with some layers while engaged); null when all is well. */
|
|
218
|
+
reason: string | null;
|
|
219
|
+
viewerDistance: number;
|
|
201
220
|
/** The gain the last frame used (null off a camera rig). */
|
|
202
221
|
gain: number | null;
|
|
222
|
+
/** The plane that lands on the glass, as a distance from the photo's camera (world units). */
|
|
223
|
+
planeM: number | null;
|
|
224
|
+
/** The photo rig's convergence distance D (world units). */
|
|
225
|
+
photoConvergenceM: number | null;
|
|
226
|
+
planeOffset: number;
|
|
227
|
+
/** The views were verified (read off the views) as located for the rig used; null if unknown. */
|
|
228
|
+
located: boolean | null;
|
|
203
229
|
}
|
|
204
230
|
|
|
205
231
|
/** `handle.makeSbsMaterial` options. */
|
|
@@ -277,11 +303,12 @@ export interface SplatOptions {
|
|
|
277
303
|
* A string / array adds A/B kill switches (also accepted as `?dxrdiag=norig,frozen`): `'norig'`
|
|
278
304
|
* keeps the rig declared before the first setSource (drops every re-declaration), `'frozen'`
|
|
279
305
|
* forces `outgoing: 'frozen'`, `'nowarm'` skips the transition shader pre-warm, `'cold'` skips
|
|
280
|
-
* the live outgoing pre-sort, `'nooverlay'` records without the overlay
|
|
306
|
+
* the live outgoing pre-sort, `'nooverlay'` records without the overlay, `'oldrig'` draws the
|
|
307
|
+
* views as located (no rig tracking; the live outgoing photo on the pre-1.24 chain). The option wins over the
|
|
281
308
|
* URL; `false` turns it off even with `?dxrdiag` present. See docs/playcanvas-adapter.md
|
|
282
309
|
* § Diagnosing transition stalls.
|
|
283
310
|
*/
|
|
284
|
-
diag?: boolean | string | ReadonlyArray<'norig' | 'frozen' | 'nowarm' | 'cold' | 'nooverlay' | '1'>;
|
|
311
|
+
diag?: boolean | string | ReadonlyArray<'norig' | 'frozen' | 'nowarm' | 'cold' | 'nooverlay' | 'oldpick' | 'nolayerrig' | 'oldrig' | '1'>;
|
|
285
312
|
/**
|
|
286
313
|
* `engine: 'playcanvas'` only: the WebGL context's `preserveDrawingBuffer` (default false) —
|
|
287
314
|
* the knob for the weave's zero-copy read race on large canvases.
|
|
@@ -967,7 +994,12 @@ export interface SplatHandle {
|
|
|
967
994
|
* `?dxrdiag=nolayerrig`. Callable before `ready`. docs/proposals/layer-display-rig.md.
|
|
968
995
|
*/
|
|
969
996
|
setLayerRig(layer: string | number | { id: number }, rig: 'display' | 'camera', opts?: SplatLayerRigOptions): SplatHandle;
|
|
970
|
-
/** `engine: 'playcanvas'` only.
|
|
997
|
+
/** `engine: 'playcanvas'` only. Change the layer rig's tile-wide options live (merge; `null` clears). */
|
|
998
|
+
setLayerRigOptions(opts: SplatLayerRigOptions): SplatHandle;
|
|
999
|
+
/**
|
|
1000
|
+
* `engine: 'playcanvas'` only. What `setLayerRig` is doing — engaged or not, on which view path,
|
|
1001
|
+
* and why not. The same line is WARNed on the first 3D frame and on every change.
|
|
1002
|
+
*/
|
|
971
1003
|
layerRigState(): SplatLayerRigState;
|
|
972
1004
|
/**
|
|
973
1005
|
* `engine: 'playcanvas'` only, after `ready`. An unlit `pc.ShaderMaterial` that shows the left
|