threepipe
Version:
A modern 3D viewer framework built on top of three.js, written in TypeScript, designed to make creating high-quality, modular, and extensible 3D experiences on the web simple and enjoyable.
18 lines • 682 B
JavaScript
/**
* Importer for loading files through AssetImporter. By default, it's a wrapper for threejs loaders.
*/
export class Importer {
ctor(assetImporter) {
const loader = this.cls && new this.cls(assetImporter.loadingManager);
return typeof this.onCtor === 'function' ? this.onCtor(loader, assetImporter, this) : loader;
}
constructor(cls, ext, mime, root, onCtor) {
this.extensions = [];
this.cls = cls;
this.ext = ext.filter(Boolean).map(e => e.toLowerCase());
this.mime = mime.filter(Boolean).map(e => e.toLowerCase());
this.root = root;
this.onCtor = onCtor;
}
}
//# sourceMappingURL=Importer.js.map