UNPKG

@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.

15 lines (14 loc) 736 B
import { ModelFile } from '../use-load-model'; /** * A React hook for exporting a 3D model from a Three.js scene. * * @param {Function} [onSaved] Called when the export is complete. * @param {Function} [onError] Called when an error occurs during exporting. * @returns An object with a single property, `handleGltfExport`. `handleGltfExport` is a function * that takes a file object and a boolean indicating whether to export in binary format. * It exports the scene in the format specified by the boolean parameter. */ declare const useExportModel: (onSaved?: () => void, onError?: (error: ErrorEvent) => void) => { handleGltfExport: (file: ModelFile | null, binary: boolean) => void; }; export default useExportModel;