@micrio/client 7.4.0 → 7.4.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/micrio.core.min.js +2 -2
- package/micrio.min.d.ts +66 -5
- package/micrio.min.js +2 -2
- package/package.json +1 -1
package/micrio.min.d.ts
CHANGED
|
@@ -622,6 +622,16 @@ declare module '@micrio/client' {
|
|
|
622
622
|
/** Split-screen: if false, the secondary image is display-only (no user interaction). */
|
|
623
623
|
secondaryInteractive?: boolean;
|
|
624
624
|
}
|
|
625
|
+
interface SogInfo {
|
|
626
|
+
/** SOG quality/name (for example `l`, `m`, `s`, `xs`) */
|
|
627
|
+
name: string;
|
|
628
|
+
/** Number of gaussian splats in the file */
|
|
629
|
+
numSplats: number;
|
|
630
|
+
/** Build timestamp of the file, in ms */
|
|
631
|
+
timestamp: number;
|
|
632
|
+
/** File size in bytes */
|
|
633
|
+
fileSize: number;
|
|
634
|
+
}
|
|
625
635
|
interface OmniSettings {
|
|
626
636
|
/** Number of frames */
|
|
627
637
|
frames: number;
|
|
@@ -650,6 +660,8 @@ declare module '@micrio/client' {
|
|
|
650
660
|
[key: string]: string | undefined;
|
|
651
661
|
};
|
|
652
662
|
}[];
|
|
663
|
+
/** Available Gaussian splat captures for this object */
|
|
664
|
+
sog?: SogInfo[];
|
|
653
665
|
/** Optional starting layer idx */
|
|
654
666
|
layerStartIndex?: number;
|
|
655
667
|
/** Hide the rotation dial */
|
|
@@ -2063,8 +2075,11 @@ declare module '@micrio/client' {
|
|
|
2063
2075
|
_zoomOverride: ((n: number) => void) | undefined;
|
|
2064
2076
|
/** Possible override for Book3D */
|
|
2065
2077
|
_isZoomedInOverride: (() => boolean) | undefined;
|
|
2066
|
-
/** Possible override for `_getXYDirect` for Book3D */
|
|
2067
|
-
_getXYDirectOverride: ((x: number, y: number
|
|
2078
|
+
/** Possible override for `_getXYDirect` for Book3D and the SOG viewer */
|
|
2079
|
+
_getXYDirectOverride: ((x: number, y: number, opts?: {
|
|
2080
|
+
radius?: number;
|
|
2081
|
+
rotation?: number;
|
|
2082
|
+
}) => Float64Array) | undefined;
|
|
2068
2083
|
/** getMatrix book3d override */
|
|
2069
2084
|
_getMatrixOverride: ((x: number, y: number, scale: number, rotX?: number, rotY?: number, rotZ?: number, scaleX?: number, scaleY?: number,
|
|
2070
2085
|
/** The element's content width in CSS pixels (used to convert `scale` to a world size). */
|
|
@@ -2216,6 +2231,8 @@ declare module '@micrio/client' {
|
|
|
2216
2231
|
isJump?: boolean;
|
|
2217
2232
|
/** For Omni objects: the target image frame index to animate to. */
|
|
2218
2233
|
omniIndex?: number;
|
|
2234
|
+
/** For Omni objects: the target rotation in degrees (continuous renderers). */
|
|
2235
|
+
omniRotation?: number;
|
|
2219
2236
|
/** If true, respects the image's maximum zoom limit during animation. */
|
|
2220
2237
|
limitZoom?: boolean;
|
|
2221
2238
|
/** If provided, adds a margin to the view. */
|
|
@@ -2625,6 +2642,13 @@ declare module '@micrio/client' {
|
|
|
2625
2642
|
get $marker(): Models.ImageData.Marker | undefined;
|
|
2626
2643
|
/** Writable store holding the currently displayed layer index (for Omni objects). */
|
|
2627
2644
|
readonly layer: Writable<number>;
|
|
2645
|
+
/**
|
|
2646
|
+
* Continuous omni rotation in degrees, 0 at the first frame.
|
|
2647
|
+
* Seamless (SOG) mode uses the full value; legacy tile mode snaps it to a frame.
|
|
2648
|
+
*/
|
|
2649
|
+
readonly omniRotation: Writable<number>;
|
|
2650
|
+
/** Getter for the current omni rotation in degrees. */
|
|
2651
|
+
get $omniRotation(): number;
|
|
2628
2652
|
/** Creates an Image state controller and subscribes to view/marker changes to synchronise with the main element state. @param image The parent MicrioImage instance. */
|
|
2629
2653
|
constructor(image: MicrioImage);
|
|
2630
2654
|
}
|
|
@@ -2839,9 +2863,13 @@ declare module '@micrio/client' {
|
|
|
2839
2863
|
/** Manages omni 3D object rotation UI: dial, swipe gestures, frame navigation, and layer menu. */
|
|
2840
2864
|
export class OmniUI {
|
|
2841
2865
|
#private;
|
|
2842
|
-
/** Navigate to a specific frame index. */
|
|
2866
|
+
/** Navigate to a specific frame index. Seamless mode converts it to degrees. */
|
|
2843
2867
|
goto(i: number): void;
|
|
2844
|
-
/**
|
|
2868
|
+
/** Set the object rotation in degrees. Legacy mode snaps it to the nearest frame. */
|
|
2869
|
+
setRotation(deg: number): void;
|
|
2870
|
+
/** Continuous rotation in degrees, 0 at the first frame. */
|
|
2871
|
+
get rotation(): number;
|
|
2872
|
+
/** Active frame index currently displayed (derived from the rotation when seamless). */
|
|
2845
2873
|
get currentIndex(): number;
|
|
2846
2874
|
/** Initialize the omni UI: create frame objects, set up dial, swipe gestures, and layer menu. */
|
|
2847
2875
|
setup(): Promise<void>;
|
|
@@ -3085,7 +3113,7 @@ declare module '@micrio/client' {
|
|
|
3085
3113
|
export class Canvas {
|
|
3086
3114
|
#private;
|
|
3087
3115
|
/** The main WebGL rendering `<canvas>` element. */
|
|
3088
|
-
|
|
3116
|
+
element: HTMLCanvasElement;
|
|
3089
3117
|
/** Object containing current viewport dimensions, position, and ratios. */
|
|
3090
3118
|
readonly viewport: Models.Canvas.ViewRect;
|
|
3091
3119
|
/** Writable store indicating if the client is likely a mobile device. */
|
|
@@ -3190,6 +3218,39 @@ declare module '@micrio/client' {
|
|
|
3190
3218
|
export {};
|
|
3191
3219
|
|
|
3192
3220
|
|
|
3221
|
+
/** The subset of the SOG viewer handle this integration calls. */
|
|
3222
|
+
interface MicrioSogViewer {
|
|
3223
|
+
canvas: HTMLCanvasElement;
|
|
3224
|
+
setView: (view: {
|
|
3225
|
+
degrees?: number;
|
|
3226
|
+
view?: Models.Camera.View;
|
|
3227
|
+
yaw?: number;
|
|
3228
|
+
pitch?: number;
|
|
3229
|
+
distance?: number;
|
|
3230
|
+
target?: {
|
|
3231
|
+
x: number;
|
|
3232
|
+
y: number;
|
|
3233
|
+
z: number;
|
|
3234
|
+
};
|
|
3235
|
+
}) => void;
|
|
3236
|
+
resize: () => void;
|
|
3237
|
+
dispose: () => void;
|
|
3238
|
+
}
|
|
3239
|
+
type CreateMicrioSogViewer = (options: {
|
|
3240
|
+
canvas: HTMLCanvasElement;
|
|
3241
|
+
url: string;
|
|
3242
|
+
filename?: string;
|
|
3243
|
+
startFrameFraction?: number;
|
|
3244
|
+
}) => Promise<MicrioSogViewer>;
|
|
3245
|
+
declare global {
|
|
3246
|
+
/** Set by the page (or loaded below) from the PlayCanvas SOG bundle. */
|
|
3247
|
+
var createMicrioSogViewer: CreateMicrioSogViewer | undefined;
|
|
3248
|
+
}
|
|
3249
|
+
/** True when this bundle should be rendered by the SOG viewer instead of the tile engine. */
|
|
3250
|
+
export const isSogBundle: (micrio: HTMLMicrioElement, bundle: Models.ImageBundle.BundleImage) => boolean;
|
|
3251
|
+
export {};
|
|
3252
|
+
|
|
3253
|
+
|
|
3193
3254
|
/**
|
|
3194
3255
|
* Manages downloading and processing image textures for WebGL using Web Workers.
|
|
3195
3256
|
* @internal
|