spacesvr-websessions
Version:
A standardized reality for future of the 3D Web
26 lines (25 loc) • 785 B
TypeScript
/// <reference types="react" />
import { Scene } from "three";
declare type Tool = {
name: string;
orderIndex: number;
};
declare type Direction = "left" | "right" | "up";
declare type ToolbeltState = {
tools: Tool[];
activeTool?: Tool;
grant: (name: string, orderIndex?: number) => void;
revoke: (name: string) => void;
hide: () => void;
next: () => void;
prev: () => void;
show: () => void;
activeIndex: number | undefined;
setActiveIndex: (i: number) => void;
hudScene: Scene;
direction: Direction;
};
export declare const ToolbeltContext: import("react").Context<ToolbeltState>;
export declare const useToolbelt: () => ToolbeltState;
export declare const useToolbeltState: (showOnSpawn: boolean) => ToolbeltState;
export {};