@loaders.gl/core
Version:
Framework-independent loaders for 3D graphics formats
80 lines (76 loc) • 3.73 kB
JavaScript
import _regeneratorRuntime from "@babel/runtime/regenerator";
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
import { parse } from './lib/parse';
import { parseSync } from './lib/parse-sync';
import { fetchFile } from './lib/fetch/fetch-file';
import { load } from './lib/load';
import { resolvePath } from './lib/fetch/file-aliases';
import { global } from './utils/globals';
import * as path from './lib/path/path';
export { path };
export { setPathPrefix, getPathPrefix, resolvePath } from './lib/fetch/file-aliases.js';
export { fetchFile } from './lib/fetch/fetch-file';
export { readFileSync } from './lib/fetch/read-file';
export { writeFile, writeFileSync } from './lib/fetch/write-file';
export { getErrorMessageFromResponseSync as _getErrorMessageFromResponseSync, getErrorMessageFromResponse as _getErrorMessageFromResponse } from './lib/fetch/fetch-error-message';
export { registerLoaders } from './lib/register-loaders';
export { parse } from './lib/parse';
export { parseSync } from './lib/parse-sync';
export { parseInBatches } from './lib/parse-in-batches';
export { parseInBatchesSync } from './lib/parse-in-batches-sync';
export { load, loadInBatches } from './lib/load';
export { encode, encodeSync, encodeInBatches } from './lib/encode';
export { save, saveSync } from './lib/save';
export { isPromise, isIterable, isAsyncIterable, isIterator, isFetchResponse, isReadableStream, isWritableStream } from './javascript-utils/is-type';
export { toArrayBuffer } from './javascript-utils/binary-utils';
export { getStreamIterator } from './javascript-utils/stream-utils';
export { forEach, concatenateAsyncIterator, lineAsyncIterator, textDecoderAsyncIterator, numberedLineAsyncIterator } from './javascript-utils/async-iterator-utils';
export { isBrowser, self, window, global, document } from './utils/globals';
export { default as assert } from './utils/assert';
export { selectLoader as _selectLoader } from './lib/select-loader';
export { default as _WorkerThread } from './worker-utils/worker-thread';
export { default as _WorkerFarm } from './worker-utils/worker-farm';
export { default as _WorkerPool } from './worker-utils/worker-pool';
export { default as _fetchProgress } from './lib/progress/fetch-progress';
export { _unregisterLoaders } from './lib/register-loaders';
export var TextEncoder = global.TextEncoder;
export var TextDecoder = global.TextDecoder;
export function createReadStream(_x, _x2) {
return _createReadStream.apply(this, arguments);
}
function _createReadStream() {
_createReadStream = _asyncToGenerator(_regeneratorRuntime.mark(function _callee(url, options) {
var response;
return _regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
console.warn('createReadStream() deprecated, use fetch().then(resp => resp.body)');
url = resolvePath(url);
_context.next = 4;
return fetchFile(url, options);
case 4:
response = _context.sent;
return _context.abrupt("return", response.body);
case 6:
case "end":
return _context.stop();
}
}
}, _callee);
}));
return _createReadStream.apply(this, arguments);
}
export function parseFile() {
console.warn('parse() deprecated, use parse()');
return parse.apply(void 0, arguments);
}
export function parseFileSync() {
console.warn('parseSync() deprecated, use parseSync()');
return parseSync.apply(void 0, arguments);
}
export function loadFile() {
console.warn('loadFile() deprecated, use load()');
return load.apply(void 0, arguments);
}
//# sourceMappingURL=index.js.map