UNPKG

react-krpano-toolkit

Version:

A React toolkit for KRPano integration with reusable functions and screen/hotspot configuration management

34 lines (33 loc) 920 B
export type LookToAction = { type: "lookto"; hlookat: "view.hlookat" | string; vlookat: "view.vlookat" | string; }; export type PanAction = { type: "pan"; dh: number | string; dv: number | string; }; export type LayerAction = { type: "layer"; name: string; visible: boolean; }; export type PluginAction = { type: "plugin"; name: string; action: string; params?: any[]; }; export type CallAction = { type: "call"; command: string; }; export type KeyboardAction = LookToAction | PanAction | LayerAction | PluginAction | CallAction; export type KeyMap = Record<string, KeyboardAction>; export type KrpanoActionParams = Record<string, any>; export type KrpanoActionCallback<P extends KrpanoActionParams = {}> = (params: P) => string; export type KrpanoGlobalAction<P extends KrpanoActionParams = {}> = { name: string; callback: KrpanoActionCallback<P>; };