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.

24 lines (23 loc) 1.14 kB
import { default as JSZip } from 'jszip'; import { ImageDataObject, TexturesObject, URIBufferObject } from '../types'; /** * Handles processing and adding images to a zip file. * * @param images The images property of the GLTF model's asset. * @param textures The textures property of the GLTF model's asset. * @param zip The zip file to add images to. */ export declare const handleImages: (images: Array<ImageDataObject>, textures: Array<TexturesObject>, zip: JSZip) => void; /** * Handles processing and adding buffers to a zip file. * * @param buffers The buffers property of the GLTF model's asset. * @param zip The zip file to add buffers to. * @param baseFileName The base file name to use for the exported file. * * Only ArrayBuffers and URIBufferObjects with a uri of type data URL are supported. * If the buffer is not an ArrayBuffer, it must have a uri that starts with 'data:'. * If the buffer is not an ArrayBuffer and does not have a uri, a warning is logged * to the console. */ export declare const handleBuffers: (buffers: Array<URIBufferObject | ArrayBuffer>, zip: JSZip, baseFileName: string) => void;