@micrio/client 7.4.3 → 7.4.5

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/micrio.min.d.ts CHANGED
@@ -3218,6 +3218,13 @@ declare module '@micrio/client' {
3218
3218
  export {};
3219
3219
 
3220
3220
 
3221
+ /** A PlayCanvas colour, only used to make the viewer's clear transparent. */
3222
+ interface ViewerColour {
3223
+ r: number;
3224
+ g: number;
3225
+ b: number;
3226
+ a: number;
3227
+ }
3221
3228
  /** The subset of the SOG viewer handle this integration calls. */
3222
3229
  interface MicrioSogViewer {
3223
3230
  canvas: HTMLCanvasElement;
@@ -3234,7 +3241,15 @@ declare module '@micrio/client' {
3234
3241
  };
3235
3242
  }) => void;
3236
3243
  resize: () => void;
3244
+ requestRender?: () => void;
3237
3245
  dispose: () => void;
3246
+ /** Set by the viewer; the hybrid layer needs it transparent. */
3247
+ camera?: {
3248
+ clearColor?: ViewerColour;
3249
+ };
3250
+ /** `"webgpu"` or `"webgl2"`. The WebGPU path renders an opaque canvas. */
3251
+ backend?: string;
3252
+ hdr?: boolean;
3238
3253
  }
3239
3254
  type CreateMicrioSogViewer = (options: {
3240
3255
  canvas: HTMLCanvasElement;
@@ -3242,12 +3257,21 @@ declare module '@micrio/client' {
3242
3257
  filename?: string;
3243
3258
  startFrameFraction?: number;
3244
3259
  }) => Promise<MicrioSogViewer>;
3245
- declare global {
3260
+ global {
3246
3261
  /** Set by the page (or loaded below) from the PlayCanvas SOG bundle. */
3247
3262
  var createMicrioSogViewer: CreateMicrioSogViewer | undefined;
3248
3263
  }
3249
- /** True when this bundle should be rendered by the SOG viewer instead of the tile engine. */
3264
+ /** True when this bundle should use the SOG viewer, alone or as the hybrid overlay. */
3250
3265
  export const isSogBundle: (micrio: HTMLMicrioElement, bundle: Models.ImageBundle.BundleImage) => boolean;
3266
+ /**
3267
+ * True when `data-sog` asks for the overlay: the SOG is drawn on a transparent
3268
+ * canvas over the normal photo renderer, whose background is cut away with the
3269
+ * SOG's alpha. Navigation runs on the SOG; when it stops, the rotation snaps to
3270
+ * the nearest photographed frame and the SOG drops behind the photo, filling
3271
+ * the target tiles that are still loading. `data-prefer-sog` keeps forcing the
3272
+ * SOG-only renderer, so it wins when both are set.
3273
+ */
3274
+ export const isSogHybrid: (micrio: HTMLMicrioElement) => boolean;
3251
3275
  export {};
3252
3276
 
3253
3277