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.
25 lines (17 loc) • 630 B
text/typescript
import {IViewerPluginSync, ThreeViewer} from '../../viewer'
import {Importer} from '../../assetmanager'
export abstract class BaseImporterPlugin implements IViewerPluginSync {
declare ['constructor']: typeof BaseImporterPlugin
public static readonly PluginType: string
protected abstract _importer: Importer
toJSON: any = null // disable serialization
onAdded(viewer: ThreeViewer) {
viewer.assetManager.importer.addImporter(this._importer)
}
onRemove(viewer: ThreeViewer) {
viewer.assetManager.importer.removeImporter(this._importer)
}
dispose() {
return
}
}