UNPKG

@speckle/objectloader2

Version:

This is an updated objectloader for the Speckle viewer written in typescript

35 lines 974 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MemoryDownloader = void 0; 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.'); } } exports.MemoryDownloader = MemoryDownloader; //# sourceMappingURL=memoryDownloader.js.map