@micrio/client 7.5.0-alpha.2 → 7.5.0-alpha.4

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
@@ -984,6 +984,83 @@ declare module '@micrio/client' {
984
984
  }
985
985
  }
986
986
 
987
+ export namespace Book3D {
988
+ interface FlipOptions {
989
+ /** Flip speed multiplier (default `0.6`; lower = slower dramatic turn, higher = brisk). */
990
+ flipSpeed?: number;
991
+ /** Peak corner lift height in world units (default `0.7`). */
992
+ arcPeak?: number;
993
+ /** Normalized corner grab vertical position `0..1` (0 = top, 1 = bottom). */
994
+ grabRow?: number;
995
+ }
996
+ interface CameraFlyOptions extends Camera.AnimationOptions {
997
+ /** Framing margin multiplier around the target rect (default `1.06`). */
998
+ padding?: number;
999
+ /** Optional target polar angle in radians (`0` = side, `π/2` = overhead). */
1000
+ phi?: number;
1001
+ /** Optional target azimuth angle in radians (`0` = default front orientation). */
1002
+ theta?: number;
1003
+ }
1004
+ interface PoseOptions {
1005
+ /** Normalized zoom scale relative to fit radius (`1` = full fit, `< 1` = zoomed in). */
1006
+ radiusScale?: number;
1007
+ /** Polar angle in radians (`0.08..π*0.495`). */
1008
+ phi?: number;
1009
+ /** Azimuth angle in radians. */
1010
+ theta?: number;
1011
+ /** Flight duration in milliseconds (default `900`). */
1012
+ duration?: number;
1013
+ }
1014
+ interface LightingOptions {
1015
+ /** Cross-fade duration in milliseconds (`0` = immediate snap). */
1016
+ duration?: number;
1017
+ /** Optional preset-specific parameter overrides (e.g. `{ timeOfDay: 17.5 }`). */
1018
+ params?: Record<string, number>;
1019
+ }
1020
+ interface TiltShiftOptions {
1021
+ focusCenter?: number;
1022
+ focusWidth?: number;
1023
+ blurRadius?: number;
1024
+ blurFalloff?: number;
1025
+ }
1026
+ interface DriftOptions {
1027
+ amplitudeTheta?: number;
1028
+ amplitudePhi?: number;
1029
+ speed?: number;
1030
+ }
1031
+ interface PageFlipEvent {
1032
+ pageIndex: number;
1033
+ direction: 1 | -1;
1034
+ speed: number;
1035
+ isCover: boolean;
1036
+ }
1037
+ interface ProjectedRect {
1038
+ x: number;
1039
+ y: number;
1040
+ width: number;
1041
+ height: number;
1042
+ visible: boolean;
1043
+ }
1044
+ interface Controller {
1045
+ readonly ready: Promise<void>;
1046
+ goto: (pageIdx: number, opts?: FlipOptions) => Promise<void>;
1047
+ nextPage: (opts?: FlipOptions) => void;
1048
+ prevPage: (opts?: FlipOptions) => void;
1049
+ getCurrentPage: () => number;
1050
+ getPageCount: () => number;
1051
+ isZoomedIn: () => boolean;
1052
+ flyToView: (imageId: string, view: Camera.View, opts?: CameraFlyOptions) => Promise<void>;
1053
+ flyToFullView: (opts?: Camera.AnimationOptions) => Promise<void>;
1054
+ flyToPose: (opts: PoseOptions) => Promise<void>;
1055
+ setLighting: (preset: string, opts?: LightingOptions) => void;
1056
+ setFlipSpeed: (speed: number) => void;
1057
+ setArcPeak: (peak: number) => void;
1058
+ setTiltShift: (enabled: boolean, opts?: TiltShiftOptions) => void;
1059
+ setCinematicDrift: (enabled: boolean, opts?: DriftOptions) => void;
1060
+ projectRect: (imageId: string, view: Camera.View) => ProjectedRect | null;
1061
+ }
1062
+ }
1063
+
987
1064
  /**
988
1065
  * # Image content data
989
1066
  *
@@ -1573,6 +1650,10 @@ declare module '@micrio/client' {
1573
1650
  'page-closed': ImageData.Menu;
1574
1651
  /** Triggers on album image change, containing the ids of the currently shown image(s) */
1575
1652
  'gallery-show': string[];
1653
+ /** The 3D book viewer is initialized and ready for cinematic control */
1654
+ 'book-ready': Book3D.Controller;
1655
+ /** A 3D book page flip has started (useful for synchronized paper foley audio) */
1656
+ 'book-page-flip': Book3D.PageFlipEvent;
1576
1657
  /** The grid controller has initialized */
1577
1658
  'grid-init': Grid;
1578
1659
  /** All images in the grid have loaded */
@@ -2518,6 +2599,8 @@ declare module '@micrio/client' {
2518
2599
  get hostImage(): MicrioImage | undefined;
2519
2600
  /** The {@link Grid} controller for this gallery, when `type === 'grid'` and attached. */
2520
2601
  get grid(): Grid | undefined;
2602
+ /** The 3D book cinematic controller for this gallery, when `type === 'book3d'` and mounted. */
2603
+ get book3d(): Models.Book3D.Controller | undefined;
2521
2604
  /** Finds a {@link MicrioImage} in this gallery by its Micrio ID. */
2522
2605
  getImage(id: string): MicrioImage | undefined;
2523
2606
  gotoId: (id: string) => Promise<MicrioImage | undefined>;