@speckle/objectloader2
Version:
This is an updated objectloader for the Speckle viewer written in typescript
31 lines • 824 B
JavaScript
export class MemoryDownloader {
#items;
#rootId;
#results;
constructor(rootId, items) {
this.#rootId = rootId;
this.#items = items;
}
initializePool(params) {
this.#results = params.results;
}
downloadSingle() {
const root = this.#items.get(this.#rootId);
if (root) {
return Promise.resolve({ baseId: this.#rootId, base: root });
}
return Promise.reject(new Error('Method not implemented.'));
}
disposeAsync() {
return Promise.resolve();
}
add(id) {
const base = this.#items.get(id);
if (base) {
this.#results?.add({ baseId: id, base });
return;
}
throw new Error('Method not implemented.');
}
}
//# sourceMappingURL=memoryDownloader.js.map