nanogl-gltf
Version:
22 lines (21 loc) • 554 B
JavaScript
import GltfLoader from "./GltfLoader";
/**
* This class provides functionalities for loading gltf files and serves as a wrapper for IOInterface
*/
export default class GltfIO {
/**
* @param io IOInterface implementation
*/
constructor(io) {
this._ioImpl = io;
}
/**
* Load a Gltf file
* @param path Gltf file path
* @param options Options for the loader
*/
loadGltf(path, options = {}) {
const loader = new GltfLoader(this._ioImpl, path, options);
return loader.load();
}
}