spacesvr-websessions
Version:
A standardized reality for future of the 3D Web
30 lines (29 loc) • 933 B
TypeScript
import { MutableRefObject } from "react";
import { Device, DeviceState } from "./device";
interface MenuLink {
text: string;
link: string;
action?: never;
}
interface MenuAction {
text: string;
link?: never;
action: () => void;
}
export declare type MenuItem = MenuLink | MenuAction;
export declare type PauseEvent = (p: boolean) => void;
export declare type EnvironmentState = {
paused: boolean;
name: string;
setPaused: (p: boolean) => void;
events: PauseEvent[];
device: DeviceState;
setDevice: (d: Device) => void;
containerRef: MutableRefObject<HTMLDivElement | null>;
menuItems: MenuItem[];
setMenuItems: (i: MenuItem[]) => void;
};
export declare const EnvironmentContext: import("react").Context<EnvironmentState>;
export declare const useEnvironment: () => EnvironmentState;
export declare const useEnvironmentState: (name: string) => EnvironmentState;
export {};