UNPKG

@threepipe/plugin-assimpjs

Version:
33 lines 1.34 kB
import { AViewerPluginSync, ThreeViewer, IObject3D, ExportFileOptions } from 'threepipe'; interface AssimpJsInterface { [key: string]: any; } /** * AssimpJsPlugin * * Helper plugin to load the assimp.js library from a CDN and provide a method to convert files using Assimp.js. * * Assimpjs - https://github.com/kovacsv/assimpjs * Fork with a custom build to support fbx export - https://github.com/repalash/assimpjs */ export declare class AssimpJsPlugin extends AViewerPluginSync { static readonly PluginType: string; enabled: boolean; dependencies: never[]; initOnAdd: boolean; static LIBRARY_PATH: string; constructor(initOnAdd?: boolean); protected _scriptElement?: HTMLScriptElement; private _initing; init(): Promise<AssimpJsInterface | undefined>; private _init; ajs?: AssimpJsInterface; onAdded(viewer: ThreeViewer): void; convertFiles(files: Record<string, ArrayBuffer>, format?: 'fbx' | 'gltf2' | 'glb2' | 'assjson'): Blob | undefined; exportModel(format?: 'fbx' | 'gltf2' | 'glb2' | 'assjson', object?: IObject3D, options?: ExportFileOptions): Promise<File | undefined>; exportSelected: boolean; exportAsFbx(object?: IObject3D): Promise<void>; exportAsGlb(object?: IObject3D): Promise<void>; } export {}; //# sourceMappingURL=AssimpJsPlugin.d.ts.map