@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.
13 lines (12 loc) • 842 B
TypeScript
import { ModelFileTypes, ModelLoader } from '../../../core/src/model-loader/index.ts';
import { default as React } from 'react';
import { Action, ModelFile } from './types';
import { useOptimizeModel } from '../use-optimize-model';
type Optimizer = ReturnType<typeof useOptimizeModel> | undefined;
type Dispatch = React.Dispatch<Action>;
export declare const loadBinaryModel: (file: File, fileType: ModelFileTypes, modelLoader: ModelLoader, optimizer: Optimizer, dispatch: Dispatch) => Promise<ModelFile | null>;
export declare const loadGltfModel: (gltfFile: File, otherFiles: File[], modelLoader: ModelLoader, optimizer: Optimizer, dispatch: Dispatch, calculateReferencedBytesFromFiles: (gltfFile: File, otherFiles: File[]) => Promise<{
sourcePackageBytes: number;
textureBytes: number;
}>) => Promise<ModelFile | null>;
export {};