react-krpano-toolkit
Version:
A React toolkit for KRPano integration with reusable functions and screen/hotspot configuration management
32 lines (31 loc) • 1.43 kB
TypeScript
/**
* Hook to access the Krpano API context.
* @returns {call, get, set} - The Krpano API context.
* @throws {Error} - If useKrpano is called outside of KrpanoProvider.
*/
export declare function useKrpano(): {
execute: <T extends import("../../types/krpano-types").KrpanoType = import("../../types/krpano-types").KrpanoType>(opts: import("../../types/krpano-types").KrpanoCommandOptions<T>) => void;
scene: import("../../types/krpano-types").SceneOperations;
view: import("../../types/krpano-types").ViewOperations;
element: import("../../types/krpano-types").ElementOperations;
sound: import("../../types/krpano-types").SoundOperations;
control: import("../../types/krpano-types").ControlOperations | null;
utility: import("../../types/krpano-types").UtilityOperations;
show: (name: string, type?: "hotspot" | "layer" | "plugin") => void;
hide: (name: string, type?: "hotspot" | "layer" | "plugin") => void;
toggle: (name: string, type?: "hotspot" | "layer" | "plugin") => void;
loadScene: (sceneName: string, options?: {
blend?: string;
flags?: string;
}) => void;
lookAt: (hlookat: number, vlookat: number, fov?: number, options?: {
smooth?: boolean;
time?: number;
tween?: string;
blend?: number;
}) => void;
zoomTo: (fov: number, options?: {
smooth?: boolean;
time?: number;
}) => void;
};