@vctrl/hooks
Version:
vctrl/hooks is a React hooks package designed to simplify 3D model loading and management within React applications. It's part of the vectreal-core ecosystem and is primarily used in the vctrl/viewer React component and the official website application.
12 lines (11 loc) • 405 B
TypeScript
import { Action, ModelFileTypes } from '../types';
/**
* Hook to load binary files
*
* @param dispatch - The dispatch function from the useReducer hook
* @returns An object containing the loadBinary function
*/
declare function useLoadBinary(dispatch: React.Dispatch<Action>): {
loadBinary: (file: File, fileType: ModelFileTypes, onProgress: () => void) => void;
};
export default useLoadBinary;